summaryrefslogtreecommitdiff
blob: fe828bb9a49d9248f564ad68209ce12a1c1f1a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -uNr glibc-2.2.5.orig/posix/regex.h glibc-2.2.5/posix/regex.h
--- glibc-2.2.5.orig/posix/regex.h	2001-07-06 14:55:38.000000000 +1000
+++ glibc-2.2.5/posix/regex.h	2002-08-09 20:06:19.000000000 +1000
@@ -529,10 +529,14 @@
 #  endif
 # endif
 #endif
-/* For now unconditionally define __restrict_arr to expand to nothing.
-   Ideally we would have a test for the compiler which allows defining
-   it to restrict.  */
-#define __restrict_arr
+/* gcc 3.1 and up support the [restrict] syntax.  */
+#ifndef __restrict_arr
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#  define __restrict_arr __restrict
+# else
+#  define __restrict_arr
+# endif
+#endif
 
 /* POSIX compatibility.  */
 extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,