Patches for glibc-2.5, courtesy of "Robert P. J. Day" <rpjday@mindspring.com>
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
10 Changes by: drepper@sources.redhat.com 2000-11-25 23:30:03
13 sysdeps/generic: _strerror.c memrchr.c strcasestr.c strstr.c
16 Add casts to avoid warnings.
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
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
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));
39 # /* Terminate the string in any case. */
42 #===================================================================
43 #RCS file: /cvs/libc/sysdeps/generic/memrchr.c,v
44 #retrieving revision 1.5
45 #retrieving revision 1.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
50 # /* All these elucidatory comments refer to 4-byte longwords,
51 # but the theory applies equally well to 8-byte longwords. */
53 #- longword_ptr = (unsigned long int *) char_ptr;
54 #+ longword_ptr = (const unsigned long int *) char_ptr;
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
59 ===================================================================
60 RCS file: /cvs/libc/sysdeps/generic/strcasestr.c,v
61 retrieving revision 1.3
62 retrieving revision 1.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
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.
72 The GNU C Library is free software; you can redistribute it and/or
77 - while (_tolower (c) != b);
78 + while (_tolower (c) != (int) b);
80 c = _tolower (*++needle);
86 - if (_tolower (a) == b)
87 + if (_tolower (a) == (int) b)
93 - while (_tolower (a) != b);
97 + while (_tolower (a) != (int) b);
103 - if (_tolower (a) != c)
104 + if (_tolower (a) != (int) c)
107 rhaystack = haystack-- + 1;
109 a = _tolower (*rneedle);
111 - if (_tolower (*rhaystack) == a)
112 + if (_tolower (*rhaystack) == (int) a)
118 a = _tolower (*++needle);
119 - if (_tolower (*rhaystack) != a)
120 + if (_tolower (*rhaystack) != (int) a)
125 a = _tolower (*++needle);
127 - while (_tolower (*rhaystack) == a);
128 + while (_tolower (*rhaystack) == (int) a);
130 needle = rneedle; /* took the register-poor approach */
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
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.
146 The GNU C Library is free software; you can redistribute it and/or
157 jin: a = *++haystack;