autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] do not use `exit' in tests


From: Bruno Haible
Subject: Re: [patch] do not use `exit' in tests
Date: Wed, 19 Apr 2006 18:49:06 +0200
User-agent: KMail/1.5

Ralf Wildenhues wrote to the CLN list:
> Upcoming Autoconf-2.60 will not provide a declaration for exit;
> it has turned out that tracking MSVC incompatibilites here is
> a lot of work.  Instead, returning from main is suggested as a
> viable alternative (the systems where that was not portable are
> not likely to be used any more).
>
> The following patch does that for the macros in CLN.

Thank you, but how are you going to handle the thousands of other packages
out there? You can impossibly send a patch to every maintainer of a package
that has a few autoconf macros.

The problem is that with the removed exit() declaration, some autoconf macros
will silently behave differently when used with autoconf-2.60. How about letting
the developer know that it has changed, and let him fix his code? Similar to
what Akim did when the AC_CHECK_HEADER macro was changed (except that the
printed text requested to send a mail to bug-autoconf, whereas the reports
should be better sent to the package maintainer). Could you, for example,
in AC_COMPILE_IFELSE and AC_RUN_IFELSE, if the program to be compiled contains
the regexp "exit *(", compile it once with an extra  #include <stdlib.h>
and once without modifications, and see if the compiler fails to compile one
but not the other? And if so, print some multiline message asking to tell
the maintainer of the package to add this #include himself?

This certainly slows down the execution of the configure file, but you could
plan to remove this migration help in 2.61. Or make it dependent on some
command-line option.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]