1 2006-09-07 Jakub Jelinek <jakub@redhat.com>
4 * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela):
5 Ensure relocation doesn't clobber any bits outside of the
6 immediate field for R_SPARC_TLS_LE_HIX22, R_SPARC_WDISP30,
7 R_SPARC_HI22 and R_SPARC_H44.
10 * malloc/malloc.c (sYSMALLOc): Only call grow_heap if
11 (long) (MINSIZE + nb - old_size) is positive.
13 * malloc/arena.c (grow_heap): When growing bail even if new_size
17 * sysdeps/powerpc/powerpc32/fpu/s_lrint.S (__lrint): Don't access
20 2006-09-06 Jakub Jelinek <jakub@redhat.com>
22 * posix/regex_internal.c (re_string_reconstruct): Handle
23 offset < pstr->valid_raw_len && pstr->offsets_needed case.
24 Ensure no bytes read before raw_mbs array. Pass a saved copy of
25 pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
27 * posix/Makefile: Add rules to build and run bug-regex26 test.
28 * posix/bug-regex26.c: New test.
30 * locale/programs/ld-collate.c (collate_read): Goto sym_equiv_free
31 rather than col_sym_free. Move seqp declaration earlier.
33 * resolv/gai_suspend.c (gai_suspend): Make sure result is initialized.
35 2006-09-05 Jakub Jelinek <jakub@redhat.com>
37 * nscd/initgrcache.c (addinitgroupsX): Move any_success
38 decl before first goto out.
40 2006-09-04 Jakub Jelinek <jakub@redhat.com>
42 * Makerules (shlib.lds): If have-hash-style, put .hash section
43 at the end of the RO segment.
45 2006-09-04 Ulrich Drepper <drepper@redhat.com>
47 * elf/do-lookup.h (do_lookup_x): Initialize symidx in case the new
48 style hash table format is used.
50 2006-09-04 Jakub Jelinek <jakub@redhat.com>
52 * resolv/res_mkquery.c (res_nmkquery): Set hp->id to statp->id after
53 randomization rather than before.
54 * resolv/res_init.c (res_randomid): Don't call gettimeofday here.
56 2006-08-31 Jakub Jelinek <jakub@redhat.com>
58 * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Add ld.so.
60 * malloc/malloc.c (_int_malloc): Use full list insert and not
61 shortcut which assumes the list is empty for large requests
64 * elf/tst-addr1.c (do_test): Allow i.dli_sname "_IO_printf".
66 2006-08-30 Jakub Jelinek <jakub@redhat.com>
68 * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (splice): Add offin
69 and offout arguments to the prototype.
70 * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (splice): Likewise.
71 * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (splice): Likewise.
72 * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (splice): Likewise.
73 * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (splice): Likewise.
74 * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (splice): Likewise.
75 * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (splice): Likewise.
76 * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (splice): Likewise.
77 * sysdeps/unix/sysv/linux/syscalls.list (splice): Adjust args string.
79 2006-08-28 Ulrich Drepper <drepper@redhat.com>
81 * elf/dl-load.c (_dl_init_paths): Expand DSTs.
83 * elf/dl-open.c (dl_open_worker): Allow $LIB and $PLATFORM in
86 2006-08-28 Jakub Jelinek <jakub@redhat.com>
88 * inet/getnameinfo.c (getnameinfo): For AF_INET, check errno
89 only if herrno is NETDB_INTERNAL. Handle errors other than
90 ERANGE outside of the loops, handle TRY_AGAIN.
92 * locale/programs/ld-ctype.c (translit_flatten): Issue error
93 if other's ctype category was missing.
94 * locale/programs/ld-collate.c (collate_read): Return if
95 copy_locale's collate category is missing.
97 2006-08-27 Ulrich Drepper <drepper@redhat.com>
100 * malloc/malloc.c (public_rEALLOc): Try harder by using other
101 arenas if allocation failed.
102 Patch mostly by Jan Edler <jan.edler@indexengines.com>.
104 2006-08-26 Ulrich Drepper <drepper@redhat.com>
106 * malloc/malloc.c (bin_at): Rewrite to be more clear and to not
108 (malloc_state): Reduce bins size by 2.
109 (_int_malloc): Fix test for large enough buffer for early termination.
110 When no unsorted block matches perfectly and an exiting block has
111 to be split, use full list insert and not shortcut which assumes
114 * locale/programs/ld-ctype.c (ctype_read): Better patch for read
117 2006-08-24 Ulrich Drepper <drepper@redhat.com>
119 * locale/programs/ld-ctype.c (ctype_read): If CTYPE is NULL, don't
122 * sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): For undefined
123 symbol require exact match (these are PLTs).
124 * sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
125 (_dl_ppc64_addr_sym_match): Likewise.
128 * elf/dl-addr.c (_dl_addr): Don't ignore all undefined symbols.
129 If symbol has a value use it.
130 * elf/tst-dladdr1.c: New file.
131 * elf/Makefile: Add rules to build and run tst-addr1.
133 2006-08-24 Jakub Jelinek <jakub@redhat.com>
135 * malloc/malloc.c (sYSMALLOc): Avoid infinite loop if MMAP
136 keeps failing and heap growth or new heap creation isn't
138 * malloc/tst-malloc.c (main): Add new tests.
140 2006-08-24 Ulrich Drepper <drepper@redhat.com>
143 * sysdeps/i386/bits/byteswap.h (__bswap_32): Use same conditions
144 as in the x86-64 code to use bswap.
146 2006-05-21 Joseph S. Myers <joseph@codesourcery.com>
149 * posix/unistd.h (getlogin_r): Condition on __USE_POSIX199506, not
151 * posix/bits/unistd.h: Likewise.
153 2006-05-15 Mike Frysinger <vapier@gentoo.org>
156 * string/strchr.c: Add cast to avoid warning.
158 2006-08-21 Ulrich Drepper <drepper@redhat.com>
160 * malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit
161 platforms define as 512K. For 64-bit platforms as 32MB. The lower
162 limit is needed to avoid the exploding of the address space
163 requirement for secondary heaps.
164 * malloc/arena.c (HEAP_MAX_SIZE): Define using
165 DEFAULT_MMAP_THRESHOLD_MAX if it is defined.
167 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
170 * Makerules (depfiles): Handle extra-test-objs the same as
172 (common-mostlyclean): Likewise.
173 * dlfcn/Makefile (extra-objs): Add modules to extra-test-objs
175 * elf/Makefile (extra-objs): Likewise.
176 * stdlib/Makefile (extra-objs): Likewise.
178 2006-08-14 Eric Blake <ebb9@byu.net>
181 * misc/error.h: Assume C89 or better.
182 * misc/error.c: Likewise.
184 2006-08-21 Ulrich Drepper <drepper@redhat.com>
187 * sysdeps/unix/sysv/linux/openat.c: Fix compilation if
188 __ASSUME_ATFCTS is defined.
190 2006-08-19 Ulrich Drepper <drepper@redhat.com>
192 * malloc/malloc.c (_int_malloc): Limit number of unsorted blocks
193 to sort in each call.
195 * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map
196 is empty simply return and use next service.
197 * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise.
199 * locale/programs/charmap.c (charmap_read): Add new parameter. It
200 tells us when not finding a charmap file is an error.
201 * locale/programs/charmap.h: Adjust charmap_read prototype.
202 * iconv/iconv_prog.c (main): Tell charmap_read it's no error if we
203 cannot find a charmap.
204 * locale/programs/localedef.c (main): Adjust charmap_read call.
206 2006-08-15 Jakub Jelinek <jakub@redhat.com>
208 * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use
209 sysdeps/posix/pause.c implementation instead.
211 2006-08-09 Jakub Jelinek <jakub@redhat.com>
213 * sysdeps/unix/nice.c (nice): Transform EACCES errno from setpriority
216 2006-08-13 Andreas Schwab <schwab@suse.de>
218 * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve):
219 Don't clobber caller's LRSAVE.
220 (_dl_prof_resolve): Likewise.
222 2006-08-14 Ulrich Drepper <drepper@redhat.com>
225 * libio/memstream.c (open_memstream): Allocate initial buffer with
227 * libio/wmemstream.c (open_wmemstream): Likewise.
228 * libio/strops.c: Pretty printing.
229 (_IO_str_overflow): Clear uninitialized part of the new buffer.
230 (enlarge_userbuf): New function.
231 (_IO_str_seekoff): Call it if seek position is larger than current
233 * libio/wstrops.c: Likewise.
234 * libio/vasprintf.c: Add comment as to why we do not have to use
235 calloc instead of malloc to allocate initial buffer.
236 * libio/Makefile (tests): Add bug-memstream1 and bug-wmemstream1.
237 * libio/bug-memstream1.c: New file.
238 * libio/bug-wmemstream1.c: New file.
240 2006-08-13 Ulrich Drepper <drepper@redhat.com>
242 * libio/wstrops.c: Remove dead macro definitions and comments.
243 * libio/strops.c: Likewise.
246 * login/utmpname.c (__utmpname): Remove unnecessary test.
248 2006-06-08 Joseph Myers <jsm28@gcc.gnu.org>
251 * math/gen-libm-test.pl (clean_up_number): Do not remove trailing
254 2006-08-13 Ulrich Drepper <drepper@redhat.com>
257 * sysdeps/unix/sysv/linux/clock_settime.c: Add code to use syscall
259 * sysdeps/unix/clock_settime.c: Add support for platform-specific
260 setting of CPU clocks.
262 2006-06-23 Paul Eggert <eggert@cs.ucla.edu>
265 * sysdeps/generic/stdint.h (UINT8_C, UINT16_C): Don't append 'U',
266 since C99 requires the result to promote to 'int' when uint_least8_t
267 and uint_least16_t promote to 'int'.
269 2006-08-12 Ulrich Drepper <drepper@redhat.com>
272 * locale/programs/ld-ctype.c (ctype_output): Adjust alignments, fix
273 lenght of one output field, correct bitmask creation.
274 * locale/programs/ld-time.c: Add alignment.
277 * misc/error.c: Add space between program name and message if file
280 2006-08-03 Eric Blake <ebb9@byu.net>
283 * misc/error.c (error_tail) [_LIBC]: Avoid invalid free.
285 2006-08-09 Ulrich Drepper <drepper@redhat.com>
287 * malloc/memusagestat.c: Silence warnings.
289 * malloc/malloc.c: Dynamically size mmap treshold if the program
291 Patch by Valerie Henson and Arjan van de Ven.
293 2006-08-08 Jakub Jelinek <jakub@redhat.com>
295 * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (O_DIRECT): Protect with
298 * stdlib/strtol_l.c (__strtol_ul_max_tab, __strtol_ul_rem_tab,
299 __strtol_ull_max_tab, __strtol_ull_rem_tab): Declare.
300 (DEF): Don't put the var into .gnu.linkonce.r.* section.
301 Only provide var definitions in strtol_l (or for *ull*
304 * stdio-common/bug16.c (tests): New array.
305 (do_tests): Allow the first hexadecimal digit
306 to be 1, 2, 4 or 8. Do 3 additional tests.
308 * sysdeps/s390/fpu/libm-test-ulps: Update.
310 * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c (fchownat): Use
311 fchownat syscall if available.
312 * sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Likewise.
313 * sysdeps/unix/sysv/linux/sh/fchownat.c (fchownat): Likewise.
314 * sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Likewise.
316 2006-08-07 Ulrich Drepper <drepper@redhat.com>
318 * nis/nis_xdr.c: Avoid some function calls.
320 2006-08-07 Jakub Jelinek <jakub@redhat.com>
321 Ulrich Drepper <drepper@redhat.com>
323 * nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take
324 short cut if only one name component is stripped away.
326 2006-08-07 Ulrich Drepper <drepper@redhat.com>
328 * nis/nis_call.c: Minor cleanups throughout.
329 (rec_dirsearch) [case HIGHER_NAME]: Correctly size ndomain array.
330 (first_shoot): Add search_parent_first parameter. Only if it is set
331 search parent server first.
332 If directory for table found through cold start cache is not the same
333 as referenced in the cache, don't use it.
334 (__nisfind_server): Take additional parameter. Pass it on to
336 (__prepare_niscall): Adjust __nisfind_server call.
337 * nis/rpcsvc/nislib.h: Adjust __nisfind_server prototype.
338 * nis/nis_table.c: Adjust __nisfind_server call.
339 * nis/nis_lookup.c: Likewise.
340 (nis_lookup): Don't loop endlessly if name is reduced to ".".
342 2006-08-03 Ulrich Drepper <drepper@redhat.com>
345 * math/s_cacosh.c: Return values from positive branch.
346 * math/s_cacoshf.c: Likewise.
347 * math/s_cacoshl.c: Likewise.
350 * sysvipc/sys/msg.h: Change return value to ssize_t.
351 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
352 * sysvipc/msgrcv.c: Likewise.
353 * include/sys/msg.h: Likewise.
355 * grp/initgroups.c (internal_getgrouplist): Remove unnecessary
356 test introduced in patch for bz #661.
357 (getgrouplist): Simplify code a bit. Don't allocate one additional
358 element for NEWGROUPS.
361 * stdio-common/printf_fphex.c (__printf_fphex): When rounding up
362 'f', use '1' as leading digit not '\1'.
363 * stdio-common/Makefile (tests): Add bug16.
364 * stdio-common/bug16.c: New file.
367 * sysdeps/unix/sysv/linux/gethostid.c: Don't define OLD_HOSTIDFILE
368 and don't try to open it. The patch introducing the macro
369 contained a bug and used the same file name as the new file
370 instead of using /var/adm/hostid. Nobody complaint so I'm taking
374 * assert/assert.h: Move cast to void inside ?: to quiet gcc.
375 Patch by Jerry James <Jerry.James@usu.edu>.
377 * rt/Makefile (tests): Add tst-clock2.
378 * rt/tst-clock2.c: New file.
381 * resolv/gai_notify.c (__gai_notify_only): Copy memory for thread
382 function and its parameters and pass it to new thread.
383 (__gai_notify): Add support for alternative waiting for completion.
384 * resolv/gai_suspend.c (gai_suspend): Add support for alternative
385 waiting for completion.
386 * resolv/getaddrinfo_a.c: Likewise.
387 * resolv/gai_misc.h (struct waitlist): Don't add cond if alternative
388 waiting for completion is used.
389 * resolv/gai_misc.c: Allow overwriting code to start helper thread.
390 * resolv/gai_cancel.c: Include <gai_misc.h> not "gai_misc.h".
391 * resolv/gai_error.c: Likewise.
392 * resolv/gai_sigqueue.c: Likewise.
394 2006-08-02 Thomas Schwinge <tschwinge@gnu.org>
396 * hurd/getdport.c (__getdport): Don't return EBADF; instead set
397 errno to EBADF and return MACH_PORT_NULL.
399 2006-06-23 Joseph Myers <joseph@codesourcery.com>
402 * posix/Makefile (CFLAGS-waitid.c): Add -fasynchronous-unwind-tables.
404 2006-08-02 Ulrich Drepper <drepper@redhat.com>
406 * elf/dl-addr.c (_dl_addr): If GNU-style hash tables are present,
407 walk them instead of the symbol table.
409 2006-08-01 Ulrich Drepper <drepper@redhat.com>
412 * nscd/initgrcache.c (addinitgroupsX): Judge successful lookups by
413 status of NSS calls, not the number of returned entries.
415 * sysdeps/unix/sysv/linux/syscalls.list: Remove add_key,
418 2006-07-31 Ulrich Drepper <drepper@redhat.com>
420 * sysdeps/unix/sysv/linux/dl-osinfo.h: Remove unnecessary include.
422 2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
424 * elf/tst-auditmod1.c: Fix typo in #error.
426 2006-07-31 Ulrich Drepper <drepper@redhat.com>
428 * elf/tst-auditmod1.c: Remove code for unsupported architectures.
430 * iconvdata/run-iconv-test.sh: Run cmp in C locale.
432 2006-07-20 Adam Nemet <anemet@caviumnetworks.com>
434 * stdlib/test-canon.c (do_test): Close fd before unlinking file so
435 that the directory is empty even on non-POSIX filesystems.
437 2006-07-31 Ulrich Drepper <drepper@redhat.com>
439 * elf/dl-open.c (dl_open_worker): Add branch prediction.
441 * nis/nss_compat/compat-grp.c: Avoid unnecessary setgrent calls into
442 the backend NSS module. If backend setgrent call failed, don't have
443 internal_setgrent fail. Just remember this until it is needed.
444 * nis/nss_compat/compat-pwd.c: Likewise.
445 * nis/nss_compat/compat-spwd.c: Likewise.
447 2006-07-30 Roland McGrath <roland@redhat.com>
449 * sysdeps/unix/sysv/linux/ia64/sigsuspend.c: File removed.
450 * sysdeps/unix/sysv/linux/x86_64/sigsuspend.c: File removed.
451 * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c: File removed.
452 * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: File removed.
454 * sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): New macro.
455 (nanosleep_not_cancel): New macro.
456 (sigsuspend_not_cancel): new macro.
457 * sysdeps/unix/sysv/linux/sigsuspend.c [__ASSUME_REALTIME_SIGNALS]
458 (do_sigsuspend): Define as inline.
459 (__sigsuspend): Always use do_sigsuspend.
460 [! NO_CANCELLATION] (__sigsuspend_nocancel): New function.
461 * include/signal.h: Declare __sigsuspend_nocancel.
462 * sysdeps/posix/pause.c
463 [! NO_CANCELLATION] (__pause_nocancel): New function.
465 * include/unistd.h (__pause_nocancel): Add attribute_hidden.
466 * include/time.h (__nanosleep_nocancel): Likewise.
468 2006-07-30 Ulrich Drepper <drepper@redhat.com>
470 * locale/programs/localedef.c (add_to_readlist): Rename local
471 variables to avoid confusion.
473 * locale/programs/charmap.c (charmap_read): Emit error message if
474 charmap couldn't be found or read.
476 2006-07-28 Ulrich Drepper <drepper@redhat.com>
478 * sysdeps/unix/sysv/linux/kernel-features.h: Define
479 __ASSUME_FUTEX_LOCK_PI.
480 * include/time.h: Declare __nanosleep_nocancel.
481 * include/unistd.h: Declare __pause_nocancel.
483 * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Use this instead of
484 LDFLAGS. Add -lgcc_eh and libc_nonshared (again) to make sure we
485 get the __stack_chk_fail_local definition when it's needed.
487 2006-07-26 Ulrich Drepper <drepper@redhat.com>
489 * dlfcn/Makefile: Add rules to build and run bug-atexit3.
490 * dlfcn/bug-atexit3.c: New file.
491 * dlfcn/bug-atexit3-lib.cc: New file.
493 * dlfcn/dlmopen.c (dlmopen_doit): Don't allow RTLD_GLOBAL to be
494 used when the namespace is not the base namespace.
496 2006-07-26 Gavin Romig-Koch <gavin@redhat.com>
498 * stdlib/cxa_atexit.c (__new_exitfn_called): New variable.
499 (__new_exitfn): Bump it in every successful call.
500 * stdlib/cxa_finalize.c (__cxa_finalize): If destructor registered
501 more exit handlers, call them right away.
502 * stdlib/exit.h: Declare __new_exitfn_called.
504 2006-07-25 Ulrich Drepper <drepper@redhat.com>
506 * stdlib/cxa_finalize.c (__cxa_finalize): Fix race condition when
507 calling registered handler.
509 * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Fix comment.
510 * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
511 * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
512 * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
513 * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
514 * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
515 * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
516 * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
518 2006-07-10 Ulrich Drepper <drepper@redhat.com>
520 * elf/dl-lookup.c (dl_new_hash): New functions.
521 (_dl_lookup_symbol_x): Rename hash to old_hash and don't compute
522 value here. Compute new-style hash value. Pass new hash value
523 and reference to variable with the old value to do_lookup_x.
524 (_dl_setup_hash): If DT_GNU_HASH is defined, use it and not
525 old-style hash table.
526 (_dl_debug_bindings): Pass new hash value and reference to variable
527 with the old value to do_lookup_x.
528 * elf/do-lookup.h (do_lookup_x): Accept additional parameter with
529 new-style hash value and change old-style hash value parameter to
530 be a reference. Reoganize functions to determine whether
531 new-style hash table is available. Only fall back on old-style
532 table. If old-style hash value is needed, compute it here.
533 * elf/dynamic-link.h (elf_get_dynamic_info): Relocate DT_GNU_HASH
535 * elf/elf.h: Define SHT_GNU_HASH, DT_GNU_HASH, DT_TLSDEC_PLT,
536 DT_TLSDEC_GOT. Adjust DT_ADDRNUM.
537 * include/link.h (struct link_map): Add l_gnu_bitmask_idxbits,
538 l_gnu_shift, l_gnu_bitmask, l_gnu_buckets and l_gnu_chain_zero.
539 * Makeconfig: If linker supports --hash-style option add it to all
540 linker command lines to build DSOs.
541 * config.make.in: Define have-hash-style.
542 * configure.in: Test whether linker supports --hash-style option.
544 * elf/dl-misc.c (_dl_name_match_p): Make MAP parameter const.
545 * sysdeps/generic/ldsodefs.h: Adjust prototype.
547 2006-06-27 Ulrich Drepper <drepper@redhat.com>
549 * elf/dl-load.c (open_path): Fix test to determine whether DSO is
552 * elf/dl-load.c (_dl_map_object): Try harder to avoid looking at
553 RPATH of main map twice.
555 2006-06-22 Ulrich Drepper <drepper@redhat.com>
557 * intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't
558 look further, return original strings.
559 (_nl_find_msg): Do not return found translation if the conversion
560 failed. Either signal the string is unusable or that something went
561 wrong and the original should be used.
563 2006-06-21 Ulrich Drepper <drepper@redhat.com>
565 * string/_strerror.c (__strerror_r): Add __builtin_expect.
567 2006-06-14 Jakub Jelinek <jakub@redhat.com>
570 * misc/insremque.c (insque): Handle prev == NULL.
571 * misc/Makefile (tests): Add tst-insremque.
572 * misc/tst-insremque.c: New test.
574 2006-06-17 Ulrich Drepper <drepper@redhat.com>
577 * elf/dl-deps.c (expand_dst): Rename __cnt variable to not
578 conflict with DL_DST_REQUIRED.
580 2006-06-16 Ulrich Drepper <drepper@redhat.com>
582 * nis/nis_subr.c (nis_getnames): Fix the implementation to better
583 match what Solaris does.
585 2006-06-04 Ulrich Drepper <drepper@redhat.com>
587 * sysdeps/posix/spawni.c (__spawni): Use local_seteuid and
588 local_setegid instead of seteuid and setegid.
589 * sysdeps/generic/local-setxid.h: New file.
590 * sysdeps/unix/sysv/linux/local-setxid.h: New file.
592 * sysdeps/posix/spawni.c (__spawni): Use non-cancelable interfaces.
594 * string/Makefile (tests): Add bug-envz1.
595 * string/bug-envz1.c: New file.
597 2006-06-02 Jakub Jelinek <jakub@redhat.com>
599 * posix/regex_internal.c (re_string_skip_chars): If no character has
600 been converted at all, set *last_wc to WEOF. If mbrtowc failed, set wc
601 to the byte which couldn't be converted.
602 (re_string_reconstruct): Don't clear valid_raw_len before calling
603 re_string_skip_chars. If wc is WEOF after re_string_skip_chars, set
604 tip_context using re_string_context_at.
605 * posix/Makefile: Add rules to build and run bug-regex25 test.
606 * posix/bug-regex25.c: New test.
608 2006-06-02 Ryan S. Arnold <rsa@us.ibm.com>
611 * string/envz.c (envz_strip): Correct erroneously reversed src
612 and dest parameters to memmove() invocation.
614 2006-05-30 Jakub Jelinek <jakub@redhat.com>
616 * nscd/nscd.h (prune_cache): Add fd argument to prototype.
617 * nscd/nscd.c (parse_opt): Read response from INVALIDATE request
618 to make sure the database has been already invalidated.
619 * nscd/cache.c (prune_cache): Add fd argument. Write response to fd
620 after the cache has been invalidated. Use pthread_mutex_lock rather
621 than pthread_mutex_trylock if fd != -1.
622 * nscd/connections.c (invalidate_cache): Add fd argument, write
623 response to fd if not calling prune_cache, pass fd to prune_cache.
624 (handle_request): Adjust invalidate_cache caller.
625 (nscd_run): Pass -1 as fd to prune_cache.
627 2006-05-30 Ulrich Drepper <drepper@redhat.com>
629 * sysdeps/posix/getaddrinfo.c (gaiconf_init): Initialize bits in
632 2006-05-29 Ulrich Drepper <drepper@redhat.com>
634 * nscd/nscd.h (struct database_dyn): Add prunelock field.
635 * nscd/cache.c (prune_cache): Take prunelock before starting the
636 work. Just return in case it is already taken.
637 * nscd/connections.c (dbs): Initialize .prunelock.
639 2006-05-25 Ulrich Drepper <drepper@redhat.com>
641 * nis/nis_removemember.c (nis_removemember): Avoid unnecessary
642 copying. No need to allocate new array for group members. Just
643 move the pointers and update the size.
645 * nis/nis_addmember.c (nis_addmember): Avoid unnecessary copying.
646 Avoid memory leak in case realloc fails. Simplification for
647 better code generation.
649 Avoid deprecation warning because of libc_hidden_proto for
651 * inet/inet6_option.c (option_alloc): Renamed from
652 inet6_option_alloc. Made static.
653 (inet6_option_alloc): Now a simple wrapper around option_alloc.
654 (inet6_option_append): Call option_alloc.
655 * include/netinet/in.h: Remove libc_hidden_proto for
658 * nis/nis_callback.c (__nis_create_callback): Always call xdr_free
659 for cleanup when cb!=NULL [Coverity CID 233].
661 2006-05-24 Ulrich Drepper <drepper@redhat.com>
664 * inet/Makefile (routines): Add inet6_opt and inet6_rth.
665 * inet/Versions (libc, GLIBC_2.5): Add inet6_opt_init,
666 inet6_opt_append, inet6_opt_finish, inet6_opt_set_val, inet6_opt_next,
667 inet6_opt_find, inet6_opt_get_val, inet6_rth_space, inet6_rth_init,
668 inet6_rth_add, inet6_rth_reverse, inet6_rth_segments,
669 and inet6_rth_getaddr.
670 * inet/netinet/ip6.h (struct ip6_rthdr0): Make ip6r0_addr a flexible
672 * inet/netinet/in.h (struct ip6_mtuinfo): Define.
673 Mark inet6_option_* interfaces as deprecated.
674 Declare inet6_opt_init, inet6_opt_append, inet6_opt_finish,
675 inet6_opt_set_val, inet6_opt_next, inet6_opt_find, inet6_opt_get_val,
676 inet6_rth_space, inet6_rth_init, inet6_rth_add, inet6_rth_reverse,
677 inet6_rth_segments, and inet6_rth_getaddr.
678 * inet/inet6_opt.c: New file.
679 * inet/inet6_rth.c: New file.
681 * inet/netinet/icmp6.h: Pretty printing.
684 * elf/dl-addr.c (_dl_addr): Don't match undefined references.
686 2006-05-23 Ulrich Drepper <drepper@redhat.com>
688 * nis/nis_lookup.c (nis_lookup): Use __prepare_niscall instead of
689 doing it all here. When server does not know the answer do not
690 fail immediate, try parent first.
692 * nis/nis_domain_of_r.c (nis_domain_of_r): Add missing buffer
695 2006-05-20 Ulrich Drepper <drepper@redhat.com>
697 * nis/nis_call.c (__prepare_niscall): New function. Split out
699 * nis/nis_table.c (__create_ib_request): Renamed from create_ib_request
701 (__follow_path): New function. Split out from nis_list.
702 * nis/nis_xdr.h: Add libnsl_hidden_proto for _xdr_ib_request and
704 * nis/nis_xdr.c: Add libnsl_hidden_def for _xdr_ib_request and
706 * nis/libnsl.h: Declare __prepare_niscall, __create_ib_request,
708 * nis/Versions: Export __prepare_niscall, __create_ib_request,
709 __follow_path, __do_niscall3, _xdr_ib_request, and _xdr_nis_result
710 from libnsl for version GLIBC_PRIVATE.
711 * nis/nisplus-parser.h: Remove _nss_nisplus_parse_pwent_chk.
712 Remove entry parameter from _nss_nisplus_parse_pwent and
713 _nss_nisplus_parse_grent.
714 * nis/nss_nisplus/nisplus-parser.c: Likewise.
715 * nis/nss_nisplus/nisplus-pwd.c: Remove support for SETENT_BATCH_READ
716 again. Rewrite getpwent handling to not use nis_first_entry and
717 nis_next_entry. Roll out own niscall handling.
718 * nis/nss_nisplus/nisplus-grp.c: Likewise.
720 * sunrpc/xdr_rec.c: Fix typo in comment.
722 2006-05-19 Ulrich Drepper <drepper@redhat.com>
724 * nis/nis_call.c (__do_niscall3): Avoid code duplication in error
727 * nis/nis_callback.c (internal_nis_do_callback): Don't use malloc
728 to allocate memory for my_pollfd. Better initialization of
729 cb_is_running. Use TEMP_FAILURE_RETRY.
731 * malloc/memusage.sh (memusageso): Add quotes.
732 (memusagestat): Likewise.
733 * debug/xtrace.sh (pcprofileso): Likewise.
734 (pcprofiledump): Likewise.
735 * debug/Makefile ($(objpfx)xtrace): Use $LIB in SLIBDIR
737 * malloc/Makefile ($(objpfx)memusage): Likewise.
739 * nis/nis_callback.c (__nis_create_callback): Calls to
740 svcudp_bufcreate and svctcp_create can fail. Free ->xprt if
743 * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_sendreq): Make sure
744 no uninitialized memory is passed to sendto.
746 2006-05-18 Ulrich Drepper <drepper@redhat.com>
748 * nis/nis_callback.c (__nis_create_callback): Use asprinf instead
749 of snprintf+strdup. Handle OOM.
750 * nis/nis_callback.c (__nis_create_callback): Allocate cb and
751 cb->serv together. Remove now obsolete free calls.
752 (__nis_destroy_callback): Remove now obsolete free call.
754 2006-05-18 David Woodhouse <dwmw2@redhat.com>
756 * sysdeps/posix/getaddrinfo.c: Add unique labels to the default
757 RFC3484 precedence table for fec0::/10 and fc00::/7 (site-local
758 and ULA respectively). Set precedence for IPv4 address to 10 as
759 defined in RFC3484 for preferring IPv6.
760 * posix/gai.conf: Update to match the new default tables.
762 2006-05-18 Jakub Jelinek <jakub@redhat.com>
764 * nis/nss_compat/compat-pwd.c (internal_setpwent): If nss_set*ent
765 returned NSS_STATUS_UNAVAIL, still return NSS_STATUS_SUCCESS.
766 * nis/nss_compat/compat-spwd.c (internal_setspent): Likewise.
767 * nis/nss_compat/compat-grp.c (internal_setgrent): Likewise.
769 * nis/nss_compat/compat-initgroups.c (nss_setgrent, nss_endgrent):
771 (init_nss_interface): Remove initialization of these variables.
773 2006-05-18 Ulrich Drepper <drepper@redhat.com>
775 * nis/nis_call.c (rec_dirsearch): Little optimization: pull
776 nis_free_directory forward to avoid duplication.
778 2006-05-17 Ulrich Drepper <drepper@redhat.com>
780 * nis/nis_call.c (rec_dirsearch): Handle __nis_finddirectory and
781 rec_dirsearch returning NULL.
782 (first_shoot): Handle __nis_finddirectory returning NULL.
783 (__nisfind_server): Fix leak when rec_dirsearch returns NULL.
785 * sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOSE, IN_MOVE,
786 IN_ONLYDIR, IN_DONT_FOLLOW, and IN_MASK_ADD.
788 2006-05-17 Jakub Jelinek <jakub@redhat.com>
790 * sunrpc/key_call.c (getkeyserv_handle): Call auth_destroy if
793 2006-05-15 Ulrich Drepper <drepper@redhat.com>
795 * include/rpc/pmap_prot.h: Mark all functions as hidden.
797 * nscd/nscd_initgroups.c: Mark __gr_map_handle as hidden.
798 * nscd/nscd_getgr_r.c: Likewise.
800 * include/rpc/pmap_rmt.h: Mark all functions as hidden.
802 * nscd/nscd_getai.c (__hst_map_handle): Mark as hidden.
803 * nscd/nscd_gethst_r.c (__hst_map_handle): Likewise.
805 * stdlib/longlong.h (__clz_tab): Mark as hidden.
807 * iconv/gconv_int.h: Mark __gconv_lock as hidden.
809 * include/rpc/key_prot.h: Mark all _internal functions as hidden.
811 * include/rpc/auth.h: Mark xdr_des_block_internal and
812 xdr_opaque_auth_internal as hidden.
814 * sysdeps/unix/sysv/linux/getdents.c: Mark __have_no_getdents64 as
817 * include/rpc/xdr.h: Mark all _internal functions as hidden.
819 * misc/getusershell.c (okshells): Don't use static initializers,
822 * stdlib/fmtmsg.c (keywords): Change type of len element to
823 uint32_t to not waste space on 64bit machines.
825 * locale/setlocale.c: Change _nl_category_names into a string.
826 Add new _nl_category_name_idxs. Change all users.
827 * locale/localeinfo.h: Adjust declaration of _nl_category_names.
828 Declare _nl_category_name_idxs.
829 * locale/findlocale.c: Adjust for _nl_category_names change.
830 * locale/loadlocale.c: Likewise.
831 * locale/newlocale.c: Likewise.
832 * intl/dcigettext.c: Likewise.
834 * iconv/gconv_conf.c (add_alias): Move actual alias handling to...
835 (add_alias2): ...here. New function.
836 (__gconv_read_conf): Simplify builtin alias handling.
837 (builtin_aliases): Convert to string to avoid relocations.
838 * iconv/gconv_builtin.h: Add comment about correct formatting.
840 2006-05-15 Jakub Jelinek <jakub@redhat.com>
842 * resolv/res_debug.c (loc_ntoa): Make error const.
844 2006-05-14 Andreas Schwab <schwab@suse.de>
846 * math/complex.h [__LDBL_COMPAT]: Use __REDIRECT_NTH.
848 2006-05-12 Jakub Jelinek <jakub@redhat.com>
850 * sysdeps/unix/sysv/linux/sched_getaffinity.c: Include sys/param.h.
851 (__sched_getaffinity_new): Don't crash if cpusetsize is smaller than
854 2006-05-11 Ulrich Drepper <drepper@redhat.com>
856 * resolv/res_debug.c (loc_ntoa): Define error as array, not pointer.
858 * include/arpa/nameser.h: Declare _ns_flagdata as hidden.
860 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_master.
861 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_master.
863 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypbind_resp.
864 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypbind_resp.
866 * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_cback_data.
867 * include/rpcsvc/nis_callback.h: Add libnsl_hidden_proto for
870 * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypupdate_args.
871 * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for
874 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_order.
875 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_order.
877 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_maplist.
878 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_maplist.
880 * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_obj_p.
881 * include/rpcsvc/nis_callback.h: New file.
883 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_val.
884 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_val.
886 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey.
887 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey.
889 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypmaplist.
890 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypmaplist.
892 * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey.
893 * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey.
895 * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypdelete_args.
896 * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for
899 * nis/nis_xdr.h: Mark all functions as hidden. Remove
900 __BEGIN_DECLS and __END_DECLS, the header is not installed.
902 * nis/nis_error.c: Remove table of strings. Use position
903 independent mechanism.
904 * nis/nis_error.h: New file.
906 2006-05-11 Jakub Jelinek <jakub@redhat.com>
908 * locale/programs/ld-time.c (time_finish): If wide era name or
909 format aren't provided, set both wname and wformat to L"".
911 2006-05-10 Ulrich Drepper <drepper@redhat.com>
913 * sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Only store
914 results if the call was succesful.
916 * nis/nss-nis.h: Mark __yperr2nss_tab and __yperr2nss_count as hidden.
918 * nis/nss-nisplus.h: Mark __niserr2nss_tab and __niserr2nss_count
921 2006-05-10 Jakub Jelinek <jakub@redhat.com>
923 * misc/sys/queue.h: Remove uses of all QUEUEDEBUG_* macros.
925 2006-05-10 Ulrich Drepper <drepper@redhat.com>
927 * posix/wordexp.c (parse_glob): No need to check ifs for NULL, the
928 caller makes sure this is not the case.
929 (wordexp): Simplify ifs_white creation. [Coverity CID 231]
931 2006-05-09 Ulrich Drepper <drepper@redhat.com>
933 * posix/wordexp.c: Remove numerous NULL pointer tests before FREE
936 * io/ftw.c (open_dir_stream): Return right away if REALLOC fails.
937 [Coverity CID 229, 230]
939 * argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and
941 (hol_help): Likewise. [Coverity CID 226, 227]
943 * string/argz-replace.c (__argz_replace): Unconditionally call
944 free on SRC. [Coverity CID 225]
946 * nis/nis_creategroup.c (nis_creategroup): No need to duplicate
947 the return value of __nis_default_owner and __nis_default_group,
948 it has been especially allocated. [Coverity CID 224]
950 * nis/nis_defaults.c (searchXYX): New functions. Used by both
951 searchgroup and searchowner. Significantly simplified.
952 (__nis_default_owner): Remove duplication. Do not locally copy the
953 string before duplicating it.
954 (__nis_default_group): Likewise.
956 * nis/nis_lookup.c (nis_lookup): After calling nis_free_directory,
957 we must clear the variable before calling __nisfind_server.
959 * nis/nis_lookup.c (nis_lookup): Always free memory allocated with
960 nis_getnames. [Coverity CID 223]
962 * locale/programs/locfile.c (locfile_read): Use alloca instead of
963 xmalloc to allocate local repertoire name. [Coverity CID 222]
965 * iconv/iconv_charmap.c (use_to_charmap): No need to dynamically
966 allocate memory for the input to add_bytes. [Coverity CID 221]
968 * posix/wordexp.c (w_addword): Free word if realloc fails and it
969 was allocated here. [Coverity CID 219, 220]
971 * posix/getconf.c (print_all): Free confstr data after printing.
974 * sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if
975 list allocation fails. [Coverity CID 215]
977 * nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition.
980 * argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if
981 string is NULL. [Coverity CID 212]
982 * argp/Makefile: Add rules to build and run bug-argp1.
983 * argp/bug-argp1.c: New file.
985 * io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find
987 * stdlib/canonicalize.c (__realpath): Likewise.
989 * locale/programs/ld-time.c (time_finish): Don't dereference NULL
990 pointer. [Coverity CID 206]
992 * elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map
993 in statically linked code.
994 * elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in
995 statically built code, be prepared to have no link map.
998 * argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in
999 dgettext calls. [Coverity CID 204]
1001 * argp/argp-help.c (struct uparams): Remove valid member. Change
1003 (uparam_names): Reduce size. Avoid relative relocations.
1004 Moved to read-only segment.
1005 (fill_in_uparams): Update for new layout.
1007 * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be
1008 assumed to always be != NULL. [Coverity CID 202]
1010 * argp/argp-help.c (hol_entry_help): Remove some dead code
1013 * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize
1014 away a few more unconditional yperr2nss calls.
1015 (_nss_nis_getservbyname_r): Likewise.
1017 2006-05-06 Ulrich Drepper <drepper@redhat.com>
1019 * sysdeps/generic/ldsodefs.h: Remove support for non-core
1022 * sysdeps/unix/sysv/linux/check_pf.c (make_request): Make sure
1023 that unused memory passed to sendto is nevertheless initialized.
1026 * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Avoid
1027 possibly unaligned memory accesses.
1029 * include/arpa/nameser.h: Also optimize NS_PUT16 and NS_PUT32.
1030 * resolv/res_mkquery.c: Use NS_PUT16 and NS_PUT32 instead of __putshort
1031 and __putlong respectively. Correct buffer overflow check for
1034 * resolv/res_send.c (send_vc): Use ns_put16 instead of putshort.
1036 * resolv/res_send.c (res_queriesmatch): Fix typo in comment.
1037 (send_dg): Rewrite error handling to be more compact and avoid
1038 double recomputation of timeouts. Pass MSG_NOSIGNAL to send.
1040 * include/arpa/nameser.h: Add optimizations for NS_GET16 and NS_GET32.
1042 * resolv/res_send.c (res_nameinquery): Use NS_GET16 directly
1043 instead of ns_get16.
1044 (res_queriesmatch): Likewise. Minor optimization.
1047 * resolv/res_query.c (__libc_res_nquery): If answerp != NULL,
1048 __libc_res_nsend might reallocate the buffer for the answer. In
1049 this case we have to reload the HP pointer.
1051 2006-05-05 Ulrich Drepper <drepper@redhat.com>
1053 * stdio-common/vfscanf.c (memory_error): Remove definition. Add
1054 some branch prediction hints.
1056 * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Define SPLICE_F_*.
1057 * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
1058 * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
1059 * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
1060 * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
1062 * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
1063 * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
1065 2006-05-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
1067 * sysdeps/s390/s390-32/elf/start.S: Replace pc relative relocation
1068 by a GOT relocation to make Scrt1.o position independent.
1069 * sysdeps/s390/s390-64/elf/start.S: Likewise.
1071 * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Add support for
1072 six system call parameters.
1073 * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise.
1075 2006-05-05 Ulrich Drepper <drepper@redhat.com>
1077 * sunrpc/svcauth_des.c (cache_init): Use calloc instead of
1080 * sunrpc/svc_udp.c (BZERO): Remove definition.
1082 (svc_enablecache): Use CALLOC instead of ALLOC&BZERO.
1084 * sunrpc/des_impl.c: Remove ALT_ECB support. We never used it.
1085 (des_SPtrans): Use uint32_t type.
1086 (des_skb): Likewise.
1088 * sunrpc/xdr_ref.c (xdr_reference): Use calloc instead of malloc&bzero.
1090 2006-05-05 Jakub Jelinek <jakub@redhat.com>
1093 * stdio-common/tst-printf.sh: Adjust for tst-printf.c change even
1096 2006-05-05 Ulrich Drepper <drepper@redhat.com>
1098 * locale/programs/ld-address.c (address_finish): Fix one more
1099 place where the iso639 array might be accessed beyond the limits.
1101 2006-05-04 Ulrich Drepper <drepper@redhat.com>
1103 * nis/nis_table.c (nis_list): Avoid clearing res twice before
1104 filling it for the first time.
1106 * nis/nis_table.c (get_tablepath): Renamed from __get_tablepath.
1108 Free res object content before returning.
1110 * sunrpc/xdr_array.c (xdr_array): Use calloc instead of malloc&bzero.
1112 * sunrpc/key_call.c (__rpc_thread_key_cleanup): Also free
1115 * sunrpc/rpc_thread.c (__rpc_thread_destroy): Don't skip entire
1116 cleanup for initial thread, just the free call on TVP.
1118 * nscd/gai.c (__getline): Define.
1121 See ChangeLog.16 for earlier changes.