home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gcc / help / 2063 < prev    next >
Encoding:
Text File  |  1992-09-04  |  1.4 KB  |  41 lines

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!concert!duke!khera
  2. From: khera@cs.duke.edu (Vivek Khera)
  3. Newsgroups: gnu.gcc.help
  4. Subject: Re: Help with GCC -ansi signal() parameter
  5. Message-ID: <KHERA.92Sep4105557@thneed.cs.duke.edu>
  6. Date: 4 Sep 92 14:55:57 GMT
  7. References: <5105@news.duke.edu>
  8. Sender: news@duke.cs.duke.edu
  9. Organization: Duke University CS Dept., Durham, NC
  10. Lines: 26
  11. Nntp-Posting-Host: thneed.cs.duke.edu
  12. In-reply-to: tcamp@acpub.duke.edu's message of 4 Sep 92 12:22:12 GMT
  13. X-Md4-Signature: 1013d48658bcffeb1abb7d2f1b454716
  14.  
  15. In article <5105@news.duke.edu> tcamp@acpub.duke.edu (Ted A. Campbell) writes:
  16.  
  17.    I'm receiving a warning message when I compile the following bit
  18.    of code. The message is that the second parameter to signal()
  19.    ("handler") is of an incompatible type.  I'm using the command
  20.  
  21.    #include "stdio.h"
  22.    #include "stdlib.h"
  23.    #include "signal.h"
  24.  
  25. you should use <stdio.h> style includes, just to make sure things are
  26. portable.
  27.  
  28.    extern int handler( void );
  29.  
  30. here's your problem.  the man page on ultrix systems lie, and the type
  31. required by prototype for signal() in the actual include file
  32. /usr/include/signal.h is:
  33.  
  34.   void handler(int x);
  35.  
  36. --
  37. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  38. Vivek Khera, Gradual Student/Systems Guy  Department of Computer Science
  39. Internet:   khera@cs.duke.edu             Box 90129
  40.             (MIME mail accepted)          Durham, NC 27708-0129 (919)660-6528
  41.