Abandon NULL for (0)

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Oct 12 15:15:00 AEST 1989


In article <740 at geovision.UUCP> pt at geovision.UUCP (Paul Tomblin) writes:
>For some strange reason, our VMS C compiler has the following in signal.h:
>int (*signal (int sig, void (*func)(int, ...)) ) (int, ...);
>Someone care to comment on why Dec did it this way, and if they are planning
>to fix it later?

They were probably following BSD's lead.  BSD UNIX at one point started
passing additional information to signal handlers for certain classes of
signals (e.g. FPE exceptions).  This is horribly nonportable, as is
treating fixed-argument functions the same as variadic functions.

Anyway, it's wrong.  The standard signal() function's signal handlers
are NOT variadic; they receive precisely one int argument.



More information about the Comp.lang.c mailing list