(__restrict): Define to `restrict' or to nothing.
authorJim Meyering <jim@meyering.net>
Thu, 6 Feb 2003 10:13:28 +0000 (10:13 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 6 Feb 2003 10:13:28 +0000 (10:13 +0000)
lib/search_.h

index 6263622..78e3980 100644 (file)
@@ -22,6 +22,18 @@ typedef enum
 }
 VISIT;
 
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+   "restrict", and "configure" may have defined "restrict".  */
+#ifndef __restrict
+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
+#  if defined restrict || 199901L <= __STDC_VERSION__
+#   define __restrict restrict
+#  else
+#   define __restrict
+#  endif
+# endif
+#endif
+
 /* Search for an entry matching the given KEY in the tree pointed to
    by *ROOTP and insert a new element if not found.  */
 extern void *tsearch (const void *__key, void **__rootp,