0 and pointers.( Re: Abandon NULL for (0))
Henry Spencer
henry at utzoo.uucp
Wed Oct 18 02:49:15 AEST 1989
In article <2550109 at hpisod2.HP.COM> decot at 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 at zoo.toronto.edu
More information about the Comp.lang.c
mailing list