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