Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!apple!bionet!ames!dftsrv!jagmac2.gsfc.nasa.gov!jim From: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Newsgroups: comp.unix.aux Subject: signal.h and sys/signal.h on 2.0 Message-ID: <3392@dftsrv.gsfc.nasa.gov> Date: 12 Sep 90 18:10:07 GMT Sender: news@dftsrv.gsfc.nasa.gov Reply-To: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Organization: NASA Goddard Space Flight Center Lines: 41 I have uncovered something in the A/UX 2.0 header files for signals (/usr/include/signal.h and sys/signal.h) that, if I understand typedefs right, might be wrong. In signal.h, signal is defined as: extern sigfunct_t signal(); In sys/signal.h, sigfunct_t is defined as (assume !POSIX case): typedef int (*sigfunct_t) (); which means that sigfunct_t is a type that is a "pointer to a function that returns an int." Now this definition of sigfunct_t is fine. My concern is back in signal.h. What we want to say is: int (*signal)(); which would be accomplished by: sigfunct_t signal; ("signal is a pointer to a function that returns an int") but signal.h says something different (I think...): sigfunct_t signal(); ("signal is a function that returns a pointer to a function that returns an int") IS THIS RIGHT??? DO I UNDERSTAND THIS CORRECTLY??? -- ======================================================================= #include =:^) Jim Jagielski NASA/GSFC, Code 711.1 jim@jagmac2.gsfc.nasa.gov Greenbelt, MD 20771 "Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach the very, very top, and then it tends to slope away rather sharply."