diff options
Diffstat (limited to 'libc/posix/regex_internal.h')
-rw-r--r-- | libc/posix/regex_internal.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/libc/posix/regex_internal.h b/libc/posix/regex_internal.h index d24cded12..46a1ad2d4 100644 --- a/libc/posix/regex_internal.h +++ b/libc/posix/regex_internal.h @@ -102,7 +102,6 @@ # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) -# define inline #endif /* Number of single byte character. */ @@ -126,10 +125,8 @@ # define attribute_hidden #endif /* not _LIBC */ -#ifdef __GNUC__ -# define __attribute(arg) __attribute__ (arg) -#else -# define __attribute(arg) +#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) +# define __attribute__(arg) #endif extern const char __re_error_msgid[] attribute_hidden; @@ -390,7 +387,7 @@ typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # ifdef __i386__ -# define internal_function __attribute ((regparm (3), stdcall)) +# define internal_function __attribute__ ((regparm (3), stdcall)) # else # define internal_function # endif @@ -409,7 +406,7 @@ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) - internal_function __attribute ((pure)); + internal_function __attribute__ ((pure)); #endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) @@ -706,7 +703,7 @@ typedef struct /* Inline functions for bitset operation. */ -static inline void +static void __attribute__ ((unused)) bitset_not (bitset_t set) { int bitset_i; @@ -714,7 +711,7 @@ bitset_not (bitset_t set) set[bitset_i] = ~set[bitset_i]; } -static inline void +static void __attribute__ ((unused)) bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; @@ -722,7 +719,7 @@ bitset_merge (bitset_t dest, const bitset_t src) dest[bitset_i] |= src[bitset_i]; } -static inline void +static void __attribute__ ((unused)) bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; @@ -732,8 +729,8 @@ bitset_mask (bitset_t dest, const bitset_t src) #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ -static inline int -internal_function __attribute ((pure)) +static int +internal_function __attribute__ ((pure, unused)) re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; @@ -745,8 +742,8 @@ re_string_char_size_at (const re_string_t *pstr, int idx) return byte_idx; } -static inline wint_t -internal_function __attribute ((pure)) +static wint_t +internal_function __attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, int idx) { if (string_mb_cur_max (pstr) == 1) @@ -756,7 +753,7 @@ re_string_wchar_at (const re_string_t *pstr, int idx) # ifndef NOT_IN_libc static int -internal_function __attribute ((pure)) +internal_function __attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, int idx) { # ifdef _LIBC |