Avoid circular definition restrict -> __restrict -> restrict on BeOS.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Mar 2007 17:53:39 +0000 (17:53 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 25 Mar 2007 17:53:39 +0000 (17:53 +0000)
ChangeLog
lib/argp.h

index 6b40c70..1d44aeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-03-25  Bruno Haible  <bruno@clisp.org>
 
+       * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
+       if the compiler does not support C99.
+
+2007-03-25  Bruno Haible  <bruno@clisp.org>
+
        * modules/time (Makefile.am): Ensure all rule action lines start with a
        tab.
 
index 13b0cdd..1c4e06f 100644 (file)
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt.
-   Copyright (C) 1995-1999,2003-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999,2003-2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
 #endif
 
 /* GCC 2.95 and later have "__restrict"; C99 compilers have
-   "restrict", and "configure" may have defined "restrict".  */
+   "restrict", and "configure" may have defined "restrict".
+   Other compilers use __restrict, __restrict__, and _Restrict, and
+   'configure' might #define 'restrict' to those words.  */
 #ifndef __restrict
 # if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
-#  if defined restrict || 199901L <= __STDC_VERSION__
+#  if 199901L <= __STDC_VERSION__
 #   define __restrict restrict
 #  else
 #   define __restrict