summaryrefslogtreecommitdiff
path: root/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconvdata.patch
blob: 50190318e658d97878e8104c76817ac31bd31df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Fixes

In file included from jis0208.c:23:
jis0208.h:32: error: array type has incomplete element type
when building with gcc-4.0

In file included from cp1258.c:869:
../iconv/skeleton.c: In function 'gconv':
../iconv/skeleton.c:323: error: invalid lvalue in increment

In file included from cp1255.c:550:
../iconv/skeleton.c: In function 'gconv':
../iconv/skeleton.c:323: error: invalid lvalue in increment

In file included from gb18030.c:22114:
../iconv/loop.c: In function 'from_gb18030':
../iconv/loop.c:282: error: invalid lvalue in increment
../iconv/loop.c: In function 'from_gb18030_single':
../iconv/loop.c:384: error: invalid lvalue in increment

--- /home/dank/downloads/glibc-2.2.5/iconvdata/iso8859-1.c	2001-08-03 15:06:50.000000000 -0700
+++ glibc-2.2.5/iconvdata/iso8859-1.c	2005-03-11 15:09:15.233602808 -0800
@@ -35,7 +35,8 @@
 #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 #define LOOPFCT			FROM_LOOP
 #define BODY \
-  *((uint32_t *) outptr)++ = *inptr++;
+  *((uint32_t *) outptr) = *inptr++;					      \
+  outptr += sizeof (uint32_t);
 #include <iconv/loop.c>
 
 
--- /home/dank/downloads/glibc-2.2.5/iconvdata/jis0208.h	2001-07-05 21:54:52.000000000 -0700
+++ glibc-2.2.5/iconvdata/jis0208.h	2005-03-11 15:27:23.295192304 -0800
@@ -24,15 +24,6 @@
 #include <gconv.h>
 #include <stdint.h>
 
-/* Conversion table.  */
-extern const uint16_t __jis0208_to_ucs[];
-
-extern const char __jisx0208_from_ucs4_lat1[256][2];
-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
-extern const char __jisx0208_from_ucs_tab[][2];
-
-
 /* Struct for table with indeces in UCS mapping table.  */
 struct jisx0208_ucs_idx
 {
@@ -42,6 +33,15 @@
 };
 
 
+/* Conversion table.  */
+extern const uint16_t __jis0208_to_ucs[];
+
+extern const char __jisx0208_from_ucs4_lat1[256][2];
+extern const char __jisx0208_from_ucs4_greek[0xc1][2];
+extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
+extern const char __jisx0208_from_ucs_tab[][2];
+
+
 static inline uint32_t
 jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
 {
--- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1258.c	2001-07-05 21:54:49.000000000 -0700
+++ glibc-2.2.5/iconvdata/cp1258.c	2005-03-11 15:41:44.953200376 -0800
@@ -66,7 +66,8 @@
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
 	    {								      \
 	      /* Write out the last character.  */			      \
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
+	      outbuf += sizeof (uint32_t);				      \
 	      data->__statep->__count = 0;				      \
 	    }								      \
 	  else								      \
--- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1255.c	2001-07-05 21:54:49.000000000 -0700
+++ glibc-2.2.5/iconvdata/cp1255.c	2005-03-11 15:47:40.689120296 -0800
@@ -65,7 +65,8 @@
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
 	    {								      \
 	      /* Write out the last character.  */			      \
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
+	      outbuf += sizeof (uint32_t);				      \
 	      data->__statep->__count = 0;				      \
 	    }								      \
 	  else								      \
--- /home/dank/downloads/glibc-2.2.5/iconvdata/gb18030.c	2001-08-03 15:06:47.000000000 -0700
+++ glibc-2.2.5/iconvdata/gb18030.c	2005-03-11 15:54:59.060477720 -0800
@@ -22108,7 +22108,8 @@
 	    }							      	      \
 	}								      \
 									      \
-    *((uint32_t *) outptr)++ = ch;					      \
+    *((uint32_t *) outptr) = ch;					      \
+    outptr += sizeof (uint32_t);					      \
   }
 #define LOOP_NEED_FLAGS
 #include <iconv/loop.c>
--- /home/dank/downloads/glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2001-07-05 21:54:51.000000000 -0700
+++ glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2005-03-11 15:55:42.002949472 -0800
@@ -411,7 +411,8 @@
 	  }								      \
       }									      \
 									      \
-    *((uint32_t *) outptr)++ = ch;					      \
+    *((uint32_t *) outptr) = ch;					      \
+    outptr += sizeof (uint32_t);					      \
   }
 #define EXTRA_LOOP_DECLS	, int *setp
 #define INIT_PARAMS		int set = (*setp >> 3) & CURRENT_MASK; \