From: Daniel Richard G Date: Tue, 18 Oct 2011 18:32:42 +0000 (+0200) Subject: Support for old NeXTstep 3.3 gcc. X-Git-Tag: v0.1~1564 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d1a06d87a70c6a1f0588a70c91c182f6873aae41;p=gnulib.git Support for old NeXTstep 3.3 gcc. * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write 'defined __STRICT_ANSI__', not '__STRICT_ANSI__'. * lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise. * lib/spawn.in.h (_Restrict_arr_): Likewise. * lib/regex.h (_Restrict_arr_): Likewise. * lib/regex_internal.h (re_token_t): Likewise. * lib/regexec.c (check_node_accept_bytes): Likewise. * tests/test-printf-posix.c (func1, func2, func3, func4): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 2e4ea432ee..fc5e22e8ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-10-18 Daniel Richard G. (tiny change) + + Support for old NeXTstep 3.3 gcc. + * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write + 'defined __STRICT_ANSI__', not '__STRICT_ANSI__'. + * lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise. + * lib/spawn.in.h (_Restrict_arr_): Likewise. + * lib/regex.h (_Restrict_arr_): Likewise. + * lib/regex_internal.h (re_token_t): Likewise. + * lib/regexec.c (check_node_accept_bytes): Likewise. + * tests/test-printf-posix.c (func1, func2, func3, func4): Likewise. + 2011-10-18 Eric Blake posix_openpt: new module diff --git a/lib/gettext.h b/lib/gettext.h index 65777e638d..1ddd68a702 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) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS diff --git a/lib/math.in.h b/lib/math.in.h index d3b4839634..c92703f2ac 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 && !defined __STRICT_ANSI__ # 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 27b2226138..2a17ff38ce 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__)) \ + && !defined __STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else diff --git a/lib/regex_internal.h b/lib/regex_internal.h index d7413b0835..20cc833668 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 && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; diff --git a/lib/regexec.c b/lib/regexec.c index 5ad438f212..7776f9b47f 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -3985,7 +3985,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, # endif /* _LIBC */ { /* match with range expression? */ -#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) +#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && defined __STRICT_ANSI__) wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; diff --git a/lib/spawn.in.h b/lib/spawn.in.h index 3c31fd0a51..5cc9acf541 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__)) \ + && !defined __STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else diff --git a/tests/test-printf-posix.c b/tests/test-printf-posix.c index 9337854b4d..0bc3def4bb 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)) && !defined __STRICT_ANSI__ extern int func1 (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int func2 (char *, size_t, const char *, ...)