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

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

 



Hi Bruno,

* Bruno Haible wrote on Wed, Apr 19, 2006 at 06:49:06PM CEST:
> 
> 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?

Yes.  I suggested an autoconf-time check in
http://lists.gnu.org/archive/html/autoconf-patches/2006-04/msg00271.html
already.

> 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.

It could be done at Autoconf time with reasonable precision, or at
configure time with even more precision, but runtime and configure size
overhead.

Note that it induces spurious failures for C++ and possible C99 using
projects, but not for "normal" C; so the impact may not be quite as high
as you suggest.  But I agree with your idea of adding some precautionary
measure.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux