signal.h and sys/signal.h on 2.0
Jim Jagielski
jim at jagmac2.gsfc.nasa.gov
Thu Sep 13 04:10:07 AEST 1990
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 <std/disclaimer.h>
=:^)
Jim Jagielski NASA/GSFC, Code 711.1
jim at 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."
More information about the Comp.unix.aux
mailing list