From: Gary V. Vaughan Date: Fri, 8 Mar 2013 12:50:10 +0000 (+0700) Subject: regex: rename remaining __attribute calls to __attribute__. X-Git-Tag: v0.1~183 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=951e33a41cce0f553befee73311ac0af188ef239 regex: rename remaining __attribute calls to __attribute__. Commit 930b85b changed definition of __attribute, but left some uses unchanged, preventing compilation of regex module on most non-gcc environments: * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry) (lookup_collation_sequence_value, build_range_exp) (build_collating_symbol): Set attributes with newly renamed __attribute__ decorator. * lib/regex_internal.c (re_string_peek_byte_case) (re_node_set_compare, re_node_set_contains): Likewise. * lib/regexec.c (acquire_init_state_context): Likewise. Signed-off-by: Gary V. Vaughan --- diff --git a/ChangeLog b/ChangeLog index 576e80eb2..59da1f876 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2013-03-08 Gary V. Vaughan + + regex: rename remaining __attribute calls to __attribute__. + 2012-02-25 changed definition of __attribute, but left some uses + unchanged, preventing compilation of regex module on most non-gcc + environments. + * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry) + (lookup_collation_sequence_value, build_range_exp) + (build_collating_symbol): Set attributes with newly renamed + __attribute__ decorator. + * lib/regex_internal.c (re_string_peek_byte_case) + (re_node_set_compare, re_node_set_contains): Likewise. + * lib/regexec.c (acquire_init_state_context): Likewise. + 2013-03-06 Bruno Haible execute: Revert last change, but use a different condition. diff --git a/lib/regcomp.c b/lib/regcomp.c index a0db2661c..4a8485eaa 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -292,7 +292,7 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void -__attribute ((always_inline)) +__attribute__ ((always_inline)) re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; @@ -2839,7 +2839,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, or -1 if not found. */ auto inline int32_t - __attribute ((always_inline)) + __attribute__ ((always_inline)) seek_collating_symbol_entry (const unsigned char *name, size_t name_len) { int32_t elem; @@ -2865,7 +2865,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int - __attribute ((always_inline)) + __attribute__ ((always_inline)) lookup_collation_sequence_value (bracket_elem_t *br_elem) { if (br_elem->type == SB_CHAR) @@ -2933,7 +2933,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, update it. */ auto inline reg_errcode_t - __attribute ((always_inline)) + __attribute__ ((always_inline)) build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) { @@ -3014,7 +3014,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, pointer argument since we may update it. */ auto inline reg_errcode_t - __attribute ((always_inline)) + __attribute__ ((always_inline)) build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, Idx *coll_sym_alloc, const unsigned char *name) { diff --git a/lib/regex_internal.c b/lib/regex_internal.c index e11ad3d56..f679f87ea 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -834,7 +834,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) } static unsigned char -internal_function __attribute ((pure)) +internal_function __attribute__ ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; @@ -1354,7 +1354,7 @@ re_node_set_insert_last (re_node_set *set, Idx elem) Return true if SET1 and SET2 are equivalent. */ static bool -internal_function __attribute ((pure)) +internal_function __attribute__ ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; @@ -1369,7 +1369,7 @@ re_node_set_compare (const re_node_set *set1, const re_node_set *set2) /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx -internal_function __attribute ((pure)) +internal_function __attribute__ ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; diff --git a/lib/regexec.c b/lib/regexec.c index 1bd1640ed..09c3eec98 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -1064,7 +1064,7 @@ prune_impossible_nodes (re_match_context_t *mctx) since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * -__attribute ((always_inline)) internal_function +__attribute__ ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) {