about summary refs log tree commit diff
path: root/posix/regexec.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-26 14:13:43 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-27 11:17:06 -0800
commitc0feb731d5bd063f351487c28eadaf37b33d07a5 (patch)
tree7e8a78f51ab1f1b0cb257f518bd93af30c9ccc58 /posix/regexec.c
parent5289f1f56b7174da6b036d24a7626d9cd658fb01 (diff)
downloadglibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.tar.gz
glibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.tar.xz
glibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.zip
regex: simplify Gnulib port
This simplifies the code, by removing stuff intended for porting
to Gnulib but no longer needed there.
* posix/regcomp.c [!_LIBC]: No need to put #ifdef _LIBC around
uses of libc_hidden_def, weak_alias.
* posix/regcomp.c, posix/regexec.c: Use __restrict rather than
_Restrict_ except for public-facing headers.
* posix/regex_internal.h (attribute_hidden) [!_LIBC]:
Remove; already defined elsewhere.
* posix/regex.c, posix/regex_internal.h:
Use __GNUC_PREREQ instead of rolling our own.
* posix/regex_internal.h (__GNUC_PREREQ): Remove duplicate defn.
Diffstat (limited to 'posix/regexec.c')
-rw-r--r--posix/regexec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/posix/regexec.c b/posix/regexec.c
index ecb430d302..d89c949f6c 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -189,7 +189,7 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len);
    We return 0 if we find a match and REG_NOMATCH if not.  */
 
 int
-regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+regexec (const regex_t *__restrict preg, const char *__restrict string,
 	 size_t nmatch, regmatch_t pmatch[], int eflags)
 {
   reg_errcode_t err;
@@ -232,8 +232,8 @@ __typeof__ (__regexec) __compat_regexec;
 
 int
 attribute_compat_text_section
-__compat_regexec (const regex_t *_Restrict_ preg,
-		  const char *_Restrict_ string, size_t nmatch,
+__compat_regexec (const regex_t *__restrict preg,
+		  const char *__restrict string, size_t nmatch,
 		  regmatch_t pmatch[], int eflags)
 {
   return regexec (preg, string, nmatch, pmatch,