From df16e1813f0218ccd3bfce56c26007ce85467bff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 6 Jun 2007 18:35:17 +0000 Subject: [PATCH] Work around problem reported by Steven M. Schweda in : 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 | 11 +++++++++++ lib/fnmatch.c | 2 +- lib/regex_internal.h | 2 +- m4/fnmatch.m4 | 2 +- m4/regex.m4 | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5db2619be..ce26322c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-06-06 Paul Eggert + + Work around problem reported by Steven M. Schweda in + : + 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 Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64, diff --git a/lib/fnmatch.c b/lib/fnmatch.c index 02dd365ad..48bc8b5d2 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -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 diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 9bbc6ac3b..5c07f9366 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -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 diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 3778742c9..34eb3d91c 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -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 ]) -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 diff --git a/m4/regex.m4 b/m4/regex.m4 index b8d5b1ed1..c064298dc 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -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 ]) ]) -- 2.11.0