On Nov 6, 2007 9:25 AM, Paul Eggert <
eggert@cs.ucla.edu> wrote:
"Jonathan Leffler" <
jonathan.leffler@gmail.com> writes:
> Is there actually a good reason not to write the whole library with ISO
> prototypes?
Not these days, no. Every practical C compiler supports prototypes
nowadays. I think that stuff is now pedantic only, meant as
illustration, to port back to ancient K&R compilers.
Thanks, Paul, for confirmation.
Is there any virtue in changing the code to uniformily use prototype function definitions? If so, is there a protocol for making changes to the code? With whom should I be discussing the mechanics - you, Paul, or Mr Olson, or someone else? I know it is public domain and I can make modifications to my own copy, but I'd rather be more or less in sync with the official version for as long as I can.
As long as we're being pedantic, it might be worth mentioning that the
current approach is not portable to arbitrary standard C platforms,
since it assumes that time_t is at least as wide as int. C does not
allow this:
static int differ_by_repeat(time_t t1, time_t t0);
static int
differ_by_repeat(t1, t0)
const time_t t1;
const time_t t0;
{ ... }
when time_t is of type 'short', say. (This is only a pedantic point
as well, of course; nobody defines time_t to be that narrow.)