1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-generic.patch Sun May 27 21:15:46 2007 +0000
1.3 @@ -0,0 +1,157 @@
1.4 +Fixes following error when building with gcc-3.4.0:
1.5 +../sysdeps/generic/strstr.c: In function `strstr':
1.6 +../sysdeps/generic/strstr.c:85: error: label at end of compound statement
1.7 +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
1.8 +
1.9 +
1.10 +--------
1.11 +CVSROOT: /cvs/glibc
1.12 +Module name: libc
1.13 +Changes by: drepper@sources.redhat.com 2000-11-25 23:30:03
1.14 +
1.15 +Modified files:
1.16 + sysdeps/generic: _strerror.c memrchr.c strcasestr.c strstr.c
1.17 +
1.18 +Log message:
1.19 + Add casts to avoid warnings.
1.20 +--------
1.21 +
1.22 +Retrieved with
1.23 + 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"
1.24 +then fixed paths and threw out first two hunks
1.25 +
1.26 +
1.27 +#Index: _strerror.c
1.28 +#===================================================================
1.29 +#RCS file: /cvs/libc/sysdeps/generic/_strerror.c,v
1.30 +#retrieving revision 1.16
1.31 +#retrieving revision 1.17
1.32 +#diff -u -r1.16 -r1.17
1.33 +#--- libc/sysdeps/generic/_strerror.c 29 Aug 2000 01:09:56 -0000 1.16
1.34 +#+++ libc/sysdeps/generic/_strerror.c 26 Nov 2000 07:30:03 -0000 1.17
1.35 +#@@ -56,7 +56,7 @@
1.36 +# buffer size. */
1.37 +# q = __mempcpy (buf, unk, MIN (unklen, buflen));
1.38 +# if (unklen < buflen)
1.39 +#- memcpy (q, p, MIN (&numbuf[21] - p, buflen - unklen));
1.40 +#+ memcpy (q, p, MIN ((size_t) (&numbuf[21] - p), buflen - unklen));
1.41 +#
1.42 +# /* Terminate the string in any case. */
1.43 +# if (buflen > 0)
1.44 +#Index: memrchr.c
1.45 +#===================================================================
1.46 +#RCS file: /cvs/libc/sysdeps/generic/memrchr.c,v
1.47 +#retrieving revision 1.5
1.48 +#retrieving revision 1.6
1.49 +#diff -u -r1.5 -r1.6
1.50 +#--- libc/sysdeps/generic/memrchr.c 23 Oct 2000 23:07:32 -0000 1.5
1.51 +#+++ libc/sysdeps/generic/memrchr.c 26 Nov 2000 07:30:03 -0000 1.6
1.52 +#@@ -86,7 +86,7 @@
1.53 +# /* All these elucidatory comments refer to 4-byte longwords,
1.54 +# but the theory applies equally well to 8-byte longwords. */
1.55 +#
1.56 +#- longword_ptr = (unsigned long int *) char_ptr;
1.57 +#+ longword_ptr = (const unsigned long int *) char_ptr;
1.58 +#
1.59 +# /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
1.60 +# the "holes." Note that there is a hole just to the left of
1.61 +Index: strcasestr.c
1.62 +===================================================================
1.63 +RCS file: /cvs/libc/sysdeps/generic/strcasestr.c,v
1.64 +retrieving revision 1.3
1.65 +retrieving revision 1.4
1.66 +diff -u -r1.3 -r1.4
1.67 +--- libc/sysdeps/generic/strcasestr.c 23 Jan 1999 22:16:03 -0000 1.3
1.68 ++++ libc/sysdeps/generic/strcasestr.c 26 Nov 2000 07:30:03 -0000 1.4
1.69 +@@ -1,5 +1,5 @@
1.70 + /* Return the offset of one string within another.
1.71 +- Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
1.72 ++ Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
1.73 + This file is part of the GNU C Library.
1.74 +
1.75 + The GNU C Library is free software; you can redistribute it and/or
1.76 +@@ -62,7 +62,7 @@
1.77 + if (c == '\0')
1.78 + goto ret0;
1.79 + }
1.80 +- while (_tolower (c) != b);
1.81 ++ while (_tolower (c) != (int) b);
1.82 +
1.83 + c = _tolower (*++needle);
1.84 + if (c == '\0')
1.85 +@@ -80,40 +80,42 @@
1.86 + a = *++haystack;
1.87 + if (a == '\0')
1.88 + goto ret0;
1.89 +- if (_tolower (a) == b)
1.90 ++ if (_tolower (a) == (int) b)
1.91 + break;
1.92 + a = *++haystack;
1.93 + if (a == '\0')
1.94 + goto ret0;
1.95 +-shloop: }
1.96 +- while (_tolower (a) != b);
1.97 ++shloop:
1.98 ++ ;
1.99 ++ }
1.100 ++ while (_tolower (a) != (int) b);
1.101 +
1.102 + jin: a = *++haystack;
1.103 + if (a == '\0')
1.104 + goto ret0;
1.105 +
1.106 +- if (_tolower (a) != c)
1.107 ++ if (_tolower (a) != (int) c)
1.108 + goto shloop;
1.109 +
1.110 + rhaystack = haystack-- + 1;
1.111 + rneedle = needle;
1.112 + a = _tolower (*rneedle);
1.113 +
1.114 +- if (_tolower (*rhaystack) == a)
1.115 ++ if (_tolower (*rhaystack) == (int) a)
1.116 + do
1.117 + {
1.118 + if (a == '\0')
1.119 + goto foundneedle;
1.120 + ++rhaystack;
1.121 + a = _tolower (*++needle);
1.122 +- if (_tolower (*rhaystack) != a)
1.123 ++ if (_tolower (*rhaystack) != (int) a)
1.124 + break;
1.125 + if (a == '\0')
1.126 + goto foundneedle;
1.127 + ++rhaystack;
1.128 + a = _tolower (*++needle);
1.129 + }
1.130 +- while (_tolower (*rhaystack) == a);
1.131 ++ while (_tolower (*rhaystack) == (int) a);
1.132 +
1.133 + needle = rneedle; /* took the register-poor approach */
1.134 +
1.135 +Index: strstr.c
1.136 +===================================================================
1.137 +RCS file: /cvs/libc/sysdeps/generic/strstr.c,v
1.138 +retrieving revision 1.10
1.139 +retrieving revision 1.11
1.140 +diff -u -r1.10 -r1.11
1.141 +--- libc/sysdeps/generic/strstr.c 11 Sep 1997 03:18:20 -0000 1.10
1.142 ++++ libc/sysdeps/generic/strstr.c 26 Nov 2000 07:30:03 -0000 1.11
1.143 +@@ -1,5 +1,5 @@
1.144 + /* Return the offset of one string within another.
1.145 +- Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
1.146 ++ Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
1.147 + This file is part of the GNU C Library.
1.148 +
1.149 + The GNU C Library is free software; you can redistribute it and/or
1.150 +@@ -82,7 +82,9 @@
1.151 + a = *++haystack;
1.152 + if (a == '\0')
1.153 + goto ret0;
1.154 +-shloop: }
1.155 ++shloop:
1.156 ++ ;
1.157 ++ }
1.158 + while (a != b);
1.159 +
1.160 + jin: a = *++haystack;