patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,142 +0,0 @@
     1.4 -Fixes
     1.5 -
     1.6 -In file included from jis0208.c:23:
     1.7 -jis0208.h:32: error: array type has incomplete element type
     1.8 -when building with gcc-4.0
     1.9 -
    1.10 -In file included from cp1258.c:869:
    1.11 -../iconv/skeleton.c: In function 'gconv':
    1.12 -../iconv/skeleton.c:323: error: invalid lvalue in increment
    1.13 -
    1.14 -In file included from cp1255.c:550:
    1.15 -../iconv/skeleton.c: In function 'gconv':
    1.16 -../iconv/skeleton.c:323: error: invalid lvalue in increment
    1.17 -
    1.18 -In file included from gb18030.c:22114:
    1.19 -../iconv/loop.c: In function 'from_gb18030':
    1.20 -../iconv/loop.c:282: error: invalid lvalue in increment
    1.21 -../iconv/loop.c: In function 'from_gb18030_single':
    1.22 -../iconv/loop.c:384: error: invalid lvalue in increment
    1.23 -
    1.24 -In file included from iso8859-1.c:43:
    1.25 -../iconv/loop.c: In function 'from_iso8859_1':
    1.26 -../iconv/loop.c:311: error: invalid lvalue in increment
    1.27 -
    1.28 -Rediffed, updated for glibc-2.3.3, added:
    1.29 -
    1.30 -In file included from armscii-8.c:85:
    1.31 -../iconv/loop.c: In function 'from_armscii_8':
    1.32 -../iconv/loop.c:311: error: invalid lvalue in increment
    1.33 -../iconv/loop.c:311: error: invalid lvalue in increment
    1.34 -
    1.35 ---- glibc-2.3.3.orig/iconvdata/armscii-8.c	Mon Dec  2 14:07:52 2002
    1.36 -+++ glibc-2.3.3/iconvdata/armscii-8.c	Thu Mar 17 16:01:23 2005
    1.37 -@@ -57,11 +57,17 @@
    1.38 -     uint_fast8_t ch = *inptr;						      \
    1.39 - 									      \
    1.40 -     if (ch <= 0xa0)							      \
    1.41 --      /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */    \
    1.42 --      *((uint32_t *) outptr)++ = ch;					      \
    1.43 -+      {									      \
    1.44 -+        /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */  \
    1.45 -+        *((uint32_t *) outptr) = ch;					      \
    1.46 -+        outptr += sizeof (uint32_t);					      \
    1.47 -+      }									      \
    1.48 -     else if (ch >= 0xa2 && ch <= 0xfe)					      \
    1.49 --      /* Use the table.  */						      \
    1.50 --      *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2];		      \
    1.51 -+      {									      \
    1.52 -+        /* Use the table.  */						      \
    1.53 -+        *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2];		      \
    1.54 -+        outptr += sizeof (uint32_t);					      \
    1.55 -+      }									      \
    1.56 -     else								      \
    1.57 -       {									      \
    1.58 - 	/* This is an illegal character.  */				      \
    1.59 -diff -ur glibc-2.3.3.orig/iconvdata/cp1255.c glibc-2.3.3/iconvdata/cp1255.c
    1.60 ---- glibc-2.3.3.orig/iconvdata/cp1255.c	Mon Dec  2 14:07:52 2002
    1.61 -+++ glibc-2.3.3/iconvdata/cp1255.c	Thu Mar 17 08:20:13 2005
    1.62 -@@ -69,7 +69,8 @@
    1.63 - 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
    1.64 - 	    {								      \
    1.65 - 	      /* Write out the last character.  */			      \
    1.66 --	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
    1.67 -+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
    1.68 -+	      outbuf += sizeof (uint32_t);				      \
    1.69 - 	      data->__statep->__count = 0;				      \
    1.70 - 	    }								      \
    1.71 - 	  else								      \
    1.72 -diff -ur glibc-2.3.3.orig/iconvdata/cp1258.c glibc-2.3.3/iconvdata/cp1258.c
    1.73 ---- glibc-2.3.3.orig/iconvdata/cp1258.c	Mon Dec  2 14:07:52 2002
    1.74 -+++ glibc-2.3.3/iconvdata/cp1258.c	Thu Mar 17 08:20:13 2005
    1.75 -@@ -70,7 +70,8 @@
    1.76 - 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
    1.77 - 	    {								      \
    1.78 - 	      /* Write out the last character.  */			      \
    1.79 --	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
    1.80 -+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
    1.81 -+	      outbuf += sizeof (uint32_t);				      \
    1.82 - 	      data->__statep->__count = 0;				      \
    1.83 - 	    }								      \
    1.84 - 	  else								      \
    1.85 -diff -ur glibc-2.3.3.orig/iconvdata/gb18030.c glibc-2.3.3/iconvdata/gb18030.c
    1.86 ---- glibc-2.3.3.orig/iconvdata/gb18030.c	Mon Dec  2 14:07:54 2002
    1.87 -+++ glibc-2.3.3/iconvdata/gb18030.c	Thu Mar 17 08:20:13 2005
    1.88 -@@ -25769,7 +25769,8 @@
    1.89 - 	    }							      	      \
    1.90 - 	}								      \
    1.91 - 									      \
    1.92 --    *((uint32_t *) outptr)++ = ch;					      \
    1.93 -+    *((uint32_t *) outptr) = ch;					      \
    1.94 -+    outptr += sizeof (uint32_t);					      \
    1.95 -   }
    1.96 - #define LOOP_NEED_FLAGS
    1.97 - #define ONEBYTE_BODY \
    1.98 -diff -ur glibc-2.3.3.orig/iconvdata/iso8859-1.c glibc-2.3.3/iconvdata/iso8859-1.c
    1.99 ---- glibc-2.3.3.orig/iconvdata/iso8859-1.c	Mon Dec  2 14:07:56 2002
   1.100 -+++ glibc-2.3.3/iconvdata/iso8859-1.c	Thu Mar 17 08:20:47 2005
   1.101 -@@ -35,7 +35,8 @@
   1.102 - #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
   1.103 - #define LOOPFCT			FROM_LOOP
   1.104 - #define BODY \
   1.105 --  *((uint32_t *) outptr)++ = *inptr++;
   1.106 -+  *((uint32_t *) outptr) = *inptr++;					      \
   1.107 -+  outptr += sizeof (uint32_t);
   1.108 - #define ONEBYTE_BODY \
   1.109 -   {									      \
   1.110 -     return c;								      \
   1.111 -diff -ur glibc-2.3.3.orig/iconvdata/jis0208.h glibc-2.3.3/iconvdata/jis0208.h
   1.112 ---- glibc-2.3.3.orig/iconvdata/jis0208.h	Wed Jun 11 14:40:42 2003
   1.113 -+++ glibc-2.3.3/iconvdata/jis0208.h	Thu Mar 17 08:20:13 2005
   1.114 -@@ -24,15 +24,6 @@
   1.115 - #include <gconv.h>
   1.116 - #include <stdint.h>
   1.117 - 
   1.118 --/* Conversion table.  */
   1.119 --extern const uint16_t __jis0208_to_ucs[];
   1.120 --
   1.121 --extern const char __jisx0208_from_ucs4_lat1[256][2];
   1.122 --extern const char __jisx0208_from_ucs4_greek[0xc1][2];
   1.123 --extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
   1.124 --extern const char __jisx0208_from_ucs_tab[][2];
   1.125 --
   1.126 --
   1.127 - /* Struct for table with indeces in UCS mapping table.  */
   1.128 - struct jisx0208_ucs_idx
   1.129 - {
   1.130 -@@ -40,6 +31,15 @@
   1.131 -   uint16_t end;
   1.132 -   uint16_t idx;
   1.133 - };
   1.134 -+
   1.135 -+
   1.136 -+/* Conversion table.  */
   1.137 -+extern const uint16_t __jis0208_to_ucs[];
   1.138 -+
   1.139 -+extern const char __jisx0208_from_ucs4_lat1[256][2];
   1.140 -+extern const char __jisx0208_from_ucs4_greek[0xc1][2];
   1.141 -+extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
   1.142 -+extern const char __jisx0208_from_ucs_tab[][2];
   1.143 - 
   1.144 - 
   1.145 - static inline uint32_t