diff --git a/lib/gettext.h b/lib/gettext.h index 65777e6..77db267 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -185,7 +185,7 @@ npgettext_aux (const char *domain, #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !(__STRICT_ANSI__ + 0)) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS diff --git a/lib/math.in.h b/lib/math.in.h index d3b4839..cc64925 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -1188,7 +1188,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !__STRICT_ANSI__ +# if __GNUC__ >= 2 && !(__STRICT_ANSI__ + 0) # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf diff --git a/lib/regex.h b/lib/regex.h index 27b2226..89a735d 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -644,7 +644,7 @@ extern int re_exec (const char *); #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !__STRICT_ANSI__)) \ + && !(__STRICT_ANSI__ + 0))) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else diff --git a/lib/regex_internal.h b/lib/regex_internal.h index d7413b0..7849e2c 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -334,7 +334,7 @@ typedef struct Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; -#if __GNUC__ >= 2 && !__STRICT_ANSI__ +#if __GNUC__ >= 2 && !(__STRICT_ANSI__ + 0) re_token_type_t type : 8; #else re_token_type_t type; diff --git a/lib/spawn.in.h b/lib/spawn.in.h index 3c31fd0..8334672 100644 --- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -63,7 +63,7 @@ #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !__STRICT_ANSI__)) \ + && !(__STRICT_ANSI__ + 0))) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index b7276a3..0451330 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -81,7 +81,10 @@ changequote(,) gl_dirsep_regex='/' ;; esac - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'$1|{ + dnl Older seds don't support '\#blah#{...}' + gl_absolute_header_sed='s,\([/.]\),\\\1,g' + gl_absolute_header_match=`printf '%s\n' "${gl_dirsep_regex}"'$1' | sed "$gl_absolute_header_sed"` + gl_absolute_header_sed="/${gl_absolute_header_match}/"'{ s|.*"\(.*'"${gl_dirsep_regex}"'$1\)".*|\1| s|^/[^/]|//&| p diff --git a/m4/include_next.m4 b/m4/include_next.m4 index d5230ce..a351b57 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -223,7 +223,11 @@ changequote(,) ;; esac changequote([,]) - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{ + dnl Older seds don't support '\#blah#{...}' + gl_absolute_header_sed='s,\([/.]\),\\\1,g' + gl_absolute_header_match=`printf '%s\n' "${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[' | + sed "$gl_absolute_header_sed"` + gl_absolute_header_sed="/${gl_absolute_header_match}/"'{ s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1| changequote(,)dnl s|^/[^/]|//&| diff --git a/m4/perror.m4 b/m4/perror.m4 index 86e2020..5662f44 100644 --- a/m4/perror.m4 +++ b/m4/perror.m4 @@ -27,6 +27,8 @@ AC_DEFUN([gl_FUNC_PERROR], [AC_LANG_PROGRAM( [[#include #include + #include + #include ]], [[char *str = strerror (-1); if (!getenv("CONFTEST_OUTPUT")) return 0; diff --git a/modules/popen b/modules/popen index 426589a..eb41029 100644 --- a/modules/popen +++ b/modules/popen @@ -7,11 +7,11 @@ m4/popen.m4 Depends-on: stdio -open [test $HAVE_POPEN = 0 || $REPLACE_POPEN = 1] +open [test $HAVE_POPEN = 0 || test $REPLACE_POPEN = 1] configure.ac: gl_FUNC_POPEN -if test $HAVE_POPEN = 0 || $REPLACE_POPEN = 1; then +if test $HAVE_POPEN = 0 || test $REPLACE_POPEN = 1; then AC_LIBOBJ([popen]) gl_PREREQ_POPEN fi diff --git a/tests/test-printf-posix.c b/tests/test-printf-posix.c index 9337854..d57f43a 100644 --- a/tests/test-printf-posix.c +++ b/tests/test-printf-posix.c @@ -39,7 +39,7 @@ main (int argc, char *argv[]) } /* Test whether __attribute__ (__format__ (...)) still works. */ -#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !__STRICT_ANSI__ +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(__STRICT_ANSI__ + 0) extern int func1 (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int func2 (char *, size_t, const char *, ...)