From: Russ Allbery <[EMAIL PROTECTED]>
Date: 22 Sep 2000 14:19:51 -0700
What would be *truly* valuable from my perspective would be some
indication of when given headers showed up. For example, INN is still
faithfully checking for the existence of unistd.h and only including it
conditionally, mostly because I'm not sure when unistd.h showed up. I'm
betting that we shouldn't bother with that check any more given that we
already require that the system has fcntl.h, and the likelihood that a
system has fcntl.h and not unistd.h is probably fairly remote, but I don't
know for sure.
This is my recollection, for the record. unistd.h was invented by
POSIX as a place for function prototypes which had not lived anywhere
in historical systems. fcntl.h was the updated version of sys/file.h.
fcntl.h predates unistd.h, and there were systems which had fcntl.h
but did not have unistd.h. Whether any such systems are still
running, I don't know.
As a result, configure.in files tend to keep all their old portability
bits that someone put in because they found it in the manual and everyone
else is afraid to touch because they don't have access to any of the
affected systems. If we had something like "don't bother checking for any
of the following if you don't care about systems prior to 1990," that
would be wonderful. I'm betting fcntl.h, unistd.h, the mem* functions,
and getopt all fall into that category.
Yes, I think so.
When I write new programs these days I assume ANSI C and POSIX.1.
It would also be interesting to know what things are tied together. For
example, I see software that uses ANSI C function prototypes but tests for
varargs.h vs. stdarg.h and chooses the right variadic argument syntax
accordingly. Are there really ANSI C compilers that don't have stdarg.h?
gcc appears to supply its own.
I've never heard of an ANSI C compiler which did not have stdarg.h. I
would be astounded to discover that any such beast ever existed.
Ian