yann@1: Fixes errors yann@1: yann@1: regcomp.c: In function 'parse_bracket_exp': yann@1: regcomp.c:2724: error: invalid storage class for function 'seek_collating_symbol_entry' yann@1: regcomp.c:2757: error: invalid storage class for function 'lookup_collation_sequence_value' yann@1: regcomp.c:2826: error: invalid storage class for function 'build_range_exp' yann@1: regcomp.c:2913: error: invalid storage class for function 'build_collating_symbol' yann@1: ... yann@1: make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-dev/build/x86_64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/posix/regex.o] Error 1 yann@1: yann@1: See also http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html yann@1: That fix requires gcc-4.0, but the fix proposed here works with older compilers, too yann@1: yann@1: --- glibc-2.3.3/posix/regcomp.c.old 2005-03-16 11:40:55.000000000 -0800 yann@1: +++ glibc-2.3.3/posix/regcomp.c 2005-03-16 11:50:31.000000000 -0800 yann@1: @@ -2718,8 +2718,14 @@ yann@1: Seek the collating symbol entry correspondings to NAME. yann@1: Return the index of the symbol in the SYMB_TABLE. */ yann@1: yann@1: +#if __GNUC__ >= 4 yann@1: + auto inline int32_t yann@1: +#else yann@1: static inline int32_t yann@1: +#endif yann@1: +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) yann@1: __attribute ((always_inline)) yann@1: +#endif yann@1: seek_collating_symbol_entry (name, name_len) yann@1: const unsigned char *name; yann@1: size_t name_len; yann@1: @@ -2751,8 +2757,14 @@ yann@1: Look up the collation sequence value of BR_ELEM. yann@1: Return the value if succeeded, UINT_MAX otherwise. */ yann@1: yann@1: +#if __GNUC__ >= 4 yann@1: + auto inline unsigned int yann@1: +#else yann@1: static inline unsigned int yann@1: +#endif yann@1: +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) yann@1: __attribute ((always_inline)) yann@1: +#endif yann@1: lookup_collation_sequence_value (br_elem) yann@1: bracket_elem_t *br_elem; yann@1: { yann@1: @@ -2819,8 +2831,14 @@ yann@1: mbcset->range_ends, is a pointer argument sinse we may yann@1: update it. */ yann@1: yann@1: - static inline reg_errcode_t yann@1: +#if __GNUC__ >= 4 yann@1: + auto inline reg_errcode_t yann@1: +#else yann@1: + static inline reg_errcode_t yann@1: +#endif yann@1: +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) yann@1: __attribute ((always_inline)) yann@1: +#endif yann@1: # ifdef RE_ENABLE_I18N yann@1: build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) yann@1: re_charset_t *mbcset; yann@1: @@ -2906,8 +2924,14 @@ yann@1: COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a yann@1: pointer argument sinse we may update it. */ yann@1: yann@1: - static inline reg_errcode_t yann@1: +#if __GNUC__ >= 4 yann@1: + auto inline reg_errcode_t yann@1: +#else yann@1: + static inline reg_errcode_t yann@1: +#endif yann@1: +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) yann@1: __attribute ((always_inline)) yann@1: +#endif yann@1: # ifdef RE_ENABLE_I18N yann@1: build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) yann@1: re_charset_t *mbcset;