Offer an option to build the gdbserver statically. This helps in case of debugging shared library loading.
2 gconv_open.c: In function `__gconv_open':
3 gconv_open.c:186: error: invalid lvalue in assignment
4 when building glibc-2.2.5 with gcc-4.0.
5 Same as ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch
6 but rediffed against glibc-2.2.5.
8 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
9 * (internal_ucs4_loop): Fix typo in last change.
11 * (internal_ucs4le_loop): Remove cast used as lvalue.
15 * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
16 (internal_ucs4le_loop_single): Likewise.
17 (ucs4_internal_loop): Likewise.
19 (internal_ucs4_loop_single): Likewise.
21 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
22 * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
23 (internal_ucs4le_loop_single): Likewise.
24 (ucs4_internal_loop): Likewise.
26 (internal_ucs4_loop_single): Likewise.
29 ===================================================================
30 RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
31 retrieving revision 1.32
32 retrieving revision 1.33
34 --- libc/iconv/gconv_open.c 2001/11/29 04:51:58 1.32
35 +++ libc/iconv/gconv_open.c 2004/02/07 15:56:32 1.33
37 /* Find matching transformation algorithms and initialize steps.
38 - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
39 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
40 This file is part of the GNU C Library.
41 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
44 || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
47 - /* This means we haven't found the module. Remove it. */
48 - (lastp == NULL ? trans : lastp->next) = runp->next;
50 + /* This means we haven't found the module. Remove it. */
54 + lastp->next = runp->next;
58 /* Allocate room for handle. */
59 ===================================================================
60 --- glibc-2.2.5/iconv/gconv_simple.c.old 2001-08-03 15:06:46.000000000 -0700
61 +++ glibc-2.2.5/iconv/gconv_simple.c 2005-03-10 00:49:45.558181608 -0800
63 /* Simple transformations functions.
64 - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
65 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
66 This file is part of the GNU C Library.
67 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
70 #if __BYTE_ORDER == __LITTLE_ENDIAN
71 /* Sigh, we have to do some real work. */
73 + uint32_t *outptr32 = (uint32_t *) outptr;
75 for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
76 - *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
77 + *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
81 + *outptrp = (unsigned char *) outptr32;
82 #elif __BYTE_ORDER == __BIG_ENDIAN
83 /* Simply copy the data. */
84 *inptrp = inptr + n_convert * 4;
86 (*outptrp)[2] = state->__value.__wchb[1];
87 (*outptrp)[3] = state->__value.__wchb[0];
90 #elif __BYTE_ORDER == __BIG_ENDIAN
92 - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
93 + (*outptrp)[0] = state->__value.__wchb[0];
94 + (*outptrp)[1] = state->__value.__wchb[1];
95 + (*outptrp)[2] = state->__value.__wchb[2];
96 + (*outptrp)[3] = state->__value.__wchb[3];
98 # error "This endianess is not supported."
102 /* Clear the state buffer. */
103 state->__count &= ~7;
105 return __GCONV_ILLEGAL_INPUT;
108 - *((uint32_t *) outptr)++ = inval;
109 + *((uint32_t *) outptr) = inval;
110 + outptr += sizeof (uint32_t);
115 #if __BYTE_ORDER == __BIG_ENDIAN
116 /* Sigh, we have to do some real work. */
118 + uint32_t *outptr32 = (uint32_t *) outptr;
120 for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
121 - *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
122 + *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
123 + outptr = (unsigned char *) outptr32;
127 @@ -530,12 +537,17 @@
128 (*outptrp)[2] = state->__value.__wchb[1];
129 (*outptrp)[3] = state->__value.__wchb[0];
134 - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
135 + (*outptrp)[0] = state->__value.__wchb[0];
136 + (*outptrp)[1] = state->__value.__wchb[1];
137 + (*outptrp)[2] = state->__value.__wchb[2];
138 + (*outptrp)[3] = state->__value.__wchb[3];
144 /* Clear the state buffer. */
145 state->__count &= ~7;
148 return __GCONV_ILLEGAL_INPUT;
151 - *((uint32_t *) outptr)++ = inval;
152 + *((uint32_t *) outptr) = inval;
153 + outptr += sizeof (uint32_t);
160 /* It's an one byte sequence. */ \
161 - *((uint32_t *) outptr)++ = *inptr++; \
162 + *((uint32_t *) outptr) = *inptr++; \
163 + outptr += sizeof (uint32_t); \
165 #define LOOP_NEED_FLAGS
166 #include <iconv/loop.c>
170 /* It's an one byte sequence. */ \
171 - *outptr++ = *((const uint32_t *) inptr)++; \
172 + *outptr++ = *((const uint32_t *) inptr); \
173 + inptr += sizeof (uint32_t); \
175 #define LOOP_NEED_FLAGS
176 #include <iconv/loop.c>
177 @@ -1031,7 +1046,8 @@
180 /* Now adjust the pointers and store the result. */ \
181 - *((uint32_t *) outptr)++ = ch; \
182 + *((uint32_t *) outptr) = ch; \
183 + outptr += sizeof (uint32_t); \
185 #define LOOP_NEED_FLAGS
187 @@ -1174,7 +1190,8 @@
191 - *((uint32_t *) outptr)++ = u1; \
192 + *((uint32_t *) outptr) = u1; \
193 + outptr += sizeof (uint32_t); \
196 #define LOOP_NEED_FLAGS
197 @@ -1224,7 +1241,8 @@
201 - *((uint16_t *) outptr)++ = val; \
202 + *((uint16_t *) outptr) = val; \
203 + outptr += sizeof (uint16_t); \
207 @@ -1265,7 +1283,8 @@
211 - *((uint32_t *) outptr)++ = u1; \
212 + *((uint32_t *) outptr) = u1; \
213 + outptr += sizeof (uint32_t); \
216 #define LOOP_NEED_FLAGS
217 @@ -1314,7 +1333,8 @@
221 - *((uint16_t *) outptr)++ = bswap_16 (val); \
222 + *((uint16_t *) outptr) = bswap_16 (val); \
223 + outptr += sizeof (uint16_t); \