Add strace debugging aid.
2 gconv_open.c: In function `__gconv_open':
3 gconv_open.c:186: error: invalid lvalue in assignment
4 when building glibc-2.3.2 with gcc-3.5.
6 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
7 * (internal_ucs4_loop): Fix typo in last change.
9 * (internal_ucs4le_loop): Remove cast used as lvalue.
13 * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
14 (internal_ucs4le_loop_single): Likewise.
15 (ucs4_internal_loop): Likewise.
17 (internal_ucs4_loop_single): Likewise.
19 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
20 * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
21 (internal_ucs4le_loop_single): Likewise.
22 (ucs4_internal_loop): Likewise.
24 (internal_ucs4_loop_single): Likewise.
27 ===================================================================
28 RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
29 retrieving revision 1.32
30 retrieving revision 1.33
32 --- libc/iconv/gconv_open.c 2001/11/29 04:51:58 1.32
33 +++ libc/iconv/gconv_open.c 2004/02/07 15:56:32 1.33
35 /* Find matching transformation algorithms and initialize steps.
36 - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
37 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
38 This file is part of the GNU C Library.
39 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
42 || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
45 - /* This means we haven't found the module. Remove it. */
46 - (lastp == NULL ? trans : lastp->next) = runp->next;
48 + /* This means we haven't found the module. Remove it. */
52 + lastp->next = runp->next;
56 /* Allocate room for handle. */
57 ===================================================================
58 RCS file: /cvs/glibc/libc/iconv/gconv_simple.c,v
59 retrieving revision 1.59
60 retrieving revision 1.63
62 --- libc/iconv/gconv_simple.c 2003/06/11 21:36:37 1.59
63 +++ libc/iconv/gconv_simple.c 2004/03/09 10:00:31 1.63
65 /* Simple transformations functions.
66 - Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
67 + Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
68 This file is part of the GNU C Library.
69 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
72 #if __BYTE_ORDER == __LITTLE_ENDIAN
73 /* Sigh, we have to do some real work. */
75 + uint32_t *outptr32 = (uint32_t *) outptr;
77 for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
78 - *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
79 + *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
83 + *outptrp = (unsigned char *) outptr32;
84 #elif __BYTE_ORDER == __BIG_ENDIAN
85 /* Simply copy the data. */
86 *inptrp = inptr + n_convert * 4;
88 (*outptrp)[2] = state->__value.__wchb[1];
89 (*outptrp)[3] = state->__value.__wchb[0];
92 #elif __BYTE_ORDER == __BIG_ENDIAN
94 - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
95 + (*outptrp)[0] = state->__value.__wchb[0];
96 + (*outptrp)[1] = state->__value.__wchb[1];
97 + (*outptrp)[2] = state->__value.__wchb[2];
98 + (*outptrp)[3] = state->__value.__wchb[3];
100 # error "This endianess is not supported."
104 /* Clear the state buffer. */
105 state->__count &= ~7;
107 return __GCONV_ILLEGAL_INPUT;
110 - *((uint32_t *) outptr)++ = inval;
111 + *((uint32_t *) outptr) = inval;
112 + outptr += sizeof (uint32_t);
117 #if __BYTE_ORDER == __BIG_ENDIAN
118 /* Sigh, we have to do some real work. */
120 + uint32_t *outptr32 = (uint32_t *) outptr;
122 for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
123 - *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
124 + *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
125 + outptr = (unsigned char *) outptr32;
129 @@ -555,12 +562,17 @@
130 (*outptrp)[2] = state->__value.__wchb[1];
131 (*outptrp)[3] = state->__value.__wchb[0];
136 - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
137 + (*outptrp)[0] = state->__value.__wchb[0];
138 + (*outptrp)[1] = state->__value.__wchb[1];
139 + (*outptrp)[2] = state->__value.__wchb[2];
140 + (*outptrp)[3] = state->__value.__wchb[3];
146 /* Clear the state buffer. */
147 state->__count &= ~7;
150 return __GCONV_ILLEGAL_INPUT;
153 - *((uint32_t *) outptr)++ = inval;
154 + *((uint32_t *) outptr) = inval;
155 + outptr += sizeof (uint32_t);
162 /* It's an one byte sequence. */ \
163 - *((uint32_t *) outptr)++ = *inptr++; \
164 + *((uint32_t *) outptr) = *inptr++; \
165 + outptr += sizeof (uint32_t); \
167 #define LOOP_NEED_FLAGS
168 #include <iconv/loop.c>
172 /* It's an one byte sequence. */ \
173 - *outptr++ = *((const uint32_t *) inptr)++; \
174 + *outptr++ = *((const uint32_t *) inptr); \
175 + inptr += sizeof (uint32_t); \
177 #define LOOP_NEED_FLAGS
178 #include <iconv/loop.c>
179 @@ -1032,7 +1047,8 @@
182 /* Now adjust the pointers and store the result. */ \
183 - *((uint32_t *) outptr)++ = ch; \
184 + *((uint32_t *) outptr) = ch; \
185 + outptr += sizeof (uint32_t); \
187 #define LOOP_NEED_FLAGS
189 @@ -1153,7 +1169,8 @@
190 STANDARD_FROM_LOOP_ERR_HANDLER (2); \
193 - *((uint32_t *) outptr)++ = u1; \
194 + *((uint32_t *) outptr) = u1; \
195 + outptr += sizeof (uint32_t); \
198 #define LOOP_NEED_FLAGS
199 @@ -1201,7 +1218,8 @@
203 - *((uint16_t *) outptr)++ = val; \
204 + *((uint16_t *) outptr) = val; \
205 + outptr += sizeof (uint16_t); \
209 @@ -1242,7 +1260,8 @@
213 - *((uint32_t *) outptr)++ = u1; \
214 + *((uint32_t *) outptr) = u1; \
215 + outptr += sizeof (uint32_t); \
218 #define LOOP_NEED_FLAGS
219 @@ -1291,7 +1310,8 @@
223 - *((uint16_t *) outptr)++ = bswap_16 (val); \
224 + *((uint16_t *) outptr) = bswap_16 (val); \
225 + outptr += sizeof (uint16_t); \