patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconvdata.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 06 21:47:29 2007 +0000 (2007-05-06)
changeset 62 651912c5477c
permissions -rw-r--r--
Linux kernel headers install does not need the kernel to be configured. Dropping this unneccessary step.
     1 Fixes
     2 
     3 In file included from jis0208.c:23:
     4 jis0208.h:32: error: array type has incomplete element type
     5 when building with gcc-4.0
     6 
     7 In file included from cp1258.c:869:
     8 ../iconv/skeleton.c: In function 'gconv':
     9 ../iconv/skeleton.c:323: error: invalid lvalue in increment
    10 
    11 In file included from cp1255.c:550:
    12 ../iconv/skeleton.c: In function 'gconv':
    13 ../iconv/skeleton.c:323: error: invalid lvalue in increment
    14 
    15 In file included from gb18030.c:22114:
    16 ../iconv/loop.c: In function 'from_gb18030':
    17 ../iconv/loop.c:282: error: invalid lvalue in increment
    18 ../iconv/loop.c: In function 'from_gb18030_single':
    19 ../iconv/loop.c:384: error: invalid lvalue in increment
    20 
    21 --- /home/dank/downloads/glibc-2.2.5/iconvdata/iso8859-1.c	2001-08-03 15:06:50.000000000 -0700
    22 +++ glibc-2.2.5/iconvdata/iso8859-1.c	2005-03-11 15:09:15.233602808 -0800
    23 @@ -35,7 +35,8 @@
    24  #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
    25  #define LOOPFCT			FROM_LOOP
    26  #define BODY \
    27 -  *((uint32_t *) outptr)++ = *inptr++;
    28 +  *((uint32_t *) outptr) = *inptr++;					      \
    29 +  outptr += sizeof (uint32_t);
    30  #include <iconv/loop.c>
    31  
    32  
    33 --- /home/dank/downloads/glibc-2.2.5/iconvdata/jis0208.h	2001-07-05 21:54:52.000000000 -0700
    34 +++ glibc-2.2.5/iconvdata/jis0208.h	2005-03-11 15:27:23.295192304 -0800
    35 @@ -24,15 +24,6 @@
    36  #include <gconv.h>
    37  #include <stdint.h>
    38  
    39 -/* Conversion table.  */
    40 -extern const uint16_t __jis0208_to_ucs[];
    41 -
    42 -extern const char __jisx0208_from_ucs4_lat1[256][2];
    43 -extern const char __jisx0208_from_ucs4_greek[0xc1][2];
    44 -extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
    45 -extern const char __jisx0208_from_ucs_tab[][2];
    46 -
    47 -
    48  /* Struct for table with indeces in UCS mapping table.  */
    49  struct jisx0208_ucs_idx
    50  {
    51 @@ -42,6 +33,15 @@
    52  };
    53  
    54  
    55 +/* Conversion table.  */
    56 +extern const uint16_t __jis0208_to_ucs[];
    57 +
    58 +extern const char __jisx0208_from_ucs4_lat1[256][2];
    59 +extern const char __jisx0208_from_ucs4_greek[0xc1][2];
    60 +extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
    61 +extern const char __jisx0208_from_ucs_tab[][2];
    62 +
    63 +
    64  static inline uint32_t
    65  jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
    66  {
    67 --- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1258.c	2001-07-05 21:54:49.000000000 -0700
    68 +++ glibc-2.2.5/iconvdata/cp1258.c	2005-03-11 15:41:44.953200376 -0800
    69 @@ -66,7 +66,8 @@
    70  	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
    71  	    {								      \
    72  	      /* Write out the last character.  */			      \
    73 -	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
    74 +	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
    75 +	      outbuf += sizeof (uint32_t);				      \
    76  	      data->__statep->__count = 0;				      \
    77  	    }								      \
    78  	  else								      \
    79 --- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1255.c	2001-07-05 21:54:49.000000000 -0700
    80 +++ glibc-2.2.5/iconvdata/cp1255.c	2005-03-11 15:47:40.689120296 -0800
    81 @@ -65,7 +65,8 @@
    82  	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
    83  	    {								      \
    84  	      /* Write out the last character.  */			      \
    85 -	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
    86 +	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
    87 +	      outbuf += sizeof (uint32_t);				      \
    88  	      data->__statep->__count = 0;				      \
    89  	    }								      \
    90  	  else								      \
    91 --- /home/dank/downloads/glibc-2.2.5/iconvdata/gb18030.c	2001-08-03 15:06:47.000000000 -0700
    92 +++ glibc-2.2.5/iconvdata/gb18030.c	2005-03-11 15:54:59.060477720 -0800
    93 @@ -22108,7 +22108,8 @@
    94  	    }							      	      \
    95  	}								      \
    96  									      \
    97 -    *((uint32_t *) outptr)++ = ch;					      \
    98 +    *((uint32_t *) outptr) = ch;					      \
    99 +    outptr += sizeof (uint32_t);					      \
   100    }
   101  #define LOOP_NEED_FLAGS
   102  #include <iconv/loop.c>
   103 --- /home/dank/downloads/glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2001-07-05 21:54:51.000000000 -0700
   104 +++ glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2005-03-11 15:55:42.002949472 -0800
   105 @@ -411,7 +411,8 @@
   106  	  }								      \
   107        }									      \
   108  									      \
   109 -    *((uint32_t *) outptr)++ = ch;					      \
   110 +    *((uint32_t *) outptr) = ch;					      \
   111 +    outptr += sizeof (uint32_t);					      \
   112    }
   113  #define EXTRA_LOOP_DECLS	, int *setp
   114  #define INIT_PARAMS		int set = (*setp >> 3) & CURRENT_MASK; \