Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: 0 and pointers.( Re: Abandon NULL for (0))
Message-ID: <1989Oct17.164915.18142@utzoo.uucp>
Organization: U of Toronto Zoology
References: <8634@goofy.megatest.UUCP> <2550109@hpisod2.HP.COM>
Date: Tue, 17 Oct 89 16:49:15 GMT

In article <2550109@hpisod2.HP.COM> decot@hpisod2.HP.COM (Dave Decot) writes:
>> ... arbitrarily changing the specs for signal handlers was a
>> terrible mistake and very unportable.  Defining a new interface is the
>> right approach.
>
>Since the variadic functions in questions are the signal handlers, designing
>a new interface that permits preserving old behavior seems very difficult.

No it's not; you just need a new variant of signal() which is used when
establishing a variadic handler.  (In POSIX, actually, it's easier than that,
because the POSIX equivalent of signal() has a "flags" field in the
structure it receives.)  Then the system knows whether the handler is
normal or variadic and can cope accordingly.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
