From ec5206cfb318f9ac36f2306fb91e4cb2a23f831e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 27 Nov 2006 19:41:42 +0000 Subject: [PATCH] * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity. --- ChangeLog | 5 +++++ lib/regex.h | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d1ef5a912..0cb621661a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-27 Bruno Haible + Paul Eggert + + * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity. + 2006-11-26 Bruno Haible * gnulib-tool (func_emit_lib_Makefile_am): Initialize also diff --git a/lib/regex.h b/lib/regex.h index 621bffb516..6885ebdf26 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -639,13 +639,13 @@ extern int re_exec (const char *); sys/cdefs.h's definition of __restrict_arr, though, as it mishandles gcc -ansi -pedantic. */ #undef __restrict_arr -#if (defined __GNUG__ \ - || (__STDC_VERSION__ < 199901L \ - && (__STRICT_ANSI__ \ - || (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1))))) -# define __restrict_arr -#else +#if ((199901L <= __STDC_VERSION__ \ + || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ + && !__STRICT_ANSI__)) \ + && !defined __GNUG__) # define __restrict_arr __restrict +#else +# define __restrict_arr #endif /* POSIX compatibility. */ -- 2.30.2