Work around problem reported by Steven M. Schweda in
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jun 2007 18:35:17 +0000 (18:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jun 2007 18:35:17 +0000 (18:35 +0000)
<http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
Tru64 5.1B with the Compaq compiler environment installed declares
an 'isblank' function but does not define it in the C library.
* lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
* lib/regex_internal.h (isblank): Likewise.
* m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
* m4/regex.m4 (gl_PREREQ_REGEX): Likewise.

ChangeLog
lib/fnmatch.c
lib/regex_internal.h
m4/fnmatch.m4
m4/regex.m4

index 5db2619be72236682d2ff6bf78d068fd4be9127a..ce26322c818c256d4b688e1c47c39b88a21cf719 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Work around problem reported by Steven M. Schweda in
+       <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
+       Tru64 5.1B with the Compaq compiler environment installed declares
+       an 'isblank' function but does not define it in the C library.
+       * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
+       * lib/regex_internal.h (isblank): Likewise.
+       * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
+       * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
+
 2007-06-05  Bruno Haible  <bruno@clisp.org>
 
        Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
index 02dd365adb9a8475698ca7022e6472b225bd2840..48bc8b5d2a0b9e6c1bcd730cbdf6997605d93e15 100644 (file)
@@ -85,7 +85,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
 
 
-# if ! (defined isblank || HAVE_DECL_ISBLANK)
+# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
 #  define isblank(c) ((c) == ' ' || (c) == '\t')
 # endif
 
index 9bbc6ac3b9edbbc10a078109da2dd3b67937ddd4..5c07f9366f7230154e64f0ed427790a8ebb2d01e 100644 (file)
@@ -48,7 +48,7 @@
 #endif
 
 /* In case that the system doesn't have isblank().  */
-#if !defined _LIBC && !HAVE_DECL_ISBLANK && !defined isblank
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
 # define isblank(ch) ((ch) == ' ' || (ch) == '\t')
 #endif
 
index 3778742c9ff160069e1a265b14bc3546c242a295..34eb3d91c95ffc02cdcf3575d30fdd949717b7ee 100644 (file)
@@ -83,7 +83,7 @@ AC_DEFUN([_AC_LIBOBJ_FNMATCH],
 [AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
 AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
-AC_CHECK_FUNCS_ONCE([btowc iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
+AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
 AC_CHECK_HEADERS_ONCE([wctype.h])
 AC_LIBOBJ([fnmatch])
 FNMATCH_H=fnmatch.h
index b8d5b1ed11126903430d84e893f260754e8daa40..c064298dc253e05d1a2bc5d20cfadee0ce6e7e1b 100644 (file)
@@ -206,6 +206,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([AC_C_RESTRICT])
-  AC_CHECK_FUNCS_ONCE([iswctype mbrtowc wcrtomb wcscoll])
+  AC_CHECK_FUNCS_ONCE([isblank iswctype mbrtowc wcrtomb wcscoll])
   AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
 ])