bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] regex: port to Sun C


From: Paul Eggert
Subject: [PATCH] regex: port to Sun C
Date: Wed, 8 Jun 2016 01:47:26 -0700

Reported by Daiki Ueno.
* lib/regcomp.c (regcomp, regerror): Use _Restrict_, not
__restrict, in prototype.  This fixes a problem I introduced in
the 2016-02-19 merge from glibc.
---
 ChangeLog     | 8 ++++++++
 lib/regcomp.c | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6df98a..4e935da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-06-08  Paul Eggert  <address@hidden>
+
+       regex: port to Sun C
+       Reported by Daiki Ueno.
+       * lib/regcomp.c (regcomp, regerror): Use _Restrict_, not
+       __restrict, in prototype.  This fixes a problem I introduced in
+       the 2016-02-19 merge from glibc.
+
 2016-05-31  Paul Eggert  <address@hidden>
 
        stdbool: Restore __bool_true_false_are_defined check
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 7426729..6c4db27 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -464,7 +464,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t 
*init_state,
    the return codes and their meanings.)  */
 
 int
-regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)
+regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
 {
   reg_errcode_t ret;
   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -523,7 +523,7 @@ weak_alias (__regcomp, regcomp)
    from either regcomp or regexec.   We don't use PREG here.  */
 
 size_t
-regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
+regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
          size_t errbuf_size)
 {
   const char *msg;
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]