aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2002-04-17 01:03:04 +0000
committerDJ Delorie <dj@redhat.com>2002-04-17 01:03:04 +0000
commit7eb54398405018ce7bef789bafa2b3ae0c6a5cdf (patch)
treeb3145a22c9166991fc8585862fa663a1284843d4 /include
parentdad32754b99f5950c815fa86ad8c149c7a0ca2d0 (diff)
downloadnewlib-7eb54398405018ce7bef789bafa2b3ae0c6a5cdf.zip
newlib-7eb54398405018ce7bef789bafa2b3ae0c6a5cdf.tar.gz
newlib-7eb54398405018ce7bef789bafa2b3ae0c6a5cdf.tar.bz2
merge from gcc
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/xregex2.h14
2 files changed, 15 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 1351058..dd0a230 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-16 David S. Miller <davem@redhat.com>
+
+ * xregex2.h (__restrict_arr): Define to __restrict on GCC
+ 3.1 and later. Do not redefine.
+
2002-04-01 Phil Edwards <pme@gcc.gnu.org>
* dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names.
diff --git a/include/xregex2.h b/include/xregex2.h
index b9c2d97..2991daf 100644
--- a/include/xregex2.h
+++ b/include/xregex2.h
@@ -529,10 +529,16 @@ extern int re_exec _RE_ARGS ((const char *));
# 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 later support declaring arrays as non-overlapping
+ using the syntax array_name[restrict] */
+#ifndef __restrict_arr
+# if ! (3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) || defined (__GNUG__)
+# define __restrict_arr
+# else
+# define __restrict_arr __restrict
+# endif
+#endif
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,