summaryrefslogtreecommitdiff
path: root/lib/regex.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-08-19 21:14:12 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-08-19 21:14:12 +0000
commitff2fecfbe998d6586d5a4846ee39be0c4c8f1569 (patch)
treea40c90192d09bf06be1fc7a4f0aa67f3877f1ae6 /lib/regex.h
parent2e4d4691b06cded82f40cf2af7baad4aae5f7fe0 (diff)
downloadcoreutils-ff2fecfbe998d6586d5a4846ee39be0c4c8f1569.tar.xz
Import from gnulib.
(__restrict_arr): Don't define to __restrict if __cplusplus is defined.
Diffstat (limited to 'lib/regex.h')
-rw-r--r--lib/regex.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/regex.h b/lib/regex.h
index 0a59c7be1..bdce605a3 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -552,9 +552,9 @@ extern int re_exec _RE_ARGS ((const char *));
# endif
# endif
#endif
-/* gcc 3.1 and up support the [restrict] syntax. */
+/* gcc 3.1 and up support the [restrict] syntax, but g++ doesn't. */
#ifndef __restrict_arr
-# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && !defined __cplusplus
# define __restrict_arr __restrict
# else
# define __restrict_arr