Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Abandon NULL for (0) Message-ID: <11267@smoke.BRL.MIL> Date: 12 Oct 89 05:15:00 GMT References: <252B5E41.1244@marob.masa.com> <19999@mimsy.UUCP> <740@geovision.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <740@geovision.UUCP> pt@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.