In Solaris, the protoptype of psignal() is in siginfo.h. However, under Linux and Mac OS X, the protoptype of psignal() is in signal.h; siginfo.h does not exist. Some advocate writing 2 different .c files. Let's say I do not want to do that for such a minor discrepancy. How do I write a C program that can run on all 3 operating systems, by using #ifdef for example? That is, how can I do something like:
Code:
#ifdef SOLARIS
# include <siginfo.h>
#else
# include <signal.h>
#endif
int main ()
{ ...
... psignal() ...
...
}
Thanks.