From: Alexandre Oliva <[EMAIL PROTECTED]>
Date: 27 Jul 2000 21:50:47 -0300
> the proposed changes don't make autoconf unusable for pre-C99.
Not unusable, but it will certainly break some code.
autoconf's behavior wouldn't change for existing autoconf input files.
So I don't see how it could break any existing code.
Perhaps you meant "if the user changes configure.in to the new form
and doesn't change anything else, something might break". I agree
with this, but I think the breakages will be minimal and acceptable.
Think, for example, of programs that test for something like malloc(),
That's not a realistic example. No program tests for malloc.
Here's a more realistic example: fchdir. It is the first traditional
int-returning function that GNU tar applies AC_CHECK_FUNC to. If
tar's test gets upgraded to the following:
AC_CHECK_FUNCTION(fchdir, (unistd.h))
(or whatever the syntax happens to be), then the only disadvantage
will be that, on ancient hosts that do not declare fchdir in unistd.h,
GNU tar will fall back on chdir instead of fchdir.
To my mind, this is an acceptable cost. Though we still need to
_port_ to pre-POSIX platforms, it is no longer important to _optimize_
for them. (As it happens, fchdir sometimes mistakenly fails in SunOS
4 -- the most commonly used pre-POSIX platform -- so the fallback can
occur now anyway at runtime....)
I'd rather keep the semantics of performing a linker-only test if
this is at all possible.
OK, then let's say that the linker-only semantics (i.e. AC_CHECK_FUNC
without any includes) are still supported and not deprecated.
However, I would put a warning in the documentation that linker-only
semantics won't work with strict C99, or with bounds-checking, or
perhaps with other newer features. I.e. even if it isn't deprecated,
it has some known limitations.
> The C standard has always required that an include file must declare
> each function, even those returning `int'.
But we all know this hasn't always been true :-)
Of course. But the exceptions are no longer worth bothering to
optimize for.