patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-posix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes errors
     2 
     3 regcomp.c: In function 'parse_bracket_exp':
     4 regcomp.c:2724: error: invalid storage class for function 'seek_collating_symbol_entry'
     5 regcomp.c:2757: error: invalid storage class for function 'lookup_collation_sequence_value'
     6 regcomp.c:2826: error: invalid storage class for function 'build_range_exp'
     7 regcomp.c:2913: error: invalid storage class for function 'build_collating_symbol'
     8 ...
     9 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
    10 
    11 See also http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html
    12 That fix requires gcc-4.0, but the fix proposed here works with older compilers, too
    13 
    14 --- glibc-2.3.3/posix/regcomp.c.old	2005-03-16 11:40:55.000000000 -0800
    15 +++ glibc-2.3.3/posix/regcomp.c	2005-03-16 11:50:31.000000000 -0800
    16 @@ -2718,8 +2718,14 @@
    17       Seek the collating symbol entry correspondings to NAME.
    18       Return the index of the symbol in the SYMB_TABLE.  */
    19  
    20 +#if __GNUC__ >= 4
    21 +  auto inline int32_t
    22 +#else
    23    static inline int32_t
    24 +#endif
    25 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    26    __attribute ((always_inline))
    27 +#endif
    28    seek_collating_symbol_entry (name, name_len)
    29  	 const unsigned char *name;
    30  	 size_t name_len;
    31 @@ -2751,8 +2757,14 @@
    32       Look up the collation sequence value of BR_ELEM.
    33       Return the value if succeeded, UINT_MAX otherwise.  */
    34  
    35 +#if __GNUC__ >= 4
    36 +  auto inline unsigned int
    37 +#else
    38    static inline unsigned int
    39 +#endif
    40 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    41    __attribute ((always_inline))
    42 +#endif
    43    lookup_collation_sequence_value (br_elem)
    44  	 bracket_elem_t *br_elem;
    45      {
    46 @@ -2819,8 +2831,14 @@
    47       mbcset->range_ends, is a pointer argument sinse we may
    48       update it.  */
    49  
    50 -  static inline reg_errcode_t
    51 +#if __GNUC__ >= 4
    52 +  auto inline reg_errcode_t
    53 +#else
    54 +  static inline reg_errcode_t
    55 +#endif
    56 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    57    __attribute ((always_inline))
    58 +#endif
    59  # ifdef RE_ENABLE_I18N
    60    build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
    61  	 re_charset_t *mbcset;
    62 @@ -2906,8 +2924,14 @@
    63       COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
    64       pointer argument sinse we may update it.  */
    65  
    66 -  static inline reg_errcode_t
    67 +#if __GNUC__ >= 4
    68 +  auto inline reg_errcode_t
    69 +#else
    70 +  static inline reg_errcode_t
    71 +#endif
    72 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    73    __attribute ((always_inline))
    74 +#endif
    75  # ifdef RE_ENABLE_I18N
    76    build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
    77  	 re_charset_t *mbcset;