patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-generic.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
Fixes following error when building with gcc-3.4.0:
yann@1
     2
../sysdeps/generic/strstr.c: In function `strstr':
yann@1
     3
../sysdeps/generic/strstr.c:85: error: label at end of compound statement
yann@1
     4
make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/string/strstr.o] Error 1
yann@1
     5
yann@1
     6
yann@1
     7
--------
yann@1
     8
CVSROOT:	/cvs/glibc
yann@1
     9
Module name:	libc
yann@1
    10
Changes by:	drepper@sources.redhat.com	2000-11-25 23:30:03
yann@1
    11
yann@1
    12
Modified files:
yann@1
    13
	sysdeps/generic: _strerror.c memrchr.c strcasestr.c strstr.c 
yann@1
    14
yann@1
    15
Log message:
yann@1
    16
	Add casts to avoid warnings.
yann@1
    17
--------
yann@1
    18
yann@1
    19
Retrieved with
yann@1
    20
 cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc diff -u -D"2000-11-24 23:30:03" -D"2000-11-26 23:30:03" 
yann@1
    21
then fixed paths and threw out first two hunks
yann@1
    22
yann@1
    23
yann@1
    24
#Index: _strerror.c
yann@1
    25
#===================================================================
yann@1
    26
#RCS file: /cvs/libc/sysdeps/generic/_strerror.c,v
yann@1
    27
#retrieving revision 1.16
yann@1
    28
#retrieving revision 1.17
yann@1
    29
#diff -u -r1.16 -r1.17
yann@1
    30
#--- libc/sysdeps/generic/_strerror.c	29 Aug 2000 01:09:56 -0000	1.16
yann@1
    31
#+++ libc/sysdeps/generic/_strerror.c	26 Nov 2000 07:30:03 -0000	1.17
yann@1
    32
#@@ -56,7 +56,7 @@
yann@1
    33
# 	 buffer size.  */
yann@1
    34
#       q = __mempcpy (buf, unk, MIN (unklen, buflen));
yann@1
    35
#       if (unklen < buflen)
yann@1
    36
#-	memcpy (q, p, MIN (&numbuf[21] - p, buflen - unklen));
yann@1
    37
#+	memcpy (q, p, MIN ((size_t) (&numbuf[21] - p), buflen - unklen));
yann@1
    38
# 
yann@1
    39
#       /* Terminate the string in any case.  */
yann@1
    40
#       if (buflen > 0)
yann@1
    41
#Index: memrchr.c
yann@1
    42
#===================================================================
yann@1
    43
#RCS file: /cvs/libc/sysdeps/generic/memrchr.c,v
yann@1
    44
#retrieving revision 1.5
yann@1
    45
#retrieving revision 1.6
yann@1
    46
#diff -u -r1.5 -r1.6
yann@1
    47
#--- libc/sysdeps/generic/memrchr.c	23 Oct 2000 23:07:32 -0000	1.5
yann@1
    48
#+++ libc/sysdeps/generic/memrchr.c	26 Nov 2000 07:30:03 -0000	1.6
yann@1
    49
#@@ -86,7 +86,7 @@
yann@1
    50
#   /* All these elucidatory comments refer to 4-byte longwords,
yann@1
    51
#      but the theory applies equally well to 8-byte longwords.  */
yann@1
    52
# 
yann@1
    53
#-  longword_ptr = (unsigned long int *) char_ptr;
yann@1
    54
#+  longword_ptr = (const unsigned long int *) char_ptr;
yann@1
    55
# 
yann@1
    56
#   /* Bits 31, 24, 16, and 8 of this number are zero.  Call these bits
yann@1
    57
#      the "holes."  Note that there is a hole just to the left of
yann@1
    58
Index: strcasestr.c
yann@1
    59
===================================================================
yann@1
    60
RCS file: /cvs/libc/sysdeps/generic/strcasestr.c,v
yann@1
    61
retrieving revision 1.3
yann@1
    62
retrieving revision 1.4
yann@1
    63
diff -u -r1.3 -r1.4
yann@1
    64
--- libc/sysdeps/generic/strcasestr.c	23 Jan 1999 22:16:03 -0000	1.3
yann@1
    65
+++ libc/sysdeps/generic/strcasestr.c	26 Nov 2000 07:30:03 -0000	1.4
yann@1
    66
@@ -1,5 +1,5 @@
yann@1
    67
 /* Return the offset of one string within another.
yann@1
    68
-   Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
yann@1
    69
+   Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
yann@1
    70
    This file is part of the GNU C Library.
yann@1
    71
 
yann@1
    72
    The GNU C Library is free software; you can redistribute it and/or
yann@1
    73
@@ -62,7 +62,7 @@
yann@1
    74
 	  if (c == '\0')
yann@1
    75
 	    goto ret0;
yann@1
    76
 	}
yann@1
    77
-      while (_tolower (c) != b);
yann@1
    78
+      while (_tolower (c) != (int) b);
yann@1
    79
 
yann@1
    80
       c = _tolower (*++needle);
yann@1
    81
       if (c == '\0')
yann@1
    82
@@ -80,40 +80,42 @@
yann@1
    83
 	      a = *++haystack;
yann@1
    84
 	      if (a == '\0')
yann@1
    85
 		goto ret0;
yann@1
    86
-	      if (_tolower (a) == b)
yann@1
    87
+	      if (_tolower (a) == (int) b)
yann@1
    88
 		break;
yann@1
    89
 	      a = *++haystack;
yann@1
    90
 	      if (a == '\0')
yann@1
    91
 		goto ret0;
yann@1
    92
-shloop:	    }
yann@1
    93
-          while (_tolower (a) != b);
yann@1
    94
+shloop:
yann@1
    95
+	      ;
yann@1
    96
+	    }
yann@1
    97
+          while (_tolower (a) != (int) b);
yann@1
    98
 
yann@1
    99
 jin:	  a = *++haystack;
yann@1
   100
 	  if (a == '\0')
yann@1
   101
 	    goto ret0;
yann@1
   102
 
yann@1
   103
-	  if (_tolower (a) != c)
yann@1
   104
+	  if (_tolower (a) != (int) c)
yann@1
   105
 	    goto shloop;
yann@1
   106
 
yann@1
   107
 	  rhaystack = haystack-- + 1;
yann@1
   108
 	  rneedle = needle;
yann@1
   109
 	  a = _tolower (*rneedle);
yann@1
   110
 
yann@1
   111
-	  if (_tolower (*rhaystack) == a)
yann@1
   112
+	  if (_tolower (*rhaystack) == (int) a)
yann@1
   113
 	    do
yann@1
   114
 	      {
yann@1
   115
 		if (a == '\0')
yann@1
   116
 		  goto foundneedle;
yann@1
   117
 		++rhaystack;
yann@1
   118
 		a = _tolower (*++needle);
yann@1
   119
-		if (_tolower (*rhaystack) != a)
yann@1
   120
+		if (_tolower (*rhaystack) != (int) a)
yann@1
   121
 		  break;
yann@1
   122
 		if (a == '\0')
yann@1
   123
 		  goto foundneedle;
yann@1
   124
 		++rhaystack;
yann@1
   125
 		a = _tolower (*++needle);
yann@1
   126
 	      }
yann@1
   127
-	    while (_tolower (*rhaystack) == a);
yann@1
   128
+	    while (_tolower (*rhaystack) == (int) a);
yann@1
   129
 
yann@1
   130
 	  needle = rneedle;		/* took the register-poor approach */
yann@1
   131
 
yann@1
   132
Index: strstr.c
yann@1
   133
===================================================================
yann@1
   134
RCS file: /cvs/libc/sysdeps/generic/strstr.c,v
yann@1
   135
retrieving revision 1.10
yann@1
   136
retrieving revision 1.11
yann@1
   137
diff -u -r1.10 -r1.11
yann@1
   138
--- libc/sysdeps/generic/strstr.c	11 Sep 1997 03:18:20 -0000	1.10
yann@1
   139
+++ libc/sysdeps/generic/strstr.c	26 Nov 2000 07:30:03 -0000	1.11
yann@1
   140
@@ -1,5 +1,5 @@
yann@1
   141
 /* Return the offset of one string within another.
yann@1
   142
-   Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
yann@1
   143
+   Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
yann@1
   144
    This file is part of the GNU C Library.
yann@1
   145
 
yann@1
   146
    The GNU C Library is free software; you can redistribute it and/or
yann@1
   147
@@ -82,7 +82,9 @@
yann@1
   148
 	      a = *++haystack;
yann@1
   149
 	      if (a == '\0')
yann@1
   150
 		goto ret0;
yann@1
   151
-shloop:	    }
yann@1
   152
+shloop:
yann@1
   153
+	      ;
yann@1
   154
+	    }
yann@1
   155
           while (a != b);
yann@1
   156
 
yann@1
   157
 jin:	  a = *++haystack;