1 2001-11-29 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/generic/glob.c (next_brace_sub): Return NULL if braces
4 don't match, fix {{a,b},c} globbing, clean up.
5 Patch by Flavio Veloso <flaviovs@magnux.com>.
6 * posix/globtest.sh: Add new tests.
8 2001-11-28 Jakub Jelinek <jakub@redhat.com>
10 * sysdeps/sparc/fpu/bits/mathinline.h (__signbitf, __signbit,
11 __signbitl): Only define for ISO C99.
13 2001-11-26 Ulrich Drepper <drepper@redhat.com>
15 * stdio-common/vfscanf.c: If incomplete nan of inf(inity) strings
16 are found call conv_error and not input_error [PR libc/2669].
18 2001-11-02 Jakub Jelinek <jakub@redhat.com>
20 * string/bits/string2.h (__strndup): If n is smaller than len, set
22 * string/tester.c (test_strndup): New function.
25 2001-10-31 Ulrich Drepper <drepper@redhat.com>
27 * elf/dl-load.c (_dl_map_object): Make code a bit more compact by
28 avoiding unnecessary duplication.
30 2001-10-31 Jakub Jelinek <jakub@redhat.com>
32 * elf/dl-load.c (_dl_map_object): If library was found using
33 LD_LIBRARY_PATH, don't try RUNPATH list.
35 2001-10-26 Ulrich Drepper <drepper@redhat.com>
37 * posix/fnmatch_loop.c: Recognize - at end of bracket expression
39 * posix/tst-fnmatch.input: Add tests for - at beginning and end of
42 2001-10-24 H.J. Lu <hjl@gnu.org>
44 * sysdeps/generic/bits/dlfcn.h (DL_CALL_FCT): Cast to void *.
45 Use __BEGIN_DECLS/__END_DECLS around prototypes.
47 2001-10-26 Ulrich Drepper <drepper@redhat.com>
49 * resolv/gethnamaddr.c (gethostbyaddr): Use ip6.addr for reverse
51 * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
52 Reported by Martin.v.Loewis@t-online.de [PR libc/2598].
54 2001-10-04 Ben Collins <bcollins@debian.org>
56 * sysdeps/generic/inttypes.h: Fix typo (define, not defined) in
57 decleration of __need_wchar_t.
59 --- libc/sysdeps/sparc/fpu/bits/mathinline.h 2001/07/06 04:56:04 1.8
60 +++ libc/sysdeps/sparc/fpu/bits/mathinline.h 2001/11/28 15:19:39
62 /* The gcc, version 2.7 or below, has problems with all this inlining
63 code. So disable it for this version of the compiler. */
64 # if __GNUC_PREREQ (2, 8)
65 - /* Test for negative number. Used in the signbit() macro. */
67 +#if defined __USE_ISOC99
69 +/* Test for negative number. Used in the signbit() macro. */
71 __signbitf (float __x) __THROW
73 @@ -142,6 +145,8 @@ __signbitl (long double __x) __THROW
77 +#endif /* __USE_ISOC99 */
79 #ifndef __NO_MATH_INLINES
82 @@ -171,7 +176,7 @@ sqrtl(long double __x) __THROW
87 +#endif /* !__NO_MATH_INLINES */
89 /* This code is used internally in the GNU libc. */
90 #ifdef __LIBC_INTERNAL_MATH_INLINES
91 --- libc/stdio-common/vfscanf.c 2001/08/24 03:21:13 1.96
92 +++ libc/stdio-common/vfscanf.c 2001/11/27 02:18:20 1.97
93 @@ -1596,7 +1596,8 @@ __vfscanf (FILE *s, const char *format,
94 if (width == 0 || inchar () == EOF)
95 /* EOF is only an input error before we read any chars. */
97 - if (! ISDIGIT (c) && TOLOWER (c) != L_('i'))
98 + if (! ISDIGIT (c) && TOLOWER (c) != L_('i')
99 + && TOLOWER (c) != L_('n'))
101 #ifdef COMPILE_WSCANF
103 @@ -1654,12 +1655,12 @@ __vfscanf (FILE *s, const char *format,
106 if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('a'))
112 if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n'))
118 @@ -1671,12 +1672,12 @@ __vfscanf (FILE *s, const char *format,
119 /* Maybe "inf" or "infinity". */
121 if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n'))
127 if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('f'))
133 @@ -1691,25 +1692,25 @@ __vfscanf (FILE *s, const char *format,
135 if (width == 0 || inchar () == EOF
136 || TOLOWER (c) != L_('n'))
142 if (width == 0 || inchar () == EOF
143 || TOLOWER (c) != L_('i'))
149 if (width == 0 || inchar () == EOF
150 || TOLOWER (c) != L_('t'))
156 if (width == 0 || inchar () == EOF
157 || TOLOWER (c) != L_('y'))
163 --- libc/string/bits/string2.h 2001/10/07 20:13:12 1.63
164 +++ libc/string/bits/string2.h 2001/11/03 09:03:47 1.64
165 @@ -1216,7 +1216,7 @@ extern char *__strndup (__const char *__
171 __retval = (char *) malloc (__len); \
172 if (__retval != NULL) \
174 --- libc/string/tester.c 2001/08/24 23:51:11 1.39
175 +++ libc/string/tester.c 2001/11/03 09:04:20 1.40
176 @@ -1257,6 +1257,30 @@ test_bzero (void)
184 + p = strndup("abcdef", 12);
185 + check(p != NULL, 1);
188 + equal(p, "abcdef", 2);
189 + q = strndup(p + 1, 2);
190 + check(q != NULL, 3);
196 + p = strndup("abc def", 3);
197 + check(p != NULL, 5);
199 + equal(p, "abc", 6);
207 @@ -1381,6 +1405,9 @@ main (void)
209 /* bcmp - somewhat like memcmp. */
215 /* strerror - VERY system-dependent. */
217 --- libc/elf/dl-load.c 2001/09/19 03:18:40 1.175
218 +++ libc/elf/dl-load.c 2001/11/01 04:43:01 1.176
219 @@ -1608,7 +1608,8 @@ _dl_map_object (struct link_map *loader,
222 /* Look at the RUNPATH information for this binary. */
223 - if (loader != NULL && loader->l_runpath_dirs.dirs != (void *) -1)
224 + if (fd == -1 && loader != NULL
225 + && loader->l_runpath_dirs.dirs != (void *) -1)
227 if (loader->l_runpath_dirs.dirs == NULL)
229 @@ -1622,13 +1623,10 @@ _dl_map_object (struct link_map *loader,
230 + loader->l_info[DT_RUNPATH]->d_un.d_val);
231 decompose_rpath (&loader->l_runpath_dirs,
232 (const char *) ptrval, loader, "RUNPATH");
234 - if (loader->l_runpath_dirs.dirs != (void *) -1)
235 - fd = open_path (name, namelen, preloaded,
236 - &loader->l_runpath_dirs, &realname, &fb);
239 - else if (loader->l_runpath_dirs.dirs != (void *) -1)
241 + if (loader->l_runpath_dirs.dirs != (void *) -1)
242 fd = open_path (name, namelen, preloaded,
243 &loader->l_runpath_dirs, &realname, &fb);
245 --- libc/posix/fnmatch_loop.c 2001/08/10 05:55:16 1.28
246 +++ libc/posix/fnmatch_loop.c 2001/10/27 00:37:40 1.29
247 @@ -592,7 +592,8 @@ FCT (pattern, string, string_end, no_lea
248 /* We have to handling the symbols differently in
249 ranges since then the collation sequence is
251 - is_range = *p == L('-') && p[1] != L('\0');
252 + is_range = (*p == L('-') && p[1] != L('\0')
253 + && p[1] != L(']'));
255 if (!is_range && c == fn)
257 --- libc/posix/tst-fnmatch.input 2001/07/06 04:55:38 1.12
258 +++ libc/posix/tst-fnmatch.input 2001/10/27 02:37:27 1.13
259 @@ -381,6 +381,14 @@ C "a" "a/" NOMATCH
260 C "a/" "a" NOMATCH PATHNAME
261 C "//a" "/a" NOMATCH PATHNAME
262 C "/a" "//a" NOMATCH PATHNAME
265 +C "cz" "[ab-]z" NOMATCH
269 +C "cz" "[-ab]z" NOMATCH
272 # Following are tests outside the scope of IEEE 2003.2 since they are using
273 # locales other than the C locale. The main focus of the tests is on the
274 --- libc/sysdeps/generic/bits/dlfcn.h 2001/07/06 04:55:50 1.7
275 +++ libc/sysdeps/generic/bits/dlfcn.h 2001/10/27 00:03:32 1.8
277 /* System dependent definitions for run-time dynamic loading.
278 - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
279 + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
280 This file is part of the GNU C Library.
282 The GNU C Library is free software; you can redistribute it and/or
284 foo = DL_CALL_FCT (fctp, (arg1, arg2));
286 # define DL_CALL_FCT(fctp, args) \
287 - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args)
288 + (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
292 /* This function calls the profiling functions. */
293 extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
298 --- libc/resolv/gethnamaddr.c 2001/09/19 03:05:12 1.36
299 +++ libc/resolv/gethnamaddr.c 2001/10/26 23:49:48 1.37
300 @@ -690,7 +690,7 @@ gethostbyaddr(addr, len, af)
302 (uaddr[n] >> 4) & 0xf));
304 - strcpy(qp, "ip6.int");
305 + strcpy(qp, "ip6.arpa");
309 --- libc/resolv/nss_dns/dns-host.c 2001/08/14 23:27:27 1.28
310 +++ libc/resolv/nss_dns/dns-host.c 2001/10/26 23:49:07 1.29
311 @@ -282,7 +282,7 @@ _nss_dns_gethostbyaddr_r (const void *ad
313 for (n = IN6ADDRSZ - 1; n >= 0; n--)
314 qp += sprintf (qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf);
315 - strcpy (qp, "ip6.int");
316 + strcpy (qp, "ip6.arpa");
320 --- libc/posix/globtest.sh.jj Thu Aug 23 18:48:53 2001
321 +++ libc/posix/globtest.sh Thu Nov 29 13:32:05 2001
322 @@ -146,6 +146,32 @@ if test $failed -ne 0; then
327 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
328 +${common_objpfx}posix/globtest -b "$testdir" "{file{1,2},-file3}" |
330 +cat <<"EOF" | cmp - $testout >> $logfile || failed=1
335 +if test $failed -ne 0; then
336 + echo "Braces test 2 failed" >> $logfile
341 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
342 +${common_objpfx}posix/globtest -b "$testdir" "{" |
344 +cat <<"EOF" | cmp - $testout >> $logfile || failed=1
347 +if test $failed -ne 0; then
348 + echo "Braces test 3 failed" >> $logfile
354 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
355 --- libc/sysdeps/generic/glob.c.jj Thu Aug 23 18:49:29 2001
356 +++ libc/sysdeps/generic/glob.c Thu Nov 29 13:17:21 2001
357 @@ -355,42 +355,14 @@ static
361 -next_brace_sub (begin)
366 unsigned int depth = 0;
367 - const char *cp = begin;
373 - if (*cp != ',' && *cp != '}' && *cp != '\0')
383 - while (*cp != '\0' && (*cp != '}' || depth > 0))
390 - /* An incorrectly terminated brace expression. */
399 + while (*cp != '\0' && (*cp != '}' || depth--) && (*cp != ',' || depth))
402 + return *cp != '\0' ? cp : NULL;
405 #endif /* !GLOB_ONLY_P */