diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-12-27 11:45:21 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-12-27 11:45:47 -0800 |
commit | ee7514b91beb254a7dc62f618046d34036555cea (patch) | |
tree | 7299efc4b14731bb30d013bb9594b2e7834b1d8d /lib/regcomp.c | |
parent | a8576aba8fa45549985566bc8be4921dce508dd9 (diff) | |
download | emacs-ee7514b91beb254a7dc62f618046d34036555cea.tar.gz emacs-ee7514b91beb254a7dc62f618046d34036555cea.tar.bz2 emacs-ee7514b91beb254a7dc62f618046d34036555cea.zip |
Update from Gnulib
* build-aux/config.guess, lib/regcomp.c, lib/regex.c:
* lib/regex_internal.h, lib/regexec.c: Copy from Gnulib.
Diffstat (limited to 'lib/regcomp.c')
-rw-r--r-- | lib/regcomp.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/regcomp.c b/lib/regcomp.c index 0b05a63b632..2672ffcc37a 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -233,9 +233,7 @@ re_compile_pattern (const char *pattern, size_t length, return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } -#ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) -#endif /* Set by 're_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own @@ -260,9 +258,7 @@ re_set_syntax (reg_syntax_t syntax) re_syntax_options = syntax; return ret; } -#ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) -#endif int re_compile_fastmap (struct re_pattern_buffer *bufp) @@ -281,9 +277,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) bufp->fastmap_accurate = 1; return 0; } -#ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) -#endif static inline void __attribute__ ((always_inline)) @@ -464,7 +458,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 @@ -515,16 +509,14 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags) return (int) ret; } -#ifdef _LIBC libc_hidden_def (__regcomp) weak_alias (__regcomp, regcomp) -#endif /* Returns a message corresponding to an error code, ERRCODE, returned 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; @@ -555,9 +547,7 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, return msg_size; } -#ifdef _LIBC weak_alias (__regerror, regerror) -#endif #ifdef RE_ENABLE_I18N @@ -657,10 +647,8 @@ regfree (regex_t *preg) re_free (preg->translate); preg->translate = NULL; } -#ifdef _LIBC libc_hidden_def (__regfree) weak_alias (__regfree, regfree) -#endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ |