diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-12-29 17:32:25 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-01-04 08:38:52 -0300 |
commit | c2a150d089fa096cb5f9e342da80fb30dc0d1953 (patch) | |
tree | 9fc88708b64fb0d2d4a2d5647e865922223cb898 /posix/regex_internal.h | |
parent | fee3b889d88193eb3cebaab2bcf60e39ce84d369 (diff) | |
download | glibc-c2a150d089fa096cb5f9e342da80fb30dc0d1953.tar.gz glibc-c2a150d089fa096cb5f9e342da80fb30dc0d1953.tar.xz glibc-c2a150d089fa096cb5f9e342da80fb30dc0d1953.zip |
posix: Sync regex code with gnulib
It sync with gnulib commit 43ee1a6bf. The main change is 9682f18e9. (which does not have a meaniful description). Checked on x86_64-linux-gnu.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r-- | posix/regex_internal.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h index 268ef05c38..e31ac92674 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -77,6 +77,14 @@ # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif +/* regex code assumes isascii has its usual numeric meaning, + even if the portable character set uses EBCDIC encoding, + and even if wint_t is wider than int. */ +#ifndef _LIBC +# undef isascii +# define isascii(c) (((c) & ~0x7f) == 0) +#endif + #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 @@ -335,7 +343,7 @@ typedef struct Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; -#if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +#if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; @@ -841,10 +849,10 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) #endif /* RE_ENABLE_I18N */ #ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else +# if (__GNUC__ >= 7) || (__clang_major__ >= 10) # define FALLTHROUGH __attribute__ ((__fallthrough__)) +# else +# define FALLTHROUGH ((void) 0) # endif #endif |