patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata.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... :-(
yann@1
     1
Fixes
yann@1
     2
yann@1
     3
In file included from jis0208.c:23:
yann@1
     4
jis0208.h:32: error: array type has incomplete element type
yann@1
     5
when building with gcc-4.0
yann@1
     6
yann@1
     7
In file included from cp1258.c:869:
yann@1
     8
../iconv/skeleton.c: In function 'gconv':
yann@1
     9
../iconv/skeleton.c:323: error: invalid lvalue in increment
yann@1
    10
yann@1
    11
In file included from cp1255.c:550:
yann@1
    12
../iconv/skeleton.c: In function 'gconv':
yann@1
    13
../iconv/skeleton.c:323: error: invalid lvalue in increment
yann@1
    14
yann@1
    15
In file included from gb18030.c:22114:
yann@1
    16
../iconv/loop.c: In function 'from_gb18030':
yann@1
    17
../iconv/loop.c:282: error: invalid lvalue in increment
yann@1
    18
../iconv/loop.c: In function 'from_gb18030_single':
yann@1
    19
../iconv/loop.c:384: error: invalid lvalue in increment
yann@1
    20
yann@1
    21
In file included from iso8859-1.c:43:
yann@1
    22
../iconv/loop.c: In function 'from_iso8859_1':
yann@1
    23
../iconv/loop.c:311: error: invalid lvalue in increment
yann@1
    24
yann@1
    25
Rediffed, updated for glibc-2.3.3, added:
yann@1
    26
yann@1
    27
In file included from armscii-8.c:85:
yann@1
    28
../iconv/loop.c: In function 'from_armscii_8':
yann@1
    29
../iconv/loop.c:311: error: invalid lvalue in increment
yann@1
    30
../iconv/loop.c:311: error: invalid lvalue in increment
yann@1
    31
yann@1
    32
--- glibc-2.3.3.orig/iconvdata/armscii-8.c	Mon Dec  2 14:07:52 2002
yann@1
    33
+++ glibc-2.3.3/iconvdata/armscii-8.c	Thu Mar 17 16:01:23 2005
yann@1
    34
@@ -57,11 +57,17 @@
yann@1
    35
     uint_fast8_t ch = *inptr;						      \
yann@1
    36
 									      \
yann@1
    37
     if (ch <= 0xa0)							      \
yann@1
    38
-      /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */    \
yann@1
    39
-      *((uint32_t *) outptr)++ = ch;					      \
yann@1
    40
+      {									      \
yann@1
    41
+        /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */  \
yann@1
    42
+        *((uint32_t *) outptr) = ch;					      \
yann@1
    43
+        outptr += sizeof (uint32_t);					      \
yann@1
    44
+      }									      \
yann@1
    45
     else if (ch >= 0xa2 && ch <= 0xfe)					      \
yann@1
    46
-      /* Use the table.  */						      \
yann@1
    47
-      *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2];		      \
yann@1
    48
+      {									      \
yann@1
    49
+        /* Use the table.  */						      \
yann@1
    50
+        *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2];		      \
yann@1
    51
+        outptr += sizeof (uint32_t);					      \
yann@1
    52
+      }									      \
yann@1
    53
     else								      \
yann@1
    54
       {									      \
yann@1
    55
 	/* This is an illegal character.  */				      \
yann@1
    56
diff -ur glibc-2.3.3.orig/iconvdata/cp1255.c glibc-2.3.3/iconvdata/cp1255.c
yann@1
    57
--- glibc-2.3.3.orig/iconvdata/cp1255.c	Mon Dec  2 14:07:52 2002
yann@1
    58
+++ glibc-2.3.3/iconvdata/cp1255.c	Thu Mar 17 08:20:13 2005
yann@1
    59
@@ -69,7 +69,8 @@
yann@1
    60
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
yann@1
    61
 	    {								      \
yann@1
    62
 	      /* Write out the last character.  */			      \
yann@1
    63
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
yann@1
    64
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
yann@1
    65
+	      outbuf += sizeof (uint32_t);				      \
yann@1
    66
 	      data->__statep->__count = 0;				      \
yann@1
    67
 	    }								      \
yann@1
    68
 	  else								      \
yann@1
    69
diff -ur glibc-2.3.3.orig/iconvdata/cp1258.c glibc-2.3.3/iconvdata/cp1258.c
yann@1
    70
--- glibc-2.3.3.orig/iconvdata/cp1258.c	Mon Dec  2 14:07:52 2002
yann@1
    71
+++ glibc-2.3.3/iconvdata/cp1258.c	Thu Mar 17 08:20:13 2005
yann@1
    72
@@ -70,7 +70,8 @@
yann@1
    73
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
yann@1
    74
 	    {								      \
yann@1
    75
 	      /* Write out the last character.  */			      \
yann@1
    76
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
yann@1
    77
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
yann@1
    78
+	      outbuf += sizeof (uint32_t);				      \
yann@1
    79
 	      data->__statep->__count = 0;				      \
yann@1
    80
 	    }								      \
yann@1
    81
 	  else								      \
yann@1
    82
diff -ur glibc-2.3.3.orig/iconvdata/gb18030.c glibc-2.3.3/iconvdata/gb18030.c
yann@1
    83
--- glibc-2.3.3.orig/iconvdata/gb18030.c	Mon Dec  2 14:07:54 2002
yann@1
    84
+++ glibc-2.3.3/iconvdata/gb18030.c	Thu Mar 17 08:20:13 2005
yann@1
    85
@@ -25769,7 +25769,8 @@
yann@1
    86
 	    }							      	      \
yann@1
    87
 	}								      \
yann@1
    88
 									      \
yann@1
    89
-    *((uint32_t *) outptr)++ = ch;					      \
yann@1
    90
+    *((uint32_t *) outptr) = ch;					      \
yann@1
    91
+    outptr += sizeof (uint32_t);					      \
yann@1
    92
   }
yann@1
    93
 #define LOOP_NEED_FLAGS
yann@1
    94
 #define ONEBYTE_BODY \
yann@1
    95
diff -ur glibc-2.3.3.orig/iconvdata/iso8859-1.c glibc-2.3.3/iconvdata/iso8859-1.c
yann@1
    96
--- glibc-2.3.3.orig/iconvdata/iso8859-1.c	Mon Dec  2 14:07:56 2002
yann@1
    97
+++ glibc-2.3.3/iconvdata/iso8859-1.c	Thu Mar 17 08:20:47 2005
yann@1
    98
@@ -35,7 +35,8 @@
yann@1
    99
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
yann@1
   100
 #define LOOPFCT			FROM_LOOP
yann@1
   101
 #define BODY \
yann@1
   102
-  *((uint32_t *) outptr)++ = *inptr++;
yann@1
   103
+  *((uint32_t *) outptr) = *inptr++;					      \
yann@1
   104
+  outptr += sizeof (uint32_t);
yann@1
   105
 #define ONEBYTE_BODY \
yann@1
   106
   {									      \
yann@1
   107
     return c;								      \
yann@1
   108
diff -ur glibc-2.3.3.orig/iconvdata/jis0208.h glibc-2.3.3/iconvdata/jis0208.h
yann@1
   109
--- glibc-2.3.3.orig/iconvdata/jis0208.h	Wed Jun 11 14:40:42 2003
yann@1
   110
+++ glibc-2.3.3/iconvdata/jis0208.h	Thu Mar 17 08:20:13 2005
yann@1
   111
@@ -24,15 +24,6 @@
yann@1
   112
 #include <gconv.h>
yann@1
   113
 #include <stdint.h>
yann@1
   114
 
yann@1
   115
-/* Conversion table.  */
yann@1
   116
-extern const uint16_t __jis0208_to_ucs[];
yann@1
   117
-
yann@1
   118
-extern const char __jisx0208_from_ucs4_lat1[256][2];
yann@1
   119
-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
yann@1
   120
-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
yann@1
   121
-extern const char __jisx0208_from_ucs_tab[][2];
yann@1
   122
-
yann@1
   123
-
yann@1
   124
 /* Struct for table with indeces in UCS mapping table.  */
yann@1
   125
 struct jisx0208_ucs_idx
yann@1
   126
 {
yann@1
   127
@@ -40,6 +31,15 @@
yann@1
   128
   uint16_t end;
yann@1
   129
   uint16_t idx;
yann@1
   130
 };
yann@1
   131
+
yann@1
   132
+
yann@1
   133
+/* Conversion table.  */
yann@1
   134
+extern const uint16_t __jis0208_to_ucs[];
yann@1
   135
+
yann@1
   136
+extern const char __jisx0208_from_ucs4_lat1[256][2];
yann@1
   137
+extern const char __jisx0208_from_ucs4_greek[0xc1][2];
yann@1
   138
+extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
yann@1
   139
+extern const char __jisx0208_from_ucs_tab[][2];
yann@1
   140
 
yann@1
   141
 
yann@1
   142
 static inline uint32_t