<varargs.h> vs. function prototypes
Chris Torek
torek at elf.ee.lbl.gov
Wed Jun 19 05:04:06 AEST 1991
>In article <159364 at pyramid.pyramid.com> markhall at pyrps5.pyramid.com
>(Mark Hall) writes:
>> #ifdef __STDC__
>> void foo(char *format, ...)
>> #else
>> void foo(format, va_alist) char *format; va_dcl
>> #endif
[and on from there]
In article <1991Jun18.145823.2512 at cbnewsk.att.com> hansen at pegasus.att.com
(Tony L. Hansen) writes:
>The above form for <varargs.h> usage is wrong. ...
This is correct; however, I have used the above, and continue to use it,
in 4BSD code, with the excuse that:
a) it is far clearer; and
b) if your varargs does not handle it, you can probably obtain an ANSI C
implementation and use the __STDC__ code anyway.
In other words, we are not willing to bend over backwards (for compatibility)
until it hurts, only until it is mildly uncomfortable. :-)
Chris
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.std.c
mailing list