patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata-2.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
To: Glibc hackers <libc-hacker at sources dot redhat dot com>
yann@1
     2
Subject: iconvdata: Get rid of lvalue casts
yann@1
     3
From: Andreas Jaeger <aj at suse dot de>
yann@1
     4
Date: Sun, 07 Mar 2004 08:29:47 +0100
yann@1
     5
Message-ID: <m3fzclt8r8.fsf@gromit.moeb>
yann@1
     6
yann@1
     7
Here's one more patch to get rid of lvalues to make GCC 3.5 happy.  It
yann@1
     8
generates the same code as before on my machine and passes the
yann@1
     9
testsuite.
yann@1
    10
yann@1
    11
Ok to commit?
yann@1
    12
yann@1
    13
Andreas
yann@1
    14
yann@1
    15
2004-03-07  Andreas Jaeger  <aj@suse.de>
yann@1
    16
yann@1
    17
	* iconvdata/iso-2022-cn-ext.c (BODY): Remove cast used as lvalue.
yann@1
    18
	* iconvdata/tcvn5712-1.c (EMIT_SHIFT_TO_INIT): Likewise.
yann@1
    19
	* iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
yann@1
    20
	* iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
yann@1
    21
	* iconvdata/tscii.c (EMIT_SHIFT_TO_INIT): Likewise.
yann@1
    22
yann@1
    23
[rediffed to make crosstool happy]
yann@1
    24
yann@1
    25
diff -ur glibc-2.3.3.orig/iconvdata/euc-jisx0213.c glibc-2.3.3.new/iconvdata/euc-jisx0213.c
yann@1
    26
--- glibc-2.3.3.orig/iconvdata/euc-jisx0213.c	Mon Dec  2 14:07:54 2002
yann@1
    27
+++ glibc-2.3.3.new/iconvdata/euc-jisx0213.c	Fri Mar 18 09:29:22 2005
yann@1
    28
@@ -1,5 +1,5 @@
yann@1
    29
 /* Conversion from and to EUC-JISX0213.
yann@1
    30
-   Copyright (C) 2002 Free Software Foundation, Inc.
yann@1
    31
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
yann@1
    32
    This file is part of the GNU C Library.
yann@1
    33
    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
yann@1
    34
 
yann@1
    35
@@ -83,7 +83,8 @@
yann@1
    36
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
yann@1
    37
 	    {								      \
yann@1
    38
 	      /* Write out the last character.  */			      \
yann@1
    39
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
yann@1
    40
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
yann@1
    41
+	      outbuf += sizeof (uint32_t);				      \
yann@1
    42
 	      data->__statep->__count = 0;				      \
yann@1
    43
 	    }								      \
yann@1
    44
 	  else								      \
yann@1
    45
diff -ur glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c
yann@1
    46
--- glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c	Fri Jun 28 14:13:14 2002
yann@1
    47
+++ glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c	Fri Mar 18 09:29:22 2005
yann@1
    48
@@ -1,5 +1,5 @@
yann@1
    49
 /* Conversion module for ISO-2022-CN-EXT.
yann@1
    50
-   Copyright (C) 2000-2002 Free Software Foundation, Inc.
yann@1
    51
+   Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
yann@1
    52
    This file is part of the GNU C Library.
yann@1
    53
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
yann@1
    54
 
yann@1
    55
@@ -377,7 +377,8 @@
yann@1
    56
 	  }								      \
yann@1
    57
       }									      \
yann@1
    58
 									      \
yann@1
    59
-    *((uint32_t *) outptr)++ = ch;					      \
yann@1
    60
+    *((uint32_t *) outptr) = ch;					      \
yann@1
    61
+    outptr += sizeof (uint32_t);					      \
yann@1
    62
   }
yann@1
    63
 #define EXTRA_LOOP_DECLS	, int *setp
yann@1
    64
 #define INIT_PARAMS		int set = (*setp >> 3) & CURRENT_MASK; \
yann@1
    65
diff -ur glibc-2.3.3.orig/iconvdata/shift_jisx0213.c glibc-2.3.3.new/iconvdata/shift_jisx0213.c
yann@1
    66
--- glibc-2.3.3.orig/iconvdata/shift_jisx0213.c	Mon Dec  2 14:07:56 2002
yann@1
    67
+++ glibc-2.3.3.new/iconvdata/shift_jisx0213.c	Fri Mar 18 09:29:22 2005
yann@1
    68
@@ -1,5 +1,5 @@
yann@1
    69
 /* Conversion from and to Shift_JISX0213.
yann@1
    70
-   Copyright (C) 2002 Free Software Foundation, Inc.
yann@1
    71
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
yann@1
    72
    This file is part of the GNU C Library.
yann@1
    73
    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
yann@1
    74
 
yann@1
    75
@@ -83,7 +83,8 @@
yann@1
    76
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
yann@1
    77
 	    {								      \
yann@1
    78
 	      /* Write out the last character.  */			      \
yann@1
    79
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
yann@1
    80
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
yann@1
    81
+	      outbuf += sizeof (uint32_t);				      \
yann@1
    82
 	      data->__statep->__count = 0;				      \
yann@1
    83
 	    }								      \
yann@1
    84
 	  else								      \
yann@1
    85
diff -ur glibc-2.3.3.orig/iconvdata/tcvn5712-1.c glibc-2.3.3.new/iconvdata/tcvn5712-1.c
yann@1
    86
--- glibc-2.3.3.orig/iconvdata/tcvn5712-1.c	Mon Dec  2 14:07:52 2002
yann@1
    87
+++ glibc-2.3.3.new/iconvdata/tcvn5712-1.c	Fri Mar 18 09:29:22 2005
yann@1
    88
@@ -1,5 +1,5 @@
yann@1
    89
 /* Conversion to and from TCVN5712-1.
yann@1
    90
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
yann@1
    91
+   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
yann@1
    92
    This file is part of the GNU C Library.
yann@1
    93
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
yann@1
    94
 
yann@1
    95
@@ -68,7 +68,8 @@
yann@1
    96
 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
yann@1
    97
 	    {								      \
yann@1
    98
 	      /* Write out the last character.  */			      \
yann@1
    99
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
yann@1
   100
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
yann@1
   101
+	      outbuf += sizeof (uint32_t);				      \
yann@1
   102
 	      data->__statep->__count = 0;				      \
yann@1
   103
 	    }								      \
yann@1
   104
 	  else								      \
yann@1
   105
diff -ur glibc-2.3.3.orig/iconvdata/tscii.c glibc-2.3.3.new/iconvdata/tscii.c
yann@1
   106
--- glibc-2.3.3.orig/iconvdata/tscii.c	Mon Sep 23 20:39:45 2002
yann@1
   107
+++ glibc-2.3.3.new/iconvdata/tscii.c	Fri Mar 18 09:29:22 2005
yann@1
   108
@@ -1,5 +1,5 @@
yann@1
   109
 /* Conversion from and to TSCII.
yann@1
   110
-   Copyright (C) 2002 Free Software Foundation, Inc.
yann@1
   111
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
yann@1
   112
    This file is part of the GNU C Library.
yann@1
   113
    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
yann@1
   114
 
yann@1
   115
@@ -98,7 +98,8 @@
yann@1
   116
 		  break;						      \
yann@1
   117
 		}							      \
yann@1
   118
 	      /* Write out the pending character.  */			      \
yann@1
   119
-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 8;	      \
yann@1
   120
+	      *((uint32_t *) outbuf) = data->__statep->__count >> 8;	      \
yann@1
   121
+	      outbuf += sizeof (uint32_t);				      \
yann@1
   122
 	      /* Retrieve the successor state.  */			      \
yann@1
   123
 	      data->__statep->__count =					      \
yann@1
   124
 		tscii_next_state[(data->__statep->__count >> 4) & 0x0f];      \