Mercurial > hg > octave-nkf > gnulib-hg
changeset 17356:cd38818bce4e
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 <gary@gnu.org>
author | Gary V. Vaughan <gary@gnu.org> |
---|---|
date | Fri, 08 Mar 2013 19:50:10 +0700 |
parents | 41cddf8f3b4d |
children | f5aaa2379bd4 |
files | ChangeLog lib/regcomp.c lib/regex_internal.c lib/regexec.c |
diffstat | 4 files changed, 23 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2013-03-08 Gary V. Vaughan <gary@gnu.org> + + 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 <bruno@clisp.org> execute: Revert last change, but use a different condition.
--- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -292,7 +292,7 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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) {
--- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -834,7 +834,7 @@ } 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 @@ 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 @@ /* 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;
--- a/lib/regexec.c +++ b/lib/regexec.c @@ -1064,7 +1064,7 @@ 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) {