bug-autoconf
[Top][All Lists]
Advanced

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

Re: -Werror breaks autoconf tests, but not actual source code


From: Paul Eggert
Subject: Re: -Werror breaks autoconf tests, but not actual source code
Date: 11 Dec 2003 11:32:32 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Millaway, John" <address@hidden> writes:

> One of them is AC_HEADER_STDC, which gets a warning for implicit declaration
> of 'exit':

That problem is easily fixed as shown below.
What other problems did you observe?

2003-12-11  Paul Eggert  <address@hidden>

        * lib/autoconf/headers.m4 (AC_HEADER_STDC): Include <stdlib.h>
        when using 'exit' in a test; C99 requires that 'exit' be declared.

--- headers.m4.~1.36.~  Mon Dec  1 12:09:18 2003
+++ headers.m4  Thu Dec 11 11:30:20 2003
@@ -590,6 +590,7 @@ if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
   AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[#include <ctype.h>
+#include <stdlib.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -609,7 +610,7 @@ main ()
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
-      exit(2);
+      exit (2);
   exit (0);
 }]])], , ac_cv_header_stdc=no, :)
 fi])




reply via email to

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