Article View: gnu.gcc.help
Article #369Re: Help with GCC -ansi signal() parameter
From: Vivek Khera
Date: Fri, 04 Sep 1992 14:55
Date: Fri, 04 Sep 1992 14:55
26 lines
1519 bytes
1519 bytes
In article <5105@news.duke.edu> tcamp@acpub.duke.edu (Ted A. Campbell) writes:
I'm receiving a warning message when I compile the following bit
of code. The message is that the second parameter to signal()
("handler") is of an incompatible type. I'm using the command
#include "stdio.h"
#include "stdlib.h"
#include "signal.h"
you should use <stdio.h> style includes, just to make sure things are
portable.
extern int handler( void );
here's your problem. the man page on ultrix systems lie, and the type
required by prototype for signal() in the actual include file
/usr/include/signal.h is:
void handler(int x);
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Gradual Student/Systems Guy Department of Computer Science
Internet: khera@cs.duke.edu Box 90129
(MIME mail accepted) Durham, NC 27708-0129 (919)660-6528
Technical Details
Message-ID:
<KHERA.92Sep4105557@thneed.cs.duke.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!concert!duke!kheraReferences:
<5105@news.duke.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!concert!duke!khera From: khera@cs.duke.edu (Vivek Khera) Newsgroups: gnu.gcc.help Subject: Re: Help with GCC -ansi signal() parameter Message-ID: <KHERA.92Sep4105557@thneed.cs.duke.edu> Date: 4 Sep 92 14:55:57 GMT References: <5105@news.duke.edu> Sender: news@duke.cs.duke.edu Organization: Duke University CS Dept., Durham, NC Lines: 26 Nntp-Posting-Host: thneed.cs.duke.edu In-reply-to: tcamp@acpub.duke.edu's message of 4 Sep 92 12:22:12 GMT X-Md4-Signature: 1013d48658bcffeb1abb7d2f1b454716