patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-gconv.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-gconv.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,226 +0,0 @@
     1.4 -Fixes
     1.5 -gconv_open.c: In function `__gconv_open':
     1.6 -gconv_open.c:186: error: invalid lvalue in assignment
     1.7 -when building glibc-2.2.5 with gcc-4.0.
     1.8 -Same as ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch
     1.9 -but rediffed against glibc-2.2.5.
    1.10 -
    1.11 -wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
    1.12 -        * (internal_ucs4_loop): Fix typo in last change.
    1.13 -
    1.14 -        * (internal_ucs4le_loop): Remove cast used as lvalue.
    1.15 -
    1.16 -        * Fix last commit.
    1.17 -
    1.18 -	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
    1.19 -	(internal_ucs4le_loop_single): Likewise.
    1.20 -	(ucs4_internal_loop): Likewise.
    1.21 -	(BODY): Likewise.
    1.22 -	(internal_ucs4_loop_single): Likewise.
    1.23 -
    1.24 -wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
    1.25 -	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
    1.26 -	(internal_ucs4le_loop_single): Likewise.
    1.27 -	(ucs4_internal_loop): Likewise.
    1.28 -	(BODY): Likewise.
    1.29 -	(internal_ucs4_loop_single): Likewise.
    1.30 -
    1.31 -
    1.32 -===================================================================
    1.33 -RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
    1.34 -retrieving revision 1.32
    1.35 -retrieving revision 1.33
    1.36 -diff -u -r1.32 -r1.33
    1.37 ---- libc/iconv/gconv_open.c	2001/11/29 04:51:58	1.32
    1.38 -+++ libc/iconv/gconv_open.c	2004/02/07 15:56:32	1.33
    1.39 -@@ -1,5 +1,5 @@
    1.40 - /* Find matching transformation algorithms and initialize steps.
    1.41 --   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    1.42 -+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
    1.43 -    This file is part of the GNU C Library.
    1.44 -    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    1.45 - 
    1.46 -@@ -182,8 +182,13 @@
    1.47 - 	      || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
    1.48 - 	    lastp = runp;
    1.49 - 	  else
    1.50 --	    /* This means we haven't found the module.  Remove it.  */
    1.51 --	    (lastp == NULL ? trans : lastp->next) = runp->next;
    1.52 -+	    {
    1.53 -+	      /* This means we haven't found the module.  Remove it.  */
    1.54 -+	      if (lastp == NULL)
    1.55 -+		trans  = runp->next;
    1.56 -+	      else
    1.57 -+		lastp->next  = runp->next;
    1.58 -+	    }
    1.59 - 	}
    1.60 - 
    1.61 -       /* Allocate room for handle.  */
    1.62 -===================================================================
    1.63 ---- glibc-2.2.5/iconv/gconv_simple.c.old	2001-08-03 15:06:46.000000000 -0700
    1.64 -+++ glibc-2.2.5/iconv/gconv_simple.c	2005-03-10 00:49:45.558181608 -0800
    1.65 -@@ -1,5 +1,5 @@
    1.66 - /* Simple transformations functions.
    1.67 --   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    1.68 -+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
    1.69 -    This file is part of the GNU C Library.
    1.70 -    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    1.71 - 
    1.72 -@@ -73,12 +73,13 @@
    1.73 - #if __BYTE_ORDER == __LITTLE_ENDIAN
    1.74 -   /* Sigh, we have to do some real work.  */
    1.75 -   size_t cnt;
    1.76 -+  uint32_t *outptr32 = (uint32_t *) outptr;
    1.77 - 
    1.78 -   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
    1.79 --    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
    1.80 -+    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
    1.81 - 
    1.82 -   *inptrp = inptr;
    1.83 --  *outptrp = outptr;
    1.84 -+  *outptrp = (unsigned char *) outptr32;
    1.85 - #elif __BYTE_ORDER == __BIG_ENDIAN
    1.86 -   /* Simply copy the data.  */
    1.87 -   *inptrp = inptr + n_convert * 4;
    1.88 -@@ -176,13 +177,16 @@
    1.89 -   (*outptrp)[2] = state->__value.__wchb[1];
    1.90 -   (*outptrp)[3] = state->__value.__wchb[0];
    1.91 - 
    1.92 --  *outptrp += 4;
    1.93 - #elif __BYTE_ORDER == __BIG_ENDIAN
    1.94 -   /* XXX unaligned */
    1.95 --  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
    1.96 -+  (*outptrp)[0] = state->__value.__wchb[0];
    1.97 -+  (*outptrp)[1] = state->__value.__wchb[1];
    1.98 -+  (*outptrp)[2] = state->__value.__wchb[2];
    1.99 -+  (*outptrp)[3] = state->__value.__wchb[3];
   1.100 - #else
   1.101 - # error "This endianess is not supported."
   1.102 - #endif
   1.103 -+  *outptrp += 4;
   1.104 - 
   1.105 -   /* Clear the state buffer.  */
   1.106 -   state->__count &= ~7;
   1.107 -@@ -251,7 +255,8 @@
   1.108 - 	  return __GCONV_ILLEGAL_INPUT;
   1.109 - 	}
   1.110 - 
   1.111 --      *((uint32_t *) outptr)++ = inval;
   1.112 -+      *((uint32_t *) outptr) = inval;
   1.113 -+      outptr += sizeof (uint32_t);
   1.114 -     }
   1.115 - 
   1.116 -   *inptrp = inptr;
   1.117 -@@ -427,9 +432,11 @@
   1.118 - #if __BYTE_ORDER == __BIG_ENDIAN
   1.119 -   /* Sigh, we have to do some real work.  */
   1.120 -   size_t cnt;
   1.121 -+  uint32_t *outptr32 = (uint32_t *) outptr;
   1.122 - 
   1.123 -   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
   1.124 --    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
   1.125 -+    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
   1.126 -+  outptr = (unsigned char *) outptr32;
   1.127 - 
   1.128 -   *inptrp = inptr;
   1.129 -   *outptrp = outptr;
   1.130 -@@ -530,12 +537,17 @@
   1.131 -   (*outptrp)[2] = state->__value.__wchb[1];
   1.132 -   (*outptrp)[3] = state->__value.__wchb[0];
   1.133 - 
   1.134 --  *outptrp += 4;
   1.135 - #else
   1.136 -   /* XXX unaligned */
   1.137 --  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
   1.138 -+  (*outptrp)[0] = state->__value.__wchb[0];
   1.139 -+  (*outptrp)[1] = state->__value.__wchb[1];
   1.140 -+  (*outptrp)[2] = state->__value.__wchb[2];
   1.141 -+  (*outptrp)[3] = state->__value.__wchb[3];
   1.142 -+
   1.143 - #endif
   1.144 - 
   1.145 -+  *outptrp += 4;
   1.146 -+
   1.147 -   /* Clear the state buffer.  */
   1.148 -   state->__count &= ~7;
   1.149 - 
   1.150 -@@ -600,7 +612,8 @@
   1.151 - 	  return __GCONV_ILLEGAL_INPUT;
   1.152 - 	}
   1.153 - 
   1.154 --      *((uint32_t *) outptr)++ = inval;
   1.155 -+      *((uint32_t *) outptr) = inval;
   1.156 -+      outptr += sizeof (uint32_t);
   1.157 -     }
   1.158 - 
   1.159 -   *inptrp = inptr;
   1.160 -@@ -782,7 +795,8 @@
   1.161 -       }									      \
   1.162 -     else								      \
   1.163 -       /* It's an one byte sequence.  */					      \
   1.164 --      *((uint32_t *) outptr)++ = *inptr++;				      \
   1.165 -+      *((uint32_t *) outptr) = *inptr++;				      \
   1.166 -+      outptr += sizeof (uint32_t);					      \
   1.167 -   }
   1.168 - #define LOOP_NEED_FLAGS
   1.169 - #include <iconv/loop.c>
   1.170 -@@ -812,7 +826,8 @@
   1.171 -       }									      \
   1.172 -     else								      \
   1.173 -       /* It's an one byte sequence.  */					      \
   1.174 --      *outptr++ = *((const uint32_t *) inptr)++;			      \
   1.175 -+      *outptr++ = *((const uint32_t *) inptr);				      \
   1.176 -+      inptr += sizeof (uint32_t);					      \
   1.177 -   }
   1.178 - #define LOOP_NEED_FLAGS
   1.179 - #include <iconv/loop.c>
   1.180 -@@ -1031,7 +1046,8 @@
   1.181 -       }									      \
   1.182 - 									      \
   1.183 -     /* Now adjust the pointers and store the result.  */		      \
   1.184 --    *((uint32_t *) outptr)++ = ch;					      \
   1.185 -+    *((uint32_t *) outptr) = ch;					      \
   1.186 -+    outptr += sizeof (uint32_t);					      \
   1.187 -   }
   1.188 - #define LOOP_NEED_FLAGS
   1.189 - 
   1.190 -@@ -1174,7 +1190,8 @@
   1.191 - 	continue;							      \
   1.192 -       }									      \
   1.193 - 									      \
   1.194 --    *((uint32_t *) outptr)++ = u1;					      \
   1.195 -+    *((uint32_t *) outptr) = u1;					      \
   1.196 -+    outptr += sizeof (uint32_t);					      \
   1.197 -     inptr += 2;								      \
   1.198 -   }
   1.199 - #define LOOP_NEED_FLAGS
   1.200 -@@ -1224,7 +1241,8 @@
   1.201 -       }									      \
   1.202 -     else 								      \
   1.203 -       {									      \
   1.204 --	*((uint16_t *) outptr)++ = val;					      \
   1.205 -+	*((uint16_t *) outptr) = val;					      \
   1.206 -+        outptr += sizeof (uint16_t);					      \
   1.207 - 	inptr += 4;							      \
   1.208 -       }									      \
   1.209 -   }
   1.210 -@@ -1265,7 +1283,8 @@
   1.211 - 	continue;							      \
   1.212 -       }									      \
   1.213 - 									      \
   1.214 --    *((uint32_t *) outptr)++ = u1;					      \
   1.215 -+    *((uint32_t *) outptr) = u1;					      \
   1.216 -+    outptr += sizeof (uint32_t);					      \
   1.217 -     inptr += 2;								      \
   1.218 -   }
   1.219 - #define LOOP_NEED_FLAGS
   1.220 -@@ -1314,7 +1333,8 @@
   1.221 -       }									      \
   1.222 -     else 								      \
   1.223 -       {									      \
   1.224 --	*((uint16_t *) outptr)++ = bswap_16 (val);			      \
   1.225 -+	*((uint16_t *) outptr) = bswap_16 (val);			      \
   1.226 -+	outptr += sizeof (uint16_t);					      \
   1.227 - 	inptr += 4;							      \
   1.228 -       }									      \
   1.229 -   }