bug-autoconf
[Top][All Lists]
Advanced

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

avoid warning in AC_FUNC_STRERROR_R


From: Bruno Haible
Subject: avoid warning in AC_FUNC_STRERROR_R
Date: Sun, 5 Jun 2011 14:46:59 +0200
User-agent: KMail/1.9.9

Hi,

On OSF/1 with gcc and CPPFLAGS="-Wall", I'm seeing this warning in config.log:

  configure:22364: checking whether strerror_r returns char *
  configure:22416: gcc -std=gnu99 -o conftest -g -O2 -Wall  conftest.c  >&5
  conftest.c: In function 'main':
  conftest.c:174: warning: implicit declaration of function 'isalpha'
  configure:22416: $? = 0

Here's a proposed fix. All systems I know of have <ctype.h>.


2011-06-05  Bruno Haible  <address@hidden>

        AC_FUNC_STRERROR_R: Avoid gcc warning.
        * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Include <ctype.h>
        before using isalpha().

--- lib/autoconf/functions.m4.orig      Sun Jun  5 14:44:00 2011
+++ lib/autoconf/functions.m4   Sun Jun  5 14:43:20 2011
@@ -1649,6 +1649,7 @@
       # has a strerror_r that returns `int'.
       # This test should segfault on the DEC system.
       AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+       #include <ctype.h>
        extern char *strerror_r ();],
        [[char buf[100];
          char x = *strerror_r (0, buf, sizeof buf);

-- 
In memoriam Eduard Lederer <http://de.wikipedia.org/wiki/Eduard_Lederer>



reply via email to

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