diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-04 16:47:11 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-06 09:20:52 -0300 |
commit | 2a0356e1191804d57005e1cfe2a72f019b7a8cce (patch) | |
tree | 564fe7f761a902ba3babe5dc5662f13b0f628c41 /posix/regex_internal.h | |
parent | 4ecd584908109db3ac9bf4aca307ddd44e029275 (diff) | |
download | glibc-2a0356e1191804d57005e1cfe2a72f019b7a8cce.tar.gz glibc-2a0356e1191804d57005e1cfe2a72f019b7a8cce.tar.xz glibc-2a0356e1191804d57005e1cfe2a72f019b7a8cce.zip |
posix: Sync regex with gnulib
It sync with gnulib commit 6cfb4302b3e1da14d706198b693558290e9b00f4 and contains the fixes: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=32915b2a8a43825720755113bdffe9f67a591748 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=48f07576b8cd935b48e1050551f45ab1a79b9f01 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=5e407aba1f775d51b25481cb55f324c9868f62d7 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4e02b30c761c76d04057fa5f6bba71401f9310cd https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=79f8ee4e389f8cb1339f8abed9a7d29816e2a2d4 Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r-- | posix/regex_internal.h | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h index 5462419b78..06957f0fc8 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -20,7 +20,6 @@ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 -#include <assert.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> @@ -34,6 +33,14 @@ #include <stdint.h> #include <intprops.h> +#include <verify.h> + +#if defined DEBUG && DEBUG != 0 +# include <assert.h> +# define DEBUG_ASSERT(x) assert (x) +#else +# define DEBUG_ASSERT(x) assume (x) +#endif #ifdef _LIBC # include <libc-lock.h> @@ -44,22 +51,7 @@ # define lock_unlock(lock) __libc_lock_unlock (lock) #elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO # include "glthread/lock.h" - /* Use gl_lock_define if empty macro arguments are known to work. - Otherwise, fall back on less-portable substitutes. */ -# if ((defined __GNUC__ && !defined __STRICT_ANSI__) \ - || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)) -# define lock_define(name) gl_lock_define (, name) -# elif USE_POSIX_THREADS -# define lock_define(name) pthread_mutex_t name; -# elif USE_PTH_THREADS -# define lock_define(name) pth_mutex_t name; -# elif USE_SOLARIS_THREADS -# define lock_define(name) mutex_t name; -# elif USE_WINDOWS_THREADS -# define lock_define(name) gl_lock_t name; -# else -# define lock_define(name) -# endif +# define lock_define(name) gl_lock_define (, name) # define lock_init(lock) glthread_lock_init (&(lock)) # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) @@ -618,11 +610,7 @@ typedef struct { /* The string object corresponding to the input string. */ re_string_t input; -#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; -#else - const re_dfa_t *dfa; -#endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ |