diff -uprN glibc-2.4/argp/argp.h glibc-2.5/argp/argp.h --- glibc-2.4/argp/argp.h 2005-10-14 05:53:47.000000000 +0000 +++ glibc-2.5/argp/argp.h 2006-04-22 15:08:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt. - Copyright (C) 1995-1999,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995-1999,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -24,6 +24,7 @@ #include #include #include +#include #define __need_error_t #include @@ -574,7 +575,7 @@ __NTH (__option_is_short (__const struct else { int __key = __opt->key; - return __key > 0 && isprint (__key); + return __key > 0 && __key <= UCHAR_MAX && isprint (__key); } } diff -uprN glibc-2.4/argp/argp-help.c glibc-2.5/argp/argp-help.c --- glibc-2.4/argp/argp-help.c 2005-08-09 01:26:22.000000000 +0000 +++ glibc-2.5/argp/argp-help.c 2006-05-10 06:28:06.000000000 +0000 @@ -1,5 +1,5 @@ /* Hierarchial argument parsing help output - Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -128,40 +128,37 @@ struct uparams int header_col; int usage_indent; int rmargin; - - int valid; /* True when the values in here are valid. */ }; /* This is a global variable, as user options are only ever read once. */ static struct uparams uparams = { DUP_ARGS, DUP_ARGS_NOTE, SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL, - USAGE_INDENT, RMARGIN, - 0 + USAGE_INDENT, RMARGIN }; /* A particular uparam, and what the user name is. */ struct uparam_name { - const char *name; /* User name. */ - int is_bool; /* Whether it's `boolean'. */ - size_t uparams_offs; /* Location of the (int) field in UPARAMS. */ + const char name[14]; /* User name. */ + bool is_bool; /* Whether it's `boolean'. */ + uint8_t uparams_offs; /* Location of the (int) field in UPARAMS. */ }; /* The name-field mappings we know about. */ static const struct uparam_name uparam_names[] = { - { "dup-args", 1, offsetof (struct uparams, dup_args) }, - { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) }, - { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) }, - { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) }, - { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) }, - { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) }, - { "header-col", 0, offsetof (struct uparams, header_col) }, - { "usage-indent", 0, offsetof (struct uparams, usage_indent) }, - { "rmargin", 0, offsetof (struct uparams, rmargin) }, - { 0 } + { "dup-args", true, offsetof (struct uparams, dup_args) }, + { "dup-args-note", true, offsetof (struct uparams, dup_args_note) }, + { "short-opt-col", false, offsetof (struct uparams, short_opt_col) }, + { "long-opt-col", false, offsetof (struct uparams, long_opt_col) }, + { "doc-opt-col", false, offsetof (struct uparams, doc_opt_col) }, + { "opt-doc-col", false, offsetof (struct uparams, opt_doc_col) }, + { "header-col", false, offsetof (struct uparams, header_col) }, + { "usage-indent", false, offsetof (struct uparams, usage_indent) }, + { "rmargin", false, offsetof (struct uparams, rmargin) } }; +#define nuparam_names (sizeof (uparam_names) / sizeof (uparam_names[0])) /* Read user options from the environment, and fill in UPARAMS appropiately. */ static void @@ -217,22 +214,27 @@ fill_in_uparams (const struct argp_state SKIPWS (arg); } - for (un = uparam_names; un->name; un++) + un = uparam_names; + size_t u; + for (u = 0; u < nuparam_names; ++un, ++u) if (strlen (un->name) == var_len && strncmp (var, un->name, var_len) == 0) { if (unspec && !un->is_bool) __argp_failure (state, 0, 0, - dgettext (state->root_argp->argp_domain, "\ + dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, + "\ %.*s: ARGP_HELP_FMT parameter requires a value"), (int) var_len, var); else *(int *)((char *)&uparams + un->uparams_offs) = val; break; } - if (! un->name) + if (u == nuparam_names) __argp_failure (state, 0, 0, - dgettext (state->root_argp->argp_domain, "\ + dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, "\ %.*s: Unknown ARGP_HELP_FMT parameter"), (int) var_len, var); @@ -243,7 +245,8 @@ fill_in_uparams (const struct argp_state else if (*var) { __argp_failure (state, 0, 0, - dgettext (state->root_argp->argp_domain, + dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, "Garbage in ARGP_HELP_FMT: %s"), var); break; } @@ -759,9 +762,9 @@ hol_entry_cmp (const struct hol_entry *e const char *long2 = hol_entry_first_long (entry2); if (doc1) - doc1 = canon_doc_option (&long1); + doc1 = long1 != NULL && canon_doc_option (&long1); if (doc2) - doc2 = canon_doc_option (&long2); + doc2 = long2 != NULL && canon_doc_option (&long2); if (doc1 != doc2) /* `documentation' options always follow normal options (or @@ -1102,7 +1105,9 @@ hol_entry_help (struct hol_entry *entry, __argp_fmtstream_putc (stream, '-'); __argp_fmtstream_putc (stream, *so); if (!have_long_opt || uparams.dup_args) - arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream); + arg (real, " %s", "[%s]", + state == NULL ? NULL : state->root_argp->argp_domain, + stream); else if (real->arg) hhstate->suppressed_dup_arg = 1; } @@ -1122,26 +1127,22 @@ hol_entry_help (struct hol_entry *entry, have been done on the original; but documentation options should be pretty rare anyway... */ __argp_fmtstream_puts (stream, - dgettext (state->root_argp->argp_domain, + dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, opt->name)); } } else /* A real long option. */ { - int first_long_opt = 1; - __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col); for (opt = real, num = entry->num; num > 0; opt++, num--) if (opt->name && ovisible (opt)) { comma (uparams.long_opt_col, &pest); __argp_fmtstream_printf (stream, "--%s", opt->name); - if (first_long_opt || uparams.dup_args) - arg (real, "=%s", "[=%s]", state->root_argp->argp_domain, - stream); - else if (real->arg) - hhstate->suppressed_dup_arg = 1; + arg (real, "=%s", "[=%s]", + state == NULL ? NULL : state->root_argp->argp_domain, stream); } } @@ -1160,7 +1161,8 @@ hol_entry_help (struct hol_entry *entry, } else { - const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain, + const char *tstr = real->doc ? dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, real->doc) : 0; const char *fstr = filter_doc (tstr, real->key, entry->argp, state); if (fstr && *fstr) @@ -1208,7 +1210,8 @@ hol_help (struct hol *hol, const struct if (hhstate.suppressed_dup_arg && uparams.dup_args_note) { - const char *tstr = dgettext (state->root_argp->argp_domain, "\ + const char *tstr = dgettext (state == NULL ? NULL + : state->root_argp->argp_domain, "\ Mandatory or optional arguments to long options are also mandatory or \ optional for any corresponding short options."); const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE, @@ -1555,8 +1558,7 @@ _help (const struct argp *argp, const st __flockfile (stream); #endif - if (! uparams.valid) - fill_in_uparams (state); + fill_in_uparams (state); fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0); if (! fs) diff -uprN glibc-2.4/argp/bug-argp1.c glibc-2.5/argp/bug-argp1.c --- glibc-2.4/argp/bug-argp1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/argp/bug-argp1.c 2006-05-09 22:40:17.000000000 +0000 @@ -0,0 +1,26 @@ +#include + + +static const struct argp_option test_options[] = +{ + { NULL, 'a', NULL, OPTION_DOC, NULL }, + { NULL, 'b', NULL, OPTION_DOC, NULL }, + { NULL, 0, NULL, 0, NULL } +}; + +static struct argp test_argp = +{ + test_options +}; + + +static int +do_test (int argc, char *argv[]) +{ + int i; + argp_parse (&test_argp, argc, argv, 0, &i, NULL); + return 0; +} + +#define TEST_FUNCTION do_test (argc, argv) +#include "../test-skeleton.c" diff -uprN glibc-2.4/argp/Makefile glibc-2.5/argp/Makefile --- glibc-2.4/argp/Makefile 2003-09-16 05:46:38.000000000 +0000 +++ glibc-2.5/argp/Makefile 2006-05-09 22:42:24.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1997, 2002, 2003, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -26,10 +26,12 @@ distribute = argp-fmtstream.h argp-namef routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \ pvh xinl eexst) -tests = argp-test tst-argp1 +tests = argp-test tst-argp1 bug-argp1 CFLAGS-argp-help.c = $(uses-callbacks) -fexceptions CFLAGS-argp-parse.c = $(uses-callbacks) CFLAGS-argp-fmtstream.c = -fexceptions +bug-argp1-ARGS = -- --help + include ../Rules diff -uprN glibc-2.4/assert/assert.h glibc-2.5/assert/assert.h --- glibc-2.4/assert/assert.h 2004-10-04 07:45:23.000000000 +0000 +++ glibc-2.5/assert/assert.h 2006-08-03 08:30:09.000000000 +0000 @@ -84,16 +84,18 @@ extern void __assert (const char *__asse __END_DECLS -# define assert(expr) \ - (__ASSERT_VOID_CAST ((expr) ? 0 : \ - (__assert_fail (__STRING(expr), __FILE__, __LINE__, \ - __ASSERT_FUNCTION), 0))) +# define assert(expr) \ + ((expr) \ + ? __ASSERT_VOID_CAST (0) \ + : (__assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION), \ + __ASSERT_VOID_CAST (0))) # ifdef __USE_GNU -# define assert_perror(errnum) \ - (__ASSERT_VOID_CAST (!(errnum) ? 0 : \ - (__assert_perror_fail ((errnum), __FILE__, __LINE__, \ - __ASSERT_FUNCTION), 0))) +# define assert_perror(errnum) \ + (!(errnum) \ + ? __ASSERT_VOID_CAST (0) \ + : (__assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION), \ + __ASSERT_VOID_CAST (0))) # endif /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' diff -uprN glibc-2.4/bits/siginfo.h glibc-2.5/bits/siginfo.h --- glibc-2.4/bits/siginfo.h 2001-07-06 04:55:50.000000000 +0000 +++ glibc-2.5/bits/siginfo.h 2006-04-01 19:18:59.000000000 +0000 @@ -76,7 +76,7 @@ enum { ILL_ILLOPC = 1, /* Illegal opcode. */ # define ILL_ILLOPC ILL_ILLOPC - ILL_ILL_OPN, /* Illegal operand. */ + ILL_ILLOPN, /* Illegal operand. */ # define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, /* Illegal addressing mode. */ # define ILL_ILLADR ILL_ILLADR diff -uprN glibc-2.4/ChangeLog glibc-2.5/ChangeLog --- glibc-2.4/ChangeLog 2006-03-06 10:59:43.000000000 +0000 +++ glibc-2.5/ChangeLog 2006-09-29 18:45:39.000000000 +0000 @@ -1,12365 +1,1378 @@ -2006-03-06 Roland McGrath +2006-09-29 Ulrich Drepper - * version.h (VERSION): 2.4 - * README.template: Update for 2.4. + * version.h (RELEASE): Bump to 2.5. * README: Regenerated. - * manual/install.texi (Configuring and compiling): Separate build - directory is mandatory. Use glibc-2.4 in example. - Update --enable-add-ons description. - (Supported Configurations): Remove section. - * INSTALL: Regenerated. - - * sysdeps/unix/sysv/linux/x86_64/sysconf.c - (handle_intel, handle_amd): Add __attribute__ ((noinline)). - * sysdeps/unix/sysv/linux/i386/sysconf.c - (handle_i486, handle_intel, handle_amd): Likewise. - - * sysdeps/unix/sysv/linux/i386/sysconf.c (__sysconf): Don't handle - _SC_CPUTIME and _SC_THREAD_CPUTIME here. - * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Likewise. - -2006-03-05 Roland McGrath - - * malloc/malloc.c (MALLOC_ALIGNMENT): Revert to (2 * SIZE_SZ) value. - The correct value differs only on powerpc32, and for now changing it - there is causing more trouble than it's worth. - - * malloc/arena.c: Add compile-time sanity check on padding calculation. - -2006-03-05 Jakub Jelinek - - * malloc/arena.c (heap_info): Adjust the padding size if - MALLOC_ALIGNMENT > 2 * SIZE_SZ. - -2006-03-05 Roland McGrath - - * sysdeps/mach/hurd/faccessat.c: New file. - * sysdeps/mach/hurd/fchmodat.c: New file. - * sysdeps/mach/hurd/fchownat.c: New file. - * sysdeps/mach/hurd/fxstatat.c: New file. - * sysdeps/mach/hurd/fxstatat64.c: New file. - * sysdeps/mach/hurd/linkat.c: New file. - * sysdeps/mach/hurd/mkdirat.c: New file. - * sysdeps/mach/hurd/openat.c: New file. - * sysdeps/mach/hurd/openat64.c: New file. - * sysdeps/mach/hurd/symlinkat.c: New file. - * sysdeps/mach/hurd/unlinkat.c: New file. - * sysdeps/mach/hurd/xmknod.c (__xmknod): Just call __xmknodat. - Guts move to ... - * sysdeps/mach/hurd/xmknodat.c: ... here, new file. - - * hurd/lookup-at.c: New file. - * hurd/Makefile (routines): Add it. - * hurd/hurd/fd.h: Declare __file_name_lookup_at, - __file_name_split_at and __directory_name_split_at. - - * hurd/hurd/lookup.h: Declare {,__}hurd_directory_name_split. - - * hurd/hurdlookup.c (__hurd_directory_name_split): Use __memrchr - unconditionally. - - * sysdeps/mach/hurd/open.c: Define {,__,__libc_,}open64 as aliases. - * sysdeps/mach/hurd/open64.c: New file. - - * sysdeps/posix/sysconf.c (__sysconf): Use #if _POSIX_FOO > 0 - rather than #ifdef _POSIX_FOO for options. We should return -1 - at runtime for an option defined to 0 at compile time. - - * sysdeps/mach/hurd/bits/posix_opt.h: Define many missing options, - many to -1 or 0. - -2006-03-05 Roland McGrath - - * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) - [__NR_clock_getres || HP_TIMING_AVAIL]: Handle _SC_CPUTIME, - _SC_THREAD_CPUTIME. - -2006-03-05 David S. Miller - - * sysdeps/sparc/sparc32/dl-trampoline.S: Add CFI markings. - * sysdeps/sparc/sparc32/elf/start.S: Likewise. - * sysdeps/sparc/sparc64/dl-trampoline.S: Likewise. - * sysdeps/sparc/sparc64/elf/start.S: Likewise. - * sysdeps/sparc/sparc32/memchr.S: Rearrange code to reside - within ENTRY/END. - * sysdeps/sparc/sparc32/memcpy.S: Likewise. - * sysdeps/sparc/sparc32/stpcpy.S: Likewise. - * sysdeps/sparc/sparc32/strcat.S: Likewise. - * sysdeps/sparc/sparc32/strchr.S: Likewise. - * sysdeps/sparc/sparc32/strcmp.S: Likewise. - * sysdeps/sparc/sparc32/strcpy.S: Likewise. - * sysdeps/sparc/sparc32/strlen.S: Likewise. - * sysdeps/sparc/sparc64/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9v/memset.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Add CFI markings - and use __syscall_error. - * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S: Use __syscall_error. - * sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Rewrite to use - CFI markings and __syscall_error. - * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S: Rearrange - code to reside within ENTRY/END. - * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sysdep.c: New file. - * sysdeps/unix/sysv/linux/sparc/sysdep.S: File removed. - * sysdeps/unix/sysv/linux/sparc/rt-sysdep.c: New file. - * sysdeps/unix/sysv/linux/sparc/Makefile (librt-routines): Add it. - - * shlib-versions: Use sparc64.*- for CPU patterns. - -2006-03-05 Roland McGrath - - * bits/resource.h (RLIMIT_SBSIZE, RLIMIT_AS, RLIMIT_VMEM): Define. - - * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY - to force directory check. - * sysdeps/mach/hurd/opendir.c (__opendir): Likewise. - -2006-03-04 Roland McGrath - - * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits - of SEL are clear after copying %gs to low bits. - (_hurd_tls_fork): Likewise. - -2006-03-03 Roland McGrath - - [BZ #2414] - * stdlib/tst-setcontext.c (f1): Take arguments of type int. - -2006-03-02 Roland McGrath - - * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Use __typeof in cast. - -2006-03-02 Daniel Jacobowitz - - * sysdeps/unix/sysv/linux/configure.in: Remove MIPS cases. Allow - libc_cv_slibdir et al. to be overridden. - * sysdeps/unix/sysv/linux/configure: Regenerated. - -2005-12-27 Jakub Jelinek - - * elf/ldconfig.c (search_dir): Skip prelink temporaries. - -2006-03-02 H.J. Lu - - * elf/check-textrel.c: Don't include "config.h". - -2006-03-02 Jakub Jelinek - - * io/ftw.c (process_entry): If dir->streamfd != -1, - use FXSTATAT rather than LXSTAT to find if unstatable - file is a dead symlink. - - * elf/check-textrel.c: Include config.h. - (AB(handle_file)): Don't fail if PF_X | PF_W on architectures known - to have executable writable PLT. - * sysdeps/powerpc/powerpc32/configure.in (HAVE_PPC_SECURE_PLT): New - test. - * config.h.in (HAVE_PPC_SECURE_PLT): Add. - - * malloc/malloc.c (MALLOC_ALIGNMENT): Set to __alignof__ (long double) - if long double is more aligned than 2 * SIZE_SZ. - (misaligned_chunk): Define. - (public_rEALLOc, _int_free, _int_realloc): Use it. - -2006-01-05 H.J. Lu - - [BZ #2013] - * sysdeps/ia64/memccpy.S: Properly handle recovery for - predicated speculative load. - -2006-03-01 Jakub Jelinek - - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. - - * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat64): Use - libc_hidden_ver rather than libc_hidden_def. - - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. - * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): - Use inline asm to make sure the compiler doesn't optimize insns out. - - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h - (DECLARGS_6): Fix a typo. - -2006-03-01 Roland McGrath - - * version.h (VERSION): 2.3.91 - - * Makeconfig (sysdeps-srcdirs): New variable. - (sysdeps-add-ons-srcdirs): Use it. - * csu/Makefile (all-Banner-files): Use it. - - * Makefile (dist-selector): New variable. - (glibc-%.tar rule): Use it. Make $(dist-separate) tarballs - contain one version-named directory. - - * Makefile (format-me): Use --plaintext --no-number-sections. - - * NOTES, INSTALL: Regenerated. - - * NEWS: Update 2.4 items. - -2006-03-01 David S. Miller - - * configure.in (machine): Match sparcv9v and sparc64v. - * configure: Regenerated. - * sysdeps/sparc/sparc32/sparcv9v/memcpy.S: New file. - * sysdeps/sparc/sparc32/sparcv9v/memset.S: New file. - * sysdeps/sparc/sparc64/sparcv9v/memcpy.S: New file. - * sysdeps/sparc/sparc64/sparcv9v/memset.S: New file. - -2006-03-01 Roland McGrath - - * sysdeps/mach/hurd/Subdirs: Use "first hurd". - -2006-02-28 Roland McGrath - - * sysdeps/rs6000: Directory removed, saved in ports repository. - -2006-03-01 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/pread.c: Copy in mips pread.c. - * sysdeps/unix/sysv/linux/sh/pwrite.c: Copy in mips pwrite.c. - * sysdeps/unix/sysv/linux/sh/pread64.c: Copy in mips pread64.c. - * sysdeps/unix/sysv/linux/sh/pwrite64.c: Copy in mips pwrite64.c. - -2006-02-28 Roland McGrath - - * elf/tst-tls-dlinfo.c: New file. - * elf/Makefile (tests): Add it. - ($(objpfx)tst-tls-dlinfo): Depend on $(libdl). - ($(objpfx)tst-tls-dlinfo.out): Depend on $(objpfx)tst-tlsmod2.so. - - * dlfcn/dlfcn.h (RTLD_DI_PROFILENAME, RTLD_DI_PROFILEOUT): New enum - values, reserve unsupported requested names used on Solaris. - (RTLD_DI_TLS_MODID, RTLD_DI_TLS_DATA): New enum values. - (RTLD_DI_MAX): Likewise. - * dlfcn/dlinfo.c (dlinfo_doit): Handle RTLD_DI_TLS_MODID and - RTLD_DI_TLS_DATA. - - * elf/dl-tls.c (_dl_tls_get_addr_soft): New function. - * sysdeps/generic/ldsodefs.h: Declare it. - * elf/Versions (ld: GLIBC_PRIVATE): Add it. - * elf/link.h (struct dl_phdr_info): New members dlpi_tls_modid, - dlpi_tls_data. - * elf/dl-iteratephdr.c (__dl_iterate_phdr): Fill them in. - - * include/link.h: Don't copy contents from elf/link.h. - Instead, #include it while #define'ing around link_map. - * elf/dl-debug.c (_dl_debug_initialize): Add a cast. - Add bogus extern decl to verify link_map members. - * elf/loadtest.c (MAPS): New macro, cast _r_debug._r_map. - (OUT, main): Use it in place of _r_debug._r_map. - * elf/unload.c: Likewise. - * elf/unload2.c: Likewise. - * elf/neededtest.c (check_loaded_objects): Likewise. - * elf/neededtest2.c (check_loaded_objects): Likewise. - * elf/neededtest3.c (check_loaded_objects): Likewise. - * elf/neededtest4.c (check_loaded_objects): Likewise. - * elf/circleload1.c (check_loaded_objects): Likewise. - - * nscd/nscd_helper.c: Include for `time' declaration. - - * include/fcntl.h: Declare __openat, __open64. Use libc_hidden_proto. - * io/openat.c (__openat): Define instead of openat. - Use libc_hidden_def. Define openat with weak_alias. - * io/openat64.c (__openat64): Define instead of openat64. - Use libc_hidden_def. Define openat64 with weak_alias. - * sysdeps/unix/sysv/linux/openat.c: Likewise. - - * libio/genops.c: Include for __sched_yield decl. - - * Makeconfig (+includes): Add back $(includes) - after $(+sysdep-includes). - - * Makerules ($(common-objpfx)%.make): Use -DASSEMBLER. - -2006-02-28 Jakub Jelinek - - * posix/sys/types.h [!__GNUC_PREREQ (2, 7)] (int64_t, u_int64_t): - typedef to long int resp. unsigned long int on 64-bit arches. - - * sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: Include x86_64 - umount.c rather than hppa umount.c. - * sysdeps/unix/sysv/linux/sparc/sparc32/chown.c: Include sh chown.c - rather than m68k chown.c. - * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include sh - fchownat.c rather than m68k fchownat.c. - * sysdeps/unix/sysv/linux/sh/chown.c: Copy over from m68k chown.c. - * sysdeps/unix/sysv/linux/sh/fchownat.c: Copy over from m68k - fchownat.c. - * sysdeps/unix/sysv/linux/x86_64/brk.c: Copy over from hppa brk.c. - * sysdeps/unix/sysv/linux/x86_64/umount.c: Copy over from hppa - umount.c. - -2006-02-28 Roland McGrath - - * sysdeps/hppa: Directory removed, saved in ports repository. - * sysdeps/mach/hppa: Likewise. - * sysdeps/mach/hurd/hppa: Likewise. - * sysdeps/unix/sysv/linux/hppa: Likewise. - * configure.in (machine): Remove hppa* cases. - * configure: Regenerated. - * shlib-versions: Remove hppa cases. - - * sysdeps/m68k: Directory removed, saved in ports repository. - * sysdeps/unix/bsd/m68k: Likewise. - * sysdeps/unix/sysv/linux/m68k: Likewise. - * configure.in (machine): Remove m68* cases. - * configure: Regenerated. - - * elf/rtld-Rules (subdir-args): New variable. - (rtld-subdir-make): Use it. - -2006-02-22 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h - (DO_CALL): Add support for 6 system call parameters. - (DECLARGS_6, ASMFMT_6): Define. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. - -2006-02-28 Roland McGrath - - * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Copy in i386/bits/fcntl.h. - -2006-02-27 Roland McGrath - - * scripts/config.guess: Update from master, timestamp='2006-02-27'. - * scripts/config.sub: Update from master, timestamp='2006-02-27'. - - * Makefile (subdir-target-args): New variable. - ($(all-subdirs-targets)): Use it in place of -C option. - * Rules: Use $(..) instead of ../ if it's already defined. - * Makeconfig (subdir-srcdirs): New variable. - * csu/Makefile (all-Banner-files): Use it. - - * configure.in (--enable-add-ons): Set to "yes" by default. - Handle absolute add-on directory names when looking for configure - fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. - Require add-on configure to set $libc_add_on_canonical, use - that in $add_ons_sfx. Substitute add_on_subdirs with computed list - of subdir names each add-on configure set in libc_add_on_subdirs. - * configure: Regenerated. - * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. - * config.make.in (add-on-subdirs): New substituted variable. - * Makeconfig (all-subdirs): Include $(add-on-subdirs). - Remove $(add-ons), $(sysdep-subdirs). - Don't filter out $(sysdep-inhibit-subdirs). - ($(common-objpfx)sysd-dirs): Target removed. Don't include it. - ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs - files together to gen-sorted.awk, and $(subdirs) via -v. - (subdirs): Remove magic reordering for mach and hurd. - * scripts/gen-sorted.awk: Use subdirs from command line. - Process Subdirs and Depend files directly. - Let Subdirs files use "first dir" and "inhibit dir". - Always move elf to the end of the list. - * hurd/Depend: New file. - * sysdeps/mach/Subdirs: Use "first mach". - - * Makefile (dist-separate): Remove linuxthreads. - (dist-separate-linuxthreads): Variable removed. - (glibc-%.tar rule): Use $(sysdeps-add-ons). - - * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), - not $(all-subdirs). - (sysdep-makefiles): Use $(sysdirs). - (sysdirs): Remove export. - ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in - $(config-sysdirs). - (+sysdir_pfx): Variable removed. - (sysd-rules): Use $(common-objpfx) in place of it. - (sysdirs): Variable moved to ... - * Makeconfig (sysdirs): ... here. - Handle absolute directory names in $(config-sysdirs). - (full_config_sysdirs): Variable removed. - * csu/Makefile: Use $(sysdirs) in vpath directive. - * math/Makefile (ulps-file): Use $(sysdirs). - * sysdeps/gnu/Makefile (errlist-c): Likewise. - ($(objpfx)errlist-compat.c): Likewise. - * Makeconfig (all-Subdirs-files): Likewise. - ($(common-objpfx)config.status): Likewise. - - * configure.in (sysnames): Handle absolute add-on directory names. - (sysdeps_add_ons): New variable, AC_SUBST it. - Compute which add-ons contributed sysdeps directories. - * configure: Regenerated. - * config.make.in (sysdeps-add-ons): New substituted variable. - * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... - * Makeconfig: ... to here. - (+sysdep_dirs): Append $(sysdeps-add-ons) here. - (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). - Remove $(includes). - (sysdep-makeconfigs): Use $(+sysdep_dirs). - ($(common-objpfx)shlib-versions.v.i): Likewise. - - * Makeconfig: Remove hair to set Makeconfig-add-on. - - * sysdeps/unix/Makefile (sysdirs): Remove export. - (asm_CPP): Variable removed. - ($(common-objpfx)sysd-syscalls): Pass them directly for the script. - - * sysdeps/posix/Makefile: New file. - * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix - values here with ?=. - - * stdlib/gen-mpn-copy: File removed. - * stdlib/Makefile (distribute): Remove it. - * configure.in: Don't grok --with-gmp. - * configure: Regenerated. - - * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. - * configure: Regenerated. - -2006-02-27 Ulrich Drepper - - * sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set - when syscall is used. - * io/fcntl.h (AT_SYMLINK_FOLLOW): Define. - -2006-02-26 Roland McGrath - - * bare: Directory removed, saved in ports repository. - - * sysdeps/unix/common/Makefile: File removed. - * sysdeps/unix/common/glue-ctype.c: File removed. - * sysdeps/unix/common/configure.in: File removed. - * sysdeps/unix/common/configure: File removed. - - * sysdeps/unix/configure.in: File removed. - * sysdeps/unix/configure: File removed. - * sysdeps/unix/make_errlist.c: File removed. - * sysdeps/unix/Makefile ($(objpfx)errlist.c, $(objpfx)make_errlist): - Rules removed. - - * timezone/africa: Update from tzdata2006b (comment changes only). - * timezone/antarctica: Likewise. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/backward: Likewise. - * timezone/etcetera: Likewise. - * timezone/europe: Likewise. - * timezone/factory: Likewise. - * timezone/iso3166.tab: Likewise. - * timezone/leapseconds: Likewise. - * timezone/northamerica: Likewise. - * timezone/pacificnew: Likewise. - * timezone/solar87: Likewise. - * timezone/solar88: Likewise. - * timezone/solar89: Likewise. - * timezone/southamerica: Likewise. - * timezone/systemv: Likewise. - * timezone/zone.tab: Likewise. - -2006-02-26 Ulrich Drepper - - * posix/unistd.h: Add fifth parameter to linkat. - * io/linkat.c: Likewise. - * sysdeps/unix/sysv/linux/linkat.c: Likewise. - * io/tst-linkat.c (do_test): Pass new parameter to linkat. - - * elf/do-lookup.h (do_lookup_x): No need to compare SKIP to NULL - before comparison with MAP. - - * elf/dl-sym.c (do_sym): For RTLD_NEXT, pass MATCH to - dl_lookup_symbol_x instead of L. - -2006-02-24 Mike Frysinger - - * sysdeps/gnu/net/if.h (IFF_DYNAMIC): New macro. - -2006-02-24 David S. Miller - - * configure.in: Use sparc/sparc32/sparcv9/sparcv9b in place - of sparc/sparc32/sparcv9b. - * sysdeps/sparc/sparc32/sparcv9b/Implies: File removed. - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies: File removed. - -2006-02-24 Roland McGrath - - * elf/elf.h (HWCAP_SPARC_BLKINIT): New macro. - * sysdeps/sparc/dl-procinfo.h (HWCAP_IMPORTANT): Add it. - (_DL_HWCAP_COUNT): Increase to 7. - * sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add "v9v". - From David S. Miller . - - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... - * sysdeps/sparc/dl-procinfo.c: ... here, new file. - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... - * sysdeps/sparc/dl-procinfo.h: ... here, new file. - (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE != 64]. - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. - - * elf/sofini.c (__FRAME_END__): Mark as const. - * elf/soinit.c (__EH_FRAME_BEGIN__): Likewise. Add used attribute. - -2006-02-18 Joseph S. Myers - - * soft-fp/single.h (SFtype): Define. - (union _FP_UNION_S): Use it. - * soft-fp/double.h (DFtype): Define. - (union _FP_UNION_D): Use it. - * soft-fp/extended.h (XFtype): Define. - (union _FP_UNION_E): Use it. - * soft-fp/quad.h (TFtype): Define. - (union _FP_UNION_Q): Use it. - * soft-fp/soft-fp.h: Add _LIBC conditionals. - (SI_BITS, DI_BITS): Define. - * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for - X##_c. - (_FP_CMP_EQ): Use parentheses for && inside ||. - (_FP_TO_INT): Use statement expressions in conditional controlling - constant shift. - (_FP_FROM_INT): Likewise. Take unsigned type as argument. - * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, - _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in - conditional controlling possibly constant shift. - (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly - _FP_W_TYPE_SIZE. - (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. - * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly - _FP_W_TYPE_SIZE. - (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, - __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. - * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly - _FP_W_TYPE_SIZE. - * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. - * soft-fp/floatdisf.c: Likewise. - * soft-fp/floatditf.c: Likewise. - * soft-fp/floatsidf.c: Likewise. - * soft-fp/floatsisf.c: Likewise. - * soft-fp/floatsitf.c: Likewise. - * soft-fp/floatundidf.c: Likewise. - * soft-fp/floatundisf.c: Likewise. - * soft-fp/floatunditf.c: Likewise. - * soft-fp/floatunsidf.c: Likewise. - * soft-fp/floatunsisf.c: Likewise. - * soft-fp/floatunsitf.c: Likewise. - * soft-fp/fixdfdi.c: Pass macro for type size. - * soft-fp/fixdfsi.c: Likewise. - * soft-fp/fixsfdi.c: Likewise. - * soft-fp/fixsfsi.c: Likewise. - * soft-fp/fixtfdi.c: Likewise. - * soft-fp/fixtfsi.c: Likewise. - * soft-fp/fixunsdfdi.c: Likewise. - * soft-fp/fixunsdfsi.c: Likewise. - * soft-fp/fixunssfdi.c: Likewise. - * soft-fp/fixunssfsi.c: Likewise. - * soft-fp/fixunstfdi.c: Likewise. - * soft-fp/fixunstfsi.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. - * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. - * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. - * soft-fp/adddf3.c: Use typedefs for argument and return types. - * soft-fp/addsf3.c: Likewise. - * soft-fp/addtf3.c: Likewise. - * soft-fp/divdf3.c: Likewise. - * soft-fp/divsf3.c: Likewise. - * soft-fp/divtf3.c: Likewise. - * soft-fp/eqdf2.c: Likewise. - * soft-fp/eqsf2.c: Likewise. - * soft-fp/eqtf2.c: Likewise. - * soft-fp/extenddftf2.c: Likewise. - * soft-fp/extendsfdf2.c: Likewise. - * soft-fp/extendsftf2.c: Likewise. - * soft-fp/fixdfdi.c: Likewise. - * soft-fp/fixdfsi.c: Likewise. - * soft-fp/fixsfdi.c: Likewise. - * soft-fp/fixsfsi.c: Likewise. - * soft-fp/fixtfdi.c: Likewise. - * soft-fp/fixtfsi.c: Likewise. - * soft-fp/fixunsdfdi.c: Likewise. - * soft-fp/fixunsdfsi.c: Likewise. - * soft-fp/fixunssfdi.c: Likewise. - * soft-fp/fixunssfsi.c: Likewise. - * soft-fp/fixunstfdi.c: Likewise. - * soft-fp/fixunstfsi.c: Likewise. - * soft-fp/floatdidf.c: Likewise. - * soft-fp/floatdisf.c: Likewise. - * soft-fp/floatditf.c: Likewise. - * soft-fp/floatsidf.c: Likewise. - * soft-fp/floatsisf.c: Likewise. - * soft-fp/floatsitf.c: Likewise. - * soft-fp/floatundidf.c: Likewise. - * soft-fp/floatundisf.c: Likewise. - * soft-fp/floatunditf.c: Likewise. - * soft-fp/floatunsidf.c: Likewise. - * soft-fp/floatunsisf.c: Likewise. - * soft-fp/floatunsitf.c: Likewise. - * soft-fp/gedf2.c: Likewise. - * soft-fp/gesf2.c: Likewise. - * soft-fp/getf2.c: Likewise. - * soft-fp/ledf2.c: Likewise. - * soft-fp/lesf2.c: Likewise. - * soft-fp/letf2.c: Likewise. - * soft-fp/muldf3.c: Likewise. - * soft-fp/mulsf3.c: Likewise. - * soft-fp/multf3.c: Likewise. - * soft-fp/negdf2.c: Likewise. - * soft-fp/negsf2.c: Likewise. - * soft-fp/negtf2.c: Likewise. - * soft-fp/sqrtdf2.c: Likewise. - * soft-fp/sqrtsf2.c: Likewise. - * soft-fp/sqrttf2.c: Likewise. - * soft-fp/subdf3.c: Likewise. - * soft-fp/subsf3.c: Likewise. - * soft-fp/subtf3.c: Likewise. - * soft-fp/truncdfsf2.c: Likewise. - * soft-fp/trunctfdf2.c: Likewise. - * soft-fp/trunctfsf2.c: Likewise. - * soft-fp/unorddf2.c: Likewise. - * soft-fp/unordsf2.c: Likewise. - * soft-fp/unordtf2.c: Likewise. - -2006-02-09 Joseph S. Myers - - * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. - (_FP_OVERFLOW_SEMIRAW): Likewise. - (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. - (_FP_CHOOSENAN_SEMIRAW): Likewise. - (_FP_EXP_NORMAL): Likewise. - (_FP_PACK_SEMIRAW): Likewise. - (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. - (_FP_SUB): Likewise. - (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID - exception for conversions where most negative representable - integer is correct truncated value, but do set INEXACT for such - conversions where appropriate. Don't always left-shift for - converting to a wider integer. - (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for - integers with one more bits than (mantissa + guard) bits for the - floating point format. Don't use __FP_FRAC_SRS_1 for shifting - integers that may be wider than _FP_W_TYPE_SIZE. - (FP_CONV): Don't define. - (FP_EXTEND): Define. - (FP_TRUNC): Likewise. - * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. - (_FP_FRAC_CONV_1_1): Don't define. - (_FP_FRAC_COPY_1_1): Define. - * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. - (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. - (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. - * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. - (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. - (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. - (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. - (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. - (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. - * soft-fp/single.h (_FP_FRACTBITS_S): Define. - (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. - (_FP_WFRACXBITS_S): Likewise. - (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. - (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. - (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. - * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. - (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define - (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. - * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. - (FP_UNPACK_EP): Correct typo. - (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. - (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. - * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. - (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. - (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. - * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. - * soft-fp/fixdfsi.c: Likewise. - * soft-fp/fixsfdi.c: Likewise. - * soft-fp/fixsfsi.c: Likewise. - * soft-fp/fixtfdi.c: Likewise. - * soft-fp/fixtfsi.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. - * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. - * soft-fp/adddf3.c: Update for changed soft-fp interfaces. - * soft-fp/addsf3.c: Likewise. - * soft-fp/addtf3.c: Likewise. - * soft-fp/extenddftf2.c: Likewise. - * soft-fp/extendsfdf2.c: Likewise. - * soft-fp/extendsftf2.c: Likewise. - * soft-fp/fixdfdi.c: Likewise. - * soft-fp/fixdfsi.c: Likewise. - * soft-fp/fixsfdi.c: Likewise. - * soft-fp/fixsfsi.c: Likewise. - * soft-fp/fixtfdi.c: Likewise. - * soft-fp/fixtfsi.c: Likewise. - * soft-fp/fixunsdfdi.c: Likewise. - * soft-fp/fixunsdfsi.c: Likewise. - * soft-fp/fixunssfdi.c: Likewise. - * soft-fp/fixunssfsi.c: Likewise. - * soft-fp/fixunstfdi.c: Likewise. - * soft-fp/fixunstfsi.c: Likewise. - * soft-fp/floatdidf.c: Likewise. - * soft-fp/floatdisf.c: Likewise. - * soft-fp/floatditf.c: Likewise. - * soft-fp/floatsidf.c: Likewise. - * soft-fp/floatsisf.c: Likewise. - * soft-fp/floatsitf.c: Likewise. - * soft-fp/floatundidf.c: Likewise. - * soft-fp/floatundisf.c: Likewise. - * soft-fp/floatunditf.c: Likewise. - * soft-fp/floatunsidf.c: Likewise. - * soft-fp/floatunsisf.c: Likewise. - * soft-fp/floatunsitf.c: Likewise. - * soft-fp/subdf3.c: Likewise. - * soft-fp/subsf3.c: Likewise. - * soft-fp/subtf3.c: Likewise. - * soft-fp/truncdfsf2.c: Likewise. - * soft-fp/trunctfdf2.c: Likewise. - * soft-fp/trunctfsf2.c: Likewise. - * sysdeps/alpha/soft-fp/ots_add.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. - * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. - * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. - * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. - * sysdeps/powerpc/soft-fp/q_add.c: Likewise. - * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. - * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. - * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. - * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. - * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. - * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. - -2006-02-23 Roland McGrath - - * include/libc-symbols.h: Fix comment typo. - From Peter Kjellerstedt . - - * sysdeps/unix/sysv/linux/i386/fchownat.c: Diddle code so that "fail" - label is always used. - - [BZ #2172] - * bits/syslog-path.h: New file. - * misc/Makefile (headers): Add it. - * misc/sys/syslog.h: Include it. - (_PATH_LOG): Macro removed. - From Robert Millan . - - * sysdeps/unix/sysv/linux/ftruncate64.c: Find generic implementation - in misc/, not posix/. - Reported by David S. Miller . -2006-02-23 Jakub Jelinek + * locale/iso-3166.def: Add Aaland Islands and Montenegro. - * posix/sched_yield.c (__sched_yield): Add libc_hidden_def. - * sysdeps/mach/sched_yield.c (__sched_yield): Likewise. - -2006-02-22 Roland McGrath - - * po/libc.pot: Regenerated. - -2006-02-22 Jakub Jelinek - - * nis/ypclnt.c (yperr_string, ypbinderr_string): Add N_() - around string literals. - -2005-10-03 Jakub Jelinek - - * nscd/selinux.c (audit_init): Print error string in the failure - message. - -2006-02-21 Roland McGrath - - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_CLONE_THREAD_FLAGS): Consolidate definitions. - - * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Update comment, remove - __THROW from epoll_wait, to match .../linux/sys/epoll.h file. - -2006-02-03 Jakub Jelinek - - * manual/filesys.texi (futimes): Fix prototype. - -2004-08-09 Paul Eggert - - [BZ #315] - * manual/memory.texi (Obstacks Data Alignment): The default - alignment is not 4: it is enough to hold any type of data. - Problem reported by Benno in - . - -2005-11-15 Robert Millan - - [BZ #2161] - * manual/llio.texi (read, write): Document EINVAL on unaligned access. - -2006-02-21 Roland McGrath - - * sysdeps/i386/i686/memset.S: Fix treatment of unaligned pointer. - Reported by John Zulauf . - -2004-11-23 Richard Sandiford - - * configure.in (libc_cv_gcc_dwarf2_unwind_info): Delete. - (HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove AC_DEFINEs. - * configure: Regenerate. - * config.h.in (HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove undefs. - * elf/soinit.c: Don't include gccframe.h. - (__EH_FRAME_BEGIN__): Define unconditionally. - (__register_frame_info, __deregister_frame_info) - (__register_frame_info_bases, __deregister_frame_info_bases) - (__register_frame, __deregister_frame): Remove declarations. - (__libc_global_ctors, __libc_fini): Don't call registry functions. - * elf/sofini.c (__EH_FRAME_END__): Define unconditionally. - -2006-01-18 Samuel Thibault - - [BZ #2178] - * sysdeps/mach/hurd/getsid.c (getsid): When parameter PID is zero, - use _hurd_pid instead. + [BZ #3273] + * nscd/nscd_initgroups.c (__nscd_getgrouplist): It is OK to have + found no group members. + Patch by Petr Baudis. + +2006-09-29 Jakub Jelinek + + * elf/rtld.c (_dl_start_final): If not USE___THREAD, don't + assert bootstrap_map.l_tls_modid is zero. + (_dl_start): Initialize bootstrap_map.l_tls_modid to 0 + if USE___THREAD. + +2006-09-27 Ulrich Drepper + + * libio/stdio.h: Move open_wmemstream prototype to ... + * wcsmbs/wchar.h: ... here. + +2006-09-25 Jakub Jelinek + + [BZ #3252] + * sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Handle only + fchownat syscall and __ASSUME_LCHOWN_SYSCALL case inline, call + __{,l}chown to handle the rest. + * sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Handle only + fchownat syscall and __ASSUME_32BITUIDS case inline, call + __{,l}chown to handle the rest. + * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include + i386/fchownat.c. + * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/sh/fchownat.c: Likewise. -2006-02-20 Richard Henderson + [BZ #3253] + * posix/glob.c (glob_in_dir): Don't alloca one struct globlink at a + time, rather allocate increasingly bigger arrays of pointers, if + possible with alloca, if too large with malloc. - * sysdeps/alpha/soft-fp/Makefile (CPPFLAGS): Add soft-fp include - to math subdir. - * sysdeps/alpha/soft-fp/e_sqrtl.c: Don't use local-soft-fp.h. - (__ieee754_sqrtl): Add _round local variable. - * sysdeps/unix/sysv/linux/alpha/fpu/Implies: Remove. +2006-09-24 Jakub Jelinek - * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Fix hidden defs. + * sysdeps/powerpc/fpu/libm-test-ulps: Updated. -2006-02-20 Roland McGrath + * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Fix 2 typos. - * sysdeps/mips: Directory removed, saved in ports repository. - * sysdeps/unix/mips: Likewise. - * sysdeps/unix/sysv/linux/mips: Likewise. - * sysdeps/mach/mips: Likewise. - * sysdeps/mach/hurd/mips: Likewise. - * shlib-versions: Remove mips matches, now in ports fragment. - * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. - * configure.in (machine): Likewise. - * configure: Regenerated. +2006-09-24 Ulrich Drepper - * hurd/hurd/xattr.h: New file. - * hurd/xattr.c: New file. - * hurd/Makefile (routines): Add it. - * sysdeps/mach/hurd/fgetxattr.c: New file. - * sysdeps/mach/hurd/flistxattr.c: New file. - * sysdeps/mach/hurd/fremovexattr.c: New file. - * sysdeps/mach/hurd/fsetxattr.c: New file. - * sysdeps/mach/hurd/getxattr.c: New file. - * sysdeps/mach/hurd/lgetxattr.c: New file. - * sysdeps/mach/hurd/listxattr.c: New file. - * sysdeps/mach/hurd/lsetxattr.c: New file. - * sysdeps/mach/hurd/removexattr.c: New file. - * sysdeps/mach/hurd/setxattr.c: New file. + * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Implement rule 4, + home addresses. + * sysdeps/unix/sysv/linux/check_pf.c (make_request): Recognize + IFA_F_HOMEADDRESS flag for interfaces. + * include/ifaddrs.h (struct in6addrinfo): Define + in6ai_homeaddress. -2006-02-15 Thomas Schwinge +2006-09-21 Jakub Jelinek - [BZ #2329] - * include/unistd.h (__getresuid, __getresgid, __setresuid) - (__setresgid): Fix argument name order in prototypes. - * posix/unistd.h (getresuid, getresgid, setresuid, setresgid): - Likewise. - * posix/getresuid.c (__getresuid): Fix argument order in definition. - * posix/getresgid.c (__getresgid): Likewise. - * posix/setresuid.c (__setresuid): Likewise. - * posix/setresgid.c (__setresgid): Likewise. - * sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise. - * sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise. - * sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise. - * sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise. - Reported by Samuel Thibault . - -2006-02-13 Mike Frysinger - - [BZ #2380] - * string/tester.c (test_strnlen): New function. - (test_strchr): Call it. - (test_strncat): Test lengths where the sign bit is set. - (test_strncmp): Likewise. - -2006-02-17 Jakub Jelinek - - * include/atomic.h (atomic_and, atomic_or): Define. - -2006-02-15 Ulrich Drepper - - * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Define MADV_DONTFORK - and MADV_DOFORK. - * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. - -2006-02-13 Jakub Jelinek - - * sysdeps/unix/sysv/linux/not-cancel.h (__openat_not_cancel, - __openat64_not_cancel): Remove prototypes. - (__openat_nocancel, __openat64_nocancel): New prototypes or defines. - (openat_not_cancel, openat_not_cancel_3, openat64_not_cancel, - openat64_not_cancel_3): Use them. - -2006-02-12 Ulrich Drepper - - * io/ftw.c: Start using *at functions. - * io/ftw64.c: Likewise. - - * sysdeps/generic/not-cancel.h: Define openat_not_cancel, - openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3. - * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. - - * sysdeps/unix/sysv/linux/openat.c: Create separate _nocancel - functions. - - * io/fxstatat.c: Add __fxstatat alias. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. - * sysdeps/unix/sysv/linux/fxstatat.c: Likewise. Add support for - newfstatat syscall. - * sysdeps/unix/sysv/linux/i386/fxstatat.c: Add __fxstatat alias. - Add support for fstatat64 syscall. - * include/sys/stat.h: Declare __fxstatat. - * io/fxstatat64.c: Add __fxstatat64 alias. - * sysdeps/unix/sysv/linux/fxstatat64.c: Add support for fstatat64 - syscall. - - * dirent/fdopendir.c: Add __fdopendir alias. - * sysdeps/unix/fdopendir.c: Likewise. - * sysdeps/mach/hurd/fdopendir.c: Likewise. - * include/dirent.h: Add __fdopendir declaration. - - [BZ #2226] - * libio/wgenops.c (_IO_wsetb): Use correct size of wide char - buffer in FREE_BUF call. - -2006-02-08 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/sched.h: Declare unshare. - * sysdeps/unix/sysv/linux/Versions [libc, GLIBC_2.4]: Export - unshare. - * sysdeps/unix/sysv/linux/syscalls.list: Add unshare syscall. - - * sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Add some - preprocessor magic so that the compiler won't see the prototypes - for the functions we are defining as stubs. - -2006-02-05 Ulrich Drepper - - * io/ftw.c (ftw_startup): Use fchdir to return to original - directory for FTW_CHDIR. - -2006-02-03 Ulrich Drepper - - * manual/stdio.texi (Formatted Output Functions): Fix make_message - example. Patch by NIIBE Yutaka . - -2006-02-03 Roland McGrath - - [BZ #2268] - * sysdeps/posix/profil.c (__profil): Use __profile_frequency to choose - timer interval, don't assume smallest possible interval is it. - -2006-02-03 Jakub Jelinek - - * sysdeps/powerpc/fpu/bits/fenvinline.h (fegetround): Make asm - volatile. - - * stdlib/bits/stdlib-ldbl.h (qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): - Guard with [__USE_SVID || __USE_XOPEN_EXTENDED]. - - * math/math.h [__LDBL_COMPAT && __USE_ISOC99] (nexttowardl): New - prototype. - - * math/math.h (__nldbl_nexttowardf): Put __THROW before - __attribute__ ((__const__)). - (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT - followed by __THROW. - -2006-02-02 Ulrich Drepper - - * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat] - (futimesat): If file is NULL use __futimes. - * include/sys/time.h: Declare __futimes. - -2006-02-02 Roland McGrath - - * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): Use the same - fstat check for ENOENT that should be EBADF as for ENOTDIR, and also - check for missing /proc the same way. - - * include/errno.h [__cplusplus]: Avoid extra header magic for C++. - - * manual/install.texi (Tools for Compilation): Require gcc 3.4, - recommend 4.1, advise 4.0 for powerpc64, and note 4.1 required for - powerpc, s390{x,} with new long double. - * INSTALL: Regenerated. - - * timezone/private.h: Update from tzcode2006a. - * timezone/scheck.c: Likewise. - * timezone/asia: Update from tzdata2006a. - * timezone/northamerica: Likewise. - * timezone/zone.tab: Likewise. - - * sysdeps/powerpc/powerpc64/Makefile (no-special-regs): New variable. - (CFLAGS-mcount.c): Use it instead of -msoft-float. - * sysdeps/powerpc/powerpc64/elf/Makefile - (CFLAGS-dl-runtime.os, CFLAGS-dl-lookup.os, CFLAGS-dl-misc.os, - CFLAGS-rtld-mempcpy.os, CFLAGS-rtld-memmove.os, CFLAGS-rtld-memchr.os, - CFLAGS-rtld-strnlen.os): Likewise. - -2006-02-01 Roland McGrath - - * sysdeps/ieee754/ldbl-opt/Makefile (sysdep-CFLAGS): Avoid adding - -mlong-double-128 when it's already there. - -2006-02-01 Roland McGrath - - * mach/Machrules ($(objpfx)%.uh, $(objpfx)%.__h): Use static pattern - rules for these, not implicit rules. - ($(objpfx)%.h): Likewise. - Reported by Thomas Schwinge . - -2006-02-01 Jakub Jelinek - - * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: Use long_double_symbol - even for libm. - - * libio/bits/libio-ldbl.h (_IO_vfwscanf, _IO_vfwprintf): Remove - __LDBL_REDIR_DECL. - - * math/bits/mathcalls.h: Guard __END_NAMESPACE_C99 with the - same #if condition as corresponding __BEGIN_NAMESPACE_C99. - (scalb): Don't define only if __USE_ISOC99. - - * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo. - * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps. - -2006-01-19 Thomas Schwinge - - * libio/genops.c: Include . - -2006-02-01 Ulrich Drepper - - * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_02_known): Add - some more entries. - * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_02_known): Likewise. - -2006-01-31 Jakub Jelinek - - * sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file. - * sysdeps/alpha/fpu/s_ceil.c: Include math_ldbl_opt.h, add - compat_symbol if LONG_DOUBLE_COMPAT. - * sysdeps/alpha/fpu/s_copysign.c: Likewise. - * sysdeps/alpha/fpu/s_fabs.c: Likewise. - * sysdeps/alpha/fpu/s_floor.c: Likewise. - * sysdeps/alpha/fpu/s_rint.c: Likewise. - * sysdeps/alpha/soft-fp/e_sqrtl.c: New file. - * sysdeps/alpha/Implies: Add ieee754/ldbl-128. - - * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: New file. - * sysdeps/unix/sysv/linux/alpha/Implies: Add ieee754/ldbl-64-128, - ieee754/ldbl-opt. - * sysdeps/alpha/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. - * sysdeps/unix/sysv/linux/alpha/nldbl-abi.h: New file. - * sysdeps/unix/sysv/linux/alpha/Makefile - [$(subdir) = math] (libm-routines): Add multc3, divtc3. - - * math/divtc3.c: New file. - * math/multc3.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile - [$(subdir) = math] (libm-routines): Add multc3, divtc3. - - * sysdeps/unix/sysv/linux/sparc/sparc32/fpu/Implies: New file. - * sysdeps/sparc/sparc32/fpu/s_fabsl.c: Include math.h and - math_ldbl_opt.h. - (fabsl): Use long_double_symbol instead of weak_alias. - * sysdeps/sparc/sparc32/fpu/s_fabs.c: Include math.h and - math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (fabsl): Add compat_symbol. - -2006-01-31 Martin Schwidefsky - Jakub Jelinek - - * sysdeps/unix/sysv/linux/s390/Implies: New file. - * sysdeps/unix/sysv/linux/s390/fpu/Implies: New file. - * sysdeps/unix/sysv/linux/s390/nldbl-abi.h: New file. - * sysdeps/s390/fpu/bits/mathinline.h (signbitl, sqrtl): New inlines. - * sysdeps/s390/bits/mathdef.h: New file. - * sysdeps/s390/fpu/e_sqrtl.c: New file. - * sysdeps/s390/s390-32/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL, - __NO_LONG_DOUBLE_MATH): Define. - * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. - * sysdeps/s390/Implies: Add ieee754/ldbl-128. - * sysdeps/s390/ldbl2mpn.c: File removed. - * sysdeps/s390/fpu/libm-test-ulps: Updated. - -2006-01-31 Roland McGrath - - * sysdeps/alpha/fpu/bits/mathdef.h: Moved to ... - * sysdeps/alpha/bits/mathdef.h: ... here. - * sysdeps/i386/fpu/bits/mathdef.h: Moved to ... - * sysdeps/i386/bits/mathdef.h: ... here. - * sysdeps/mips/fpu/bits/mathdef.h: Moved to ... - * sysdeps/mips/bits/mathdef.h: ... here. - * sysdeps/m68k/fpu/bits/mathdef.h: Moved to ... - * sysdeps/m68k/bits/mathdef.h: ... here. - * sysdeps/powerpc/fpu/bits/mathdef.h: Moved to ... - * sysdeps/powerpc/bits/mathdef.h: ... here. - * sysdeps/sparc/fpu/bits/mathdef.h: Moved to ... - * sysdeps/sparc/bits/mathdef.h: ... here. - * sysdeps/ia64/fpu/bits/mathdef.h: Moved to ... - * sysdeps/ia64/bits/mathdef.h: ... here. - * sysdeps/sh/sh4/fpu/bits/mathdef.h: Moved to ... - * sysdeps/sh/sh4/bits/mathdef.h: ... here. - * sysdeps/x86_64/fpu/bits/mathdef.h: Moved to ... - * sysdeps/x86_64/bits/mathdef.h: ... here. - -2006-01-31 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/fxstatat.c [XSTAT_IS_STAT64] - (__fxstatat64): Add libc_hidden_ver. - * sysdeps/unix/sysv/linux/fxstatat.c [XSTAT_IS_STAT64] (__fxstatat64): + [BZ #3225] + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (PTR_MANGLE3, + PTR_DEMANGLE3): Define. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (PTR_MANGLE3, + PTR_DEMANGLE3): Likewise. + * sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use them. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Likewise. + * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): Likewise. - * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Remove jmpbuf-offsets.h - include. - -2006-01-31 Roland McGrath - - * sysdeps/powerpc/fpu/libm-test-ulps: Update by Jakub. - - * inet/rcmd.c (iruserfopen): Remove redundant initialization. - From Bernhard Fischer . - - * posix/regcomp.c (calc_eclosure_iter): Remove dead variables. - Reported by Mike Frysinger . - -2006-01-30 Steven Munroe - - * sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Correct index - for __sincosl_table. - * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c (__kernel_sincosl): Likewise. - * sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise. - - * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Correct sign of 0.0. - * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise. - - * sysdeps/ieee754/ldbl-128ibm/s_cprojl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_ctanl.c: New file. - -2006-01-29 Daniel Jacobowitz - - * sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED, - EOWNERDEAD, ENOTRECOVERABLE): Define. - - * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define. - - * sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for - N64. - - * sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use - size_t for msg_controllen. - (__cmsg_nxthdr): Correct test. - (__SCM_CONNECT): Delete. - -2006-01-30 Alexandre Oliva - Roland McGrath - - * configure.in (fno_unit_at_a_time): Set to - -fno-toplevel-reorder if the compiler supports it. - Otherwise use -fno-unit-at-a-time unconditionally. - * configure: Regenerated. - -2006-01-30 Jakub Jelinek - - * sysdeps/powerpc/fpu/libm-test-ulps: Merge ulps with older - libm-test-ulps rather than overwrite it. Remove excessively high ulps. - -2006-01-29 Joseph S. Myers - - * soft-fp/double.h (FP_CMP_UNORD_D): Also define in - [_FP_W_TYPE_SIZE >= 64] case. - * soft-fp/extended.h (FP_CMP_UNORD_E): Likewise. - * soft-fp/quad.h (FP_CMP_UNORD_Q): Likewise. - -2006-01-27 Dwayne Grant McConnell - Jakub Jelinek - Roland McGrath - Steven Munroe - Alan Modra - - * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. - - * sysdeps/powerpc/fpu/libm-test-ulps: Update. - - * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. - (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is - denormal. - [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, - rint_test, round_test, trunc_test): Add new tests. - - * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. - * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. - - * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. - * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. - - * sysdeps/unix/sysv/linux/powerpc/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. - * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. - * sysdeps/unix/sysv/linux/powerpc/configure: New file. - * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h - (__LONG_DOUBLE_MATH_OPTIONAL): Define. - (__NO_LONG_DOUBLE_MATH): Define. - * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. - * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. - * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. - * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. - - * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. - - * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. - * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. - * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. - * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. - * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. - * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. - * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. - * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. - * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. - * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. - - * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment. - -2006-01-22 Aurelien Jarno - - * sysdeps/gnu/errlist-compat.awk: Reduce required number of symbols in - sanity check. - -2006-01-21 Ulrich Drepper - - * sysdeps/unix/sysv/linux/renameat.c (__atfct_seterrno_2): Correctly - return EBADF for non-existing file descriptors. - * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): Likewise. - * io/tst-openat.c (do_test): Add some more tests. - * io/tst-faccessat.c (do_test): Likewise. - * io/tst-renameat.c (do_test): Likewise. - * io/tst-fstatat.c (do_test): Likewise. - * io/tst-fchmodat.c (do_test): Likewise. - * io/tst-fchownat.c (do_test): Likewise. - -2006-01-21 Roland McGrath - - * sysdeps/unix/sysv/linux/faccessat.c: Move RESULT defn inside block. - - * misc/tst-pselect.c: Include . - - * time/time.h [__need_timespec et al]: Include here too. - - * stdlib/fpioconst.c: Fix whitespace typo. - -2006-01-20 Jakub Jelinek - - * sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c: Moved to... - * sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: ... here. New file. - * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h (long_double_symbol_1): For - C define again using _weak_alias, for assembler use weak_alias. - - * sysdeps/powerpc/powerpc64/fpu/e_sqrt.c: New file. - * sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c: New file. - * sysdeps/powerpc/fpu/bits/mathinline.h (__CPU_HAS_FSQRT): New macro. - (__ieee754_sqrt, __ieee754_sqrtf): Use it. - -2006-01-21 Ulrich Drepper - - * sysdeps/unix/sysv/linux/pselect.c (__pselect): Allow actual - system call code to be redefined in macro CALL_PSELECT6. - * sysdeps/unix/sysv/linux/i386/Makefile [subdir=misc] - (sysdep_routines): Add call_pselect6. - * sysdeps/unix/sysv/linux/i386/call_pselect6.S: New file. - * sysdeps/unix/sysv/linux/i386/pselect.c: New file. - * misc/Makefile (tests): Add tst-pselect. - * misc/tst-pselect.c: New file. - -2006-01-20 Roland McGrath - - * sysdeps/mach/hurd/ppoll.c: New file. - -2006-01-20 Ulrich Drepper - - * sysdeps/unix/sysv/linux/pselect.c: Fix typo in declaration. - - * sysdeps/unix/sysv/linux/xmknodat.c (__xmknodat): Cast k_dev - value to unsigned int to match kernel. - - * sysdeps/unix/sysv/linux/faccessat.c (faccessat): Try using the - syscall in more cases. - - * io/Makefile (tests): Add tst-symlinkat, tst-linkat, tst-readlinkat, - tst-mkdirat, tst-mknodat, and tst-mkfifoat. - * io/tst-symlinkat.c: New file. - * io/tst-linkat.c: New file. - * io/tst-readlinkat.c: New file. - * io/tst-mkdirat.c: New file. - * io/tst-mknodat.c: New file. - * io/tst-mkfifoat.c: New file. - - * dirent/Makefile (tests): Add tst-fdopendir2. - * dirent/tst-fdopendir2.c: New file. - -2006-01-20 Alexandre Oliva - - * sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h - (sigcontext_struct) [__WORDSIZE == 32]: Define. - -2006-01-20 Kaz Kojima - - * sysdeps/sh/sh4/__longjmp.S: Demangle also r14 and r15. - * sysdeps/sh/sh3/__longjmp.S: Likewise. - * sysdeps/sh/sh4/setjmp.S: Mangle also r14 and r15. - * sysdeps/sh/sh3/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sysdep.h [__ASSEMBLER__] - (PTR_MANGLE): Add temporary register as the second parameter. - (PTR_DEMANGLE): Likewize. - (PTR_MANGLE2, PTR_DEMANGLE2): Define. - -2006-01-19 Ulrich Drepper - - * include/fcntl.h: Declare __have_atfcts. - * sysdeps/unix/sysv/linux/faccessat.c: Use syscall if available. - * sysdeps/unix/sysv/linux/fchmodat.c: Likewise. - * sysdeps/unix/sysv/linux/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/futimesat.c: Likewise. - * sysdeps/unix/sysv/linux/linkat.c: Likewise. - * sysdeps/unix/sysv/linux/mkdirat.c: Likewise. - * sysdeps/unix/sysv/linux/openat.c: Likewise. - * sysdeps/unix/sysv/linux/readlinkat.c: Likewise. - * sysdeps/unix/sysv/linux/renameat.c: Likewise. - * sysdeps/unix/sysv/linux/symlinkat.c: Likewise. - * sysdeps/unix/sysv/linux/unlinkat.c: Likewise. - * sysdeps/unix/sysv/linux/xmknodat.c: Likewise. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. - * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_PSELECT, - __ASSUME_PPOLL, and __ASSUME_ATFCTS if possible. - - * io/ppoll.c: New file. - * io/Makefile (routines): Add ppoll. - (CFLAGS-ppoll.c): Define. - * io/Versions: Export ppoll for GLIBC_2.4. - * io/sys/poll.h: Declare ppoll. - * sysdeps/unix/sysv/linux/ppoll.c: New file. - - * misc/pselect.c: Make it possible to include this file to define - the generic code as a static function. - * sysdeps/unix/sysv/linux/pselect.c: New file. - -2006-01-19 Jakub Jelinek - - * misc/pselect.c (__pselect): Remove static. - Include sysdep-cancel.h again. Add LIBC_CANCEL_HANDLED (). - -2006-01-18 Roland McGrath - - * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h [__ASSEMBLER__]: Don't - include problematic headers for assembler. - - * Makerules ($(+sysdir_pfx)sysd-rules): Don't emit m_%.c rules, - instead emit m_%.o compilation rules from s_%.? source files. - * math/Makefile ($(objpfx)m_%$o: s_%.c): New rule using o-iterator. - -2006-01-18 Ulrich Drepper - - * misc/pselect.c (__pselect): No need to enable async cancellation - here. This is done in select. - - * sysdeps/unix/sysv/linux/fxstatat.c [STAT_IS_KERNEL_STAT] - (__fxstatat): Correct handling of invalid vers values. - - [BZ #2173] - * libio/fileops.c (_IO_new_file_fopen): If ,ccs= is given, also - set vtable to the wide vtable. - * libio/tst-fopenloc2.c: New file. - * libio/Makefile (tests): Add tst-fopenloc2. - -2006-01-18 Roland McGrath - - * sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c: Restore - attribute_hidden here. - - * sysdeps/sparc/sparc64/Makefile (long-double-fcts): Move this ... - * sysdeps/sparc/Makefile (long-double-fcts): ... to here. - -2006-01-18 Jakub Jelinek - - * elf/dl-deps.c (_dl_map_object_deps): In case of failure also make a - copy of objname string. - -2006-01-16 Roland McGrath - - * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules to install - into $(inst_includedir)/%.h from sysdirs. - [headers]: Change static pattern rule for installing - $(headers) to do only those not matching %.h. - ($(inst_includedir)/%.h: $(objpfx)%.h): Add this pattern rule instead. - ($(inst_includedir)/%.h: %.h): Likewise. - ($(inst_includedir)/%.h: $(..)include/%.h): Likewise. - - * Makefile ($(inst_includedir)/gnu/stubs.h): - Add $(make-target-directory). - - * stdlib/Makefile (headers): Restore headers removed in last change. - -2006-01-16 Jakub Jelinek - - * math/e_exp2l.c: Don't include stdio.h, errno.h, stub-tag.h, include - math_private.h. - (__ieee754_exp2l): Compute for now as expl (M_LN2l * x) - instead of failing. - (exp2l): Remove stub_warning. - -2006-01-15 Jakub Jelinek - - * io/tst-faccessat.c (do_test): Don't fail if geteuid () == 0. - -2006-01-16 Ulrich Drepper - - * sysdeps/unix/sysv/linux/kernel-features.h: Define - __ASSUME_TMPFS_NAME. - * sysdeps/unix/sysv/linux/shm_open.c [__ASSUME_TMPFS_NAME] - (where_is_shmfs): Don't test for obsolete shm filesystem name. - - * sysdeps/unix/sysv/linux/getsysstats.c: Don't search for proc - mount point. We assume procfs is mounted at /proc in many other - places already. - -2006-01-15 Andreas Jaeger - - [BZ #1950] - * posix/regex_internal.c (re_string_reconstruct): Adjust for - build_wcs_upper_buffer change. - (build_wcs_upper_buffer): Change return type. - - [BZ #2153] - * math/s_cacosh.c (__cacosh): Do not return a negative - value. Patch by Wes Loewer . - * math/s_cacoshl.c (__cacoshl): Likewise. - * math/s_cacoshf.c (__cacoshf): Likewise. - * math/libm-test.inc (cacosh_test): Adjust for change. - - * sysdeps/alpha/fpu/libm-test-ulps: Adopt for cacosh test change. - * sysdeps/hppa/fpu/libm-test-ulps: Likewise. - * sysdeps/i386/fpu/libm-test-ulps: Likewise. - * sysdeps/ia64/fpu/libm-test-ulps: Likewise. - * sysdeps/m68k/fpu/libm-test-ulps: Likewise. - * sysdeps/mips/fpu/libm-test-ulps: Likewise. - * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. - * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. - * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. - - [BZ #2079] - * libio/fputwc_u.c (fputwc_unlocked): Fix return value. - * libio/getwc_u.c (__getwc_unlocked): Likewise. - * libio/wfileops.c (_IO_wdo_write): Likewise. - - [BZ #2078] - * libio/fputwc.c (fputwc): Use proper type for result. - * libio/ioungetwc.c (ungetwc): Likewise. - -2006-01-14 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/sched.h: Define SCHED_BATCH. - -2006-01-14 Roland McGrath - - * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Don't try - attribute_hidden here. - * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c (vsyslog): Restore - attribute_hidden here. - * sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c (__asprintf): Likewise. - * sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c (fprintf): Likewise. - * sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c (qecvt): Likewise. - * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c (qfcvt): Likewise. - * sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c (qgcvt): Likewise. - - * sysdeps/ieee754/ldbl-opt/configure.in: Use AC_TRY_COMPILE and - verify __LONG_DOUBLE_128__ predefine. - * sysdeps/ieee754/ldbl-opt/configure: Regenerated. - - * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_HIDDEN): Removed. - (NLDBL_DECL): Rewritten. - Remove __THROW from NLDBL_DECL uses. - Use NLDBL_DECL for __vstrfmon_l. - (__nldbl___vsyslog_chk): Restore missing decl. - * sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: Restore attribute_hidden. - -2006-01-14 Jakub Jelinek - - * misc/sys/cdefs.h (__LDBL_REDIR1_DECL): Define. - (__LDBL_REDIR_DECL): Stringize __nldbl and name. - * stdlib/bits/monetary-ldbl.h: Remove pastos from wchar-ldbl.h. - (strfmon, strfmon_l): Add __LDBL_REDIR_DECL. - * stdlib/bits/stdlib-ldbl.h (strtold, strtold_l, __strtold_internal, - qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): Use __LDBL_REDIR1_DECL - instead of __LDBL_REDIR_DECL. - * wcsmbs/bits/wchar-ldbl.h: Remove stale #if. - (__LDBL_REDIR_WCHAR): Remove. - (fwprintf, wprintf, swprintf, vfwprintf, vwprintf, vswprintf, - fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Use - __LDBL_REDIR_DECL instead of __LDBL_REDIR_WCHAR. - (wcstold, wcstold_l, __wcstold_internal): Add __LDBL_REDIR1_DECL. - * wcsmbs/wchar.h: Include bits/wchar-ldbl.h after bits/wchar2.h - instead of before it. - (wcstold inline): Move #ifndef __LDBL_COMPAT before - extern keyword. - * libio/bits/stdio-ldbl.h (__snprintf_chk, __vsnprintf_chk): Add - __LDBL_REDIR_DECL. - * misc/bits/syslog-ldbl.h (vsyslog): Protect with #ifdef __USE_BSD. - (__syslog_chk, __vsyslog_chk): Add __LDBL_REDIR_DECL. - -2006-01-14 Roland McGrath - - * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Fix typo. - (NLDBL_HIDDEN): New macro. - (NLDBL_DECL): Use it in place of attribute_hidden. - - * misc/efgcvt.c: Include instead of . - * misc/efgcvt_r.c: Likewise. - - * sysdeps/unix/sysv/linux/sparc/sparc32/nldbl-abi.h: New file. - * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: #include - to define LONG_DOUBLE_COMPAT_VERSION. Use that in place of - NLDBL_VERSION. - * sysdeps/ieee754/ldbl-opt/Versions: Include . - * sysdeps/unix/sysv/linux/sparc/sparc32/Versions: Revert last change. - -2006-01-14 Jakub Jelinek - - * math/math.h [__NO_LONG_DOUBLE_MATH] (__nldbl_nexttowardf): New - prototype. - (nexttowardf): Redirect to __nldbl_nexttowardf. - (nexttoward): Redirect to nextafter. - (__MATHDECL_2, __MATHDECL_1): Redirect *l functions to - non-*l versions if __LONG_DOUBLE_MATH_OPTIONAL and - __NO_LONG_DOUBLE_MATH. - * math/complex.h (__MATHDECL_1): Likewise. - * math/bits/mathcalls.h (nexttoward): Don't prototype if - __LDBL_COMPAT. - * misc/sys/cdefs.h: Include . - (__LDBL_COMPAT, __LDBL_REDIR1, __LDBL_REDIR, __LDBL_REDIR1_NTH, - __LDBL_REDIR_NTH, __LDBL_REDIR_DECL): New macros. - - * libio/bits/stdio-ldbl.h: New file. - * libio/Makefile (headers): Add it. - * libio/stdio.h [__LDBL_COMPAT]: #include it. - * libio/bits/libio-ldbl.h: New file. - * libio/Makefile (headers): Add it. - * libio/libio.h [__LDBL_COMPAT]: #include it. - * libio/libioP.h: Include . - * include/wchar.h (__fwprintf, __vfwprintf): Fix commented out - attribute. - (__vfwprintf_chk): New prototype. Add libc_hidden_proto. - * wcsmbs/bits/wchar-ldbl.h: New file. - * wcsmbs/Makefile (headers): Add it. - * wcsmbs/wchar.h [__LDBL_COMPAT]: #include it. - * wcsmbs/bits/wchar2.h (__vswprintf_alias): Removed. - (vswprintf): Define as a macro rather than inline function. - * stdio-common/bits/printf-ldbl.h: New file. - * stdio-common/Makefile (headers): Add it. - * stdio-common/printf.h [__LDBL_COMPAT]: #include it. - * libio/fwprintf.c: Include libioP.h. - (fwprintf): Use ldbl_weak_alias instead of weak_alias. - * libio/fwscanf.c: Include libioP.h. - (fwscanf): Rename to __fwscanf and add ldbl_strong_alias. - * libio/iovdprintf.c (vdprintf): Use ldbl_weak_alias instead of - weak_alias. - * libio/iovsprintf.c (_IO_vsprintf): Rename to __IO_vsprintf, - add ldbl_strong_alias and use INTDEF2 instead of INTDEF. - (vsprintf): Use ldbl_weak_alias instead of weak_alias. - * libio/iovsscanf.c (__vsscanf, vsscanf): Use ldbl_weak_alias - instead of weak_alias. - * libio/iovswscanf.c (vswscanf): Rename to __vswscanf, - add ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - * libio/obprintf.c (obstack_printf, obstack_vprintf): Use - ldbl_weak_alias instead of weak_alias. - * libio/swprintf.c: Include libioP.h. - (swprintf): Rename to __swprintf and add ldbl_strong_alias. - * libio/swscanf.c: Include libioP.h. - (swscanf): Rename to __swscanf and add ldbl_strong_alias. - * libio/vasprintf.c (vasprintf): Use ldbl_weak_alias instead of - weak_alias. - * libio/vscanf.c (vscanf): Use ldbl_weak_alias instead of - weak_alias. - * libio/vsnprintf.c (__vsnprintf, vsnprintf): Use ldbl_weak_alias - instead of weak_alias. - * libio/vswprintf.c (__vswprintf): Remove alias. - (vswprintf): Use ldbl_weak_alias instead of weak_alias. - * libio/vwprintf.c: Include libioP.h. - (vwprintf): Rename to __vwprintf and add ldbl_strong_alias. - * libio/vwscanf.c (vwscanf): Rename to __vwscanf and add - ldbl_strong_alias. - * libio/wprintf.c: Include libioP.h. - (wprintf): Rename to __wprintf and add ldbl_strong_alias. - * libio/wscanf.c: Include libioP.h. - (wscanf): Rename to __wscanf and add ldbl_strong_alias. - * stdio-common/asprintf.c (__asprintf): Rename to ___asprintf, add - ldbl_strong_alias and use INTDEF2 instead of INTDEF. - (asprintf): Use ldbl_weak_alias instead of weak_alias. - * stdio-common/dprintf.c (dprintf): Rename to __dprintf, add - ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - * stdio-common/fprintf.c: Include libioP.h. - (fprintf): Rename to __fprintf, add ldbl_strong_alias and - use ldbl_hidden_def instead of libc_hidden_def. - (_IO_fprintf): Use ldbl_weak_alias instead of weak_alias. - * stdio-common/fscanf.c: Include libioP.h. - (fscanf): Rename to __fscanf and add ldbl_strong_alias. - * stdio-common/printf.c: Include libioP.h. - (printf): Rename to __printf and add ldbl_strong_alias. - (_IO_printf): Use ldbl_strong_alias instead of strong_alias. - * stdio-common/printf_fp.c (__printf_fp): Rename to __printf_fp, add - ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - * stdio-common/printf_size.c (printf_size): Rename to __printf_size - and add ldbl_strong_alias. - * stdio-common/scanf.c (scanf): Rename to __scanf and add - ldbl_strong_alias. - * stdio-common/snprintf.c (snprintf): Use ldbl_weak_alias instead of - weak_alias. - * stdio-common/sprintf.c (sprintf): Rename to __sprintf, add - ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - (_IO_sprintf): Use ldbl_strong_alias instead of strong_alias. - * stdio-common/sscanf.c: Include libioP.h instead of iolibio.h. - (sscanf): Rename to __sscanf and add ldbl_strong_alias. - * stdio-common/vfprintf.c (vfprintf): Define to - _IO_vfprintf_internal. Use ldbl_strong_alias instead. Use - ldbl_hidden_def instead of libc_hidden_def. - (_IO_vfprintf_internal): Clear is_long_double if __ldbl_is_dbl, - handle the argument as double if it is non-zero. - (vfwprintf): Use ldbl_weak_alias instead of weak_alias. - (_IO_vfprintf): Add ldbl_strong_alias. - * stdio-common/vfscanf.c (_IO_vfscanf): Rename to - _IO_vfscanf_internal, don't use strtold if __ldbl_is_dbl, add - ldbl_strong_alias. - (vfwscanf): Use ldbl_weak_alias instead of weak_alias. - (__vfscanf): Rename to ___vfscanf, add ldbl_strong_alias and - use ldbl_hidden_def instead of libc_hidden_def. - (vfscanf): Use ldbl_weak_alias instead of weak_alias. - * stdio-common/vprintf.c: Include libioP.h. - (vprintf): Rename to __vprintf and add ldbl_strong_alias. - * debug/fprintf_chk.c (__fprintf_chk): Rename to ___fprintf_chk - and add ldbl_strong_alias. - * debug/printf_chk.c (__printf_chk): Rename to ___printf_chk - and add ldbl_strong_alias. - * debug/snprintf_chk.c: Include libioP.h. - (__snprintf_chk): Rename to ___snprintf_chk and add ldbl_strong_alias. - * debug/sprintf_chk.c: Include libioP.h. - (__sprintf_chk): Rename to ___sprintf_chk and add ldbl_strong_alias. - * debug/vfprintf_chk.c (__vfprintf_chk): Rename to ___vfprintf_chk, - add ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - * debug/vfwprintf_chk.c (__vfwprintf_chk): Add libc_hidden_def. - * debug/vprintf_chk.c (__vprintf_chk): Rename to ___vprintf_chk - and add ldbl_strong_alias. - * debug/vsnprintf_chk.c (__vsnprintf_chk): Rename to ___vsnprintf_chk, - add ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - * debug/vsprintf_chk.c (__vsprintf_chk): Rename to ___vsprintf_chk, - add ldbl_strong_alias and use ldbl_hidden_def instead of - libc_hidden_def. - - * stdlib/stdlib.h (strtold): Don't define inline if [!__LDBL_COMPAT]. - * wcsmbs/wchar.h (wcstold): Likewise. - * stdlib/strtod_l.c: Include math_ldbl_opt.h. - (____STRTOF_INTERNAL): Define. - (INTERNAL (__STRTOF)): Rename to ____STRTOF_INTERNAL. - (__STRTOF): Call ____STRTOF_INTERNAL instead. - [LONG_DOUBLE_COMPAT] (strtold_l, wcstold_l, __strtold_l, __wcstold_l): - Add compatibility symbols. - * stdlib/strtod.c: Include math_ldbl_opt.h. - [LONG_DOUBLE_COMPAT] (strtold, wcstold, __strtold_internal, - __wcstold_internal): Add compatibility symbols. - * stdlib/strtold.c: Include bits/wordsize.h, wchar.h. - (NEW, NEW1): Define. - (__new_strtold, __new_wcstold): New prototypes. - (____new_strtold_internal, ____new_wcstold_internal): Likewise. - Add libc_hidden_proto. - (STRTOF): Define to NEW (*told). - [__LONG_DOUBLE_MATH_OPTIONAL] (wcstold, strtold): Add - long_double_symbol. - [__LONG_DOUBLE_MATH_OPTIONAL] (__wcstold_internal, - __strtold_internal): Likewise. Add libc_hidden_ver. - - * stdlib/bits/stdlib-ldbl.h: New file. - * stdlib/Makefile (headers): Add it. - * stdlib/stdlib.h [__LDBL_COMPAT]: #include it. - * include/stdlib.h (ecvt_r, fcvt_r, qecvt_r, qfcvt_r): Remove - libc_hidden_proto. - (__ecvt, __fcvt, __gcvt, __ecvt_r, __fcvt_r, __qecvt, __qfcvt, - __qgcvt, __qecvt_r, __qfcvt_r): New prototypes. - * misc/efgcvt_r.c: Include shlib-compat.h. - (LONG_DOUBLE_CVT): Define. - (__APPEND, __APPEND2): Define. - (*fcvt_r): Use __APPEND instead of APPEND. Remove libc_hidden_def. - (*ecvt_r): Likewise. - (cvt_symbol): Define. Use it on fcvt_r and ecvt_r. - * misc/efgcvt.c: Include shlib-compat.h. - (LONG_DOUBLE_CVT): Define. - (__APPEND, __APPEND2): Define. - (fcvt): Use __APPEND instead of APPEND. Remove libc_hidden_def. - (ecvt, gcvt): Likewise. - (cvt_symbol): Define. Use it on fcvt, ecvt and gcvt. - - * stdlib/bits/monetary-ldbl.h: New file. - * stdlib/Makefile (headers): Add it. - * stdlib/monetary.h [__LDBL_COMPAT]: #include it. - * stdlib/strfmon.c: Include math_ldbl_opt.h. - (strfmon): Rename to __strfmon and add ldbl_strong_alias. - * stdlib/strfmon_l.c: Remove all traces of [!USE_IN_LIBIO]. - (__vstrfmon_l): Don't set is_long_double if __ldbl_is_dbl. - (__strfmon_l): Rename to ___strfmon_l and add ldbl_strong_alias. - (strfmon_l): Use ldbl_weak_alias instead of weak_alias. - - * misc/bits/syslog-ldbl.h: New file. - * misc/Makefile (headers): Add it. - * misc/sys/syslog.h [__LDBL_COMPAT]: #include it. - * misc/syslog.c: Include math_ldbl_opt.h. - (syslog): Rename to __syslog and add ldbl_strong_alias, - use ldbl_hidden_def instead of libc_hidden_def. - (vsyslog): Rename to __vsyslog and add ldbl_strong_alias, - use ldbl_hidden_def instead of libc_hidden_def. - - * sysdeps/generic/math_ldbl_opt.h: New file. - * math/w_j1l.c (j1l, y1l): Rename to __ prefixed variants. - Add weak_alias. - * math/w_j0l.c (j0l, y0l): Likewise. - * math/w_jnl.c (jnl, ynl): Likewise. - * sysdeps/ieee754/ldbl-96/s_nexttoward.c - (__nexttowardl): Remove strong_alias. - (nexttowardl): Remove weak_alias. - * sysdeps/ieee754/ldbl-96/s_erfl.c - (__erfl, __erfcl): Remove strong_alias. - (erfl, erfcl): Remove weak_alias. - - * sysdeps/ieee754/ldbl-64-128/s_asinhl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_atanl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_cbrtl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_ceill.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_copysignl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_cosl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_erfl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_expm1l.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_fabsl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_finitel.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_floorl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_fpclassifyl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_frexpl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_isinfl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_isnanl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_llrintl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_llroundl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_log1pl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_logbl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_lrintl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_lroundl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_modfl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_nextafterl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_nexttoward.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_nexttowardf.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_remquol.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_rintl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_roundl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_scalblnl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_signbitl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_sincosl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_sinl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_tanhl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_tanl.c: New file. - * sysdeps/ieee754/ldbl-64-128/s_truncl.c: New file. - * sysdeps/ieee754/ldbl-64-128/strtold_l.c: New file. - * sysdeps/ieee754/ldbl-64-128/w_expl.c: New file. - * sysdeps/ieee754/ldbl-opt/configure.in: New file. - * sysdeps/ieee754/ldbl-opt/configure: New file. - * sysdeps/ieee754/ldbl-opt/Makefile: New file. - * sysdeps/ieee754/ldbl-opt/Versions: New file. - * sysdeps/ieee754/ldbl-opt/cabs.c: New file. - * sysdeps/ieee754/ldbl-opt/cabsl.c: New file. - * sysdeps/ieee754/ldbl-opt/carg.c: New file. - * sysdeps/ieee754/ldbl-opt/cargl.c: New file. - * sysdeps/ieee754/ldbl-opt/cimag.c: New file. - * sysdeps/ieee754/ldbl-opt/cimagl.c: New file. - * sysdeps/ieee754/ldbl-opt/conj.c: New file. - * sysdeps/ieee754/ldbl-opt/conjl.c: New file. - * sysdeps/ieee754/ldbl-opt/creal.c: New file. - * sysdeps/ieee754/ldbl-opt/creall.c: New file. - * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c: New file. - * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-acos.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-acosh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-asin.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-atan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-atan2.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-atanh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cabs.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cacos.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-carg.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-casin.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-casinh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-catan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-catanh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ccos.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ceil.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cexp.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cimag.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-clog.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-clog10.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-compat.h: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-conj.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-copysign.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cos.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cosh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cpow.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-cproj.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-creal.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-csin.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-csinh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ctan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-drem.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-erf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-erfc.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-exp.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-exp10.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-exp2.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-expm1.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fabs.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fdim.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-finite.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-floor.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fma.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fmax.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fmin.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fmod.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-frexp.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-gamma.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-hypot.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-isinf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-isnan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-j0.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-j1.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-jn.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-llrint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-llround.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-log.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-log10.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-log1p.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-log2.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-logb.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-lrint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-lround.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-modf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-nan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-pow.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-printf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-remainder.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-remquo.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-rint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-round.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-scalb.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-scanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-signbit.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-significand.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sin.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sincos.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sinh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-strtold.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-syslog.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-tan.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-tanh.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-trunc.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-y0.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-y1.c: New file. - * sysdeps/ieee754/ldbl-opt/nldbl-yn.c: New file. - * sysdeps/ieee754/ldbl-opt/s_asinh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_atan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cacos.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cacosh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cacoshl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cacosl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_casin.c: New file. - * sysdeps/ieee754/ldbl-opt/s_casinh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_casinhl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_casinl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_catan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_catanh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_catanhl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_catanl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cbrt.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ccos.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ccosh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ccoshl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ccosl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ceil.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cexp.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cexpl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_clog.c: New file. - * sysdeps/ieee754/ldbl-opt/s_clog10.c: New file. - * sysdeps/ieee754/ldbl-opt/s_clog10l.c: New file. - * sysdeps/ieee754/ldbl-opt/s_clogl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_copysign.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cpow.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cpowl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cproj.c: New file. - * sysdeps/ieee754/ldbl-opt/s_cprojl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csin.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csinh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csinhl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csinl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csqrt.c: New file. - * sysdeps/ieee754/ldbl-opt/s_csqrtl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ctan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ctanh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ctanhl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ctanl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_erf.c: New file. - * sysdeps/ieee754/ldbl-opt/s_expm1.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fabs.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fdim.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fdiml.c: New file. - * sysdeps/ieee754/ldbl-opt/s_finite.c: New file. - * sysdeps/ieee754/ldbl-opt/s_floor.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fma.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fmal.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fmax.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fmaxl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fmin.c: New file. - * sysdeps/ieee754/ldbl-opt/s_fminl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_frexp.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ilogb.c: New file. - * sysdeps/ieee754/ldbl-opt/s_isinf.c: New file. - * sysdeps/ieee754/ldbl-opt/s_isnan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ldexp.c: New file. - * sysdeps/ieee754/ldbl-opt/s_ldexpl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_llrint.c: New file. - * sysdeps/ieee754/ldbl-opt/s_llround.c: New file. - * sysdeps/ieee754/ldbl-opt/s_log1p.c: New file. - * sysdeps/ieee754/ldbl-opt/s_logb.c: New file. - * sysdeps/ieee754/ldbl-opt/s_lrint.c: New file. - * sysdeps/ieee754/ldbl-opt/s_lround.c: New file. - * sysdeps/ieee754/ldbl-opt/s_modf.c: New file. - * sysdeps/ieee754/ldbl-opt/s_nan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_nanl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_nearbyint.c: New file. - * sysdeps/ieee754/ldbl-opt/s_nextafter.c: New file. - * sysdeps/ieee754/ldbl-opt/s_remquo.c: New file. - * sysdeps/ieee754/ldbl-opt/s_rint.c: New file. - * sysdeps/ieee754/ldbl-opt/s_round.c: New file. - * sysdeps/ieee754/ldbl-opt/s_scalbln.c: New file. - * sysdeps/ieee754/ldbl-opt/s_scalbn.c: New file. - * sysdeps/ieee754/ldbl-opt/s_significand.c: New file. - * sysdeps/ieee754/ldbl-opt/s_significandl.c: New file. - * sysdeps/ieee754/ldbl-opt/s_sin.c: New file. - * sysdeps/ieee754/ldbl-opt/s_sincos.c: New file. - * sysdeps/ieee754/ldbl-opt/s_tan.c: New file. - * sysdeps/ieee754/ldbl-opt/s_tanh.c: New file. - * sysdeps/ieee754/ldbl-opt/s_trunc.c: New file. - * sysdeps/ieee754/ldbl-opt/w_acos.c: New file. - * sysdeps/ieee754/ldbl-opt/w_acosh.c: New file. - * sysdeps/ieee754/ldbl-opt/w_acoshl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_acosl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_asin.c: New file. - * sysdeps/ieee754/ldbl-opt/w_asinl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_atan2.c: New file. - * sysdeps/ieee754/ldbl-opt/w_atan2l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_atanh.c: New file. - * sysdeps/ieee754/ldbl-opt/w_atanhl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_cosh.c: New file. - * sysdeps/ieee754/ldbl-opt/w_coshl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_drem.c: New file. - * sysdeps/ieee754/ldbl-opt/w_dreml.c: New file. - * sysdeps/ieee754/ldbl-opt/w_exp.c: New file. - * sysdeps/ieee754/ldbl-opt/w_exp10.c: New file. - * sysdeps/ieee754/ldbl-opt/w_exp10l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_fmod.c: New file. - * sysdeps/ieee754/ldbl-opt/w_fmodl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_hypot.c: New file. - * sysdeps/ieee754/ldbl-opt/w_hypotl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_j0.c: New file. - * sysdeps/ieee754/ldbl-opt/w_j0l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_j1.c: New file. - * sysdeps/ieee754/ldbl-opt/w_j1l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_jn.c: New file. - * sysdeps/ieee754/ldbl-opt/w_jnl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_lgamma.c: New file. - * sysdeps/ieee754/ldbl-opt/w_lgamma_r.c: New file. - * sysdeps/ieee754/ldbl-opt/w_lgammal.c: New file. - * sysdeps/ieee754/ldbl-opt/w_lgammal_r.c: New file. - * sysdeps/ieee754/ldbl-opt/w_log.c: New file. - * sysdeps/ieee754/ldbl-opt/w_log10.c: New file. - * sysdeps/ieee754/ldbl-opt/w_log10l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_log2.c: New file. - * sysdeps/ieee754/ldbl-opt/w_log2l.c: New file. - * sysdeps/ieee754/ldbl-opt/w_logl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_pow.c: New file. - * sysdeps/ieee754/ldbl-opt/w_powl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_remainder.c: New file. - * sysdeps/ieee754/ldbl-opt/w_remainderl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_scalb.c: New file. - * sysdeps/ieee754/ldbl-opt/w_scalbl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_sinh.c: New file. - * sysdeps/ieee754/ldbl-opt/w_sinhl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_sqrt.c: New file. - * sysdeps/ieee754/ldbl-opt/w_sqrtl.c: New file. - * sysdeps/ieee754/ldbl-opt/w_tgamma.c: New file. - * sysdeps/ieee754/ldbl-opt/w_tgammal.c: New file. - - * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/Implies: New file. - * sysdeps/sparc/sparc32/Implies: Move ldbl-128 first and flt-32 - after dbl-64. - * sysdeps/unix/sysv/linux/sparc/sparc32/Versions (NLDBL_VERSION): - %define this to to GLIBC_2.4. - * sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file. - * sysdeps/sparc/sparc32/fpu/s_fabs.c: New file. - * sysdeps/sparc/sparc32/fpu/s_fabsf.S: New file. - * sysdeps/sparc/sparc32/fpu/s_fabsl.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_qtoui.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_qtoux.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_qtox.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_uitoq.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_xtoq.c: Removed. - * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: New file. - * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: New file. - * sysdeps/sparc/sparc32/soft-fp/Versions: New file. - * sysdeps/sparc/fpu/bits/mathinline.h (__unordered_cmp, - __unordered_v9cmp): Define differently depending on - -m32 -mlong-double-{64,128}. - (__signbitl, sqrtl, __ieee754_sqrtl): New inlines. - * sysdeps/sparc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. - * sysdeps/sparc/sparc32/soft-fp/Makefile (sparc32-quad-routines): - Set. - (sysdep-routines): Add sparc32-quad-routines. - * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Include stdlib.h. - (FP_HANDLE_EXCEPTIONS): Call ___Q_simulate_exceptions as a normal - function. - * sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): New - alias to _Q_sqrt. - * sysdeps/sparc/sparc32/soft-fp/q_div.c (_Q_div): Fix a typo. - * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Include stdlib.h. - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. - - * libio/libio.h (_IO_vfscanf, _IO_vfprintf): Remove __THROW. - (_IO_vfwscanf, _IO_vfwprintf): Likewise. - * libio/libioP.h (_IO_vdprintf): Likewise. - -2006-01-13 Richard Henderson - - * sysdeps/unix/sysv/linux/alpha/sysdep.h (PTR_MANGLE, PTR_MANGLE2, - PTR_DEMANGLE, PTR_DEMANGLE2): Move ... - * sysdeps/unix/alpha/sysdep.h: ... here. - * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Define __GI___fxstatat64. - -2006-01-13 Andreas Jaeger - - * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (ELF_NVRREG): Fix - value for PowerPC64. - -2006-01-12 Roland McGrath - - * sysdeps/s390/jmpbuf-offsets.h: New file. - * sysdeps/s390/jmpbuf-unwind.h: Include it. - - * sysdeps/alpha/__longjmp.S: Include - instead of . - * sysdeps/alpha/setjmp.S: Likewise. - * sysdeps/i386/__longjmp.S: Likewise. - * sysdeps/i386/bsd-_setjmp.S: Likewise. - * sysdeps/i386/bsd-setjmp.S: Likewise. - * sysdeps/i386/setjmp.S: Likewise. - * sysdeps/powerpc/powerpc32/__longjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: - * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. - * sysdeps/sh/sh3/setjmp.S: Likewise. - * sysdeps/sh/sh4/setjmp.S: Likewise. - * sysdeps/sparc/sparc32/__longjmp.S: Likewise. - * sysdeps/sparc/sparc32/setjmp.S: Likewise. - * sysdeps/x86_64/__longjmp.S: Likewise. - * sysdeps/x86_64/setjmp.S: Likewise. - * sysdeps/mach/hurd/i386/longjmp-ts.c: Include . - * sysdeps/mach/hurd/powerpc/longjmp-ts.c: Likewise. - * sysdeps/mach/hurd/alpha/longjmp-ts.c: Likewise. - * sysdeps/alpha/jmpbuf-unwind.h: Likewise. - * sysdeps/hppa/jmpbuf-unwind.h: Likewise. - * sysdeps/i386/jmpbuf-unwind.h: Likewise. - * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. - * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. - * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. - * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. - * setjmp/jmpbuf-offsets.h: File removed. - * include/bits/setjmp.h: File removed. - -2006-01-11 Ulrich Drepper - - * libio/wmemstream.c: New file. - * libio/stdio.h: Declare open_wmemstream. - * libio/Versions: Export open_wmemstream for GLIBC_2.4. - * libio/Makefile (routines): Add wmemstream. - (tests): Add tst-memstream1, tst-memstream2, tst-wmemstream2, and - tst-wmemstream2. - * libio/tst-memstream1.c: New file. - * libio/tst-memstream2.c: New file. - * libio/tst-wmemstream1.c: New file. - * libio/tst-wmemstream2.c: New file. - - * libio/memstream.c (_IO_mem_sync): Remove useless call to - _IO_default_sync. - - * elf/check-textrel.c: Add missing argument. - - * Makerules: Define build-module-asneeded. - * iconvdata/extra-module.mk: Use build-module-asneeded. - needed. - -2006-01-09 Richard Henderson - - * iconvdata/extra-module.mk ($(objpfx)$(mod).so): Depend on ld.so. - * sysdeps/alpha/__longjmp.S: Use PTR_DEMANGLE. - * sysdeps/alpha/setjmp.S: Likewise. Avoid __sigjmp_save for rtld; - tailcall in libc.so. - * sysdeps/unix/sysv/linux/alpha/sysdep.h (PTR_MANGLE): Define. - (PTR_MANGLE2): Define. - -2006-01-11 Ulrich Drepper - - * elf/check-localplt.c: New file. - * elf/Makefile: Add rules to build and run check-localplt. - * scripts/data/localplt-x86_64-linux-gnu.data: New file. - * scripts/data/localplt-i386-linux-gnu.data: New file. - - * include/sys/stat.h: Add libc_hidden_proto for __fxstatat64. - * sysdeps/unix/sysv/linux/fxstatat64.c: Add libc_hidden_def for - __fxstatat64. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Add - __GI___fxstatat64 alias. - - * libio/memstream.c (_IO_mem_finish): Fix potential memory leak if - realloc fails. - - * include/sched.h: Add libc_hidden_proto for __sched_yield. - - * libio/genops.c (_IO_unbuffer_write): Give concurrently running - threads the chance to work correctly by trying to lock the stream. - If this does not work, proceed without locking. - -2006-01-10 Ulrich Drepper - - * libio/genops.c (_IO_unbuffer_write): Don't always free the - buffer. This is not necessary except in debug mode. If we don't - free the buffer but the FILE structure to a list. - (buffer_free): New function. Free buffers or tell _IO_unbuffer_write - to do so. - * libio/libio.h (struct _IO_FILE): Add new members to keep track - of which buffers have to be freed. - - * iconv/gconv_cache.c (free_mem): Don't call munmap if gconv_cache - is NULL. - -2005-10-14 Paul Eggert - - * malloc/obstack.c: Fix old comments. Update FSF snail mail address. - * malloc/obstack.h: Likewise. - - [BZ #321] - Fix portability bugs encountered when porting to Itanium. - * malloc/obstack.h (obstack_empty_p, obstack_finish): Do not - assume that the "contents" member is suitably aligned. It is - not, for some hosts and alignments: e.g., Itanium, long-double. - * malloc/obstack.c (_obstack_begin, _obstack_begin_1, - _obstack_newchunk): Likewise. - * malloc/obstack.c: Include , for size_t. - Include , if needed and available. - (DEFAULT_ALIGNMENT): Now an enum constant, not a macro. - Use C89 offsetof rather than K&R trick. - Use the maximum alignment of uintmax_t, long double, void * - rather than the alignment of double. - (union fooround): Use uintmax_t, long double, void * members - rather than just long and double. - - [BZ #321] - Fix portability bugs encountered when porting to the IBM iSeries, - where pointers are 256 bits wide and no integers are that wide. - * malloc/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove. - All uses changed to: - (__BPTR_ALIGN, __PTR_ALIGN): New macros. - (struct _obstack_chunk.temp): Change from int to a union - of pointer and int. All uses changed. - - [BZ #321] - * malloc/obstack.c (print_and_abort) [!_LIBC]: - Call fprintf (stderr, ...), not __fxprintf (NULL, ...). - [_LIBC && USE_IN_LIBIO]: Don't include ; no longer needed. - -2006-01-10 Derek Price - Paul Eggert - - [BZ #1060] - * posix/glob.c: Assume freestanding C89 compiler. Simplify cruft that - may be replaced with GNULIB modules. Make no attempt to find 64-bit - versions of file access functions directly when [!_LIBC]. - Don't define GLOB_* macros here. - (DIRENT_MUST_BE, DIRENT_MIGHT_BE_SYMLINK, DIRENT_MIGHT_BE_DIR): New - macros to abstract dirent->d_type access. - (GETPW_R_SIZE_MAX, GET_LOGIN_NAME_MAX): New macros to abstract sysconf - access. - -2006-01-10 Roland McGrath - - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h - (PTR_MANGLE): Fix cast. - - * timezone/test-tz.c: Revert last change, updating to match - tzdata2005r definition of "MST". - -2006-01-10 Ulrich Drepper - - * include/bits/setjmp.h: Don't include jmpbuf-offsets.h if _ISOMAC is - defined. - -2006-01-10 Andreas Jaeger - - * include/time.h: Use normal comments. - -2006-01-10 Thomas Schwinge - - * hurd/sigunwind.c: Include instead of . - * sysdeps/mach/hurd/jmp-unwind.c: Likewise. - -2006-01-10 Jakub Jelinek - - * wcsmbs/bits/wchar2.h (vswprintf): Call __vswprintf_alias rather than - vswprintf recursively. - -2006-01-10 Ulrich Drepper - - * sysdeps/x86_64/bits/setjmp.h: Add back accidently removed #endif. - -2006-01-10 Roland McGrath - - * include/bits/setjmp.h: New file. - * setjmp/jmpbuf-offsets.h: New file. - * sysdeps/alpha/bits/setjmp.h: Move JB_* macros ... - * sysdeps/alpha/jmpbuf-offsets.h: ... here, new file. - * sysdeps/hppa/bits/setjmp.h (JB_SP): Macro moved ... - * sysdeps/hppa/jmpbuf-offsets.h: ... here, new file. - * sysdeps/i386/bits/setjmp.h: Move JB_* macros ... - * sysdeps/i386/jmpbuf-offsets.h: ... here, new file. - * sysdeps/mips/bits/setjmp.h (JB_PC): Macro removed. - * sysdeps/powerpc/bits/setjmp.h: Move JB_* macros ... - * sysdeps/powerpc/jmpbuf-offsets.h: ... here, new file. - * sysdeps/s390/bits/setjmp.h: Remove __JB_* macros. - * sysdeps/sh/bits/setjmp.h (JB_SIZE): Macro moved ... - * sysdeps/sh/jmpbuf-offsets.h: ... here, new file. - * sysdeps/sparc/sparc32/bits/setjmp.h: Move JB_* macros ... - * sysdeps/sparc/sparc32/jmpbuf-offsets.h: ... here, new file. - * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Remove JB_* macros. - * sysdeps/x86_64/bits/setjmp.h: Move JB_* macros ... - * sysdeps/x86_64/jmpbuf-offsets.h: ... here, new file. - - * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/powerpc/jmpbuf-unwind.h: ... here. - * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/alpha/jmpbuf-unwind.h: ... here. - * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/sparc/sparc32/jmpbuf-unwind.h: ... here. - * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/i386/jmpbuf-unwind.h: ... here. - * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/x86_64/jmpbuf-unwind.h: ... here. - * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/sh/jmpbuf-unwind.h: ... here. - * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/hppa/jmpbuf-unwind.h: ... here, new file. - * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/mips/jmpbuf-unwind.h: ... here. - * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/m68k/jmpbuf-unwind.h: ... here, new file. - * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... - * sysdeps/s390/jmpbuf-unwind.h: ... here. - * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): - Move macro ... - * sysdeps/ia64/jmpbuf-unwind.h: ... here. - * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): - Move macro ... - * sysdeps/sparc/sparc64/jmpbuf-unwind.h: ... here. - - * sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/. - * sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/. - - * sysdeps/linkmap.h: File removed. - -2006-01-07 Carlos O'Donell - - * sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocations - by using LR and RR. Add %sr0 to iitlbp. - -2006-01-09 Roland McGrath - - * timezone/private.h: Update from tzcode2005r. - * timezone/tzfile.h: Likewise. - * timezone/zdump.c: Likewise. - * timezone/zic.c: Likewise. - * timezone/africa: Update from tzdata2005r. - * timezone/antarctica: Likewise. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/backward: Likewise. - * timezone/europe: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - * timezone/systemv: Likewise. - - * elf/Makefile ($(objpfx)reldep5.out): Fix dependency typo, - so we depend on $(objpfx)reldepmod6.so as intended. - -2006-01-09 Ulrich Drepper - - [BZ #2126] - * sysdeps/i386/i686/strtok.S: Store pointer to NUL byte if NULL is - returned. - * sysdeps/i386/strtok.S: Likewise. - * sysdeps/x86_64/strtok.S: Likewise. - * string/Makefile (tests): Add bug-strtok1. - * string/bug-strtok1.c: New file. - - * elf/check-textrel.c (AB): Also check for writable and executable - segments. - - * sysdeps/ieee754/dbl-64/e_exp2.c: Remove section attribute from - const variables, gas produces garbage. - * sysdeps/ieee754/flt-32/e_exp2f.c: Likewise. - * sysdeps/ieee754/flt-32/e_expf.c: Likewise. - * sysdeps/ieee754/flt-32/s_expm1f.c: Likewise. - -2006-01-09 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): Add - stack bias to mc_fp field. - - * sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h - (struct kernel_stat): Rename st_[amc]time fields to st_[amc]time_sec. - (struct kernel_stat64): New type. - (_HAVE___UNUSED1, _HAVE___UNUSED2, _HAVE_STAT___UNUSED1, - _HAVE_STAT___UNUSED2, _HAVE_STAT___UNUSED3, _HAVE_STAT___UNUSED4, - _HAVE_STAT___UNUSED5, _HAVE_STAT___PAD1, _HAVE_STAT___PAD2, - _HAVE_STAT64___UNUSED1, _HAVE_STAT64___UNUSED2, - _HAVE_STAT64___UNUSED3, _HAVE_STAT64___UNUSED4, - _HAVE_STAT64___UNUSED5, _HAVE_STAT64___PAD1, _HAVE_STAT64___PAD2): - Remove. - * sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Use i386/xstat.c. - * sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: - Use i386/fxstatat.c. - * sysdeps/unix/sysv/linux/sparc/sparc64/lxstat.c: Use i386/lxstat.c. - * sysdeps/unix/sysv/linux/sparc/sparc64/xstatconv.c: New file. - * sysdeps/unix/sysv/linux/sparc/bits/stat.h (struct stat, - struct stat64): Add nsec resolution for 64-bit code like already done - for 32-bit code. - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL): Don't define - for sparc64. - (__ASSUME_STAT64_SYSCALL): Only define for sparc64 for >= 2.6.12 - kernels. - - * scripts/data/c++-types-sparc-linux-gnu.data: New file. - * scripts/data/c++-types-sparc64-linux-gnu.data: New file. - * scripts/data/c++-types-alpha-linux-gnu.data: Adjust. - -2006-01-08 Roland McGrath - - [BZ #1535] - * sysdeps/unix/get_child_max.c: New file. - * posix/get_child_max.c: New file. - * posix/Makefile (routines): Add it. - * include/sys/sysinfo.h (__get_child_max): Declare it. - * sysdeps/posix/sysconf.c (__sysconf) [! CHILD_MAX]: Use it. - - * sysdeps/unix/sysv/linux/futimes.c [!__NR_fcntl && __NR_fcntl64]: Use - fcntl64 syscall instead. - - * stdio-common/tst-fmemopen2.c (do_test): Add a cast. - * stdio-common/printf-parsemb.c (__find_specmb): Likewise. - - * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in - #include for kernel-features.h. - * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. - * sysdeps/unix/sysv/linux/check_pf.c: Likewise. - * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise. - * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. - * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. - * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. - * sysdeps/unix/sysv/linux/clock_settime.c: Likewise. - * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. - * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. - * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. - * sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise. - * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/futimes.c: Likewise. - * sysdeps/unix/sysv/linux/futimesat.c: Likewise. - * sysdeps/unix/sysv/linux/fxstat64.c: Likewise. - * sysdeps/unix/sysv/linux/fxstatat64.c: Likewise. - * sysdeps/unix/sysv/linux/getcwd.c: Likewise. - * sysdeps/unix/sysv/linux/getdents.c: Likewise. - * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fchown.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. - * sysdeps/unix/sysv/linux/i386/lockf64.c: Likewise. - * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. - * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. - * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. - * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. - * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. - * sysdeps/unix/sysv/linux/ifreq.c: Likewise. - * sysdeps/unix/sysv/linux/ldsodefs.h: Likewise. - * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. - * sysdeps/unix/sysv/linux/m68k/chown.c: Likewise. - * sysdeps/unix/sysv/linux/m68k/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/mmap64.c: Likewise. - * sysdeps/unix/sysv/linux/msgctl.c: Likewise. - * sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise. - * sysdeps/unix/sysv/linux/opendir.c: Likewise. - * sysdeps/unix/sysv/linux/poll.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/pread.c: Likewise. - * sysdeps/unix/sysv/linux/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/prof-freq.c: Likewise. - * sysdeps/unix/sysv/linux/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise. - * sysdeps/unix/sysv/linux/semctl.c: Likewise. - * sysdeps/unix/sysv/linux/setegid.c: Likewise. - * sysdeps/unix/sysv/linux/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/shmctl.c: Likewise. - * sysdeps/unix/sysv/linux/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/sigpending.c: Likewise. - * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. - * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Likewise. - * sysdeps/unix/sysv/linux/statvfs64.c: Likewise. - * sysdeps/unix/sysv/linux/syslog.c: Likewise. - * sysdeps/unix/sysv/linux/testrtsig.h: Likewise. - * sysdeps/unix/sysv/linux/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/utimes.c: Likewise. - * sysdeps/unix/sysv/linux/xstat64.c: Likewise. - * sysdeps/unix/sysv/linux/xstatconv.h: Likewise. - -2006-01-07 Roland McGrath +2006-09-20 Jakub Jelinek * po/libc.pot: Regenerated. + * po/be.po: Updated. + * po/ca.po: Likewise. + * po/cs.po: Likewise. + * po/da.po: Likewise. + * po/de.po: Likewise. + * po/el.po: Likewise. + * po/en_GB.po: Likewise. + * po/es.po: Likewise. + * po/fi.po: Likewise. + * po/fr.po: Likewise. + * po/gl.po: Likewise. + * po/hr.po: Likewise. + * po/hu.po: Likewise. + * po/ja.po: Likewise. + * po/ko.po: Likewise. + * po/nb.po: Likewise. + * po/nl.po: Likewise. + * po/pl.po: Likewise. + * po/pt_BR.po: Likewise. + * po/ru.po: Likewise. + * po/rw.po: Likewise. + * po/sk.po: Likewise. + * po/sv.po: Likewise. + * po/tr.po: Likewise. + * po/zh_CN.po: Likewise. + * po/zh_TW.po: Likewise. + + [BZ #3137] + * iconv/iconv_prog.c (main): Fix spelling in error message. + * iconv/iconvconfig.c (main): Likewise. + * locale/programs/ld-collate.c (handle_ellipsis): Likewise. + * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Likewise. + * locale/programs/localedef.c (main): Likewise. + * locale/programs/repertoire.c (repertoire_read): Likewise. + * timezone/zdump.c (main): Likewise. + * nscd/connections.c (handle_request): Fix spelling in log message. + Patch by Malcolm Parsons . + +2006-09-20 Ulrich Drepper + + * inet/inet6_option.c: Also emit linker warnings for the RFC 2292 + interfaces. + +2006-09-20 Andreas Jaeger + + * math/libm-test.inc (lrint_test_upward): Fix typo. + +2006-06-17 Joseph S. Myers + + [BZ #2592] + * math/libm-test.inc (lrint_test_tonearest): New function. + (lrint_test_towardzero): New function. + (lrint_test_downward): New function. + (lrint_test_upward): New function. + (main): Run these new tests. + * sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Correct rounding + of values near to 0. + (two52): Use double not long double. + * sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise. + * sysdeps/ieee754/flt-32/s_llrintf.c (__llrintf): Likewise. + (two23): Use float not double. + * sysdeps/ieee754/flt-32/s_lrintf.c (__lrintf): Likewise. + (two23): Use float not double. + * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Likewise. + * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Likewise. + * sysdeps/ieee754/ldbl-96/s_llrintl.c (__llrintl): Likewise. + * sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise. + +2006-09-20 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c (__makecontext): + Cast sp to unsigned long to avoid compiler warning. + Use __makecontext_ret function instead of a trampoline on the stack. + (__makecontext_ret): New function. + * sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c: Likewise. + +2006-09-19 Jakub Jelinek + + * elf/dl-cache.c (HWCAP_CHECK): If _DL_PLATFORMS_COUNT, but + platform == -1, reject any libs with non-zero _DL_HWCAP_PLATFORM + bits. + +2006-09-19 Ulrich Drepper + + * elf/dl-close.c (_dl_close): If dependency is not unloaded make + sure no reference to the unloaded map's search list remains in the + dependency's scope. + +2006-09-16 Jakub Jelinek + + * elf/Makefile: Add rules to build and run unload7 test. + * elf/unload7.c: New test. + * elf/unload7mod1.c: New file. + * elf/unload7mod2.c: New file. + +2006-09-18 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sys/ptrace.h (PT_GETEVENTMSG): Fix pasto. + * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define. + * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise. + * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise. + * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG): Likewise. + (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Change to the arch independent + values. + +2006-09-17 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define. + * sysdeps/unix/sysv/linux/ptrace.c (ptrace): Check PTRACE_SETOPTIONS, + PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO. + +2006-09-16 Jakub Jelinek + + * sysdeps/powerpc/powerpc32/register-dump.h (register_dump): Don't + write '\0' to the fd. + * sysdeps/mach/hurd/powerpc/register-dump.h (register_dump): Likewise. + * sysdeps/powerpc/powerpc64/register-dump.h (register_dump): Likewise. + Change regs to unsigned long pointer from unsigned int, fix fscr + offset. + +2006-09-14 Jakub Jelinek + + * io/Makefile (CFLAGS-fstatat.c): Set. + (CFLAGS-fstatat64.c): Likewise. + (CFLAGS-mknodat.c): Likewise. + + * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Comment fixes. + * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise. + * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Rewritten. + * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Rewritten. - * po/.cvsignore: List libc.pot.files, and not any .pot names. - - * manual/maint.texi (Porting): Don't mention Dist files. - * sysdeps/alpha/soft-fp/Dist: File removed. - * sysdeps/alpha/Dist: File removed. - * sysdeps/i386/i686/Dist: File removed. - * sysdeps/i386/soft-fp/Dist: File removed. - * sysdeps/i386/Dist: File removed. - * sysdeps/mips/soft-fp/Dist: File removed. - * sysdeps/mips/mips64/soft-fp/Dist: File removed. - * sysdeps/mips/mips64/Dist: File removed. - * sysdeps/mips/Dist: File removed. - * sysdeps/wordsize-32/Dist: File removed. - * sysdeps/m68k/fpu/switch/Dist: File removed. - * sysdeps/m68k/fpu/Dist: File removed. - * sysdeps/powerpc/powerpc64/Dist: File removed. - * sysdeps/powerpc/soft-fp/Dist: File removed. - * sysdeps/powerpc/powerpc32/fpu/Dist: File removed. - * sysdeps/powerpc/powerpc32/Dist: File removed. - * sysdeps/powerpc/fpu/Dist: File removed. - * sysdeps/powerpc/Dist: File removed. - * sysdeps/unix/common/Dist: File removed. - * sysdeps/unix/bsd/bsd4.4/Dist: File removed. - * sysdeps/unix/bsd/Dist: File removed. - * sysdeps/unix/sysv/linux/alpha/Dist: File removed. - * sysdeps/unix/sysv/linux/i386/Dist: File removed. - * sysdeps/unix/sysv/linux/mips/mips64/Dist: File removed. - * sysdeps/unix/sysv/linux/mips/Dist: File removed. - * sysdeps/unix/sysv/linux/m68k/Dist: File removed. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/Dist: File removed. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: File removed. - * sysdeps/unix/sysv/linux/powerpc/aix/Dist: File removed. - * sysdeps/unix/sysv/linux/powerpc/Dist: File removed. - * sysdeps/unix/sysv/linux/sparc/sparc32/Dist: File removed. - * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: File removed. - * sysdeps/unix/sysv/linux/sparc/Dist: File removed. - * sysdeps/unix/sysv/linux/ia64/Dist: File removed. - * sysdeps/unix/sysv/linux/s390/s390-64/Dist: File removed. - * sysdeps/unix/sysv/linux/s390/Dist: File removed. - * sysdeps/unix/sysv/linux/s390/s390-32/Dist: File removed. - * sysdeps/unix/sysv/linux/sh/Dist: File removed. - * sysdeps/unix/sysv/linux/x86_64/Dist: File removed. - * sysdeps/unix/sysv/linux/hppa/Dist: File removed. - * sysdeps/unix/sysv/linux/Dist: File removed. - * sysdeps/unix/sysv/Dist: File removed. - * sysdeps/unix/Dist: File removed. - * sysdeps/generic/Dist: File removed. - * sysdeps/sparc/sparc32/soft-fp/Dist: File removed. - * sysdeps/sparc/sparc32/sparcv9/Dist: File removed. - * sysdeps/sparc/sparc32/sparcv8/Dist: File removed. - * sysdeps/sparc/sparc32/Dist: File removed. - * sysdeps/sparc/sparc64/soft-fp/Dist: File removed. - * sysdeps/sparc/sparc64/Dist: File removed. - * sysdeps/sparc/Dist: File removed. - * sysdeps/gnu/Dist: File removed. - * sysdeps/ia64/fpu/Dist: File removed. - * sysdeps/ia64/Dist: File removed. - * sysdeps/mach/mips/Dist: File removed. - * sysdeps/mach/hurd/alpha/Dist: File removed. - * sysdeps/mach/hurd/i386/Dist: File removed. - * sysdeps/mach/hurd/mips/Dist: File removed. - * sysdeps/mach/hurd/powerpc/Dist: File removed. - * sysdeps/mach/hurd/Dist: File removed. - * sysdeps/s390/s390-64/Dist: File removed. - * sysdeps/s390/Dist: File removed. - * sysdeps/s390/s390-32/Dist: File removed. - * sysdeps/sh/Dist: File removed. - * sysdeps/posix/Dist: File removed. - * sysdeps/ieee754/dbl-64/Dist: File removed. - * sysdeps/ieee754/ldbl-128/Dist: File removed. - * sysdeps/ieee754/flt-32/Dist: File removed. - * sysdeps/ieee754/Dist: File removed. - * sysdeps/x86_64/soft-fp/Dist: File removed. - * sysdeps/x86_64/Dist: File removed. - * sysdeps/hppa/Dist: File removed. - - * Makerules (common-clean): Don't remove distinfo file. - ($(objpfx)distinfo): Target removed. - * manual/Makefile (mostlyclean): Don't remove distinfo file. - (glibc-targets): Remove echo-distinfo. - - * scripts/list-sources.sh: New file. - * Makefile (TAGS): New target. - * po/Makefile (libc.pot, libc.pot.files): New targets. - * Makeconfig (XGETTEXT): New variable. - * Makerules ($(..)po/%.pot): Rule removed. - (TAGS): Target removed. - * Rules (subdir_TAGS): Target removed. - * MakeTAGS: File removed. - - * Makefile (iconvdata/% localedata/% po/% manual/%): Depend on FORCE. - * Makeconfig ($(all-Depend-files)): New targets with no-op commands. - -2004-08-03 Marco Gerards - - [BZ #2119] - * sysdeps/mach/hurd/bits/ioctls.h (SIOCGIFHWADDR): New macro. - -2006-01-07 Ulrich Drepper - - * stdio-common/tstdiomisc.c (F): Use NAN to get NaN value. - -2006-01-06 Ulrich Drepper - - * elf/tst-tls8.c (do_test): Use $ORIGIN in module names. - -2006-01-03 Steven Munroe - - * sysdeps/generic/sysdep.h (cfi_same_value): Define macro. - - * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve, - _dl_profile_resolve): Add CFI directives for stack and LR save. - Save LR in LRSAVE of previous frame per ABI. - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Add CFI directives - for LR save. - * sysdeps/powerpc/powerpc32/lshift.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S - (__makecontext, __novec_makecontext): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Add CFI directive - for LR save to register. - * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_round.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Add CFI directive - for stack. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. - * sysdeps/powerpc/powerpc32/ppc-mcount.S: Add CFI directives for stack - and LR save. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: - Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: - Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: - Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise. Don't use - negative stack addressing. - - * sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_runtime_resolve, - _dl_profile_resolve): Add CFI directives for stack and LR save. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Add CFI directives - for stack. - * sysdeps/powerpc/powerpc64/ppc-mcount.S (_mcount): Add CFI - directives for stack and LR save. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk): Add CFI - directives for stack. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Add CFI - directives for stack. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S - (__getcontext, __novec_getcontext): Add CFI directives for stack - and LR save. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S - (__makecontext): Add CFI directives for stack and LR save. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S - (__setcontext, __novec_setcontext): Add CFI directives for stack - and LR save. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S - (__swapcontext, __novec_swapcontext): Add CFI directives for stack - and LR save. - -2006-01-06 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include tls.h. - (SYSCALL_ERROR_HANDLER_ENTRY): Use %g4 instead of %g2, to avoid - the need of .register directive for it. - * configure.in (libc_cv_asm_cfi_directives): Use CFI rel offset - 2047 instead of 0 in the test on sparc64. - -2006-01-06 Ulrich Drepper - - * scripts/check-c++-types.sh: Add more pthread types. - * scripts/data//c++-types-i386-linux-gnu.data: Adjust. - * scripts/data//c++-types-ia64-linux-gnu.data: Likewise. - * scripts/data//c++-types-powerpc-linux-gnu.data: Likewise. - * scripts/data//c++-types-powerpc64-linux-gnu.data: Likewise. - * scripts/data//c++-types-s390-linux-gnu.data: Likewise. - * scripts/data//c++-types-s390x-linux-gnu.data: Likewise. - * scripts/data//c++-types-x86_64-linux-gnu.data: Likewise. - - * sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL_NCS): - Adjust for private->__private rename in tcbhead_t. - - [BZ #2114] - * ncsd/aicache.c: Don't use sendfile for records on the stack. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/initgrcache.c: Likewise. - * nscd/pwdcache.c: Likewise. - Patch by dmueller@suse.com. - - * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Define MADV_REMOVE. - * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. - -2006-01-06 Roland McGrath - - * Makeconfig (+gnu-stabs): Remove ancient cruft. - - [BZ #2103] - * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_HWX25): Corrected macro - name (was typo ARPHDR_HWX25). - (ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP): New macros. - (ARPHRD_VOID, ARPHRD_NONE): New macros. - - * sysdeps/wordsize-32/divdi3.c (__moddi3): Add a cast. - - * io/fcntl.h [__USE_ATFILE] (AT_EACCESS): New macro. - * posix/unistd.h [__USE_ATFILE]: Declare faccessat. - * io/faccessat.c: New file. - * sysdeps/unix/sysv/linux/faccessat.c: New file. - * io/Makefile (routines): Add faccessat. - * io/Versions (libc: GLIBC_2.4): Likewise. - * io/tst-faccessat.c: New file. - * io/Makefile (tests): Add it. - - * scripts/check-local-headers.sh: Revert last change. - - * io/euidaccess.c: Add eaccess as an alias. - * sysdeps/mach/hurd/euidaccess.c: Likewise. - * sysdeps/posix/euidaccess.c: Likewise. - * posix/unistd.h [__USE_GNU]: Declare eaccess. - * io/Versions (libc: GLIBC_2.4): Add eaccess. - -2005-12-04 Joseph S. Myers - - * soft-fp/Makefile (gcc-single-routines): Add unordsf2, - floatunsisf, floatundisf. - (gcc-double-routines): Add unorddf2, floatunsidf, floatundidf. - (gcc-quad-routines): Add unordtf2, floatunsitf, floatunditf. - * soft-fp/op-common.h (_FP_CMP_UNORD): Define. - * soft-fp/single.h (FP_CMP_UNORD_S): Define. - * soft-fp/double.h (FP_CMP_UNORD_D): Define. - * soft-fp/quad.h (FP_CMP_UNORD_Q): Define. - * soft-fp/extended.h (FP_CMP_UNORD_E): Define. - * soft-fp/unordsf2.c: New file. - * soft-fp/unorddf2.c: New file. - * soft-fp/unordtf2.c: New file. - * soft-fp/floatunsisf.c: New file. - * soft-fp/floatundisf.c: New file. - * soft-fp/floatunsidf.c: New file. - * soft-fp/floatundidf.c: New file. - * soft-fp/floatunsitf.c: New file. - * soft-fp/floatunditf.c: New file. - - * soft-fp/op-common.h (__FP_CLZ): Define using __builtin_clz, - __builtin_clzl and __builtin_clzll. - -2006-01-05 Mike Frysinger - - * include/alloca.h (extend_alloca): Fix typoed name 'extern_alloca'. - -2006-01-05 Jakub Jelinek - - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL): - Only define for 2.6.12+ on s390{,x}. - (__ASSUME_GETDENTS32_D_TYPE): Only define for 2.6.8+ on most arches - and only for 2.6.11+ on s390{,x}. - -2006-01-05 Ulrich Drepper - - * sysdeps/pthread/aio_misc.h [!DONT_USE_BOOTSTRAP_MAP] - (struct waitlist): Don't add cond. - * sysdeps/pthread/aio_notify.c [!DONT_USE_BOOTSTRAP_MAP] - (__aio_notify): Use AIO_MISC_NOTIFY instead of pthread_cond_signal. - * sysdeps/pthread/aio_suspend.c [!DONT_USE_BOOTSTRAP_MAP]: Don't - use condvar, use AIO_MISC_WAIT. - * sysdeps/pthread/lio_listio.c: Likewise. - * rt/Makefile (tests): Add tst-aio9 and tst-aio10. - * rt/tst-aio9.c: New file. - * rt/tst-aio10.c: New file. - - * rt/tst-aio3.c: The thread is now supposed to be created. - -2006-01-05 Roland McGrath - - * include/features.h: Grok _ATFILE_SOURCE and define __USE_ATFILE when - it or _GNU_SOURCE is defined. - * io/fcntl.h: Protect *at and AT_* with [__USE_ATFILE] instead of - [__USE_GNU]. - * libio/stdio.h: Likewise. - * posix/unistd.h: Likewise. - * time/sys/time.h: Likewise. - * io/sys/stat.h: Likewise. - - * io/sys/stat.h [__USE_GNU]: Declare fchmodat. - * io/fchmodat.c: New file. - * io/Makefile (routines): Add fchmodat. - * io/Versions (libc: GLIBC_2.4): Likewise. - * sysdeps/unix/sysv/linux/fchmodat.c: New file. - * io/tst-fchmodat.c: New file. - * io/Makefile (tests): Add it. - -2006-01-03 Steven Munroe - - * sysdeps/powerpc/powerpc32/sysdep.h (ENTRY, EALIGN): Add cfi_startproc - directive to ENTRY macros. - (END): Add cfi_endproc directive to END macro. - * sysdeps/powerpc/powerpc64/sysdep.h (ENTRY, EALIGN): Add cfi_startproc - directive to ENTRY macros. - (END, END_GEN_TB): Add cfi_endproc directive to END macros. - * sysdeps/powerpc/powerpc32/dl-start.S: Remove ENTRY()s for - _dl_start_user and _dl_main_dispatch. - * sysdeps/powerpc/powerpc32/fpu/fprrest.S: Use END macro. - * sysdeps/powerpc/powerpc32/fpu/fprsave.S: Use Likewise. - * sysdeps/powerpc/powerpc32/gprrest0.S: Likewise. - * sysdeps/powerpc/powerpc32/gprrest1.S: Likewise. - * sysdeps/powerpc/powerpc32/gprsave0.S: Likewise. - * sysdeps/powerpc/powerpc32/gprsave1.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Remove redundant - cfi_startproc and cfi_endproc. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. - -2006-01-04 Ulrich Drepper - - * sysdeps/pthread/aio_misc.h (struct waitlist): Add result member. - * sysdeps/pthread/aio_notify.c (__aio_notify): For synchronous waiters, - failed I/O, and a result pointer, set value to -1. - * sysdeps/pthread/aio_suspend.c: Initialize result pointer to NULL. - * sysdeps/pthread/lio_listio.c: For LIO_WAIT, point result pointer in - wait list to local variable result. If nonzero afterwards, set errno - to EIO. For LIO_NOWAIT set result to NULL. - * rt/Makefile (tests): Add tst-aio8. - * rt/tst-aio8.c: New file. - -2005-12-25 Kristian Van Der Vliet - - * abi-tags (*-.*-syllable.*): New match, with ABI value 5. - * elf/cache.c (print_entry): Match the Syllable ABI tag. - -2006-01-04 Ulrich Drepper - - * include/stdlib.h: Make even more C++ compliant. - -2006-01-04 Joseph S. Myers - - * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Use - __SYSCALL_CLOBBERS. - -2006-01-03 H.J. Lu - - * configure.in (HAVE_LIBAUDIT): Check - audit_log_user_avc_message instead of audit_log_avc. - -2006-01-04 Joseph S. Myers - - * sysdeps/ieee754/bits/nan.h: Fix typo. - -2006-01-03 Jakub Jelinek - - * sysdeps/unix/sysv/linux/m68k/fchownat.c: Include string.h. - - * sysdeps/sparc/sparc32/dl-machine.h (LD_SO_PRELOAD): Remove unused - define. - - * sysdeps/sparc/sparc32/bits/atomic.h: Include stdint.h, add - {,u}atomic*_t typedefs. - (__sparc32_atomic_do_lock): Add __volatile and memory clobber. - (__sparc32_atomic_do_unlock): Add memory barrier. - (__sparc32_atomic_do_lock24, __sparc32_atomic_do_unlock24): Define. - [!SHARED] (__v9_compare_and_exchange_val_32_acq): Define. - (__v7_compare_and_exchange_val_acq, __v7_compare_and_exchange_bool_acq, - __v7_exchange_acq, __v7_exchange_and_add, __v7_exchange_24_rel, - __v7_compare_and_exchange_val_24_acq, __atomic_is_v9, - atomic_exchange_acq, atomic_compare_and_exchange_val_24_acq, - atomic_exchange_24_rel): Define. - [SHARED] (atomic_exchange_and_add): Define. - [!SHARED] (__ATOMIC_HWCAP_SPARC_V9): Define. - [!SHARED] (_dl_hwcap): New weak decl. - * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (atomic_exchange_24_rel, - atomic_compare_and_exchange_val_24_acq): Define. - * sysdeps/sparc/sparc64/bits/atomic.h (atomic_exchange_24_rel, - atomic_compare_and_exchange_val_24_acq): Define. - -2006-01-03 Ulrich Drepper - - lio_listio should emit an event for each individual request in - addition to the global event. - * sysdeps/pthread/lio_listio.c (lio_listio): Renamed to - lio_listio_internal. Remove mode parameter check. Only set sigevent - type to SIGEV_NONE if LIO_NO_INDIVIDUAL_EVENT is set. - (__lio_listio_21): New function. Compatiblity version which sets - LIO_NO_INDIVIDUAL_EVENT before calling lio_listio_internal. - (__lio_listio_item_notify): New function. - * sysdeps/pthread/lio_listio64.c: Define __lio_listio_21 and - __lio_listio_item_notify macros. - * sysdeps/pthread/Versions: New file. - * rt/tst-aio2.c: Adjust test for new semantics of lio_listio. - * include/aio.h: Define LIO_NO_INDIVIDUAL_EVENT. - * Versions.def: Add GLIBC_2.4 for librt. - - * rt/Versions: Whitespace fix. - * sysdeps/pthread/aio_misc.c: Likewise. - - * nscd/connections.c (nscd_init): Remove if block which should - have been removed as part of the -S option removal. - -2006-01-03 Andreas Jaeger - - * scripts/check-local-headers.sh: Allow $includedir/c++. - -2006-01-03 Jakub Jelinek - - * posix/unistd.h (ctermid): Remove __nonnull attribute. - -2006-01-02 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (PTR_MANGLE, - PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Define. - * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (PTR_MANGLE, - PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Define. - * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h [__WORDSIZE == 64] - (_JMPBUF_UNWINDS): Don't demangle uc_mcontext.mc_fp. - * sysdeps/sparc/sparc32/setjmp.S (__sigsetjmp): Mangle %fp, %sp - and %o7. - * sysdeps/sparc/sparc32/__longjmp.S (__longjmp): Demangle %fp, %sp - and %o7. - -2006-01-02 Jakub Jelinek - - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PTR_MANGLE2): - Define. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PTR_MANGLE2): - Likewise. - * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Demangle also %r15. - * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise. - * sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Mangle also %r15. - * sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise. - - * sysdeps/s390/bits/setjmp.h (__jmp_buf): Add __s390_jmp_buf - struct tag to make C++ happy. - -2006-01-02 Ulrich Drepper - - * posix/Makefile ($(objpfx)annexc.out): Move -I.. to the end of - the include list. - -2006-01-01 Ulrich Drepper - - * posix/getconf.c: Update copyright year. - * nss/getent.c: Likewise. - * iconv/iconvconfig.c: Likewise. - * iconv/iconv_prog.c: Likewise. - * elf/ldconfig.c: Likewise. - * catgets/gencat.c: Likewise. - * csu/version.c: Likewise. - * elf/ldd.bash.in: Likewise. - * elf/sprof.c (print_version): Likewise. - * locale/programs/locale.c: Likewise. - * locale/programs/localedef.c: Likewise. - * nscd/nscd.c (print_version): Likewise. - * debug/xtrace.sh: Likewise. - * malloc/memusage.sh: Likewise. - * malloc/mtrace.pl: Likewise. - * debug/catchsegv.sh: Likewise. - -2005-12-31 Andreas Jaeger - - [BZ #1395] - * manual/filesys.texi (Symbolic Links): Fix description of - canonicalize_file_name based on patch by Oskar Liljeblad - . - -2005-12-29 Andreas Jaeger - - * resolv/res_debug.c (latlon2ul): Use ISO C function definition. - (precsize_aton): Likewise. - (precsize_ntoa): Likewise. - - * resolv/gethnamaddr.c (_gethtbyname): Remove extra prototype. - (gethostbyname2): Likewise. - (gethostbyaddr): Likewise. - (getanswer): Use ISO C function definition. - -2005-12-29 Kaz Kojima - - * sysdeps/sh/sysdep.h: Add cfi instrumentation to asm fragments. - * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. - * sysdeps/sh/_mcount.S: Add cfi instrumentation. - * sysdeps/unix/sh/sysdep.S: Likewise. - * sysdeps/unix/sysv/linux/sh/makecontext.S: Adjust cfi_startproc. - * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: Remove now duplicate - cfi_startproc and cfi_endproc. - * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sh/socket.S: Likewise. - * sysdeps/unix/sysv/linux/sh/sysdep.S: Add cfi_endproc. - -2005-12-30 Ulrich Drepper - - * sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard - value doesn't survive in a registers when the function returns. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. - -2005-12-30 Jakub Jelinek - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define - PTR_MANGLE2. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define - PTR_MANGLE2 and PTR_DEMANGLE2. - * sysdeps/powerpc/powerpc64/__longjmp-common.S: Use PTR_DEMANGLE2. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Use PTR_MANGLE2. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. - -2005-12-30 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): - Don't use _demangle parameter for now. - - [BZ #2080] - * libio/iogetwline.c (_IO_getwline_info): Move return to correct - location. - - * nscd/connections.c: Remove last remnants of -S option support. - * nscd/nscd.c: Likewise. - * nscd/nscd.h: Likewise. - -2005-12-30 Andreas Jaeger - - [BZ #1067] - * sysdeps/unix/sysv/linux/mips/bits/socket.h: Fix struct msghdr - for 64-bit mips kernel. - -2005-12-08 Steven Munroe - Tom Gall - - * elf/rtld.c (dl_main): Initialize l_local_scope for sysinfo_map. - * sysdeps/powerpc/elf/libc-start.c: Move this... - * sysdeps/unix/sysv/linux/powerpc/libc-start.c: ...to here. - * sysdeps/powerpc/powerpc32/dl-start.S: Add _dl_main_dispatch label. - * sysdeps/powerpc/powerpc32/hp-timing.h: New file. - * sysdeps/unix/sysv/linux/powerpc/Versions: New file. - * sysdeps/unix/sysv/linux/clock_getres.c: If HAVE_CLOCK_GETRES_VSYSCALL - is not defined, redefine INTERNAL_VSYSCALL and INLINE_VSYSCALL to - INTERNAL_SYSCALL and INLINE_SYSCALL respectively. Otherwise include - . Use INLINE_VSYSCALL and INTERNAL_SYSCALL instead - of the normal versions throughout the code. - * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise if - HAVE_CLOCK_GETTIME_VSYSCALL is defined. - * sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: New file. - * sysdeps/unix/sysv/linux/powerpc/dl-vdso.c: New file. - * sysdeps/unix/sysv/linux/powerpc/dl-vdso.h: New file. - * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Use vDSO. - * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c: New file. - * sysdeps/unix/sysv/linux/powerpc/Makefile: Add dl-vdso to routines. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define - INLINE_VSYSCALL, INTERNAL_VSYSCALL, INTERNAL_SYSCALL_NCS, - INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, HAVE_CLOCK_GETRES_VSYSCALL, - and HAVE_CLOCK_GETTIME_VSYSCALL. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. - -2005-12-29 Ulrich Drepper - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h [ASSEMBLER]: - Define PTR_DEMANGLE2. - * sysdeps/powerpc/powerpc32/setjmp-common.S [PTR_MANGLE]: Also - mangle r1. - * sysdeps/powerpc/powerpc32/__longjmp-common.S [PTR_DEMANGLE]: Also - demangle r1. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S [PTR_MANGLE]: Mangle - r0 and r1. - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S [PTR_DEMANGLE]: - Demangle r0 and r1. - - * sysdeps/powerpc/powerpc64/setjmp-common.S [PTR_MANGLE]: Also - mangle r1. - * sysdeps/powerpc/powerpc64/__longjmp-common.S [PTR_DEMANGLE]: Also - demangle r1. - -2005-12-26 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: - Move common function to... - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: - New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: - Move common function to... - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: - New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: - Move common function to... - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: - New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym - (_FRAME_BACKCHAIN, _FRAME_LR_SAVE, _FRAME_PARM_SAVE1, - _FRAME_PARM_SAVE2, _FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): - Remove unrelated stack frame defines. - -2005-12-29 Ulrich Drepper - - * stdio-common/tstdiomisc.c [FLT_EVAL_METHOD!=2] (dbl_max): - Defining as macro as before the last change. - - * sysdeps/unix/sysv/linux/sigaction.c: If WRAPPER_INCLUDE is defined, - include the named file. - * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. - -2005-12-29 Roland McGrath - - * sysdeps/mach/hurd/errno.c: New file. - - * sysdeps/mach/hurd/ioctl.c (__ioctl): Use a union to avoid a cast. - - * sysdeps/posix/libc_fatal.c (__libc_message): Add a const, a cast. - - * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Fix cast. - * hurd/report-wait.c (_S_msg_report_wait): Likewise. - - * include/sys/xattr.h: New file. - -2005-12-28 Roland McGrath - - * hurd/sigunwind.c: Include . - * sysdeps/mach/hurd/jmp-unwind.c: Likewise. - -2005-12-28 Ulrich Drepper - - * nscd/selinux.c (log_callback): Use audit_log_user_avc_message. - Don't do anything if audit_fd is invalid. - (audit_init): Don't complain if kernel support is missing. - Patch by Steve Grubb . - - * sysdeps/i386/__longjmp.S [PTR_DEMANGLE]: Also demangle stack - pointer. Add CFI. - * sysdeps/i386/bsd-_setjmp.S [PTR_MANGLE]: Also mangle stack pointer. - * sysdeps/i386/bsd-setjmp.S: Likewise. - * sysdeps/i386/setjmp.S: Likewise. - - * sysdeps/x86_64/__longjmp.S: No need to make sure return value is - != 0, the caller did that. - -2005-12-27 Roland McGrath - - * sysdeps/x86_64/__longjmp.S: Don't confuse unwinder by loading - mangled values in %rbp and %rsp registers and by wrong cfi. - - * config.make.in (c++-sysincludes): New substituted variable. - * configure.in (CXX_SYSINCLUDES): New substituted variable. - * configure: Regenerated. - * Makeconfig (CXXFLAGS): Prepend $(c++-sysincludes) here. - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h - (PTR_MANGLE): Fix cast. - - * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument - DEMANGLE, and pass SP value through it. - * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise. - * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. - * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline - demangler function to _JMPBUF_UNWINDS. - * sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function. - (_longjmp_unwind): Pass it to _JMPBUF_UNWINDS. - - * posix/tst-execle1.c (do_test): Add a const. - * posix/tst-execle2.c (do_test): Likewise. - - * posix/transbug.c (run_test): Add some casts. - * posix/bug-regex22.c (main): Likewise. - * posix/bug-regex5.c (main): Likewise. - * wcsmbs/tst-mbsrtowcs.c (main): Likewise. - * string/test-strspn.c (do_test, do_random_tests): Likewise. - * string/test-strrchr.c (do_test, do_random_tests): Likewise. - * string/test-strlen.c (do_random_tests): Likewise. - * string/test-strpbrk.c (do_test, do_random_tests): Likewise. - * string/test-strcmp.c (do_random_tests): Likewise. - * string/test-strchr.c (do_test, do_random_tests): Likewise. - * string/test-strcat.c (do_test, do_random_tests): Likewise. - * string/test-strncpy.c (do_random_tests): Likewise. - * string/test-strcpy.c (do_test, do_random_tests): Likewise. - * string/test-memccpy.c (do_test): Likewise. - * string/test-memmove.c (do_test, do_random_tests): Likewise. - * string/test-memcpy.c (do_test, do_random_tests): Likewise. - * string/test-memcmp.c (do_test, do_random_tests): Likewise. - * string/test-memchr.c (do_test, do_random_tests): Likewise. - * dlfcn/bug-atexit1.c (do_test): Fix up prototype in cast. - * stdio-common/tst-fgets.c (do_test): Add a cast. - * iconvdata/bug-iconv4.c (xiconv): Add a cast. - - * locale/programs/simple-hash.c (insert_entry_2): Remove useless casts. - - * resolv/herror.c (herror): Remove unused extern decl. - - * libio/obprintf.c: Include "strfile.h". - - * elf/order2mod2.c (init): Cast ignored value to void. - -2005-12-27 Ulrich Drepper - - * elf/tst-tls13.c (do_test): Avoid using the library path when - looking for tst-tlsmod13a.so. - - * stdio-common/tstdiomisc.c: If FLT_EVAL_METHOD is 2, use long - double math to generate NaN results. - - * sysdeps/unix/sysv/linux/sparc/bits/errno.h: Define EOWNERDEAD - and ENOTRECOVERABLE if not already defined. - * sysdeps/unix/sysv/linux/alpha/bits/errno.h: Likewise. - -2005-12-27 Jakub Jelinek - - * sysdeps/unix/sysv/linux/alpha/Versions: Add new errlist-compat - entry for up to 138 errnos. - -2005-12-27 Jakub Jelinek - - * iconv/gconv_trans.c (__gconv_transliterate): Demangle step __fct - before calling it. - -2005-12-27 David S. Miller - - * sysdeps/unix/sysv/linux/sparc/Versions: Add new errlist-compat - entry for up to 134 errnos. - -2005-12-26 Ulrich Drepper - - * Versions.def: Add GLIBC_2.4 for libpthread. - -2005-12-25 Ulrich Drepper - - * stdlib/Makefile ($(objpfx)isomac.out): Move -I.. to the end so - that $(..)/bits is not found early. - -2005-12-24 Ulrich Drepper - - * manual/errno.texi: Add new Linux errno codes. - * sysdeps/unix/sysv/linux/Versions: Add new errlist-compat entry - for up to 132 errnos. - * sysdeps/unix/sysv/linux/bits/errno.h: Define EOWNERDEAD and - ENOTRECOVERABLE if not already defined. - -2005-12-23 Ulrich Drepper - - [BZ #1566] - * sysdeps/i386/i586/memusage.h: New file. - * sysdeps/i386/memusage.h: Don't define GETTIME. - -2005-12-22 Ulrich Drepper - - [BZ #1499] - * misc/syslog.c (SyslogAddr): Use sockaddr_un instead of sockaddr. - (openlog_internal): Adjust for this change. - - * Makeconfig: Define CXXFLAGS. Split out warnings from +gccwarn which - are not understood by the C++ compiler. - * Makerules: Add rules to build C++ code for test cases. - * include/stdlib.h: Protect for inclusion in C++ code. - * include/time.h: Likewise. - -2005-12-22 Roland McGrath - - * Makerules [gen-as-const-headers] (tests): Add one test per .sym - file, not just one. - ($(objpfx)test-as-const.c): Target replaced with ... - ($(objpfx)test-as-const-%.c): ... this pattern rule. - (generated): Add those files. - -2005-12-22 Ulrich Drepper - - * test-skeleton.c (timeout_handler): Rewrite ts initialization for - C++ compatibility. - - * sysdeps/x86_64/__longjmp.S: Also protect SP and BP. - * sysdeps/x86_64/setjmp.S: Likewise. - -2005-12-21 Roland McGrath - - * sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. - * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: - (gen-as-const-headers): Add it. - * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. - * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. - * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. - * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. - * stdlib/tst-ucontext-off.c: File removed. - * stdlib/Makefile (tests): Remove it. - - * scripts/gen-as-const.awk: Support generating a test program. - * Makerules [gen-as-const-headers] (tests): Add test-as-const. - [gen-as-const-headers] ($(objpfx)test-as-const.c): New target. - - * sysdeps/generic/bits: Subdirectory and all files moved to ... - * bits: ... here, new subdirectory. - * Makeconfig (+includes): Reordered includes to put build and sysdeps - dirs first after $(..)include, $(sysincludes) last. - - [BZ #2066] - * intl/l10nflist.c (_nl_make_l10nflist): Free ABS_FILENAME when later - malloc fails. - -2005-12-21 Jakub Jelinek - - * sysdeps/powerpc/fpu/libm-test-ulps: Update for GCC 4.1 prerelease. - -2005-12-21 Roland McGrath - - * sysdeps/mach/hurd/ifreq.c: Add missing #includes. - - * elf/cache.c: Use <> rather than "" #includes. - * elf/chroot_canon.c: Likewise. - * elf/dl-lookup.c: Likewise. - * elf/ldconfig.c: Likewise. - * elf/readlib.c: Likewise. - * elf/rtld.c: Likewise. - * gmon/mcount.c: Likewise. - * hurd/hurdfault.c: Likewise. - * hurd/hurdsig.c: Likewise. - * hurd/report-wait.c: Likewise. - * hurd/sigunwind.c: Likewise. - * mach/setup-thread.c: Likewise. - * rt/aio_read64.c: Likewise. - * rt/aio_sigqueue.c: Likewise. - * rt/aio_write64.c: Likewise. - * soft-fp/soft-fp.h: Likewise. - * stdio-common/tmpfile64.c: Likewise. - * sysdeps/mach/hurd/fork.c: Likewise. - * sysdeps/mach/hurd/hppa/trampoline.c: Likewise. - * sysdeps/mach/hurd/i386/trampoline.c: Likewise. - * sysdeps/mach/hurd/mips/trampoline.c: Likewise. - * sysdeps/mach/hurd/powerpc/trampoline.c: Likewise. - * sysdeps/posix/sprofil.c: Likewise. - * sysdeps/pthread/aio_cancel.c: Likewise. - * sysdeps/pthread/aio_fsync.c: Likewise. - * sysdeps/pthread/aio_read64.c: Likewise. - * sysdeps/pthread/aio_read.c: Likewise. - * sysdeps/pthread/aio_suspend.c: Likewise. - * sysdeps/pthread/aio_write64.c: Likewise. - * sysdeps/pthread/aio_write.c: Likewise. - * sysdeps/pthread/lio_listio64.c: Likewise. - * sysdeps/pthread/lio_listio.c: Likewise. - * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. - * sysdeps/unix/sysv/tcflow.c: Likewise. - - * sysdeps/generic/unwind-dw2.c (extract_cie_info): Add a cast. - - * elf/dl-error.c (_dl_signal_error): Use .__jmpbuf in __longjmp call. - - * csu/dso_handle.c (__dso_handle): Add const to pointer type too. - -2005-12-21 Ulrich Drepper - - * iconv/gconv_conf.c: Initialize empty_path_elem. - - * sysdeps/ieee754/dbl-64/halfulp.c: Mark tab54 as static and const. - * sysdeps/i386/fpu/e_expl.c: Mark c0 and c1 as const. - * sysdeps/ieee754/flt-32/s_expm1f.c: Make sure huge and tiny end - up in .rodata. - * sysdeps/ieee754/flt-32/e_exp2f.c: Make sure TWO127 and TWOM100 - end up in .rodata. - * sysdeps/ieee754/flt-32/e_expf.c: Likewise. - * sysdeps/ieee754/dbl-64/e_exp2.c: Make sure TWO1023 and TWOM1000 - end up in .rodata. - -2005-12-21 Thorsten Kukuk - - * elf/readlib.c: Fix include of readelflib.c. - -2005-12-21 Ulrich Drepper - - [BZ #1962] - * io/fts.c (fts_open): Change type of len to size_t. - (fts_build): Remove cast in call to fts_alloc. - (fts_alloc): Change third parameter's type to size_t. - - [BZ #1960] - * io/fts.c (fts_open): Avoid function call in MAX macro use. - -2005-12-20 Ulrich Drepper - - * locale/xlocale.c (_nl_C_locobj): Mark as const. - * include/locale.h: Define _nl_C_locobj_ptr. - * iconv/gconv_charset.h: Use _nl_C_locobj_ptr instead of using pointer - to _nl_C_locobj because we also need a cast. - * iconv/gconv_conf.c: Likewise. - * iconv/gconv_int.h: Likewise. - * iconv/gconv_open.c: Likewise. - * locale/duplocale.c: Likewise. - * locale/freelocale.c: Likewise. - * locale/newlocale.c: Likewise. - * misc/syslog.c: Likewise. - * stdlib/strtod_l.c: Likewise. - * sysdeps/unix/sysv/linux/getloadavg.c: Likewise. - - * csu/dso_handle.c (__dso_handle): Mark as const. - - * intl/plural-exp.c (GERMANIC_PLURAL): Mark as const. - * intl/plural-exp.h: Adjust declaration of - __gettext_germanic_plural. - - * resolv/herror.c (h_errlist): Mark as const. - (h_nerr): Likewise. - -2005-12-15 Thomas Schwinge - - [BZ #2061] - * sysdeps/mach/hurd/xmknod.c (__xmknod): Handle S_IFREG. - -2005-12-20 Roland McGrath - - * sysdeps/unix/sysv/linux/ifreq.h: File removed. - * sysdeps/unix/sysv/linux/ifreq.c: #include "kernel-features.h" here. - - * sysdeps/mach/hurd/ifreq.h: File removed. - (__ifreq): Function moved to ... - * sysdeps/mach/hurd/ifreq.c: ... here, new file. - -2005-12-20 Ulrich Drepper - - * sunrpc/clnt_unix.c (unix_ops): Mark as const. - * sunrpc/auth_des.c (authdes_ops): Likewise. - * sunrpc/svc_raw.c (server_ops): Likewise. - * sunrpc/clnt_udp.c (udp_ops): Likewise. - * sunrpc/clnt_tcp.c (tcp_ops): Likewise. - * sunrpc/clnt_raw.c (client_ops): Likewise. - * sunrpc/auth_unix.c (auth_unix_ops): Likewise. - * sunrpc/auth_none.c (ops): Likewise. - - * nss/nsswitch.c (databases): Mark as const. Change name field - into array. - * nss/databases.def: Add warning. - - * resolv/res_hconf.c (arg_service_list): Reduce size of svcs and - mark const. - (cmd): Mark as const. - (parse_line): Mark c as pointer to const. - - * misc/getusershell.c (initshells): Remove unnecessary tests. - (endusershell): Likewise. - (okshells): Mark as const. - - * sysdeps/posix/gai_strerror.c: Complete rewrite. Avoid relocations. - * sysdeps/posix/gai_strerror-strs.h: New file. - * sysdeps/posix/Dist: New file. - - * sysdeps/posix/getaddrinfo.c (gaih): Mark as const. - * locale/loadlocale.c (_nl_value_types): Likewise. - * iconv/gconv_conf.c (builtin_aliases): Likewise. - * iconv/gconv_open.c (internal_trans_names): Likewise. +2006-09-14 Jakub Jelinek + Steven Munroe -2005-12-19 Kaz Kojima + * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 4 new cap + names to the beginning. Rename "cell" to "cellbe". + (_dl_powerpc_platforms): New. + * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. + (HWCAP_IMPORTANT): Remove power{4,5,5+} and cell. + (_DL_PLATFORMS_COUNT, _DL_FIRST_PLATFORM): Define. + (_DL_HWCAP_PLATFORM): Define to new mask. + (_dl_platform_string, _dl_string_platform): New functions. + * sysdeps/powerpc/sysdep.h (PPC_FEATURE_BOOKE, PPC_FEATURE_SMT, + PPC_FEATURE_ICACHE_SNOOP, PPC_FEATURE_ARCH_2_05): Define. - * sysdeps/unix/sysv/linux/sh/sysdep.h: Include tls.h. - (PTR_MANGLE, PTR_DEMANGLE): Define. - (SYSCALL_ERROR_HANDLER): Fix typo. - * sysdeps/sh/sh4/__longjmp.S: Use PTR_DEMANGLE if defined. - * sysdeps/sh/sh3/__longjmp.S: Likewise. - * sysdeps/sh/sh4/setjmp.S: Use PTR_MANGLE if defined. - * sysdeps/sh/sh3/setjmp.S: Likewise. +2006-09-12 Jakub Jelinek -2005-12-20 Jakub Jelinek + [BZ #2526] + * README.libm: Fix a thinko in sqrt algorithm description. - * sysdeps/ia64/fpu/libm-test-ulps: Update for GCC 4.1 prerelease. + [BZ #3143] + * manual/string.texi (argz_delete): Fix prototype. + Patch by . - * sysdeps/unix/sysv/linux/time.c: If __NR_time is not defined, - use sysdeps/unix/time.c implementation. +2006-08-26 Joseph Myers -2005-12-19 Ulrich Drepper + [BZ #3138] + * io/test-lfs.c (do_prepare): Give name_len type size_t. + * io/tst-fcntl.c (do_prepare): Likewise. + * posix/tst-exec.c (do_prepare): Likewise. + * posix/tst-preadwrite.c (do_prepare): Likewise. + * posix/tst-spawn.c (do_prepare): Likewise. + * posix/tst-truncate.c (do_prepare): Likewise. + * rt/tst-aio.c (do_prepare): Likewise. + * rt/tst-aio64.c (do_prepare): Likewise. + * stdlib/test-canon2.c (do_prepare): Give test_dir_len type + size_t. - [BZ #1955] - * timezone/zic.c (tofile;): Fix typo in symlink creation. - Patch by Phil Estes . +2006-09-09 Ulrich Drepper - [BZ #1952] - * sysdeps/unix/sysv/linux/time.c: New file. - * sysdeps/unix/sysv/linux/i386/syscalls.list: Remove time entry. + [BZ #2821] + * time/mktime.c (guess_time_tm): Fix overflow detection. + * time/Makefile (tests): Add bug-mktime1. + * time/bug-mktime1.c: New file. -2005-12-15 Thomas Schwinge + [BZ #3189, #3188] + * misc/sys/mman.h (remap_file_pages): Make available for _GNU_SOURCE. + (mremap): Likewise. - * io/xmknodat.c: Include . - * misc/futimesat.c: Remove weak_alias and correct stub_warning. - * stdio-common/renameat.c (renameat): Fix typo. +2006-09-07 Jakub Jelinek -2005-12-16 Thorsten Kukuk + [BZ #1006] + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): + Ensure relocation doesn't clobber any bits outside of the + immediate field for R_SPARC_TLS_LE_HIX22, R_SPARC_WDISP30, + R_SPARC_HI22 and R_SPARC_H44. - [BZ #1978] - * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): - Map more filesystem types to a string. - * sysdeps/unix/sysv/linux/linux_fsinfo.h: Add SYSFS_MAGIC. + [BZ #2775] + * malloc/malloc.c (sYSMALLOc): Only call grow_heap if + (long) (MINSIZE + nb - old_size) is positive. -2005-12-19 Jakub Jelinek + * malloc/arena.c (grow_heap): When growing bail even if new_size + is negative. - * locale/Makefile (programs/%-kw.h): Run $(GPERF) inside of the - programs subdirectory. + [BZ #3155] + * sysdeps/powerpc/powerpc32/fpu/s_lrint.S (__lrint): Don't access + stack below r1. - * sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use - PTR_DEMANGLE for PC if defined. - * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): - Likewise. - * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Likewise. - * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Xor %r14 with - THREAD_GET_POINTER_GUARD () if PTR_DEMANGLE is defined. - * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise. - * sysdeps/powerpc/powerpc32/setjmp-common.S (__sigsetjmp): Use - PTR_MANGLE for PC if defined. - * sysdeps/powerpc/powerpc64/setjmp-common.S (__sigsetjmp): Likewise. - * sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Likewise. - Avoid call to __sigjmp_save if IS_IN_rtld. - * sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/unix/sysv/linux/ia64/setjmp.S (__sigsetjmp): Likewise. - * sysdeps/unix/sysv/linux/ia64/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): - Define. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Include tls.h. - (PTR_MANGLE, PTR_DEMANGLE): Define. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Include tls.h - (PTR_MANGLE, PTR_DEMANGLE): Define. - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include tls.h. - (PTR_MANGLE, PTR_DEMANGLE): Define. - (SYSCALL_ERROR_HANDLER): Add missing semicolons. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Include tls.h. - (PTR_MANGLE, PTR_DEMANGLE): Define. - * sysdeps/unix/sysv/linux/s390/s390-64/socket.S (__socket): Add - SYSCALL_ERROR_HANDLER. - -2005-12-19 Ulrich Drepper - - * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Handle NO_WEAK_ALIAS. - * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise. - Patch by Clint Adams. - -2005-12-16 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/sys/user.h: Copy struct user and - dependent definitions from the kernel header to sys/user.h and - remove the #include of asm/user.h. - -2005-12-19 Ulrich Drepper - - * sysdeps/gnu/Makefile: Make sure the correct errlist.c file is - used when generating errlist-compat.c. - -2005-12-18 Ulrich Drepper - - * iconv/gconv.c: Demangle pointers before use if necessary. - * iconv/gconv_cache.c: Likewise. - * iconv/skeleton.c: Likewise. - * libio/iofwide.c: Likewise. - * wcsmbs/btowc.c: Likewise. - * wcsmbs/mbrtowc.c: Likewise. - * wcsmbs/mbsnrtowcs.c: Likewise. - * wcsmbs/mbsrtowcs_l.c: Likewise. - * wcsmbs/wcrtomb.c: Likewise. - * wcsmbs/wcsnrtombs.c: Likewise. - * wcsmbs/wcsrtombs.c: Likewise. - * wcsmbs/wctob.c: Likewise. - * iconv_gconv_db.c: Likewise. After init functions returns mangle - btowc pointer if necessary. - * iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym. - - * iconv/gconv_builtin.c (builtin_map): Change type of size - information fields to int8_t. - - * libio/iofwide.c (__libio_codecvt): Mark as const. - (__libio_translit): Likewise. - * libio/libioP.h (__libio_codecvt): Adjust declaraction. - - * wcsmbs/wcsmbsload.c (to_wc): Mark as const. - (to_mb): Likewise. - -2005-12-18 Richard Henderson - - * sysdeps/alpha/libc-tls.c: Fix directory on include of base file. - -2005-12-18 Ulrich Drepper - - * iconv/gconv_builtin.c: Mark map with attribute_relro. - - * sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Define C - version for inside ld.so. - - * elf/rtld.c (dl_main): Don't use hp timing code unless it's available. - - * sysdeps/powerpc/powerpc32/setjmp-common.S [IS_IN_rtld]: Avoid - call to __sigjmp_save. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. - - * stdlib/cxa_atexit.c: Use PTR_MANGLE on function pointer. Fill in - flavor field last and protect with memory barrier. - * stdlib/on_exit.c: Likewise. - * stdlib/cxa_finalize.c: Use PTR_DEMANGLE on function pointer before - using it. - * stdlib/exit.c: Likewise. - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and - PTR_DEMANGLE for C code in libc. - * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. - -2005-12-17 Ulrich Drepper - - * elf/Versions [GLIBC_PRIVATE]: Export __pointer_chk_guard if defined. - * elf/rtld.c: Define __pointer_chk_guard_local and if necessary - __pointer_chk_guard. - (_rtld_global_ro): Initialize _dl_pointer_guard. - (dl_main): Initialize __pointer_chk_guard_local and either - __pointer_chk_guard or TLS value if necessary. - (process_envvars): Recognize and handle LD_POINTER_GUARD. - * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_pointer_guard. - * sysdeps/i386/__longjmp.S: Use PTR_DEMANGLE for PC if defined. - * sysdeps/x86_64/__longjmp.S: Likewise. - * sysdeps/i386/bsd-_setjmp.S: Use PTR_MANGLE for PC if defined. - * sysdeps/i386/bsd-_setjmp.S: Likewise. - * sysdeps/i386/setjmp.S: Likewise. - [IS_IN_rtld]: Avoid call to __sigjmp_save. - * sysdeps/i386/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and - PTR_DEMANGLE. - * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. - - * sysdeps/i386/elf/setjmp.S: Removed. - * sysdeps/i386/elf/bsd-setjmp.S: Removed. - - * elf/dl-error.c (_dl_catch_error): Use __sigsetgjmp instead of - setjmp. - * elf/dl-error.c (_dl_signal_error): Use __longjmp instead of longjmp. - * elf/dl-minimal.c (longjmp): Remove definition. - - * sysdeps/x86_64/bsd-setjmp.S [PIC] (setjmp): Add missing jmp. - -2005-12-14 Thorsten Kukuk - - * nscd/Makefile: Don't build nscd_nischeck. - * nscd/nscd_nischeck.c: Removed. - -2005-12-15 Ulrich Drepper - - * sysdeps/unix/sysv/linux/renameat.c: Move errno setting code in - separate function __atfct_seterrno_2. - * include/fcntl.h: Declare __atfct_seterrno_2. - * posix/unistd.h: Declare linkat, symlinkat, readlinkat. - * io/Makefile (routines): Add linkat, symlinkat, readlinkat. - * io/Versions [GLIBC_2.4]: Export linkat, symlinkat, readlinkat. - * io/linkat.c: New file. - * io/readlinkat.c: New file. - * io/symlinkat.c: New file. - * sysdeps/unix/sysv/linux/linkat.c: New file. - * sysdeps/unix/sysv/linux/readlinkat.c: New file. - * sysdeps/unix/sysv/linux/symlinkat.c: New file. - -2005-12-15 Roland McGrath - - [BZ #1997] - * manual/stdio.texi (String Streams): For open_memstream, elaborate a - little on malloc reference. - - * sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/. - * sysdeps/alpha/fpu/s_cacoshf.c: Likewise. - * sysdeps/alpha/fpu/s_casinf.c: Likewise. - * sysdeps/alpha/fpu/s_casinhf.c: Likewise. - * sysdeps/alpha/fpu/s_catanf.c: Likewise. - * sysdeps/alpha/fpu/s_catanhf.c: Likewise. - * sysdeps/alpha/fpu/s_ccosf.c: Likewise. - * sysdeps/alpha/fpu/s_ccoshf.c: Likewise. - * sysdeps/alpha/fpu/s_cexpf.c: Likewise. - * sysdeps/alpha/fpu/s_clog10f.c: Likewise. - * sysdeps/alpha/fpu/s_clogf.c: Likewise. - * sysdeps/alpha/fpu/s_cpowf.c: Likewise. - * sysdeps/alpha/fpu/s_cprojf.c: Likewise. - * sysdeps/alpha/fpu/s_csinf.c: Likewise. - * sysdeps/alpha/fpu/s_csinhf.c: Likewise. - * sysdeps/alpha/fpu/s_csqrtf.c: Likewise. - * sysdeps/alpha/fpu/s_ctanf.c: Likewise. - * sysdeps/alpha/fpu/s_ctanhf.c: Likewise. - * sysdeps/alpha/libc-tls.c: Likewise. - * sysdeps/gnu/glob64.c: Likewise. - * sysdeps/gnu/updwtmp.c: Likewise. - * sysdeps/gnu/utmp_file.c: Likewise. - * sysdeps/i386/bzero.c: Likewise. - * sysdeps/i386/ffs.c: Likewise. - * sysdeps/i386/i686/ffs.c: Likewise. - * sysdeps/i386/memset.c: Likewise. - * sysdeps/ia64/fpu/printf_fphex.c: Likewise. - * sysdeps/ia64/libc-tls.c: Likewise. - * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. - * sysdeps/m68k/ffs.c: Likewise. - * sysdeps/mach/hurd/getdents.c: Likewise. - * sysdeps/mach/hurd/init-posix.c: Likewise. - * sysdeps/mach/msync.c: Likewise. - * sysdeps/mips/libc-tls.c: Likewise. - * sysdeps/posix/profil.c: Likewise. - * sysdeps/posix/shm_open.c: Likewise. - * sysdeps/posix/shm_unlink.c: Likewise. - * sysdeps/posix/sprofil.c: Likewise. - * sysdeps/powerpc/ffs.c: Likewise. - * sysdeps/rs6000/ffs.c: Likewise. - * sysdeps/s390/libc-tls.c: Likewise. - * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise. - * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. - * sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise. - * sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/mq_close.c: Likewise. - * sysdeps/unix/sysv/linux/mq_getattr.c: Likewise. - * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. - * sysdeps/unix/sysv/linux/mq_open.c: Likewise. - * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. - * sysdeps/unix/sysv/linux/mq_send.c: Likewise. - * sysdeps/unix/sysv/linux/mq_unlink.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise. - * sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise. - * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. - * sysdeps/unix/sysv/linux/sigstack.c: Likewise. - * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. - * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. - * sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise. - * sysdeps/unix/sysv/linux/truncate64.c: Likewise. - * sysdeps/unix/sysv/linux/vfork.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise. - - * sysdeps/unix/sysv/linux/Makefile (inhibit-siglist): Removed. - -2005-12-13 Ulrich Drepper - - * locale/programs/charmap-kw.h: Regenerated with new gperf. - * locale/programs/locfile-kw.h: Likewise. - - * Makeconfig (+includes): Look in current directory late. - * Makerules: Add rules from rules before the rules for the current - directory. - * sysdeps/generic/__longjmp.c: Moved to... - * setjmp/__longjmp.c: ...here. - * sysdeps/generic/_exit.c: Moved to... - * posix/_exit.c: ...here. - * sysdeps/generic/_strerror.c: Moved to... - * string/_strerror.c: ...here. - * sysdeps/generic/abort.c: Moved to... - * stdlib/abort.c: ...here. - * sysdeps/generic/accept.c: Moved to... - * socket/accept.c: ...here. - * sysdeps/generic/access.c: Moved to... - * io/access.c: ...here. - * sysdeps/generic/acct.c: Moved to... - * misc/acct.c: ...here. - * sysdeps/generic/add_n.c: Moved to... - * stdlib/add_n.c: ...here. - * sysdeps/generic/addmul_1.c: Moved to... - * stdlib/addmul_1.c: ...here. - * sysdeps/generic/adjtime.c: Moved to... - * time/adjtime.c: ...here. - * sysdeps/generic/aio_cancel.c: Moved to... - * rt/aio_cancel.c: ...here. - * sysdeps/generic/aio_fsync.c: Moved to... - * rt/aio_fsync.c: ...here. - * sysdeps/generic/aio_misc.c: Moved to... - * rt/aio_misc.c: ...here. - * sysdeps/generic/aio_notify.c: Moved to... - * rt/aio_notify.c: ...here. - * sysdeps/generic/aio_read.c: Moved to... - * rt/aio_read.c: ...here. - * sysdeps/generic/aio_read64.c: Moved to... - * rt/aio_read64.c: ...here. - * sysdeps/generic/aio_sigqueue.c: Moved to... - * rt/aio_sigqueue.c: ...here. - * sysdeps/generic/aio_suspend.c: Moved to... - * rt/aio_suspend.c: ...here. - * sysdeps/generic/aio_write.c: Moved to... - * rt/aio_write.c: ...here. - * sysdeps/generic/aio_write64.c: Moved to... - * rt/aio_write64.c: ...here. - * sysdeps/generic/alarm.c: Moved to... - * posix/alarm.c: ...here. - * sysdeps/generic/allocrtsig.c: Moved to... - * signal/allocrtsig.c: ...here. - * sysdeps/generic/alphasort64.c: Moved to... - * dirent/alphasort64.c: ...here. - * sysdeps/generic/backtrace.c: Moved to... - * debug/backtrace.c: ...here. - * sysdeps/generic/backtracesyms.c: Moved to... - * debug/backtracesyms.c: ...here. - * sysdeps/generic/backtracesymsfd.c: Moved to... - * debug/backtracesymsfd.c: ...here. - * sysdeps/generic/bb_init_func.c: Moved to... - * gmon/bb_init_func.c: ...here. - * sysdeps/generic/bcopy.c: Moved to... - * string/bcopy.c: ...here. - * sysdeps/generic/bind.c: Moved to... - * socket/bind.c: ...here. - * sysdeps/generic/brdinit.c: Moved to... - * bare/brdinit.c: ...here. - * sysdeps/generic/brk.c: Moved to... - * misc/brk.c: ...here. - * sysdeps/generic/bsd-_setjmp.c: Moved to... - * setjmp/bsd-_setjmp.c: ...here. - * sysdeps/generic/bsd-setjmp.c: Moved to... - * setjmp/bsd-setjmp.c: ...here. - * sysdeps/generic/bzero.c: Moved to... - * string/bzero.c: ...here. - * sysdeps/generic/cabsf.c: Moved to... - * math/cabsf.c: ...here. - * sysdeps/generic/cargf.c: Moved to... - * math/cargf.c: ...here. - * sysdeps/generic/chdir.c: Moved to... - * io/chdir.c: ...here. - * sysdeps/generic/check_fds.c: Moved to... - * csu/check_fds.c: ...here. - * sysdeps/generic/check_pf.c: Moved to... - * inet/check_pf.c: ...here. - * sysdeps/generic/chflags.c: Moved to... - * misc/chflags.c: ...here. - * sysdeps/generic/chmod.c: Moved to... - * io/chmod.c: ...here. - * sysdeps/generic/chown.c: Moved to... - * io/chown.c: ...here. - * sysdeps/generic/chroot.c: Moved to... - * misc/chroot.c: ...here. - * sysdeps/generic/cimagf.c: Moved to... - * math/cimagf.c: ...here. - * sysdeps/generic/clock.c: Moved to... - * time/clock.c: ...here. - * sysdeps/generic/clock_getcpuclockid.c: Moved to... - * rt/clock_getcpuclockid.c: ...here. - * sysdeps/generic/clock_getres.c: Moved to... - * rt/clock_getres.c: ...here. - * sysdeps/generic/clock_gettime.c: Moved to... - * rt/clock_gettime.c: ...here. - * sysdeps/generic/clock_nanosleep.c: Moved to... - * rt/clock_nanosleep.c: ...here. - * sysdeps/generic/clock_settime.c: Moved to... - * rt/clock_settime.c: ...here. - * sysdeps/generic/close.c: Moved to... - * io/close.c: ...here. - * sysdeps/generic/closedir.c: Moved to... - * dirent/closedir.c: ...here. - * sysdeps/generic/cmp.c: Moved to... - * stdlib/cmp.c: ...here. - * sysdeps/generic/conjf.c: Moved to... - * math/conjf.c: ...here. - * sysdeps/generic/connect.c: Moved to... - * socket/connect.c: ...here. - * sysdeps/generic/console.c: Moved to... - * bare/console.c: ...here. - * sysdeps/generic/crealf.c: Moved to... - * math/crealf.c: ...here. - * sysdeps/generic/creat.c: Moved to... - * io/creat.c: ...here. - * sysdeps/generic/creat64.c: Moved to... - * io/creat64.c: ...here. - * sysdeps/generic/ctermid.c: Moved to... - * stdio-common/ctermid.c: ...here. - * sysdeps/generic/cuserid.c: Moved to... - * stdio-common/cuserid.c: ...here. - * sysdeps/generic/dbl2mpn.c: Moved to... - * stdlib/dbl2mpn.c: ...here. - * sysdeps/generic/dirfd.c: Moved to... - * dirent/dirfd.c: ...here. - * sysdeps/generic/div.c: Moved to... - * stdlib/div.c: ...here. - * sysdeps/generic/divmod_1.c: Moved to... - * stdlib/divmod_1.c: ...here. - * sysdeps/generic/divrem.c: Moved to... - * stdlib/divrem.c: ...here. - * sysdeps/generic/dl-brk.c: Moved to... - * elf/dl-brk.c: ...here. - * sysdeps/generic/dl-cache.c: Moved to... - * elf/dl-cache.c: ...here. - * sysdeps/generic/dl-environ.c: Moved to... - * elf/dl-environ.c: ...here. - * sysdeps/generic/dl-execstack.c: Moved to... - * elf/dl-execstack.c: ...here. - * sysdeps/generic/dl-fptr.c: Moved to... - * elf/dl-fptr.c: ...here. - * sysdeps/generic/dl-origin.c: Moved to... - * elf/dl-origin.c: ...here. - * sysdeps/generic/dl-sbrk.c: Moved to... - * elf/dl-sbrk.c: ...here. - * sysdeps/generic/dl-symaddr.c: Moved to... - * elf/dl-symaddr.c: ...here. - * sysdeps/generic/dl-sysdep.c: Moved to... - * elf/dl-sysdep.c: ...here. - * sysdeps/generic/dl-tls.c: Moved to... - * elf/dl-tls.c: ...here. - * sysdeps/generic/dl-trampoline.c: Moved to... - * elf/dl-trampoline.c: ...here. - * sysdeps/generic/dup.c: Moved to... - * io/dup.c: ...here. - * sysdeps/generic/dup2.c: Moved to... - * io/dup2.c: ...here. - * sysdeps/generic/e_acoshl.c: Moved to... - * math/e_acoshl.c: ...here. - * sysdeps/generic/e_acosl.c: Moved to... - * math/e_acosl.c: ...here. - * sysdeps/generic/e_asinl.c: Moved to... - * math/e_asinl.c: ...here. - * sysdeps/generic/e_atan2l.c: Moved to... - * math/e_atan2l.c: ...here. - * sysdeps/generic/e_atanhl.c: Moved to... - * math/e_atanhl.c: ...here. - * sysdeps/generic/e_coshl.c: Moved to... - * math/e_coshl.c: ...here. - * sysdeps/generic/e_exp10.c: Moved to... - * math/e_exp10.c: ...here. - * sysdeps/generic/e_exp10f.c: Moved to... - * math/e_exp10f.c: ...here. - * sysdeps/generic/e_exp10l.c: Moved to... - * math/e_exp10l.c: ...here. - * sysdeps/generic/e_exp2l.c: Moved to... - * math/e_exp2l.c: ...here. - * sysdeps/generic/e_expl.c: Moved to... - * math/e_expl.c: ...here. - * sysdeps/generic/e_fmodl.c: Moved to... - * math/e_fmodl.c: ...here. - * sysdeps/generic/e_gammal_r.c: Moved to... - * math/e_gammal_r.c: ...here. - * sysdeps/generic/e_hypotl.c: Moved to... - * math/e_hypotl.c: ...here. - * sysdeps/generic/e_j0l.c: Moved to... - * math/e_j0l.c: ...here. - * sysdeps/generic/e_j1l.c: Moved to... - * math/e_j1l.c: ...here. - * sysdeps/generic/e_jnl.c: Moved to... - * math/e_jnl.c: ...here. - * sysdeps/generic/e_lgammal_r.c: Moved to... - * math/e_lgammal_r.c: ...here. - * sysdeps/generic/e_log10l.c: Moved to... - * math/e_log10l.c: ...here. - * sysdeps/generic/e_log2l.c: Moved to... - * math/e_log2l.c: ...here. - * sysdeps/generic/e_logl.c: Moved to... - * math/e_logl.c: ...here. - * sysdeps/generic/e_powl.c: Moved to... - * math/e_powl.c: ...here. - * sysdeps/generic/e_rem_pio2l.c: Moved to... - * math/e_rem_pio2l.c: ...here. - * sysdeps/generic/e_scalb.c: Moved to... - * math/e_scalb.c: ...here. - * sysdeps/generic/e_scalbf.c: Moved to... - * math/e_scalbf.c: ...here. - * sysdeps/generic/e_scalbl.c: Moved to... - * math/e_scalbl.c: ...here. - * sysdeps/generic/e_sinhl.c: Moved to... - * math/e_sinhl.c: ...here. - * sysdeps/generic/e_sqrtl.c: Moved to... - * math/e_sqrtl.c: ...here. - * sysdeps/generic/enbl-secure.c: Moved to... - * elf/enbl-secure.c: ...here. - * sysdeps/generic/endutxent.c: Moved to... - * login/endutxent.c: ...here. - * sysdeps/generic/environ.c: Moved to... - * posix/environ.c: ...here. - * sysdeps/generic/errlist.c: Moved to... - * stdio-common/errlist.c: ...here. - * sysdeps/generic/errno-loc.c: Moved to... - * csu/errno-loc.c: ...here. - * sysdeps/generic/errno-loc.c: Moved to... - * csu/errno-loc.c: ...here. - * sysdeps/generic/errno.c: Moved to... - * csu/errno.c: ...here. - * sysdeps/generic/euidaccess.c: Moved to... - * io/euidaccess.c: ...here. - * sysdeps/generic/exc2signal.c: Moved to... - * hurd/exc2signal.c: ...here. - * sysdeps/generic/execve.c: Moved to... - * posix/execve.c: ...here. - * sysdeps/generic/fattach.c: Moved to... - * streams/fattach.c: ...here. - * sysdeps/generic/fchdir.c: Moved to... - * io/fchdir.c: ...here. - * sysdeps/generic/fchflags.c: Moved to... - * misc/fchflags.c: ...here. - * sysdeps/generic/fchmod.c: Moved to... - * io/fchmod.c: ...here. - * sysdeps/generic/fchown.c: Moved to... - * io/fchown.c: ...here. - * sysdeps/generic/fchownat.c: Moved to... - * io/fchownat.c: ...here. - * sysdeps/generic/fclrexcpt.c: Moved to... - * math/fclrexcpt.c: ...here. - * sysdeps/generic/fcntl.c: Moved to... - * io/fcntl.c: ...here. - * sysdeps/generic/fdatasync.c: Moved to... - * misc/fdatasync.c: ...here. - * sysdeps/generic/fdetach.c: Moved to... - * streams/fdetach.c: ...here. - * sysdeps/generic/fdopendir.c: Moved to... - * dirent/fdopendir.c: ...here. - * sysdeps/generic/fedisblxcpt.c: Moved to... - * math/fedisblxcpt.c: ...here. - * sysdeps/generic/feenablxcpt.c: Moved to... - * math/feenablxcpt.c: ...here. - * sysdeps/generic/fegetenv.c: Moved to... - * math/fegetenv.c: ...here. - * sysdeps/generic/fegetexcept.c: Moved to... - * math/fegetexcept.c: ...here. - * sysdeps/generic/fegetround.c: Moved to... - * math/fegetround.c: ...here. - * sysdeps/generic/feholdexcpt.c: Moved to... - * math/feholdexcpt.c: ...here. - * sysdeps/generic/fesetenv.c: Moved to... - * math/fesetenv.c: ...here. - * sysdeps/generic/fesetround.c: Moved to... - * math/fesetround.c: ...here. - * sysdeps/generic/feupdateenv.c: Moved to... - * math/feupdateenv.c: ...here. - * sysdeps/generic/fexecve.c: Moved to... - * posix/fexecve.c: ...here. - * sysdeps/generic/ffs.c: Moved to... - * string/ffs.c: ...here. - * sysdeps/generic/ffsll.c: Moved to... - * string/ffsll.c: ...here. - * sysdeps/generic/fgetexcptflg.c: Moved to... - * math/fgetexcptflg.c: ...here. - * sysdeps/generic/fgetxattr.c: Moved to... - * misc/fgetxattr.c: ...here. - * sysdeps/generic/flistxattr.c: Moved to... - * misc/flistxattr.c: ...here. - * sysdeps/generic/flock.c: Moved to... - * io/flock.c: ...here. - * sysdeps/generic/flockfile.c: Moved to... - * stdio-common/flockfile.c: ...here. - * sysdeps/generic/fork.c: Moved to... - * posix/fork.c: ...here. - * sysdeps/generic/fpathconf.c: Moved to... - * posix/fpathconf.c: ...here. - * sysdeps/generic/fpu_control.c: Moved to... - * math/fpu_control.c: ...here. - * sysdeps/generic/fraiseexcpt.c: Moved to... - * math/fraiseexcpt.c: ...here. - * sysdeps/generic/fremovexattr.c: Moved to... - * misc/fremovexattr.c: ...here. - * sysdeps/generic/fsetexcptflg.c: Moved to... - * math/fsetexcptflg.c: ...here. - * sysdeps/generic/fsetxattr.c: Moved to... - * misc/fsetxattr.c: ...here. - * sysdeps/generic/fstatfs.c: Moved to... - * io/fstatfs.c: ...here. - * sysdeps/generic/fstatfs64.c: Moved to... - * io/fstatfs64.c: ...here. - * sysdeps/generic/fstatvfs.c: Moved to... - * io/fstatvfs.c: ...here. - * sysdeps/generic/fstatvfs64.c: Moved to... - * io/fstatvfs64.c: ...here. - * sysdeps/generic/fsync.c: Moved to... - * misc/fsync.c: ...here. - * sysdeps/generic/ftestexcept.c: Moved to... - * math/ftestexcept.c: ...here. - * sysdeps/generic/ftime.c: Moved to... - * time/ftime.c: ...here. - * sysdeps/generic/ftruncate.c: Moved to... - * misc/ftruncate.c: ...here. - * sysdeps/generic/ftruncate64.c: Moved to... - * misc/ftruncate64.c: ...here. - * sysdeps/generic/ftrylockfile.c: Moved to... - * stdio-common/ftrylockfile.c: ...here. - * sysdeps/generic/funlockfile.c: Moved to... - * stdio-common/funlockfile.c: ...here. - * sysdeps/generic/futimes.c: Moved to... - * misc/futimes.c: ...here. - * sysdeps/generic/futimesat.c: Moved to... - * misc/futimesat.c: ...here. - * sysdeps/generic/fxstat.c: Moved to... - * io/fxstat.c: ...here. - * sysdeps/generic/fxstat64.c: Moved to... - * io/fxstat64.c: ...here. - * sysdeps/generic/fxstatat.c: Moved to... - * io/fxstatat.c: ...here. - * sysdeps/generic/fxstatat64.c: Moved to... - * io/fxstatat64.c: ...here. - * sysdeps/generic/gai_sigqueue.c: Moved to... - * resolv/gai_sigqueue.c: ...here. - * sysdeps/generic/gai_strerror.c: Moved to... - * posix/gai_strerror.c: ...here. - * sysdeps/generic/get_clockfreq.c: Moved to... - * rt/get_clockfreq.c: ...here. - * sysdeps/generic/getaddrinfo.c: Moved to... - * posix/getaddrinfo.c: ...here. - * sysdeps/generic/getclktck.c: Moved to... - * misc/getclktck.c: ...here. - * sysdeps/generic/getcontext.c: Moved to... - * stdlib/getcontext.c: ...here. - * sysdeps/generic/getcwd.c: Moved to... - * io/getcwd.c: ...here. - * sysdeps/generic/getdents.c: Moved to... - * dirent/getdents.c: ...here. - * sysdeps/generic/getdents64.c: Moved to... - * dirent/getdents64.c: ...here. - * sysdeps/generic/getdomain.c: Moved to... - * misc/getdomain.c: ...here. - * sysdeps/generic/getdtsz.c: Moved to... - * misc/getdtsz.c: ...here. - * sysdeps/generic/getegid.c: Moved to... - * posix/getegid.c: ...here. - * sysdeps/generic/getenv.c: Moved to... - * stdlib/getenv.c: ...here. - * sysdeps/generic/geteuid.c: Moved to... - * posix/geteuid.c: ...here. - * sysdeps/generic/getgid.c: Moved to... - * posix/getgid.c: ...here. - * sysdeps/generic/getgroups.c: Moved to... - * posix/getgroups.c: ...here. - * sysdeps/generic/gethostid.c: Moved to... - * misc/gethostid.c: ...here. - * sysdeps/generic/gethostname.c: Moved to... - * misc/gethostname.c: ...here. - * sysdeps/generic/getipv4sourcefilter.c: Moved to... - * inet/getipv4sourcefilter.c: ...here. - * sysdeps/generic/getitimer.c: Moved to... - * time/getitimer.c: ...here. - * sysdeps/generic/getloadavg.c: Moved to... - * misc/getloadavg.c: ...here. - * sysdeps/generic/getlogin.c: Moved to... - * posix/getlogin.c: ...here. - * sysdeps/generic/getlogin_r.c: Moved to... - * posix/getlogin_r.c: ...here. - * sysdeps/generic/getmsg.c: Moved to... - * streams/getmsg.c: ...here. - * sysdeps/generic/getpagesize.c: Moved to... - * misc/getpagesize.c: ...here. - * sysdeps/generic/getpeername.c: Moved to... - * socket/getpeername.c: ...here. - * sysdeps/generic/getpgid.c: Moved to... - * posix/getpgid.c: ...here. - * sysdeps/generic/getpgrp.c: Moved to... - * posix/getpgrp.c: ...here. - * sysdeps/generic/getpid.c: Moved to... - * posix/getpid.c: ...here. - * sysdeps/generic/getpmsg.c: Moved to... - * streams/getpmsg.c: ...here. - * sysdeps/generic/getppid.c: Moved to... - * posix/getppid.c: ...here. - * sysdeps/generic/getpriority.c: Moved to... - * resource/getpriority.c: ...here. - * sysdeps/generic/getpt.c: Moved to... - * login/getpt.c: ...here. - * sysdeps/generic/getresgid.c: Moved to... - * posix/getresgid.c: ...here. - * sysdeps/generic/getresuid.c: Moved to... - * posix/getresuid.c: ...here. - * sysdeps/generic/getrlimit.c: Moved to... - * resource/getrlimit.c: ...here. - * sysdeps/generic/getrlimit64.c: Moved to... - * resource/getrlimit64.c: ...here. - * sysdeps/generic/getrusage.c: Moved to... - * resource/getrusage.c: ...here. - * sysdeps/generic/getsid.c: Moved to... - * posix/getsid.c: ...here. - * sysdeps/generic/getsockname.c: Moved to... - * socket/getsockname.c: ...here. - * sysdeps/generic/getsockopt.c: Moved to... - * socket/getsockopt.c: ...here. - * sysdeps/generic/getsourcefilter.c: Moved to... - * inet/getsourcefilter.c: ...here. - * sysdeps/generic/getsysstats.c: Moved to... - * misc/getsysstats.c: ...here. - * sysdeps/generic/gettimeofday.c: Moved to... - * time/gettimeofday.c: ...here. - * sysdeps/generic/getuid.c: Moved to... - * posix/getuid.c: ...here. - * sysdeps/generic/getutmp.c: Moved to... - * login/getutmp.c: ...here. - * sysdeps/generic/getutmpx.c: Moved to... - * login/getutmpx.c: ...here. - * sysdeps/generic/getutxent.c: Moved to... - * login/getutxent.c: ...here. - * sysdeps/generic/getutxid.c: Moved to... - * login/getutxid.c: ...here. - * sysdeps/generic/getutxline.c: Moved to... - * login/getutxline.c: ...here. - * sysdeps/generic/getxattr.c: Moved to... - * misc/getxattr.c: ...here. - * sysdeps/generic/glob.c: Moved to... - * posix/glob.c: ...here. - * sysdeps/generic/glob64.c: Moved to... - * posix/glob64.c: ...here. - * sysdeps/generic/grantpt.c: Moved to... - * login/grantpt.c: ...here. - * sysdeps/generic/group_member.c: Moved to... - * posix/group_member.c: ...here. - * sysdeps/generic/gtty.c: Moved to... - * misc/gtty.c: ...here. - * sysdeps/generic/herrno-loc.c: Moved to... - * inet/herrno-loc.c: ...here. - * sysdeps/generic/htonl.c: Moved to... - * inet/htonl.c: ...here. - * sysdeps/generic/htons.c: Moved to... - * inet/htons.c: ...here. - * sysdeps/generic/if_index.c: Moved to... - * inet/if_index.c: ...here. - * sysdeps/generic/ifaddrs.c: Moved to... - * inet/ifaddrs.c: ...here. - * sysdeps/generic/ifreq.c: Moved to... - * inet/ifreq.c: ...here. - * sysdeps/generic/init-first.c: Moved to... - * csu/init-first.c: ...here. - * sysdeps/generic/init-posix.c: Moved to... - * posix/init-posix.c: ...here. - * sysdeps/generic/inlines.c: Moved to... - * stdlib/inlines.c: ...here. - * sysdeps/generic/ioctl.c: Moved to... - * misc/ioctl.c: ...here. - * sysdeps/generic/isastream.c: Moved to... - * streams/isastream.c: ...here. - * sysdeps/generic/isatty.c: Moved to... - * io/isatty.c: ...here. - * sysdeps/generic/isfdtype.c: Moved to... - * socket/isfdtype.c: ...here. - * sysdeps/generic/jmp-unwind.c: Moved to... - * setjmp/jmp-unwind.c: ...here. - * sysdeps/generic/k_cosl.c: Moved to... - * math/k_cosl.c: ...here. - * sysdeps/generic/k_rem_pio2l.c: Moved to... - * math/k_rem_pio2l.c: ...here. - * sysdeps/generic/k_sincosl.c: Moved to... - * math/k_sincosl.c: ...here. - * sysdeps/generic/k_sinl.c: Moved to... - * math/k_sinl.c: ...here. - * sysdeps/generic/k_tanl.c: Moved to... - * math/k_tanl.c: ...here. - * sysdeps/generic/kill.c: Moved to... - * signal/kill.c: ...here. - * sysdeps/generic/killpg.c: Moved to... - * signal/killpg.c: ...here. - * sysdeps/generic/labs.c: Moved to... - * stdlib/labs.c: ...here. - * sysdeps/generic/lchmod.c: Moved to... - * io/lchmod.c: ...here. - * sysdeps/generic/lchown.c: Moved to... - * io/lchown.c: ...here. - * sysdeps/generic/ldbl2mpn.c: Moved to... - * stdlib/ldbl2mpn.c: ...here. - * sysdeps/generic/ldiv.c: Moved to... - * stdlib/ldiv.c: ...here. - * sysdeps/generic/lgetxattr.c: Moved to... - * misc/lgetxattr.c: ...here. - * sysdeps/generic/libc-start.c: Moved to... - * csu/libc-start.c: ...here. - * sysdeps/generic/libc-tls.c: Moved to... - * csu/libc-tls.c: ...here. - * sysdeps/generic/libc_fatal.c: Moved to... - * libio/libc_fatal.c: ...here. - * sysdeps/generic/link.c: Moved to... - * io/link.c: ...here. - * sysdeps/generic/lio_listio.c: Moved to... - * rt/lio_listio.c: ...here. - * sysdeps/generic/lio_listio64.c: Moved to... - * rt/lio_listio64.c: ...here. - * sysdeps/generic/listen.c: Moved to... - * socket/listen.c: ...here. - * sysdeps/generic/listxattr.c: Moved to... - * misc/listxattr.c: ...here. - * sysdeps/generic/llabs.c: Moved to... - * stdlib/llabs.c: ...here. - * sysdeps/generic/lldiv.c: Moved to... - * stdlib/lldiv.c: ...here. - * sysdeps/generic/llistxattr.c: Moved to... - * misc/llistxattr.c: ...here. - * sysdeps/generic/lockf.c: Moved to... - * io/lockf.c: ...here. - * sysdeps/generic/lockf64.c: Moved to... - * io/lockf64.c: ...here. - * sysdeps/generic/longjmp-ts.c: Moved to... - * hurd/longjmp-ts.c: ...here. - * sysdeps/generic/longjmp.c: Moved to... - * setjmp/longjmp.c: ...here. - * sysdeps/generic/lremovexattr.c: Moved to... - * misc/lremovexattr.c: ...here. - * sysdeps/generic/lseek.c: Moved to... - * misc/lseek.c: ...here. - * sysdeps/generic/lseek64.c: Moved to... - * io/lseek64.c: ...here. - * sysdeps/generic/lsetxattr.c: Moved to... - * misc/lsetxattr.c: ...here. - * sysdeps/generic/lshift.c: Moved to... - * stdlib/lshift.c: ...here. - * sysdeps/generic/lutimes.c: Moved to... - * misc/lutimes.c: ...here. - * sysdeps/generic/lxstat.c: Moved to... - * io/lxstat.c: ...here. - * sysdeps/generic/lxstat64.c: Moved to... - * io/lxstat64.c: ...here. - * sysdeps/generic/madvise.c: Moved to... - * misc/madvise.c: ...here. - * sysdeps/generic/makecontext.c: Moved to... - * stdlib/makecontext.c: ...here. - * sysdeps/generic/memccpy.c: Moved to... - * string/memccpy.c: ...here. - * sysdeps/generic/memchr.c: Moved to... - * string/memchr.c: ...here. - * sysdeps/generic/memcmp.c: Moved to... - * string/memcmp.c: ...here. - * sysdeps/generic/memcpy.c: Moved to... - * string/memcpy.c: ...here. - * sysdeps/generic/memcpy_chk.c: Moved to... - * debug/memcpy_chk.c: ...here. - * sysdeps/generic/memmem.c: Moved to... - * string/memmem.c: ...here. - * sysdeps/generic/memmove.c: Moved to... - * string/memmove.c: ...here. - * sysdeps/generic/memmove_chk.c: Moved to... - * debug/memmove_chk.c: ...here. - * sysdeps/generic/mempcpy.c: Moved to... - * string/mempcpy.c: ...here. - * sysdeps/generic/mempcpy_chk.c: Moved to... - * debug/mempcpy_chk.c: ...here. - * sysdeps/generic/memrchr.c: Moved to... - * string/memrchr.c: ...here. - * sysdeps/generic/memset.c: Moved to... - * string/memset.c: ...here. - * sysdeps/generic/memset_chk.c: Moved to... - * debug/memset_chk.c: ...here. - * sysdeps/generic/mig-reply.c: Moved to... - * mach/mig-reply.c: ...here. - * sysdeps/generic/mincore.c: Moved to... - * misc/mincore.c: ...here. - * sysdeps/generic/mkdir.c: Moved to... - * io/mkdir.c: ...here. - * sysdeps/generic/mkdirat.c: Moved to... - * io/mkdirat.c: ...here. - * sysdeps/generic/mkfifo.c: Moved to... - * io/mkfifo.c: ...here. - * sysdeps/generic/mkfifoat.c: Moved to... - * io/mkfifoat.c: ...here. - * sysdeps/generic/mknod.c: Moved to... - * io/mknod.c: ...here. - * sysdeps/generic/mknodat.c: Moved to... - * io/mknodat.c: ...here. - * sysdeps/generic/mlock.c: Moved to... - * misc/mlock.c: ...here. - * sysdeps/generic/mlockall.c: Moved to... - * misc/mlockall.c: ...here. - * sysdeps/generic/mmap.c: Moved to... - * misc/mmap.c: ...here. - * sysdeps/generic/mmap64.c: Moved to... - * misc/mmap64.c: ...here. - * sysdeps/generic/mod_1.c: Moved to... - * stdlib/mod_1.c: ...here. - * sysdeps/generic/morecore.c: Moved to... - * malloc/morecore.c: ...here. - * sysdeps/generic/mp_clz_tab.c: Moved to... - * stdlib/mp_clz_tab.c: ...here. - * sysdeps/generic/mpn2dbl.c: Moved to... - * stdlib/mpn2dbl.c: ...here. - * sysdeps/generic/mpn2flt.c: Moved to... - * stdlib/mpn2flt.c: ...here. - * sysdeps/generic/mpn2ldbl.c: Moved to... - * stdlib/mpn2ldbl.c: ...here. - * sysdeps/generic/mprotect.c: Moved to... - * misc/mprotect.c: ...here. - * sysdeps/generic/mq_close.c: Moved to... - * rt/mq_close.c: ...here. - * sysdeps/generic/mq_getattr.c: Moved to... - * rt/mq_getattr.c: ...here. - * sysdeps/generic/mq_notify.c: Moved to... - * rt/mq_notify.c: ...here. - * sysdeps/generic/mq_open.c: Moved to... - * rt/mq_open.c: ...here. - * sysdeps/generic/mq_receive.c: Moved to... - * rt/mq_receive.c: ...here. - * sysdeps/generic/mq_send.c: Moved to... - * rt/mq_send.c: ...here. - * sysdeps/generic/mq_setattr.c: Moved to... - * rt/mq_setattr.c: ...here. - * sysdeps/generic/mq_timedreceive.c: Moved to... - * rt/mq_timedreceive.c: ...here. - * sysdeps/generic/mq_timedsend.c: Moved to... - * rt/mq_timedsend.c: ...here. - * sysdeps/generic/mq_unlink.c: Moved to... - * rt/mq_unlink.c: ...here. - * sysdeps/generic/msgctl.c: Moved to... - * sysvipc/msgctl.c: ...here. - * sysdeps/generic/msgget.c: Moved to... - * sysvipc/msgget.c: ...here. - * sysdeps/generic/msgrcv.c: Moved to... - * sysvipc/msgrcv.c: ...here. - * sysdeps/generic/msgsnd.c: Moved to... - * sysvipc/msgsnd.c: ...here. - * sysdeps/generic/msync.c: Moved to... - * misc/msync.c: ...here. - * sysdeps/generic/mul.c: Moved to... - * stdlib/mul.c: ...here. - * sysdeps/generic/mul_1.c: Moved to... - * stdlib/mul_1.c: ...here. - * sysdeps/generic/mul_n.c: Moved to... - * stdlib/mul_n.c: ...here. - * sysdeps/generic/munlock.c: Moved to... - * misc/munlock.c: ...here. - * sysdeps/generic/munlockall.c: Moved to... - * misc/munlockall.c: ...here. - * sysdeps/generic/munmap.c: Moved to... - * misc/munmap.c: ...here. - * sysdeps/generic/nanosleep.c: Moved to... - * posix/nanosleep.c: ...here. - * sysdeps/generic/nice.c: Moved to... - * resource/nice.c: ...here. - * sysdeps/generic/nscd_setup_thread.c: Moved to... - * nscd/nscd_setup_thread.c: ...here. - * sysdeps/generic/open.c: Moved to... - * io/open.c: ...here. - * sysdeps/generic/open64.c: Moved to... - * io/open64.c: ...here. - * sysdeps/generic/openat.c: Moved to... - * io/openat.c: ...here. - * sysdeps/generic/openat64.c: Moved to... - * io/openat64.c: ...here. - * sysdeps/generic/opendir.c: Moved to... - * dirent/opendir.c: ...here. - * sysdeps/generic/opensock.c: Moved to... - * socket/opensock.c: ...here. - * sysdeps/generic/pathconf.c: Moved to... - * posix/pathconf.c: ...here. - * sysdeps/generic/pause.c: Moved to... - * posix/pause.c: ...here. - * sysdeps/generic/pipe.c: Moved to... - * io/pipe.c: ...here. - * sysdeps/generic/poll.c: Moved to... - * io/poll.c: ...here. - * sysdeps/generic/posix_fadvise.c: Moved to... - * io/posix_fadvise.c: ...here. - * sysdeps/generic/posix_fadvise64.c: Moved to... - * io/posix_fadvise64.c: ...here. - * sysdeps/generic/posix_fallocate.c: Moved to... - * io/posix_fallocate.c: ...here. - * sysdeps/generic/posix_fallocate64.c: Moved to... - * io/posix_fallocate64.c: ...here. - * sysdeps/generic/posix_madvise.c: Moved to... - * posix/posix_madvise.c: ...here. - * sysdeps/generic/pread.c: Moved to... - * posix/pread.c: ...here. - * sysdeps/generic/pread64.c: Moved to... - * posix/pread64.c: ...here. - * sysdeps/generic/printf_fphex.c: Moved to... - * stdio-common/printf_fphex.c: ...here. - * sysdeps/generic/prof-freq.c: Moved to... - * gmon/prof-freq.c: ...here. - * sysdeps/generic/profil.c: Moved to... - * gmon/profil.c: ...here. - * sysdeps/generic/pselect.c: Moved to... - * misc/pselect.c: ...here. - * sysdeps/generic/ptrace.c: Moved to... - * misc/ptrace.c: ...here. - * sysdeps/generic/ptsname.c: Moved to... - * login/ptsname.c: ...here. - * sysdeps/generic/putenv.c: Moved to... - * stdlib/putenv.c: ...here. - * sysdeps/generic/putmsg.c: Moved to... - * streams/putmsg.c: ...here. - * sysdeps/generic/putpmsg.c: Moved to... - * streams/putpmsg.c: ...here. - * sysdeps/generic/pututxline.c: Moved to... - * login/pututxline.c: ...here. - * sysdeps/generic/pwrite.c: Moved to... - * posix/pwrite.c: ...here. - * sysdeps/generic/pwrite64.c: Moved to... - * posix/pwrite64.c: ...here. - * sysdeps/generic/raise.c: Moved to... - * signal/raise.c: ...here. - * sysdeps/generic/rawmemchr.c: Moved to... - * string/rawmemchr.c: ...here. - * sysdeps/generic/read.c: Moved to... - * io/read.c: ...here. - * sysdeps/generic/readdir.c: Moved to... - * dirent/readdir.c: ...here. - * sysdeps/generic/readdir64.c: Moved to... - * dirent/readdir64.c: ...here. - * sysdeps/generic/readdir64_r.c: Moved to... - * dirent/readdir64_r.c: ...here. - * sysdeps/generic/readdir_r.c: Moved to... - * dirent/readdir_r.c: ...here. - * sysdeps/generic/readelflib.c: Moved to... - * elf/readelflib.c: ...here. - * sysdeps/generic/readlink.c: Moved to... - * io/readlink.c: ...here. - * sysdeps/generic/readonly-area.c: Moved to... - * debug/readonly-area.c: ...here. - * sysdeps/generic/readv.c: Moved to... - * misc/readv.c: ...here. - * sysdeps/generic/reboot.c: Moved to... - * misc/reboot.c: ...here. - * sysdeps/generic/recv.c: Moved to... - * socket/recv.c: ...here. - * sysdeps/generic/recvfrom.c: Moved to... - * socket/recvfrom.c: ...here. - * sysdeps/generic/recvmsg.c: Moved to... - * socket/recvmsg.c: ...here. - * sysdeps/generic/remap_file_pages.c: Moved to... - * misc/remap_file_pages.c: ...here. - * sysdeps/generic/remove.c: Moved to... - * stdio-common/remove.c: ...here. - * sysdeps/generic/removexattr.c: Moved to... - * misc/removexattr.c: ...here. - * sysdeps/generic/rename.c: Moved to... - * stdio-common/rename.c: ...here. - * sysdeps/generic/renameat.c: Moved to... - * stdio-common/renameat.c: ...here. - * sysdeps/generic/res-state.c: Moved to... - * resolv/res-state.c: ...here. - * sysdeps/generic/revoke.c: Moved to... - * misc/revoke.c: ...here. - * sysdeps/generic/rewinddir.c: Moved to... - * dirent/rewinddir.c: ...here. - * sysdeps/generic/rmdir.c: Moved to... - * io/rmdir.c: ...here. - * sysdeps/generic/rshift.c: Moved to... - * stdlib/rshift.c: ...here. - * sysdeps/generic/s_asinhl.c: Moved to... - * math/s_asinhl.c: ...here. - * sysdeps/generic/s_atanl.c: Moved to... - * math/s_atanl.c: ...here. - * sysdeps/generic/s_cacos.c: Moved to... - * math/s_cacos.c: ...here. - * sysdeps/generic/s_cacosf.c: Moved to... - * math/s_cacosf.c: ...here. - * sysdeps/generic/s_cacosh.c: Moved to... - * math/s_cacosh.c: ...here. - * sysdeps/generic/s_cacoshf.c: Moved to... - * math/s_cacoshf.c: ...here. - * sysdeps/generic/s_cacoshl.c: Moved to... - * math/s_cacoshl.c: ...here. - * sysdeps/generic/s_cacosl.c: Moved to... - * math/s_cacosl.c: ...here. - * sysdeps/generic/s_casin.c: Moved to... - * math/s_casin.c: ...here. - * sysdeps/generic/s_casinf.c: Moved to... - * math/s_casinf.c: ...here. - * sysdeps/generic/s_casinh.c: Moved to... - * math/s_casinh.c: ...here. - * sysdeps/generic/s_casinhf.c: Moved to... - * math/s_casinhf.c: ...here. - * sysdeps/generic/s_casinhl.c: Moved to... - * math/s_casinhl.c: ...here. - * sysdeps/generic/s_casinl.c: Moved to... - * math/s_casinl.c: ...here. - * sysdeps/generic/s_catan.c: Moved to... - * math/s_catan.c: ...here. - * sysdeps/generic/s_catanf.c: Moved to... - * math/s_catanf.c: ...here. - * sysdeps/generic/s_catanh.c: Moved to... - * math/s_catanh.c: ...here. - * sysdeps/generic/s_catanhf.c: Moved to... - * math/s_catanhf.c: ...here. - * sysdeps/generic/s_catanhl.c: Moved to... - * math/s_catanhl.c: ...here. - * sysdeps/generic/s_catanl.c: Moved to... - * math/s_catanl.c: ...here. - * sysdeps/generic/s_cbrtl.c: Moved to... - * math/s_cbrtl.c: ...here. - * sysdeps/generic/s_ccos.c: Moved to... - * math/s_ccos.c: ...here. - * sysdeps/generic/s_ccosf.c: Moved to... - * math/s_ccosf.c: ...here. - * sysdeps/generic/s_ccosh.c: Moved to... - * math/s_ccosh.c: ...here. - * sysdeps/generic/s_ccoshf.c: Moved to... - * math/s_ccoshf.c: ...here. - * sysdeps/generic/s_ccoshl.c: Moved to... - * math/s_ccoshl.c: ...here. - * sysdeps/generic/s_ccosl.c: Moved to... - * math/s_ccosl.c: ...here. - * sysdeps/generic/s_cexp.c: Moved to... - * math/s_cexp.c: ...here. - * sysdeps/generic/s_cexpf.c: Moved to... - * math/s_cexpf.c: ...here. - * sysdeps/generic/s_cexpl.c: Moved to... - * math/s_cexpl.c: ...here. - * sysdeps/generic/s_clog.c: Moved to... - * math/s_clog.c: ...here. - * sysdeps/generic/s_clog10.c: Moved to... - * math/s_clog10.c: ...here. - * sysdeps/generic/s_clog10f.c: Moved to... - * math/s_clog10f.c: ...here. - * sysdeps/generic/s_clog10l.c: Moved to... - * math/s_clog10l.c: ...here. - * sysdeps/generic/s_clogf.c: Moved to... - * math/s_clogf.c: ...here. - * sysdeps/generic/s_clogl.c: Moved to... - * math/s_clogl.c: ...here. - * sysdeps/generic/s_cpow.c: Moved to... - * math/s_cpow.c: ...here. - * sysdeps/generic/s_cpowf.c: Moved to... - * math/s_cpowf.c: ...here. - * sysdeps/generic/s_cpowl.c: Moved to... - * math/s_cpowl.c: ...here. - * sysdeps/generic/s_cproj.c: Moved to... - * math/s_cproj.c: ...here. - * sysdeps/generic/s_cprojf.c: Moved to... - * math/s_cprojf.c: ...here. - * sysdeps/generic/s_cprojl.c: Moved to... - * math/s_cprojl.c: ...here. - * sysdeps/generic/s_csin.c: Moved to... - * math/s_csin.c: ...here. - * sysdeps/generic/s_csinf.c: Moved to... - * math/s_csinf.c: ...here. - * sysdeps/generic/s_csinh.c: Moved to... - * math/s_csinh.c: ...here. - * sysdeps/generic/s_csinhf.c: Moved to... - * math/s_csinhf.c: ...here. - * sysdeps/generic/s_csinhl.c: Moved to... - * math/s_csinhl.c: ...here. - * sysdeps/generic/s_csinl.c: Moved to... - * math/s_csinl.c: ...here. - * sysdeps/generic/s_csqrt.c: Moved to... - * math/s_csqrt.c: ...here. - * sysdeps/generic/s_csqrtf.c: Moved to... - * math/s_csqrtf.c: ...here. - * sysdeps/generic/s_csqrtl.c: Moved to... - * math/s_csqrtl.c: ...here. - * sysdeps/generic/s_ctan.c: Moved to... - * math/s_ctan.c: ...here. - * sysdeps/generic/s_ctanf.c: Moved to... - * math/s_ctanf.c: ...here. - * sysdeps/generic/s_ctanh.c: Moved to... - * math/s_ctanh.c: ...here. - * sysdeps/generic/s_ctanhf.c: Moved to... - * math/s_ctanhf.c: ...here. - * sysdeps/generic/s_ctanhl.c: Moved to... - * math/s_ctanhl.c: ...here. - * sysdeps/generic/s_ctanl.c: Moved to... - * math/s_ctanl.c: ...here. - * sysdeps/generic/s_erfl.c: Moved to... - * math/s_erfl.c: ...here. - * sysdeps/generic/s_expm1l.c: Moved to... - * math/s_expm1l.c: ...here. - * sysdeps/generic/s_fdim.c: Moved to... - * math/s_fdim.c: ...here. - * sysdeps/generic/s_fdimf.c: Moved to... - * math/s_fdimf.c: ...here. - * sysdeps/generic/s_fdiml.c: Moved to... - * math/s_fdiml.c: ...here. - * sysdeps/generic/s_fma.c: Moved to... - * math/s_fma.c: ...here. - * sysdeps/generic/s_fmaf.c: Moved to... - * math/s_fmaf.c: ...here. - * sysdeps/generic/s_fmal.c: Moved to... - * math/s_fmal.c: ...here. - * sysdeps/generic/s_fmax.c: Moved to... - * math/s_fmax.c: ...here. - * sysdeps/generic/s_fmaxf.c: Moved to... - * math/s_fmaxf.c: ...here. - * sysdeps/generic/s_fmaxl.c: Moved to... - * math/s_fmaxl.c: ...here. - * sysdeps/generic/s_fmin.c: Moved to... - * math/s_fmin.c: ...here. - * sysdeps/generic/s_fminf.c: Moved to... - * math/s_fminf.c: ...here. - * sysdeps/generic/s_fminl.c: Moved to... - * math/s_fminl.c: ...here. - * sysdeps/generic/s_ldexp.c: Moved to... - * math/s_ldexp.c: ...here. - * sysdeps/generic/s_ldexpf.c: Moved to... - * math/s_ldexpf.c: ...here. - * sysdeps/generic/s_ldexpl.c: Moved to... - * math/s_ldexpl.c: ...here. - * sysdeps/generic/s_log1pl.c: Moved to... - * math/s_log1pl.c: ...here. - * sysdeps/generic/s_nan.c: Moved to... - * math/s_nan.c: ...here. - * sysdeps/generic/s_nanf.c: Moved to... - * math/s_nanf.c: ...here. - * sysdeps/generic/s_nanl.c: Moved to... - * math/s_nanl.c: ...here. - * sysdeps/generic/s_nextafter.c: Moved to... - * math/s_nextafter.c: ...here. - * sysdeps/generic/s_nexttowardf.c: Moved to... - * math/s_nexttowardf.c: ...here. - * sysdeps/generic/s_nexttowardl.c: Moved to... - * math/s_nexttowardl.c: ...here. - * sysdeps/generic/s_significand.c: Moved to... - * math/s_significand.c: ...here. - * sysdeps/generic/s_significandf.c: Moved to... - * math/s_significandf.c: ...here. - * sysdeps/generic/s_significandl.c: Moved to... - * math/s_significandl.c: ...here. - * sysdeps/generic/s_tanhl.c: Moved to... - * math/s_tanhl.c: ...here. - * sysdeps/generic/sbrk.c: Moved to... - * misc/sbrk.c: ...here. - * sysdeps/generic/scandir64.c: Moved to... - * dirent/scandir64.c: ...here. - * sysdeps/generic/sched_getaffinity.c: Moved to... - * posix/sched_getaffinity.c: ...here. - * sysdeps/generic/sched_getp.c: Moved to... - * posix/sched_getp.c: ...here. - * sysdeps/generic/sched_gets.c: Moved to... - * posix/sched_gets.c: ...here. - * sysdeps/generic/sched_primax.c: Moved to... - * posix/sched_primax.c: ...here. - * sysdeps/generic/sched_primin.c: Moved to... - * posix/sched_primin.c: ...here. - * sysdeps/generic/sched_rr_gi.c: Moved to... - * posix/sched_rr_gi.c: ...here. - * sysdeps/generic/sched_setaffinity.c: Moved to... - * posix/sched_setaffinity.c: ...here. - * sysdeps/generic/sched_setp.c: Moved to... - * posix/sched_setp.c: ...here. - * sysdeps/generic/sched_sets.c: Moved to... - * posix/sched_sets.c: ...here. - * sysdeps/generic/sched_yield.c: Moved to... - * posix/sched_yield.c: ...here. - * sysdeps/generic/seekdir.c: Moved to... - * dirent/seekdir.c: ...here. - * sysdeps/generic/segfault.c: Moved to... - * debug/segfault.c: ...here. - * sysdeps/generic/select.c: Moved to... - * misc/select.c: ...here. - * sysdeps/generic/semctl.c: Moved to... - * sysvipc/semctl.c: ...here. - * sysdeps/generic/semget.c: Moved to... - * sysvipc/semget.c: ...here. - * sysdeps/generic/semop.c: Moved to... - * sysvipc/semop.c: ...here. - * sysdeps/generic/semtimedop.c: Moved to... - * sysvipc/semtimedop.c: ...here. - * sysdeps/generic/send.c: Moved to... - * socket/send.c: ...here. - * sysdeps/generic/sendfile.c: Moved to... - * io/sendfile.c: ...here. - * sysdeps/generic/sendfile64.c: Moved to... - * io/sendfile64.c: ...here. - * sysdeps/generic/sendmsg.c: Moved to... - * socket/sendmsg.c: ...here. - * sysdeps/generic/sendto.c: Moved to... - * socket/sendto.c: ...here. - * sysdeps/generic/setcontext.c: Moved to... - * stdlib/setcontext.c: ...here. - * sysdeps/generic/setdomain.c: Moved to... - * misc/setdomain.c: ...here. - * sysdeps/generic/setegid.c: Moved to... - * misc/setegid.c: ...here. - * sysdeps/generic/setenv.c: Moved to... - * stdlib/setenv.c: ...here. - * sysdeps/generic/seteuid.c: Moved to... - * misc/seteuid.c: ...here. - * sysdeps/generic/setfpucw.c: Moved to... - * math/setfpucw.c: ...here. - * sysdeps/generic/setgid.c: Moved to... - * posix/setgid.c: ...here. - * sysdeps/generic/setgroups.c: Moved to... - * grp/setgroups.c: ...here. - * sysdeps/generic/sethostid.c: Moved to... - * misc/sethostid.c: ...here. - * sysdeps/generic/sethostname.c: Moved to... - * misc/sethostname.c: ...here. - * sysdeps/generic/setipv4sourcefilter.c: Moved to... - * inet/setipv4sourcefilter.c: ...here. - * sysdeps/generic/setitimer.c: Moved to... - * time/setitimer.c: ...here. - * sysdeps/generic/setjmp.c: Moved to... - * setjmp/setjmp.c: ...here. - * sysdeps/generic/setlogin.c: Moved to... - * posix/setlogin.c: ...here. - * sysdeps/generic/setpgid.c: Moved to... - * posix/setpgid.c: ...here. - * sysdeps/generic/setpgrp.c: Moved to... - * posix/setpgrp.c: ...here. - * sysdeps/generic/setpriority.c: Moved to... - * resource/setpriority.c: ...here. - * sysdeps/generic/setregid.c: Moved to... - * misc/setregid.c: ...here. - * sysdeps/generic/setresgid.c: Moved to... - * posix/setresgid.c: ...here. - * sysdeps/generic/setresuid.c: Moved to... - * posix/setresuid.c: ...here. - * sysdeps/generic/setreuid.c: Moved to... - * misc/setreuid.c: ...here. - * sysdeps/generic/setrlimit.c: Moved to... - * resource/setrlimit.c: ...here. - * sysdeps/generic/setrlimit64.c: Moved to... - * resource/setrlimit64.c: ...here. - * sysdeps/generic/setsid.c: Moved to... - * posix/setsid.c: ...here. - * sysdeps/generic/setsockopt.c: Moved to... - * socket/setsockopt.c: ...here. - * sysdeps/generic/setsourcefilter.c: Moved to... - * inet/setsourcefilter.c: ...here. - * sysdeps/generic/settimeofday.c: Moved to... - * time/settimeofday.c: ...here. - * sysdeps/generic/setuid.c: Moved to... - * posix/setuid.c: ...here. - * sysdeps/generic/setutxent.c: Moved to... - * login/setutxent.c: ...here. - * sysdeps/generic/setxattr.c: Moved to... - * misc/setxattr.c: ...here. - * sysdeps/generic/shm_open.c: Moved to... - * rt/shm_open.c: ...here. - * sysdeps/generic/shm_unlink.c: Moved to... - * rt/shm_unlink.c: ...here. - * sysdeps/generic/shmat.c: Moved to... - * sysvipc/shmat.c: ...here. - * sysdeps/generic/shmctl.c: Moved to... - * sysvipc/shmctl.c: ...here. - * sysdeps/generic/shmdt.c: Moved to... - * sysvipc/shmdt.c: ...here. - * sysdeps/generic/shmget.c: Moved to... - * sysvipc/shmget.c: ...here. - * sysdeps/generic/shutdown.c: Moved to... - * socket/shutdown.c: ...here. - * sysdeps/generic/sigaction.c: Moved to... - * signal/sigaction.c: ...here. - * sysdeps/generic/sigaltstack.c: Moved to... - * signal/sigaltstack.c: ...here. - * sysdeps/generic/sigblock.c: Moved to... - * signal/sigblock.c: ...here. - * sysdeps/generic/sigfillset.c: Moved to... - * signal/sigfillset.c: ...here. - * sysdeps/generic/sigignore.c: Moved to... - * signal/sigignore.c: ...here. - * sysdeps/generic/sigintr.c: Moved to... - * signal/sigintr.c: ...here. - * sysdeps/generic/sigjmp.c: Moved to... - * setjmp/sigjmp.c: ...here. - * sysdeps/generic/siglist.c: Moved to... - * stdio-common/siglist.c: ...here. - * sysdeps/generic/signal.c: Moved to... - * signal/signal.c: ...here. - * sysdeps/generic/sigpause.c: Moved to... - * signal/sigpause.c: ...here. - * sysdeps/generic/sigpending.c: Moved to... - * signal/sigpending.c: ...here. - * sysdeps/generic/sigprocmask.c: Moved to... - * signal/sigprocmask.c: ...here. - * sysdeps/generic/sigqueue.c: Moved to... - * signal/sigqueue.c: ...here. - * sysdeps/generic/sigreturn.c: Moved to... - * signal/sigreturn.c: ...here. - * sysdeps/generic/sigset.c: Moved to... - * signal/sigset.c: ...here. - * sysdeps/generic/sigsetmask.c: Moved to... - * signal/sigsetmask.c: ...here. - * sysdeps/generic/sigstack.c: Moved to... - * signal/sigstack.c: ...here. - * sysdeps/generic/sigsuspend.c: Moved to... - * signal/sigsuspend.c: ...here. - * sysdeps/generic/sigtimedwait.c: Moved to... - * signal/sigtimedwait.c: ...here. - * sysdeps/generic/sigvec.c: Moved to... - * signal/sigvec.c: ...here. - * sysdeps/generic/sigwait.c: Moved to... - * signal/sigwait.c: ...here. - * sysdeps/generic/sigwaitinfo.c: Moved to... - * signal/sigwaitinfo.c: ...here. - * sysdeps/generic/sleep.c: Moved to... - * posix/sleep.c: ...here. - * sysdeps/generic/sockatmark.c: Moved to... - * socket/sockatmark.c: ...here. - * sysdeps/generic/socket.c: Moved to... - * socket/socket.c: ...here. - * sysdeps/generic/socketpair.c: Moved to... - * socket/socketpair.c: ...here. - * sysdeps/generic/spawni.c: Moved to... - * posix/spawni.c: ...here. - * sysdeps/generic/speed.c: Moved to... - * termios/speed.c: ...here. - * sysdeps/generic/sprofil.c: Moved to... - * gmon/sprofil.c: ...here. - * sysdeps/generic/sstk.c: Moved to... - * misc/sstk.c: ...here. - * sysdeps/generic/start.c: Moved to... - * csu/start.c: ...here. - * sysdeps/generic/statfs.c: Moved to... - * io/statfs.c: ...here. - * sysdeps/generic/statfs64.c: Moved to... - * io/statfs64.c: ...here. - * sysdeps/generic/statvfs.c: Moved to... - * io/statvfs.c: ...here. - * sysdeps/generic/statvfs64.c: Moved to... - * io/statvfs64.c: ...here. - * sysdeps/generic/stime.c: Moved to... - * time/stime.c: ...here. - * sysdeps/generic/stpcpy.c: Moved to... - * string/stpcpy.c: ...here. - * sysdeps/generic/stpcpy_chk.c: Moved to... - * debug/stpcpy_chk.c: ...here. - * sysdeps/generic/stpncpy.c: Moved to... - * string/stpncpy.c: ...here. - * sysdeps/generic/stpncpy_chk.c: Moved to... - * debug/stpncpy_chk.c: ...here. - * sysdeps/generic/strcasecmp.c: Moved to... - * string/strcasecmp.c: ...here. - * sysdeps/generic/strcasecmp_l.c: Moved to... - * string/strcasecmp_l.c: ...here. - * sysdeps/generic/strcasestr.c: Moved to... - * string/strcasestr.c: ...here. - * sysdeps/generic/strcat.c: Moved to... - * string/strcat.c: ...here. - * sysdeps/generic/strcat_chk.c: Moved to... - * debug/strcat_chk.c: ...here. - * sysdeps/generic/strchr.c: Moved to... - * string/strchr.c: ...here. - * sysdeps/generic/strchrnul.c: Moved to... - * string/strchrnul.c: ...here. - * sysdeps/generic/strcmp.c: Moved to... - * string/strcmp.c: ...here. - * sysdeps/generic/strcpy.c: Moved to... - * string/strcpy.c: ...here. - * sysdeps/generic/strcpy_chk.c: Moved to... - * debug/strcpy_chk.c: ...here. - * sysdeps/generic/strcspn.c: Moved to... - * string/strcspn.c: ...here. - * sysdeps/generic/string-inlines.c: Moved to... - * string/string-inlines.c: ...here. - * sysdeps/generic/strlen.c: Moved to... - * string/strlen.c: ...here. - * sysdeps/generic/strncase.c: Moved to... - * string/strncase.c: ...here. - * sysdeps/generic/strncase_l.c: Moved to... - * string/strncase_l.c: ...here. - * sysdeps/generic/strncat.c: Moved to... - * string/strncat.c: ...here. - * sysdeps/generic/strncat_chk.c: Moved to... - * debug/strncat_chk.c: ...here. - * sysdeps/generic/strncmp.c: Moved to... - * string/strncmp.c: ...here. - * sysdeps/generic/strncpy.c: Moved to... - * string/strncpy.c: ...here. - * sysdeps/generic/strncpy_chk.c: Moved to... - * debug/strncpy_chk.c: ...here. - * sysdeps/generic/strnlen.c: Moved to... - * string/strnlen.c: ...here. - * sysdeps/generic/strpbrk.c: Moved to... - * string/strpbrk.c: ...here. - * sysdeps/generic/strrchr.c: Moved to... - * string/strrchr.c: ...here. - * sysdeps/generic/strsep.c: Moved to... - * string/strsep.c: ...here. - * sysdeps/generic/strspn.c: Moved to... - * string/strspn.c: ...here. - * sysdeps/generic/strstr.c: Moved to... - * string/strstr.c: ...here. - * sysdeps/generic/strtoimax.c: Moved to... - * stdlib/strtoimax.c: ...here. - * sysdeps/generic/strtok.c: Moved to... - * string/strtok.c: ...here. - * sysdeps/generic/strtok_r.c: Moved to... - * string/strtok_r.c: ...here. - * sysdeps/generic/strtol.c: Moved to... - * stdlib/strtol.c: ...here. - * sysdeps/generic/strtol_l.c: Moved to... - * stdlib/strtol_l.c: ...here. - * sysdeps/generic/strtold_l.c: Moved to... - * stdlib/strtold_l.c: ...here. - * sysdeps/generic/strtoll.c: Moved to... - * stdlib/strtoll.c: ...here. - * sysdeps/generic/strtoll_l.c: Moved to... - * stdlib/strtoll_l.c: ...here. - * sysdeps/generic/strtoul.c: Moved to... - * stdlib/strtoul.c: ...here. - * sysdeps/generic/strtoul_l.c: Moved to... - * stdlib/strtoul_l.c: ...here. - * sysdeps/generic/strtoull.c: Moved to... - * stdlib/strtoull.c: ...here. - * sysdeps/generic/strtoull_l.c: Moved to... - * stdlib/strtoull_l.c: ...here. - * sysdeps/generic/strtoumax.c: Moved to... - * stdlib/strtoumax.c: ...here. - * sysdeps/generic/strtsupp.c: Moved to... - * bare/strtsupp.c: ...here. - * sysdeps/generic/stty.c: Moved to... - * misc/stty.c: ...here. - * sysdeps/generic/sub_n.c: Moved to... - * stdlib/sub_n.c: ...here. - * sysdeps/generic/submul_1.c: Moved to... - * stdlib/submul_1.c: ...here. - * sysdeps/generic/swapcontext.c: Moved to... - * stdlib/swapcontext.c: ...here. - * sysdeps/generic/swapoff.c: Moved to... - * misc/swapoff.c: ...here. - * sysdeps/generic/swapon.c: Moved to... - * misc/swapon.c: ...here. - * sysdeps/generic/symlink.c: Moved to... - * io/symlink.c: ...here. - * sysdeps/generic/sync.c: Moved to... - * misc/sync.c: ...here. - * sysdeps/generic/syscall.c: Moved to... - * misc/syscall.c: ...here. - * sysdeps/generic/sysconf.c: Moved to... - * posix/sysconf.c: ...here. - * sysdeps/generic/sysdep.c: Moved to... - * csu/sysdep.c: ...here. - * sysdeps/generic/syslog.c: Moved to... - * misc/syslog.c: ...here. - * sysdeps/generic/system.c: Moved to... - * stdlib/system.c: ...here. - * sysdeps/generic/sysv_signal.c: Moved to... - * signal/sysv_signal.c: ...here. - * sysdeps/generic/t_sincosl.c: Moved to... - * math/t_sincosl.c: ...here. - * sysdeps/generic/tcdrain.c: Moved to... - * termios/tcdrain.c: ...here. - * sysdeps/generic/tcflow.c: Moved to... - * termios/tcflow.c: ...here. - * sysdeps/generic/tcflush.c: Moved to... - * termios/tcflush.c: ...here. - * sysdeps/generic/tcgetattr.c: Moved to... - * termios/tcgetattr.c: ...here. - * sysdeps/generic/tcgetpgrp.c: Moved to... - * termios/tcgetpgrp.c: ...here. - * sysdeps/generic/tcsendbrk.c: Moved to... - * termios/tcsendbrk.c: ...here. - * sysdeps/generic/tcsetattr.c: Moved to... - * termios/tcsetattr.c: ...here. - * sysdeps/generic/tcsetpgrp.c: Moved to... - * termios/tcsetpgrp.c: ...here. - * sysdeps/generic/telldir.c: Moved to... - * dirent/telldir.c: ...here. - * sysdeps/generic/tempname.c: Moved to... - * stdio-common/tempname.c: ...here. - * sysdeps/generic/time.c: Moved to... - * time/time.c: ...here. - * sysdeps/generic/timer_create.c: Moved to... - * rt/timer_create.c: ...here. - * sysdeps/generic/timer_delete.c: Moved to... - * rt/timer_delete.c: ...here. - * sysdeps/generic/timer_getoverr.c: Moved to... - * rt/timer_getoverr.c: ...here. - * sysdeps/generic/timer_gettime.c: Moved to... - * rt/timer_gettime.c: ...here. - * sysdeps/generic/timer_settime.c: Moved to... - * rt/timer_settime.c: ...here. - * sysdeps/generic/times.c: Moved to... - * posix/times.c: ...here. - * sysdeps/generic/tmpfile.c: Moved to... - * stdio-common/tmpfile.c: ...here. - * sysdeps/generic/tmpfile64.c: Moved to... - * stdio-common/tmpfile64.c: ...here. - * sysdeps/generic/trampoline.c: Moved to... - * hurd/trampoline.c: ...here. - * sysdeps/generic/truncate.c: Moved to... - * misc/truncate.c: ...here. - * sysdeps/generic/truncate64.c: Moved to... - * misc/truncate64.c: ...here. - * sysdeps/generic/tst-timer.c: Moved to... - * rt/tst-timer.c: ...here. - * sysdeps/generic/ttyname.c: Moved to... - * io/ttyname.c: ...here. - * sysdeps/generic/ttyname_r.c: Moved to... - * io/ttyname_r.c: ...here. - * sysdeps/generic/ualarm.c: Moved to... - * misc/ualarm.c: ...here. - * sysdeps/generic/udiv_qrnnd.c: Moved to... - * stdlib/udiv_qrnnd.c: ...here. - * sysdeps/generic/ulimit.c: Moved to... - * resource/ulimit.c: ...here. - * sysdeps/generic/umask.c: Moved to... - * io/umask.c: ...here. - * sysdeps/generic/uname.c: Moved to... - * posix/uname.c: ...here. - * sysdeps/generic/unlink.c: Moved to... - * io/unlink.c: ...here. - * sysdeps/generic/unlinkat.c: Moved to... - * io/unlinkat.c: ...here. - * sysdeps/generic/unlockpt.c: Moved to... - * login/unlockpt.c: ...here. - * sysdeps/generic/updwtmp.c: Moved to... - * login/updwtmp.c: ...here. - * sysdeps/generic/updwtmpx.c: Moved to... - * login/updwtmpx.c: ...here. - * sysdeps/generic/usleep.c: Moved to... - * misc/usleep.c: ...here. - * sysdeps/generic/ustat.c: Moved to... - * misc/ustat.c: ...here. - * sysdeps/generic/utime.c: Moved to... - * io/utime.c: ...here. - * sysdeps/generic/utimes.c: Moved to... - * misc/utimes.c: ...here. - * sysdeps/generic/utmp_file.c: Moved to... - * login/utmp_file.c: ...here. - * sysdeps/generic/utmpxname.c: Moved to... - * login/utmpxname.c: ...here. - * sysdeps/generic/versionsort64.c: Moved to... - * dirent/versionsort64.c: ...here. - * sysdeps/generic/vfork.c: Moved to... - * posix/vfork.c: ...here. - * sysdeps/generic/vhangup.c: Moved to... - * misc/vhangup.c: ...here. - * sysdeps/generic/vlimit.c: Moved to... - * resource/vlimit.c: ...here. - * sysdeps/generic/vtimes.c: Moved to... - * resource/vtimes.c: ...here. - * sysdeps/generic/w_acos.c: Moved to... - * math/w_acos.c: ...here. - * sysdeps/generic/w_acosf.c: Moved to... - * math/w_acosf.c: ...here. - * sysdeps/generic/w_acosh.c: Moved to... - * math/w_acosh.c: ...here. - * sysdeps/generic/w_acoshf.c: Moved to... - * math/w_acoshf.c: ...here. - * sysdeps/generic/w_acoshl.c: Moved to... - * math/w_acoshl.c: ...here. - * sysdeps/generic/w_acosl.c: Moved to... - * math/w_acosl.c: ...here. - * sysdeps/generic/w_asin.c: Moved to... - * math/w_asin.c: ...here. - * sysdeps/generic/w_asinf.c: Moved to... - * math/w_asinf.c: ...here. - * sysdeps/generic/w_asinl.c: Moved to... - * math/w_asinl.c: ...here. - * sysdeps/generic/w_atan2.c: Moved to... - * math/w_atan2.c: ...here. - * sysdeps/generic/w_atan2f.c: Moved to... - * math/w_atan2f.c: ...here. - * sysdeps/generic/w_atan2l.c: Moved to... - * math/w_atan2l.c: ...here. - * sysdeps/generic/w_atanh.c: Moved to... - * math/w_atanh.c: ...here. - * sysdeps/generic/w_atanhf.c: Moved to... - * math/w_atanhf.c: ...here. - * sysdeps/generic/w_atanhl.c: Moved to... - * math/w_atanhl.c: ...here. - * sysdeps/generic/w_cosh.c: Moved to... - * math/w_cosh.c: ...here. - * sysdeps/generic/w_coshf.c: Moved to... - * math/w_coshf.c: ...here. - * sysdeps/generic/w_coshl.c: Moved to... - * math/w_coshl.c: ...here. - * sysdeps/generic/w_drem.c: Moved to... - * math/w_drem.c: ...here. - * sysdeps/generic/w_dremf.c: Moved to... - * math/w_dremf.c: ...here. - * sysdeps/generic/w_dreml.c: Moved to... - * math/w_dreml.c: ...here. - * sysdeps/generic/w_exp10.c: Moved to... - * math/w_exp10.c: ...here. - * sysdeps/generic/w_exp10f.c: Moved to... - * math/w_exp10f.c: ...here. - * sysdeps/generic/w_exp10l.c: Moved to... - * math/w_exp10l.c: ...here. - * sysdeps/generic/w_exp2.c: Moved to... - * math/w_exp2.c: ...here. - * sysdeps/generic/w_exp2f.c: Moved to... - * math/w_exp2f.c: ...here. - * sysdeps/generic/w_exp2l.c: Moved to... - * math/w_exp2l.c: ...here. - * sysdeps/generic/w_expl.c: Moved to... - * math/w_expl.c: ...here. - * sysdeps/generic/w_fmod.c: Moved to... - * math/w_fmod.c: ...here. - * sysdeps/generic/w_fmodf.c: Moved to... - * math/w_fmodf.c: ...here. - * sysdeps/generic/w_fmodl.c: Moved to... - * math/w_fmodl.c: ...here. - * sysdeps/generic/w_hypot.c: Moved to... - * math/w_hypot.c: ...here. - * sysdeps/generic/w_hypotf.c: Moved to... - * math/w_hypotf.c: ...here. - * sysdeps/generic/w_hypotl.c: Moved to... - * math/w_hypotl.c: ...here. - * sysdeps/generic/w_j0.c: Moved to... - * math/w_j0.c: ...here. - * sysdeps/generic/w_j0f.c: Moved to... - * math/w_j0f.c: ...here. - * sysdeps/generic/w_j0l.c: Moved to... - * math/w_j0l.c: ...here. - * sysdeps/generic/w_j1.c: Moved to... - * math/w_j1.c: ...here. - * sysdeps/generic/w_j1f.c: Moved to... - * math/w_j1f.c: ...here. - * sysdeps/generic/w_j1l.c: Moved to... - * math/w_j1l.c: ...here. - * sysdeps/generic/w_jn.c: Moved to... - * math/w_jn.c: ...here. - * sysdeps/generic/w_jnf.c: Moved to... - * math/w_jnf.c: ...here. - * sysdeps/generic/w_jnl.c: Moved to... - * math/w_jnl.c: ...here. - * sysdeps/generic/w_lgamma.c: Moved to... - * math/w_lgamma.c: ...here. - * sysdeps/generic/w_lgamma_r.c: Moved to... - * math/w_lgamma_r.c: ...here. - * sysdeps/generic/w_lgammaf.c: Moved to... - * math/w_lgammaf.c: ...here. - * sysdeps/generic/w_lgammaf_r.c: Moved to... - * math/w_lgammaf_r.c: ...here. - * sysdeps/generic/w_lgammal.c: Moved to... - * math/w_lgammal.c: ...here. - * sysdeps/generic/w_lgammal_r.c: Moved to... - * math/w_lgammal_r.c: ...here. - * sysdeps/generic/w_log.c: Moved to... - * math/w_log.c: ...here. - * sysdeps/generic/w_log10.c: Moved to... - * math/w_log10.c: ...here. - * sysdeps/generic/w_log10f.c: Moved to... - * math/w_log10f.c: ...here. - * sysdeps/generic/w_log10l.c: Moved to... - * math/w_log10l.c: ...here. - * sysdeps/generic/w_log2.c: Moved to... - * math/w_log2.c: ...here. - * sysdeps/generic/w_log2f.c: Moved to... - * math/w_log2f.c: ...here. - * sysdeps/generic/w_log2l.c: Moved to... - * math/w_log2l.c: ...here. - * sysdeps/generic/w_logf.c: Moved to... - * math/w_logf.c: ...here. - * sysdeps/generic/w_logl.c: Moved to... - * math/w_logl.c: ...here. - * sysdeps/generic/w_pow.c: Moved to... - * math/w_pow.c: ...here. - * sysdeps/generic/w_powf.c: Moved to... - * math/w_powf.c: ...here. - * sysdeps/generic/w_powl.c: Moved to... - * math/w_powl.c: ...here. - * sysdeps/generic/w_remainder.c: Moved to... - * math/w_remainder.c: ...here. - * sysdeps/generic/w_remainderf.c: Moved to... - * math/w_remainderf.c: ...here. - * sysdeps/generic/w_remainderl.c: Moved to... - * math/w_remainderl.c: ...here. - * sysdeps/generic/w_scalb.c: Moved to... - * math/w_scalb.c: ...here. - * sysdeps/generic/w_scalbf.c: Moved to... - * math/w_scalbf.c: ...here. - * sysdeps/generic/w_scalbl.c: Moved to... - * math/w_scalbl.c: ...here. - * sysdeps/generic/w_sinh.c: Moved to... - * math/w_sinh.c: ...here. - * sysdeps/generic/w_sinhf.c: Moved to... - * math/w_sinhf.c: ...here. - * sysdeps/generic/w_sinhl.c: Moved to... - * math/w_sinhl.c: ...here. - * sysdeps/generic/w_sqrt.c: Moved to... - * math/w_sqrt.c: ...here. - * sysdeps/generic/w_sqrtf.c: Moved to... - * math/w_sqrtf.c: ...here. - * sysdeps/generic/w_sqrtl.c: Moved to... - * math/w_sqrtl.c: ...here. - * sysdeps/generic/w_tgamma.c: Moved to... - * math/w_tgamma.c: ...here. - * sysdeps/generic/w_tgammaf.c: Moved to... - * math/w_tgammaf.c: ...here. - * sysdeps/generic/w_tgammal.c: Moved to... - * math/w_tgammal.c: ...here. - * sysdeps/generic/wait.c: Moved to... - * posix/wait.c: ...here. - * sysdeps/generic/wait3.c: Moved to... - * posix/wait3.c: ...here. - * sysdeps/generic/wait4.c: Moved to... - * posix/wait4.c: ...here. - * sysdeps/generic/waitid.c: Moved to... - * posix/waitid.c: ...here. - * sysdeps/generic/waitpid.c: Moved to... - * posix/waitpid.c: ...here. - * sysdeps/generic/wcstoimax.c: Moved to... - * stdlib/wcstoimax.c: ...here. - * sysdeps/generic/wcstol.c: Moved to... - * wcsmbs/wcstol.c: ...here. - * sysdeps/generic/wcstol_l.c: Moved to... - * wcsmbs/wcstol_l.c: ...here. - * sysdeps/generic/wcstoll.c: Moved to... - * wcsmbs/wcstoll.c: ...here. - * sysdeps/generic/wcstoll_l.c: Moved to... - * wcsmbs/wcstoll_l.c: ...here. - * sysdeps/generic/wcstoul.c: Moved to... - * wcsmbs/wcstoul.c: ...here. - * sysdeps/generic/wcstoul_l.c: Moved to... - * wcsmbs/wcstoul_l.c: ...here. - * sysdeps/generic/wcstoull.c: Moved to... - * wcsmbs/wcstoull.c: ...here. - * sysdeps/generic/wcstoull_l.c: Moved to... - * wcsmbs/wcstoull_l.c: ...here. - * sysdeps/generic/wcstoumax.c: Moved to... - * stdlib/wcstoumax.c: ...here. - * sysdeps/generic/wordcopy.c: Moved to... - * string/wordcopy.c: ...here. - * sysdeps/generic/wordexp.c: Moved to... - * posix/wordexp.c: ...here. - * sysdeps/generic/write.c: Moved to... - * io/write.c: ...here. - * sysdeps/generic/writev.c: Moved to... - * misc/writev.c: ...here. - * sysdeps/generic/xmknod.c: Moved to... - * io/xmknod.c: ...here. - * sysdeps/generic/xmknodat.c: Moved to... - * io/xmknodat.c: ...here. - * sysdeps/generic/xpg-strerror.c: Moved to... - * string/xpg-strerror.c: ...here. - * sysdeps/generic/xstat.c: Moved to... - * io/xstat.c: ...here. - * sysdeps/generic/xstat64.c: Moved to... - * io/xstat64.c: ...here. - * catgets/gencat.c: Use "config.h" to refer to the local config.h file. - * stdlib/stdtod_l.c: Use "..." for gmp-impl.h and longlong.h headers. - * sysdeps/ieee754/ldbl-96/printf_fphex.c: Adjust for files moving - out of sysdeps/generic. - * sysdeps/ieee754/ldbl-96/strtold_l.c: Likewise. - * sysdeps/powerpc/elf/libc-start.c: Likewise. - * sysdeps/unix/sysv/linux/dl-sbrk.c: Likewise. - * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. - * sysdeps/unix/sysv/linux/segfault.c: Likewise. - * sysdeps/unix/sysv/linux/sigreturn.c: Likewise. - * sysdeps/unix/sysv/linux/syslog.c: Likewise. - * sysdeps/unix/sysv/linux/updwtmp.c: Likewise. - * sysdeps/unix/sysv/linux/utmp_file.c: Likewise. - * sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise. - * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h: Likewise. - * sysdeps/wordsize-32/llabs.c: Likewise. - * sysdeps/wordsize-32/lldiv.c: Likewise. - * sysdeps/wordsize-64/glob.c: Likewise. - * sysdeps/wordsize-64/labs.c: Likewise. - * sysdeps/wordsize-64/ldiv.c: Likewise. - * sysdeps/wordsize-64/strtol.c: Likewise. - * sysdeps/wordsize-64/strtol_l.c: Likewise. - * sysdeps/wordsize-64/strtoul.c: Likewise. - * sysdeps/wordsize-64/strtoul_l.c: Likewise. - * sysdeps/wordsize-64/wcstol.c: Likewise. - * sysdeps/wordsize-64/wcstol_l.c: Likewise. - * sysdeps/wordsize-64/wcstoul.c: Likewise. - * sysdeps/wordsize-64/wcstoul_l.c: Likewise. - * sysdeps/x86_64/fpu/printf_fphex.c: Likewise. - * wcsmbs/Makefile (strtox-CFLAGS): remove -I../stdlib. - (CPPFLAGS-wcstold_l.c): Add -I../stdlib. - -2005-12-13 Roland McGrath - - * sysdeps/generic/Makefile: Remove remaining bits/endian.h cruft. - -2005-12-13 Ulrich Drepper - - * sysdeps/generic/signame.c: Removed. - * sysdeps/generic/signame.h: Removed. - * sysdeps/generic/configure.in: Removed. - * sysdeps/generic/Dist: Remove these files. - - * sysdeps/generic/det_endian.c: Removed. - * sysdeps/generic/Makefile: Remove rule to build it. - * sysdeps/generic/Dist: Don't distribute it. - -2005-12-13 Roland McGrath - - * sysdeps/powerpc/dl-procinfo.c: New file. - * sysdeps/powerpc/dl-procinfo.h: New file. - -2005-12-12 Ulrich Drepper - - * io/sys/stat.h: Add restrict to fstatat declarations. - -2005-12-10 Ulrich Drepper - - * posix/regex_internal.h: Include if available. - -2005-12-06 Paolo Bonzini - - * posix/regex_internal.h (SIZE_MAX): Provide a default definition. - -2005-12-08 Ulrich Drepper - - * nis/nis_call.c (inetstr2int): Optimize. - -2005-12-08 Jakub Jelinek - - * nis/nis_call.c (__nisbind_create): Remove __nisbind_destroy, - ->clnt cannot be != NULL. - (__do_niscall): No need to use __nisbind_destroy, __nisbind_next - did it. - (__nisbind_connect): use_auth is already TRUE, otherwise we would - not be here. - - * nis/nis_lookup.c (nis_lookup): Remove unnecessary - __nisbind_destroy calls. __nisbind_next does all that. - - * nis/ypclnt.c (yp_update): Before trying default authentication, - free DES descriptor. - -2005-12-07 Jakub Jelinek - - * nis/nis_table.c (nis_list): Fix memory handling in error case. - -2005-12-07 Ulrich Drepper - - * nis/nis_table.c (nis_list): Remove have_tablepath, just use the - pointer value itself. - -2005-12-06 Ulrich Drepper - - * catgets/gencat.c: Use GPL, not LGPL. - * elf/cache.c: Likewise. - * elf/chroot_canon.c: Likewise. - * elf/ldconfig.c: Likewise. - * elf/readlib.c: Likewise. - * iconv/dummy-repertoire.c: Likewise. - * iconv/iconv_charmap.c: Likewise. - * iconv/iconv_prog.c: Likewise. - * iconv/iconvconfig.c: Likewise. - * locale/programs/3level.h: Likewise. - * locale/programs/charmap-dir.c: Likewise. - * locale/programs/charmap-dir.h: Likewise. - * locale/programs/charmap-kw.gperf: Likewise. - * locale/programs/charmap.c: Likewise. - * locale/programs/charmap.h: Likewise. - * locale/programs/config.h: Likewise. - * locale/programs/ld-address.c: Likewise. - * locale/programs/ld-collate.c: Likewise. - * locale/programs/ld-ctype.c: Likewise. - * locale/programs/ld-identification.c: Likewise. - * locale/programs/ld-measurement.c: Likewise. - * locale/programs/ld-messages.c: Likewise. - * locale/programs/ld-monetary.c: Likewise. - * locale/programs/ld-name.c: Likewise. - * locale/programs/ld-numeric.c: Likewise. - * locale/programs/ld-paper.c: Likewise. - * locale/programs/ld-telephone.c: Likewise. - * locale/programs/ld-time.c: Likewise. - * locale/programs/linereader.c: Likewise. - * locale/programs/linereader.h: Likewise. - * locale/programs/locale-spec.c: Likewise. - * locale/programs/locale.c: Likewise. - * locale/programs/localedef.c: Likewise. - * locale/programs/localedef.h: Likewise. - * locale/programs/locarchive.c: Likewise. - * locale/programs/locfile-kw.gperf: Likewise. - * locale/programs/locfile-token.h: Likewise. - * locale/programs/locfile.c: Likewise. - * locale/programs/locfile.h: Likewise. - * locale/programs/repertoire.c: Likewise. - * locale/programs/repertoire.h: Likewise. - * locale/programs/simple-hash.c: Likewise. - * locale/programs/simple-hash.h: Likewise. - * locale/programs/xmalloc.c: Likewise. - * locale/programs/xstrdup.c: Likewise. - * malloc/memusagestat.c: Likewise. - * nscd/aicache.c: Likewise. - * nscd/cache.c: Likewise. - * nscd/connections.c: Likewise. - * nscd/dbg_log.c: Likewise. - * nscd/gai.c: Likewise. - * nscd/getgrgid_r.c: Likewise. - * nscd/getgrnam_r.c: Likewise. - * nscd/gethstbyad_r.c: Likewise. - * nscd/gethstbynm2_r.c: Likewise. - * nscd/getpwnam_r.c: Likewise. - * nscd/getpwuid_r.c: Likewise. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/initgrcache.c: Likewise. - * nscd/mem.c: Likewise. - * nscd/nscd.c: Likewise. - * nscd/nscd_conf.c: Likewise. - * nscd/pwdcache.c: Likewise. - * posix/getconf.c: Likewise. - * sysdeps/generic/nscd_setup_thread.c: Likewise. - * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise. - - * sunrpc/auth_des.c (authdes_pk_create): If conversation key - cannot be created, free memory. - Reported by rprasad@vmware.com. - -2005-11-15 Mike Frysinger - - * sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor - protection and allow pthread.h to include bits/setjmp.h as well as - setjmp.h. - * sysdeps/m68k/bits/setjmp.h: Likewise. - * sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h - are allow to include bits/setjmp.h. - * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs - cast of address. - * sysdeps/sh/bits/setjmp.h: Likewise. - -2005-11-12 Jim Meyering - - * sysdeps/unix/opendir.c (__alloc_dir): Declare STATP parameter - to be pointer to const. - * include/dirent.h: Update decl. - -2005-12-05 Roland McGrath - - * hurd/hurdmalloc.c: Remove $ tag $ magic. - * mach/err_kern.sub: Likewise. - * mach/err_server.sub: Likewise. - * mach/err_us.sub: Likewise. - * mach/error_compat.c: Likewise. - * mach/errorlib.h: Likewise. - * mach/errstring.c: Likewise. - * mach/mach/error.h: Likewise. - * mach/mach_error.c: Likewise. - * mach/mach_error.h: Likewise. - * mach/msg-destroy.c: Likewise. - * mach/msgserver.c: Likewise. - * sysdeps/mach/sys/reboot.h: Likewise. - - * sysdeps/generic/dwarf2.h: Replace license text with glibc LGPL. - -2005-11-28 Jakub Jelinek - - * malloc/tst-mallocfork.c (do_test): Make sure sa_flags is - initialized. Reported by John Reiser . - -2005-12-05 Daniel Jacobowitz - - * stdlib/longlong.h: Update from GCC. - -2005-12-04 Joseph S. Myers - - * soft-fp/soft-fp.h: Include . - - * soft-fp/floatdisf.c (__floatdisf): Return float. - -2005-12-05 Roland McGrath - - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_POSIX_CPU_TIMERS): New macro, for 2.6.12 and later. - -2005-12-03 Ulrich Drepper - - * nis/nis_table.c (nis_list): Optimize freeing and reallocation of - result record. - - * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): - Better sized buffers. Correct error case handling. - * nis/nis_error.c (nis_sperror_r): Let snprintf determine whether - there is an overflow. - * nis/nss_nisplus/nisplus-service.c: Fix locking to use - _nss_create_tablename. Avoid unnecessary copying, remove - unnecessary variables, general cleanup. - * nis/nss_nisplus/nisplus-rpc.c: Likewise. - * nis/nss_nisplus/nisplus-proto.c: Likewise.. - * nis/nss_nisplus/nisplus-network.c: Fix locking to use - _nss_create_tablename. Avoid unnecessary copying, general cleanup. - * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_getipnodebyname_r): - Removed. - Fix locking to use _nss_create_tablename. Avoid unnecessary copying, - general cleanup. - * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): - Correctly construct request. - Fix locking to use _nss_create_tablename. Avoid unnecessary copying, - general cleanup. - * nis/nss_nisplus/nisplus-alias.c: Fix locking to use - _nss_create_tablename. Avoid unnecessary copying, general cleanup. - * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_setnetgrent): - Rewrite to use snprintf. - * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): - Likewise. +2006-09-06 Jakub Jelinek -2005-12-02 Ulrich Drepper + * posix/regex_internal.c (re_string_reconstruct): Handle + offset < pstr->valid_raw_len && pstr->offsets_needed case. + Ensure no bytes read before raw_mbs array. Pass a saved copy of + pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to + re_string_context_at. + * posix/Makefile: Add rules to build and run bug-regex26 test. + * posix/bug-regex26.c: New test. - * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): - Renamed from _nss_create_tablename. Export from file (but not DSO). - (pwd_tablename_val): Renamed from tablename_val, mark hidden. - (pwd_tablename_len): Renamed from tablename_len, mark hidden. - Change all users. - * nis/nss_nisplus/nisplus-spwd.c (_nss_create_tablename): Removed. - Use _nss_pwd_create_tablename now. Use pwd_tablename_val and - pwd_tablename_len. Remove unnecessary variables, general cleanup. - - * nis/nss_nisplus/nisplus-pwd.c: Fix locking to use - _nss_create_tablename. Avoid unnecessary copying, remove - unnecessary variables, general cleanup. - * nis/nss_nisplus/nisplus-grp.c: Likewise. + * locale/programs/ld-collate.c (collate_read): Goto sym_equiv_free + rather than col_sym_free. Move seqp declaration earlier. - * io/Makefile (routines): Add mknodat, xmknodat, mkdirat, mkfifoat. - (static-only-routines): Add mknodat. - * io/Versions [GLIBC_2.4]: Add mkdirat, mkfifoat, __xmknodat. - * io/sys/stat.h: Declare mkditat, mknodat, mkfifoat, __xmknodat. - Define mknodat inline function. - * include/sys/stat.h: Add hidden proto for __xmknodat. - * sysdeps/generic/mkdirat.c: New file. - * sysdeps/generic/mkfifoat.c: New file. - * sysdeps/generic/mknodat.c: New file. - * sysdeps/generic/xmknodat.c: New file. - * sysdeps/unix/mkfifoat.c: New file. - * sysdeps/unix/sysv/linux/mkdirat.c: New file. - * sysdeps/unix/sysv/linux/xmknodat.c: New file. + * resolv/gai_suspend.c (gai_suspend): Make sure result is initialized. - * sysdeps/generic/xmknod.c: Add one more parameter check. +2006-09-05 Jakub Jelinek -2005-11-28 Andreas Jaeger + * nscd/initgrcache.c (addinitgroupsX): Move any_success + decl before first goto out. - * sysdeps/unix/sysv/linux/mips/bits/mman.h (MREMAP_FIXED): Added, - Patch by René Rebe . +2006-09-04 Jakub Jelinek -2005-11-27 Ulrich Drepper + * Makerules (shlib.lds): If have-hash-style, put .hash section + at the end of the RO segment. - * sysdeps/posix/getaddrinfo.c: Avoid RFC 3484 sorting if there are - multiple return records but only one address. +2006-09-04 Ulrich Drepper - * sysdeps/posix/getaddrinfo.c (gaih_inet): Avoid some code duplication. + * elf/do-lookup.h (do_lookup_x): Initialize symidx in case the new + style hash table format is used. -2005-11-27 Roland McGrath +2006-09-04 Jakub Jelinek - * sysdeps/unix/sysv/linux/fchownat.c: Include alloca.h, sysdep.h. - Reported by René Rebe . + * resolv/res_mkquery.c (res_nmkquery): Set hp->id to statp->id after + randomization rather than before. + * resolv/res_init.c (res_randomid): Don't call gettimeofday here. -2005-11-27 Ulrich Drepper +2006-08-31 Jakub Jelinek - * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Don't cache - euid and egid. + * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Add ld.so. - * nis/nis_table.c (nis_list): Add more free calls in error cases. + * malloc/malloc.c (_int_malloc): Use full list insert and not + shortcut which assumes the list is empty for large requests + too. -2005-11-26 Richard Henderson + * elf/tst-addr1.c (do_test): Allow i.dli_sname "_IO_printf". - * sysdeps/alpha/strncmp.S: Don't read too much data when pointers - are co-aligned, and count is aligned with the end of the word. +2006-08-30 Jakub Jelinek -2005-11-26 Ulrich Drepper + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (splice): Add offin + and offout arguments to the prototype. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (splice): Likewise. + * sysdeps/unix/sysv/linux/syscalls.list (splice): Adjust args string. - * nis/nis_lookup.c (nis_lookup): Mark RPCTIMEOUT as const. Pretty - printing. +2006-08-28 Ulrich Drepper - * nis/nis_table.c (__create_ib_request): Use strdupa instead of - variable size array. - (RPCTIMEOUT): Mark as const. + * elf/dl-load.c (_dl_init_paths): Expand DSTs. - * nis/ypclnt.c (yp_bind_ypbindprog): Initialize clnt_saddr by hand. - (ypdomainname): Renamed from __ypdomainname. No need for initializer. - (ypbindlist): Renamed from __ypbindlist. - (do_ypcall): Check memory allocation suceeded before calling - yp_bind_ypbindprog. - (yperr_string): Reduce size of function by using only one gettext call. - (ypbinderr_string): Likewise. - (yp_match): Free response in case memory for return value cannot be - allocated. - (yp_first): Likewise. - (yp_next): Likewise. - (do_ypcall_tr): New function which translates error codes as well. - (yp_match, yp_next, yp_master, yp_order, yp_maplist): Use it. - (yp_all): Correct test for invalid parameter. - Pretty printing. - (RPCTIMEOUT, UDPTIMEOUT): Mark as const. + * elf/dl-open.c (dl_open_worker): Allow $LIB and $PLATFORM in + dlopen parameters. -2005-11-25 Richard Henderson +2006-08-28 Jakub Jelinek - * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix typo. - (__fxstatat64): Alias from __fxstatat; remove other cnp errors. - * sysdeps/unix/sysv/linux/alpha/sigaction.c: Include sys/cdefs.h - and stddef.h. - * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MREMAP_FIXED): Define. + * inet/getnameinfo.c (getnameinfo): For AF_INET, check errno + only if herrno is NETDB_INTERNAL. Handle errors other than + ERANGE outside of the loops, handle TRY_AGAIN. -2005-11-25 Ulrich Drepper + * locale/programs/ld-ctype.c (translit_flatten): Issue error + if other's ctype category was missing. + * locale/programs/ld-collate.c (collate_read): Return if + copy_locale's collate category is missing. - * Makeconfig (+cflags): Add -fmerge-all-constants by default. +2006-08-27 Ulrich Drepper - [BZ #1912] - * nss/function.def: Add entry to use gethostbyname2 for files. + [BZ #2684] + * malloc/malloc.c (public_rEALLOc): Try harder by using other + arenas if allocation failed. + Patch mostly by Jan Edler . -2005-11-25 Thorsten Kukuk +2006-08-26 Ulrich Drepper - * sysdeps/unix/sysv/linux/fxstatat64.c: Include string.h. + * malloc/malloc.c (bin_at): Rewrite to be more clear and to not + waste bins[0..1]. + (malloc_state): Reduce bins size by 2. + (_int_malloc): Fix test for large enough buffer for early termination. + When no unsorted block matches perfectly and an exiting block has + to be split, use full list insert and not shortcut which assumes + the list is empty. -2005-11-25 Ulrich Drepper + * locale/programs/ld-ctype.c (ctype_read): Better patch for read + failure. - [BZ #1926] - * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Change - return value type to match expected type. +2006-08-24 Ulrich Drepper - [BZ #1925] - * nis/ypclnt.c (yp_order): Correct test for invalid parameter. + * locale/programs/ld-ctype.c (ctype_read): If CTYPE is NULL, don't + do anything. -2005-11-24 Ulrich Drepper + * sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): For undefined + symbol require exact match (these are PLTs). + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h + (_dl_ppc64_addr_sym_match): Likewise. - * scripts/check-c++-types.sh: Improve comments. + [BZ #2683] + * elf/dl-addr.c (_dl_addr): Don't ignore all undefined symbols. + If symbol has a value use it. + * elf/tst-dladdr1.c: New file. + * elf/Makefile: Add rules to build and run tst-addr1. - * scripts/check-local-headers.sh: New file. - * Makefile (tests): Run check-local-headers.sh. +2006-08-24 Jakub Jelinek -2005-11-23 Thorsten Kukuk + * malloc/malloc.c (sYSMALLOc): Avoid infinite loop if MMAP + keeps failing and heap growth or new heap creation isn't + successful either. + * malloc/tst-malloc.c (main): Add new tests. - * include/sys/sendfile.h: New file. +2006-08-24 Ulrich Drepper -2005-11-24 Andreas Schwab + [BZ #2734] + * sysdeps/i386/bits/byteswap.h (__bswap_32): Use same conditions + as in the x86-64 code to use bswap. - * time/sys/time.h: Remove nonnull attribute from futimesat. +2006-05-21 Joseph S. Myers -2005-11-22 Ulrich Drepper + [BZ #2680] + * posix/unistd.h (getlogin_r): Condition on __USE_POSIX199506, not + __USE_UNIX98. + * posix/bits/unistd.h: Likewise. - * nscd/connections.c (sendfileall): Define. - (handle_request): Use it instead of sendfile call. - * nscd/nscd-client.h: Declare sendfileall. - * nscd/aicache.c: Use sendfileall instead of sendfile. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/initgrcache.c: Likewise. - * nscd/pwdcache.c: Likewise. +2006-05-15 Mike Frysinger - [BZ #1908] - * manual/install.texi (Tools for Compilation): Require gawk. + [BZ #2751] + * string/strchr.c: Add cast to avoid warning. -2005-11-22 Jakub Jelinek +2006-08-21 Ulrich Drepper - * sysdeps/generic/ldsodefs.h (struct rtld_global): Remove - unused is_static field from slotinfo array. + * malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit + platforms define as 512K. For 64-bit platforms as 32MB. The lower + limit is needed to avoid the exploding of the address space + requirement for secondary heaps. + * malloc/arena.c (HEAP_MAX_SIZE): Define using + DEFAULT_MMAP_THRESHOLD_MAX if it is defined. -2005-11-21 Jakub Jelinek +2006-07-30 Joseph S. Myers - * sunrpc/bindrsvprt.c (bindresvport): Wrap around to startport - in the loop if port is bigger than endport, initially set to - ENDPORT. When changing startport, set endport and port - appropriately. + [BZ #3018] + * Makerules (depfiles): Handle extra-test-objs the same as + extra-objs. + (common-mostlyclean): Likewise. + * dlfcn/Makefile (extra-objs): Add modules to extra-test-objs + instead. + * elf/Makefile (extra-objs): Likewise. + * stdlib/Makefile (extra-objs): Likewise. -2005-11-21 Ulrich Drepper +2006-08-14 Eric Blake - * Makefile.in: Remove RCS ID line. - * config-name.in: Likewise. - * config.make.in: Likewise. - * malloc/arena.c: Likewise. - * malloc/hooks.c: Likewise. - * malloc/malloc.c: Likewise. - * manual/dir: Likewise. - * math/math_private.h: Likewise. - * resolv/gethnamaddr.c: Likewise. - * scripts/mkinstalldirs: Likewise. - * sunrpc/rpc_clntout.c: Likewise. - * sunrpc/rpc_cout.c: Likewise. - * sunrpc/rpc_hout.c: Likewise. - * sunrpc/rpc_main.c: Likewise. - * sunrpc/rpc_parse.c: Likewise. - * sunrpc/rpc_sample.c: Likewise. - * sunrpc/rpc_scan.c: Likewise. - * sunrpc/rpc_svcout.c: Likewise. - * sunrpc/rpc_tblout.c: Likewise. - * sunrpc/rpc_util.c: Likewise. - * sysdeps/unix/sysv/linux/sys/quote.h: Likewise. + [BZ #3044] + * misc/error.h: Assume C89 or better. + * misc/error.c: Likewise. - * nscd/nscd_helper.c: Pretty printing. +2006-08-21 Ulrich Drepper -2005-11-19 Roland McGrath + [BZ #3040] + * sysdeps/unix/sysv/linux/openat.c: Fix compilation if + __ASSUME_ATFCTS is defined. - * elf/elf.h: Revert last change. +2006-08-19 Ulrich Drepper -2005-11-19 Jakub Jelinek + * malloc/malloc.c (_int_malloc): Limit number of unsorted blocks + to sort in each call. - * sysdeps/unix/sysv/linux/ia64/bits/shm.h (shmatt_t): New type. - (struct shmid_ds): Use it for shm_nattch field. + * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map + is empty simply return and use next service. + * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise. -2005-11-18 Jakub Jelinek + * locale/programs/charmap.c (charmap_read): Add new parameter. It + tells us when not finding a charmap file is an error. + * locale/programs/charmap.h: Adjust charmap_read prototype. + * iconv/iconv_prog.c (main): Tell charmap_read it's no error if we + cannot find a charmap. + * locale/programs/localedef.c (main): Adjust charmap_read call. - * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If FILE is NULL, - set access and modification times of the file referenced by FD. - * sysdeps/generic/futimesat.c (futimesat): Don't return EINVAL if - FILE is NULL. Don't check FD if FILE is absolute path. +2006-08-15 Jakub Jelinek -2005-11-19 Ulrich Drepper + * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use + sysdeps/posix/pause.c implementation instead. - * nscd/nscd_gethst_r.c (nscd_gethst_r): Avoid unnecesary read call - if there are no aliases. +2006-08-09 Jakub Jelinek - * sysdeps/unix/sysv/linux/Makefile (CFLAGS-connections.c, - CFLAGS-pwdcache.c, CFLAGS-grpcache.c, CFLAGS-hstcache.c, - CFLAGS-aicache.c, CFLAGS-initgrcache.c): Add -DHAVE_SENDFILE. - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE): - Define. - * nscd/pwdcache.c [HAVE_SENDFILE]: Include and - . - [HAVE_SENDFILE] (cache_addpw): Use sendfile to transmit positive - result. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/aicache.c: Likewise. - * nscd/initgrcache.c: Likewise. - * nscd/connectionc.c: Likewise. + * sysdeps/unix/nice.c (nice): Transform EACCES errno from setpriority + to EPERM. -2005-11-18 Andreas Schwab +2006-08-13 Andreas Schwab - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Remove useless alias. + * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve): + Don't clobber caller's LRSAVE. + (_dl_prof_resolve): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Handle - NO_WEAK_ALIAS. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. +2006-08-14 Ulrich Drepper -2005-11-18 Paul Brook + [BZ #1996] + * libio/memstream.c (open_memstream): Allocate initial buffer with + calloc. + * libio/wmemstream.c (open_wmemstream): Likewise. + * libio/strops.c: Pretty printing. + (_IO_str_overflow): Clear uninitialized part of the new buffer. + (enlarge_userbuf): New function. + (_IO_str_seekoff): Call it if seek position is larger than current + buffer. + * libio/wstrops.c: Likewise. + * libio/vasprintf.c: Add comment as to why we do not have to use + calloc instead of malloc to allocate initial buffer. + * libio/Makefile (tests): Add bug-memstream1 and bug-wmemstream1. + * libio/bug-memstream1.c: New file. + * libio/bug-wmemstream1.c: New file. - * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MREMAP_FIXED): New macro. +2006-08-13 Ulrich Drepper - * nscd/grpcache.c: Include . - * nscd/nscd_stat.c: Likewise. - * nscd/pwdcache.c: Likewise. - * sysdeps/unix/sysv/linux/unlinkat.c: Include , . + * libio/wstrops.c: Remove dead macro definitions and comments. + * libio/strops.c: Likewise. -2005-11-17 Ulrich Drepper + [BZ #2764] + * login/utmpname.c (__utmpname): Remove unnecessary test. - * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Define SHM_NORESERVE. - * sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise. +2006-06-08 Joseph Myers -2005-11-17 Steven Munroe + [BZ #2832] + * math/gen-libm-test.pl (clean_up_number): Do not remove trailing + 0s from integers. - [BZ #1877] - * string/test-strncmp.c (do_test_limit): Handle zero length and - non-zero align values. - (test_main): Correct do_test_limit tests for 64-bit. +2006-08-13 Ulrich Drepper -2005-11-15 Steven Munroe + [BZ #2987] + * sysdeps/unix/sysv/linux/clock_settime.c: Add code to use syscall + for CPU clocks. + * sysdeps/unix/clock_settime.c: Add support for platform-specific + setting of CPU clocks. - * sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE, - PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE, - PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5, - PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970): - Define to match 2.6.15 kernel. +2006-06-23 Paul Eggert - * sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include. - * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise. - * sysdeps/powerpc/fpu/w_sqrtf.c: Likewise. + [BZ #2841] + * sysdeps/generic/stdint.h (UINT8_C, UINT16_C): Don't append 'U', + since C99 requires the result to promote to 'int' when uint_least8_t + and uint_least16_t promote to 'int'. -2005-11-17 Roland McGrath +2006-08-12 Ulrich Drepper - * elf/elf.h (R_PPC64_ADDR30): Renamed to R_PPC64_REL30. + [BZ #3013] + * locale/programs/ld-ctype.c (ctype_output): Adjust alignments, fix + lenght of one output field, correct bitmask creation. + * locale/programs/ld-time.c: Add alignment. -2005-11-17 Jakub Jelinek + [BZ #2997] + * misc/error.c: Add space between program name and message if file + name is missing. - * io/sys/stat.h (fstatat): If __REDIRECT_NTH isn't defined, - define fstatat to fstatat64. +2006-08-03 Eric Blake -2005-11-17 Steven Munroe + [BZ #2998] + * misc/error.c (error_tail) [_LIBC]: Avoid invalid free. - [BZ #1877] - * string/test-strncmp.c (do_test_limit): New function. - (do_test) Add cast to eliminate compiler warnings. - (do_random_tests) Add cast to eliminate compiler warnings. - (test_main) Add do_test_limit tests. - * sysdeps/powerpc/powerpc32/strncmp.S: Test length before unaligned - load. - * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. +2006-08-09 Ulrich Drepper -2005-11-17 Ulrich Drepper + * malloc/memusagestat.c: Silence warnings. - * include/resolv.h: Include . - Patch by Paul Brook. + * malloc/malloc.c: Dynamically size mmap treshold if the program + frees mmaped blocks. + Patch by Valerie Henson and Arjan van de Ven. - * io/sys/stat.h: Use __const not const in fstatat prototypes. +2006-08-08 Jakub Jelinek -2005-11-08 H.J. Lu + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (O_DIRECT): Protect with + __USE_GNU. - * sysdeps/wordsize-32/Makefile (CPPFLAGS-divdi3.c): Set to - -Din_divdi3_c. - * sysdeps/wordsize-32/symbol-hacks.h: Skip if in_divdi3_c is defined. + * stdlib/strtol_l.c (__strtol_ul_max_tab, __strtol_ul_rem_tab, + __strtol_ull_max_tab, __strtol_ull_rem_tab): Declare. + (DEF): Don't put the var into .gnu.linkonce.r.* section. + Only provide var definitions in strtol_l (or for *ull* + in strtoll_l). -2005-11-16 Jakub Jelinek + * stdio-common/bug16.c (tests): New array. + (do_tests): Allow the first hexadecimal digit + to be 1, 2, 4 or 8. Do 3 additional tests. - * sysdeps/unix/sysv/linux/fchownat.c: Include string.h. - * sysdeps/unix/sysv/linux/futimesat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise. - * sysdeps/unix/sysv/linux/renameat.c: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. - * sysdeps/unix/sysv/linux/unlinkat.c: Likewise. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. + * sysdeps/s390/fpu/libm-test-ulps: Update. -2005-11-16 Ulrich Drepper + * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c (fchownat): Use + fchownat syscall if available. + * sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Likewise. + * sysdeps/unix/sysv/linux/sh/fchownat.c (fchownat): Likewise. + * sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Likewise. - * iconvdata/Makefile (modules): Add ISO_11548-1. - (distribute): Add iso_11548-1.c. - * iconvdata/gconv-modules: Add entries for ISO 11548-1. - * iconvdata/TESTS: Add entry for ISO 11548-1. - - [BZ 1872] - * iconvdata/iso_11548-1.c: New file. - * iconvdata/testdata/ISO_11548-1: New file. - * iconvdata/testdata/ISO_11548-1..UTF8: New file. - Patch by Samuel Thibault . - -2005-11-16 Kaz Kojima - - * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Remove incorrect &. - -2005-11-15 Ulrich Drepper - - [BZ 1865] - * inet/netinet/icmp6.h: More updates for RFC3542. - * inet/netinet/ip6.h: Likewise. - * sysdeps/unix/sysv/linux/bits/in.h: Adjust for current kernel sources. - Patch by David L Stevens . - - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c (__fxstatat): - Return -1 on failure. - * sysdeps/unix/sysv/linux/fchownat.c (fchownat): Likewise. - * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise.. - * sysdeps/unix/sysv/linux/fxstatat64.c [__ASSUME_STAT64_SYSCALL] - (__fxstatat64): Handle errors. - - * io/sys/poll.h: Add comment explaining poll is a cancellation point. - - * sysdeps/unix/sysv/linux/syscalls.list (epoll_wait): Align with - poll, make cancelable. - * sysdeps/unix/sysv/linux/sys/epoll.h: Add comment explaining - epoll_wait is a cancellation point. - -2005-11-15 Jakub Jelinek - - * io/sys/stat.h (fstatat): Don't use __THROW together with - __REDIRECT_NTH. - -2005-11-14 Ulrich Drepper - - * elf/dl-open.c [!SHARED]: Remove _dl_tls_static_size definition. - * sysdeps/generic/libc-tls.c: Initialize _dl_tls_static_size here. - -2005-11-11 Ulrich Drepper - - * io/Makefile (routines): Add fstatat, fstatat64, fxstatat, fxstatat64, - fchownat, and unlinkat. - (static-only-routines): Add fstatat and fstatat64. - (tests): Add tst-unlinkat, tst-fstatat, tst-futimesat, tst-renameat, - and tst-fchownat. - * io/Versions [GLIBC_2.4]: Add fchownat, __fxstatat, __fxstatat64, - and unlinkat. - * io/fcntl.h: Define AT_FDCWD, AT_SYMLINK_NOFOLLOW, and AT_REMOVEDIR. - * io/fstatat.c: New file. - * io/fstatat64.c: New file. - * io/sys/stat.h: Declare fstatat, fstatat64, __fxstatat, __fxstatat64 - and define fstatat and fstatat64 inline functions. - * libio/stdio.h: Declare renameat. - * misc/Makefile (routines): Add futimesat. - * misc/Versions [GLIBC_2.4]: Add futimesat. - * posix/unistd.h: Declare fchownat and unlinkat. - * stdio-common/Makefile (routines): Add renameat. - * stdio-common/Versions [GLIBC_2.4]: Add renameat. - * sysdeps/generic/fchownat.c: New file. - * sysdeps/generic/futimesat.c: New file. - * sysdeps/generic/fxstatat.c: New file. - * sysdeps/generic/fxstatat64.c: New file. - * sysdeps/generic/renameat.c: New file. - * sysdeps/generic/unlinkat.c: New file. - * sysdeps/unix/sysv/linux/fchownat.c: New file. - * sysdeps/unix/sysv/linux/futimesat.c: New file. - * sysdeps/unix/sysv/linux/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/fxstatat64.c: New file. - * sysdeps/unix/sysv/linux/renameat.c: New file. - * sysdeps/unix/sysv/linux/unlinkat.c: New file. - * sysdeps/unix/sysv/linux/alpha/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/i386/fchownat.c: New file. - * sysdeps/unix/sysv/linux/i386/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/m68k/fchownat.c: New file. - * sysdeps/unix/sysv/linux/m68k/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/powerpc/fchownat.c: New file. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/sh/fchownat.c: New file. - * sysdeps/unix/sysv/linux/sh/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: New file. - * sysdeps/unix/sysv/linux/wordsize-64/fxstatat64.c: New file. - * time/sys/time.h: Declare futimesat. - * include/fcntl.h: Declare __atfct_seterrno. - * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): New function. - Split out from openat code and called. - (do_test): Allow openat to fail with ENOSYS. Handle AT_FDCWD. - * sysdeps/generic/openat.c: Handle AT_FDCWD. - * sysdeps/generic/openat64.c: Likewise. - * io/tst-unlinkat.c: New file. - * io/tst-fstatat.c: New file. - * io/tst-futimesat.c: New file. - * io/tst-renameat.c: New file. - * io/tst-fchownat.c: New file. - * io/tst-openat.c: Don't fail if openat is not implemented. - - * sysdeps/unix/sysv/linux/powerpc/chown.c: Don't provide backward - compatibility code if new kernel is guaranteed. - - * time/sys/time.h: Add a few nonnull attributes. - -2005-11-09 Ulrich Drepper - - * io/fcntl.h: Declare openat and openat64. - * io/Makefile (routines): Add openat and openat64. - (tests): Add tst-openat. - * io/Versions: Add openat and openat64 for GLIBC_2.4. - * sysdeps/generic/openat.c: New file. - * sysdeps/generic/openat64.c: New file. - * sysdeps/unix/sysv/linux/openat.c: New file. - * sysdeps/unix/sysv/linux/openat64.c: New file. - * io/tst-openat.c: New file. - - * sysdeps/generic/check_fds.c (check_one_fd): For writable - descriptors, use /dev/full. - (__libc_check_standard_fds): Reverse modes so that common operations on - the descriptors fail. - * sysdeps/unix/sysv/linux/device-nrs.h: Add info for /dev/full. - -2005-11-07 Kazuhiro Inaoka - - * elf/elf.h (R_M32R_REL32): New macro. - -2005-11-05 Marcus Brinkmann - - * sysdeps/mach/hurd/bits/stat.h (S_IMMAP0): New macro. - (S_ISPARE): Unset the S_IMMAP0 flag. - -2005-11-07 Roland McGrath - - * configure.in: Grok --with-cpu=CPU option. If given, search for - sysdeps/.../machine/CPU subdirs, and give error if none are found. - * configure: Regenerated. - * config.make.in (with-cpu): New substituted variable. - * Makeconfig (+cflags): Add -mcpu=$(with-cpu) if set. - - * malloc/malloc.c (munmap_chunk): Suppress warnings from last change. - - * sysdeps/unix/bsd/sun: Directory and all subdirectories removed, - saved in ports repository. - * sysdeps/unix/sysv/linux/tcflush.c: Rewritten. - * sysdeps/unix/sysv/linux/tcflow.c: Rewritten. - -2005-11-06 Ulrich Drepper - - * malloc/malloc.c (munmap_chunk): Add sanity checks. - - * sysdeps/pthread/configure: Fix comment. - -2005-11-05 Ulrich Drepper - - * configure.in: Remove gnu_as definition and everything using it. - * config.make.in: Remove gnu-as. - * config.h.in: Remove HAVE_GNU_AS. - - * configure.in: Remove gnu_ld definition and everything using it. - * config.h.in: Remove HAVE_GNU_LD. - * config.make.in: Remove gnu-ld. - * csu/Makefile: Remove use of gnu-ld. - * csu/munch.awk: Removed. - * csu/munch-tmpl.c: Removed. - * include/libc-symbols.h: Remove use of HAVE_GNU_LD. - * posix/execl.c: Likewise. - * posix/execv.c: Likewise. - * stdio-common/psignal.c: Likewise. - * stdlib/exit.c: Likewise. - * string/strsignal.c: Likewise. - * string/tester.c: Likewise. - * sysdeps/generic/errlist.c: Likewise. - * sysdeps/generic/getenv.c: Likewise. - * sysdeps/generic/getgroups.c: Likewise. - * sysdeps/generic/init-posix.c: Likewise. - * sysdeps/posix/gettimeofday.c: Likewise. - * sysdeps/posix/system.c: Likewise. - * sysdeps/unix/bsd/init-posix.c: Likewise. - * sysdeps/unix/bsd/ulimit.c: Likewise. - * sysdeps/unix/bsd/sun/m68k/brk.S: Likewise. - * sysdeps/unix/bsd/sun/m68k/sethostid.S: Likewise. - * sysdeps/unix/bsd/sun/sparc/sethostid.S: Likewise. - * sysdeps/unix/i386/brk.S: Likewise. - * sysdeps/unix/sparc/brk.S: Likewise. - - * configure.in: Remove test for support for subtracting local labels. - * config.h.in: Remove HAVE_SUBTRACT_LOCAL_LABELS. - * stdio-common/vfprintf.c: Remove test of - HAVE_SUBTRACT_LOCAL_LABELS. - - * configure.in: If init_array/fini_array support is not available, - bail out. - * config.h.in: Remove trace of optional init_array/fini_array support. - * config.make.in: Likewise. - * csu/elf-init.c: Likewise. - * dlfcn/dlfcn.c: Likewise. - * elf/soinit.c: Likewise. - * sysdeps/ia64/elf/initfinit.c: Likewise. - -2005-11-04 Roland McGrath - - * sysdeps/i386/configure.in (libc_mtune_example): Variable removed. - * sysdeps/i386/configure: Regenerated. - - [BZ #1089] - * configure.in: Change order of add-on sysdeps directories, - so they are interleaved with main sysdeps directories. - * configure: Regenerated. - -2005-11-03 Roland McGrath - - * NEWS: Synch with 2.3 branch updates. - -2005-11-03 Ulrich Drepper - - * sunrpc/svc.c (svc_getreq_poll): Fix inefficient loop test. - -2005-11-03 Roland McGrath - - [BZ #1548] - * sunrpc/svc.c (svc_getreqset): Use ffsl instead of ffs on fd_mask, - make sure constant is long. - From Jay Lan . - -2005-11-03 Ulrich Drepper - - [BZ #1774] - * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use simple - gethostbyname2 lookup if AI_V4MAPPED|AI_ALL is set. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Avoid alloca when possible - while looking for scope delimiter. - Some pretty printing. - -2005-10-31 Steven Munroe - - * sysdeps/powerpc/powerpc64/Makefile - (sysdep_routines, elide-routines.os): Add hp-timing. - * sysdeps/powerpc/powerpc64/hp-timing.c: New file. - * sysdeps/powerpc/powerpc64/hp-timing.h: New file. - * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: New file. - -2005-10-31 Ulrich Drepper - - * resolv/res_init.c (__res_iclose): New function. Broken out of - res_nclose. Take addition parameter which determines whether - addresses should be freed. - (res_nclose): Call __res_iclose. - (res_thread_freeres): Likewise. - * resolv/res_data.c (res_close): Call __res_iclose. - * resolv/res_libc.c (res_init): No need to separately free the - addresses. - (__res_maybe_init): Likewise. - * resolv/res_send.c: Use __res_iclose instead of res_nclose. - * resolv/Versions [GLIBC_PRIVATE]: Add __res_iclose. - * include/resolv.h: Declare __res_iclose. - Add libc_hidden_proto for __res_iclose. - * hesiod/hesiod.c (__hesiod_res_set): No need to free name server - addresses here again. - - [BZ #1579] - * debug/execinfo.h: Change backtrace_symbols_fd comment. - -2005-10-24 H.J. Lu - - * sysdeps/ia64/fpu/libm-symbols.h (WEAK_LIBM_ENTRY): Add "__" - prefix to LOCAL_LIBM_ENTRY. - (WEAK_LIBM_END): Add "__" prefix to LOCAL_LIBM_END. - -2005-10-26 Jakub Jelinek - - * elf/dl-conflict.c (_dl_resolve_conflicts): Use _dl_debug_printf - instead of _dl_printf to print conflict processing debug message. - Reported by John Reiser . - -2005-10-30 Ulrich Drepper - - * misc/hsearch_r.c (hsearch_r): Remove duplicate test. - Patch by Chris Caputo . - -2005-10-28 Kaz Kojima - - * sysdeps/unix/sh/sysdep.S: Remove unnecessary weak_alias. - * sysdeps/unix/sysv/linux/sh/socket.S: Honor NO_WEAK_ALIAS. - -2005-10-28 Thorsten Kukuk - - * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Fix off - by one error. - -2005-10-24 Roland McGrath - - [BZ #1534] - * include/string.h: Use libc_hidden_proto for strnlen, - not libc_hidden_builtin_proto. - -2005-10-23 Ulrich Drepper - - * rt/mqueue.h: Cleanups. - -2005-10-22 Roland McGrath - - [BZ #1254] - * sysdeps/mach/hurd/getpeername.c (__getpeername): Fix last change. - From Samuel Thibault . - -2005-10-17 Thomas Schwinge - - [BZ #1252] - * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Don't use ?: as lvalue. - * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise. - -2005-10-20 Ulrich Drepper - - * iconvdata/ibm1364.h (__ucs4_to_ibm1364sb): Fix one mapping. - * iconvdata/ibm1388.h (__ucs4_to_ibm1388sb): Likewise. - * iconvdata/testdata/IBM1364: Add missing valid input. - * iconvdata/testdata/IBM1388: Likewise. - * iconvdata/testdata/IBM1364..UTF8: Adjust appropriately. - * iconvdata/testdata/IBM1388..UTF8: Likewise. - Patch by Masahide Washizawa . - -2005-08-23 GOTO Masanori - - [BZ #1498] - * sysdeps/alpha/remqu.S: Return the correct result when the same - dividend and divisor are provided, and they're negative numbers. - * sysdeps/alpha/divqu.S: Likewise. - -2005-10-18 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h (TESTS): - Define. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h (TESTS): - Likewise. +2006-08-07 Ulrich Drepper -2005-10-19 Ulrich Drepper + * nis/nis_xdr.c: Avoid some function calls. - * iconvdata/Makefile (modules): Add IBM1364, IBM1371, IBM1388, IBM1390, - and IBM1399. - (distribute): Add ibm1364.c, ibm1364.h, ibm1371.c, ibm1371.h, - ibm1388.c, ibm1388.h, ibm1390.c, ibm1390.h, ibm1399.c, and ibm1399.h. - * iconvdata/TESTS: Add entries for IBM1364, IBM1371, IBM1388, IBM1390, - and IBM1399. - * iconvdata/gconv-modules: Likewise. - * iconvdata/ibm1364.c: New file. - * iconvdata/ibm1364.h: New file. - * iconvdata/ibm1371.c: New file. - * iconvdata/ibm1371.h: New file. - * iconvdata/ibm1388.c: New file. - * iconvdata/ibm1388.h: New file. - * iconvdata/ibm1390.c: New file. - * iconvdata/ibm1390.h: New file. - * iconvdata/ibm1399.c: New file. - * iconvdata/ibm1399.h: New file. - * iconvdata/testdata/IBM1364: New file. - * iconvdata/testdata/IBM1364..UTF8: New file. - * iconvdata/testdata/IBM1371: New file. - * iconvdata/testdata/IBM1371..UTF8: New file. - * iconvdata/testdata/IBM1388: New file. - * iconvdata/testdata/IBM1388..UTF8: New file - * iconvdata/testdata/IBM1390: New file. - * iconvdata/testdata/IBM1390..UTF8: New file. - * iconvdata/testdata/IBM1399: New file. - * iconvdata/testdata/IBM1399..UTF8: New file. - Original patch by Masahide Washizawa . - -2005-10-17 Roland McGrath - - * elf/dl-load.c (MAP_COPY): When undefined, define to - MAP_PRIVATE|MAP_DENYWRITE instead of just MAP_PRIVATE. - (_dl_map_object_from_fd): Don't use MAP_DENYWRITE explicitly. - -2005-10-17 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h (SC_STSZ, TESTS): - Define. - * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h (SC_STSZ, TESTS): - Likewise. +2006-08-07 Jakub Jelinek + Ulrich Drepper -2005-10-17 Ulrich Drepper + * nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take + short cut if only one name component is stripped away. - * libio/oldfileops.c (_IO_old_file_xsputn): Fix last patch. - Return EOF not 0. +2006-08-07 Ulrich Drepper - * sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Also - allow EACCES errors when opening /proc for now. + * nis/nis_call.c: Minor cleanups throughout. + (rec_dirsearch) [case HIGHER_NAME]: Correctly size ndomain array. + (first_shoot): Add search_parent_first parameter. Only if it is set + search parent server first. + If directory for table found through cold start cache is not the same + as referenced in the cache, don't use it. + (__nisfind_server): Take additional parameter. Pass it on to + first_shoot. + (__prepare_niscall): Adjust __nisfind_server call. + * nis/rpcsvc/nislib.h: Adjust __nisfind_server prototype. + * nis/nis_table.c: Adjust __nisfind_server call. + * nis/nis_lookup.c: Likewise. + (nis_lookup): Don't loop endlessly if name is reduced to ".". - * wctype/wcfuncs.c: Don't use expensive wide char lookups in isw* - functions if character is in ASCII range. - * wctype/wcfuncs_l.c: Likewise. - -2005-05-03 Robert Millan - - * abi-tags (.*-.*-knetbsd.*-gnu.*): New match, with ABI value 4. - * elf/cache.c (print_entry): Match the kNetBSD ABI tag. - -2005-10-16 Alfred M. Szmidt - - * sysdeps/generic/bits/mman.h - [__USE_GNU] (MREMAP_MAYMOVE, REMAP_FIXED): New macros. - -2005-10-16 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/makecontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: New file. - * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Removed. - * sysdeps/unix/sysv/linux/sh/sh3/sys/ucontext.h: New file. - * sysdeps/unix/sysv/linux/sh/sh4/sys/ucontext.h: New file. - -2005-09-13 Jakub Jelinek - - [BZ #1228] - * include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Make sure these - are defined for -D_GNU_SOURCE or -D_ISOC99_SOURCE even when not - -std=c99. - -2005-10-16 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/bits/mman.h: Define MREMAP_FIXED. - -2005-08-05 Alfred M. Szmidt - - [BZ #1252] - * sysdeps/mach/hurd/setitimer.c (restart_itimer): Move static fn - forward decl out of function body. - * sysdeps/mach/hurd/profil.c: Likewise. - -2005-10-16 Roland McGrath - - [BZ #1254] - * sysdeps/mach/hurd/getpeername.c (__getpeername): Respect *LEN - byte limit when setting ADDR->sa_family. - Reported by Samuel Thibault . - - [BZ #1253] - * sysdeps/mach/hurd/dl-sysdep.h - [SHARED] (DL_ARGV_NOT_RELRO): New macro. - - [BZ #1253] - * sysdeps/mach/hurd/i386/init-first.c (init): Make cast kosher. - (_hurd_stack_setup): Don't declare with arguments and ellipsis. - Use __builtin_frame_address and __builtin_return_address. - (_dl_init_first): Likewise. - - [BZ #1249] - * sysdeps/mach/hurd/i386/init-first.c (_cthread_init_routine): Declare - as weak extern. - (init): Check for it being undefined. - -2005-10-16 Daniel Jacobowitz - Roland McGrath - - * Makerules [module-names] (extra-modules-build): New variable. - ($(extra-modules-build:%=$(objpfx)%.so)): New static pattern rule. - Depend on libc.so and libc_nonshared.a. - * dlfcn/Makefile ($(test-modules)): Remove static pattern rule. - * elf/Makefile (modules-names-nobuild): New variable, add filtmod1. - ($(test-modules)): Remove static pattern rule. - -2005-10-15 Thomas Schwinge - - * include/dirent.h: Include . - * sysdeps/mach/hurd/fdopendir.c: Include . - (fdopendir): Correct argument to _hurd_fd_get(). - * sysdeps/mach/hurd/opendir.c (__opendir): Remove stray `}'. - -2005-08-20 Paul Eggert - - [BZ #1224] - * posix/regcomp.c (init_word_char, duplicate_node_closure, - fetch_token, peek_token_bracket, build_range_exp, - build_collating_symbol): Remove forward decls; no longer needed - now that we use prototypes. - -2005-10-15 Ulrich Drepper - - [BZ #1221] - * posix/regex_internal.h: Remove last traces of - RE_NO_INTERNAL_PROTOTYPES. - - [BZ #968] - * string/strxfrm_l.c (STRXFRM): Fix exit conditions of two loops. - - * sysdeps/unix/fdopendir.c (fdopendir): Make sure descriptor - allows reading. - - * wcsmbs/tst-mbrtowc2.c: Use de_DE.UTF-8 instead of en_US.UTF-8. - * wcsmbs/Makefile: Define tst-mbrtowc2-ENV. - - * posix/regexec.c: Finish prototyping of static functions. - * posix/regex_internal.c: Likewise. - -2005-10-14 Roland McGrath - - * sysdeps/mach/hurd/opendir.c (_hurd_fd_opendir): New function, broken - out of ... - (__opendir): ... here. Call it. - * sysdeps/mach/hurd/fdopendir.c: New file. - -2005-10-14 Ulrich Drepper - - [BZ #865] - * math/tgmath.h: Correctly determine result type for - __TGMATH_BINARY_REAL_ONLY, - __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY, - __TGMATH_TERNARY_REAL_ONLY, and __TGMATH_BINARY_REAL_IMAG. - -2005-09-17 Andreas Jaeger - - [BZ #865] - * math/test-tgmath-int.c: New file. - * math/Makefile (tests): Add test-tgmath-int. - -2005-10-14 Ulrich Drepper - - [BZ #804] - * malloc/tst-mtrace.sh: Work around for bootstraping. - - * locale/programs/ld-collate.c (collate_output): Fix counting of - elements. Don't limit table size. Use correct secondary hash - function. - * locale/localeinfo.h (LIMAGIC): Change value returned for LC_COLLATE. - * posix/fnmatch_loop.c: Adjust for changed secondary hash function. - * posix/regcomp.c: Likewise. - - * time/asctime.c (asctime_internal): Use __snprintf instead of - snprintf to avoid PLT entry. - - * sysdeps/unix/opendir.c (__opendir): Pass extra argument to - __alloc_dir. - (__alloc_dir): Only close descriptor on error if new parameter is true. - * sysdeps/unix/fdopendir.c (fdopendir): Pass extra argument to - __alloc_dir. Don't close fd on error. - * include/dirent.h (__alloc_dir): Adjust prototype. - - * stdlib/Makefile (tests): Add tst-ucontext-off. - * stdlib/tst-ucontext-off.c: New file. - * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h (TESTS): Define. - * sysdeps/unix/sysv/linux/i386/ucontext_i.h (TESTS): Likewise. - - [BZ #1468] - * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Fix values for - oFPREGS, oSIGMASK, oFPREGSMEM, and oMXCSR. - Patch by Nicholas Miell . - - [BZ #1460] - * time/asctime.c (asctime_internal): New function, derived from - asctime_r. Takes additional parameter which is the buffer length. - Use snprintf instead sprintf, if it overflows, fail. - (asctime_r): Call asctime_internal with 26 as buffer length. - (asctime): Call asctime_internal with length of internal buffer. - * time/Makefile (tests): Add bug-asctime_r. - * time/bug-asctime_r.c: New file. - - [BZ #1459] - * time/asctime.c (__asctime_r): Check for tm_year computation to - overflow and fail in this case. - * time/Makefile (tests): Add bug-asctime. - * time/bug-asctime.c: New file. - - [BZ #1458] - * sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MREMAP_FIXED. - * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. - * misc/sys/mman.h: Add ellipsis after last parameter of mremap and - adjust leading comment. - * sysdeps/unix/sysv/linux/syscalls.list: Add pointer parameter to - mremap syscall. - * include/sys/mman.h (__mremap): Add ellipsis. - * malloc/memusage.c: Adjust mremap wrapper for optional additional - parameter. - -2005-10-13 Ulrich Drepper - - [BZ #1405] - * libio/iogetdelim.c (_IO_getdelim): Fix truncation of return - value. Avoid overflow in computation. - - [BZ #1373] - * argp/argp.h: Remove __NTH for __argp_usage inline function. - -2005-08-26 Paul Eggert - - [BZ #1248] - * posix/regex_internal.h (bitset_not, bitset_merge, bitset_not_merge, - bitset_mask, re_string_allocate, re_string_construct, - re_string_reconstruct, re_string_destruct, re_string_elem_size_at, - re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case, - re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1, - re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect, - re_node_set_init_union, re_node_set_merge, re_node_set_insert, - re_node_set_insert_last, re_node_set_compare, re_node_set_contains, - re_node_set_remove_at, re_dfa_add_node, re_acquire_state, - re_acquire_state_context): Remove unnecessary forward decls. - (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at): - Put __attribute at function definition, now that the function decl - has been removed. - * posix/regex_internal.c (re_string_peek_byte_case, - re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains): - Likewise. +2006-08-03 Ulrich Drepper -2005-08-23 Paul Eggert + [BZ #2182] + * math/s_cacosh.c: Return values from positive branch. + * math/s_cacoshf.c: Likewise. + * math/s_cacoshl.c: Likewise. - [BZ #1231] - * posix/regex_internal.c (re_string_skip_chars, register_state, - calc_state_hash): Remove forward decls. - * posix/regexec.c (acquire_init_state_context, check_halt_node_context, - proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes, - clean_state_log_if_needed): Likewise. - -2005-10-13 Ulrich Drepper - - * posix/regex.c: No need to use K&R definitions for static functions. - * posix/regex_internal.c: Likewise. - * posix/regcomp.c: Likewise. - - [BZ #1466] - * sysdeps/generic/s_csqrt.c (__csqrt): For zero real part, return - principal square root. - * sysdeps/generic/s_csqrtf.c (__csqrtf): Likewise. - * sysdeps/generic/s_csqrtl.c (__csqrtl): Likewise. - * math/libm-test.inc (csqrt_test): Add test for returning - principal value. - - * include/features.h: Define _POSIX_C_SOURCE to 200112 for - _XOPEN_SOURCE == 600. - -2005-10-12 Ulrich Drepper - - * malloc/malloc.c (_int_free): Fail if block size is obviously wrong. - - * include/malloc.h: Remove _int_new_arena prototype. - * malloc/arena.c (_int_new_arena): Move definition ahead of - arena_get2 and make static. - - Correctly implement M_MXFAST. - * malloc/malloc.c (struct malloc_state): Replace max_fast with flags - fields. - (global_max_fast): New variable. - (set_max_fast): Change to not require arena parameter and to modify - global_max_fast. Change all callers. - (get_max_fast): New macro. Use this instead of directly accessing - now removed max_fast arena member. - (have_fastchunks): Use flags instead of max_fast. - (clear_fastchunks): Likewise. - (set_fastchunks): Likewise. - (contiguous): Likewise. - (noncontiguous): Likewise. - (set_noncontiguous): Likewise. - (set_contiguous): Likewise. - (malloc_init_state): Explicitly set FASTCHUNKS_BIT. Call set_max_fast - only for main arena. - * malloc/hooks.c (public_sET_STATe): Adjust set_max_fast use. - -2005-10-10 Daniel Jacobowitz - - * sysdeps/generic/bits/byteswap.h (__bswap_constant_16): New macro. - (__bswap_16): Use it. - (__bswap_constant_32): New macro. - (__bswap_32): Use it. - -2005-10-10 Ulrich Drepper - - * malloc/arena.c (ptmalloc_unlock_all2): Reset atfork_recursive_cntr. - -2005-10-08 Jakub Jelinek - - * nss/getent.c (hosts_keys): Pass INADDRSZ as size rather - than IN6ADDRSZ to AF_INET gethostbyaddr. - -2005-10-07 Roland McGrath - - [BZ #1438] - * include/features.h: Make tests on _FORTIFY_SOURCE and __OPTIMIZE__ - friendly to -Wundef. - (__USE_FORTIFY_LEVEL): Always define it, to 0 if nothing else. - -2005-10-06 Ulrich Drepper - - * sysdeps/unix/sysv/linux/readonly-area.c: Allow fopen to fail because - the file does not exist. - -2005-10-05 Simon Josefsson - - [BZ #1423] - * crypt/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): New macros. - -2005-10-05 Roland McGrath - - * crypt/Makefile (distribute): Remove duplicate defn. - - * sysdeps/generic/ldsodefs.h (struct audit_ifaces): - Use ARCH_PLTENTER_MEMBERS and ARCH_PLTEXIT_MEMBERS macros if defined. - * elf/tst-auditmod1.c: Include to define more - architecture-specific code. - * sysdeps/generic/tst-audit.h: New file. - * elf/Makefile (distribute): Add it. - -2005-10-05 Daniel Jacobowitz - - * elf/elf.h (R_ARM_TLS_DTPMOD32, R_ARM_TLS_DTPOFF32, - R_ARM_TLS_TPOFF32, R_ARM_TLS_GD32, R_ARM_TLS_LDM32, - R_ARM_TLS_LDO32, R_ARM_TLS_IE32, R_ARM_TLS_LE32): New macros. - -2005-10-03 Roland McGrath - - * sysdeps/powerpc/nofpu: Directory removed, saved in ports repository. - -2005-09-30 Ulrich Drepper - - * posix/regex.h: Pretty printing. - Clean up namespace a bit. - -2005-09-30 Jakub Jelinek - - * posix/regexec.c (update_cur_sifted_state, check_arrival, - check_arrival_add_next_nodes): Avoid using uninitialized variable. - - * malloc/memusage.c (dest): Fix a bunch of warnings on 32-bit arches. - - * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 4.0.x. - -2005-09-29 Ulrich Drepper - - * iconvdata/Makefile (modules): Add IBM803, IBM901, IBM902, IBM921, - IBM1008, IBM1008_420, IBM1097, IBM1112, IBM1123, IBM1130, IBM1140, - IBM1141, IBM1142, IBM1143, IBM1144, IBM1145, IBM1146, IBM1147, IBM1148, - IBM1149, IBM1166, IBM1167, IBM4517, IBM4899, IBM4909, IBM4971, - IBM5347, IBM9030, IBM9066, IBM9448, IBM12712, IBM16804. - (distribute): Add ibm803.c, ibm803.h, ibm901.c, ibm901.h, ibm902.c, - ibm902.h, ibm921.c, ibm921.h, ibm1008.c, ibm1008.h, ibm1008_420.c, - ibm1097.c, ibm1097.h, ibm1112.c, ibm1112.h, ibm1123.c, ibm1123.h, - ibm1130.c, ibm1130.h, ibm1140.c, ibm1140.h, ibm1141.c, ibm1141.h, - ibm1142.c, ibm1142.h, ibm1143.c, ibm1143.h, ibm1144.c, ibm1144.h, - ibm1145.c, ibm1145.h, ibm1146.c, ibm1146.h, ibm1147.c, ibm1147.h, - ibm1148.c, ibm1148.h, ibm1149.c, ibm1149.h, ibm1166.c, ibm1166.h, - ibm1167.c, ibm1167.h, ibm4517.c, ibm4517.h, ibm4899.c, ibm4899.h, - ibm4909.c, ibm4909.h, ibm4971.c, ibm4971.h, ibm5347.c, ibm5347.h, - ibm9030.c, ibm9030.h, ibm9066.c, ibm9066.h, ibm9448.c, ibm9448.h, - ibm12712.c, ibm12712.h, ibm16804.c, ibm16804.h. - * iconvdata/TESTS: Add entries for new modules. - * iconvdata/gconv-modules: Likewise. - * iconvdata/ibm803.c: New file. - * iconvdata/ibm803.h: New file. - * iconvdata/ibm901.c: New file. - * iconvdata/ibm901.h: New file. - * iconvdata/ibm902.c: New file. - * iconvdata/ibm902.h: New file. - * iconvdata/ibm921.c: New file. - * iconvdata/ibm921.h: New file. - * iconvdata/ibm1008.c: New file. - * iconvdata/ibm1008.h: New file. - * iconvdata/ibm1008_420.c: New file. - * iconvdata/ibm1097.c: New file. - * iconvdata/ibm1097.h: New file. - * iconvdata/ibm1112.c: New file. - * iconvdata/ibm1112.h: New file. - * iconvdata/ibm1123.c: New file. - * iconvdata/ibm1123.h: New file. - * iconvdata/ibm1130.c: New file. - * iconvdata/ibm1130.h: New file. - * iconvdata/ibm1140.c: New file. - * iconvdata/ibm1140.h: New file. - * iconvdata/ibm1141.c: New file. - * iconvdata/ibm1141.h: New file. - * iconvdata/ibm1142.c: New file. - * iconvdata/ibm1142.h: New file. - * iconvdata/ibm1143.c: New file. - * iconvdata/ibm1143.h: New file. - * iconvdata/ibm1144.c: New file. - * iconvdata/ibm1144.h: New file. - * iconvdata/ibm1145.c: New file. - * iconvdata/ibm1145.h: New file. - * iconvdata/ibm1146.c: New file. - * iconvdata/ibm1146.h: New file. - * iconvdata/ibm1147.c: New file. - * iconvdata/ibm1147.h: New file. - * iconvdata/ibm1148.c: New file. - * iconvdata/ibm1148.h: New file. - * iconvdata/ibm1149.c: New file. - * iconvdata/ibm1149.h: New file. - * iconvdata/ibm1166.c: New file. - * iconvdata/ibm1166.h: New file. - * iconvdata/ibm1167.c: New file. - * iconvdata/ibm1167.h: New file. - * iconvdata/ibm4517.c: New file. - * iconvdata/ibm4517.h: New file. - * iconvdata/ibm4899.c: New file. - * iconvdata/ibm4899.h: New file. - * iconvdata/ibm4909.c: New file. - * iconvdata/ibm4909.h: New file. - * iconvdata/ibm4971.c: New file. - * iconvdata/ibm4971.h: New file. - * iconvdata/ibm5347.c: New file. - * iconvdata/ibm5347.h: New file. - * iconvdata/ibm9030.c: New file. - * iconvdata/ibm9030.h: New file. - * iconvdata/ibm9066.c: New file. - * iconvdata/ibm9066.h: New file. - * iconvdata/ibm9448.c: New file. - * iconvdata/ibm9448.h: New file. - * iconvdata/ibm12712.c: New file. - * iconvdata/ibm12712.h: New file. - * iconvdata/ibm16804.c: New file. - * iconvdata/ibm16804.h: New file. - * iconvdata/testdata/IBM803: New file. - * iconvdata/testdata/IBM803..UTF8: New file. - * iconvdata/testdata/IBM901: New file. - * iconvdata/testdata/IBM901..UTF8: New file. - * iconvdata/testdata/IBM902: New file. - * iconvdata/testdata/IBM902..UTF8: New file. - * iconvdata/testdata/IBM921: New file. - * iconvdata/testdata/IBM921..UTF8: New file. - * iconvdata/testdata/IBM1008: New file. - * iconvdata/testdata/IBM1008..UTF8: New file. - * iconvdata/testdata/IBM1097: New file. - * iconvdata/testdata/IBM1097..UTF8: New file. - * iconvdata/testdata/IBM1112: New file. - * iconvdata/testdata/IBM1112..UTF8: New file. - * iconvdata/testdata/IBM1123: New file. - * iconvdata/testdata/IBM1123..UTF8: New file. - * iconvdata/testdata/IBM1130: New file. - * iconvdata/testdata/IBM1130..UTF8: New file. - * iconvdata/testdata/IBM1140: New file. - * iconvdata/testdata/IBM1140..UTF8: New file. - * iconvdata/testdata/IBM1141: New file. - * iconvdata/testdata/IBM1141..UTF8: New file. - * iconvdata/testdata/IBM1142: New file. - * iconvdata/testdata/IBM1142..UTF8: New file. - * iconvdata/testdata/IBM1143: New file. - * iconvdata/testdata/IBM1143..UTF8: New file. - * iconvdata/testdata/IBM1144: New file. - * iconvdata/testdata/IBM1144..UTF8: New file. - * iconvdata/testdata/IBM1145: New file. - * iconvdata/testdata/IBM1145..UTF8: New file. - * iconvdata/testdata/IBM1146: New file. - * iconvdata/testdata/IBM1146..UTF8: New file. - * iconvdata/testdata/IBM1147: New file. - * iconvdata/testdata/IBM1147..UTF8: New file. - * iconvdata/testdata/IBM1148: New file. - * iconvdata/testdata/IBM1148..UTF8: New file. - * iconvdata/testdata/IBM1149: New file. - * iconvdata/testdata/IBM1149..UTF8: New file. - * iconvdata/testdata/IBM1166: New file. - * iconvdata/testdata/IBM1166..UTF8: New file. - * iconvdata/testdata/IBM1167: New file. - * iconvdata/testdata/IBM1167..UTF8: New file. - * iconvdata/testdata/IBM4517: New file. - * iconvdata/testdata/IBM4517..UTF8: New file. - * iconvdata/testdata/IBM4899: New file. - * iconvdata/testdata/IBM4899..UTF8: New file. - * iconvdata/testdata/IBM4909: New file. - * iconvdata/testdata/IBM4909..UTF8: New file. - * iconvdata/testdata/IBM4971: New file. - * iconvdata/testdata/IBM4971..UTF8: New file. - * iconvdata/testdata/IBM5347: New file. - * iconvdata/testdata/IBM5347..UTF8: New file. - * iconvdata/testdata/IBM9030: New file. - * iconvdata/testdata/IBM9030..UTF8: New file. - * iconvdata/testdata/IBM9066: New file. - * iconvdata/testdata/IBM9066..UTF8: New file. - * iconvdata/testdata/IBM9448: New file. - * iconvdata/testdata/IBM9448..UTF8: New file. - * iconvdata/testdata/IBM12712: New file. - * iconvdata/testdata/IBM12712..UTF8: New file. - * iconvdata/testdata/IBM16804: New file. - * iconvdata/testdata/IBM16804..UTF8: New file. - Patch by Masahide WASHIZAWA . - - * iconvdata/run-iconv-test.sh: Run ASCII->encoding->ASCII suntzus - test only if $subset is N. - -2005-09-29 Roland McGrath - - [BZ #1392] - * posix/sys/wait.h [!__GNUC__ || __cplusplus] (__WAIT_INT): Use const. - -2005-09-29 Alfred M. Szmidt - - * elf/rtld.c [DL_ARGV_NOT_RELRO] (_dl_argc, _dl_skip_args): - Don't use attribute_relro. - -2005-09-29 Roland McGrath - - [BZ #1392] - * posix/sys/wait.h (__WAIT_INT): Rewrite using an initializer, - in case __typeof yields a const-qualified type. - -2005-09-28 Ulrich Drepper - - * dirent/dirent.h: Declare fdopendir. - * dirent/Versions: Export fdopendir for GLIBC_2.4. - * dirent/Makefile (routines): Add fdopendir. - (tests): Add tst-fdopendir. - * dirent/tst-fdopendir.c: New file. - * include/dirent.h: Declare __alloc_dir. - * sysdeps/generic/fdopendir.c: New file. - * sysdeps/unix/fdopendir.c: New file. - * sysdeps/unix/opendir.c: Split off back part of opendir into new - function __alloc_dir. - -2005-09-26 Steven Munroe - - [BZ #1384] - * sysdeps/powerpc/fpu/libm-test-ulps: Adjust expected y1, y1f, yn, - ynf results. + [BZ #2883] + * sysvipc/sys/msg.h: Change return value to ssize_t. + * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. + * sysvipc/msgrcv.c: Likewise. + * include/sys/msg.h: Likewise. -2005-09-06 Paul Eggert - Ulrich Drepper + * grp/initgroups.c (internal_getgrouplist): Remove unnecessary + test introduced in patch for bz #661. + (getgrouplist): Simplify code a bit. Don't allocate one additional + element for NEWGROUPS. - [BZ #1302] - Change bitset word type from unsigned int to unsigned long int, - as this has better performance on typical 64-bit hosts. Change - bitset type name to bitset_t. - * posix/regcomp.c (build_equiv_class, build_charclass): - (build_range_exp, build_collating_symbol): - Prefer bitset_t to re_bitset_ptr_t in prototypes, when the actual - argument is a bitset. This is merely a style issue, but it makes - it clearer that an entire array is expected. - (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps, - lower_subexp): Adjust for new bitset_t definition. - (lower_subexp, parse_bracket_exp, built_charclass_op): Likewise. - * posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain, - bitset_not, bitset_merge, bitset_set_all, bitset_mask): Likewise. - * posix/regexec.c (check_dst_limits_calc_pos_1, - check_subexp_matching_top, build_trtable, group_nodes_into_DFAstates): - Likewise. - * posix/regcomp.c (utf8_sb_map): Don't assume initializer - == 0xffffffff. - * posix/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS. - All uses changed. - (BITSET_WORDS): Renamed from BITSET_UINTS. All uses changed. - (bitset_word_t): New type, replacing 'unsigned int' for bitset uses. - All uses changed. - (BITSET_WORD_MAX): New macro. - (bitset_set, bitset_clear, bitset_contain, bitset_empty, - (bitset_set_all, bitset_copy): Adjust for bitset_t change. - (bitset_empty, bitset_copy): - Prefer sizeof (bitset_t) to multiplying it out ourselves. - (bitset_not_merge): Remove; unused. - (bitset_contain): Return bool, not unsigned int with one bit on. - All callers changed. - * posix/regexec.c (build_trtable): Don't assume bitset_t has no - stricter alignment than re_node_set; do this by defining a new - internal type struct dests_alloc and using it to allocate memory. - -2005-09-27 Ulrich Drepper - - [BZ #1230] - * stdlib/strtod_l.c (STRNCASECMP): Always use C locale object. - (TOLOWER_C): Define. Use it when recognizing inf and nan. - * stdlib/Makefile (tests): Add bug-strtod2. - * stdlib/bug-strtod2.c: New file. - -2005-09-21 Ralf Wildenhues - - [BZ #1361] - * argp/argp-fmtstream.h [HAVE_CONFIG_H]: Do not #include . - * argp/argp-eexst.c, argp/argp-fmtstream.c, argp/argp-fs-xinl.c, - argp/argp-xinl.c: Fix up whitespace. - -2005-09-27 Ulrich Drepper - - [BZ #1158] - * stdlib/cxa_atexit.c (__new_exitfn): Rewrite to preserve order in - which the functions were registered. - * dlfcn/Makefile: Add rules to build and run bug-atexit1 and - bug-atexit2. - * dlfcn/bug-atexit1.c: New file. - * dlfcn/bug-atexit1-lib.c: New file. - * dlfcn/bug-atexit2.c: New file. - * dlfcn/bug-atexit2-lib.c: New file. - - [BZ #1078] - * libio/fileops.c (_IO_new_file_xsputn): Determine amount of - available space in non-line-buffered buffer correctly. - * libio/oldfileops.c (_IO_old_file_xsputn): Likewise. - * stdio-common/Makefile (tests): Add tst-fwrite. - * stdio-common/tst-fwrite.c: New file. - -2005-09-26 Ulrich Drepper - - [BZ #838] - * malloc/arena.c (ptmalloc_lock_all): If global lock already taken - by the same thread, just bump the counter. - (ptmalloc_unlock_all): If counter for recursive locks hasn't reached - zero, don't do anything else. - * malloc/Makefile (tests): Add tst-mallocfork. - * malloc/tst-mallocfork.c: New file. - - [BZ #808] - * malloc/malloc.c (_int_realloc): Make error message clearer. - - [BZ #713] - * libio/iofgets.c: Treat N==1 correctly. - * libio/iofgets_u.c: Likewise. - * libio/iofgetws.c: Likewise. - * libio/iofgetws_u.c: Likewise. - * stdio-common/Makefile (tests): Add tst-fgets. - * stdio-common/tst-fgets.c: New file. - -2005-01-11 Thorsten Kukuk - - [BZ #652] - * posix/getconf.c: Add new option -a to print the names of - the current system configuration variables to stdout. - Based on patch from Josh Aas . - -2005-09-26 Ulrich Drepper - - [BZ #644] - * sysdeps/posix/getaddrinfo.c (fls): New function. - (gaih_inet): Don't use ffs, use fls. Convert address to native byte - order first. - * posix/Makefile (tests): Add tst-rfc3484. - * posix/tst-rfc3484.c: New file. - - [BZ #627] - * libio/iofclose.c (_IO_new_fclose): Unlock the internal lock - before destroying it as part of the _IO_FINISH call. - * libio/oldiofclose.c (_IO_old_fclose): Likewise. - - [BZ #524] - * sysdeps/posix/getaddrinfo.c (match_prefix): Fix matching loop if - number of bits is multiple of 8. - Patch by Fredrik Tolf . - - [BZ #516] - * elf/dl-load.c: Report failed loading due to ELF class mismatch - with better words. - - [BZ #162] - * manual/llio.texi (Waiting for I/O): Correct description of read - conditions reported by select. - -2005-09-24 Jakub Jelinek - - * inet/getnetgrent_r.c (innetgr): Call endfct even if result != 0. - Return 1 only if result == 1. Patch by Benoit Capelle. - -2005-09-25 Ulrich Drepper - - [BZ #278] - * manual/stdio.texi (Hook Functions): Correct type of position - parameter of seeker and fix fallout of the change in the text. - - [BZ #714] - * iconv/loop.c [!STORE_REST] (SINGLE): Correctly record number of - left-over bytes and store them correctly. - * wcsmbs/tst-mbrtowc2.c: New file. - * wcsmbs/Makefile (tests): Add tst-mbrtowc2. - -2005-09-24 Roland McGrath - - * sysdeps/unix/sysv/i386/signal.S: Removed, saved in ports repository. - * sysdeps/unix/sysv/i386/sigreturn.S: Likewise. - -2005-09-24 Ulrich Drepper - - [BZ #545] - * locale/iso-639.def: More updates from the current spec. - - * locale/programs/ld-address.c (address_finish): Produce better - error messages for invalid lang_ab use. + [BZ #2908] + * stdio-common/printf_fphex.c (__printf_fphex): When rounding up + 'f', use '1' as leading digit not '\1'. + * stdio-common/Makefile (tests): Add bug16. + * stdio-common/bug16.c: New file. - * locale/iso-639.def: Add a few updates from current spec. + [BZ #2914] + * sysdeps/unix/sysv/linux/gethostid.c: Don't define OLD_HOSTIDFILE + and don't try to open it. The patch introducing the macro + contained a bug and used the same file name as the new file + instead of using /var/adm/hostid. Nobody complaint so I'm taking + this out completely. -2005-09-23 Ulrich Drepper + [BZ #2926] + * assert/assert.h: Move cast to void inside ?: to quiet gcc. + Patch by Jerry James . - [BZ #704] - * locale/iso-4217.def: Replace MGF with MGA. + * rt/Makefile (tests): Add tst-clock2. + * rt/tst-clock2.c: New file. - * iconvdata/jis0208.c (__jisx0208_from_ucs4_lat1): Reduce size of - array. - * iconvdata/jis0208.h (ucs4_to_jisx0208): Adjust access. + [BZ #2978] + * resolv/gai_notify.c (__gai_notify_only): Copy memory for thread + function and its parameters and pass it to new thread. + (__gai_notify): Add support for alternative waiting for completion. + * resolv/gai_suspend.c (gai_suspend): Add support for alternative + waiting for completion. + * resolv/getaddrinfo_a.c: Likewise. + * resolv/gai_misc.h (struct waitlist): Don't add cond if alternative + waiting for completion is used. + * resolv/gai_misc.c: Allow overwriting code to start helper thread. + * resolv/gai_cancel.c: Include not "gai_misc.h". + * resolv/gai_error.c: Likewise. + * resolv/gai_sigqueue.c: Likewise. -2004-08-13 GOTO Masanori +2006-08-02 Thomas Schwinge - [BZ #395] - * iconvdata/jis0208.c: Remove 0x005C mapping from - __jisx0208_from_ucs4_lat1. - Reported by Fumitoshi UKAI - -2005-09-23 Ulrich Drepper - - [BZ #394] - * libio/fmemopen.c (fmemopen_write): Return 0 instead of -1 if - nothing can be written. - * libio/iofopncook.c (_IO_cookie_write): If something went wrong, - set error bit. - -2005-09-22 Ulrich Drepper - - [BZ #281] - * posix/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *. - * posix/regcomp.c: Remove unnecessary uses of - unsigned RE_TRANSLATE_TYPE. - * posix/regex_internal.h: Likewise. - * posix/regex_internal.c: Likewise. - * posix/regexexec.c: Likewise. - Based on a patch by Stepan Kasal . - - [BZ #1035] - * locale/iso-4217.def: Replace TRL entry with TRY for new Turkish Lira. - - [BZ #1363] - * nscd/nscd_getpw_r.c (nscd_getpw_r): Remove incorrectly C&Ped - free call in code handling detection of GC runs. - -2005-09-22 Roland McGrath - - * elf/dl-tsd.c (__libc_dl_error_tsd): Use attribute_tls_model_ie for - static __thread variable. - From Alexandre Oliva - - * Makefile ($(objpfx)c++-types-check.out): Use $<, not $^, in command. - Reported by Alexandre Oliva . - -2005-09-20 Jakub Jelinek - - * nscd/dbg_log.c (init_logfile): Use fopen64 rather than fopen. - -2005-09-20 Roland McGrath - - * sysdeps/unix/sysv/linux/lddlibc4.c (main): Use execv, not execl. - - [BZ #1346] - * elf/dl-load.c (_dl_map_object_from_fd) [HAVE_Z_RELRO]: Do relro - magic on __stack_prot only if [SHARED]. Skip mprotect if __stack_prot - lies outside the page-rounded-down relro region. - -2005-09-19 Richard Henderson - - [BZ #1358] - * sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s) - to a temporary first. - (inline_syscall2, inline_syscall3, inline_syscall4): Likewise. - (inline_syscall5, inline_syscall6): Likewise. - - * sysdeps/alpha/ldiv.S (lldiv): Add alias. - -2005-09-17 Ulrich Drepper - - [BZ #1010] - * sysdeps/unix/sockatmark.c (sockatmark): Use SIOCATMARK correctly. - - [BZ #1053] - * debug/xtrace.sh: Add missing escape character in -? match. - Patch by Peter Breitenlohner . - - [BZ #1051] - * wctype/wctype.h: Remove stray __END_NAMESPACE_C99. - * stdlib/stdlib.h: Use __END_NAMESPACE_STD instead of - __END_NAMESPACE_C99 in one place. - * scripts/begin-end-check.pl: New file. - Patch by Ralph Loader . - * Makefile: Add rules to run scripts/begin-end-check.pl. - -2005-09-17 Andreas Jaeger - - * timezone/zdump.c: Include ctype.h. - -2005-09-16 Andreas Jaeger - - [BZ #1047] - * sysdeps/unix/sysv/linux/mips/getpagesize.c: New file. - -2005-09-16 Maciej W. Rozycki - - [BZ #933] - * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of - the syscall immediately before invocation. - * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise. - * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise. - - * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use - macros to handle GP. - * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): - Likewise. Update inaccurate comments. - -2005-09-13 Ulrich Drepper - - * sysdeps/posix/spawni.c (__spawni): Automatically recognize some - more cases when we can use vfork. - -2005-08-29 Thomas Schwinge - - [BZ #1261] - * manual/memory.texi (Hooks for Malloc): Correct prototype of - my_init_hook and definition of my_free_hook. - -2005-09-12 Roland McGrath - - [BZ #1331] - * malloc/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed - macro argument. - Reported by Matej Vela . - -2005-09-12 Jakub Jelinek - - * malloc/malloc.c (struct malloc_chunk): Fix comment typo. - (public_cALLOc): For mmapped chunks and perturb_byte != 0, - don't clear SIZE_SZ bytes more than should be cleared. - -2005-09-09 Jakub Jelinek - - * inet/getnetgrent_r.c: Include assert. - (setup): Remove FUNC_NAME and ALL arguments, assume they are always - "setnetgrent" and 1. - (endnetgrent_hook): New function. - (internal_endnetgrent): Use it. - (__internal_setnetgrent_reuse): Use it. Adjust setup caller. - If status is NSS_STATUS_SUCCESS, yet action is continue, call - endnetgrent hook. - (internal_getnetgrent_r): Use __nss_lookup_function rather than - setup. Recompute getfct pointer after successful - __internal_setnetgrent_reuse. Don't use __nss_next. - (innetgr): Use __nss_lookup_function instead of __nss_lookup. - Adjust setup caller. - * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Always clear - data_size and cursor. Add libnss_files_hidden_proto and - libnss_files_hidden_def. - (_nss_files_setnetgrent): Call _nss_files_endnetgrent on failure. - * nis/nss_nis/nis-netgrp.c (internal_endnetgrent): Always clear - data_size and cursor. - (_nss_nis_setnetgrent): Don't call internal_endnetgrent. - (_nss_nis_getnetgrent_r): Remove result->cursor == NULL handling. - * nis/nss_nisplus/nisplus-netgrp.c (internal_endnetgrent): Always clear - data_size and position. - (_nss_nisplus_setnetgrent): Don't call internal_endnetgrent. - -2005-09-09 Ulrich Drepper - - * nss/getent.c (netgroup_keys): Call endnetgrent. - (main): Call mtrace. - - * nss/nss_files/files-netgrp.c (_nss_files_setnetgrent): We don't - need locking for the stream. Use feof_unlocked. - -2005-09-09 Jakub Jelinek - - [BZ #1318] - * locale/loadarchive.c (_nl_load_locale_from_archive): Free - normalized_codeset even if p was already normalized. - Reported by Jaroslav Snajdr . - -2005-09-08 Roland McGrath - - * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): Decode DSOCAPS - properly, first byte is bit number in mask. Skip disabled caps. - -2005-07-11 Derek R. Price - - [BZ #1061] - * sysdeps/generic/glob.c (glob): Only a 0 return from - getlogin_r means success, according to POSIX 1003.2. - -2005-06-23 Paul Eggert - - [BZ #1033] - * time/mktime.c: Import from gnulib. - The following macros are now consistent with other gnulib code. - This does not change mktime's behavior. - (TYPE_IS_INTEGER): New macro. - (time_t_is_integer): Use it. - (TYPE_TWOS_COMPLEMENT): New macro. - (twos_complement_arithmetic): Use it. - (TYPE_ONES_COMPLEMENT): New macro. - (TYPE_MINIMUM, TYPE_MAXIMUM): Now supports signed-magnitude. - mktime doesn't use this, but the code now matches other gnulib code. - (ranged_convert): Pacify GCC 4.0 in a different way, which - generates a few bytes less code. - (ranged_convert, __mktime_internal): When calling a function via a - pointer P, use P () rather than (*P) (), as we now assume C89 or - better. - -2005-09-07 Alexandre Oliva - - * timezone/test-tz.c: Update to match tzdata2005m. - * timezone/tst-timezone.c: Likewise. - -2005-09-07 Ulrich Drepper - - * posix/regexec.c (find_recover_state): Remove unnecessary - initialization. - (transit_state_bkref): Make DFA a const pointer. - (get_subexp): Likewise. - (check_arrival): Likewise. - (update_cur_sifted_state): Likewise. - (re_search_internal): Likewise. - (prune_impossible_nodes): Likewise. - (acquire_init_state_context): Likewise. - (proceed_next_node): Likewise. - (set_regs): Likewise. - (free_fail_stack_return): Likewise. - (check_arrival_expand_ecl): Mark DFA parameter as const. - (check_arrival_expand_ecl_sub): Likewise. - (check_subexp_limits): Likewise. - (sub_epsilon_src_nodes): Likewise. - (add_epsilon_src_nodes): Likewise. - (merge_state_array): Likewise. - (update_regs): Likewise. - (build_trtable): Likewise. - (sift_states_backward): Mark MCTX parameter as const. - (build_sifted_states): Likewise. - (update_cur_sifted_state): Likewise. - (sift_states_mkref): Likewise. - (check_arrival_expand_ecl): Mark eclosure as const. - (check_dst_limits_calc_pos_1): Likewise. - * posix/regex_internal.h (re_match_context_t): Make dfa a const - pointer. - -2005-09-06 Ulrich Drepper - - * timezone/africa: Update from tzdata2005m. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/backward: Likewise. - * timezone/europe: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - * timezone/zone.tab: Likewise. - * timezone/zdump.c: Update from tzcode2005m. - - * posix/regexec.c (merge_state_with_log): Define dfa as const pointer. - (transit_state_sb): Likewise. - (transit_state_mb): Likewise. - (sift_states_iter_mb): Likewise. - (check_arrival_add_next_nodes): Likewise. - (check_node_accept_bytes): Change first parameter to pointer-to-const. - [_LIBC] (re_search_2_stub): Use mempcpy. - - * posix/regex_internal.c (re_string_reconstruct): Avoid calling - mbrtowc for very simple UTF-8 case. - -2005-09-01 Paul Eggert - - * posix/regex_internal.c (build_wcs_upper_buffer): Fix portability - bugs in int versus size_t comparisons. - -2005-09-06 Ulrich Drepper - - * posix/regex_internal.c (re_acquire_state): Make DFA pointer arg - a pointer-to-const. - (re_acquire_state_context): Likewise. - * posix/regex_internal.h: Adjust prototypes. - -2005-08-31 Jim Meyering - - * posix/regcomp.c (search_duplicated_node): Make first pointer arg - a pointer-to-const. - * posix/regex_internal.c (create_ci_newstate, create_cd_newstate, - register_state): Likewise. - * posix/regexec.c (search_cur_bkref_entry, check_dst_limits): - (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos): - (group_nodes_into_DFAstates): Likewise. - -2005-08-31 Paul Eggert - - * posix/regexec.c (re_search_internal): Simplify update of - rm_so and rm_eo by replacing "if (A == B) A += C - B;" - with the equivalent of "if (A == B) A = C;". - -2005-09-06 Ulrich Drepper - - * posix/regcomp.c (re_compile_internal): Change third parameter type - to size_t. - (init_dfa): Likewise. Make sure that arithmetic on pat_len doesn't - overflow. - * posix/regex_internal.h (struct re_dfa_t): Change type of nodes_alloc - and nodes_len to size_t. - * posix/regex_internal.c (re_dfa_add_node): Use size_t as type for - new_nodes_alloc. Check for overflow. - -2005-08-31 Paul Eggert - - * posix/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char): - (optimize_subexps, lower_subexp): - Don't assume 1<<31 has defined behavior on hosts with 32-bit int, - since the signed shift might overflow. Use 1u<<31 instead. - * posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain): - Likewise. - * posix/regexec.c (check_dst_limits_calc_pos_1): Likewise. - (check_subexp_matching_top): Likewise. - * posix/regcomp.c (optimize_subexps, lower_subexp): - Use CHAR_BIT rather than 8, for clarity. - * posix/regexec.c (check_dst_limits_calc_pos_1): - (check_subexp_matching_top): Likewise. - * posix/regcomp.c (init_dfa): Make table_size unsigned, so that we - don't have to worry about portability issues when shifting it left. - Remove no-longer-needed test for table_size > 0. - * posix/regcomp.c (parse_sub_exp): Do not shift more bits than there - are in a word, as the resulting behavior is undefined. - * posix/regexec.c (check_dst_limits_calc_pos_1): Likewise; - in one case, a <= should have been an <, and in another case the - whole test was missing. - * posix/regex_internal.h (BYTE_BITS): Remove. All uses changed to - the standard name CHAR_BIT. + * hurd/getdport.c (__getdport): Don't return EBADF; instead set + errno to EBADF and return MACH_PORT_NULL. - * posix/regex_internal.h (re_sub_match_top_t): Remove unused member - next_last_offset. - (struct re_dfa_t): Remove unused member states_alloc. - * posix/regcomp.c (init_dfa): Don't initialize unused members. +2006-06-23 Joseph Myers -2005-08-25 Paul Eggert + [BZ #2980] + * posix/Makefile (CFLAGS-waitid.c): Add -fasynchronous-unwind-tables. - * posix/regexec.c (set_regs): Don't alloca with an unbounded size. +2006-08-02 Ulrich Drepper - alloca modernization/simplification for regex. - * posix/regex.c: Remove portability cruft for alloca. This no longer - needs to be at the start of the file, and can be moved into - regex_internal.h and simplified. - * posix/regex_internal.h: Include . - (__libc_use_alloca) [!defined _LIBC]: New macro. - * posix/regexec.c (build_trtable): Remove "#ifdef _LIBC", - since the code now works outside glibc. + * elf/dl-addr.c (_dl_addr): If GNU-style hash tables are present, + walk them instead of the symbol table. -2005-09-06 Ulrich Drepper +2006-08-01 Ulrich Drepper - * include/regex.h: Remove use of _RE_ARGS. + [BZ #2098] + * nscd/initgrcache.c (addinitgroupsX): Judge successful lookups by + status of NSS calls, not the number of returned entries. -2005-08-25 Paul Eggert + * sysdeps/unix/sysv/linux/syscalls.list: Remove add_key, + request_key, keyctl. - * posix/regexec.c (find_recover_state): Change "err" to "*err". +2006-07-31 Ulrich Drepper -2005-08-24 Paul Eggert + * sysdeps/unix/sysv/linux/dl-osinfo.h: Remove unnecessary include. - * posix/regcomp.c (regerror): Pointer args are 'restrict', - as per POSIX. - * posix/regex.h (regerror): Likewise. - * manual/pattern.texi (POSIX Regexp Compilation): Likewise. - Similarly for regcomp and regexec. Also, first 2 args of regexec - and 2nd arg of regerror are const. +2006-07-16 Jeff Bailey - * posix/regex.c: Do not include , as POSIX no longer - requires this. (The code never needed it.) + * elf/tst-auditmod1.c: Fix typo in #error. -2005-08-20 Paul Eggert +2006-07-31 Ulrich Drepper - * posix/regexec.c (sift_states_bkref): re_node_set_insert returns - int, not reg_errcode_t. + * elf/tst-auditmod1.c: Remove code for unsupported architectures. - * posix/regex_internal.c (calc_state_hash): Put 'inline' before type, - since some broken compilers warn about it otherwise. + * iconvdata/run-iconv-test.sh: Run cmp in C locale. - * posix/regcomp.c (create_initial_state): Remove duplicate decl. +2006-07-20 Adam Nemet -2005-08-20 Paul Eggert + * stdlib/test-canon.c (do_test): Close fd before unlinking file so + that the directory is empty even on non-POSIX filesystems. - * posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume - C89 or better. All uses removed. +2006-07-31 Ulrich Drepper -2005-09-06 Ulrich Drepper + * elf/dl-open.c (dl_open_worker): Add branch prediction. - * posix/regex.c: Prevent using C++ compilers. + * nis/nss_compat/compat-grp.c: Avoid unnecessary setgrent calls into + the backend NSS module. If backend setgrent call failed, don't have + internal_setgrent fail. Just remember this until it is needed. + * nis/nss_compat/compat-pwd.c: Likewise. + * nis/nss_compat/compat-spwd.c: Likewise. -2005-08-19 Paul Eggert +2006-07-30 Roland McGrath - * posix/regcomp.c (duplicate_node): Return new index, not an error - code, and let the caller return REG_ESPACE if out of space. This - removes an uninitialied-variable warning with GCC 4.0.1, and also - avoids taking the address of a local variable. All callers - changed. + * sysdeps/unix/sysv/linux/ia64/sigsuspend.c: File removed. + * sysdeps/unix/sysv/linux/x86_64/sigsuspend.c: File removed. + * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c: File removed. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: File removed. -2005-09-06 Ulrich Drepper + * sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): New macro. + (nanosleep_not_cancel): New macro. + (sigsuspend_not_cancel): new macro. + * sysdeps/unix/sysv/linux/sigsuspend.c [__ASSUME_REALTIME_SIGNALS] + (do_sigsuspend): Define as inline. + (__sigsuspend): Always use do_sigsuspend. + [! NO_CANCELLATION] (__sigsuspend_nocancel): New function. + * include/signal.h: Declare __sigsuspend_nocancel. + * sysdeps/posix/pause.c + [! NO_CANCELLATION] (__pause_nocancel): New function. - * include/time.h (__strptime_internal): Rename parameter to avoid - bogus compiler warning. + * include/unistd.h (__pause_nocancel): Add attribute_hidden. + * include/time.h (__nanosleep_nocancel): Likewise. -2005-08-19 Jim Meyering +2006-07-30 Ulrich Drepper - * posix/regexec.c (proceed_next_node): Redo local variables to - avoid GCC shadowing warnings. + * locale/programs/localedef.c (add_to_readlist): Rename local + variables to avoid confusion. -2005-09-06 Ulrich Drepper + * locale/programs/charmap.c (charmap_read): Emit error message if + charmap couldn't be found or read. - * posix/regex_internal.c (re_acquire_state): Minor code rearrangement. - (re_acquire_state_context): Likewise. +2006-07-28 Ulrich Drepper -2005-08-19 Paul Eggert + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_FUTEX_LOCK_PI. + * include/time.h: Declare __nanosleep_nocancel. + * include/unistd.h: Declare __pause_nocancel. + + * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Use this instead of + LDFLAGS. Add -lgcc_eh and libc_nonshared (again) to make sure we + get the __stack_chk_fail_local definition when it's needed. + +2006-07-26 Ulrich Drepper + + * dlfcn/Makefile: Add rules to build and run bug-atexit3. + * dlfcn/bug-atexit3.c: New file. + * dlfcn/bug-atexit3-lib.cc: New file. + + * dlfcn/dlmopen.c (dlmopen_doit): Don't allow RTLD_GLOBAL to be + used when the namespace is not the base namespace. + +2006-07-26 Gavin Romig-Koch + + * stdlib/cxa_atexit.c (__new_exitfn_called): New variable. + (__new_exitfn): Bump it in every successful call. + * stdlib/cxa_finalize.c (__cxa_finalize): If destructor registered + more exit handlers, call them right away. + * stdlib/exit.h: Declare __new_exitfn_called. + +2006-07-25 Ulrich Drepper + + * stdlib/cxa_finalize.c (__cxa_finalize): Fix race condition when + calling registered handler. + + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Fix comment. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. + +2006-07-10 Ulrich Drepper + + * elf/dl-lookup.c (dl_new_hash): New functions. + (_dl_lookup_symbol_x): Rename hash to old_hash and don't compute + value here. Compute new-style hash value. Pass new hash value + and reference to variable with the old value to do_lookup_x. + (_dl_setup_hash): If DT_GNU_HASH is defined, use it and not + old-style hash table. + (_dl_debug_bindings): Pass new hash value and reference to variable + with the old value to do_lookup_x. + * elf/do-lookup.h (do_lookup_x): Accept additional parameter with + new-style hash value and change old-style hash value parameter to + be a reference. Reoganize functions to determine whether + new-style hash table is available. Only fall back on old-style + table. If old-style hash value is needed, compute it here. + * elf/dynamic-link.h (elf_get_dynamic_info): Relocate DT_GNU_HASH + entry. + * elf/elf.h: Define SHT_GNU_HASH, DT_GNU_HASH, DT_TLSDEC_PLT, + DT_TLSDEC_GOT. Adjust DT_ADDRNUM. + * include/link.h (struct link_map): Add l_gnu_bitmask_idxbits, + l_gnu_shift, l_gnu_bitmask, l_gnu_buckets and l_gnu_chain_zero. + * Makeconfig: If linker supports --hash-style option add it to all + linker command lines to build DSOs. + * config.make.in: Define have-hash-style. + * configure.in: Test whether linker supports --hash-style option. - * posix/regex_internal.c (re_string_realloc_buffers): - (re_node_set_insert, re_node_set_insert_last, re_dfa_add_node): - Rename local variables to avoid GCC shadowing warnings. + * elf/dl-misc.c (_dl_name_match_p): Make MAP parameter const. + * sysdeps/generic/ldsodefs.h: Adjust prototype. -2005-07-08 Eric Blake - Paul Eggert +2006-06-27 Ulrich Drepper - * posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not - wchar_t. Remove now-unnecessary cast. - (build_range_exp): Likewise. + * elf/dl-load.c (open_path): Fix test to determine whether DSO is + auditing. -2005-08-31 Bob Wilson + * elf/dl-load.c (_dl_map_object): Try harder to avoid looking at + RPATH of main map twice. - * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Remove the - exponent bias from the increment value for scaling by 2^60. +2006-06-22 Ulrich Drepper -2005-09-05 Alexandre Oliva + * intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't + look further, return original strings. + (_nl_find_msg): Do not return found translation if the conversion + failed. Either signal the string is unusable or that something went + wrong and the original should be used. - * configure.in: Compile source test file with -fPIC for -shared. +2006-06-21 Ulrich Drepper -2005-09-04 Ulrich Drepper + * string/_strerror.c (__strerror_r): Add __builtin_expect. - * iconv/skeleton.c: Eliminate DEFINE_DIRECTION_OBJECTS macro use, - it wasn't used. Remove use of from_object and to_object variable, - replace with some constants. Adjust users. +2006-06-14 Jakub Jelinek - * sysdeps/i386/bits/string.h: Removed. + [BZ #2766] + * misc/insremque.c (insque): Handle prev == NULL. + * misc/Makefile (tests): Add tst-insremque. + * misc/tst-insremque.c: New test. - * stdio-common/Makefile (tests): Add tst-put-error. - * stdio-common/tst-put-error.c: New file. - * libio/fileops.c (_IO_new_file_xsputn): If overflow fails and no more - data would have to be written signal error. - * libio/oldfileops.c (_IO_old_file_xsputn): Likewise. +2006-06-17 Ulrich Drepper - * libio/fileops.c (_IO_new_file_overflow): Use NULL not 0. + [BZ #2792] + * elf/dl-deps.c (expand_dst): Rename __cnt variable to not + conflict with DL_DST_REQUIRED. -2005-09-02 Ulrich Drepper +2006-06-16 Ulrich Drepper - * elf/dl-load.c (_dl_map_object_from_fd): No need to change - protection of memory used for the last segment. + * nis/nis_subr.c (nis_getnames): Fix the implementation to better + match what Solaris does. -2005-08-22 Robert Millan +2006-06-04 Ulrich Drepper - * sysdeps/mach/hurd/nfs/nfs.h: Move to ... - * sysdeps/generic/nfs/nfs.h: ... here. + * sysdeps/posix/spawni.c (__spawni): Use local_seteuid and + local_setegid instead of seteuid and setegid. + * sysdeps/generic/local-setxid.h: New file. + * sysdeps/unix/sysv/linux/local-setxid.h: New file. -2005-09-01 Ulrich Drepper + * sysdeps/posix/spawni.c (__spawni): Use non-cancelable interfaces. - * libio/stdio.h: Remove __wur from ungetc, sscanf, and vsscanf. - Add __wur to feof{,_unlocked}, ferror{,_unlocked}, - fileno{,_unlocked}, and popen. + * string/Makefile (tests): Add bug-envz1. + * string/bug-envz1.c: New file. -2005-08-30 Ulrich Drepper +2006-06-02 Jakub Jelinek - * sysdeps/ieee754/flt-32/e_hypotf.c [!__STDC__]: Fix function name. + * posix/regex_internal.c (re_string_skip_chars): If no character has + been converted at all, set *last_wc to WEOF. If mbrtowc failed, set wc + to the byte which couldn't be converted. + (re_string_reconstruct): Don't clear valid_raw_len before calling + re_string_skip_chars. If wc is WEOF after re_string_skip_chars, set + tip_context using re_string_context_at. + * posix/Makefile: Add rules to build and run bug-regex25 test. + * posix/bug-regex25.c: New test. -2005-08-01 Bob Wilson - Richard Sandiford +2006-06-02 Ryan S. Arnold - * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Add missing - exponent bias to the value for 2^126. + [BZ #2703] + * string/envz.c (envz_strip): Correct erroneously reversed src + and dest parameters to memmove() invocation. -2005-08-30 Jakub Jelinek - Alan Modra +2006-05-30 Jakub Jelinek - * elf/dl-addr.c (_dl_addr): Use DL_ADDR_SYM_MATCH macro. - * sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): Define. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h: New file. + * nscd/nscd.h (prune_cache): Add fd argument to prototype. + * nscd/nscd.c (parse_opt): Read response from INVALIDATE request + to make sure the database has been already invalidated. + * nscd/cache.c (prune_cache): Add fd argument. Write response to fd + after the cache has been invalidated. Use pthread_mutex_lock rather + than pthread_mutex_trylock if fd != -1. + * nscd/connections.c (invalidate_cache): Add fd argument, write + response to fd if not calling prune_cache, pass fd to prune_cache. + (handle_request): Adjust invalidate_cache caller. + (nscd_run): Pass -1 as fd to prune_cache. -2005-08-23 Ulrich Drepper +2006-05-30 Ulrich Drepper - * nscd/nscd.c (main): Use error while process isn't running in the - background, not dbg_log. - * nscd/nscd_conf.c (nscd_parse_file): Likewise. - Mark messages with _(). Unify testing for database name. + * sysdeps/posix/getaddrinfo.c (gaiconf_init): Initialize bits in + the correct place. - * nscd/connection.c (DEFAULT_DATASIZE_PER_BUCKET): Move to nscd.h. - (dbs): Initialize max_db_size fields. - (nscd_init): When mapping the database, use max_db_size as the - mapping size even if it is bigger than the file size. - * nscd/mem.c (mempool_alloc): When resizing the file make sure the - limit in max_db_size is not exceeded. Don't use mremap, just - posix_fallocate is enough (according to Linus). Use posix_fallocate - correctly. - * nscd/nscd.conf: Add max-db-size parameters. - * nscd/nscd.h (struct database_dyn): Add max_db_size field. - Define DEFAULT_MAX_DB_SIZE and DEFAULT_DATASIZE_PER_BUCKET. - Temporarily define TEMP_FAILURE_RETRY_VAL here. - * nscd/nscd_conf.c (nscd_parse_file): Parse max-db-size parameter - and add sanity checks for it. +2006-05-29 Ulrich Drepper - * nscd/aicache.c (addhstaiX): Use send with MSG_NOSIGNAL not write to - send reply. - * nscd/connection.c (writeall): Likewise. - (handle_request): Likewise. - * nscd/grpcache.c (cache_addgr): Likewise. - * nscd/hstcache.c (cache_addhst): Likewise. - * nscd/initgrcache.c (addinitgroupsX): Likewise. - * nscd/nscd.c (parse_opt): Likewise. - * nscd/nscd_stat.c (send_stats): Likewise. - (receive_print_stats): Likewise. - * nscd/pwdcache.c (cache_addpw): Likewise. + * nscd/nscd.h (struct database_dyn): Add prunelock field. + * nscd/cache.c (prune_cache): Take prunelock before starting the + work. Just return in case it is already taken. + * nscd/connections.c (dbs): Initialize .prunelock. - * sysdeps/unix/sysv/linux/Versions: Export inotify_* syscalls. +2006-05-25 Ulrich Drepper -2005-08-22 Jakub Jelinek + * nis/nis_removemember.c (nis_removemember): Avoid unnecessary + copying. No need to allocate new array for group members. Just + move the pointers and update the size. - * stdlib/bits/stdlib.h (mbstowcs): Divide __bos (__dst) by - sizeof (wchar_t) rather than multiplying __len by sizeof (wchar_t). - Pass __bos (__dst) / sizeof (wchar_t) to the *_chk routine. - * wcsmbs/bits/wchar2.h (mbsrtowcs, mbsnrtowcs): Likewise. - * debug/mbsnrtowcs_chk.c (__mbsnrtowcs_chk): Don't multiply - len by sizeof (wchar_t). - * debug/mbsrtowcs_chk.c (__mbsrtowcs_chk): Likewise. - * debug/mbstowcs_chk.c (__mbstowcs_chk): Likewise. - Fix type of SRC argument. Pass &SRC rather than SRC to - __mbsrtowcs. - * debug/wcstombs_chk.c (__wcstombs_chk): Pass &SRC rather than SRC - to __wcsrtombs. - * debug/tst-chk1.c: Include assert.h. - (do_test): Change enough array from VLA into a fixed size array. - Assert that MB_CUR_MAX is <= sizeof (enough). Use FAIL () macro - instead of print error details. Add several new tests. - Kill some unused variable warnings. + * nis/nis_addmember.c (nis_addmember): Avoid unnecessary copying. + Avoid memory leak in case realloc fails. Simplification for + better code generation. -2005-08-21 Ulrich Drepper + Avoid deprecation warning because of libc_hidden_proto for + inet6_option_alloc. + * inet/inet6_option.c (option_alloc): Renamed from + inet6_option_alloc. Made static. + (inet6_option_alloc): Now a simple wrapper around option_alloc. + (inet6_option_append): Call option_alloc. + * include/netinet/in.h: Remove libc_hidden_proto for + inet6_option_alloc. - * resolv/res_send.c (Aerror): Fix printing IP address. + * nis/nis_callback.c (__nis_create_callback): Always call xdr_free + for cleanup when cb!=NULL [Coverity CID 233]. - * resolv/res_send.c (send_vc): Pass correct sockaddr size to connect. +2006-05-24 Ulrich Drepper -2005-08-19 H.J. Lu + [BZ #2693] + * inet/Makefile (routines): Add inet6_opt and inet6_rth. + * inet/Versions (libc, GLIBC_2.5): Add inet6_opt_init, + inet6_opt_append, inet6_opt_finish, inet6_opt_set_val, inet6_opt_next, + inet6_opt_find, inet6_opt_get_val, inet6_rth_space, inet6_rth_init, + inet6_rth_add, inet6_rth_reverse, inet6_rth_segments, + and inet6_rth_getaddr. + * inet/netinet/ip6.h (struct ip6_rthdr0): Make ip6r0_addr a flexible + array. + * inet/netinet/in.h (struct ip6_mtuinfo): Define. + Mark inet6_option_* interfaces as deprecated. + Declare inet6_opt_init, inet6_opt_append, inet6_opt_finish, + inet6_opt_set_val, inet6_opt_next, inet6_opt_find, inet6_opt_get_val, + inet6_rth_space, inet6_rth_init, inet6_rth_add, inet6_rth_reverse, + inet6_rth_segments, and inet6_rth_getaddr. + * inet/inet6_opt.c: New file. + * inet/inet6_rth.c: New file. + + * inet/netinet/icmp6.h: Pretty printing. + + [BZ #2683] + * elf/dl-addr.c (_dl_addr): Don't match undefined references. + +2006-05-23 Ulrich Drepper + + * nis/nis_lookup.c (nis_lookup): Use __prepare_niscall instead of + doing it all here. When server does not know the answer do not + fail immediate, try parent first. + + * nis/nis_domain_of_r.c (nis_domain_of_r): Add missing buffer + overflow test. + +2006-05-20 Ulrich Drepper + + * nis/nis_call.c (__prepare_niscall): New function. Split out + from __do_niscall. + * nis/nis_table.c (__create_ib_request): Renamed from create_ib_request + and exported. + (__follow_path): New function. Split out from nis_list. + * nis/nis_xdr.h: Add libnsl_hidden_proto for _xdr_ib_request and + _xdr_nis_result. + * nis/nis_xdr.c: Add libnsl_hidden_def for _xdr_ib_request and + _xdr_nis_result. + * nis/libnsl.h: Declare __prepare_niscall, __create_ib_request, + and __follow_path. + * nis/Versions: Export __prepare_niscall, __create_ib_request, + __follow_path, __do_niscall3, _xdr_ib_request, and _xdr_nis_result + from libnsl for version GLIBC_PRIVATE. + * nis/nisplus-parser.h: Remove _nss_nisplus_parse_pwent_chk. + Remove entry parameter from _nss_nisplus_parse_pwent and + _nss_nisplus_parse_grent. + * nis/nss_nisplus/nisplus-parser.c: Likewise. + * nis/nss_nisplus/nisplus-pwd.c: Remove support for SETENT_BATCH_READ + again. Rewrite getpwent handling to not use nis_first_entry and + nis_next_entry. Roll out own niscall handling. + * nis/nss_nisplus/nisplus-grp.c: Likewise. - * sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort. + * sunrpc/xdr_rec.c: Fix typo in comment. -2005-08-17 Robert Love +2006-05-19 Ulrich Drepper - * sysdeps/unix/sysv/linux/sys/inotify.h: Add IN_MOVE_SELF event. + * nis/nis_call.c (__do_niscall3): Avoid code duplication in error + handling. -2005-08-19 Bruno Haible + * nis/nis_callback.c (internal_nis_do_callback): Don't use malloc + to allocate memory for my_pollfd. Better initialization of + cb_is_running. Use TEMP_FAILURE_RETRY. - * intl/localealias.c (read_alias_file): In case of failure, close the - file descriptor and sort the array before returning. + * malloc/memusage.sh (memusageso): Add quotes. + (memusagestat): Likewise. + * debug/xtrace.sh (pcprofileso): Likewise. + (pcprofiledump): Likewise. + * debug/Makefile ($(objpfx)xtrace): Use $LIB in SLIBDIR + replacement. + * malloc/Makefile ($(objpfx)memusage): Likewise. -2005-08-19 Ulrich Drepper + * nis/nis_callback.c (__nis_create_callback): Calls to + svcudp_bufcreate and svctcp_create can fail. Free ->xprt if + asprintf call fails. - * malloc/Makefile: Link libmemusage.so with ld.so. - * malloc/memusage.c: Use atomic operations for all counter and size - computations. Handle thread stacks. - * sysdeps/generic/memusage.h: Define memusage_cntr_t and - memusage_size_t. - * sysdeps/i386/i686/memusage.h: New file. - * include/atomic.h: Define atomic_max and atomic_min. + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_sendreq): Make sure + no uninitialized memory is passed to sendto. - * debug/tst-chk1.c: Add tests for mbstowcs and wcstombs. +2006-05-18 Ulrich Drepper -2005-08-17 Paul Eggert + * nis/nis_callback.c (__nis_create_callback): Use asprinf instead + of snprintf+strdup. Handle OOM. + * nis/nis_callback.c (__nis_create_callback): Allocate cb and + cb->serv together. Remove now obsolete free calls. + (__nis_destroy_callback): Remove now obsolete free call. - [BZ #1207] - * posix/regex.h: Remove spurious space-before-tab. From gnulib. +2006-05-18 David Woodhouse -2005-08-16 Ulrich Drepper + * sysdeps/posix/getaddrinfo.c: Add unique labels to the default + RFC3484 precedence table for fec0::/10 and fc00::/7 (site-local + and ULA respectively). Set precedence for IPv4 address to 10 as + defined in RFC3484 for preferring IPv6. + * posix/gai.conf: Update to match the new default tables. - * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add - sys/inotify.h. - * sysdeps/unix/sysv/linux/sys/inotify.h: New file. - * sysdeps/unix/sysv/linux/syscalls.list: Add inotify syscalls. +2006-05-18 Jakub Jelinek - * nscd/cache.c (prune_cache): Add more debug output. Only for - debug level 3 and higher and very verbose. + * nis/nss_compat/compat-pwd.c (internal_setpwent): If nss_set*ent + returned NSS_STATUS_UNAVAIL, still return NSS_STATUS_SUCCESS. + * nis/nss_compat/compat-spwd.c (internal_setspent): Likewise. + * nis/nss_compat/compat-grp.c (internal_setgrent): Likewise. - * nscd/cache.c (prune_cache): Use stat64 not stat. - * nscd/connections.c (nscd_init): Likewise. + * nis/nss_compat/compat-initgroups.c (nss_setgrent, nss_endgrent): + Removed. + (init_nss_interface): Remove initialization of these variables. -2005-08-10 Sergio Gelato +2006-05-18 Ulrich Drepper - [BZ #1188] - * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check - from (len > 0) to (len >= 0). + * nis/nis_call.c (rec_dirsearch): Little optimization: pull + nis_free_directory forward to avoid duplication. -2005-08-16 Ulrich Drepper +2006-05-17 Ulrich Drepper - * nis/nis_xdr.c (_xdr_nis_result): Fix type of res variable. - Reported by Thomas Schwinge. + * nis/nis_call.c (rec_dirsearch): Handle __nis_finddirectory and + rec_dirsearch returning NULL. + (first_shoot): Handle __nis_finddirectory returning NULL. + (__nisfind_server): Fix leak when rec_dirsearch returns NULL. -2005-08-15 Jakub Jelinek + * sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOSE, IN_MOVE, + IN_ONLYDIR, IN_DONT_FOLLOW, and IN_MASK_ADD. - * nis/nis_subr.c (nis_leaf_of_r): Handle buflen == 0 correctly. +2006-05-17 Jakub Jelinek -2005-08-16 Ulrich Drepper + * sunrpc/key_call.c (getkeyserv_handle): Call auth_destroy if + pid changed. - * nss/getent.c (more_help): Use open_memstream instead of handling - memory allocation ourselves. +2006-05-15 Ulrich Drepper -2005-08-16 Jay Fenlason + * include/rpc/pmap_prot.h: Mark all functions as hidden. - * nss/getent.c (parse_options): change the -s option to support - {database}:{search} to override /etc/resolv.conf for only the - specified database. + * nscd/nscd_initgroups.c: Mark __gr_map_handle as hidden. + * nscd/nscd_getgr_r.c: Likewise. -2005-08-08 Ulrich Drepper + * include/rpc/pmap_rmt.h: Mark all functions as hidden. - * nscd/connections.c (main_loop_epoll): Pass NULL as event - argument for epoll_ctl(EPOLL_CTL_DEL) calls. + * nscd/nscd_getai.c (__hst_map_handle): Mark as hidden. + * nscd/nscd_gethst_r.c (__hst_map_handle): Likewise. - * nscd/nscd_stat.c (receive_print_stats): Really print values of - thread number, paranoia, and restart interval the server is using. + * stdlib/longlong.h (__clz_tab): Mark as hidden. - * argp/argp-help.c: Use _IO_vasprintf instead of vasprintf. - * include/stdio.h: Add libc_hidden_proto for __vfprintf_chk. - * debug/vfprintf_chk.c: Add libc_hidden_def. + * iconv/gconv_int.h: Mark __gconv_lock as hidden. -2005-08-08 Roland McGrath + * include/rpc/key_prot.h: Mark all _internal functions as hidden. - * argp/argp-help.c (__argp_error): __asprintf -> vasprintf. - (__argp_failure): Likewise. + * include/rpc/auth.h: Mark xdr_des_block_internal and + xdr_opaque_auth_internal as hidden. -2005-08-08 Ulrich Drepper + * sysdeps/unix/sysv/linux/getdents.c: Mark __have_no_getdents64 as + hidden. - * nscd/cache.c (cache_add): Commit hash table and header to disk. + * include/rpc/xdr.h: Mark all _internal functions as hidden. - * nscd/mem.c (mempool_alloc): Use posix_fallocate instead of ftruncate. - * nscd/connections.c (nscd_init): Likewise. + * misc/getusershell.c (okshells): Don't use static initializers, + do it dynamically. -2005-08-08 Jakub Jelinek + * stdlib/fmtmsg.c (keywords): Change type of len element to + uint32_t to not waste space on 64bit machines. - * stdio-common/fxprintf.c: Include libioP.h. + * locale/setlocale.c: Change _nl_category_names into a string. + Add new _nl_category_name_idxs. Change all users. + * locale/localeinfo.h: Adjust declaration of _nl_category_names. + Declare _nl_category_name_idxs. + * locale/findlocale.c: Adjust for _nl_category_names change. + * locale/loadlocale.c: Likewise. + * locale/newlocale.c: Likewise. + * intl/dcigettext.c: Likewise. - * posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname, - getdomainname): Add __NTH. - * stdlib/bits/stdlib.h (ptsname_r, wctomb, mbstowcs, wcstombs): - Likewise. - (realpath): Likewise. Use __const instead of const. Add __restrict - keywords. - * socket/bits/socket2.h (recvfrom): Add __restrict keyword to __buf. - * wcsmbs/bits/wchar2.h (wmemcpy, wmemmove, wmempcpy, wmemset, - wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, vswprintf, wcrtomb, - mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Add __NTH. - * string/bits/string3.h (__memset_ichk): Likewise. - (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __strcpy_ichk, - __stpcpy_ichk, __strncpy_ichk, stpncpy, __strcat_ichk, - __strncat_ichk): Likewise. Use __const instead of const. - (__stpncpy_chk): Use __const instead of const. - (__stpncpy_alias): Use __REDIRECT_NTH instead of __REDIRECT. + * iconv/gconv_conf.c (add_alias): Move actual alias handling to... + (add_alias2): ...here. New function. + (__gconv_read_conf): Simplify builtin alias handling. + (builtin_aliases): Convert to string to avoid relocations. + * iconv/gconv_builtin.h: Add comment about correct formatting. -2005-08-08 Ulrich Drepper - Jakub Jelinek +2006-05-15 Jakub Jelinek - * nscd/mem.c (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): Move - definitions to... - * nscd/nscd.h (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): ...here. - * nscd/connections.c (usekey): New enum. - (check_use, verify_persistent_db): New functions. - (nscd_init): If persistent database is corrupted, unlink it and - recreate rather than falling back to non-persistent database. - Call verify_persistent_db. Avoid overflows in total computation. + * resolv/res_debug.c (loc_ntoa): Make error const. -2005-08-08 Ulrich Drepper +2006-05-14 Andreas Schwab - * iconvdata/utf-16.c (PREPARE_LOOP): Minor cleanups to make code - better readable. Avoid passing var to loop function, it's not - necessary at all. + * math/complex.h [__LDBL_COMPAT]: Use __REDIRECT_NTH. -2005-08-07 Ulrich Drepper +2006-05-12 Jakub Jelinek - * elf/elf.h (DT_ALPHA_PLTRO): Use symbolic name in DT_ALPHA_PLTRO - definition. + * sysdeps/unix/sysv/linux/sched_getaffinity.c: Include sys/param.h. + (__sched_getaffinity_new): Don't crash if cpusetsize is smaller than + sizeof (cpu_set_t). -2005-08-05 Ulrich Drepper +2006-05-11 Ulrich Drepper - * timezone/checktab.awk: Update from tzcode2005k. - * timezone/private.h: Likewise. - * timezone/scheck.c: Likewise. - * timezone/tzselect.ksh: Likewise. - * timezone/zdump.c: Likewise. - * timezone/zic.c: Likewise. - * timezone/africa: Update from tzdata2005k. - * timezone/antarctica: Likewise. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/europe: Likewise. - * timezone/iso3166.tab: Likewise. - * timezone/leapseconds: Likewise. - * timezone/northamerica: Likewise. - * timezone/solar87: Likewise. - * timezone/solar88: Likewise. - * timezone/solar89: Likewise. - * timezone/southamerica: Likewise. - * timezone/zone.tab: Likewise. + * resolv/res_debug.c (loc_ntoa): Define error as array, not pointer. -2005-08-05 Roland McGrath + * include/arpa/nameser.h: Declare _ns_flagdata as hidden. - [BZ #1251] - * mach/shortcut.awk: Ignore `weak_alias' lines. - Reported by Alfred M. Szmidt . + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_master. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_master. - [BZ #1250] - * sysdeps/mach/hurd/mig-reply.c (reply_port): Don't use ?: as lvalue. - Reported by Alfred M. Szmidt . + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypbind_resp. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypbind_resp. -2005-08-03 Dwayne Grant McConnell + * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_cback_data. + * include/rpcsvc/nis_callback.h: Add libnsl_hidden_proto for + xdr_cback_data. - * sysdeps/powerpc/powerpc32/Makefile (CFLAGS-initfini.s): - Use +=, not =, to append. Remove duplicate flags. - * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-initfini.s): - Likewise. Fix comments. + * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypupdate_args. + * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for + xdr_ypupdate_args. -2005-08-01 Ulrich Drepper + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_order. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_order. - * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Restart system - call if it returned EINTR. + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_maplist. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_maplist. -2005-07-31 Ulrich Drepper + * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_obj_p. + * include/rpcsvc/nis_callback.h: New file. - * sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Move - helper variable into .data.rel.ro. Simplify the code. Extend - comment to explain prelinking. + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_val. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_val. -2005-07-31 Andreas Jaeger + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey. - * include/bits/syslog.h: New file. + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypmaplist. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypmaplist. -2005-07-30 Ulrich Drepper + * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey. + * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey. - * elf/dl-load.c [__WORDSIZE==64] (FILEBUF_SIZE): Adjust the value - up. We have more program header entries now and the note section - was normally not loaded. + * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypdelete_args. + * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for + xdr_ypdelete_args. - * nis/nis_subr.c: Some minor code cleanups. + * nis/nis_xdr.h: Mark all functions as hidden. Remove + __BEGIN_DECLS and __END_DECLS, the header is not installed. -2005-07-29 Ulrich Drepper + * nis/nis_error.c: Remove table of strings. Use position + independent mechanism. + * nis/nis_error.h: New file. - * misc/bits/syslog.h: New file. - * misc/sys/syslog.h: Include for fortification. - * misc/Makefile (headers): Add bits/syslog.h. - * include/sys/syslog.h: Add __vsyslog_chk prototype and hidden_proto. - * sysdeps/generic/syslog.c: Change vsyslog function to __vsyslog_chk. - Call __vfprintf_chk if necessary. Make vsyslog a wrapper. Add - __syslog_chk. - * misc/Versions: Export __syslog_chk and __vsyslog_chk. +2006-05-11 Jakub Jelinek -2005-07-28 Thomas Schwinge + * locale/programs/ld-time.c (time_finish): If wide era name or + format aren't provided, set both wname and wformat to L"". - [BZ #1137] - * misc/error.c [_LIBC]: Include and . +2006-05-10 Ulrich Drepper -2005-07-28 Ulrich Drepper + * sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Only store + results if the call was succesful. - * nis/nis_xdr.c: Help gcc to avoid generating unnecessary wrapper - functions. + * nis/nss-nis.h: Mark __yperr2nss_tab and __yperr2nss_count as hidden. -2005-07-28 Jakub Jelinek + * nis/nss-nisplus.h: Mark __niserr2nss_tab and __niserr2nss_count + as hidden. - * stdio-common/fxprintf.c (__fxprintf): Add INTUSE to _IO_vfprintf - call. - * gmon/gmon.c (write_gmon): Use __snprintf rather than snprintf. +2006-05-10 Jakub Jelinek -2005-07-28 Ulrich Drepper + * misc/sys/queue.h: Remove uses of all QUEUEDEBUG_* macros. - * nis/nis_file.c: Rewrite the two pairs of functions into wrappers - around a pair of new, generalized functions. 22% size reduction. +2006-05-10 Ulrich Drepper -2005-07-27 Ulrich Drepper + * posix/wordexp.c (parse_glob): No need to check ifs for NULL, the + caller makes sure this is not the case. + (wordexp): Simplify ifs_white creation. [Coverity CID 231] - * nis/nis_xdr.c: Remove unnecessary cast which might hide bugs. - Rearrange code. This reduces the code size 10%. +2006-05-09 Ulrich Drepper -2005-07-26 Jakub Jelinek + * posix/wordexp.c: Remove numerous NULL pointer tests before FREE + calls. - * misc/error.c (error_tail): Fix a comment typo. + * io/ftw.c (open_dir_stream): Return right away if REALLOC fails. + [Coverity CID 229, 230] -2005-07-25 Ulrich Drepper + * argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and + DGETTEXT calls. + (hol_help): Likewise. [Coverity CID 226, 227] - * po/zh_TW.po: Update from translation team. + * string/argz-replace.c (__argz_replace): Unconditionally call + free on SRC. [Coverity CID 225] - * debug/mbstowcs_chk.c: New file. - * debug/wcstombs_chk.c: New file. - * debug/Makefile (routines): Add mbstowcs_chk and wcstombs_chk. - * debug/Versions: Add __mbstowcs_chk and __wcstombs_chk. - * stdlib/bits/stdlib.h: Add definitions for mbstowcs and wcstombs. + * nis/nis_creategroup.c (nis_creategroup): No need to duplicate + the return value of __nis_default_owner and __nis_default_group, + it has been especially allocated. [Coverity CID 224] - * wcsmbs/bits/wchar2.h (mbsrtowcs): Pretty printing. + * nis/nis_defaults.c (searchXYX): New functions. Used by both + searchgroup and searchowner. Significantly simplified. + (__nis_default_owner): Remove duplication. Do not locally copy the + string before duplicating it. + (__nis_default_group): Likewise. -2005-07-24 Ulrich Drepper + * nis/nis_lookup.c (nis_lookup): After calling nis_free_directory, + we must clear the variable before calling __nisfind_server. - * string/test-memset.c (test_main): Use negative byte value in - test. + * nis/nis_lookup.c (nis_lookup): Always free memory allocated with + nis_getnames. [Coverity CID 223] - * string/test-memset.c (do_one_test): Compare effect of call, not - only return value. - Add a few casts to avoid warnings. + * locale/programs/locfile.c (locfile_read): Use alloca instead of + xmalloc to allocate local repertoire name. [Coverity CID 222] -2005-07-24 SUGIOKA Toshinobu + * iconv/iconv_charmap.c (use_to_charmap): No need to dynamically + allocate memory for the input to add_bytes. [Coverity CID 221] - * sysdeps/sh/memset.S (memset): Correct 2nd argument handling. + * posix/wordexp.c (w_addword): Free word if realloc fails and it + was allocated here. [Coverity CID 219, 220] -2005-07-24 Ulrich Drepper + * posix/getconf.c (print_all): Free confstr data after printing. + [Coverity CID 218] - [BZ #1125] - * posix/Makefile (tests): Add tst-execvp4. - * posix/tst-execvp4.c: New file. + * sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if + list allocation fails. [Coverity CID 215] -2005-07-24 Jakub Jelinek + * nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition. + [Coverity CID 213] - [BZ #1125] - * posix/execvp.c (execvp): Change path_malloc to - char *, free that pointer on failure. + * argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if + string is NULL. [Coverity CID 212] + * argp/Makefile: Add rules to build and run bug-argp1. + * argp/bug-argp1.c: New file. -2005-07-24 Ulrich Drepper + * io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find + end of string. + * stdlib/canonicalize.c (__realpath): Likewise. - * wcsmbs/bits/wchar2.h: Use __FILE not FILE. - * wcsmbs/Makefile: Add rules to build and run tst-wchar-h. - * wcsmbs/tst-wchar-h.c: New file. + * locale/programs/ld-time.c (time_finish): Don't dereference NULL + pointer. [Coverity CID 206] -2005-07-22 Ulrich Drepper + * elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map + in statically linked code. + * elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in + statically built code, be prepared to have no link map. + [Coverity CID 205] - * stdio-common/fxprintf.c (__fxprintf): Define variable more local. + * argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in + dgettext calls. [Coverity CID 204] -2005-07-22 Jakub Jelinek + * argp/argp-help.c (struct uparams): Remove valid member. Change + the one user. + (uparam_names): Reduce size. Avoid relative relocations. + Moved to read-only segment. + (fill_in_uparams): Update for new layout. - * wcsmbs/bits/wchar2.h (__vfwprintf_chk, __vwprintf_chk): Use - __gnuc_va_list rather than _G_va_list. + * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be + assumed to always be != NULL. [Coverity CID 202] -2005-07-22 Roland McGrath + * argp/argp-help.c (hol_entry_help): Remove some dead code + [Coverity CID 200]. - [BZ #869] - * Makerules ($(objpfx)stubs): Fix last change. + * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize + away a few more unconditional yperr2nss calls. + (_nss_nis_getservbyname_r): Likewise. -2005-07-21 Roland McGrath +2006-05-06 Ulrich Drepper - * nscd/Makefile ($(objpfx)nscd): Pass $(nscd-cflags) to $(LINK.o). + * sysdeps/generic/ldsodefs.h: Remove support for non-core + architectures. - * stdlib/Makefile (headers): Move bits/wchar.h to ... - * wcsmbs/Makefile (headers): ... here. Add bits/wchar2.h too. + * sysdeps/unix/sysv/linux/check_pf.c (make_request): Make sure + that unused memory passed to sendto is nevertheless initialized. -2005-07-21 Jakub Jelinek + [BZ #2499] + * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Avoid + possibly unaligned memory accesses. - * wcsmbs/bits/wchar2.h (swprintf): Remove format argument. - * debug/tst-chk1.c (do_test): Add test for swprintf with format - being the last argument. + * include/arpa/nameser.h: Also optimize NS_PUT16 and NS_PUT32. + * resolv/res_mkquery.c: Use NS_PUT16 and NS_PUT32 instead of __putshort + and __putlong respectively. Correct buffer overflow check for + NS_NOTIFY_OP. -2005-07-21 Thorsten Kukuk + * resolv/res_send.c (send_vc): Use ns_put16 instead of putshort. - * debug/getgroups_chk.c (__getgroups_chk): Fix return value. + * resolv/res_send.c (res_queriesmatch): Fix typo in comment. + (send_dg): Rewrite error handling to be more compact and avoid + double recomputation of timeouts. Pass MSG_NOSIGNAL to send. - * stdio-common/fxprintf.c: Include string.h. + * include/arpa/nameser.h: Add optimizations for NS_GET16 and NS_GET32. -2005-07-20 Ulrich Drepper + * resolv/res_send.c (res_nameinquery): Use NS_GET16 directly + instead of ns_get16. + (res_queriesmatch): Likewise. Minor optimization. - [BZ #1138] - * sysdeps/x86_64/fpu/libm-test-ulps: Adjust expected atan2f results. - * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. + [BZ #2499] + * resolv/res_query.c (__libc_res_nquery): If answerp != NULL, + __libc_res_nsend might reallocate the buffer for the answer. In + this case we have to reload the HP pointer. -2005-07-20 Bob Wilson - Darin Petkov +2006-05-05 Ulrich Drepper - [BZ #1138] - * sysdeps/ieee754/flt-32/e_atan2f.c (pi_lo): Correct exponent value. + * stdio-common/vfscanf.c (memory_error): Remove definition. Add + some branch prediction hints. -2005-07-20 Jakub Jelinek + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Define SPLICE_F_*. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. - * include/stdio.h (__fxprintf): Remove wfmt argument. - * stdio-common/fxprintf.c: Include assert.h, ctype.h and wchar.h. - (__fxprintf): Remove wfmt argument, create wfmt format string on - the fly from fmt. - * argp/argp-fmtstream.c: Adjust all __fxprintf callers. - * argp/argp-help.c: Likewise. - * assert/assert-perr.c: Likewise. - * assert/assert.c: Likewise. - * gmon/gmon.c: Likewise. - * inet/rcmd.c: Likewise. - * malloc/obstack.c: Likewise. - * misc/error.c: Likewise. - * misc/getpass.c: Likewise. - * posix/getopt.c: Likewise. - * resolv/res_hconf.c: Likewise. - * stdio-common/perror.c: Likewise. - * stdio-common/psignal.c: Likewise. - * stdlib/fmtmsg.c: Likewise. - * sunrpc/auth_unix.c: Likewise. - * sunrpc/clnt_perr.c: Likewise. - * sunrpc/clnt_tcp.c: Likewise. - * sunrpc/clnt_udp.c: Likewise. - * sunrpc/clnt_unix.c: Likewise. - * sunrpc/svc_simple.c: Likewise. - * sunrpc/svc_tcp.c: Likewise. - * sunrpc/svc_udp.c: Likewise. - * sunrpc/svc_unix.c: Likewise. - * sunrpc/xdr.c: Likewise. - * sunrpc/xdr_array.c: Likewise. - * sunrpc/xdr_rec.c: Likewise. - * sunrpc/xdr_ref.c: Likewise. - * sysdeps/generic/wordexp.c: Likewise. - -2005-07-20 Ulrich Drepper - - * wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs, - wcsrtombs, mbsnrtowcs, and wcsnrtombs. - * debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk, - wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk. - * debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk, - __wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk. - * debug/tst-chk1.c: Add tests for new functions. - * debug/mbsnrtowcs_chk.c: New file. - * debug/mbsrtowcs_chk.c: New file. - * debug/wcrtomb_chk.c: New file. - * debug/wcsnrtombs_chk.c: New file. - * debug/wcsrtombs_chk.c: New file. - -2005-07-19 Ulrich Drepper - - * stdio-common/Makefile (aux): Add fxprintf. - * stdio-common/fxprintf.c: New file. - * include/stdio.h: Add declaration for __fxprintf. - * argp/argp-fmtstream.c: Use __fxprintf instead of inline stream - orientation test and two separate function calls. - * argp/argp-help.c: Likewise. - * assert/assert-perr.c: Likewise. - * assert/assert.c: Likewise. - * gmon/gmon.c: Likewise. - * inet/rcmd.c: Likewise. - * malloc/obstack.c: Likewise. - * misc/error.c: Likewise. - * misc/getpass.c: Likewise. - * posix/getopt.c: Likewise. - * resolv/res_hconf.c: Likewise. - * stdio-common/perror.c: Likewise. - * stdio-common/psignal.c: Likewise. - * stdlib/fmtmsg.c: Likewise. - * sunrpc/auth_unix.c: Likewise. - * sunrpc/clnt_perr.c: Likewise. - * sunrpc/clnt_tcp.c: Likewise. - * sunrpc/clnt_udp.c: Likewise. - * sunrpc/clnt_unix.c: Likewise. - * sunrpc/svc_simple.c: Likewise. - * sunrpc/svc_tcp.c: Likewise. - * sunrpc/svc_udp.c: Likewise. - * sunrpc/svc_unix.c: Likewise. - * sunrpc/xdr.c: Likewise. - * sunrpc/xdr_array.c: Likewise. - * sunrpc/xdr_rec.c: Likewise. - * sunrpc/xdr_ref.c: Likewise. - * sysdeps/generic/wordexp.c: Likewise. - - [BZ #1137] - * misc/Makefile: Add rules to build and run tst-error1. - * misc/tst-error1.c: New file. - * misc/error.c: Fix memory leak and possibly endless loop. - - * configure.in: Check for -fstack-protector gcc option. - * config.make.in (have-ssp): Add template. - * nscd/Makefile (nscd-cflags): Add -fstack-protector if supported. - - * nscd/nscd.c (main): Don't ignore result of chdir call. - -2005-07-18 Roland McGrath - - [BZ #869] - * Makerules ($(objpfx)stubs): Do cd into $(objdir) to reduce size of - objdump command line. - -2005-07-18 Ulrich Drepper - - * nscd/Makefile (nscd-cflags): Add _FORTIFY_SOURCE. - - * nscd/connections.c: Fix a few wur warnings. - - [BZ #1113] - * nscd/grpcache.c (cache_addgr): Use correct maximum for group ID - length. Patch by Ivan Gyurdiev . - - * debug/confstr_chk.c: New file. - * debug/getdomainname_chk.c: New file. - * debug/getgroups_chk.c: New file. - * debug/gethostname_chk.c: New file. - * debug/getlogin_r_chk.c: New file. - * debug/ttyname_r_chk.c: New file. - * posix/bits/unistd.h: Add definitions for new debug versions. - * debug/tst-chk1.c: Add tests for new functions. - * debug/Versions: Export new functions. - * debug/Makefile (routines): Add new files. - - * stdlib/bits/stdlib.h: Fix typo. - -2005-07-13 Thorsten Kukuk - - * manual/Makefile (libc/index.html): Depend on dir-add.texi. - -2005-07-15 Ulrich Drepper - - * stdlib/bits/stdlib.h: Use __REDIRECT_NTH instead of __REDIRECT - where necessary. - * wcsmbs/bits/wchar2.h: Likewise. - -2005-07-15 Andreas Jaeger - - * debug/Makefile (tst-lfschk3-ENV): New, set locale. - (tst-lfschk2-ENV): New. - (tst-lfschk1-ENV): New. - (tst-chk3-ENV): New. - (tst-chk2-ENV): New. - (tst-chk1-ENV): New. - - [BZ #1079] - * include/stdlib.h: Remove malloc attribute from __posix_memalign. - * stdlib/stdlib.h: Likewise. - -2005-07-15 Ulrich Drepper - - * wcsmbs/bits/wchar2.h: New file. - * include/bits/wchar2.h: New file. - * wcsmbs/wchar.h: Include if fortification is - requested. - * wcsmbs/wcsncpy.c: Add __wcsncpy alias. - * string/bits/string3.h: Add fortified stpncpy definitions. - * sysdeps/generic/stpncpy_chk.c: New file. - * libio/vswprintf.c: Move _IO_wstrnfile definition to strfile.h. - Export _IO_wstrn_jumps. - * libio/strfile.h: Define _IO_wstrnfile and declare _IO_wstrn_jumps. - * include/wchar.h: Declare __wcsncpy and __vswprintf_chk. - * debug/fgetws_chk.c: New file. - * debug/fgetws_u_chk.c: New file. - * debug/fwprintf_chk.c: New file. - * debug/swprintf_chk.c: New file. - * debug/vfwprintf_chk.c: New file. - * debug/vswprintf_chk.c: New file. - * debug/vwprintf_chk.c: New file. - * debug/wcpcpy_chk.c: New file. - * debug/wcpncpy_chk.c: New file. - * debug/wcscat_chk.c: New file. - * debug/wcscpy_chk.c: New file. - * debug/wcsncat_chk.c: New file. - * debug/wcsncpy_chk.c: New file. - * debug/wmemcpy_chk.c: New file. - * debug/wmemmove_chk.c: New file. - * debug/wmempcpy_chk.c: New file. - * debug/wmemset_chk.c: New file. - * debug/wprintf_chk.c: New file. - * debug/tst-chk1.c: Add tests for new functions. - * debug/Versions: Export new functions. - * debug/Makefile (routines): Add new functions. - -2005-07-13 Ulrich Drepper - - * nscd/nscd_helper.c: Add a few __builtin_expect. - - [BZ #1080] - * nscd/connections.c (send_ro_fd): Make sure BUF is aligned correctly. - * nscd/nscd_helper.c (wait_on_socket): New function. - (get_mapping): Use wait_on_socket instead of poll. The former handles - EINTR of poll correctly. - (__nscd_open_socket): Likewise. - (get_mapping): Make sure BUF is aligned correctly. - (get_mapping): Use munmap on correct pointer. - -2005-07-12 Ulrich Drepper - - * include/libc-symbols.h: Define macros for librt hidden symbols. - * include/time.h: Add librt_hidden_proto definition for clock_gettime. - * sysdeps/generic/clock_gettime.c: Add librt_hidden_def. - * sysdeps/unix/clock_gettime.c: Likewise. - - * stdlib/bits/stdlib.h: New file. - * stdlib/stdlib.h: Include if fortification is - requested. - * Makefile (headers): Add bits/stdlib.h. - * include/bits/stdlib.h: New file. - * debug/Depend: New file. - * debug/ptsname_r_chk.c: New file. - * debug/realpath_chk.c: New file. - * debug/wctomb_chk.c: New file. - * debug/Makefile (routines): Add ptsname_r_chk, realpath_chk, and - wctomb_chk. - * debug/Versions: Export __ptsname_r_chk, __realpath_chk, and - __wctomb_chk. - * debug/tst-chk1.c: Add tests for __ptsname_r_chk, __realpath_chk, and - __wctomb_chk. - -2005-07-12 Jakub Jelinek - - [BZ #1106] - * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: Include not-cancel.h. - (has_cpuclock): Use open_not_cancel_2 instead of open, read_not_cancel - instead of read and close_not_cancel_no_status instead of close. - - [BZ #1106] - * sysdeps/s390/s390-64/bcopy.S (__bcopy): Use - HIDDEN_BUILTIN_JUMPTARGET to jump to memmove. - -2005-06-27 Carlos O'Donell - - * posix/regcomp.c (re_compile_internal): Call __libc_lock_init - after init_dfa. - -2005-07-08 Ulrich Drepper - - * sysdeps/x86_64/fpu/s_sincosl.S: Use retq not ret. Remove - alignment. - * sysdeps/x86_64/fpu/s_sincos.S: New file. - - * include/fenv.h: Add libm_hidden_proto for fesetround and - feholdexcept. - * sysdeps/alpha/fpu/feholdexcpt.c: Add libm_hidden_def. - * sysdeps/alpha/fpu/fesetround.c: Likewise. - * sysdeps/generic/feholdexcpt.c: Likewise. - * sysdeps/generic/fesetround.c: Likewise. - * sysdeps/i386/fpu/feholdexcpt.c: Likewise. - * sysdeps/i386/fpu/fesetround.c: Likewise. - * sysdeps/ia64/fpu/feholdexcpt.c: Likewise. - * sysdeps/ia64/fpu/fesetround.c: Likewise. - * sysdeps/powerpc/fpu/feholdexcpt.c: Likewise. - * sysdeps/powerpc/fpu/fesetround.c: Likewise. - * sysdeps/s390/fpu/feholdexcpt.c: Likewise. - * sysdeps/s390/fpu/fesetround.c: Likewise. - * sysdeps/sh/sh4/fpu/feholdexcpt.c: Likewise. - * sysdeps/sh/sh4/fpu/fesetround.c: Likewise. - * sysdeps/sparc/fpu/feholdexcpt.c: Likewise. - * sysdeps/sparc/fpu/fesetround.c: Likewise. - * sysdeps/x86_64/fpu/feholdexcpt.c: Likewise. - * sysdeps/x86_64/fpu/fesetround.c: Likewise. - * sysdeps/generic/s_significand.c (__significand): Use __ilogb not - ilogb. - * sysdeps/generic/s_significandf.c (__significandf): Use __ilogbf - not ilogbf. - * sysdeps/ieee754/dbl-64/s_sincos.c (__sincos): Use __sin and - __cos, not sin and cos. - -2005-07-07 Ulrich Drepper - - * resolv/res_send.c (send_dg): Recognize referral results and - treat them as server errors. - Based on a patch by Jason Vas Dias . - -2005-07-08 Carlos O'Donell - - * sysdeps/hppa/setjmp.S (__sigsetjmp): Use %r1 not %r19. - - * sysdeps/hppa/add_n.s (__mpn_add_n): Use sr0 or r0, not 0. - * sysdeps/hppa/lshift.s (__mpn_lshift): Likewise. - * sysdeps/hppa/rshift.s (__mpn_rshift): Likewise. - * sysdeps/hppa/sub_n.s (__mpn_sub_n): Likewise. - * sysdeps/hppa/udiv_qrnnd.s (__udiv_qrnnd): Likewise. - * sysdeps/hppa/hppa1.1/udiv_qrnnd.s (__udiv_qrnnd): Likewise. - -2005-07-07 Ulrich Drepper - - * sysdeps/generic/s_ctanh.c (__ctanh): Handle case of zero den better. - * sysdeps/generic/s_ctanhf.c (__ctanhf): Likewise. - * sysdeps/generic/s_ctanhl.c (__ctanhl): Likewise. - * sysdeps/generic/s_ctan.c (__ctan): Likewise. - * sysdeps/generic/s_ctanf.c (__ctanf): Likewise. - * sysdeps/generic/s_ctanl.c (__ctanl): Likewise. - -2005-04-13 H.J. Lu - - [BZ #974] - * csu/elf-init.c (__preinit_array_start): Take int, char **, char **. - (__preinit_array_end): Likewise. - (__init_array_start): Likewise. - (__init_array_end): Likewise. - (__libc_csu_init): Take int argc, char **argv, char **envp. - Call preinit_array and init_array with argc, argv, envp. - * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Remove - INIT_MAIN_ARGS. - * sysdeps/powerpc/elf/libc-start.c (INIT_MAIN_ARGS): Removed. - * elf/Makefile (distribute): Add tst-array5.c, tst-array5-static.c, - tst-array5dep.c, and tst-array5.exp. - (tests): Add tst-array5. - (tests-static): Add tst-array5-static. - ($(objpfx)tst-array5): New target. - ($(objpfx)tst-array5.out): Likewise. - ($(objpfx)tst-array5-static.out): Likewise. - * elf/tst-array5-static.c: New file. - * elf/tst-array5-static.exp: Likewise. - * elf/tst-array5.c: Likewise. - * elf/tst-array5.exp: Likewise. - * elf/tst-array5dep.c: Likewise. - -2005-07-07 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/sched.h: Adjust clone prototype. - -2005-07-05 Jakub Jelinek - - * elf/stackguard-macros.h (STACK_CHK_GUARD): Fix s390/s390x definition. - Reported by Ulrich Weigand . - - * elf/stackguard-macros.h (STACK_CHK_GUARD): Add ia64 definition. - -2005-07-06 Ulrich Drepper - - * elf/dl-error.c (_dl_signal_error): When testing for executable - being relocated, take into account that nothing might even be loaded. - - * elf/dl-reloc.c [PROF] (_dl_relocate_object): Define - consider_profiling always to zero. Don't count of compiler to - remove unreached if block. - * sysdeps/x86_64/dl-trampoline.S [PROF] (_dl_runtime_profile): - Don't compile. - * sysdeps/i386/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. - * sysdeps/ia64/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. - * sysdeps/s390/s390-64/dl-trampoline.S [PROF] (_dl_runtime_profile): - Likewise. - * sysdeps/s390/s390-32/dl-trampoline.S [PROF] (_dl_runtime_profile): - Likewise. - * sysdeps/powerpc/powerpc64/dl-trampoline.S [PROF] - (_dl_profile_resolve): Likewise. - * sysdeps/powerpc/powerpc32/dl-trampoline.S [PROF] - (_dl_profile_resolve): Likewise. - * gmon/Makefile: Add rules to build and run tst-profile-static. - * gmon/tst-profile-static.c: New file. - * Makeconfig (+link-static): Allow passing program-specific flags. - -2005-07-05 Thorsten Kukuk - - [BZ #1111] - * nis/nss_compat/compat-grp.c (internal_getgrgid_r): Check if NSS - module provides getgrgid_r. - (getgrnam_plusgroup): Preserve original return value. - * nis/nss_compat/compat-pwd.c (getpwnam_plususer): Preserve - original return value. - * nis/nss_compat/compat-spwd.c (getspnam_plususer): Likewise. - -2005-07-05 Ulrich Drepper - - [BZ #1101] - * posix/regex_internal.c (build_wcs_buffer): Use MB_LEN_MAX not - MB_CUR_MAX. - (build_wcs_upper_buffer): Likewise. - - * csu/elf-init.c (__libc_csu_fini): Pretty printing. - -2005-07-02 Roland McGrath - - * NEWS: Note LinuxThreads removal. - * manual/install.texi (Installation): Don't mention linuxthreads. - (Configuring and compiling): Don't use linuxthreads as example. - - * sysdeps/unix/sysv/linux/configure.in: Check for nptl add-on only, - not linuxthreads. - * sysdeps/unix/sysv/linux/configure: Regenerated. - * resolv/Depend: Add nptl. - * rt/Depend: Likewise. - - * linuxthreads, linuxthreads_db: Directories removed (preserved in - ports repository). - -2005-06-27 Jakub Jelinek - - [BZ #1037] - * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: -mv8 is deprecated, - use -mcpu=v8. - -2005-06-16 Jakub Jelinek - - [BZ #1016] - * sysdeps/ia64/strlen.S (strlen): Change l2 into a local label. - -2005-06-23 Thorsten Kukuk - - [BZ #1109] - * nscd/nscd_stat.c (receive_print_stats): Replace YESSTR/NOSTR - with own translation. - -2005-06-25 Jakub Jelinek - - [BZ #1097] - * sunrpc/xdr.c (xdr_hyper, xdr_u_hyper): When decoding, cast - t2 to uint32_t instead of ulong. - * sunrpc/Makefile (tests): Add tst-xdrmem. - * sunrpc/tst-xdrmem.c: New test. - - * Versions.def (ld): Add GLIBC_2.4. - * configure.in: Add --enable-stackguard-randomization option. - (ENABLE_STACKGUARD_RANDOMIZE): New define. - * config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add. - * sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h. - (_dl_setup_stack_chk_guard): New inline function. - * sysdeps/generic/dl-osinfo.h: Include stdint.h. - (_dl_setup_stack_chk_guard): New inline function. - * elf/rtld.c (__stack_chk_guard): New variable. - (dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE. - Set __stack_chk_guard to _dl_setup_stack_chk_guard (), - use THREAD_SET_STACK_GUARD if defined. - * elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4. - * sysdeps/generic/libc-start.c (__stack_chk_guard): New variable. - (__libc_start_main): Set __stack_chk_guard to - _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. - * sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all - traces of TLS_INIT_TP_EXPENSIVE. - * debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4. - * debug/Makefile (routines): Add stack_chk_fail. - (static-only-routines): Add stack_chk_fail_local. - * debug/stack_chk_fail_local.c: New file. - * debug/stack_chk_fail.c: New file. - * elf/Makefile: Add rules to build and run tst-stackguard1{,-static} - tests. - * elf/tst-stackguard1.c: New file. - * elf/tst-stackguard1-static.c: New file. - * elf/stackguard-macros.h: New file. - -2005-06-21 Ulrich Drepper - - * resource/Makefile (tests): Add tst-getrlimit. - * resource/tst-getrlimit.c: New file. - - * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_RTPRIO): Fix typo. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. - -2005-06-20 Ulrich Drepper - - * nscd/nscd.init: Get more in line with lsb3. - * nscd/nscd.c: Adjust some error codes to fit in better with lsb3. - * nscd/connections.c: Likewise. - -2005-06-20 Jakub Jelinek - - [BZ #653] - * sysdeps/unix/sysv/linux/sys/quota.h: Add definitions and types for - _LINUX_QUOTA_VERSION >= 2. - (_LINUX_QUOTA_VERSION): Define if not yet defined. - - * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_NICE, - RLIMIT_RTPRIO): Add. - (RLIMIT_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_NICE, - RLIMIT_RTPRIO): Add. - (RLIMIT_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_NICE, - RLIMIT_RTPRIO): Add. - (RLIMIT_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_NICE, - RLIMIT_RTPRIO): Add. - (RLIMIT_NLIMITS): Adjust. - -2005-06-17 Ulrich Drepper - - [BZ #1106] - * time/mktime.c: Always include for prototype of - implicitly used memcpy. - - [BZ #1104] - * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c - (truncate64): Use __truncate, not truncate. - (__have_no_truncate64): Renamed from have_no_truncate64. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c - (__have_no_truncate64): Renamed from have_no_truncate64. - - * sysdeps/powerpc/fpu/libm-test-ulps: Adjust ulps for complex - float functions for gcc 4. - -2005-06-10 Jakub Jelinek - - * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_runtime_setup): - Handle prelinked libraries and binaries with new style PLT. - -2005-06-07 Jakub Jelinek - - * elf/elf.h (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, - R_PPC_REL16_HA): Define. - -2005-06-14 Alan Modra - - * config.h.in (HAVE_ASM_PPC_REL16): Add. - * elf/elf.h (DT_PPC_GOT, DT_PPC_NUM): Define. - * elf/tls-macros.h (PowerPC32): Include config.h. Add variants of - TLS_IE, TLS_LD and TLS_GD for new PLT/GOT layout. - * sysdeps/powerpc/powerpc32/configure.in: New file, - * sysdeps/powerpc/powerpc32/dl-dtprocnum.h: New file. - * sysdeps/powerpc/powerpc32/dl-machine.h (DT_PPC): Define. - (ppc_got): New inline function. - (elf_machine_dynamic): Use ppc_got. Add attribute const. - (elf_machine_load_address): Add attribute const. Don't use int vars. - Use bcl rather than bl to save trashing branch target stack. Use - elf_machine_dynamic rather than duplicating code here. - (elf_machine_runtime_setup): New inline function replacing define. - Handle new PLT. - (elf_machine_fixup_plt): Handle new PLT. - (elf_machine_rela): Likewise. - * sysdeps/powerpc/powerpc32/sysdep.h: Include config.h. - (CALL_MCOUNT): Don't set up counter vars. - * sysdeps/powerpc/powerpc32/ppc-mcount.S: Correct comment. - * sysdeps/powerpc/powerpc32/elf/start.S (start_addressesp): Don't - define when HAVE_ASM_PPC_REL16. - (_start): Add HAVE_ASM_PPC_REL16 code. - * sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Don't bl - into the GOT when HAVE_ASM_PPC_REL16. - * sysdeps/powerpc/powerpc32/memset.S (memset): Likewise. - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Ditto. - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S (__ceil): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S (__ceilf): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S (__floor): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_floorf.S (__floorf): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S (__lround): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S (__rint): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_rintf.S (__rintf): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_round.S (__round): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S (__roundf): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S (__trunc): Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S (__truncf): Likewise. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S (__sigsetjmp): - Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S (__brk): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S - (__getcontext): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S - (__setcontext): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S - (__swapcontext): Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (stackblock): - Comment. - (__socket): Bomb if NARGS >= 7. Invoke CGOTSETUP and CGOTRESTORE. - -2005-06-17 Ulrich Drepper - - [BZ #1106] - * sysdeps/posix/sigignore.c: Include to tell the compiler - to use __GI_memset. - * sysdeps/posix/signal.c: Likewise. - * sysdeps/posix/sigset.c: Likewise. - * sysdeps/posix/sysv_signal.c: Likewise. - * sysdeps/unix/sysv/linux/sleep.c: Likewise. - * sysdeps/unix/sysv/linux/sysctl.c: Likewise. - * sysdeps/unix/sysv/linux/system.c: Likewise. - -2005-06-15 Jakub Jelinek - - [BZ #1088] - * hesiod/hesiod.c (hesiod_init): Don't check for ctx->classes[0] == 0 - or both classes equal here. - (parse_config_file): If both classes are equal, clear the second one. - -2005-06-08 Karl Kelley - - [BZ #1088] - * hesiod/hesiod_p.h (struct hesiod_p): Add classes array. - * hesiod/hesiod.c (hesiod_init): Initialize classes. Fail if no - valid classes were given or if both are equal. - (hesiod_resolve): Use ctx->classes instead of hardcoded C_IN - and C_HS order. - (parse_config_file): Handle classes keyword. - * hesiod/README.hesiod: Mention addition of the classes keyword. - -2005-06-14 Ulrich Drepper - - [BZ #1085] - * configure.in: Add test for availability of libaudit. - * config.h.in: Define HAVE_LIBAUDIT. - * config.make.in: Define have-libaudit. - * nscd/Makefile: If libaudit is available, link nscd with it. - * nscd/selinux.c: If HAVE_LIBAUDIT is defined, log using libaudit. - Patch by Steve Grubb . - - * debug/pread64_chk.c: Use __libc_pread64 instead of __pread64. - * sysdeps/posix/posix_fallocate64.c: Likewise. - * include/string.h: Use libc_hidden_proto for strnlen. - * sysdeps/generic/strnlen.c: Add libc_hidden_def. - * include/libintl.h: Use libc_hidden_proto for __dcgettext. - * intl/dcgettext.c: Add libc_hidden_def. - * include/execinfo.h: Add libc_hidden_proto for __backtrace and - __backtrace_symbols_fd. - * sysdeps/generic/backtrace.c: Add libc_hidden_def. - * sysdeps/generic/backtracesymsfd.c: Likewise. - * sysdeps/generic/elf/backtracesymsfd.c: Likewise. - * sysdeps/i386/backtrace.c: Likewise. - * sysdeps/ia64/backtrace.c: Likewise. - * sysdeps/powerpc/powerpc32/backtrace.c: Likewise. - * sysdeps/powerpc/powerpc64/backtrace.c: Likewise. - * sysdeps/s390/s390-32/backtrace.c: Likewise. - * sysdeps/s390/s390-64/backtrace.c: Likewise. - -2005-06-13 Ulrich Drepper - - * sysdeps/unix/clock_gettime.c (clock_gettime): Implement case - where HANDLED_REALTIME is not defined. [BZ #966] - -2005-06-13 Jakub Jelinek - - [BZ #1096] - * sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_sendreq, - __netlink_receive): Remove prototypes. - (__netlink_request): New prototype. - * sysdeps/unix/sysv/linux/ifaddrs.c: Include and - . - (__netlink_sendreq): Make static. - (__netlink_receive): Rename to... - (__netlink_request): ... this. Add type argument, call - __netlink_sendreq. If MSG_TRUNC is set after recvmsg, retry - with a bigger buffer. Don't record buffers that contain no - messages we are expecting. - (getifaddrs): Use __netlink_request instead of __netlink_sendreq - and __netlink_receive pairs. Formatting. - * sysdeps/unix/sysv/linux/if_index.c (if_nameindex_netlink): Use - __netlink_request instead of __netlink_sendreq and __netlink_receive - pair. - -2005-06-13 Thorsten Kukuk - - * sysdeps/unix/sysv/linux/netinet/if_tr.h: Don't include kernel - headers, instead copy important structs/defines. - -2005-06-13 Jakub Jelinek - - * elf/rtld.c (dl_main): Move DT_DEBUG setup before first - _dl_debug_state call. - -2005-06-12 Ulrich Drepper - - * elf/dl-error.c (_dl_signal_error): Store information about use of - real malloc in the catch object. - (_dl_catch_error): Forward information about malloc use to caller - in new parameter. - (_dl_out_of_memory): Make static. - * elf/dl-deps.c: Adjust callers of _dl_catch_error. - * elf/dl-libc.c: Likewise. - * elf/dl-open.c: Likewise. - * elf/rtld.c: Likewise. - Add new --audit option. - * sysdeps/generic/ldsodefs.h: Remove _dl_out_of_memory declaration. - (rtld_global_ro._dl_signal_error): Add new parameter. - * include/dlfcn.h (_dl_catch_error): Add new parameter. - * dlfcn/dlfcn.c (_dlerror_run): Pass additional parameter to - _dl_catch_error. Only free if the returned newly value says so. - -2005-06-01 Roland McGrath - - [BZ #959] - * posix/tst-mmap.c (main): Fill the test file with enough data for the - page size. - -2005-05-30 Jakub Jelinek - - * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): If - GLRO(dl_osversion) has been already set to a value smaller than - _dl_discover_osversion (), don't overwrite it here. - -2005-05-24 Thomas Schwinge - - * sysdeps/mach/i386/syscall.S (syscall): Call END. - -2005-05-28 Richard Henderson - - * elf/elf.h (DT_ALPHA_PLTRO, DT_ALPHA_NUM): New. - * sysdeps/alpha/dl-dtprocnum.h: New file. - * sysdeps/alpha/dl-machine.h (DT_ALPHA): New. - (elf_machine_load_address): Simplify to rely on gprel relocations. - (elf_machine_runtime_setup): Handle DT_ALPHA_PLTRO plt format. - Remove thread safety workaround for binutils 2.6. - (elf_machine_fixup_plt): Handle DT_ALPHA_PLTRO plt format. - * sysdeps/alpha/dl-trampoline.S (_dl_runtime_resolve_new): New. - (_dl_runtime_profile_new): New. - (_dl_runtime_resolve_old): Rename from _dl_runtime_resolve. - (_dl_runtime_profile_old): Rename from _dl_runtime_profile. Fix - typo in _dl_call_pltexit argument loading. - - * sysdeps/alpha/div_libc.h (funcnoplt): New. - * sysdeps/alpha/divl.S: Use it. - * sysdeps/alpha/divq.S: Likewise - * sysdeps/alpha/divqu.S: Likewise. - * sysdeps/alpha/reml.S: Likewise. - * sysdeps/alpha/remq.S: Likewise. - * sysdeps/alpha/remqu.S: Likewise. - -2005-05-26 Andreas Schwab - - * locale/Makefile (CFLAGS-loadlocale.c): Don't define. - -2005-05-26 Ulrich Drepper - - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_DIRECT): Fix value. - Reported by Colin Gibbs . [BZ #954] - -2005-05-17 Alan Modra - - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Corrent - _dl_hwcap access in PIC && !SHARED case. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - -2005-05-25 Dwayne Grant McConnell - - * gmon/gmon.c: Add space in weak_alias use. - * linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S: Likewise. - * sysdeps/alpha/htonl.S: Likewise. - * sysdeps/alpha/htons.S: Likewise. - * sysdeps/alpha/elf/start.S: Likewise. - * sysdeps/i386/i386-mcount.S: Likewise. - * sysdeps/ia64/strchr.S: Likewise. - * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. - * sysdeps/ia64/fpu/w_lgamma.c: Likewise. - * sysdeps/ia64/fpu/w_lgamma.c: Likewise. - * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. - * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal.c: Likewise. - * sysdeps/mach/hurd/readdir64_r.c: Likewise. - * sysdeps/mach/hurd/sigaltstack.c: Likewise. - * sysdeps/powerpc/fpu/s_fabs.S: Likewise. - * sysdeps/powerpc/fpu/s_fabs.S: Likewise. - * sysdeps/powerpc/fpu/s_fabs.S: Likewise. - * sysdeps/powerpc/fpu/s_fabs.S: Likewise. - * sysdeps/powerpc/fpu/s_fmax.S: Likewise. - * sysdeps/powerpc/fpu/s_fmax.S: Likewise. - * sysdeps/powerpc/fpu/s_fmax.S: Likewise. - * sysdeps/powerpc/fpu/s_fmax.S: Likewise. - * sysdeps/powerpc/fpu/s_fmin.S: Likewise. - * sysdeps/powerpc/fpu/s_fmin.S: Likewise. - * sysdeps/powerpc/fpu/s_fmin.S: Likewise. - * sysdeps/powerpc/fpu/s_fmin.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. - * sysdeps/s390/s390-32/s390-mcount.S: Likewise. - * sysdeps/s390/s390-64/s390x-mcount.S: Likewise. - * sysdeps/sparc/sparc32/memset.S: Likewise. - * sysdeps/sparc/sparc32/stpcpy.S: Likewise. - * sysdeps/sparc/sparc32/strchr.S: Likewise. - * sysdeps/sparc/sparc32/strchr.S: Likewise. - * sysdeps/sparc/sparc64/memcmp.S: Likewise. - * sysdeps/sparc/sparc64/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/memset.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. - * sysdeps/unix/sysv/linux/readdir64.c: Likewise. - * sysdeps/unix/sysv/linux/readdir64_r.c: Likewise. - * sysdeps/unix/sysv/linux/hppa/clone.S: Likewise. - * sysdeps/unix/sysv/linux/i386/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/i386/makecontext.S: Likewise. - * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/i386/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. - * sysdeps/unix/sysv/linux/mips/vfork.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. - * sysdeps/unix/sysv/linux/wordsize-64/getdents.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/x86_64/makecontext.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Likewise. - * sysdeps/x86_64/_mcount.S: Likewise. - -2005-05-24 Roland McGrath - - * sysdeps/unix/sysv/linux/i386/sysdep.h - (SETUP_PIC_REG, LOAD_PIC_REG): Move these macros ... - * sysdeps/i386/sysdep.h [PIC]: ... to here. - -2005-05-23 Roland McGrath - - * sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm: - Subdirectories moved to ports repository. - * configure.in (base_machine): Remove arm* and thumb* patterns. - * shlib-versions (arm.*-.*-linux.*): Remove this pattern. - -2005-05-23 Ulrich Drepper - - [BZ #1086] - * sunrpc/bindrsvprt.c (LOWPORT): Apparently some mountd - implementations are broken and don't accept ports < 512. - -2005-05-22 Dmitry V. Levin - - [BZ #961] - * io/sys/sendfile.h: Remove __nonnull from sendfile and sendfile64 - declarations. - -2005-05-23 Ulrich Drepper - - [BZ #1086] - * sunrpc/pm_getport.c (__get_socket): New function. - (pmap_getport): Use it to open a non-reserved socket to the portmapper - for TCP. - * include/rpc/pmap_clnt.h (__get_socket): Declare. - * sunrpc/pm_getmaps.c (pmap_getmaps): Use __get_socket to get an - non-reserved socket for the portmapper. - Based on a patch by Steve Dickson . - - [BZ #1086] - * sunrpc/bindrsvprt.c (bindresvport): Try harder to find a port. - If we tried looking at the usual range without success extend the - range to even lower ports. - - * sysdeps/unix/clock_gettime.c (clock_gettime): Revert last patch. - -2005-05-22 Andreas Schwab - - * elf/rtld.c: Include . - -2005-05-17 Alan Modra - - * sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_RET): Don't use - JUMPTARGET. Instead append @local to __syscall_error. - * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Delete all occurrences - of JUMPTARGET. Instead append @local to labels. - * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc32/ppc-mcount.S: Likewise. - * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise. - - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Use float constants. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise. Use one GOT - slot to access both constants. - * sysdeps/powerpc/powerpc32/fpu/s_round.S: Likewise. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise. - - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S (TWO52.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S (TWO23.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S (TWO52.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_floorf.S (TWO23.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Comment typo. - (NEGZERO.0, POINTFIVE.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S (TWO52.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_rintf.S (TWO23.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_round.S (__round): Code in .text. - (TWO52.0, POINTFIVE.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S (__roundf): Code in .text. - (TWO23.0, POINTFIVE.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S (__trunc): Code in .text. - (TWO52.0): Delete. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S (__truncf): Code in .text. - (TWO23.0): Delete. - * sysdeps/powerpc/powerpc32/memset.S (memset): Formatting. - -2005-05-19 Richard Henderson - - * sysdeps/unix/clock_gettime.c (clock_gettime): Fix typo around - CLOCK_REALTIME. - - * sysdeps/ia64/bits/atomic.h (__arch_compare_and_exchange_bool_32_acq, - __arch_compare_and_exchange_bool_64_acq, - __arch_compare_and_exchange_val_32_acq, - __arch_compare_and_exchange_val_64_acq, atomic_exchange_and_add): - Use __sync builtin without _si or _di suffix. - -2005-05-19 Jakub Jelinek - - [BZ #955] - * iconvdata/ibm939.c (BODY): Avoid segfaults with input characters - and above. - -2005-05-17 Andreas Schwab - - * sysdeps/unix/sysv/linux/clock_getcpuclockid.c - (clock_getcpuclockid): Always return a defined value. - -2005-05-17 Neal H. Walfield - - [BZ #1350] - * sysdeps/posix/getaddrinfo.c (gaih_local): Check [_HAVE_SA_LEN] - instead of [SALEN]. - (gaih_inet): Likewise. - -2005-05-11 Ulrich Drepper - - * elf/elf.h (Elf32_auxv_t): Make cross-compile safe. - (Elf64_auxv_t): Likewise. - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Adjust for - removal of a_ptr element in ElfXX_auxv_t. - * elf/dl-support.c (_dl_aux_init): Likewise. - -2005-05-09 Daniel Jacobowitz - - * sysdeps/unix/sysv/linux/clock_getres.c: Include . - * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. - -2005-05-09 Alan Modra - - * sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Use - .pushsection/.popsection in place of .section/.previous. - -2005-05-08 Ulrich Drepper - - * MakeTAGS: Make xgettext not look into test cases. - - * MakeTAGS: Make sure translations in error calls are marked with - c-format by xgettext. - -2005-05-07 Ulrich Drepper - - * intl/libintl.h: Always use __attribute_format_arg__ for gettext - functions since gcc sometimes forgets the attribute for the - standard functions. - -2005-05-06 Jakub Jelinek - - [BZ #934] - * posix/regex_internal.h: Include bits/libc-lock.h or define dummy - __libc_lock_* macros if not _LIBC. - (struct re_dfa_t): Add lock. - * posix/regcomp.c (re_compile_internal): Add __libc_lock_init. - * posix/regexec.c (regexec, re_search_stub): Add locking. - -2005-05-04 Jakub Jelinek - - * intl/Makefile (tst-gettext[45].out): Pass also $(run-program-prefix) - as argument to the scripts. - * intl/tst-gettext2.sh: Use mkdir -p instead of test -d + mkdir. - * intl/tst-gettext4.sh: Likewise. Use run_program_prefix argument. - * intl/tst-gettext5.sh: Likewise. - - * intl/tst-translit.sh: Add mkdir -p. - - * sysdeps/unix/sysv/linux/i386/sysdep.h (SETUP_PIC_REG): Use - .ifndef/.endif to allow use of this macro more than once per .S - file. - (LOAD_PIC_REG): New macro. - * sysdeps/unix/sysv/linux/i386/makecontext.S: Add call frame - information. - * sysdeps/unix/sysv/linux/i386/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. - * sysdeps/i386/fpu/s_asinh.S: Use LOAD_PIC_REG macro. Add call frame - information. - * sysdeps/i386/fpu/e_log10f.S: Likewise. - * sysdeps/i386/fpu/s_expm1.S: Likewise. - * sysdeps/i386/fpu/e_acoshf.S: Likewise. - * sysdeps/i386/fpu/e_log2l.S: Likewise. - * sysdeps/i386/fpu/s_log1pf.S: Likewise. - * sysdeps/i386/fpu/s_lrint.S: Likewise. - * sysdeps/i386/fpu/s_llrint.S: Likewise. - * sysdeps/i386/fpu/s_ilogbf.S: Likewise. - * sysdeps/i386/fpu/s_cbrtl.S: Likewise. - * sysdeps/i386/fpu/s_asinhf.S: Likewise. - * sysdeps/i386/fpu/e_log.S: Likewise. - * sysdeps/i386/fpu/e_atanhf.S: Likewise. - * sysdeps/i386/fpu/s_lrintl.S: Likewise. - * sysdeps/i386/fpu/e_atanhl.S: Likewise. - * sysdeps/i386/fpu/e_scalb.S: Likewise. - * sysdeps/i386/fpu/s_log1p.S: Likewise. - * sysdeps/i386/fpu/s_nearbyintl.S: Likewise. - * sysdeps/i386/fpu/s_frexpl.S: Likewise. - * sysdeps/i386/fpu/s_log1pl.S: Likewise. - * sysdeps/i386/fpu/s_nearbyintf.S: Likewise. - * sysdeps/i386/fpu/s_cbrt.S: Likewise. - * sysdeps/i386/fpu/s_expm1l.S: Likewise. - * sysdeps/i386/fpu/s_lrintf.S: Likewise. - * sysdeps/i386/fpu/e_acosh.S: Likewise. - * sysdeps/i386/fpu/s_cexp.S: Likewise. - * sysdeps/i386/fpu/s_ilogbl.S: Likewise. - * sysdeps/i386/fpu/s_expm1f.S: Likewise. - * sysdeps/i386/fpu/e_powl.S: Likewise. - * sysdeps/i386/fpu/e_powf.S: Likewise. - * sysdeps/i386/fpu/e_scalbf.S: Likewise. - * sysdeps/i386/fpu/e_logl.S: Likewise. - * sysdeps/i386/fpu/e_acoshl.S: Likewise. - * sysdeps/i386/fpu/s_frexp.S: Likewise. - * sysdeps/i386/fpu/e_pow.S: Likewise. - * sysdeps/i386/fpu/e_logf.S: Likewise. - * sysdeps/i386/fpu/e_log2.S: Likewise. - * sysdeps/i386/fpu/s_frexpf.S: Likewise. - * sysdeps/i386/fpu/s_cexpl.S: Likewise. - * sysdeps/i386/fpu/s_llrintf.S: Likewise. - * sysdeps/i386/fpu/s_ilogb.S: Likewise. - * sysdeps/i386/fpu/e_scalbl.S: Likewise. - * sysdeps/i386/fpu/e_atanh.S: Likewise. - * sysdeps/i386/fpu/e_log10.S: Likewise. - * sysdeps/i386/fpu/s_cbrtf.S: Likewise. - * sysdeps/i386/fpu/s_cexpf.S: Likewise. - * sysdeps/i386/fpu/s_llrintl.S: Likewise. - * sysdeps/i386/fpu/e_log10l.S: Likewise. - * sysdeps/i386/fpu/s_nearbyint.S: Likewise. - * sysdeps/i386/fpu/s_asinhl.S: Likewise. - * sysdeps/i386/fpu/e_log2f.S: Likewise. - * sysdeps/i386/addmul_1.S: Various fixes to cfi handling. - * sysdeps/i386/mul_1.S: Likewise. - * sysdeps/i386/strtok.S: Likewise. - * sysdeps/i386/sub_n.S: Likewise. - * sysdeps/i386/submul_1.S: Likewise. - * sysdeps/i386/i586/addmul_1.S: Likewise. - * sysdeps/i386/i586/memcpy.S: Likewise. - * sysdeps/i386/i586/mul_1.S: Likewise. - * sysdeps/i386/i586/rshift.S: Likewise. - * sysdeps/i386/i586/sub_n.S: Likewise. - * sysdeps/i386/i586/submul_1.S: Likewise. - * sysdeps/i386/i686/memcmp.S: Likewise. - * sysdeps/i386/i686/memmove.S: Likewise. - * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. - * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. - -2005-05-03 Ulrich Drepper - - * sysdeps/i386/add_n.S: Add call frame information. - * sysdeps/i386/addmul_1.S: Likewise. - * sysdeps/i386/bsd-setjmp.S: Likewise. - * sysdeps/i386/lshift.S: Likewise. - * sysdeps/i386/memchr.S: Likewise. - * sysdeps/i386/memcmp.S: Likewise. - * sysdeps/i386/mul_1.S: Likewise. - * sysdeps/i386/rawmemchr.S: Likewise. - * sysdeps/i386/rshift.S: Likewise. - * sysdeps/i386/stpncpy.S: Likewise. - * sysdeps/i386/strchr.S: Likewise. - * sysdeps/i386/strchrnul.S: Likewise. - * sysdeps/i386/strcspn.S: Likewise. - * sysdeps/i386/strpbrk.S: Likewise. - * sysdeps/i386/strrchr.S: Likewise. - * sysdeps/i386/strspn.S: Likewise. - * sysdeps/i386/strtok.S: Likewise. - * sysdeps/i386/sub_n.S: Likewise. - * sysdeps/i386/submul_1.S: Likewise. - * sysdeps/i386/elf/bsd-setjmp.S: Likewise. - * sysdeps/i386/i486/strcat.S: Likewise. - * sysdeps/i386/i586/add_n.S: Likewise. - * sysdeps/i386/i586/addmul_1.S: Likewise. - * sysdeps/i386/i586/lshift.S: Likewise. - * sysdeps/i386/i586/memcpy.S: Likewise. - * sysdeps/i386/i586/memset.S: Likewise. - * sysdeps/i386/i586/mul_1.S: Likewise. - * sysdeps/i386/i586/rshift.S: Likewise. - * sysdeps/i386/i586/strchr.S: Likewise. - * sysdeps/i386/i586/strcpy.S: Likewise. - * sysdeps/i386/i586/sub_n.S: Likewise. - * sysdeps/i386/i586/submul_1.S: Likewise. - * sysdeps/i386/i686/add_n.S: Likewise. - * sysdeps/i386/i686/memcmp.S: Likewise. - * sysdeps/i386/i686/memmove.S: Likewise. - * sysdeps/i386/i686/mempcpy.S: Likewise. - * sysdeps/i386/i686/memset.S: Likewise. - * sysdeps/i386/i686/strtok.S: Likewise. - * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. - * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. - * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. - * sysdeps/unix/sysv/linux/i386/semtimedop.S: Likewise. - * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. - - * sysdeps/i386/fpu/libm-test-ulps: Adjust for gcc 4. - - * sysdeps/unix/sysv/linux/kernel-features.h: waitid is available - on ppc in 2.6.12. - -2005-04-29 Jakub Jelinek - - [BZ #1083] - * sysdeps/posix/posix_fallocate.c (posix_fallocate): If len == 0, - call ftruncate if offset is bigger than current size. Make sure - the file is offset + len bytes long if that is more than current size. - Don't overwrite previous content of the file. - * sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64): - Likewise. +2006-05-05 Martin Schwidefsky -2005-05-02 Roland McGrath + * sysdeps/s390/s390-32/elf/start.S: Replace pc relative relocation + by a GOT relocation to make Scrt1.o position independent. + * sysdeps/s390/s390-64/elf/start.S: Likewise. - [BZ #924] - * crypt/md5.c [! HAVE_MEMCPY] (memcpy): Yield proper expression value. + * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Add support for + six system call parameters. + * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise. -2005-04-29 Roland McGrath +2006-05-05 Ulrich Drepper - * timezone/africa: Update from tzdata2005i. - * timezone/asia: Likewise. - * timezone/northamerica: Likewise. - * timezone/yearistype: Likewise. - - * sysdeps/i386/sysdep.h (CALL_MCOUNT): Fix typo in last change. - -2005-04-29 Ulrich Drepper - - [BZ #1093] - * nis/nis_table.c: Fix realloc handling. - * nis/nis_removemember.c: Likewise. - -2005-04-28 Ulrich Drepper - - [BZ #798] - * nscd/Makefile: Help losers who use --with-headers. - -2005-04-28 Roland McGrath - - [BZ #796] - * sysdeps/unix/sysv/linux/dl-sysdep.h: New file. - Define NEED_DL_SYSINFO_DSO for all platforms. - - * sysdeps/generic/dl-sysdep.h: Remove multiple inclusion protection. - * sysdeps/alpha/dl-sysdep.h: Likewise. - Use #include_next instead of duplicating generic file's contents. - * sysdeps/ia64/dl-sysdep.h: Likewise. - * sysdeps/sparc/dl-sysdep.h: Likewise. - -2005-03-22 Steven Munroe - - * sysdeps/powerpc/powerpc64/memset.S (memset): Make ___memset local. - -2005-03-07 Steven Munroe - - [BZ #781] - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_TGKILL): Define for powerpc32/64 starting with 2.6.1. - (__ASSUME_UTIMES): Define for powerpc32/64 starting with 2.6.1. - (__ASSUME_FADVISE64_64_SYSCALL): Define for powerpc32 only starting - with 2.6.1. - (__ASSUME_WAITID_SYSCALL): Don't define for powerpc32/64. - -2005-04-28 Ulrich Drepper - - * sysdeps/i386/sysdep.h: Add cfi instrumentation to asm fragments. - * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/i386/socket.S: Remove now duplicate - cfi_startproc and cfi_endproc. - - * configure.in: Remove ultrasparc names. - - * sysdeps/i386/i686/memcmp.S: Move misplaced END. - -2005-03-27 Bruno Haible - - Make it possible for multiple threads to use gettext() in different - locales. - * intl/dcigettext.c (HAVE_PER_THREAD_LOCALE): New macro. - (struct known_translation_t): If HAVE_PER_THREAD_LOCALE, add localename - field. - (transcmp): If HAVE_PER_THREAD_LOCALE, compare localename fields. - (DCIGETTEXT): If HAVE_PER_THREAD_LOCALE, fill the localename field in - search and newp. - - * intl/tst-gettext4.c: New file. - * intl/tst-gettext4.sh: New file. - * intl/tst-gettext4-de.po: New file. - * intl/tst-gettext4-fr.po: New file. - * intl/tst-gettext5.c: New file. - * intl/tst-gettext5.sh: New file. - * intl/Makefile (distribute): Add tst-gettext4.sh, tst-gettext4-de.po, - tst-gettext4-fr.po, tst-gettext5.sh. - (multithread-test-srcs): New variable. - (test-srcs): Add its contents. - (tests): Depend on tst-gettext4.out, tst-gettext5.out. - (tst-gettext4.out, tst-gettext5.out): New rules. - (CFLAGS-tst-gettext4.c, CFLAGS-tst-gettext5.c): New variables. - Add rule for linking the multithread-test-srcs with the appropriate - thread-library. - -2005-04-28 Ulrich Drepper - - * po/rw.po: New file. From translation team. - - * scripts/config.guess: Update from upstream. - * scripts/config.sub: Likewise. - -2005-04-27 Ulrich Drepper - - [BZ #1094] - * nscd/connections.c (nscd_run): Use time() value in prune_cache - call, not timeout value, since the latter might be from another clock. - -2005-04-27 Roland McGrath - - [BZ #877] - * posix/unistd.h: Remove __nonnull from acct decl. - - * rt/tst-cpuclock1.c: New file. - * rt/tst-cpuclock2.c: New file. - * rt/tst-cputimer1.c: New file. - * rt/tst-cputimer2.c: New file. - * rt/tst-cputimer3.c: New file. - * rt/Makefile (tests): Add them. - - * sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h: New file. - * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: New file. - * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c - (HAS_CPUCLOCK): New macro. - (clock_getcpuclockid): Function removed. - #include the new linux file to define it instead. - * sysdeps/unix/clock_gettime.c [HP_TIMING_AVAIL] (hp_timing_gettime): - New function, broken out of ... - (clock_gettime) [HP_TIMING_AVAIL]: ... here. Call it. - (realtime_gettime): New function, broken out of ... - (clock_gettime) [! HANDLED_REALTIME]: ... here. Call it. - (clock_gettime) [SYSDEP_GETTIME_CPU]: Use new macro in default case. - * sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): New macro. - (SYSDEP_GETTIME_CPUTIME): New macro. - (SYSDEP_GETTIME): Use both. - [! __ASSUME_POSIX_TIMERS] (maybe_syscall_gettime): New function, broken - out of ... - (SYSDEP_GETTIME): ... here. Use it. - [__NR_clock_gettime] (HANDLED_CPUTIME): Define it. - (SYSDEP_GETTIME_CPUTIME): New macro. Handle CPU timers by trying - kernel support and falling back to hp-timing code. - * sysdeps/posix/clock_getres.c - [HP_TIMING_AVAIL] (hp_timing_getres): New function, broken out of ... - (clock_getres) [HP_TIMING_AVAIL]: ... here. Call it. - (realtime_getres): New function, broken out of ... - (clock_getres) [! HANDLED_REALTIME]: ... here. Call it. - (clock_getres) [SYSDEP_GETRES_CPU]: Use new macro in default case. - * sysdeps/unix/sysv/linux/clock_getres.c (SYSCALL_GETRES): New macro. - (SYSDEP_GETRES_CPUTIME): New macro. - (SYSDEP_GETRES): Use both. - [! __ASSUME_POSIX_TIMERS] (maybe_syscall_getres): New function, broken - out of ... - (SYSDEP_GETRES): ... here. Use it. - [__NR_clock_getres] (HANDLED_CPUTIME): Define it. - (SYSDEP_GETRES_CPUTIME): New macro. Handle CPU timers by trying - kernel support and falling back to hp-timing code. - * sysdeps/unix/sysv/linux/clock_nanosleep.c: Handle - CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially, - translating to the kernel clockid_t for our own process/thread clock. - -2005-04-27 Ulrich Drepper - - * stdlib/test-canon.c: Make doesExist a directory and add more tests - for the new error case. - -2004-06-02 Dmitry V. Levin - Ranjani Murthy - - * stdlib/canonicalize.c (__realpath): Change realpath(3) to - return NULL and set errno to ENOTDIR for such pathnames like - "/path/to/existing-non-directory/". - -2005-04-26 Ulrich Drepper - - [BZ #1105] - * time/strptime_l.c (__strptime_internal): Handle 'z' to set - tm_gmtoff. - * time/Makefile (tests): Add tst-strptime2. - * time/tst-strptime2.c: New file. - -2005-04-26 Jakub Jelinek - - [BZ #1081] - * elf/dl-close.c: Include stddef.h. - (_dl_close): If called recursively, just remember GC needs to be rerun - and decrease l_direct_opencount. Avoid GC if l_direct_opencount - decreased to 1. Rerun GC at the end if any destructor unloaded some - additional libraries. - * elf/Makefile: Add rules to build and run unload6 test. - * elf/unload6.c: New test. - * elf/unload6mod1.c: New file. - * elf/unload6mod2.c: New file. - * elf/unload6mod3.c: New file. - - * malloc/hooks.c (mem2chunk_check): Add magic_p argument, set *magic_p - if magic_p is not NULL. - (top_check): Invoke MALLOC_FAILURE_ACTION if MORECORE failed. - (malloc_check): Fail if sz == -1. - (free_check): Adjust mem2chunk_check caller. - (realloc_check): Likewise. Fail if bytes == -1. If bytes == 0 and - oldmem != NULL, call free_check and return NULL. If reallocating - and returning NULL, invert magic byte again to make oldmem valid - region for further checking. - (memalign_check): Fail if bytes == -1. - * malloc/Makefile: Add rules to build and run tst-mcheck. - * malloc/tst-mcheck.c: New test. - -2005-04-26 Ulrich Drepper - - [BZ #1110] - * stdio-common/vfscanf.c: Correctly account for characters of - decimal points right after +-. - -2005-04-26 Roland McGrath - - * elf/rtld-Rules (rtld-all): Test ifndef rtld-modules instead of - ifeq ($(subdir),elf) to distinguish main driver from subdir runs. - -2005-04-25 Roland McGrath - - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h - (INTERNAL_SYSCALL_ERROR_P): Fix typo in last change. - - * sunrpc/xdr.c (xdr_u_int): Use `long' for L and cast where needed. - - * elf/dl-load.c: Revert last change. - -2005-04-24 Ulrich Drepper - - [BZ #1110] - * stdio-common/vfscanf.c: Fix parsing of decimal point after +-. - Patch by Hamed Malek . - -2005-04-21 Roland McGrath - - * elf/dl-load.c (_dl_map_object_from_fd): Don't use MAP_DENYWRITE, - since Linux ignores it in user mmap calls. - -2005-04-17 David S. Miller - - * sysdeps/sparc/sparc32/elf/start.S: Define __data_start. - * sysdeps/sparc/sparc64/elf/start.S: Likewise. - -2005-04-15 Roland McGrath - - * timezone/Makefile (zic-deps): New variable. - ($(testdata)/America/New_York): Use it instead of explicit deps. - ($(testdata)/Etc/UTC, $(testdata)/Australia/Melbourne): Likewise. - ($(testdata)/America/Sao_Paulo, $(testdata)/Asia/Tokyo): Likewise. - (%/UTC %/Universal): New pattern rule, replaces ... - ($(testdata)/UTC, $(testdata)/Universal): ... these removed targets. - ($(testdata)/%/Berlin $(testdata)/%/London): New pattern rule. - ($(testdata)/Europe/London, $(testdata)/Europe/Berlin): Removed. - -2005-04-14 Roland McGrath - - * MakeTAGS ($P/$(domain).pot): Depend on distinfo file as well. - (extract): Filter-out distinfo file name. - - [BZ #253] - * MakeTAGS (text-srcs): Match %.bash.in files too. - - [BZ #253] - * nscd/Makefile (all-nscd-modules): New variable, include selinux - module regardless of configuration. - (distribute): Use that instead of $(nscd-modules). - -2005-04-13 David S. Miller - - Add sparc64 TLS and NPTL support. - * elf/tls-macros.h: Add Sparc64 defines. - * sysdeps/sparc/sparc64/dl-machine.h (sparc64_fixup_plt): Mark as - always_inline. - (elf_machine_fixup_plt): Likewise. - (elf_machine_rela): Handle TLS relocations. - (elf_machine_type_cleaa): Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h - (SYSCALL_ERROR_HANDLER_ENTRY): Use sethi/or for GOT reloc. - It does not always fit in R_SPARC_GOT13 when building -fPIC. - Also, add TLS handling. - * sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel): - Increase it to 2.4.21 for sparc64. - * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: NULL terminate - backtrace by zero'ing out %fp. Store away flags, func_ptr, - and func_arg in global registers not local registers. - * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Handle PTID, TLS, - and CTID arguments properly. Add RESET_PID handling. - * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Rework so that we - do not invoke __sigprocmask(). We can always assume rt signals - are present on sparc64, so just do an inline syscall. - -2005-04-13 Jakub Jelinek - - * sysdeps/sparc/sparc64/dl-machine.h: Add dl_machine_h multiple - inclusion guard for the first half of the header. - (elf_machine_type_class, ELF_MACHINE_JMP_SLOT, ELF_MACHINE_NO_REL, - ELF_MACHINE_PLTREL_OVERLAP, elf_machine_runtime_setup, - elf_machine_relplt, DL_STACK_END, RTLD_START): Move into the - #ifndef dl_machine_h guarded part of the header. - -2005-04-14 Ulrich Drepper - - [BZ #851] - * posix/execvp.c (execvp): Use file name including path when - trying to run it with shell. - * posix/Makefile: Add rules to build and run tst-execvp3. - * posix/tst-execvp3.c: New file. - -2005-04-12 Ulrich Drepper - - [BZ #1090] - * stdlib/random_r.c (__initstate_r): Don't use non-existing state. - * string/tst-strfry.c: New file. - * string/Makefile (tests): Add tst-strfry. - -2005-04-11 James A. Morrison - - * manual/string.texi: Fix typo in wmemcpy decl. - -2005-04-10 David S. Miller + * sunrpc/svcauth_des.c (cache_init): Use calloc instead of + malloc&bzero. - * sysdeps/sparc/sparc32/dl-trampoline.S: Use std not stx. + * sunrpc/svc_udp.c (BZERO): Remove definition. + (CALLOC): Define. + (svc_enablecache): Use CALLOC instead of ALLOC&BZERO. -2005-04-08 Carlos O'Donell + * sunrpc/des_impl.c: Remove ALT_ECB support. We never used it. + (des_SPtrans): Use uint32_t type. + (des_skb): Likewise. - * FAQ.in: Explain why `make' might fail running rpcgen. - * FAQ: Regenerated. + * sunrpc/xdr_ref.c (xdr_reference): Use calloc instead of malloc&bzero. -2005-04-07 Roland McGrath +2006-05-05 Jakub Jelinek - * po/libc.pot: Regenerated. + [BZ #2509] + * stdio-common/tst-printf.sh: Adjust for tst-printf.c change even + on 32-bit arches. -2005-04-07 Roland McGrath +2006-05-05 Ulrich Drepper - * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion) - [(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan - GLRO(dl_sysinfo_map) for PT_NOTE giving Linux kernel version, - we can skip the uname call if it's there. - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Don't use - DL_SYSDEP_OSCHECK here. - * elf/rtld.c (dl_main) [DL_SYSDEP_OSCHECK]: Do it here instead. - - * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): - Add _dl_sysinfo_map. - * elf/rtld.c (dl_main): Don't call _dl_init_paths early in the - rtld_is_main case. Call it unconditionally later. - Move GLRO(dl_sysinfo_dso) handling earlier, before _dl_init_paths call. - Initialize GLRO(dl_sysinfo_map). - * elf/dl-load.c (open_path): Bail out if _dl_init_paths wasn't called. - * sysdeps/generic/dl-sysdep.c (_DL_FIRST_EXTRA): New macro. - (_dl_important_hwcaps) - [(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan - GLRO(dl_sysinfo_map) for PT_NOTE giving synthetic hwcap names - and bit values. - * elf/ldconfig.c (_DL_FIRST_EXTRA): New macro. - (hwcap_extra): New static variable. - (is_hwcap_platform): Check hwcap_extra for a matching name. - Remove tls special case. - (path_hwcap): Likewise. - (parse_conf): Parse "hwcap" directive to define synthetic hwcap bits - and their names, stored in hwcap_extra. - (main) [USE_TLS]: Initialize final synthetic hwcap bit as "tls". - - * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Use uint64_t for - _dl_hwcap and _dl_hwcap_mask. - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Cast a_val for - AT_HWCAP to unsigned long int. - * elf/dl-support.c (_dl_aux_init): Likewise. - (_dl_hwcap): Update defn. - - * elf/cache.c (print_entry): Pad hwcap value with 0s in diagnostic. - * elf/ldconfig.c (search_dir): Likewise. - -2005-04-05 Roland McGrath - - * NEWS: Copy 2.3.5 section from 2.3 branch. - - * intl/tst-codeset.sh: Use mkdir -p. Put msgfmt output in temporary - file and mv it into place. - * intl/tst-gettext3.sh: Likewise. - - * Makefile (glibc-%.tar rule): Use make -q to ensure configure scripts - are up to date in srcdir. Touch all configure scripts after export. - - * iconv/gconv_int.h: Include and . - -2005-04-05 H.J. Lu - - [BZ #592] - * sysdeps/ia64/fpu/e_acosh.S: Update from Intel libm 2005-04-05 - (comment changes only). - * sysdeps/ia64/fpu/e_acoshl.S: Likewise. - * sysdeps/ia64/fpu/e_atanh.S: Likewise. - * sysdeps/ia64/fpu/e_cosh.S: Likewise. - * sysdeps/ia64/fpu/e_coshf.S: Likewise. - * sysdeps/ia64/fpu/e_exp.S: Likewise. - * sysdeps/ia64/fpu/e_exp10.S: Likewise. - * sysdeps/ia64/fpu/e_exp10f.S: Likewise. - * sysdeps/ia64/fpu/e_exp2.S: Likewise. - * sysdeps/ia64/fpu/e_exp2f.S: Likewise. - * sysdeps/ia64/fpu/e_expf.S: Likewise. - * sysdeps/ia64/fpu/e_log.S: Likewise. - * sysdeps/ia64/fpu/e_logf.S: Likewise. - * sysdeps/ia64/fpu/e_pow.S: Likewise. - * sysdeps/ia64/fpu/e_powf.S: Likewise. - * sysdeps/ia64/fpu/e_sinh.S: Likewise. - * sysdeps/ia64/fpu/e_sinhf.S: Likewise. - * sysdeps/ia64/fpu/libm_error.c: Likewise. - * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. - * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. - * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. - * sysdeps/ia64/fpu/libm_sincos.S: Likewise. - * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. - * sysdeps/ia64/fpu/s_asinh.S: Likewise. - * sysdeps/ia64/fpu/s_atanl.S: Likewise. - * sysdeps/ia64/fpu/s_cos.S: Likewise. - * sysdeps/ia64/fpu/s_cosf.S: Likewise. - * sysdeps/ia64/fpu/s_erf.S: Likewise. - * sysdeps/ia64/fpu/s_erfc.S: Likewise. - * sysdeps/ia64/fpu/s_erfcf.S: Likewise. - * sysdeps/ia64/fpu/s_erfcl.S: Likewise. - * sysdeps/ia64/fpu/s_erff.S: Likewise. - * sysdeps/ia64/fpu/s_expm1.S: Likewise. - * sysdeps/ia64/fpu/s_expm1f.S: Likewise. - * sysdeps/ia64/fpu/s_log1p.S: Likewise. - * sysdeps/ia64/fpu/s_tanf.S: Likewise. - * sysdeps/ia64/fpu/s_tanh.S: Likewise. - * sysdeps/ia64/fpu/s_tanhf.S: Likewise. - * sysdeps/ia64/fpu/w_tgamma.S: Likewise. - * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. - * sysdeps/ia64/fpu/w_tgammal.S: Likewise. - -2005-04-05 Roland McGrath - - * scripts/config.guess: Update from master, timestamp='2005-03-24'. - * scripts/config.sub: Update from master, timestamp='2005-02-10'. - -2005-04-04 David S. Miller - - * sysdeps/sparc/sparc32/dl-trampoline.S: New file. - * sysdeps/sparc/sparc32/dl-machine.h: Move PLT trampolines there. - Use RESOLVE_MAP instead of RESOLVE to protect relocation code. - (elf_machine_runtime_setup): Test for dl_profile non-null. - * sysdeps/sparc/sparc64/dl-trampoline.S: New file. - (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. - * sysdeps/sparc/sparc64/dl-machine.h: Move PLT trampolines there. - Use RESOLVE_MAP instead of RESOLVE to protect relocation code. - (elf_machine_runtime_setup): Test for dl_profile non-null. - * sysdeps/sparc/bits/link.h: New file. - * sysdeps/generic/ldsodefs.h (La_sparc32_regs, La_sparc32_retval, - La_sparc64_regs, La_sparc64_retval): New. - (struct audit_ifaces): Add sparc entries. - * elf/tst-auditmod1.c: Add sparc entries. - -2005-03-27 Bruno Haible - - * intl/tst-gettext3.c: New file. - * intl/tst-gettext3.sh: New file. - * intl/Makefile (distribute): Add tst-gettext3.sh. - (test-srcs): Add tst-gettext3. - (tests): Depend on tst-gettext3.out. - (tst-gettext3.out): New rule. - (CFLAGS-tst-gettext3.c): New variable. - - Fix bug exposed by tst-gettext3. - * intl/gettextP.h (struct converted_domain): New type. - (struct loaded_domain): Remove the conv, conv_tab fields. Add - conversions, nconversions fields. - (_nl_init_domain_conv): Remove declaration. - (_nl_free_domain_conv): Remove declaration. - (_nl_find_msg): Add convert argument. - * intl/dcigettext.c (DCIGETTEXT): Call _nl_find_msg with convert=1. - (_nl_find_msg): Add convert argument. When a conversion to a different - charset is needed, create a new converted_domain element, instead of - throwing away the old converted translations. - (get_output_charset): New function. - * intl/loadmsgcat.c (_nl_init_domain_conv): Remove function. - (_nl_free_domain_conv): Remove function. - (_nl_load_domain): Initialize the conversions array to empty. Use - _nl_find_msg instead of _nl_init_domain_conv to retrieve the header - entry. - (_nl_unload_domain): Free the conversions array and its contents. + * locale/programs/ld-address.c (address_finish): Fix one more + place where the iso639 array might be accessed beyond the limits. - * intl/gettextP.h (struct loaded_domain): Remove codeset_cntr field. - (struct binding): Likewise. - * intl/bindtextdom.c (set_binding_values): Drop codeset_cntr - modifications. - -2005-04-04 Jakub Jelinek - - [BZ #1082] - * sunrpc/pmap_rmt.c (xdr_rmtcall_args): Use a dummy arglen instead - of trying to encode uninitialized arglen. - -2005-04-04 Ulrich Drepper - - [BZ #825] - * timezone/scheck.c: Update from tzcode2005h. - * timezone/tzfile.h: Likewise. - * timezone/zdump.c: Likewise. - * timezone/zic.c: Likewise. - - [BZ #825] - * timezone/antarctica: Update from tzdata2005h. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/etcetera: Likewise. - * timezone/europe: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - * timezone/leapseconds: Likewise. - * timezone/iso3166.tab: Likewise. - -2005-03-31 H.J. Lu - - [BZ #592] - * sysdeps/ia64/fpu/libm_cpu_defs.h: Update copyright. - -2005-04-01 Ulrich Drepper - - * wcsmbs/btowc.c (__btowc): Optimize parameters in ASCII range. - * wcsmbs/wctob.c (wctob): Likewise. - * wcsmbs/wchar.h (btowc): Add optimized inline function. - (wctob): Likewise. - -2005-03-31 Jakub Jelinek - - * sysdeps/unix/sysv/linux/x86_64/getcontext.S: Use functionally - equivalent, but shorter instructions. - * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. - * sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Likewise. - * sysdeps/unix/x86_64/sysdep.S: Likewise. - * sysdeps/x86_64/strchr.S: Likewise. - * sysdeps/x86_64/memset.S: Likewise. - * sysdeps/x86_64/strcspn.S: Likewise. - * sysdeps/x86_64/strcmp.S: Likewise. - * sysdeps/x86_64/elf/start.S: Likewise. - * sysdeps/x86_64/strspn.S: Likewise. - * sysdeps/x86_64/dl-machine.h: Likewise. - * sysdeps/x86_64/bsd-_setjmp.S: Likewise. - * sysdeps/x86_64/bsd-setjmp.S: Likewise. - * sysdeps/x86_64/strtok.S: Likewise. - -2005-03-30 H.J. Lu - - [BZ #592] - * sysdeps/ia64/fpu/e_acosf.S: Update from Intel libm 2005-03-21. - * sysdeps/ia64/fpu/e_acoshf.S: Likewise. - * sysdeps/ia64/fpu/e_acoshl.S: Likewise. - * sysdeps/ia64/fpu/e_acosh.S: Likewise. - * sysdeps/ia64/fpu/e_acosl.S: Likewise. - * sysdeps/ia64/fpu/e_acos.S: Likewise. - * sysdeps/ia64/fpu/e_asinf.S: Likewise. - * sysdeps/ia64/fpu/e_asinl.S: Likewise. - * sysdeps/ia64/fpu/e_asin.S: Likewise. - * sysdeps/ia64/fpu/e_atan2f.S: Likewise. - * sysdeps/ia64/fpu/e_atan2.S: Likewise. - * sysdeps/ia64/fpu/e_atanhf.S: Likewise. - * sysdeps/ia64/fpu/e_atanhl.S: Likewise. - * sysdeps/ia64/fpu/e_atanh.S: Likewise. - * sysdeps/ia64/fpu/e_coshf.S: Likewise. - * sysdeps/ia64/fpu/e_coshl.S: Likewise. - * sysdeps/ia64/fpu/e_cosh.S: Likewise. - * sysdeps/ia64/fpu/e_exp10f.S: Likewise. - * sysdeps/ia64/fpu/e_exp10l.S: Likewise. - * sysdeps/ia64/fpu/e_exp10.S: Likewise. - * sysdeps/ia64/fpu/e_exp2f.S: Likewise. - * sysdeps/ia64/fpu/e_exp2l.S: Likewise. - * sysdeps/ia64/fpu/e_exp2.S: Likewise. - * sysdeps/ia64/fpu/e_expf.S: Likewise. - * sysdeps/ia64/fpu/e_exp.S: Likewise. - * sysdeps/ia64/fpu/e_fmodf.S: Likewise. - * sysdeps/ia64/fpu/e_fmodl.S: Likewise. - * sysdeps/ia64/fpu/e_fmod.S: Likewise. - * sysdeps/ia64/fpu/e_hypotf.S: Likewise. - * sysdeps/ia64/fpu/e_hypotl.S: Likewise. - * sysdeps/ia64/fpu/e_hypot.S: Likewise. - * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. - * sysdeps/ia64/fpu/e_log2f.S: Likewise. - * sysdeps/ia64/fpu/e_log2l.S: Likewise. - * sysdeps/ia64/fpu/e_log2.S: Likewise. - * sysdeps/ia64/fpu/e_logf.S: Likewise. - * sysdeps/ia64/fpu/e_logl.S: Likewise. - * sysdeps/ia64/fpu/e_log.S: Likewise. - * sysdeps/ia64/fpu/e_powf.S: Likewise. - * sysdeps/ia64/fpu/e_powl.S: Likewise. - * sysdeps/ia64/fpu/e_pow.S: Likewise. - * sysdeps/ia64/fpu/e_remainderf.S: Likewise. - * sysdeps/ia64/fpu/e_remainderl.S: Likewise. - * sysdeps/ia64/fpu/e_remainder.S: Likewise. - * sysdeps/ia64/fpu/e_scalbf.S: Likewise. - * sysdeps/ia64/fpu/e_scalbl.S: Likewise. - * sysdeps/ia64/fpu/e_scalb.S: Likewise. - * sysdeps/ia64/fpu/e_sinhf.S: Likewise. - * sysdeps/ia64/fpu/e_sinhl.S: Likewise. - * sysdeps/ia64/fpu/e_sinh.S: Likewise. - * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. - * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. - * sysdeps/ia64/fpu/e_sqrt.S: Likewise. - * sysdeps/ia64/fpu/libm_error.c: Likewise. - * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. - * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. - * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. - * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. - * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. - * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. - * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. - * sysdeps/ia64/fpu/libm_sincos.S: Likewise. - * sysdeps/ia64/fpu/libm_support.h: Likewise. - * sysdeps/ia64/fpu/s_asinhl.S: Likewise. - * sysdeps/ia64/fpu/s_asinh.S: Likewise. - * sysdeps/ia64/fpu/s_atanf.S: Likewise. - * sysdeps/ia64/fpu/s_atanl.S: Likewise. - * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. - * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. - * sysdeps/ia64/fpu/s_cosf.S: Likewise. - * sysdeps/ia64/fpu/s_cosl.S: Likewise. - * sysdeps/ia64/fpu/s_cos.S: Likewise. - * sysdeps/ia64/fpu/s_erfcf.S: Likewise. - * sysdeps/ia64/fpu/s_erfcl.S: Likewise. - * sysdeps/ia64/fpu/s_erfc.S: Likewise. - * sysdeps/ia64/fpu/s_erfl.S: Likewise. - * sysdeps/ia64/fpu/s_erf.S: Likewise. - * sysdeps/ia64/fpu/s_expm1f.S: Likewise. - * sysdeps/ia64/fpu/s_expm1l.S: Likewise. - * sysdeps/ia64/fpu/s_expm1.S: Likewise. - * sysdeps/ia64/fpu/s_fdimf.S: Likewise. - * sysdeps/ia64/fpu/s_fdiml.S: Likewise. - * sysdeps/ia64/fpu/s_fdim.S: Likewise. - * sysdeps/ia64/fpu/s_frexp.c: Likewise. - * sysdeps/ia64/fpu/s_frexpf.c: Likewise. - * sysdeps/ia64/fpu/s_frexpl.c: Likewise. - * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. - * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. - * sysdeps/ia64/fpu/s_ilogb.S: Likewise. - * sysdeps/ia64/fpu/s_ldexp.c: Likewise. - * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. - * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. - * sysdeps/ia64/fpu/s_log1pf.S: Likewise. - * sysdeps/ia64/fpu/s_log1pl.S: Likewise. - * sysdeps/ia64/fpu/s_log1p.S: Likewise. - * sysdeps/ia64/fpu/s_logbf.S: Likewise. - * sysdeps/ia64/fpu/s_logbl.S: Likewise. - * sysdeps/ia64/fpu/s_logb.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. - * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. - * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. - * sysdeps/ia64/fpu/s_nextafter.S: Likewise. - * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. - * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. - * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. - * sysdeps/ia64/fpu/s_roundf.S: Likewise. - * sysdeps/ia64/fpu/s_roundl.S: Likewise. - * sysdeps/ia64/fpu/s_round.S: Likewise. - * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. - * sysdeps/ia64/fpu/s_scalbn.c: Likewise. - * sysdeps/ia64/fpu/s_scalbnf.c: Likewise. - * sysdeps/ia64/fpu/s_scalbnl.c: Likewise. - * sysdeps/ia64/fpu/s_tanf.S: Likewise. - * sysdeps/ia64/fpu/s_tanhl.S: Likewise. - * sysdeps/ia64/fpu/s_tanh.S: Likewise. - * sysdeps/ia64/fpu/s_tanl.S: Likewise. - * sysdeps/ia64/fpu/s_tan.S: Likewise. - * sysdeps/ia64/fpu/w_lgamma.c: Likewise. - * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal.c: Likewise. - * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. - * sysdeps/ia64/fpu/w_tgammal.S: Likewise. - * sysdeps/ia64/fpu/w_tgamma.S: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/libm_cpu_defs.h: New file. - * sysdeps/ia64/fpu/libm_error_codes.h: New file. - - [BZ #592] - * sysdeps/ia64/fpu/gen_import_file_list: Updated for Intel libm - 2005-03-21. - * sysdeps/ia64/fpu/import_file.awk: Likewise. - * sysdeps/ia64/fpu/import_intel_libm: Likewise. - * sysdeps/ia64/fpu/Makefile: Likewise. - -2005-03-29 Jakub Jelinek - - [BZ #1087] - * posix/fnmatch.c (fnmatch): For short patterns or strings attempt to - avoid calling mbsrtowcs twice. - -2005-03-29 Roland McGrath - - * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion): New - function, inline broken out of ... - (DL_SYSDEP_OSCHECK): ... here. Use that. - Do the discovery and set GLRO(dl_osversion) if successful, - if __LINUX_KERNEL_VERSION <= 0. - * elf/dl-load.c: Don't include dl-osinfo.h here. - -2005-03-29 Alfred M. Szmidt - - * manual/install.texi (Tools for Compilation): GNU binutils 2.15 - is now needed. - -2005-03-19 Bruno Haible - - * intl/dcigettext.c (struct known_translation_t): Change type of - domainname field to 'const char *'. - (DCIGETTEXT): Remove const-cast. - -2005-03-29 Thorsten Kukuk - - [BZ #661] - * grp/initgroups.c (internal_getgrouplist): Check if we have - enough space before adding the primary group to the list. - - * posix/tst-execle1.c (do_test): Fix execle arguments. - * posix/tst-execle2.c (do_test): Likewise. - -2005-03-28 Roland McGrath - - * sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names. - Reported by Mark Mitchell . - * Versions.def (libm): Define GLIBC_2.4 set. - * math/Versions (libm: GLIBC_2.4): Add this set, with exp2l. - * sysdeps/i386/Versions (libm: GLIBC_2.1): Add this set, with exp2l. - * sysdeps/ia64/Versions: Likewise. - * sysdeps/m68k/Versions: Likewise. - * sysdeps/sparc/sparc64/Versions: Likewise. - * sysdeps/x86_64/Versions: New file. - * sysdeps/mips/mips64/Versions: New file. - - * locale/langinfo.h (_NL_LOCALE_NAME): New macro. - [__USE_GNU] (NL_LOCALE_NAME): New macro. - * locale/nl_langinfo.c: Grok special item value for _NL_LOCALE_NAME, - return locale name string for the category. - -2005-03-25 Jakub Jelinek - - [BZ #721] - * sysdeps/generic/wcstoul_l.c: Include "wcstol_l.c" rather than - . - -2005-03-28 Daniel Jacobowitz - - * sysdeps/mips/atomicity.h: Remove unused file. - * sysdeps/mips/dl-machine.h (elf_machine_rel): Add TLS relocations. - * sysdeps/mips/dl-tls.h: New file. - * sysdeps/mips/libc-tls.c: New file. - * sysdeps/mips/tls-macros.h: New file. - * sysdeps/mips/bits/atomic.h: New file. - * sysdeps/mips/bits/setjmp.h: Protect against multiple inclusion. - * sysdeps/mips/elf/configure.in: New file. - * sysdeps/mips/elf/configure: Generated. - * sysdeps/mips/sys/asm.h: New file. - * sysdeps/unix/sysv/linux/mips/vfork.S: New file. - * sysdeps/unix/sysv/linux/mips/clone.S: Add NPTL and five-argument - clone support. - * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h - (INTERNAL_SYSCALL_NCS): New. - (INTERNAL_SYSCALL): Update for non-constant support. - (internal_syscall0): Likewise. - (internal_syscall1): Likewise. - (internal_syscall2): Likewise. - (internal_syscall3): Likewise. - (internal_syscall4): Likewise. - (internal_syscall5): Likewise. - (internal_syscall6): Likewise. - (internal_syscall7): Likewise. - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (SIGEV_THREAD): - Update to match the kernel. - (SIGEV_CALLBACK): Likewise. - (SIGEV_THREAD_ID): Likewise. - -2005-03-28 Daniel Jacobowitz - - [BZ #783] - * elf/tst-auditmod1.c: Add MIPS support. - * sysdeps/generic/ldsodefs.h (La_mips_32_regs): New. - (La_mips_32_retval): New. - (La_mips_64_regs): New. - (La_mips_64_retval): New. - (struct audit_ifaces): Add MIPS entries. - * sysdeps/mips/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE. - (elf_machine_runtime_link_map, ELF_DL_FRAME_SIZE, - ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS, - ELF_MACHINE_RUNTIME_TRAMPOLINE): Move to dl-trampoline.c. - (RTLD_START): Align the stack before calling _dl_init_internal. - Use .ent for _dl_start_user. - (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define. - (elf_machine_rel, elf_machine_rel_relative, elf_machine_lazy_rel) - (elf_machine_runtime_setup): Use "auto inline". - (elf_machine_rela, elf_machine_rela_relative): Provide empty versions. - (elf_machine_got_rel): Likewise. Use RESOLVE_MAP. - * sysdeps/mips/dl-trampoline.c: New file. - * sysdeps/mips/bits/link.h: New file. - * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h - (internal_syscall5): Use register operands instead of non-lvalue - memory operands. - (internal_syscall6): Likewise. - (internal_syscall7): Likewise. - -2005-03-27 Andreas Jaeger - - * debug/warning-nop.c (__builtin___memcpy_chk): Define away to - avoid warnings with older compiler. - (__builtin___memcpy_chk): Likewise. - (__builtin___memmove_chk: Likewise. - (__builtin___mempcpy_chk): Likewise. - (__builtin___memset_chk): Likewise. - (__builtin___stpcpy_chk): Likewise. - (__builtin___strcat_chk): Likewise. - (__builtin___strcpy_chk): Likewise. - (__builtin___strncat_chk): Likewise. - (__builtin___strncpy_chk): Likewise. - (__builtin_object_size): Likewise. - -2005-03-27 Daniel Jacobowitz - - * elf/tls-macros.h: Correct typo. - -2005-03-23 Jakub Jelinek - - [BZ #822] - * nis/ypclnt.c (yp_2_yperr): Revert 2004-11-30 patch. - (ypprot_err): Use yp_2_yperr table also for YP_NODOM .. YP_NOMORE. - -2005-03-22 Roland McGrath - - * locale/setlocale.c: Comment typo. - - * scripts/versions.awk: No errors for GLIBC_PRIVATE. - - * Versions.def (libdl, librt): Add GLIBC_2.3.4 version. - - * scripts/versions.awk: Print all errors and die at the end. - Use library name in versions array keys. - -2005-03-22 Daniel Jacobowitz - - * elf/elf.h (PT_ARM_EXIDX): New macro. - -2005-03-21 Thorsten Kukuk - - [BZ #1098] - * sunrpc/xdr_stdio.c (xdrstdio_getlong, xdrstdio_putlong): - Convert correctly between long/int on 64bit big-endian. - -2005-03-21 David Mosberger - - * sysdeps/ia64/_mcount.S: Newer kernels don't like register-frames - with more than 8 output registers. Fix this by passing original - ar.pfs to _mcount_ret_helper via r3. - -2005-03-15 Jakub Jelinek - - [BZ #786] - * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle - GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx). - * elf/Makefile: Add rules to build and run tst-tls15. - * elf/tst-tls15.c: New test. - * elf/tst-tlsmod15a.c: New file. - * elf/tst-tlsmod15b.c: New file. - -2005-03-20 Ulrich Drepper - - * elf/rtld.c (dl_main): Always call init_tls if we have audit modules. - -2005-03-20 Alfred M. Szmidt - - * elf/dl-open.c (dl_open_worker): Fix typo. - -2005-03-20 Ulrich Drepper - - * malloc/malloc.c (public_cALLOc): We cannot skip the memory - clearing if perturb_byte != 0. - -2005-03-20 Jakub Jelinek - - * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t - instead of __off_t for last argument. - * debug/Makefile (tests): Add tst-lfschk{1,2,3}. - * debug/tst-lfschk1.c: New test. - * debug/tst-lfschk2.c: New test. - * debug/tst-lfschk3.c: New test. - -2005-02-09 Jakub Jelinek - - * sysdeps/unix/sysv/linux/bits/termios.h (CMSPAR): Define. - * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Add __USE_MISC - and __USE_XOPEN guards to match linux/bits/termios.h. - * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. - (CMSPAR): Define. - * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. - -2005-02-10 H.J. Lu - - [BZ #1076] - * sysdeps/ia64/elf/initfini.c: Add local _init and _fini labels. - -2005-02-27 Denis Barbier - - [BZ #549] - * locale/iso-4217.def: Add CSD currency. - -2005-03-19 Ulrich Drepper - - * inet/test-ifaddrs.c: Use test-skeleton. - * inet/test_ifindex.c: Likewise. - - [BZ #821] - * elf/dl-lookup.c (add_dependency): Always search l_initfini if - the list exists. - - [BZ #821] - * elf/Makefile: Add rules to build and run order2. - * elf/order2.c: New file. - * elf/order2mod1.c: New file. - * elf/order2mod2.c: New file. - * elf/order2mod3.c: New file. - * elf/order2mod4.c: New file. - -2005-03-19 Jakub Jelinek - - [BZ #821] - * elf/dl-open.c (dl_open_worker): Print exact l_direct_opencount value, - it has been incremented before. - -2005-03-18 Ulrich Drepper - - [BZ #821] - * elf/dl-fini.c (_dl_fini): Split sorting of the maps in separate - function _dl_sort_fini. - (_dl_sort_fini): New function. - * sysdeps/generic/ldsodefs.h: Declare _dl_sort_fini. - * elf/dl-close.c (_dl_close): Call _dl_sort_fini before running - destructors to call them in the right order. - -2005-02-07 Steven Munroe - - * sysdeps/powerpc/bits/link.h (La_ppc64_regs): Add lr_vrsave. - (La_ppc64_retval): Correct size of lrc_fp. - * sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_profile_resolve): - Fix up ABI problems and complete function. - -2005-03-10 Jakub Jelinek - - * math/test-misc.c (main): Add some more tests. - -2005-03-17 Jakub Jelinek - - * posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed - __wcrtomb. Check return values of other __wcrtomb calls. - * posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars): - Change mbclen type to size_t. - (build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t. - Handle mb chars whose upper case doesn't have multibyte representation - in locale's charset. - -2005-03-15 Jakub Jelinek - - * malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc, - public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with - #ifndef _LIBC. - - [BZ #779] - * malloc/malloc.c (public_mTRIm): Initialize malloc if not yet - initialized. - -2005-03-10 Jakub Jelinek - - * misc/sys/cdefs.h (__always_inline): Define. - * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): - Use __always_inline instead of __inline. - * socket/bits/socket2.h (recv, recvfrom): Likewise. - * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise. - * string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, - __memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk, - __strcat_ichk, __strncat_ichk): Use __always_inline instead of - __inline__ __attribute__ ((__always_inline__)). - -2005-03-09 Jakub Jelinek - - * debug/tst-chk1.c: Include sys/socket.h and sys/un.h. - (do_test): Add new tests for recv, recvfrom, getcwd, getwd and - readlink. Add some more tests for read, pread, pread64, fgets and - fgets_unlocked. - - * posix/bits/unistd.h (read, pread, pread64, readlink, - getcwd, getwd): Change macros into extern inline functions. - (__read_alias, __pread_alias, __pread64_alias, __readlink_alias, - __getcwd_alias, __getwd_alias): New prototypes. - * socket/bits/socket2.h (recv, recvfrom): Change macros into - extern inline functions. - (__recv_alias, __recvfrom_alias): New prototypes. - * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros - into extern inline functions. - (__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes. - - * debug/pread_chk.c (__pread_chk): Fix order of arguments passed - to __pread. - * debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed - to __pread64. - -2005-03-18 Daniel Jacobowitz - - * configure.in: Use %function instead of @function. - -2005-03-18 Ulrich Drepper - - [BZ #821] - * include/link.h (struct link_map): Remove l_opencount. Add l_removed. - Change type of l_idx to int. - * elf/dl-close.c: Basically rewrite. Do not use l_opencount to - determine whether a DSO has to be unloaded. Instead compute this - in this function. - * elf/dl-deps.c: No need to manipulate l_opencount anymore. - * elf/dl-lookup.c: Likewise. - * elf/rtld.c: Likewise - * elf/dl-open.c: Likewise. Use l_init_called to determine whether - object was just loaded. - * elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount. - * elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which - is about to be unloaded as a match. - (_dl_map_object): Likewise. - * elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about - to be unloaded. - * elf/circleload1.c: Don't use l_opencount anymore. - * elf/neededtest.c: Likewise. - * elf/neededtest2.c: Likewise. - * elf/neededtest3.c: Likewise. - * elf/neededtest4.c: Likewise. - * elf/unload.c: Likewise. - * elf/unload2.c: Likewise. - * elf/loadtest.c: Likewise. - - [BZ #821] - * elf/rtld.c: Preloading errors are now never fatal. - -2005-03-08 Jakub Jelinek - - [BZ #821] - * elf/Makefile: Add rules to build and run unload5 test. - * elf/unload5.c: New file. - - [BZ #821] - * elf/Makefile: Add rules to build and run unload4 test. - * elf/unload4.c: New file. - * elf/unload4mod1.c: New file. - * elf/unload4mod2.c: New file. - * elf/unload4mod3.c: New file. - * elf/unload4mod4.c: New file. - -2005-03-17 Roland McGrath - - * nscd/aicache.c (addhstaiX): Tweak type to avoid warning. - -2005-03-16 Richard Henderson - - [BZ #721] - * include/libc-symbols.h (__hidden_proto): Remove bogus declaration - of internal. - (__hidden_def1, __hidden_dot_def1): Remove. - (__hidden_def2, __hidden_def3): Remove. - (__hidden_ver1): New. - (hidden_ver, hidden_def, hidden_weak): Use it. - (hidden_data_ver, hidden_data_ver, hidden_data_weak): Use non-data - version of the macro. - - [BZ #721] - * include/wchar.h (__wcscoll): Remove. - * wcsmbs/wcscoll.c: Define wcscoll directly instead of via __wcscoll. - * string/strcoll.c: Don't issue libc_hidden_def STRCOLL redefined. - -2005-03-16 Daniel Jacobowitz - - * elf/elf.h: Define MIPS TLS relocations. - -2005-03-16 Ulrich Drepper - - * elf/circleload1.c (main): Pretty printing. - -2005-03-15 Jakub Jelinek - - * sysdeps/generic/wordexp.c (exec_comm_child): Add inline keyword. - Patch by Dan Kegel . - - [BZ #721] - * elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative, - elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): - Add inline keyword. - * sysdeps/alpha/dl-machine.h (elf_machine_rela, - elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline - attribute. - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, - elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change - static inline into auto inline. - * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, - elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. - * sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela): - Likewise. - * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative, - elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): - Likewise. +2006-05-04 Ulrich Drepper -2005-03-15 Jakub Jelinek + * nis/nis_table.c (nis_list): Avoid clearing res twice before + filling it for the first time. - [BZ #789] - * sysdeps/i386/i686/hp-timing.h (HP_TIMING_ACCUM): Fix asm constraints. - Remove memory clobber. - - * sysdeps/x86_64/hp-timing.h (HP_TIMING_ACCUM): Make the addition - thread-safe. Subtract GLRO(dl_hp_timing_overhead) from Diff. - -2005-03-14 Jakub Jelinek - - * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Don't include - asm/types.h. - -2005-03-10 GOTO Masanori - - * sysdeps/unix/sysv/linux/sh/bits/mman.h: Define MAP_POPULATE and - MAP_NONBLOCK. - * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. - Correct MAP_GROWSDOWN value. - -2005-03-13 Roland McGrath - - * elf/tls-macros.h: #include_next to get a sysdeps - version if there is one. Only #error if macros are then undefined. - * sysdeps/generic/tls-macros.h: New file. - -2005-03-10 GOTO Masanori - - * sysdeps/hppa/configure.in: Remove old Makefile leftovers. - * sysdeps/hppa/configure: Regenerated. - -2005-03-08 Roland McGrath - - * sysdeps/gnu/errlist-compat.awk: Use NERR in all array decls, so - array types match exactly in C alias decls. - -2005-03-07 Ulrich Drepper - - * malloc/arena.c (ptmalloc_init): Recognize MALLOC_PERTURB_ and call - mallopt appropriately. - * malloc/malloc.h: Define M_PERTURB. - * malloc/malloc.c (perturb_byte): New variable. - (alloc_perturb, free_perturb): New macros. - (_int_malloc): Before returning, overwrite the memory if this is - requested. - (_int_free): Overwrite freed memory if requested. - (mALLOPt): Handle M_PERTURB. - * test-skeleton.c: Add call to mallopt with M_PERTURB command. - - * elf/dl-close.c (_dl_close): Decrement l_opencount before - printing debug message. - * elf/dl-open.c (dl_open_worker): Always print the new opencount - in debug messages. - -2005-03-06 Ulrich Drepper - - * elf/dl-close.c (_dl_close): Unify debug message format. - - * elf/dl-close.c (_dl_close): Print debug message just before - destroying a link map. - - * elf/do-lookup.h (do_lookup_x): Add namespace info to debug output. - * elf/dl-version.c (match_symbol): Likewise. - - * posix/bits/unistd.h (pread): Fix typo in __USE_FILE_OFFSET64 code. - - * debug/recv_chk.c (__recv_chk): Always fail if request could - overflow the buffer. - * debug/recvfrom_chk.c (__recvfrom_chk): Likewise. - * socket/bits/socket2.h (recv): Avoid calls to the _chk variant if - we know the call succeeds. - (recvfrom): Likewise. - -2005-03-05 Ulrich Drepper - - * posix/regexec.c (check_node_accept_bytes): Correct cast to avoid - warning. - * posix/regex_internal.c (re_string_reconstruct): Add cast to - avoid warning. - (build_wcs_upper_buffer): Change type of bug to plain char. - * locale/weightwc.h (findidx): Add casts to avoid warnings. - * time/mktime.c (ranged_convert): Initialize tm to make the - compiler happy. - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Add casts to avoid warnings. - * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Add casts to avoid warnings. - * wcsmbs/mbsnrtowcs.c: Add casts to avoid warnings. - * wcsmbs/wcsrtombs.c (__wcsrtombs): Add casts to avoid warnings. - * wcsmbs/wcrtomb.c (__wcrtomb): Add casts to avoid warnings. - * wcsmbs/mbrtowc.c (__mbrtowc): Use unsigned char for outbuf. - * wcsmbs/wctob.c (wctob): Make buf array of unsigned char. - * sysdeps/generic/strchrnul.c: Add cast to avoid warning. - * libio/iofwide.c: Add casts to avoid warnings. - * stdio-common/printf-prs.c (parse_printf_format): Introduce new - variable f to avoid warnings. - * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): - Fix a few casts to avoid warnings. - * iconv/gconv_simple.c (internal_utf8_loop): Make start unsigned - to avoid warning. - - [BZ #1101] - * posix/regex_internal.c [_LIBC] (build_wcs_buffer): Avoid using - dynamically sized array. - (build_wcs_upper_buffer): Likewise. - -2005-03-05 Jakub Jelinek - - * include/bits/unistd.h: New file. - * include/bits/socket2.h: New file. - -2005-03-05 Ulrich Drepper - - * sunrpc/key_call.c: Remove doors support. - * sunrpc/Makefile: Remove CPPFLAGS-key_call.c definition. - * configure.in: Remove test for doors support which never existed. - * config.make.in: Remove have_doors entry. - - * configure.in: Make sure at least gcc 3.4 is used. Undo last change. - * config.make.in: Undo last change. - - * sysdeps/i386/Makefile (CFLAGS-initfini.s): Unconditionally use - -mtune. - -2005-03-05 Roland McGrath - - * sysdeps/generic/ldsodefs.h (_dl_out_of_memory_internal): Remove decl. - (_dl_out_of_memory): Use rtld_hidden_proto. - * elf/dl-error.c (_dl_out_of_memory): Use rtld_hidden_data_def. - (_dl_signal_error): Don't use INTUSE on _dl_out_of_memory. - * elf/dl-open.c (_dl_open): Likewise. - * elf/dl-deps.c (_dl_map_object_deps): Likewise. - - * sunrpc/des_impl.c (des_set_key): Make first argument unsigned char *. - - * elf/dl-addr.c (_dl_addr): Add a cast. - - [BZ #821] - * elf/unload3mod4.c: Declare foo. - * elf/testobj2.c: Include . - - * sysdeps/gnu/errlist.awk: Emit NERR macro for _sys_nerr_internal - value constant, and use it in the defn. - * sysdeps/gnu/errlist-compat.awk: Use NERR in array decl. - Use actual size for compat array decls. - - * config.make.in (cc-mtune): New substituted variable. - * configure.in (libc_cv_cc_mtune): New test for -mtune= switch, - done only if libc_mtune_example is defined. - * sysdeps/i386/configure.in (libc_mtune_example): Set it. - * sysdeps/i386/Makefile (CFLAGS-initfini.s): Use $(cc-mtune). - -2005-03-05 Jakub Jelinek - - [BZ #721] - * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define - unconditionally to (defined RTLD_BOOTSTRAP). - * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise. - -2005-03-05 Jakub Jelinek - - * Makerules ($(inst_libdir)/libc.so): Use $(slibdir) instead of - $(inst_slibdir) in AS_NEEDED directive. - -2005-03-03 Jakub Jelinek - - * posix/bits/unistd.h (pread, pread64): Don't swap function arguments. - -2005-03-01 H.J. Lu - - [BZ #776] - * iconv/iconvconfig.c: Fix comment for the output file. - (write_output): Clear padding in header. - -2005-03-03 Ulrich Drepper - - [BZ #821] - * elf/dl-close.c (_dl_close): Don't try to set up new searchpath if the - loader is closed. Fixes unload3. - * elf/tst-global1.c: New file. - * elf/Makefile (tests): Add tst-global1. - * elf/testobj2.c (p): New function. - -2005-03-03 Jakub Jelinek - - [BZ #821] - * elf/Makefile: Add rules to build and run unload3 test. - * elf/unload3.c: New test. - * elf/unload3mod1.c: New file. - * elf/unload3mod2.c: New file. - * elf/unload3mod3.c: New file. - * elf/unload3mod4.c: New file. - -2005-02-21 Alan Modra - - [BZ #1394] - * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't - use __uint128_t. - -2005-03-01 Jakub Jelinek - - * posix/bits/unistd.h (read, pread, pread64): Use __bos0 instead - of __bos. - * socket/bits/socket2.h (recv, recvfrom): Likewise. - -2005-03-01 Roland McGrath - - [BZ #721] - * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside - of [RESOLVE_MAP]. - -2005-03-01 Alfred M. Szmidt - - [BZ #777] - * elf/dl-load.c (__stack_prot) [!PROT_GROWSUP && !PROT_GROWSDOWN]: - Add missing initializer. - - [BZ #777] - * malloc/arena.c: #include outside of [SHARED && - USE_TLS && !USE___THREAD]. - -2005-02-26 GOTO Masanori - - * csu/Makefile: Use printf instead of echo for some shells. - -2005-02-28 Roland McGrath - - * debug/warning-nop.c (__nop): Rename to nop, make it static. - (__warndecl): Use alias attribute directly, instead of strong_alias - macro. Add attribute_hidden. - -2005-02-28 Ulrich Drepper - - * posix/bits/unistd.h: Avoid calling __*_chk variants if we can - determine the call will never trigger a failure. - * debug/read_chk.c (__read_chk): Always fail if the buffer is too - small. - * debug/readlink_chk.c (__readlink_chk): Likewise. - * debug/pread64_chk.c (__pread64_chk): Likewise. - * debug/pread_chk.c (__pread_chk): Likewise. - - * sysdeps/i386/i686/memset_chk.S: Remove alias and warning. - * sysdeps/x86_64/memset_chk.S: Likewise. - -2005-02-24 Roland McGrath - - * debug/Versions (libc: GLIBC_2.4): Remove - __memset_zero_constant_len_parameter. - * sysdeps/generic/memset_chk.c: Remove alias and warning. - * misc/sys/cdefs.h (__warndecl): New macro. - * debug/warning-nop.c: New file. - * string/bits/string3.h (memset): Call __warn_memset_zero_len with no - arguments, instead of calling __memset_zero_constant_len_parameter. - Use __warndecl for __warn_memset_zero_len. - * debug/Makefile (routines): Add $(static-only-routines). - (static-only-routines): New variable. - -2005-02-27 Ulrich Drepper - - * po/tr.po: Update from translation team. - -2005-02-26 Ulrich Drepper - - * elf/dl-addr.c: Cleanups. Move declaration next to first use. - - * dlfcn/dlerror.c (check_free): New function. Extract common code - from fini and free_key_mem. Check whether this is libdl in the - base namespace. - -2005-02-25 Ulrich Drepper - - * elf/dl-lookup.c (_dl_debug_bindings): Add namespace information - to debug output. - -2004-11-11 Richard Sandiford - - [BZ #758] - * sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): Only - preprocess if it defines ABI-prefixed syscall names - like __NR_N32_open. Just include otherwise. - * sysdeps/unix/sysv/linux/mips/configure: Regenerate. - * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: Delete - * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (SYS_ify): Use the - standard __NR prefix. - * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (SYS_ify): Likewise. - * sysdeps/unix/sysv/linux/mips/Makefile (syscall-%.h): Rework so that - the output file is compatible with both pre-2.6 and 2.6 kernel headers. - Extract separate syscall lists for each ABI. - -2005-02-23 Ulrich Drepper - - * Makerules (libc.so): Add AS_NEEDED line for dynamic linker. - - [BZ #719] - * elf/Makefile: Run tst-tls9-static again. - -2005-02-22 Ulrich Drepper - - [BZ #719] - * sysdeps/generic/libc-tls.c (static_dtv): Size the same as the - slotinfo array. - (__libc_setup_tls): Initialize length of DTV based on array length. - * elf/dl-load.c: Revert last change. - * sysdeps/generic/dl-tls.c: Revert last change. - - * posix/Makefile (tests): Add tst-execvp1, tst-execvp2, tst-execlp1, - tst-execlp2, tst-execv1, tst-execv2, tst-execl1, tst-execl2, - tst-execve1, tst-execve2, tst-execle1, and tst-execle2. - * posix/tst-execl1.c: New file. - * posix/tst-execl2.c: New file. - * posix/tst-execle1.c: New file. - * posix/tst-execle2.c: New file. - * posix/tst-execlp1.c: New file. - * posix/tst-execlp2.c: New file. - * posix/tst-execv1.c: New file. - * posix/tst-execv2.c: New file. - * posix/tst-execve1.c: New file. - * posix/tst-execve2.c: New file. - * posix/tst-execvp1.c: New file. - * posix/tst-execvp2.c: New file. - -2005-02-22 Roland McGrath - - * include/signal.h: Revert last change. - (__sigemptyset): Use __builtin_memset instead of memset. - -2005-02-22 Ulrich Drepper - - * sysdeps/unix/sysv/linux/libc_fatal.c (__libc_message): Use - non-cancelable I/O functions. - -2005-02-22 Jakub Jelinek - - [BZ #769] - * nscd/nscd-client.h: Include sys/uio.h. - (__readall, __readvall, writeall): New prototypes. - * nscd/connections.c (writeall): New function. - (handle_request): Use it. - * nscd/aicache.c (addhstaiX): Likewise. - * nscd/initgrcache.c (addinitgroupsX): Likewise. - * nscd/hstcache.c (cache_addhst): Likewise. - * nscd/grpcache.c (cache_addgr): Likewise. - * nscd/pwdcache.c (cache_addpw): Likewise. - * nscd/nscd_helper.c (__readall, __readvall): New functions. - * nscd/nscd_getai.c (__nscd_getai): Use them. - * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. - * nscd/nscd_getgr_r.c (__nscd_getgr_r): Likewise. - * nscd/nscd_gethst_r.c (__nscd_gethst_r): Likewise. - * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. - -2005-02-22 Roland McGrath - - * include/sys/socket.h: Declare __recv. - * sysdeps/generic/recv.c (recv): Rename to __recv, and add weak alias. - * sysdeps/mach/hurd/recv.c: Likewise. - - * sysdeps/unix/sysv/linux/libc_fatal.c: Include for - __backtrace_* decls. - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h - (INTERNAL_SYSCALL_ERROR_P): Evalute VAL. Parenthesize ERR. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. - - * include/signal.h: Include for memset decl. - -2005-02-22 Andreas Schwab - - * posix/execvp.c (execvp): Fix invalid free. - -2005-02-22 Jakub Jelinek - - [BZ #1095] - * malloc/Makefile (CFLAGS-mcheck-init.c): Add. - * sunrpc/Makefile: Add $(PIC-ccflag) to CFLAGS-x* for - librpcsvc.a objects. - -2005-02-21 Ulrich Drepper - - [BZ #1107] - * iconvdata/ibm930.h: Correct Yen mapping. - * iconvdata/ibm939.h: Likewise. - * iconvdata/testdata/IBM930..UTF8: Adjust test data. - * iconvdata/testdata/IBM939..UTF8: Likewise. - Patch by Jiro Sekiba . - - * iconvdata/Makefile (modules): Add IBM1025, IBM1122, IBM1137, IBM1153, - IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158. - (distribute): Add ibm1025.c, ibm1025.h, ibm1122.c, ibm1122.h, - ibm1137.c, ibm1137.h, ibm1153.c, ibm1153.h, ibm1154.c, ibm1154.h, - ibm1155.c, ibm1155.h, ibm1156.c, ibm1156.h, ibm1157.c, ibm1157.h, - ibm1158.c, and ibm1158.h. - * iconvdata/TESTS: Add IBM1025, IBM1122, IBM1137, IBM1153, - IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158. - * iconvdata/gconv-modules: Likewise. - * iconvdata/ibm1025.c: New file. - * iconvdata/ibm1025.h: New file. - * iconvdata/ibm1122.c: New file. - * iconvdata/ibm1122.h: New file. - * iconvdata/ibm1137.c: New file. - * iconvdata/ibm1137.h: New file. - * iconvdata/ibm1153.c: New file. - * iconvdata/ibm1153.h: New file. - * iconvdata/ibm1154.c: New file. - * iconvdata/ibm1154.h: New file. - * iconvdata/ibm1155.c: New file. - * iconvdata/ibm1155.h: New file. - * iconvdata/ibm1156.c: New file. - * iconvdata/ibm1156.h: New file. - * iconvdata/ibm1157.c: New file. - * iconvdata/ibm1157.h: New file. - * iconvdata/ibm1158.c: New file. - * iconvdata/ibm1158.h: New file. - * iconvdata/testdata/IBM1025: New file. - * iconvdata/testdata/IBM1025..UTF8: New file. - * iconvdata/testdata/IBM1122: New file. - * iconvdata/testdata/IBM1122..UTF8: New file. - * iconvdata/testdata/IBM1137: New file. - * iconvdata/testdata/IBM1137..UTF8: New file. - * iconvdata/testdata/IBM1153: New file. - * iconvdata/testdata/IBM1153..UTF8: New file. - * iconvdata/testdata/IBM1154: New file. - * iconvdata/testdata/IBM1154..UTF8: New file. - * iconvdata/testdata/IBM1155: New file. - * iconvdata/testdata/IBM1155..UTF8: New file. - * iconvdata/testdata/IBM1156: New file. - * iconvdata/testdata/IBM1156..UTF8: New file. - * iconvdata/testdata/IBM1157: New file. - * iconvdata/testdata/IBM1157..UTF8: New file. - * iconvdata/testdata/IBM1158: New file. - * iconvdata/testdata/IBM1158..UTF8: New file. - Contributed by Jiro Sekiba . - -2005-02-10 Paolo Bonzini - - * posix/regcomp.c (lower_subexp): Do not optimize empty - subexpressions even with REG_NOSUB. - * posix/rxspencer/tests: Add a previously failing testcase. - -2005-02-21 Alan Modra - - [BZ #719] - * elf/dl-reloc.c (_dl_nothread_init_static_tls): Assert that dtv - array index is within bounds. - -2005-02-21 Ulrich Drepper - - [BZ #719] - * elf/dl-load.c: Do not allow PT_TLS in modules loaded in statically - linked code. - * sysdeps/generic/dl-tls.c [!SHARED]: Don't build _dl_next_tls_modid. - * elf/Makefile: Remove rules to build and run tst-tls9-static. - - [BZ #719] - * elf/dl-reloc.c (_dl_nothread_init_static_tls): Avoid using - THREAD_DTV multiple times, this minimally reduces code size on - some archs. - -2005-02-21 Jakub Jelinek - - [BZ #768] - * nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to - NETDB_INTERNAL if buffer is too small. - - [BZ #768] - * nscd/hstcache.c (INCR): Remove. - (addhstbyX): Double buflen in each iteration rather than add INCR. - * nscd/grpcache.c: Likewise. - * nscd/pwdcache.c: Likewise. - -2005-02-21 Ulrich Drepper - - * sysdeps/unix/sysv/linux/libc_fatal.c: Print backtrace and memory - map if requested. - * debug/chk_fail.c: Request backtrace and memory map dump. - - * Versions.def: Add GLIBC_2.4 for libc. - * debug/fgets_chk.c: New file. - * debug/fgets_u_chk.c: New file. - * debug/getcwd_chk.c: New file. - * debug/getwd_chk.c: New file. - * debug/readlink_chk.c: New file. - * debug/read_chk.c: New file. - * debug/pread_chk.c: New file. - * debug/pread64_chk.c: New file. - * debug/recv_chk.c: New file. - * debug/recvfrom_chk.c: New file. - * debug/Versions: Add all new functions with version GLIBC_2.4. - * debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk, - pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk, - getwd_chk, and getcwd_chk. Plus appropriate CFLAGS definitions. - * debug/tst-chk1.c: Add more tests. - * libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked. - * include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk. - * posix/unistd.h: Include for fortification. - * posix/bits/unistd.h: New file. - * posix/Makefile (headers): Add bits/unistd.h. - * socket/sys/socket.h: Include for fortification. - * socket/bits/socket2.h: New file. - * socket/Makefile (headers): Add bits/socket2.h. - - * string/bits/string3.h: Extend memset macro to check for zero 3rd - parameter and use __memset_zero_constant_len_parameter in that case. - * sysdeps/generic/memset_chk.c: Add - __memset_zero_constant_len_parameter alias and linker warning. - * debug/Versions: Add __memset_zero_constant_len_parameter to libc - with version GLIBC_2.4. - - * sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__ - in __STD_TYPE definition. - -2005-02-21 Jakub Jelinek - - * malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print - the error message rather than program name. - -2005-02-21 Ulrich Drepper - - [BZ #767] - * posix/unistd.h: symlink and readlink are unconditionally - available in the 2001 spec. - -2005-02-16 Roland McGrath - - * intl/dcigettext.c (_nl_find_msg): Add a cast. - - * nis/nis_clone_dir.c (nis_clone_directory): Use char * for ADDR. - * nis/nis_clone_obj.c (nis_clone_object): Likewise. - * nis/nis_clone_res.c (nis_clone_result): Likewise. - - * resolv/nss_dns/dns-network.c (getanswer_r): Use const unsigned char * - for END_OF_MESSAGE and CP. - - * resolv/res_send.c (send_dg): Add else branch for case impossible - unless `poll' is buggy. - - * crypt/crypt_util.c (__setkey_r): Add a cast. - - * locale/programs/linereader.c (get_toplvl_escape): Use size_t for - NBYTES, and unsigned char * for BYTES. - - * locale/programs/charmap.c (charmap_new_char): Use size_t and - unsighed char * for NBYTES, BYTES parameters. - - * sysdeps/generic/dl-hash.h (_dl_elf_hash): Take const char * argument - and cast it. - * sysdeps/i386/i686/dl-hash.h (_dl_elf_hash): Likewise. - - * sunrpc/create_xid.c (_create_xid): Don't use unsigned long for RES. - - * sunrpc/svcauth_des.c (_svcauth_des): Fix cast type. - - * sunrpc/auth_des.c (authdes_create): Don't use u_char for PKEY_DATA. - (authdes_marshal): Don't use unsigned int for LEN. - * sunrpc/xdr.c (xdr_hyper): Don't use unsigned long for T2. - (xdr_u_hyper): Likewise. - (xdr_u_short): Don't use u_long for L. - * sunrpc/xdr_intXX_t.c (xdr_int64_t): Don't use uint32_t for T2. - - * inet/rexec.c (rexec_af): Use socklen_t. - * sunrpc/key_call.c (getkeyserv_handle): Likewise. - * sunrpc/rtime.c (rtime): Likewise. - * resolv/res_send.c (send_vc, send_dg): Likewise. - * nis/nis_callback.c (__nis_create_callback): Likewise. - - * sysdeps/generic/libc-start.c: Use unsigned int for nthreads ptr. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix type of ADDR local. - - * libio/libio.h (_IO_BE): Add parenthesis around EXPR. - - * intl/dcigettext.c (INTVARDEF, INTUSE): Macros removed. - (_nl_default_dirname): Use libc_hidden_data_def instead of INTVARDEF. - (libc_freeres_fn, DCIGETTEXT): Don't use INTUSE. - * intl/bindtextdom.c (INTUSE): Macro removed. - (_nl_default_dirname): Use libc_hidden_proto. - (set_binding_values): Don't use INTUSE. - * include/libintl.h (_libc_intl_domainname_internal): Decl removed. - (_libc_intl_domainname): Use libc_hidden_proto. - * posix/regex_internal.h (gettext): Remove INTUSE on it. - * locale/SYS_libc.c (_libc_intl_domainname): Use libc_hidden_data_def - rather than INTDEF. - * include/libintl.h (_): Don't use *_internal name. - - * ctype/ctype-extn.c (__ctype_tolower, __ctype_toupper): Use int32_t, - not uint32_t. - * locale/lc-ctype.c (_nl_postload_ctype): Likewise for assignments. - - * iconv/gconv_open.c (__gconv_open): Remove useless cast. - - [BZ #721] - * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside - of [RESOLVE_MAP]. - * sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise. - * sysdeps/powerpc/powerpc32/dl-machine.h - (elf_machine_rel, elf_machine_rel_relative): Removed. - * sysdeps/powerpc/powerpc64/dl-machine.h - (elf_machine_rel, elf_machine_rel_relative): Removed. - -2005-02-03 Alexandre Oliva - - [BZ #721] - * elf/dynamic-link.h: Don't declare nested auto functions that are - not going to be defined. - -2004-07-23 Jakub Jelinek - - [BZ #284] - * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define - if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined. - -2005-02-16 Roland McGrath - - * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Move UBP_EV defn - inside [! SHARED] where it's used. - -2005-02-15 Ulrich Drepper - - * sysdeps/generic/bits/byteswap.h: Make sure result of all the - functions and macros is unsigned. - -2005-02-11 Barry deFrese - - [BZ #722] - * sysdeps/mach/hurd/setresgid.c: Use weak_alias. - * sysdeps/mach/hurd/setresuid.c: Likewise. - -2005-02-14 GOTO Masanori - - * misc/sys/syslog.h: Fix typo in comment. - -2005-02-14 Roland McGrath - - [BZ #720] - * sysdeps/unix/sysv/linux/sys/kd.h: Don't leave _LINUX_TYPES_H defined - if it wasn't originally. - -2005-02-14 GOTO Masanori - - * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove the duplicated - getpeername entry. - * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. - -2005-02-11 Jakub Jelinek - - * scripts/soversions.awk: Only record first WORDSIZE{32,64} - matching line. - -2005-02-14 Alan Modra - - [BZ #721] - * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define - with auto inline, and attribute always_inline. - (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. - (elf_machine_rel, elf_machine_rel_relative): Likewise. - * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise. - (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. - (elf_machine_rel, elf_machine_rel_relative): Likewise. - (elf_machine_tprel): Likewise. - -2005-02-14 Andreas Schwab - - * manual/filesys.texi (Random Access Directory): Fix type of file - position value for telldir and seekdir. - (Attribute Meanings): Fix typo. - -2005-02-14 H.J. Lu - - * csu/elf-init.c (__libc_csu_fini): Enable if LIBC_NONSHARED - isn't defined. - * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Call fini - if SHARED isn't defined. - * elf/Makefile (tests-static): Add tst-array1-static. - ($(objpfx)tst-array1-static.out): New target. - * elf/tst-array1-static.c: New file. - -2005-02-11 Jakub Jelinek - - [BZ #1100] - * debug/chk_fail.c (__chk_fail): Add a while (1) loop around - __libc_message to kill GCC warning about noreturn function returning. - - * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag - before relocating ld.so again. - - * elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even - for already prelinked ld.so. - -2005-02-11 Roland McGrath - - [BZ #715] - * Makefile (installed-stubs): New variable. - Set to $(inst_includedir)/gnu/stubs.h if $(biarch) is no, - or to $(inst_includedir)/gnu/stubs-$(biarch).h if otherwise. - [$(biarch) != no] (install-others-nosubdir): Add $(installed-stubs). - ($(inst_includedir)/gnu/stubs.h): Use $(installed-stubs) for this - rule's target. - ($(inst_includedir)/gnu/stubs.h): New target, install from ... - * include/stubs-biarch.h: New file. - - * shlib-versions (i.86-.*-.*): Add WORDSIZE64 line mapping to x86_64. - - * Makeconfig ($(common-objpfx)soversions.mk): Depend on Makeconfig. - Emit defn for variable `biarch'. - - * include/stub-tag.h: Update comment. - - * scripts/soversions.awk: Fix default version set handling. - -2005-02-10 Roland McGrath - - [BZ #157] - * include/libc-symbols.h (stub_warning): Emit a marker section called - .gnu.glibc-stub.NAME. - * Makerules ($(objpfx)stubs): Depend on object files, not dep files. - Use objdump to collect those marker section names. - ($(common-objpfx)shlib.lds): Discard .gnu.glibc-stub.* sections. - - * Rules (subdir_objs, subdir_stubs): New phony targets. - * Makefile (+subdir_targets): Add them. - - * Makerules ($(common-objpfx)Versions.all): Grok new leading column in - soversions.i. - - * scripts/lib-names.awk: Consider [0-9].* a "number", not just [0-9]+. - Reported by H.J. Lu . - - * scripts/lib-names.awk: Always print WORDSIZE32 section first when - doing two. - -2005-02-10 Jakub Jelinek - - * sysdeps/powerpc/powerpc32/bits/link.h: Removed. - * sysdeps/powerpc/powerpc64/bits/link.h: Moved to... - * sysdeps/powerpc/bits/link.h: ... here. New file. - -2005-02-09 Jakub Jelinek - - [BZ #710] - * stdlib/random_r.c (__initstate_r): Save old state. - * stdlib/Makefile (tests): Add tst-random2. - * stdlib/tst-random2.c: New test. - Reported by Peter Bergner . - -2005-01-25 H.J. Lu - - * dlfcn/dlfcn.c (init): Put it in .init_array section. - -2005-02-10 Roland McGrath - - [BZ #632] - * scripts/soversions.awk: Expect cpu, vendor, os as separate variables - from command line. - Grok shlib-versions lines with WORDSIZE* in second column. - Add new leading column to output, DEFAULT for existing output lines. - Also emit lines with WORDSIZE* for alternate configurations. - * Makeconfig ($(common-objpfx)soversions.i): Pass those variables. - ($(common-objpfx)soversions.mk): Grok new column, use only DEFAULT. - ($(common-objpfx)gnu/lib-names.stmp): Depend on soversions.i instead - of soversions.mk; replace inline shell script with use of ... - * scripts/lib-names.awk: New file. If input has non-DEFAULT lines, - emit multiple sets of macros under #if. - * shlib-versions (x86_64-.*-.*): Add WORDSIZE32 line mapping to i686. - (s390x-.*-.*): Likewise for s390. - (powerpc64-.*-.*): Likewise for powerpc. - (sparc64-.*-.*): Likewise for sparc. - (s390-.*-.*, powerpc.*-.*-.*, sparc.*-.*-.*): Add WORDSIZE64 entries - for these mapping back to the above. - -2005-02-08 Jakub Jelinek - - * elf/dl-load.c (_dl_map_object_from_fd): Fix a typo. - -2005-02-08 Andreas Schwab - - * sysdeps/m68k/dl-machine.h (elf_machine_rela): Remove use of - RESOLVE. - -2005-02-07 Richard Henderson - - [BZ #721] - * iconvdata/jis0208.h (struct jisx0208_ucs_idx): Move before use. - -2005-02-08 Kaz Kojima - - * sysdeps/sh/dl-machine.h (elf_machine_rela): Remove code using - RESOLVE. - -2005-02-07 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object_from_fd): Make sure registers are - set correctly. - -2005-01-07 Richard Henderson - - [BZ #721] - * math/math_private.h (__copysign): Define as builtin for gcc 4. - (__copysignf, __copysignl): Likewise. - * sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define - for gcc 4.0. - (copysignf, copysignl, fabsf, fabs): Likewise. - (__copysign, __copysignf, __copysignl): Remove. - (__fabs, __fabsf): Remove. - -2005-01-07 Jakub Jelinek - - [BZ #738] - * elf/dl-load.c (open_path): If rtld_search_dirs is in RELRO segment, - avoid writing to it if none of the standard search directories exist. - -2005-02-07 Steven Munroe - - [BZ #700] - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S - (__novec_setcontext, __setcontext): Fix typo so CCR is restored. - Load MSR as a doubleword. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S - (__novec_swapcontext, __swapcontext): Likewise. - -2005-02-07 Ulrich Drepper - - * iconv/iconv_prog.c (main): Provide more help in case on an error. - - * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Define. - -2005-02-07 Jakub Jelinek - - [BZ #741] - * nscd/nscd.c (termination_handler): Avoid segfault if some database - is not enabled. - - [BZ #741] - * nscd/nscd_getai.c (__nscd_getai): If ai_resp->found == -1, set - __nss_not_use_nscd_hosts and return -1. - * nscd/nscd_initgroups.c (__nscd_getgrouplist): If - initgr_resp->found == -1, set __nss_not_use_nscd_group and return -1. - Avoid leaking sockets. - -2005-01-28 Andreas Schwab - H.J. Lu - - [BZ #677] - * elf/dl-runtime.c (fixup): Change return type to - DL_FIXUP_VALUE_TYPE. Use DL_FIXUP_VALUE_TYPE, - DL_FIXUP_MAKE_VALUE and DL_FIXUP_VALUE_CODE_ADDR for relocation - values. Use DL_FIXUP_VALUE_ADDR and DL_FIXUP_ADDR_VALUE to - store and retrieve relocation values. - (profile_fixup): Likewise. - * include/link.h (link_map): Use DL_FIXUP_VALUE_TYPE for - l_reloc_result. - * sysdeps/generic/dl-fptr.h (link_map): Forward declaration. - * sysdeps/generic/dl-lookupcfg.h (DL_FIXUP_VALUE_TYPE): New. - (DL_FIXUP_MAKE_VALUE): Likewise. - (DL_FIXUP_VALUE_CODE_ADDR): Likewise. - (DL_FIXUP_VALUE_ADDR): Likewise. - (DL_FIXUP_ADDR_VALUE): Likewise. - * sysdeps/ia64/dl-lookupcfg.h: Include for "struct fdesc". - (DL_FIXUP_VALUE_TYPE): New. - (DL_FIXUP_MAKE_VALUE): Likewise. - (DL_FIXUP_VALUE_CODE_ADDR): Likewise. - (DL_FIXUP_VALUE_ADDR): Likewise. - (DL_FIXUP_ADDR_VALUE): Likewise. - * sysdeps/ia64/dl-machine.h (elf_machine_profile_fixup_plt): Removed. - (elf_machine_profile_plt): Removed. - (elf_machine_fixup_plt): Change return type and type of value - parameter to struct fdesc. - (elf_machine_plt_value): Likewise. - (elf_machine_rela): Use DL_FIXUP_MAKE_VALUE to construct - argument for elf_machine_fixup_plt. - -2005-02-07 Jakub Jelinek - - [BZ #742] - * nscd/nscd.init (reload): Print Reloading nscd: before and a newline - after the status string printed by killproc. - -2004-11-18 Alexandre Oliva - - * manual/.cvsignore: Add dir-add.texi. - -2005-02-06 Richard Henderson - - * sysdeps/alpha/dl-machine.h (elf_machine_rela): Use RESOLVE_MAP - all the time. - -2004-11-03 Marcus Brinkmann - - * configure.in (sysnames): Append sysdeps/generic for each add-on. - * configure: Regenerated. - -2005-02-02 Alfred M. Szmidt - - * sysdeps/mach/hurd/tls.h: Include - (dtv_t): Change pointer type to be a struct which also contains - information whether the memory pointed to is static TLS or not. - - * sysdeps/generic/syslog.c (send_flags) [!send_flags]: Define it. - - * shadow/sgetspent_r.c (FALSE): Macro renamed to ... - (FALSEP): ... this. Updated all references. - - [BZ #765] - * libio/fmemopen.c: Include . - -2005-01-30 Ulrich Drepper - - [BZ #1103] - * nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available. - * nscd/connections.c (send_ro_fd): Likewise. - -2005-01-28 H.J. Lu - - * elf/tst-auditmod1.c: Add ia64 entries. - * sysdeps/generic/ldsodefs.h (La_ia64_regs): New. - (La_ia64_retval): New. - (audit_ifaces): Add ia64 entries. - * sysdeps/ia64/bits/link.h: New file. - * sysdeps/ia64/dl-machine.h (elf_machine_runtime_setup): Test - for dl_profile non-null. - (ARCH_LA_PLTENTER): New. - (ARCH_LA_PLTEXIT): New. - * sysdeps/ia64/dl-trampoline.S (_dl_runtime_resolve): Allocate - only 2 output registers. Allocate stack to save/restore - 8 incoming fp registers. Call _dl_fixup instead of fixup. - (_dl_runtime_profile): Rewrite. - -2005-01-28 Martin Schwidefsky - - * sysdeps/s390/bits/link.h: New file. - * sysdeps/s390/s390-32/dl-trampoline.S: New file. - * sysdeps/s390/s390-64/dl-trampoline.S: New file. - * sysdeps/s390/s390-32/dl-machine.h: Move PLT trampolines to - dl-trampoline.S. Use RESOLVE_MAP instead of RESOLVE to protect - relocation code. - (elf_machine_runtime_setup): Test for dl_profile non-null. - (elf_machine_rela): Remove code using RESOLVE. - (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. - * sysdeps/s390/s390-64/dl-machine.h: Likewise. - * sysdeps/generic/ldsodefs.h (La_s390_32_regs, La_s390_32_retval, - La_s390_64_regs, La_s390_64_retval): New. - * elf/tst-auditmod1.c: Add s390 entries. - - [BZ #743] - * sysdeps/s390/bits/string.h (strlen, strncpy, strcat, strncat, - strncat, memchr, strcmp): Add missing memory clobber. - -2005-01-27 Ulrich Drepper - - * sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_globfree): Also - copy gl_offs. Patch by Sergey Tikhonov . - -2005-01-27 Paolo Bonzini - - [BZ #558] - * posix/regcomp.c (calc_inveclosure): Return reg_errcode_t. - Initialize the node sets in dfa->inveclosures. - (analyze): Initialize inveclosures only if it is needed. - Check errors from calc_inveclosure. - * posix/regex_internal.c (re_dfa_add_node): Do not initialize - the inveclosure node set. - * posix/regexec.c (re_search_internal): If nmatch includes unused - subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here. - - * posix/regcomp.c (parse_bracket_exp) [!RE_ENABLE_I18N]: - Do build a SIMPLE_BRACKET token. - - * posix/regexec.c (transit_state_mb): Do not examine nodes - where ACCEPT_MB is not set. - -2005-01-27 Jakub Jelinek - - * stdlib/tst-fmtmsg.c: Include stdlib.h. - * stdio-common/tst-fmemopen2.c: Include string.h. - * posix/execvp.c: Include stdbool.h. - -2004-12-13 Paolo Bonzini - - Separate parsing and creation of the NFA. Avoided recursion on - the (very unbalanced) parse tree. - [BZ #611] - * posix/regcomp.c (struct subexp_optimize, analyze_tree, calc_epsdest, - re_dfa_add_tree_node, mark_opt_subexp_iter): Removed. - (optimize_subexps, duplicate_tree, calc_first, calc_next, - mark_opt_subexp): Rewritten. - (preorder, postorder, lower_subexps, lower_subexp, link_nfa_nodes, - create_token_tree, free_tree, free_token): New. - (analyze): Accept a regex_t *. Invoke the passes via the preorder and - postorder generic visitors. Do not initialize the fields in the - re_dfa_t that represent the transitions. - (free_dfa_content): Use free_token. - (re_compile_internal): Analyze before UTF-8 optimizations. Do not - include optimization of subexpressions. - (create_initial_state): Fetch the DFA node index from the first node's - bin_tree_t *. - (optimize_utf8): Abort on unexpected nodes, including OP_DUP_QUESTION. - Return on COMPLEX_BRACKET. - (duplicate_node_closure): Fix comment. - (duplicate_node): Do not initialize the fields in the - re_dfa_t that represent the transitions. - (calc_eclosure, calc_inveclosure): Do not handle OP_DELETED_SUBEXP. - (create_tree): Remove final argument. All callers adjusted. Rewritten - to use create_token_tree. - (parse_reg_exp, parse_branch, parse_expression, parse_bracket_exp, - build_charclass_op): Use create_tree or create_token_tree instead - of re_dfa_add_tree_node. - (parse_dup_op): Likewise. Also free the tree using free_tree for - "{0}", and lower OP_DUP_QUESTION to OP_ALT: "a?" is equivalent - to "a|". Adjust invocation of mark_opt_subexp. - (parse_sub_exp): Create a single SUBEXP node. - * posix/regex_internal.c (re_dfa_add_node): Remove last parameter, - always perform as if it was 1. Do not initialize OPT_SUBEXP and - DUPLICATED, and initialize the DFA fields representing the transitions. - * posix/regex_internal.h (re_dfa_add_node): Adjust prototype. - (re_token_type_t): Move OP_DUP_PLUS and OP_DUP_QUESTION to the tokens - section. Add a tree-only code SUBEXP. Remove OP_DELETED_SUBEXP. - (bin_tree_t): Include a full re_token_t for TOKEN. Turn FIRST and - NEXT into pointers to trees. Remove ECLOSURE. - -2004-12-28 Paolo Bonzini - - [BZ #605] - * posix/regcomp.c (parse_bracket_exp): Do not modify DFA nodes - that were already created. - * posix/regex_internal.c (re_dfa_add_node): Set accept_mb field - in the token if needed. - (create_ci_newstate, create_cd_newstate): Set accept_mb field - from the tokens' field. - * posix/regex_internal.h (re_token_t): Add accept_mb field. - (ACCEPT_MB_NODE): Removed. - * posix/regexec.c (proceed_next_node, transit_states_mb, - build_sifted_states, check_arrival_add_next_nodes): Use - accept_mb instead of ACCEPT_MB_NODE. - -2005-01-26 Ulrich Drepper - - [BZ #1100] - * debug/chk_fail.c (__chk_fail): Print program name in final message. - - * sysdeps/unix/sysv/linux/kernel-features.h: Found reference to - MSG_NOSIGNAL being in 2.2 kernels. - -2005-01-26 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/sysdep.h - (SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm. - - [BZ #693] - * posix/regex_internal.h (DUMMY_CONSTRAINT): Rename to... - (WORD_DELIM_CONSTRAINT): ...this. - (NOT_WORD_DELIM_CONSTRAINT): Define. - (re_context_type): Add INSIDE_NOTWORD and NOT_WORD_DELIM, - change WORD_DELIM to use WORD_DELIM_CONSTRAINT. - * posix/regcomp.c (peek_token): For \B create NOT_WORD_DELIM - anchor instead of INSIDE_WORD. - (parse_expression): Handle NOT_WORD_DELIM constraint. - * posix/bug-regex19.c (tests): Adjust tests that relied on \B - being inside word instead of not word delim. - * posix/tst-rxspencer.c (mb_frob_pattern): Don't frob escaped - characters. - * posix/rxspencer/tests: Add some new tests. - -2005-01-14 GOTO Masanori - - [BZ #1108] - * sunrpc/rpc_main.c (s_output): Generate #include - irrespective of Cflag. - - * manual/memory.texi (sbrk): Fix definition. - * manual/string.texi (strcasestr): Fix example typo. - -2005-01-25 Roland McGrath - - * sysdeps/generic/syslog.c [NO_SIGPIPE]: Protect sigpipe_handler decl. - -2005-01-23 Roland McGrath - - [BZ #737] - * sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears - in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS. - * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD] - (SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer - from %gs:0 and add to that value, rather that direct %gs:OFFSET access. - * sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise. - -2005-01-25 Jakub Jelinek - - [BZ #731] - * stdlib/fmtmsg.c (addseverity): Remove new_string variable. - (free_mem): Don't free string. - * stdlib/tst-fmtmsg.c: Include string.h. - (main): Add some more tests. - -2005-01-25 Andreas Schwab - - [BZ #736] - * timezone/asia: Update from tzdata2005c. - * timezone/backward: Likewise. - * timezone/europe: Likewise. - * timezone/leapseconds: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - - [BZ #736] - * timezone/private.h: Update from tzcode2005c. - * timezone/tzfile.h: Likewise. - * timezone/zdump.c: Likewise. - * timezone/zic.c: Likewise. - -2005-01-25 Ulrich Drepper - - * sysdeps/i386/dl-machine.h (elf_machine_rel): Remove code using - RESOLVE. - * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Remove code - using RESOLVE. - * elf/rtld.c (_dl_start): Remove RESOLVE definition. - -2005-01-25 Alan Modra - - * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Test - sym_map, not sym, against zero. - -2005-01-24 Ulrich Drepper - - [BZ #671] - * misc/syslog.c: Moved to... - * sysdeps/generic/syslog.c: ...here. - [NO_SIGIPE]: Don't install SIGPIPE handler. - * sysdeps/unix/sysv/linux/syslog.c: New file. - * sysdeps/unix/sysv/linux/kernel-features.h: Define - __ASSUME_MSG_NOSIGNAL. + * nis/nis_table.c (get_tablepath): Renamed from __get_tablepath. + Adjust all callers. + Free res object content before returning. -2005-01-22 Richard Henderson + * sunrpc/xdr_array.c (xdr_array): Use calloc instead of malloc&bzero. - * sysdeps/alpha/dl-trampoline.S: New file. - * sysdeps/alpha/dl-machine.h: Move PLT trampolines there. - Use RESOLVE_MAP instead of RESOLVE to protect relocation code. - (elf_machine_runtime_setup): Test for dl_profile non-null. - (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. - * sysdeps/alpha/bits/link.h: New file. - * sysdeps/generic/ldsodefs.h (La_alpha_regs, La_alpha_retval): New. - (struct audit_ifaces): Add alpha entries. - * elf/tst-auditmod1.c: Add alpha entries. - -2005-01-22 Ulrich Drepper - - * sysdeps/ia64/dl-machine.h: Remove PLT trampolines here. - * sysdeps/ia64/dl-trampoline.S: New file. - - * sysdeps/x86_64/bits/link.h: Use namespace-safe identifiers in - La_x86_64_xmm definition. - - * posix/Makefile: Use CFLAGS-*.os instead of CFLAGS-*.c for frame - pointer option. - * stdlib/Makefile (CFLAGS-system.os): Use this instead of - CFLAGS-system.c for frame pointer option. - -2005-01-21 Roland McGrath - - * elf/dl-runtime.c (_dl_profile_fixup): Remove const from REGS. - * sysdeps/i386/dl-machine.h: Update decl. - -2005-01-21 Jakub Jelinek - - [BZ #735] - * elf/Makefile: Add rules to build and run tst-align2. - * elf/tst-align2.c: New test. - * elf/tst-alignmod2.c: New file. - * sysdeps/powerpc/tst-stack-align.h: New file. - * sysdeps/i386/dl-machine.h (RTLD_START): Align stack and clear frame - pointer before calling _dl_init. - * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. - -2005-01-20 Ulrich Drepper - - * posix/execl.c: Do not allocate potentially large buffers on the - stack. - * posix/execle.c: Likewise. - * posix/execlp.c: Likewise. - * posix/execvp.c: Likewise. - (script_execute): Removed. - (allocate_scripts_argv): New function. Called at most once to - allocate memory, not every time a script is run. Adjust caller. - - * sysdeps/generic/wordexp.c (exec_comm): Add a few - TEMP_FAILURE_RETRY. Reorganize code to avoid multiple calls to - exec_comm_child. - (exec_comm_child): Can now be inlined. - - * posix/Makefile: Add -fomit-frame-pointer for a few more files. - * stdlib/Makefile: Likewise. - -2005-01-19 Roland McGrath - - [BZ #681] - * sunrpc/openchild.c (_openchild): Use NULL instead of 0 for trailing - argument to execlp. - Reported by Marcus Meissner . - -2005-01-19 Jakub Jelinek - - * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Fix a typo - in assert. - * iconv/strtab.c (strtabfinalize): Likewise. - - * libio/iofopncook.c (_IO_cookie_seekoff): Add prototype. - -2005-01-17 Roland McGrath - - [BZ #745] - * nscd/Makefile (LDLIBS-nscd): New variable. - ($(objpfx)nscd): Use that instead of selinux-LIBS. - - * Makeconfig (link-extra-libs): Define just as $(LDLIBS-$(@F)). - (link-extra-libs-static): Define to $(link-extra-libs). - (link-extra-libs-bounded): Likewise. - -2005-01-17 Ulrich Drepper - - * include/link.h: Remove stray definition of pltenter. - -2005-01-16 GOTO Masanori - - [BZ #734] - * sysdeps/unix/rewinddir.c: Reset filepos. - * dirent/tst-seekdir.c: Check telldir value after calling rewinddir. - -2005-01-15 Ulrich Drepper - - * elf/tst-auditmod1.c: Reduce duplication. - -2005-01-16 Andreas Schwab - - * sysdeps/m68k/dl-machine.h: Remove trampoline code. Define - ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. - (elf_machine_runtime_setup): If profile != 0 does not anymore mean - GLRO(dl_profile) != NULL. - * sysdeps/m68k/dl-trampoline.S: New file. - * sysdeps/m68k/bits/link.h: New file. - * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add m68k - variants. - * elf/tst-auditmod1.c: Add m68k support. - -2005-01-14 Ulrich Drepper - - * posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant - LC_* variable. Patch by Aharon Robbins . - - [BZ #731] - * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. - * stdlib/tst-fmtmsg.c (main): Add another addseverity test. - -2005-01-12 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object_from_fd): We don't have to allow - callers from libc anymore. - - * elf/dl-open.c (dl_open_worker): Pass __RTLD_AUDIT flag from caller - to _dl_map_object_deps. - * elf/dl-load.c (_dl_map_object_from_fd): Don't change memory - protections when loading auditing modules. - - * dlfcn/dlopen.c (dlopen_doit): Catch invalid mode arguments and fail. - - * posix/getconf.c: Update copyright year. - * nss/getent.c: Likewise. - * nscd/nscd_nischeck.c: Likewise. - * iconv/iconvconfig.c: Likewise. - * iconv/iconv_prog.c: Likewise. - * elf/ldconfig.c: Likewise. - * catgets/gencat.c: Likewise. - * csu/version.c: Likewise. - * elf/ldd.bash.in: Likewise. - * elf/sprof.c (print_version): Likewise. - * locale/programs/locale.c: Likewise. - * locale/programs/localedef.c: Likewise. - * nscd/nscd.c (print_version): Likewise. - * debug/xtrace.sh: Likewise. - * malloc/memusage.sh: Likewise. - * malloc/mtrace.pl: Likewise. - * debug/catchsegv.sh: Likewise. - -2005-01-11 Thorsten Kukuk - - [BZ #733] - * sunrpc/svc_tcp.c (svctcp_create): Call listen with SOMAXCONN - as backlog. - * sunrpc/svc_unix.c (svcunix_create): Likewise. - - [BZ #1099] - * grp/putgrent.c (putgrent): Don't write 0 as group - ID if groupname starts with + or -. - * pwd/putpwent.c (putpwent): Don't write 0 as user or - group ID if user name starts with + or -. - -2005-01-09 Kaz Kojima - - * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add sh variants. - * sysdeps/elf/tst-auditmod1.c: Add sh support. - * sysdeps/sh/bits/link.h: New. - * sysdeps/sh/dl-machine.h: Remove trampoline code here. Define - ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. Remove obsolete comments. - (RTLD_START): Define __fpscr_values. - * sysdeps/sh/dl-trampoline.S: New file. - * sysdeps/sh/sh4/dl-trampoline.S: New file. - * sysdeps/sh/sh4/Versions [ld]: Add __fpscr_values. - * sysdeps/sh/sh4/dl-machine.h: Remove. - -2005-01-10 Jakub Jelinek - - [BZ #732] - * time/tst-strptime.c (day_tests): Add 2 new tests. - (test_tm, main): Issue an error instead of segfaulting if - strptime returns NULL. - -2005-01-10 H.J. Lu - - * sysdeps/alpha/libc-tls.c (__tls_get_addr): Updated for dtv_t union. - * sysdeps/ia64/libc-tls.c (__tls_get_addr): Likewise. - -2005-01-11 Ulrich Drepper - - * malloc/malloc.h: Remove no-glibc support. - -2005-01-12 GOTO Masanori - - [BZ #650] - * malloc/malloc.h: Always include features.h. - -2005-01-10 Roland McGrath - - * sysdeps/ia64/fpu/e_logl.c: File removed. - - * dlfcn/dlfcn.c (init): Fix typo in attribute decl. - -2005-01-10 Ulrich Drepper - - * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and - recognition of last entry. - -2005-01-09 Ulrich Drepper - - * elf/dl-runtime.c: Include . - - * elf/Makefile (headers): Add bits/link.h. - -2005-01-09 Andreas Schwab - - * elf/rtld.c (dl_main): Create main_map with __RTLD_OPENEXEC. - -2005-01-09 Andreas Jaeger - - [BZ #732] - * time/strptime_l.c (__strptime_internal): Add braces to avoid - warning. - - * sysdeps/x86_64/bits/link.h: Use vector_size for GCC 4.0. - - * elf/rtld.c (dl_main): Call _dl_add_to_slotinfo only if USE_TLS. - -2005-01-08 Jakub Jelinek - - * elf/Makefile (generated): Add tst-pie1{,.out,.o}. - -2005-01-09 Ulrich Drepper - - * elf/dl-fini.c (_dl_fini): Call destructors of audit DSOs after - those of all the regular objects. - - * elf/dl-debug.c (_dl_debug_initialize): Take extra parameter and - use it to select the r_debug structure for that namespace. - * elf/dl-close.c (_dl_close): Adjust call to _dl_debug_initialize. - * elf/dl-load.c (_dl_map_object_from_fd): Likewise. - * elf/dl-open.c (_dl_open): Likewise. - * elf/rtld.c (dl_main): Likewise. - * sysdeps/generic/ldsodefs.h (struct link_namespaces): Add _ns_debug - member. - (_dl_debug_initialize): Add new parameter in declaration. - - * elf/dl-close.c (_dl_close): Make sure auditing callbacks are not - called for the auditing objects themselves. - * elf/dl-load.c (_dl_map_object_from_fd): Likewise. - -2005-01-07 Ulrich Drepper - - * sysdeps/powerpc/powerpc64/dl-machine.h - (elf_machine_runtime_setup): If profile != 0 does not anymore mean - GLRO(dl_profile) != NULL. - * sysdeps/powerpc/powerpc64/bits/link.h (struct la_ppc64_regs): Add - padding. - * sysdeps/powerpc/powerpc64/dl-trampoline.S: (_dl_profile_resolve): - Extend _dl_prof_resolve to add pass extra parameters to - _dl_profile_fixup and set up structure with register content. - - * sysdeps/powerpc/powerpc32/dl-machine.c (__elf_machine_runtime_setup): - If profile != 0 does not anymore mean GLRO(dl_profile) != NULL. - * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_prof_resolve): - Extend _dl_prof_resolve to add pass extra parameters to - _dl_profile_fixup and set up structure with register content. - * sysdeps/powerpc/powerpc32/bits/link.h: Fix types of some fields in - the register and result structures. - * sysdeps/powerpc/powerpc64/bits/link.h: Fix types of some fields - in the 32-bit register and result structures. - - * sysdeps/powerpc/powerpc64/dl-trampoline.S: Use register names. - - * sysdeps/powerpc/powerpc32/dl-trampoline.S: New file. - * sysdeps/powerpc/powerpc32/dl-machine.h: Remove trampoline code here. - Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. - * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ppc32 variants. - * elf/tst-auditmod1.c: Add ppc32 support. - * sysdeps/powerpc/powerpc32/bits/link.h: New file. - * sysdeps/powerpc/powerpc64/bits/link.h: Add ppc32 definitions. - - * malloc/malloc.c (malloc_printerr): Print program name as part of - error message. - - * misc/sys/cdefs.h (__attribute_warn_unused_result__): Define. - * stdlib/stdlib.h: Make realloc with - __attribute_warn_unused_result__ instead of __wur. - * malloc/malloc.h: Add __wur and __attribute_warn_unused_result__ - markers as in . - - * libio/stdio.h: Remove __wur from rename and remove. - * posix/unistd.h: Remove __wur from dup2. - -2005-01-03 Andreas Jaeger - - * elf/Makefile (tests): Revert patch from 2005-01-03. - -2005-01-07 Ulrich Drepper - - * sysdeps/unix/sysv/linux/init-first.c (__libc_init_first): Don't - make __libc_init_first hidden. - - * elf/rtld.c [!DONT_USE_BOOTSTRAP_MAP] (_dl_start_final): Initialize - l_relocated of rtld map. - * sysdeps/powerpc/powerpc64/dl-trampoline.S: New file. - * sysdeps/powerpc/powerpc64/dl-machine.h: Remove trampoline code here. - Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. - * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ppc64 variants. - * elf/tst-auditmod1.c: Add ppc64 support. - * sysdeps/powerpc/powerpc64/bits/link.h: New file. - -2005-01-06 Roland McGrath - - [BZ #633] - * sysdeps/unix/sysv/linux/futimes.c (__futimes): Catch errno values - indicating file-name lookup errors, and return ENOSYS or EBADF instead. - -2005-01-06 Ulrich Drepper - - * csu/elf-init.c (__libc_csu_fini): Don't do anything here. - * sysdeps/generic/libc-start.c: Don't register program destructor here. - - * dlfcn/Makefile: Add rules to build dlfcn.c. - (LDFLAGS-dl.so): Removed. - * dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer - table. - * dlfcn/dlmopen.c: Likewise for _dl_open. - * dlfcn/dlopen.c: Likewise. - * dlfcn/dlopenold.c: Likewise. - * elf/dl-libc.c: Likewise for _dl_open and _dl_close. - * elf/Makefile (routines): Remove dl-open and dl-close. - (dl-routines): Add dl-open, dl-close, and dl-trampoline. - Add rules to build and run tst-audit1. - * elf/tst-audit1.c: New file. - * elf/tst-auditmod1.c: New file. - * elf/Versions [libc]: Remove _dl_open and _dl_close. - * elf/dl-close.c: Change for use inside ld.so instead of libc.so. - * elf/dl-open.c: Likewise. - * elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization, - signaled by nonzero parameter. - * elf/dl-init.c: Fix use of r_state. - * elf/dl-load.c: Likewise. - - * elf/dl-close.c: Add auditing checkpoints. - * elf/dl-open.c: Likewise. - * elf/dl-fini.c: Likewise. - * elf/dl-load.c: Likewise. - * elf/dl-sym.c: Likewise. - * sysdeps/generic/libc-start.c: Likewise. - * elf/dl-object.c: Allocate memory for auditing information. - * elf/dl-reloc.c: Remove RESOLV. We now always need the map. - Correctly initialize slotinfo. - * elf/dynamic-link.h: Adjust after removal of RESOLV. - * sysdeps/hppa/dl-lookupcfg.h: Likewise. - * sysdeps/ia64/dl-lookupcfg.h: Likewise. - * sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed. - * elf/dl-runtime.c (_dl_fixup): Little cleanup. - (_dl_profile_fixup): New parameters to point to register struct and - variable for frame size. - Add auditing checkpoints. - (_dl_call_pltexit): New function. - Don't define trampoline code here. - * elf/rtld.c: Recognize LD_AUDIT. Load modules on startup. - Remove all the functions from _rtld_global_ro which only _dl_open - and _dl_close needed. - Add auditing checkpoints. - * elf/link.h: Define symbols for auditing interfaces. - * include/link.h: Likewise. - * include/dlfcn.h: Define __RTLD_AUDIT. - Remove prototypes for _dl_open and _dl_close. - Adjust access to argc and argv in libdl. - * dlfcn/dlfcn.c: New file. - * sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE - is gone. - * sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces. - * sysdeps/generic/unsecvars.h: Add LD_AUDIT. - * sysdeps/i386/dl-machine.h: Remove trampoline code here. - Adjust for removal of RESOLVE. - * sysdeps/x86_64/dl-machine.h: Likewise. - * sysdeps/generic/dl-trampoline.c: New file. - * sysdeps/i386/dl-trampoline.c: New file. - * sysdeps/x86_64/dl-trampoline.c: New file. - - * sysdeps/generic/dl-tls.c: Cleanups. Fixup for dtv_t change. - Fix updating of DTV. - * sysdeps/generic/libc-tls.c: Likewise. - - * sysdeps/arm/bits/link.h: Renamed to ... - * sysdeps/arm/bits/linkmap.h: ...this. - * sysdeps/generic/bits/link.h: Renamed to... - * sysdeps/generic/bits/linkmap.h: ...this. - * sysdeps/hppa/bits/link.h: Renamed to... - * sysdeps/hppa/bits/linkmap.h: ...this. - * sysdeps/i386/bits/link.h: Renamed to... - * sysdeps/i386/bits/linkmap.h: ...this. - * sysdeps/ia64/bits/link.h: Renamed to... - * sysdeps/ia64/bits/linkmap.h: ...this. - * sysdeps/s390/bits/link.h: Renamed to... - * sysdeps/s390/bits/linkmap.h: ...this. - * sysdeps/sh/bits/link.h: Renamed to... - * sysdeps/sh/bits/linkmap.h: ...this. - * sysdeps/x86_64/bits/link.h: Renamed to... - * sysdeps/x86_64/bits/linkmap.h: ...this. - - * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] - -2004-12-22 Steven Munroe - - [BZ #602] - * math/libm-test.inc (rint_test_tonearest): New test. - (rint_test_towardzero): New test. - (rint_test_downward): New test. - (rint_test_upward): New test. - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Fix -0.0 case. - Remove redundant const values. - * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Fix -0.0 case. - Remove redundant const values. Use float const. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Fix -0.0 case. - * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Fix -0.0 case. - Use float const. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Fix -0.0 case. - * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Fix -0.0 case. - Use float const. - * sysdeps/powerpc/powerpc32/fpu/s_round.S: Fix -0.0 case. - Remove redundant const values. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Fix -0.0 case. - Remove redundant const values. Use float const. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Fix -0.0 case. - Remove redundant const values. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Fix -0.0 case. - Remove redundant const values. Use float const. - * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Remove redundant const values. - * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Remove redundant const values. - Use float const. - * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. - * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Use float const. - * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. - * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Use float const. - * sysdeps/powerpc/powerpc64/fpu/s_round.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Remove redundant const values. - * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Remove redundant const values. - Use float const. - * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. - * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Use EALIGN for Quadword - alignment. Fix -0.0 case. Remove redundant const values. - Use float const. - -2005-01-06 Ulrich Drepper - - * misc/sys/cdefs.h: Define __wur. - * libio/stdio.h: Use __wur for a number of interfaces. - * posix/unistd.h: Likewise. - * stdlib/stdlib.h: Likewise. - -2004-12-29 Jakub Jelinek - - [BZ #592] - * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Use - libc_hidden_proto instead of HIDDEN_PROTO. - * sysdeps/ia64/fpu/libm-symbols.h (HIDDEN_PROTO): Remove. - (__libm_error_support): If ASSEMBLER and in libc, define to - HIDDEN_JUMPTARGET(__libm_error_support). - -2004-12-28 David Mosberger - - [BZ #592] - * sysdeps/ia64/fpu/Makefile (duplicated-routines): New macro. - (sysdep_routines): Replace libm_ldexp{,f,l} and libm_scalbn{,f,l} - with $(duplicated-routines). - (libm-sysdep_routines): Likewise, but substitute "s_" prefix for - "m_" prefix. - -2004-12-27 David Mosberger - - [BZ #592] - * sysdeps/ia64/fpu/libm-symbols.h: Add include of and - undefine "ret" macro. Add __libm_error_support hidden definitions. - - [BZ #592] - * sysdeps/ia64/fpu/e_lgamma_r.c: Remove CVS-id comment. Add - missing portion of copyright statement. - * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. - * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/w_lgamma.c: Remove CVS-id comment. Add - missing portion of copyright statement. - (__ieee754_lgamma): Rename from lgamma(). Make lgamma() a weak alias. - (__ieee754_gamma): Likewise. - * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal.c: Likewise. - -2004-12-09 H.J. Lu - - [BZ #592] - * sysdeps/ia64/fpu/s_nextafterl.c: Remove. - * sysdeps/ia64/fpu/s_nexttoward.c: Likewise. - * sysdeps/ia64/fpu/s_nexttowardf.c: Likewise. - * sysdeps/ia64/fpu/e_atan2l.S: Remove (duplicate of e_atan2l.c). - * sysdeps/ia64/fpu/e_expl.S: Likewise. - * sysdeps/ia64/fpu/e_logl.c: Remove (conflicts with e_logl.S). - -2004-11-18 David Mosberger - - [BZ #592] - * sysdeps/ia64/fpu/README: New file. - * sysdeps/ia64/fpu/gen_import_file_list: New file. - * sysdeps/ia64/fpu/import_check: Likewise. - * sysdeps/ia64/fpu/import_diffs: Likewise. - * sysdeps/ia64/fpu/import_file.awk: Likewise. - * sysdeps/ia64/fpu/import_intel_libm: Likewise. - * sysdeps/ia64/fpu/libm-symbols.h: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/e_acos.S: Update from Intel libm v2.1+. - * sysdeps/ia64/fpu/e_acosf.S: Likewise. - * sysdeps/ia64/fpu/e_acosl.S: Likewise. - * sysdeps/ia64/fpu/e_asin.S: Likewise. - * sysdeps/ia64/fpu/e_asinf.S: Likewise. - * sysdeps/ia64/fpu/e_asinl.S: Likewise. - * sysdeps/ia64/fpu/e_atan2.S: Likewise. - * sysdeps/ia64/fpu/e_atan2f.S: Likewise. - * sysdeps/ia64/fpu/e_cosh.S: Likewise. - * sysdeps/ia64/fpu/e_coshf.S: Likewise. - * sysdeps/ia64/fpu/e_coshl.S: Likewise. - * sysdeps/ia64/fpu/e_exp.S: Likewise. - * sysdeps/ia64/fpu/e_expf.S: Likewise. - * sysdeps/ia64/fpu/e_fmod.S: Likewise. - * sysdeps/ia64/fpu/e_fmodf.S: Likewise. - * sysdeps/ia64/fpu/e_fmodl.S: Likewise. - * sysdeps/ia64/fpu/e_hypot.S: Likewise. - * sysdeps/ia64/fpu/e_hypotf.S: Likewise. - * sysdeps/ia64/fpu/e_hypotl.S: Likewise. - * sysdeps/ia64/fpu/e_log.S: Likewise. - * sysdeps/ia64/fpu/e_log2.S: Likewise. - * sysdeps/ia64/fpu/e_log2f.S: Likewise. - * sysdeps/ia64/fpu/e_log2l.S: Likewise. - * sysdeps/ia64/fpu/e_logf.S: Likewise. - * sysdeps/ia64/fpu/e_pow.S: Likewise. - * sysdeps/ia64/fpu/e_powf.S: Likewise. - * sysdeps/ia64/fpu/e_powl.S: Likewise. - * sysdeps/ia64/fpu/e_remainder.S: Likewise. - * sysdeps/ia64/fpu/e_remainderf.S: Likewise. - * sysdeps/ia64/fpu/e_remainderl.S: Likewise. - * sysdeps/ia64/fpu/e_scalb.S: Likewise. - * sysdeps/ia64/fpu/e_scalbf.S: Likewise. - * sysdeps/ia64/fpu/e_scalbl.S: Likewise. - * sysdeps/ia64/fpu/e_sinh.S: Likewise. - * sysdeps/ia64/fpu/e_sinhf.S: Likewise. - * sysdeps/ia64/fpu/e_sinhl.S: Likewise. - * sysdeps/ia64/fpu/e_sqrt.S: Likewise. - * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. - * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. - * sysdeps/ia64/fpu/libm_error.c: Likewise. - * sysdeps/ia64/fpu/libm_reduce.c: Likewise. - * sysdeps/ia64/fpu/libm_support.h: Likewise. - * sysdeps/ia64/fpu/s_atan.S: Likewise. - * sysdeps/ia64/fpu/s_atanf.S: Likewise. - * sysdeps/ia64/fpu/s_atanl.S: Likewise. - * sysdeps/ia64/fpu/s_cbrt.S: Likewise. - * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. - * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. - * sysdeps/ia64/fpu/s_ceil.S: Likewise. - * sysdeps/ia64/fpu/s_ceilf.S: Likewise. - * sysdeps/ia64/fpu/s_ceill.S: Likewise. - * sysdeps/ia64/fpu/s_cos.S: Likewise. - * sysdeps/ia64/fpu/s_cosf.S: Likewise. - * sysdeps/ia64/fpu/s_cosl.S: Likewise. - * sysdeps/ia64/fpu/s_expm1.S: Likewise. - * sysdeps/ia64/fpu/s_expm1f.S: Likewise. - * sysdeps/ia64/fpu/s_expm1l.S: Likewise. - * sysdeps/ia64/fpu/s_fabs.S: Likewise. - * sysdeps/ia64/fpu/s_fabsf.S: Likewise. - * sysdeps/ia64/fpu/s_fabsl.S: Likewise. - * sysdeps/ia64/fpu/s_floor.S: Likewise. - * sysdeps/ia64/fpu/s_floorf.S: Likewise. - * sysdeps/ia64/fpu/s_floorl.S: Likewise. - * sysdeps/ia64/fpu/s_frexp.c: Likewise. - * sysdeps/ia64/fpu/s_frexpf.c: Likewise. - * sysdeps/ia64/fpu/s_frexpl.c: Likewise. - * sysdeps/ia64/fpu/s_ilogb.S: Likewise. - * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. - * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. - * sysdeps/ia64/fpu/s_log1p.S: Likewise. - * sysdeps/ia64/fpu/s_log1pf.S: Likewise. - * sysdeps/ia64/fpu/s_log1pl.S: Likewise. - * sysdeps/ia64/fpu/s_logb.S: Likewise. - * sysdeps/ia64/fpu/s_logbf.S: Likewise. - * sysdeps/ia64/fpu/s_logbl.S: Likewise. - * sysdeps/ia64/fpu/s_modf.S: Likewise. - * sysdeps/ia64/fpu/s_modff.S: Likewise. - * sysdeps/ia64/fpu/s_modfl.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. - * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. - * sysdeps/ia64/fpu/s_rint.S: Likewise. - * sysdeps/ia64/fpu/s_rintf.S: Likewise. - * sysdeps/ia64/fpu/s_rintl.S: Likewise. - * sysdeps/ia64/fpu/s_round.S: Likewise. - * sysdeps/ia64/fpu/s_roundf.S: Likewise. - * sysdeps/ia64/fpu/s_roundl.S: Likewise. - * sysdeps/ia64/fpu/s_significand.S: Likewise. - * sysdeps/ia64/fpu/s_significandf.S: Likewise. - * sysdeps/ia64/fpu/s_significandl.S: Likewise. - * sysdeps/ia64/fpu/s_tan.S: Likewise. - * sysdeps/ia64/fpu/s_tanf.S: Likewise. - * sysdeps/ia64/fpu/s_tanl.S: Likewise. - * sysdeps/ia64/fpu/s_trunc.S: Likewise. - * sysdeps/ia64/fpu/s_truncf.S: Likewise. - * sysdeps/ia64/fpu/s_truncl.S: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/e_acosh.S: New file from Intel libm v2.1+. - * sysdeps/ia64/fpu/e_acoshf.S: Likewise. - * sysdeps/ia64/fpu/e_acoshl.S: Likewise. - * sysdeps/ia64/fpu/e_atanh.S: Likewise. - * sysdeps/ia64/fpu/e_atanhf.S: Likewise. - * sysdeps/ia64/fpu/e_atanhl.S: Likewise. - * sysdeps/ia64/fpu/e_exp10.S: Likewise. - * sysdeps/ia64/fpu/e_exp10f.S: Likewise. - * sysdeps/ia64/fpu/e_exp10l.S: Likewise. - * sysdeps/ia64/fpu/e_exp2.S: Likewise. - * sysdeps/ia64/fpu/e_exp2f.S: Likewise. - * sysdeps/ia64/fpu/e_exp2l.S: Likewise. - * sysdeps/ia64/fpu/e_lgamma_r.S: Likewise. - * sysdeps/ia64/fpu/e_lgammaf_r.S: Likewise. - * sysdeps/ia64/fpu/e_lgammal_r.S: Likewise. - * sysdeps/ia64/fpu/e_logl.S: Likewise. - * sysdeps/ia64/fpu/libm_frexp.S: Likewise. - * sysdeps/ia64/fpu/libm_frexpf.S: Likewise. - * sysdeps/ia64/fpu/libm_frexpl.S: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. - * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. - * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. - * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. - * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. - * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. - * sysdeps/ia64/fpu/libm_sincos.S: Likewise. - * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. - * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. - * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. - * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. - * sysdeps/ia64/fpu/s_asinh.S: Likewise. - * sysdeps/ia64/fpu/s_asinhf.S: Likewise. - * sysdeps/ia64/fpu/s_asinhl.S: Likewise. - * sysdeps/ia64/fpu/s_erf.S: Likewise. - * sysdeps/ia64/fpu/s_erfc.S: Likewise. - * sysdeps/ia64/fpu/s_erfcf.S: Likewise. - * sysdeps/ia64/fpu/s_erfcl.S: Likewise. - * sysdeps/ia64/fpu/s_erff.S: Likewise. - * sysdeps/ia64/fpu/s_erfl.S: Likewise. - * sysdeps/ia64/fpu/s_fdim.S: Likewise. - * sysdeps/ia64/fpu/s_fdimf.S: Likewise. - * sysdeps/ia64/fpu/s_fdiml.S: Likewise. - * sysdeps/ia64/fpu/s_fma.S: Likewise. - * sysdeps/ia64/fpu/s_fmaf.S: Likewise. - * sysdeps/ia64/fpu/s_fmal.S: Likewise. - * sysdeps/ia64/fpu/s_fmax.S: Likewise. - * sysdeps/ia64/fpu/s_fmaxf.S: Likewise. - * sysdeps/ia64/fpu/s_fmaxl.S: Likewise. - * sysdeps/ia64/fpu/s_ldexp.c: Likewise. - * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. - * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. - * sysdeps/ia64/fpu/s_nextafter.S: Likewise. - * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. - * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. - * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. - * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. - * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. - * sysdeps/ia64/fpu/s_tanh.S: Likewise. - * sysdeps/ia64/fpu/s_tanhf.S: Likewise. - * sysdeps/ia64/fpu/s_tanhl.S: Likewise. - * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. - * sysdeps/ia64/fpu/w_lgamma.c: Likewise. - * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal.c: Likewise. - * sysdeps/ia64/fpu/w_tgamma.S: Likewise. - * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. - * sysdeps/ia64/fpu/w_tgammal.S: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/e_gamma_r.c: New empty dummy-file. - * sysdeps/ia64/fpu/e_gammaf_r.c: Likewise. - * sysdeps/ia64/fpu/e_gammal_r.c: Likewise. - * sysdeps/ia64/fpu/w_acosh.c: Likewise. - * sysdeps/ia64/fpu/w_acoshf.c: Likewise. - * sysdeps/ia64/fpu/w_acoshl.c: Likewise. - * sysdeps/ia64/fpu/w_atanh.c: Likewise. - * sysdeps/ia64/fpu/w_atanhf.c: Likewise. - * sysdeps/ia64/fpu/w_atanhl.c: Likewise. - * sysdeps/ia64/fpu/w_exp10.c: Likewise. - * sysdeps/ia64/fpu/w_exp10f.c: Likewise. - * sysdeps/ia64/fpu/w_exp10l.c: Likewise. - * sysdeps/ia64/fpu/w_exp2.c: Likewise. - * sysdeps/ia64/fpu/w_exp2f.c: Likewise. - * sysdeps/ia64/fpu/w_exp2l.c: Likewise. - * sysdeps/ia64/fpu/w_expl.c: Likewise. - * sysdeps/ia64/fpu/e_expl.S: Likewise. - * sysdeps/ia64/fpu/w_lgamma_r.c: Likewise. - * sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise. - * sysdeps/ia64/fpu/w_lgammal_r.c: Likewise. - * sysdeps/ia64/fpu/w_log2.c: Likewise. - * sysdeps/ia64/fpu/w_log2f.c: Likewise. - * sysdeps/ia64/fpu/w_log2l.c: Likewise. - * sysdeps/ia64/fpu/w_sinh.c: Likewise. - * sysdeps/ia64/fpu/w_sinhf.c: Likewise. - * sysdeps/ia64/fpu/w_sinhl.c: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/libm_atan2_reg.S: Remove. - * sysdeps/ia64/fpu/s_ldexp.S: Likewise. - * sysdeps/ia64/fpu/s_ldexpf.S: Likewise. - * sysdeps/ia64/fpu/s_ldexpl.S: Likewise. - * sysdeps/ia64/fpu/s_scalbn.S: Likewise. - * sysdeps/ia64/fpu/s_scalbnf.S: Likewise. - * sysdeps/ia64/fpu/s_scalbnl.S: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/s_sincos.c: Make it an empty dummy-file. - * sysdeps/ia64/fpu/s_sincosf.c: Likewise. - * sysdeps/ia64/fpu/s_sincosl.c: Likewise. - - [BZ #592] - * sysdeps/ia64/fpu/e_atan2l.S: Add "Not needed" comment. - - [BZ #592] - * sysdeps/ia64/fpu/s_copysign.S: Add __libm_copysign{,f,l} - alias for use by libm_error.c - - [BZ #592] - * sysdeps/ia64/fpu/Makefile (libm-sysdep_routines): Remove - libm_atan2_reg, libm_tan, libm_frexp4{f,l}. - Mention s_erfc{,f,l}, libm_frexp{,f,l}, libm_ldexp{,f,l}, - libm_sincos{,f,l}, libm_sincos_large, libm_lgamma{,f,l}, - libm_scalbn{,f,l}, libm_scalblnf. - (sysdep_routines): Remove libm_frexp4{,f,l}. - Mention libm_frexp{,f,l}, libm_ldexp{,f,l}, and libm_scalbn{,f,l}. - (sysdep-CPPFLAGS): Add -include libm-symbols.h, -D__POSIX__, - _D_LIB_VERSIONIMF=_LIB_VERSION, -DSIZE_LONG_INT_64, and - -DSIZE_LONG_LONG_INT_64. - -2005-01-05 Steven Munroe - - [BZ #729] - * elf/rtld.c (dl_main) [NEED_DL_SYSINFO_DSO]: Insure l_map_end and - l_text_end are set for a VDSO with a single PT_LOAD entry. - -2005-01-05 Ulrich Drepper - - [BZ #730] - * libio/iofopncook.c (_IO_cookie_seekoff): Define. Mark offset as - invalid to disable optimizations in fileops which won't work here. - (_IO_cookie_jumps): Use it. - (_IO_old_cookie_jumps): Likewise. - * libio/fmemopen.c (fmemopen_seek): Result must be returned in *P, - not the return value. - * stdio-common/Makefile (tests): Add tst-fmemopen2. - * stdio-common/tst-fmemopen2.c: New file. - - * sysdeps/unix/sysv/linux/bits/waitflags.h: Define __WNOTHREAD. - -2005-01-05 Roland McGrath - - * configure.in (libc_cv_cpp_asm_debuginfo): Checked moved ... - * sysdeps/i386/configure.in: ... here. New file. - -2005-01-03 Ulrich Drepper - - [BZ #727] - * sysdeps/generic/libc-start.c [SHARED] (__libc_start_main): Don't - initialize __environ again. - * stdlib/Makefile: Add rules to build and run tst-putenv. - * stdlib/tst-putenv.c: New file. - * stdlib/tst-putenvmod.c: New file. - - * sysdeps/unix/sysv/linux/init-first.c: Clean file up. Don't - define unnecessary wrappers or aliases of static functions. - -2005-01-03 Andreas Jaeger - - * csu/Makefile (generated): Add start.os and start.ob. - - * elf/Makefile (tests): Change rule for tst-pie1 so that make - clean works. - -2004-12-29 Roland McGrath - - [BZ #626] - * sysdeps/unix/alarm.c (alarm): Round return value to nearest rather - than always up; when nearest is zero, round up to one. - -2004-12-28 Ulrich Drepper - - * po/es.po: Update from translation team. - - [BZ #726] - * sysdeps/generic/dl-tls.c (__tls_get_addr): Fix typo. - -2004-12-27 Ulrich Drepper - - [BZ #744] - * include/signal.h: Define __sigemptyset. - -2004-04-27 Paolo Bonzini - - * posix/regex_internal.h (struct re_dfastate_t): Make - word_trtable a pointer to the 512-item transition table. - * posix/regexec.c (build_trtable): Fill in either state->trtable - or state->word_trtable. Return a boolean indicating success. - (transit_state): Expect state->trtable to be a 256-item - transition table. Reorganize code to have less tests in - the common case, and to save an indentation level. - * posix/regex_internal.c (free_state): Free word_trtable. - -2004-12-21 Jakub Jelinek - - [BZ #723] - * sysdeps/unix/sysv/linux/i386/clone.S (__clone): Make sure %esp when - calling fn is 16 byte aligned. - * sysdeps/i386/tst-stack-align.h: New file. - - [BZ #725] - * misc/efgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. - (ecvt_r): Special case denormals. - * misc/qefgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. - * misc/tst-efgcvt.c: Include float.h. - (ecvt_tests): Add 2 new tests. + * sunrpc/key_call.c (__rpc_thread_key_cleanup): Also free + client->cl_auth. -2004-12-20 Roland McGrath + * sunrpc/rpc_thread.c (__rpc_thread_destroy): Don't skip entire + cleanup for initial thread, just the free call on TVP. - * version.h (RELEASE, VERSION): development, 2.3.90 - * include/features.h (__GLIBC_MINOR__): Now 4. + * nscd/gai.c (__getline): Define. -See ChangeLog.15 for earlier changes. +See ChangeLog.16 for earlier changes. diff -uprN glibc-2.4/ChangeLog.16 glibc-2.5/ChangeLog.16 --- glibc-2.4/ChangeLog.16 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/ChangeLog.16 2006-05-04 16:05:24.000000000 +0000 @@ -0,0 +1,13377 @@ +2006-05-03 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Implement configuration file + handling. /etc/gai.conf can contain replacements for the label + and precedence table. Fix byte order of default label and + precedence table. + * posix/gai.conf: New file. + * posix/tst-rfc3484.c: Adjust for changes to getaddrinfo.c. + * posix/tst-rfc3484-2.c: Likewise. + +2006-05-02 Ulrich Drepper + + [BZ #1201] + * posix/regex.h: g++ still cannot handled [restrict]. + + [BZ #2509] + * stdio-common/vfprintf.c (process_arg): Fix reading of signed + short and byte values from parameter list. + * stdio-common/tst-printf.c (main): Add more tests. + * stdio-common/tst-printf.sh: Adjust for tst-printf.c change. + + * iconvdata/testdate/MIK: Fix format to match expected output. + + [BZ #2632] + * nscd/connections.c (nscd_init): Correct initialization of + in-memory database structure. + +2006-05-02 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Fix MADV_REMOVE value. + * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. + +2006-05-01 Ulrich Drepper + + [BZ #2502] + * iconvdata/utf-7.c: Don't require more than one character after + the '+' sign starting Unicode shifted sequences. + + * misc/tsearch.c (__tdelete): Remove unnecessary test + [Coverity CID 75]. + + * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Print error + message for invalid DWARF data instead of crashing. + + * nis/nss_nis/nis-pwd.c (internal_nis_getpwent_r): Don't try to + free outkey in error case when batch_read is set. + + * nis/nss_nis/nis-grp.c (internal_nis_getgrent_r): Don't try to + free outkey in error case when batch_read is set [Coverity CID 196]. + + [BZ #2517] + * misc/sys/queue.h: Update to more recent version. + +2006-05-01 Alexander Shopov + + [BZ #2625] + * iconvdata/Makefile (modules): Added MIK. + (distribute): Added mik.c. + (gen-8bit-gap-modules): Added mik. + * iconvdata/TESTS: Added MIK. + * iconvdata/gconv-modules: Added MIK. + * iconvdata/tst-tables.sh: Added MIK. + * iconvdata/mik.c: New file. + * iconvdata/testdata/MIK: New file. + * iconvdata/testdata/MIK..UTF8: New file. + +2006-04-30 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): Move state change + notification... + (lose): ...to here. + + * posix/Makefile (tests): Add tst-getaddrinfo3. + * posix/tst-getaddrinfo3.c: New file. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Add parenthesis in test + for better readability. + + * nscd/nscd.h (struct database_dyn): Change filename to an array + to avoid relocations. + + * elf/ldd.bash.in: If --verify loop fails to find a dynamic linker + for the file don't just try the first one listed in RTLDLIST + again. We already have the status. + + * nis/nss_nisplus/nisplus-publickey.c (parse_grp_str): PIDLIST is + supposed to have NGRPS elements. + + * nis/nss_nisplus/nisplus-parser.c: Minor optimizations and + cleanups. Avoid copying data if it can be used in the old place. + +2006-04-29 Ulrich Drepper + + * nis/nss_nisplus/nisplus-ethers.c: Add missing null pointer check. + * nis/nss_nisplus/nisplus-hosts.c: Likewise. + * nis/nss_nisplus/nisplus-network.c: Likewise. + * nis/nss_nisplus/nisplus-proto.c: Likewise. + * nis/nss_nisplus/nisplus-rpc.c: Likewise. + * nis/nss_nisplus/nisplus-service.c: Likewise. + * nis/nss_nisplus/nisplus-spwd.c: Likewise. + + * nis/nisplus-parser.h (_nss_nisplus_parse_pwent): Add entry + parameter. + (_nss_nisplus_parse_pwent_chk): New prototype. + * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_pwent): + Add entry parameter. Use it for column value in all accesses. + Move checks for well-formed reply to... + (_nss_nisplus_parse_pwent_chk): ...here. New function. + * nis/nss_nisplus/nisplus-pwd.c: Support SETENT_BATCH_READ option. + + * nis/nss_nisplus/nisplus-parser.c: Some cleanups. Remove + hidden_def definitions. + * nis/nisplus-parser.h: Add parameter names. Remove hidden_proto + definitions. + +2006-04-28 Ulrich Drepper + + * nis/nss_nis/nis-spwd.c (internal_nis_getspent_r): Remove data + variable. + + * nis/nss-nis.h: Define response_t and intern_t. Declare _nis_saveit. + * nis/nss_nis/nis-pwd.c: Remove response_t and intern_t definition. + (saveit): Renamed to _nis_saveit. Take parameter which is pointer + to the intern_t object. Change all users. + * nis/nss_nis/nis-grp.c: Remove response_t, intern_t, and saveit + definition. Use _nis_saveit instead of saveit. + * nis/nss_nis/nis-service.c: Likewise. + * nis/nss_nis/nis-initgroups.c: Likewise. + (internal_setgrent): Adjust for buffer handling. + (internal_getgrent_r): Likewise. + * nis/nss_nis/nis-rpc.c: Likewise. + + * nis/nss-default.c (vars): Add SETENT_BATCH_READ. + * nis/nss: Document SETENT_BATCH_READ. + * nis/libnsl.h: Define NSS_FLAG_SETENT_BATCH_READ. + * nis/nss_nis/nis-service.c (saveit): Don't add NUL byte if the + string is already NUL terminated. + (internal_nis_endservent): No need to return anything. Change callers. + (internal_nis_setservent): One more initialization. + * nis/nss_nis/nis-pwd.c: Support SETENT_BATCH_READ option. + * nis/nss_nis/nis-grp.c: Likewise. + + * nis/nss-default.c (init): Rewrite parser to get the variables + from a table. + + * nis/nss_nis/nis-service.c: Avoid passing pointer to static + variable around. Reduce number of memory allocations by creating + list of memory pools. + + * nis/ypclnt.c (__xdr_ypresp_all): Minor optimization in string + handling. Fix typo in comment. + +2006-04-27 Ulrich Drepper + + * nscd/connections.c (restart): If we want to switch back to the + old ID use setresuid and setresgid. + (finish_drop_privileges): Likewise. + +2006-04-27 Jakub Jelinek + + * nscd/nscd.conf: Fix a typo. + +2006-04-27 Ulrich Drepper + + [BZ #2611] + * stdio-common/renameat.c (renameat): Fix typo. + +2006-04-26 Roland McGrath + + * Makeconfig (%.v.i rule): Don't use -DASSEMBLER. + The predefined __ASSEMBLER__ is sufficient. + +2006-04-26 Ulrich Drepper + + [BZ #1386] + * iconvdata/ibm932.c: Change mapping to allow round-trips. + * iconvdata/ibm943.c: Likewise. + Patch by Masahide Washizawa . + + * sysdeps/unix/sysv/linux/syscalls.list: Add vmsplice. + * sysdeps/unix/sysv/linux/Versions: Export vmsplice@@GLIBC_2.5. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Declare vmsplice. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. + + * sysdeps/unix/sysv/linux/bits/uio.h: Fix a typo in a comment. + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix typo which caused + errors not to be reported. + + * nscd/nscd.h (struct database_dyn): Add propagate field. + * nscd/nscd_conf.c (nscd_parse_file): Parse auto-propagate lines. + * nscd/nscd.conf: Add auto-propagate lines. + * nscd/connections.c (dbs): Initialize .propagate fields. + * nscd/grpcache.c (cache_addgr): Do not add ID entry for name lookups + and vice versa if propagation is disabled for the database. + * nscd/pwdcache.c (cache_addpw): Likewise. + +2006-04-26 James Antill + Ulrich Drepper + + * config.make.in: Add have-libcap. + * configure.in: Check for libcap. + * nscd/Makefile (selinux-LIBS): Add -lcap if possible. + * nscd/connections.c (finish_drop_privileges): When libcap is available + call preserve_capabilities and install_real_capabilities. + * nscd/selinux.c: Define preserve_capabilities and + install_real_capabilities. + * nscd/selinux.h: Declare preserve_capabilities and + install_real_capabilities. + +2006-04-26 Ulrich Drepper + + * locale/iso-4217.def: Update. + +2006-04-25 Ulrich Drepper + + [BZ #2420] + * stdlib/strfmon_l.c (__vstrfmon_l): Fix handling of ! modifier. + * localedata/Makefile: Add rules to build and run tst-strfmon1. + * localedata/tst-strfmon1.c: New file. + + [BZ #2571] + * nscd/nscd_helper.c (__nscd_get_map_ref): Make mapptr argument a + volatile pointer so that the mapptr->mapped value is re-read after + the lock is retrieved. + * nscd/nscd-client.h: Update __nscd_get_map_ref prototype. + + * include/features.h [_GNU_SOURCE] (_POSIX_C_SOURCE): Define to + 200112L. + + * resolv/res_hconf.c: Minor surgery to 'cmd' and the referenced + functions to avoid relocations. + + [BZ #2389] + * resolv/res_hconf.c: Remove 'order' parsing. Just ignore the line. + * resolv/res_hconf.h: Remove Name_Service definition. + (struct hconf): Replace service related fields with placeholders. + + [BZ #2386] + * sysdeps/unix/sysv/linux/ia64/clone2.S: Check for NULL stack + pointers to match other architectures. + * sysdeps/unix/sysv/linux/Makefile [subdirs=misc] (tests): Add + tst-clone. + * sysdeps/unix/sysv/linux/tst-clone.c: New file. + + [BZ #2072] + * stdio-common/printf_fp.c: Fix potential memory leaks for + malloc'ed wbuffer which isn't freed in error conditions. + + [BZ #2569] + * iconv/gconv_db.c (__gconv_release_step): Fix condition of assert + call. + * iconvdata/Makefile (tests): Add tst-iconv6. + * iconvdata/tst-iconv6.c: New file. + +2006-04-24 Ulrich Drepper + + * posix/tst-rfc3484.c (do_test): Also initialize source_addr_flags + field. + * posix/tst-rfc3484-2.c (do_test): Likewise. + + * posix/tst-rfc3484.c: Include early. + * posix/tst-rfc3484-2.c: Likewise. + + * version.h (VERSION): Bump to 2.4.90 for the trunk. + +2006-04-24 Jakub Jelinek + + * malloc/arena.c (ptmalloc_init): Don't call __malloc_check_init + if MALLOC_CHECK_ env var contains an empty string. + +2006-04-24 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Always initialize in6ai. + +2006-04-24 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range): Use + __LONG_LONG_PAIR macro. + + * posix/bits/unistd.h (__readlinkat_chk): New prototype. + (__readlinkat_alias): New alias. + (readlinkat): New inline function. + * include/unistd.h (readlinkat): Add libc_hidden_proto. + * sysdeps/unix/sysv/linux/readlinkat.c (readlinkat): Add + libc_hidden_def. + * io/readlinkat.c (readlinkat): Likewise. + * debug/readlinkat_chk.c: New file. + * debug/Makefile (routines): Add readlinkat_chk. + * debug/Versions (libc): Export __readlinkat_chk@@GLIBC_2.5. + * debug/tst-chk1.c (do_test): Add readlinkat tests. + +2006-04-23 Ulrich Drepper + + * nis/nss_nisplus/nisplus-netgrp.c: Cleanups. + + [BZ #1951] + * sysdeps/posix/sigset.c (sigset): Return correct value reflecting + previous signal state. + * signal/Makefile (tests): Add tst-sigset2. + * signal/tst-sigset2.c: New file. + +2006-04-21 Jakub Jelinek + + * argp/argp.h (__option_is_short): Check upper limit of + __key. isprint() requires its argument to have the value + of an unsigned char or EOF. + Patch by Sergey Poznyakoff . + +2006-04-21 Ulrich Drepper + + [BZ #2534, BZ #2535] + * posix/regex.h: Remove obsolete comment and special + handling for VMS. + + * iconvdata/ibm437.c: Define HAS_HOLES to 0. + * iconvdata/ibm861.c: Likewise. + * iconvdata/ibm862.c: Likewise. + * iconvdata/ibm863.c: Likewise. + * iconvdata/ibm865.c: Likewise. + Reported by . + +2006-04-19 Ulrich Drepper + + * include/ifaddrs.h: Get uint32_t definition. + * posix/tst-rfc3484.c: Update fake __check_pf implementation. + * posix/tst-rfc3484-2.c: Likewise. + + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_PROC_SELF_FD_SYMLINK. + * sysdeps/unix/sysv/linux/ttyname.c: Cleanups. Avoid compatibility + code is possible. Move compatibility code in .text.compat section. + * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. + +2006-04-18 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Rewrite to avoid loop + over gaih array. There is only one function to call in the moment. + +2006-04-16 Ulrich Drepper + + * include/ifaddrs.h: Define struct in6addrinfo. + Add two more parameters to __check_pf. + * sysdeps/unix/sysv/linux/check_pf.c: When using the netlink + interface, determine whether IPv6 addresses are deprecated or + temporary. Create array of those addresses. + * inet/check_pf.c: Always tell caller there are no depracated + and temporary addresses. + * sysdeps/posix/getaddrinfo.c: Pretty printing. + (struct sort_result): Add source_addr_flags field. + (rfc3484_sort): Implement rule 3 and 7. + (in6aicmp): New function. + (getaddrinfo): Call __check_pf also when we need info about IPv6 + source addresses. When creating array for sorting addresses, + look up deprecated and temporary addresses returned by __check_pf + and add flag if necessary. + +2006-04-15 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Fix precedence for IP V4-to-V6 + mapped addresses. + * posix/Makefile (tests): Add tst-rfc3484-2. + * posix/tst-rfc3484-2.c: New file. + + * nis/nss_nisplus/nisplus-publickey.c: Minor cleanups throughout. + * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_parse_servent): + Significant cleanups. Correct adjustment for pointer array. + * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent): + Likewise. + * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_parse_protoent): + Likewise. + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_parse_netent): + Likewise. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): + Likewise. + +2006-04-14 Ulrich Drepper + + * sysdeps/unix/sysv/linux/syscalls.list: Add tee syscall. + * sysdeps/unix/sysv/linux/Versions: Export tee@GLIBC_2.5. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Add prototype for tee. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. + + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_parse_etherent): + Minor cleanups. NUL terminate name string. + + * nis/Versions: No need to export _nss_nisplus_parse_grent, + _nss_nisplus_parse_pwent, and _nss_nisplus_parse_spent. + + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_parse_aliasent): + Avoid unnecessary allocation. Fix adjustment for pointer value. + + * nis/nss_nisplus/nisplus-parser.c: Cleanups, use NIS_RES_* + macros. Avoid unnecessary allocation. + + * sysdeps/unix/sysv/linux/sync_file_range.c: New file. + +2006-04-13 Ulrich Drepper + + * nis/Makefile (libnsl-routimes): Add nss-default. + * nis/Versions (libnsl) [GLIBC_PRIVATE]: Export _nsl_default_nss. + * nis/nss-nis.c: Move /etc/default/nss handling to... + * nis/nss-default.c: ...here. New file. + * nis/libnsl.h: New file. + * nis/nss-nis.h: Remove NSS_FLAG_* definitions and _nis_default_nss + plus auxilary definitions. + * nis/nss_nis/nis-initgroups.c: Use _nsl_default_nss instead of + _nis_default_nss. + * nis/nss_nis/nis-service.c: Likewise. + +2006-04-07 Steven Munroe + + * sysdeps/powerpc/fpu/bits/mathinline.h + [__WORDSIZE == 64 || _ARCH_PWR4]: Define __CPU_HAS_FSQRT. + (__ieee754_sqrt): Fix comment. + (__ieee754_sqrtf): Fix comment. + * sysdeps/powerpc/fpu/e_sqrt.c (__ieee754_sqrt): Fix comment. + Check __CPU_HAS_FSQRT instead of dl_hwcap. + * sysdeps/powerpc/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise. + +2006-04-08 Ulrich Drepper + + * inet/inet_ntoa.c: Rewrite to use TLS instead of TSD. + + * nis/nss_nis/nis-alias.c: Optimize use of yperr2nss. Avoid calling + it for YPERR_SUCCESS. Minor cleanups. Add __builtin_expect. + * nis/nss_nis/nis-ethers.c: Likewise. + * nis/nss_nis/nis-grp.c: Likewise. + * nis/nss_nis/nis-hosts.c: Likewise. + * nis/nss_nis/nis-initgroups.c: Likewise. + * nis/nss_nis/nis-netgrp.c: Likewise. + * nis/nss_nis/nis-network.c: Likewise. + * nis/nss_nis/nis-proto.c: Likewise. + * nis/nss_nis/nis-publickey.c: Likewise. + * nis/nss_nis/nis-pwd.c: Likewise. + * nis/nss_nis/nis-rpc.c: Likewise. + * nis/nss_nis/nis-service.c: Likewise. + * nis/nss_nis/nis-spwd.c: Likewise. + + * nis/nis_ping.c: Remove unnecessary conditionals before + nis_freeresult calls. + * nis/nis_ismember.c: Likewise. + + * elf/rtld.c (process_envvars): Fix handling of LD_POINTER_GUARD. + Reported by genesh@comcast.net. + + * io/fts.c (fts_build): Call fts_lfree in the two error cases + after the loop [Coverity CID 187]. + + * nis/nis_getservlist.c (nis_getservlist): Also free lookup result + in error case [Coverity CID 189]. + + * nis/nis_getservlist.c (nis_getservlist): One more free call + needed [Coverity CID 190]. + +2006-04-07 Jakub Jelinek + + * sysdeps/generic/unwind-dw2-fde.c (end_fde_sort): Remove + unnecessary test for accu->linear == NULL [Coverity CID 79]. + +2006-04-07 Ulrich Drepper + + * sysdeps/posix/tempname.c (__gen_tempname): Change attempts_min + into a macro. Use preprocessor to decide how to initialize + attempts [Coverity CID 67]. + + * io/fts.c (fts_build): Comment out dead code [Coverity CID 68]. + + * sunrpc/rpc_parse.c (def_union): Comment out dead code + [Coverity CID 70]. + + * locale/programs/linereader.c (lr_token): Remove duplicate + handling of EOF [Coverity CID 71]. + + * locale/programs/ld-numeric.c (numeric_read) [case tok_grouping]: + We bail out early if ignore_content is set, so there is no need to + check it later again [Coverity CID 72]. + + * inet/inet6_option.c (inet6_option_find): Check *tptrp for NULL, + not tptrp [Coverity CID 73]. + + * inet/inet6_option.c (inet6_option_next): Check *tptrp for NULL, + not tptrp [Coverity CID 74]. + + * misc/tsearch.c (__tsearch): Don't rotate tree if memory + allocation failed [Coverity CID 78]. + +2006-04-07 Jakub Jelinek + + * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Fix typo in + the last change. + +2006-04-07 Ulrich Drepper + + * inet/rexec.c (rexec_af): If we have no canonical name don't + proceed further [Coverity CID 86]. + + * iconv/iconv_charmap.c (process_fd): Initialize inptr from inbuf, + not to NULL [Coverity CID 88]. + +2006-04-06 Ulrich Drepper + + * elf/ldconfig.c (main): Use rawmemchr instead of strchr. + * nis/nis_call.c (rec_dirsearch): Likewise. + * nis/nis_local_names.c (nis_local_host): Likewise. + (nis_local_directory): Likewise. + * intl/explodename.c (_nl_explode_name): Likewise. + + * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Don't handle + DW_CFA_GNU_window_save if it obviously cannot work [Coverity CID 102]. + + * locale/programs/ld-address.c (address_finish): Fix conditions + for error messages [Coverity CID 104]. + + * libio/fmemopen.c (fmemopen): Free stream memory in case of + invalid length [Coverity CID 106]. + + * nss/nss_files/files-key.c (search): Close stream before + successful return [Coverity CID 107]. + + * io/fts.c (fts_open): Don't allocate parent if *argv==NULL + [Coverity CID 108]. + + * sunrpc/rpc_cout.c (inline_struct): Free sizestr after use + [Coverity CID 110, 109]. + + * sunrpc/rpc_scan.c (docppline): Free file string if it is not + going to be used [Coverity CID 111]. + + * sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free + memory if socket level value cannot be retrieved [Coverity CID 112]. + + * nis/nis_clone_dir.c (nis_clone_directory): Free all memory in + error case [Coverity CID 114]. + + * nis/nis_clone_res.c (nis_clone_result): Free all memory in the + error cases [Coverity CID 115]. + + * sunrpc/rpc_parse.c (get_definition): Free defp if tok == + TOK_EOF [Coverity CID 116]. + + * sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free + memory if socket level value cannot be retrieved [Coverity CID 117]. + + * elf/cache.c (save_cache): Initialize pad to avoid writing + uninitialized data to disk. + + * elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118]. + + * intl/finddomain.c (_nl_find_domain): Avoid strdup of expand + locale name, use strdupa. Remove free call [Coverity CID 119]. + + * sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and + the resulting leak [Coverity CID 121]. + + * sunrpc/rpc_main.c (mkfile_output): Free all allocated memory + [Coverity CID 122]. + + * sunrpc/rpc_main.c (h_output): Free guard after we are done + [Coverity CID 123]. + + * sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation + fails [Coverity CID 126]. + + * sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error + cases [Coverity CID 127]. + + * nis/nis_table.c (__create_ib_request): Free ibreq in case strdup + fails [Coverity CID 128]. + + * nis/nis_getservlist.c (nis_getservlist): Free all memory in case + of an error [Coverity CID 130, 129]. + + * nis/nis_print_group_entry.c (nis_print_group_entry): If + nis_lookup call failed, return. Free lookup result in error + cases [Coverity CID 131]. + + * nis/nis_removemember.c (nis_removemember): Free all memory in + error cases [Coverity CID 132]. + + * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): + Always free lookup result [Coverity CID 134]. + + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r): + Always free lookup result [Coverity CID 135]. + + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): + Always free lookup result [Coverity CID 136]. + + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): + Before retrying, free old result [Coverity CID 137]. + + * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): + Free res in case UID is zero [Coverity CID 138]. + + * nis/ypclnt.c (yp_update): Always free master string + [Coverity CID 140]. + + * nis/nis_creategroup.c (nis_creategroup): Free all memory in + error cases [Coverity CID 143, 142, 141]. + + * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result + if yp_match call succeeded [Coverity CID 155]. + + * nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string + allocated in yp_match at all times [Coverity CID 157, 156]. + + * nscd/nscd.c (write_pid): Close stream also if writing failed + [Coverity CID 165]. + + * nis/nis_table.c (nis_add_entry): Move test for NULL parameter + ahead of first use [Coverity CID 167]. + + * nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test + for NULL parameter ahead of first use [Coverity CID 168]. + + * intl/finddomain.c (_nl_find_domain): We never return NULL if we + found the locale [Coverity CID 169]. + + * inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set + herrno [Coverity CID 178]. + + * nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned + freed object [Coverity CID 182]. + +2006-04-05 Alan Modra + Jakub Jelinek + + * posix/bits/unistd.h (readlink, __readlink_chk, __readlink_alias): + Change return value to ssize_t. + +2006-04-04 Roland McGrath + + * string/Makefile (CFLAGS-inl-tester.c): New variable. + (CFLAGS-tst-inlcall.c): Likewise. + + [BZ #2508] + * nscd/Makefile ($(objpfx)nscd_stat.o: sysincludes): Move setting + inside [$(have-selinux) = yes]. + ($(objpfx)selinux.o: sysincludes): Likewise. + + * iconvdata/Makefile (generate-8bit-table): Use LC_ALL=C. + (generate-8bit-gap-table): Likewise. + ($(objpfx)iso8859-7jp.stmp): Likewise. + Reported by S.Çağlar Onur . + +2006-03-21 Joseph S. Myers + + * soft-fp/adddf3.c: Add libgcc exception. Update FSF address. + * soft-fp/addsf3.c: Likewise. + * soft-fp/addtf3.c: Likewise. + * soft-fp/divdf3.c: Likewise. + * soft-fp/divsf3.c: Likewise. + * soft-fp/divtf3.c: Likewise. + * soft-fp/double.h: Likewise. + * soft-fp/eqdf2.c: Likewise. + * soft-fp/eqsf2.c: Likewise. + * soft-fp/eqtf2.c: Likewise. + * soft-fp/extenddftf2.c: Likewise. + * soft-fp/extended.h: Likewise. + * soft-fp/extendsfdf2.c: Likewise. + * soft-fp/extendsftf2.c: Likewise. + * soft-fp/fixdfdi.c: Likewise. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * soft-fp/fixunsdfdi.c: Likewise. + * soft-fp/fixunsdfsi.c: Likewise. + * soft-fp/fixunssfdi.c: Likewise. + * soft-fp/fixunssfsi.c: Likewise. + * soft-fp/fixunstfdi.c: Likewise. + * soft-fp/fixunstfsi.c: Likewise. + * soft-fp/floatdidf.c: Likewise. + * soft-fp/floatdisf.c: Likewise. + * soft-fp/floatditf.c: Likewise. + * soft-fp/floatsidf.c: Likewise. + * soft-fp/floatsisf.c: Likewise. + * soft-fp/floatsitf.c: Likewise. + * soft-fp/floatundidf.c: Likewise. + * soft-fp/floatundisf.c: Likewise. + * soft-fp/floatunditf.c: Likewise. + * soft-fp/floatunsidf.c: Likewise. + * soft-fp/floatunsisf.c: Likewise. + * soft-fp/floatunsitf.c: Likewise. + * soft-fp/gedf2.c: Likewise. + * soft-fp/gesf2.c: Likewise. + * soft-fp/getf2.c: Likewise. + * soft-fp/ledf2.c: Likewise. + * soft-fp/lesf2.c: Likewise. + * soft-fp/letf2.c: Likewise. + * soft-fp/muldf3.c: Likewise. + * soft-fp/mulsf3.c: Likewise. + * soft-fp/multf3.c: Likewise. + * soft-fp/negdf2.c: Likewise. + * soft-fp/negsf2.c: Likewise. + * soft-fp/negtf2.c: Likewise. + * soft-fp/op-1.h: Likewise. + * soft-fp/op-2.h: Likewise. + * soft-fp/op-4.h: Likewise. + * soft-fp/op-8.h: Likewise. + * soft-fp/op-common.h: Likewise. + * soft-fp/quad.h: Likewise. + * soft-fp/single.h: Likewise. + * soft-fp/soft-fp.h: Likewise. + * soft-fp/sqrtdf2.c: Likewise. + * soft-fp/sqrtsf2.c: Likewise. + * soft-fp/sqrttf2.c: Likewise. + * soft-fp/subdf3.c: Likewise. + * soft-fp/subsf3.c: Likewise. + * soft-fp/subtf3.c: Likewise. + * soft-fp/truncdfsf2.c: Likewise. + * soft-fp/trunctfdf2.c: Likewise. + * soft-fp/trunctfsf2.c: Likewise. + * soft-fp/unorddf2.c: Likewise. + * soft-fp/unordsf2.c: Likewise. + * soft-fp/unordtf2.c: Likewise. + +2006-04-03 Steven Munroe + + [BZ #2505] + * sysdeps/powerpc/powerpc32/bits/atomic.h [_ARCH_PWR4]: + Define atomic_read_barrier and __ARCH_REL_INSTR using lwsync. + +2006-04-03 Andreas Schwab + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Terminate FDE + before syscall. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. + + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Test for + with [! _ASM_POWERPC_ELF_H] as well as [!__PPC64_ELF_H]. + +2006-04-03 Roland McGrath + + [BZ #2507] + * mach/Machrules (.udeps-targets): New variable. + ($(objpfx)%.udeps static pattern rule): Use it to avoid \ inside + quoted string. + +2006-04-02 Ulrich Drepper + + [BZ #2501] + * nscd/nscd_helper.c (get_mapping): Rewrite code to send request + so it uses send and not writev. + + [BZ #2418] + * sysdeps/unix/sysv/linux/getcwd.c (__getcwd): Use larger of PATH_MAX + and page size when allocating buffer. + + * sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Document + msg_controllen type issue. + (struct cmsghdr): Same for cmsg_len. + +2006-04-01 Ulrich Drepper + + [BZ #2415] + * elf/ldd.bash.in: Create better error messages for invalid input + files. + + [BZ #2477] + * sysdeps/unix/sysv/linux/i386/sysdep.h: Create correct LOADARGS_* + macros for non-shared position-independent code. + + [BZ #2472] + * bits/siginfo.h: Fix typo in ILL_ILLOPN definition. + + [BZ #2450] + * posix/unistd.h: Match return value of readlink to what POSIX + says these days. + * io/readlink.c: Likewise. + * io/readlinkat.c: Likewise. + * sysdeps/unix/sysv/linux/readlinkat.c: Likewise. + + [BZ #2498] + * nscd/connections.c (main_loop_poll): If the connection cannot be + accepted because of user-imposed limits close the descriptor. + +2006-03-31 Ulrich Drepper + + * sysdeps/unix/sysv/linux/Versions: Export sync_file_range with + GLIBC_2.5. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Remove + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. + Declare sync_file_range and splice. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add + sync_file_range. + * sysdeps/unix/sysv/linux/i386/sync_file_range.S: New file. + * sysdeps/unix/sysv/linux/syscalls.list: Add splice syscall. + * sysdeps/unix/sysv/linux/Versions: Export splice with GLIBC_2.5 + version. + * Versions.def: Define GLIBC_2.5 for libc. + +2006-03-29 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): No need to duplicate + 'name' for 'canon'. The final allocation will happen later. + +2006-03-27 Ulrich Drepper + + * sysdeps/unix/sysv/linux/kernel-features.h: Remove support for + architectures which moved to ports. + + * sysdeps/unix/sysv/linux/kernel-features.h: Add + __ASSUME_SET_ROBUST_LIST. + +2006-03-27 Jakub Jelinek + + * wcsmbs/wchar.h (btowc, wctob): Don't optimize in C++. + +2006-03-24 David S. Miller + + * sysdeps/sparc/sparc32/bits/atomic.h + (__v9_compare_and_exchange_val_32_acq): Add "memory" clobber. + * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h + (__arch_compare_and_exchange_val_32_acq, atomic_exchange_acq): + Likewise. + * sysdeps/sparc/sparc64/bits/atomic.h + (__arch_compare_and_exchange_val_32_acq, + __arch_compare_and_exchange_val_64_acq, atomic_exchange_acq): Likewise. + +2006-03-24 Jakub Jelinek + + * nis/nss_nisplus/nisplus-proto.c (_nss_create_tablename): Check the + return value of malloc rather than the static var again. + * nis/nss_nisplus/nisplus-grp.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-network.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-ethers.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-rpc.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-service.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-hosts.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-alias.c (_nss_create_tablename): Likewise. + * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): Likewise. + +2006-03-25 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Add POLLMSG, + POLLREMOVE, and POLLRDHUP. + * sysdeps/unix/sysv/linux/bits/poll.h: Add POLLREMOVE and POLLRDHUP. + +2006-03-24 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Define + LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. + +2006-03-17 Roland McGrath + + * elf/rtld.c (dl_main): Run final self-relocation after setting up TLS. + From Alexandre Oliva . + + * elf/tst-audit2.c: New file. + * elf/Makefile (tests): Add it. + ($(objpfx)tst-audit2.out): New target. + (tst-audit2-ENV): New variable. + + * elf/tst-leaks1.c: Include . + +2006-03-16 Roland McGrath + + * sysdeps/unix/sysv/linux/alpha/getcontext.S (__getcontext_x): + Use .set noat to quiet assembler warning. + + * math/gen-libm-test.pl (parse_args): Take function name for pretty + output as an argument. + (generate_testfile): Pass it the name given in the START macro. + + [BZ #2466] + * math/libm-test.inc (llrint_test, llround_test): Fix last change to + protect large-precision cases with [LDBL_MANT_DIG > 100]. + (llrint_test_tonearest, llrint_test_towardzero): Likewise. + (llrint_test_downward, llrint_test_upward): Likewise. + +2006-03-15 Steven Munroe + Alan Modra + + [BZ #2466] + * math/libm-test.inc (llrint_test, llround_test) [TEST_LDOUBLE]: + Add new test values. + (llrint_test_tonearest, llrint_test_towardzero, llrint_test_downward, + llrint_test_upward): New functions. + (main): Call them. + + * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c (__llrintl): Handle + rounding that spans doubles in IBM long double format. + * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c (__llroundl): Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: Removed. + * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: Removed. + * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: Removed. + * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: Removed. + +2006-03-16 Roland McGrath + + * wcsmbs/wchar.h (__wcstol_internal, __wcstoul_internal): Declare these + only when we will use them, under [__OPTIMIZE__ && __GNUC__ >= 2]. + (__wcstoll_internal, __wcstoull_internal_defined): Likewise. + +2006-03-06 Steven Munroe + + * sysdeps/powerpc/powerpc32/fpu/fprsave.S: Add cfi_offset for spilling + of non-volatile floating-point registers to the stack (fp14-fp31). + * sysdeps/powerpc/powerpc32/gprsave0.S: Add cfi_offset for spilling of + non-volatile general-purpose registers to the stack (gpr13-gpr31). + * sysdeps/powerpc/powerpc64/dl-trampoline.S: Add cfi_offset + for non-volatiles gpr30 - grp31 spilled to the stack. + * sysdeps/powerpc/powerpc64/memcpy.S: Add cfi_offset for non-volatile + gpr31 spill to the stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: + Add cfi_offset for non-volatile gpr31 spill to the stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Add cfi_offset + for non-volatiles gpr28 - grp31 spilled to the stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Add + cfi_adjust_cfa_offset when a frame is stacked. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: + (__novec_setcontext) : Add cfi_offset for non-volatile gpr31 spill + add LR saved to the stack. Add cfi_adjust_cfa_offset when frame is + stacked. + (__setcontext) : Add cfi_offset for non-volatile gpr31 spill to + the stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: + (__novec_swapcontext) : Add cfi_offset for non-volatile gpr31 spill + add LR saved to the stack. + (__swapcontext) : Add cfi_offset for non-volatile gpr31 spill add LR + saved to the stack. Add cfi_adjust_cfa_offset when frame is stacked. + +2006-03-07 Jakub Jelinek + + [BZ #2423] + * math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test, + round_test, trunc_test): Only run some of the new tests if + LDBL_MANT_DIG > 100. + +2006-03-03 Steven Munroe + Alan Modra + + * sysdeps/powerpc/fpu/fenv_libc.h (__fegetround, __fesetround): + Define inline implementations. + * sysdeps/powerpc/fpu/fegetround.c: Use __fegetround. + * sysdeps/powerpc/fpu/fesetround.c: Use __fesetround. + + * sysdeps/powerpc/fpu/math_ldbl.h: New file. + + [BZ #2423] + * math/libm-test.inc [TEST_LDOUBLE] (ceil_test, floor_test, rint_test, + round_test, trunc_test): Add new tests. + * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h + (EXTRACT_IBM_EXTENDED_MANTISSA, INSERT_IBM_EXTENDED_MANTISSA): + Removed, replaced with ... + (ldbl_extract_mantissa, ldbl_insert_mantissa, ldbl_pack, ldbl_unpack, + ldbl_canonicalise, ldbl_nearbyint): New functions. + * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Replace + EXTRACT_IBM_EXTENDED_MANTISSA and INSERT_IBM_EXTENDED_MANTISSA + with ldbl_extract_mantissa and ldbl_insert_mantissa. + * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l): + Replace EXTRACT_IBM_EXTENDED_MANTISSA with ldbl_extract_mantissa. + (ldbl_extract_mantissa, ldbl_insert_mantissa): New inline functions. + * sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Handle rounding + that spans doubles in IBM long double format. + * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise. + * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise. + * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise. + * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: File removed. + +2004-12-09 Randolph Chung + + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Don't + define for hppa, which doesn't support this syscall. + +2006-03-13 Jakub Jelinek + + [BZ #2451] + * elf/dl-load.c (open_verify): Add free_name argument, if true, free + name before calling lose. + (open_path): Adjust caller. + (_dl_map_object): Adjust callers. Free name_copy before calling + _dl_signal_error. + * elf/Makefile: Add rules to build and run tst-leaks1. + * elf/tst-leaks1.c: New test. + +2006-03-06 Roland McGrath + + * version.h (VERSION): 2.4 + * README.template: Update for 2.4. + * README: Regenerated. + * manual/install.texi (Configuring and compiling): Separate build + directory is mandatory. Use glibc-2.4 in example. + Update --enable-add-ons description. + (Supported Configurations): Remove section. + * INSTALL: Regenerated. + + * sysdeps/unix/sysv/linux/x86_64/sysconf.c + (handle_intel, handle_amd): Add __attribute__ ((noinline)). + * sysdeps/unix/sysv/linux/i386/sysconf.c + (handle_i486, handle_intel, handle_amd): Likewise. + + * sysdeps/unix/sysv/linux/i386/sysconf.c (__sysconf): Don't handle + _SC_CPUTIME and _SC_THREAD_CPUTIME here. + * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Likewise. + +2006-03-05 Roland McGrath + + * malloc/malloc.c (MALLOC_ALIGNMENT): Revert to (2 * SIZE_SZ) value. + The correct value differs only on powerpc32, and for now changing it + there is causing more trouble than it's worth. + + * malloc/arena.c: Add compile-time sanity check on padding calculation. + +2006-03-05 Jakub Jelinek + + * malloc/arena.c (heap_info): Adjust the padding size if + MALLOC_ALIGNMENT > 2 * SIZE_SZ. + +2006-03-05 Roland McGrath + + * sysdeps/mach/hurd/faccessat.c: New file. + * sysdeps/mach/hurd/fchmodat.c: New file. + * sysdeps/mach/hurd/fchownat.c: New file. + * sysdeps/mach/hurd/fxstatat.c: New file. + * sysdeps/mach/hurd/fxstatat64.c: New file. + * sysdeps/mach/hurd/linkat.c: New file. + * sysdeps/mach/hurd/mkdirat.c: New file. + * sysdeps/mach/hurd/openat.c: New file. + * sysdeps/mach/hurd/openat64.c: New file. + * sysdeps/mach/hurd/symlinkat.c: New file. + * sysdeps/mach/hurd/unlinkat.c: New file. + * sysdeps/mach/hurd/xmknod.c (__xmknod): Just call __xmknodat. + Guts move to ... + * sysdeps/mach/hurd/xmknodat.c: ... here, new file. + + * hurd/lookup-at.c: New file. + * hurd/Makefile (routines): Add it. + * hurd/hurd/fd.h: Declare __file_name_lookup_at, + __file_name_split_at and __directory_name_split_at. + + * hurd/hurd/lookup.h: Declare {,__}hurd_directory_name_split. + + * hurd/hurdlookup.c (__hurd_directory_name_split): Use __memrchr + unconditionally. + + * sysdeps/mach/hurd/open.c: Define {,__,__libc_,}open64 as aliases. + * sysdeps/mach/hurd/open64.c: New file. + + * sysdeps/posix/sysconf.c (__sysconf): Use #if _POSIX_FOO > 0 + rather than #ifdef _POSIX_FOO for options. We should return -1 + at runtime for an option defined to 0 at compile time. + + * sysdeps/mach/hurd/bits/posix_opt.h: Define many missing options, + many to -1 or 0. + +2006-03-05 Roland McGrath + + * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) + [__NR_clock_getres || HP_TIMING_AVAIL]: Handle _SC_CPUTIME, + _SC_THREAD_CPUTIME. + +2006-03-05 David S. Miller + + * sysdeps/sparc/sparc32/dl-trampoline.S: Add CFI markings. + * sysdeps/sparc/sparc32/elf/start.S: Likewise. + * sysdeps/sparc/sparc64/dl-trampoline.S: Likewise. + * sysdeps/sparc/sparc64/elf/start.S: Likewise. + * sysdeps/sparc/sparc32/memchr.S: Rearrange code to reside + within ENTRY/END. + * sysdeps/sparc/sparc32/memcpy.S: Likewise. + * sysdeps/sparc/sparc32/stpcpy.S: Likewise. + * sysdeps/sparc/sparc32/strcat.S: Likewise. + * sysdeps/sparc/sparc32/strchr.S: Likewise. + * sysdeps/sparc/sparc32/strcmp.S: Likewise. + * sysdeps/sparc/sparc32/strcpy.S: Likewise. + * sysdeps/sparc/sparc32/strlen.S: Likewise. + * sysdeps/sparc/sparc64/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9v/memset.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Add CFI markings + and use __syscall_error. + * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/pipe.S: Use __syscall_error. + * sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Rewrite to use + CFI markings and __syscall_error. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S: Rearrange + code to reside within ENTRY/END. + * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sysdep.c: New file. + * sysdeps/unix/sysv/linux/sparc/sysdep.S: File removed. + * sysdeps/unix/sysv/linux/sparc/rt-sysdep.c: New file. + * sysdeps/unix/sysv/linux/sparc/Makefile (librt-routines): Add it. + + * shlib-versions: Use sparc64.*- for CPU patterns. + +2006-03-05 Roland McGrath + + * bits/resource.h (RLIMIT_SBSIZE, RLIMIT_AS, RLIMIT_VMEM): Define. + + * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Use O_DIRECTORY + to force directory check. + * sysdeps/mach/hurd/opendir.c (__opendir): Likewise. + +2006-03-04 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits + of SEL are clear after copying %gs to low bits. + (_hurd_tls_fork): Likewise. + +2006-03-03 Roland McGrath + + [BZ #2414] + * stdlib/tst-setcontext.c (f1): Take arguments of type int. + +2006-03-02 Roland McGrath + + * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Use __typeof in cast. + +2006-03-02 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/configure.in: Remove MIPS cases. Allow + libc_cv_slibdir et al. to be overridden. + * sysdeps/unix/sysv/linux/configure: Regenerated. + +2005-12-27 Jakub Jelinek + + * elf/ldconfig.c (search_dir): Skip prelink temporaries. + +2006-03-02 H.J. Lu + + * elf/check-textrel.c: Don't include "config.h". + +2006-03-02 Jakub Jelinek + + * io/ftw.c (process_entry): If dir->streamfd != -1, + use FXSTATAT rather than LXSTAT to find if unstatable + file is a dead symlink. + + * elf/check-textrel.c: Include config.h. + (AB(handle_file)): Don't fail if PF_X | PF_W on architectures known + to have executable writable PLT. + * sysdeps/powerpc/powerpc32/configure.in (HAVE_PPC_SECURE_PLT): New + test. + * config.h.in (HAVE_PPC_SECURE_PLT): Add. + + * malloc/malloc.c (MALLOC_ALIGNMENT): Set to __alignof__ (long double) + if long double is more aligned than 2 * SIZE_SZ. + (misaligned_chunk): Define. + (public_rEALLOc, _int_free, _int_realloc): Use it. + +2006-01-05 H.J. Lu + + [BZ #2013] + * sysdeps/ia64/memccpy.S: Properly handle recovery for + predicated speculative load. + +2006-03-01 Jakub Jelinek + + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. + + * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat64): Use + libc_hidden_ver rather than libc_hidden_def. + + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. + * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): + Use inline asm to make sure the compiler doesn't optimize insns out. + + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h + (DECLARGS_6): Fix a typo. + +2006-03-01 Roland McGrath + + * version.h (VERSION): 2.3.91 + + * Makeconfig (sysdeps-srcdirs): New variable. + (sysdeps-add-ons-srcdirs): Use it. + * csu/Makefile (all-Banner-files): Use it. + + * Makefile (dist-selector): New variable. + (glibc-%.tar rule): Use it. Make $(dist-separate) tarballs + contain one version-named directory. + + * Makefile (format-me): Use --plaintext --no-number-sections. + + * NOTES, INSTALL: Regenerated. + + * NEWS: Update 2.4 items. + +2006-03-01 David S. Miller + + * configure.in (machine): Match sparcv9v and sparc64v. + * configure: Regenerated. + * sysdeps/sparc/sparc32/sparcv9v/memcpy.S: New file. + * sysdeps/sparc/sparc32/sparcv9v/memset.S: New file. + * sysdeps/sparc/sparc64/sparcv9v/memcpy.S: New file. + * sysdeps/sparc/sparc64/sparcv9v/memset.S: New file. + +2006-03-01 Roland McGrath + + * sysdeps/mach/hurd/Subdirs: Use "first hurd". + +2006-02-28 Roland McGrath + + * sysdeps/rs6000: Directory removed, saved in ports repository. + +2006-03-01 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/pread.c: Copy in mips pread.c. + * sysdeps/unix/sysv/linux/sh/pwrite.c: Copy in mips pwrite.c. + * sysdeps/unix/sysv/linux/sh/pread64.c: Copy in mips pread64.c. + * sysdeps/unix/sysv/linux/sh/pwrite64.c: Copy in mips pwrite64.c. + +2006-02-28 Roland McGrath + + * elf/tst-tls-dlinfo.c: New file. + * elf/Makefile (tests): Add it. + ($(objpfx)tst-tls-dlinfo): Depend on $(libdl). + ($(objpfx)tst-tls-dlinfo.out): Depend on $(objpfx)tst-tlsmod2.so. + + * dlfcn/dlfcn.h (RTLD_DI_PROFILENAME, RTLD_DI_PROFILEOUT): New enum + values, reserve unsupported requested names used on Solaris. + (RTLD_DI_TLS_MODID, RTLD_DI_TLS_DATA): New enum values. + (RTLD_DI_MAX): Likewise. + * dlfcn/dlinfo.c (dlinfo_doit): Handle RTLD_DI_TLS_MODID and + RTLD_DI_TLS_DATA. + + * elf/dl-tls.c (_dl_tls_get_addr_soft): New function. + * sysdeps/generic/ldsodefs.h: Declare it. + * elf/Versions (ld: GLIBC_PRIVATE): Add it. + * elf/link.h (struct dl_phdr_info): New members dlpi_tls_modid, + dlpi_tls_data. + * elf/dl-iteratephdr.c (__dl_iterate_phdr): Fill them in. + + * include/link.h: Don't copy contents from elf/link.h. + Instead, #include it while #define'ing around link_map. + * elf/dl-debug.c (_dl_debug_initialize): Add a cast. + Add bogus extern decl to verify link_map members. + * elf/loadtest.c (MAPS): New macro, cast _r_debug._r_map. + (OUT, main): Use it in place of _r_debug._r_map. + * elf/unload.c: Likewise. + * elf/unload2.c: Likewise. + * elf/neededtest.c (check_loaded_objects): Likewise. + * elf/neededtest2.c (check_loaded_objects): Likewise. + * elf/neededtest3.c (check_loaded_objects): Likewise. + * elf/neededtest4.c (check_loaded_objects): Likewise. + * elf/circleload1.c (check_loaded_objects): Likewise. + + * nscd/nscd_helper.c: Include for `time' declaration. + + * include/fcntl.h: Declare __openat, __open64. Use libc_hidden_proto. + * io/openat.c (__openat): Define instead of openat. + Use libc_hidden_def. Define openat with weak_alias. + * io/openat64.c (__openat64): Define instead of openat64. + Use libc_hidden_def. Define openat64 with weak_alias. + * sysdeps/unix/sysv/linux/openat.c: Likewise. + + * libio/genops.c: Include for __sched_yield decl. + + * Makeconfig (+includes): Add back $(includes) + after $(+sysdep-includes). + + * Makerules ($(common-objpfx)%.make): Use -DASSEMBLER. + +2006-02-28 Jakub Jelinek + + * posix/sys/types.h [!__GNUC_PREREQ (2, 7)] (int64_t, u_int64_t): + typedef to long int resp. unsigned long int on 64-bit arches. + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: Include x86_64 + umount.c rather than hppa umount.c. + * sysdeps/unix/sysv/linux/sparc/sparc32/chown.c: Include sh chown.c + rather than m68k chown.c. + * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include sh + fchownat.c rather than m68k fchownat.c. + * sysdeps/unix/sysv/linux/sh/chown.c: Copy over from m68k chown.c. + * sysdeps/unix/sysv/linux/sh/fchownat.c: Copy over from m68k + fchownat.c. + * sysdeps/unix/sysv/linux/x86_64/brk.c: Copy over from hppa brk.c. + * sysdeps/unix/sysv/linux/x86_64/umount.c: Copy over from hppa + umount.c. + +2006-02-28 Roland McGrath + + * sysdeps/hppa: Directory removed, saved in ports repository. + * sysdeps/mach/hppa: Likewise. + * sysdeps/mach/hurd/hppa: Likewise. + * sysdeps/unix/sysv/linux/hppa: Likewise. + * configure.in (machine): Remove hppa* cases. + * configure: Regenerated. + * shlib-versions: Remove hppa cases. + + * sysdeps/m68k: Directory removed, saved in ports repository. + * sysdeps/unix/bsd/m68k: Likewise. + * sysdeps/unix/sysv/linux/m68k: Likewise. + * configure.in (machine): Remove m68* cases. + * configure: Regenerated. + + * elf/rtld-Rules (subdir-args): New variable. + (rtld-subdir-make): Use it. + +2006-02-22 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h + (DO_CALL): Add support for 6 system call parameters. + (DECLARGS_6, ASMFMT_6): Define. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. + +2006-02-28 Roland McGrath + + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Copy in i386/bits/fcntl.h. + +2006-02-27 Roland McGrath + + * scripts/config.guess: Update from master, timestamp='2006-02-27'. + * scripts/config.sub: Update from master, timestamp='2006-02-27'. + + * Makefile (subdir-target-args): New variable. + ($(all-subdirs-targets)): Use it in place of -C option. + * Rules: Use $(..) instead of ../ if it's already defined. + * Makeconfig (subdir-srcdirs): New variable. + * csu/Makefile (all-Banner-files): Use it. + + * configure.in (--enable-add-ons): Set to "yes" by default. + Handle absolute add-on directory names when looking for configure + fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. + Require add-on configure to set $libc_add_on_canonical, use + that in $add_ons_sfx. Substitute add_on_subdirs with computed list + of subdir names each add-on configure set in libc_add_on_subdirs. + * configure: Regenerated. + * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. + * config.make.in (add-on-subdirs): New substituted variable. + * Makeconfig (all-subdirs): Include $(add-on-subdirs). + Remove $(add-ons), $(sysdep-subdirs). + Don't filter out $(sysdep-inhibit-subdirs). + ($(common-objpfx)sysd-dirs): Target removed. Don't include it. + ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs + files together to gen-sorted.awk, and $(subdirs) via -v. + (subdirs): Remove magic reordering for mach and hurd. + * scripts/gen-sorted.awk: Use subdirs from command line. + Process Subdirs and Depend files directly. + Let Subdirs files use "first dir" and "inhibit dir". + Always move elf to the end of the list. + * hurd/Depend: New file. + * sysdeps/mach/Subdirs: Use "first mach". + + * Makefile (dist-separate): Remove linuxthreads. + (dist-separate-linuxthreads): Variable removed. + (glibc-%.tar rule): Use $(sysdeps-add-ons). + + * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), + not $(all-subdirs). + (sysdep-makefiles): Use $(sysdirs). + (sysdirs): Remove export. + ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in + $(config-sysdirs). + (+sysdir_pfx): Variable removed. + (sysd-rules): Use $(common-objpfx) in place of it. + (sysdirs): Variable moved to ... + * Makeconfig (sysdirs): ... here. + Handle absolute directory names in $(config-sysdirs). + (full_config_sysdirs): Variable removed. + * csu/Makefile: Use $(sysdirs) in vpath directive. + * math/Makefile (ulps-file): Use $(sysdirs). + * sysdeps/gnu/Makefile (errlist-c): Likewise. + ($(objpfx)errlist-compat.c): Likewise. + * Makeconfig (all-Subdirs-files): Likewise. + ($(common-objpfx)config.status): Likewise. + + * configure.in (sysnames): Handle absolute add-on directory names. + (sysdeps_add_ons): New variable, AC_SUBST it. + Compute which add-ons contributed sysdeps directories. + * configure: Regenerated. + * config.make.in (sysdeps-add-ons): New substituted variable. + * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... + * Makeconfig: ... to here. + (+sysdep_dirs): Append $(sysdeps-add-ons) here. + (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). + Remove $(includes). + (sysdep-makeconfigs): Use $(+sysdep_dirs). + ($(common-objpfx)shlib-versions.v.i): Likewise. + + * Makeconfig: Remove hair to set Makeconfig-add-on. + + * sysdeps/unix/Makefile (sysdirs): Remove export. + (asm_CPP): Variable removed. + ($(common-objpfx)sysd-syscalls): Pass them directly for the script. + + * sysdeps/posix/Makefile: New file. + * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix + values here with ?=. + + * stdlib/gen-mpn-copy: File removed. + * stdlib/Makefile (distribute): Remove it. + * configure.in: Don't grok --with-gmp. + * configure: Regenerated. + + * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. + * configure: Regenerated. + +2006-02-27 Ulrich Drepper + + * sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set + when syscall is used. + * io/fcntl.h (AT_SYMLINK_FOLLOW): Define. + +2006-02-26 Roland McGrath + + * bare: Directory removed, saved in ports repository. + + * sysdeps/unix/common/Makefile: File removed. + * sysdeps/unix/common/glue-ctype.c: File removed. + * sysdeps/unix/common/configure.in: File removed. + * sysdeps/unix/common/configure: File removed. + + * sysdeps/unix/configure.in: File removed. + * sysdeps/unix/configure: File removed. + * sysdeps/unix/make_errlist.c: File removed. + * sysdeps/unix/Makefile ($(objpfx)errlist.c, $(objpfx)make_errlist): + Rules removed. + + * timezone/africa: Update from tzdata2006b (comment changes only). + * timezone/antarctica: Likewise. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. + * timezone/etcetera: Likewise. + * timezone/europe: Likewise. + * timezone/factory: Likewise. + * timezone/iso3166.tab: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/pacificnew: Likewise. + * timezone/solar87: Likewise. + * timezone/solar88: Likewise. + * timezone/solar89: Likewise. + * timezone/southamerica: Likewise. + * timezone/systemv: Likewise. + * timezone/zone.tab: Likewise. + +2006-02-26 Ulrich Drepper + + * posix/unistd.h: Add fifth parameter to linkat. + * io/linkat.c: Likewise. + * sysdeps/unix/sysv/linux/linkat.c: Likewise. + * io/tst-linkat.c (do_test): Pass new parameter to linkat. + + * elf/do-lookup.h (do_lookup_x): No need to compare SKIP to NULL + before comparison with MAP. + + * elf/dl-sym.c (do_sym): For RTLD_NEXT, pass MATCH to + dl_lookup_symbol_x instead of L. + +2006-02-24 Mike Frysinger + + * sysdeps/gnu/net/if.h (IFF_DYNAMIC): New macro. + +2006-02-24 David S. Miller + + * configure.in: Use sparc/sparc32/sparcv9/sparcv9b in place + of sparc/sparc32/sparcv9b. + * sysdeps/sparc/sparc32/sparcv9b/Implies: File removed. + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies: File removed. + +2006-02-24 Roland McGrath + + * elf/elf.h (HWCAP_SPARC_BLKINIT): New macro. + * sysdeps/sparc/dl-procinfo.h (HWCAP_IMPORTANT): Add it. + (_DL_HWCAP_COUNT): Increase to 7. + * sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add "v9v". + From David S. Miller . + + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ... + * sysdeps/sparc/dl-procinfo.c: ... here, new file. + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ... + * sysdeps/sparc/dl-procinfo.h: ... here, new file. + (HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE != 64]. + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed. + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed. + + * elf/sofini.c (__FRAME_END__): Mark as const. + * elf/soinit.c (__EH_FRAME_BEGIN__): Likewise. Add used attribute. + +2006-02-18 Joseph S. Myers + + * soft-fp/single.h (SFtype): Define. + (union _FP_UNION_S): Use it. + * soft-fp/double.h (DFtype): Define. + (union _FP_UNION_D): Use it. + * soft-fp/extended.h (XFtype): Define. + (union _FP_UNION_E): Use it. + * soft-fp/quad.h (TFtype): Define. + (union _FP_UNION_Q): Use it. + * soft-fp/soft-fp.h: Add _LIBC conditionals. + (SI_BITS, DI_BITS): Define. + * soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for + X##_c. + (_FP_CMP_EQ): Use parentheses for && inside ||. + (_FP_TO_INT): Use statement expressions in conditional controlling + constant shift. + (_FP_FROM_INT): Likewise. Take unsigned type as argument. + * soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2, + _FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in + conditional controlling possibly constant shift. + (_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly + _FP_W_TYPE_SIZE. + (_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||. + * soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly + _FP_W_TYPE_SIZE. + (__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, + __FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags. + * soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly + _FP_W_TYPE_SIZE. + * soft-fp/floatdidf.c: Pass unsigned type and macro for type size. + * soft-fp/floatdisf.c: Likewise. + * soft-fp/floatditf.c: Likewise. + * soft-fp/floatsidf.c: Likewise. + * soft-fp/floatsisf.c: Likewise. + * soft-fp/floatsitf.c: Likewise. + * soft-fp/floatundidf.c: Likewise. + * soft-fp/floatundisf.c: Likewise. + * soft-fp/floatunditf.c: Likewise. + * soft-fp/floatunsidf.c: Likewise. + * soft-fp/floatunsisf.c: Likewise. + * soft-fp/floatunsitf.c: Likewise. + * soft-fp/fixdfdi.c: Pass macro for type size. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * soft-fp/fixunsdfdi.c: Likewise. + * soft-fp/fixunsdfsi.c: Likewise. + * soft-fp/fixunssfdi.c: Likewise. + * soft-fp/fixunssfsi.c: Likewise. + * soft-fp/fixunstfdi.c: Likewise. + * soft-fp/fixunstfsi.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type. + * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. + * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. + * soft-fp/adddf3.c: Use typedefs for argument and return types. + * soft-fp/addsf3.c: Likewise. + * soft-fp/addtf3.c: Likewise. + * soft-fp/divdf3.c: Likewise. + * soft-fp/divsf3.c: Likewise. + * soft-fp/divtf3.c: Likewise. + * soft-fp/eqdf2.c: Likewise. + * soft-fp/eqsf2.c: Likewise. + * soft-fp/eqtf2.c: Likewise. + * soft-fp/extenddftf2.c: Likewise. + * soft-fp/extendsfdf2.c: Likewise. + * soft-fp/extendsftf2.c: Likewise. + * soft-fp/fixdfdi.c: Likewise. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * soft-fp/fixunsdfdi.c: Likewise. + * soft-fp/fixunsdfsi.c: Likewise. + * soft-fp/fixunssfdi.c: Likewise. + * soft-fp/fixunssfsi.c: Likewise. + * soft-fp/fixunstfdi.c: Likewise. + * soft-fp/fixunstfsi.c: Likewise. + * soft-fp/floatdidf.c: Likewise. + * soft-fp/floatdisf.c: Likewise. + * soft-fp/floatditf.c: Likewise. + * soft-fp/floatsidf.c: Likewise. + * soft-fp/floatsisf.c: Likewise. + * soft-fp/floatsitf.c: Likewise. + * soft-fp/floatundidf.c: Likewise. + * soft-fp/floatundisf.c: Likewise. + * soft-fp/floatunditf.c: Likewise. + * soft-fp/floatunsidf.c: Likewise. + * soft-fp/floatunsisf.c: Likewise. + * soft-fp/floatunsitf.c: Likewise. + * soft-fp/gedf2.c: Likewise. + * soft-fp/gesf2.c: Likewise. + * soft-fp/getf2.c: Likewise. + * soft-fp/ledf2.c: Likewise. + * soft-fp/lesf2.c: Likewise. + * soft-fp/letf2.c: Likewise. + * soft-fp/muldf3.c: Likewise. + * soft-fp/mulsf3.c: Likewise. + * soft-fp/multf3.c: Likewise. + * soft-fp/negdf2.c: Likewise. + * soft-fp/negsf2.c: Likewise. + * soft-fp/negtf2.c: Likewise. + * soft-fp/sqrtdf2.c: Likewise. + * soft-fp/sqrtsf2.c: Likewise. + * soft-fp/sqrttf2.c: Likewise. + * soft-fp/subdf3.c: Likewise. + * soft-fp/subsf3.c: Likewise. + * soft-fp/subtf3.c: Likewise. + * soft-fp/truncdfsf2.c: Likewise. + * soft-fp/trunctfdf2.c: Likewise. + * soft-fp/trunctfsf2.c: Likewise. + * soft-fp/unorddf2.c: Likewise. + * soft-fp/unordsf2.c: Likewise. + * soft-fp/unordtf2.c: Likewise. + +2006-02-09 Joseph S. Myers + + * soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define. + (_FP_OVERFLOW_SEMIRAW): Likewise. + (_FP_CHECK_SIGNAN_SEMIRAW): Likewise. + (_FP_CHOOSENAN_SEMIRAW): Likewise. + (_FP_EXP_NORMAL): Likewise. + (_FP_PACK_SEMIRAW): Likewise. + (_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value. + (_FP_SUB): Likewise. + (_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID + exception for conversions where most negative representable + integer is correct truncated value, but do set INEXACT for such + conversions where appropriate. Don't always left-shift for + converting to a wider integer. + (_FP_FROM_INT): Rewrite to yield raw value. Correct shift for + integers with one more bits than (mantissa + guard) bits for the + floating point format. Don't use __FP_FRAC_SRS_1 for shifting + integers that may be wider than _FP_W_TYPE_SIZE. + (FP_CONV): Don't define. + (FP_EXTEND): Define. + (FP_TRUNC): Likewise. + * soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define. + (_FP_FRAC_CONV_1_1): Don't define. + (_FP_FRAC_COPY_1_1): Define. + * soft-fp/op-2.h (_FP_FRAC_SRST_2): Define. + (_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define. + (_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define. + * soft-fp/op-4.h (_FP_FRAC_SRST_4): Define. + (_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4. + (_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define. + (_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define. + (_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define. + (_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define. + * soft-fp/single.h (_FP_FRACTBITS_S): Define. + (_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S. + (_FP_WFRACXBITS_S): Likewise. + (_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define. + (FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define. + (FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define. + * soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define. + (FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define + (FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define. + * soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define. + (FP_UNPACK_EP): Correct typo. + (FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define. + (FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define. + * soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define. + (FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define. + (FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define. + * soft-fp/fixdfdi.c: Use unsigned type for result of conversion. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. + * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. + * soft-fp/adddf3.c: Update for changed soft-fp interfaces. + * soft-fp/addsf3.c: Likewise. + * soft-fp/addtf3.c: Likewise. + * soft-fp/extenddftf2.c: Likewise. + * soft-fp/extendsfdf2.c: Likewise. + * soft-fp/extendsftf2.c: Likewise. + * soft-fp/fixdfdi.c: Likewise. + * soft-fp/fixdfsi.c: Likewise. + * soft-fp/fixsfdi.c: Likewise. + * soft-fp/fixsfsi.c: Likewise. + * soft-fp/fixtfdi.c: Likewise. + * soft-fp/fixtfsi.c: Likewise. + * soft-fp/fixunsdfdi.c: Likewise. + * soft-fp/fixunsdfsi.c: Likewise. + * soft-fp/fixunssfdi.c: Likewise. + * soft-fp/fixunssfsi.c: Likewise. + * soft-fp/fixunstfdi.c: Likewise. + * soft-fp/fixunstfsi.c: Likewise. + * soft-fp/floatdidf.c: Likewise. + * soft-fp/floatdisf.c: Likewise. + * soft-fp/floatditf.c: Likewise. + * soft-fp/floatsidf.c: Likewise. + * soft-fp/floatsisf.c: Likewise. + * soft-fp/floatsitf.c: Likewise. + * soft-fp/floatundidf.c: Likewise. + * soft-fp/floatundisf.c: Likewise. + * soft-fp/floatunditf.c: Likewise. + * soft-fp/floatunsidf.c: Likewise. + * soft-fp/floatunsisf.c: Likewise. + * soft-fp/floatunsitf.c: Likewise. + * soft-fp/subdf3.c: Likewise. + * soft-fp/subsf3.c: Likewise. + * soft-fp/subtf3.c: Likewise. + * soft-fp/truncdfsf2.c: Likewise. + * soft-fp/trunctfdf2.c: Likewise. + * soft-fp/trunctfsf2.c: Likewise. + * sysdeps/alpha/soft-fp/ots_add.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise. + * sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise. + * sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise. + * sysdeps/alpha/soft-fp/ots_sub.c: Likewise. + * sysdeps/powerpc/soft-fp/q_add.c: Likewise. + * sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_itoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtod.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtos.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtou.c: Likewise. + * sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise. + * sysdeps/powerpc/soft-fp/q_stoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_sub.c: Likewise. + * sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise. + * sysdeps/powerpc/soft-fp/q_utoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise. + * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise. + +2006-02-23 Roland McGrath + + * include/libc-symbols.h: Fix comment typo. + From Peter Kjellerstedt . + + * sysdeps/unix/sysv/linux/i386/fchownat.c: Diddle code so that "fail" + label is always used. + + [BZ #2172] + * bits/syslog-path.h: New file. + * misc/Makefile (headers): Add it. + * misc/sys/syslog.h: Include it. + (_PATH_LOG): Macro removed. + From Robert Millan . + + * sysdeps/unix/sysv/linux/ftruncate64.c: Find generic implementation + in misc/, not posix/. + Reported by David S. Miller . + +2006-02-23 Jakub Jelinek + + * posix/sched_yield.c (__sched_yield): Add libc_hidden_def. + * sysdeps/mach/sched_yield.c (__sched_yield): Likewise. + +2006-02-22 Roland McGrath + + * po/libc.pot: Regenerated. + +2006-02-22 Jakub Jelinek + + * nis/ypclnt.c (yperr_string, ypbinderr_string): Add N_() + around string literals. + +2005-10-03 Jakub Jelinek + + * nscd/selinux.c (audit_init): Print error string in the failure + message. + +2006-02-21 Roland McGrath + + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_CLONE_THREAD_FLAGS): Consolidate definitions. + + * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Update comment, remove + __THROW from epoll_wait, to match .../linux/sys/epoll.h file. + +2006-02-03 Jakub Jelinek + + * manual/filesys.texi (futimes): Fix prototype. + +2004-08-09 Paul Eggert + + [BZ #315] + * manual/memory.texi (Obstacks Data Alignment): The default + alignment is not 4: it is enough to hold any type of data. + Problem reported by Benno in + . + +2005-11-15 Robert Millan + + [BZ #2161] + * manual/llio.texi (read, write): Document EINVAL on unaligned access. + +2006-02-21 Roland McGrath + + * sysdeps/i386/i686/memset.S: Fix treatment of unaligned pointer. + Reported by John Zulauf . + +2004-11-23 Richard Sandiford + + * configure.in (libc_cv_gcc_dwarf2_unwind_info): Delete. + (HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove AC_DEFINEs. + * configure: Regenerate. + * config.h.in (HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove undefs. + * elf/soinit.c: Don't include gccframe.h. + (__EH_FRAME_BEGIN__): Define unconditionally. + (__register_frame_info, __deregister_frame_info) + (__register_frame_info_bases, __deregister_frame_info_bases) + (__register_frame, __deregister_frame): Remove declarations. + (__libc_global_ctors, __libc_fini): Don't call registry functions. + * elf/sofini.c (__EH_FRAME_END__): Define unconditionally. + +2006-01-18 Samuel Thibault + + [BZ #2178] + * sysdeps/mach/hurd/getsid.c (getsid): When parameter PID is zero, + use _hurd_pid instead. + +2006-02-20 Richard Henderson + + * sysdeps/alpha/soft-fp/Makefile (CPPFLAGS): Add soft-fp include + to math subdir. + * sysdeps/alpha/soft-fp/e_sqrtl.c: Don't use local-soft-fp.h. + (__ieee754_sqrtl): Add _round local variable. + * sysdeps/unix/sysv/linux/alpha/fpu/Implies: Remove. + + * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Fix hidden defs. + +2006-02-20 Roland McGrath + + * sysdeps/mips: Directory removed, saved in ports repository. + * sysdeps/unix/mips: Likewise. + * sysdeps/unix/sysv/linux/mips: Likewise. + * sysdeps/mach/mips: Likewise. + * sysdeps/mach/hurd/mips: Likewise. + * shlib-versions: Remove mips matches, now in ports fragment. + * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. + * configure.in (machine): Likewise. + * configure: Regenerated. + + * hurd/hurd/xattr.h: New file. + * hurd/xattr.c: New file. + * hurd/Makefile (routines): Add it. + * sysdeps/mach/hurd/fgetxattr.c: New file. + * sysdeps/mach/hurd/flistxattr.c: New file. + * sysdeps/mach/hurd/fremovexattr.c: New file. + * sysdeps/mach/hurd/fsetxattr.c: New file. + * sysdeps/mach/hurd/getxattr.c: New file. + * sysdeps/mach/hurd/lgetxattr.c: New file. + * sysdeps/mach/hurd/listxattr.c: New file. + * sysdeps/mach/hurd/lsetxattr.c: New file. + * sysdeps/mach/hurd/removexattr.c: New file. + * sysdeps/mach/hurd/setxattr.c: New file. + +2006-02-15 Thomas Schwinge + + [BZ #2329] + * include/unistd.h (__getresuid, __getresgid, __setresuid) + (__setresgid): Fix argument name order in prototypes. + * posix/unistd.h (getresuid, getresgid, setresuid, setresgid): + Likewise. + * posix/getresuid.c (__getresuid): Fix argument order in definition. + * posix/getresgid.c (__getresgid): Likewise. + * posix/setresuid.c (__setresuid): Likewise. + * posix/setresgid.c (__setresgid): Likewise. + * sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise. + * sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise. + * sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise. + * sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise. + Reported by Samuel Thibault . + +2006-02-13 Mike Frysinger + + [BZ #2380] + * string/tester.c (test_strnlen): New function. + (test_strchr): Call it. + (test_strncat): Test lengths where the sign bit is set. + (test_strncmp): Likewise. + +2006-02-17 Jakub Jelinek + + * include/atomic.h (atomic_and, atomic_or): Define. + +2006-02-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Define MADV_DONTFORK + and MADV_DOFORK. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + +2006-02-13 Jakub Jelinek + + * sysdeps/unix/sysv/linux/not-cancel.h (__openat_not_cancel, + __openat64_not_cancel): Remove prototypes. + (__openat_nocancel, __openat64_nocancel): New prototypes or defines. + (openat_not_cancel, openat_not_cancel_3, openat64_not_cancel, + openat64_not_cancel_3): Use them. + +2006-02-12 Ulrich Drepper + + * io/ftw.c: Start using *at functions. + * io/ftw64.c: Likewise. + + * sysdeps/generic/not-cancel.h: Define openat_not_cancel, + openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3. + * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. + + * sysdeps/unix/sysv/linux/openat.c: Create separate _nocancel + functions. + + * io/fxstatat.c: Add __fxstatat alias. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. + * sysdeps/unix/sysv/linux/fxstatat.c: Likewise. Add support for + newfstatat syscall. + * sysdeps/unix/sysv/linux/i386/fxstatat.c: Add __fxstatat alias. + Add support for fstatat64 syscall. + * include/sys/stat.h: Declare __fxstatat. + * io/fxstatat64.c: Add __fxstatat64 alias. + * sysdeps/unix/sysv/linux/fxstatat64.c: Add support for fstatat64 + syscall. + + * dirent/fdopendir.c: Add __fdopendir alias. + * sysdeps/unix/fdopendir.c: Likewise. + * sysdeps/mach/hurd/fdopendir.c: Likewise. + * include/dirent.h: Add __fdopendir declaration. + + [BZ #2226] + * libio/wgenops.c (_IO_wsetb): Use correct size of wide char + buffer in FREE_BUF call. + +2006-02-08 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/sched.h: Declare unshare. + * sysdeps/unix/sysv/linux/Versions [libc, GLIBC_2.4]: Export + unshare. + * sysdeps/unix/sysv/linux/syscalls.list: Add unshare syscall. + + * sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Add some + preprocessor magic so that the compiler won't see the prototypes + for the functions we are defining as stubs. + +2006-02-05 Ulrich Drepper + + * io/ftw.c (ftw_startup): Use fchdir to return to original + directory for FTW_CHDIR. + +2006-02-03 Ulrich Drepper + + * manual/stdio.texi (Formatted Output Functions): Fix make_message + example. Patch by NIIBE Yutaka . + +2006-02-03 Roland McGrath + + [BZ #2268] + * sysdeps/posix/profil.c (__profil): Use __profile_frequency to choose + timer interval, don't assume smallest possible interval is it. + +2006-02-03 Jakub Jelinek + + * sysdeps/powerpc/fpu/bits/fenvinline.h (fegetround): Make asm + volatile. + + * stdlib/bits/stdlib-ldbl.h (qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): + Guard with [__USE_SVID || __USE_XOPEN_EXTENDED]. + + * math/math.h [__LDBL_COMPAT && __USE_ISOC99] (nexttowardl): New + prototype. + + * math/math.h (__nldbl_nexttowardf): Put __THROW before + __attribute__ ((__const__)). + (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT + followed by __THROW. + +2006-02-02 Ulrich Drepper + + * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat] + (futimesat): If file is NULL use __futimes. + * include/sys/time.h: Declare __futimes. + +2006-02-02 Roland McGrath + + * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): Use the same + fstat check for ENOENT that should be EBADF as for ENOTDIR, and also + check for missing /proc the same way. + + * include/errno.h [__cplusplus]: Avoid extra header magic for C++. + + * manual/install.texi (Tools for Compilation): Require gcc 3.4, + recommend 4.1, advise 4.0 for powerpc64, and note 4.1 required for + powerpc, s390{x,} with new long double. + * INSTALL: Regenerated. + + * timezone/private.h: Update from tzcode2006a. + * timezone/scheck.c: Likewise. + * timezone/asia: Update from tzdata2006a. + * timezone/northamerica: Likewise. + * timezone/zone.tab: Likewise. + + * sysdeps/powerpc/powerpc64/Makefile (no-special-regs): New variable. + (CFLAGS-mcount.c): Use it instead of -msoft-float. + * sysdeps/powerpc/powerpc64/elf/Makefile + (CFLAGS-dl-runtime.os, CFLAGS-dl-lookup.os, CFLAGS-dl-misc.os, + CFLAGS-rtld-mempcpy.os, CFLAGS-rtld-memmove.os, CFLAGS-rtld-memchr.os, + CFLAGS-rtld-strnlen.os): Likewise. + +2006-02-01 Roland McGrath + + * sysdeps/ieee754/ldbl-opt/Makefile (sysdep-CFLAGS): Avoid adding + -mlong-double-128 when it's already there. + +2006-02-01 Roland McGrath + + * mach/Machrules ($(objpfx)%.uh, $(objpfx)%.__h): Use static pattern + rules for these, not implicit rules. + ($(objpfx)%.h): Likewise. + Reported by Thomas Schwinge . + +2006-02-01 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: Use long_double_symbol + even for libm. + + * libio/bits/libio-ldbl.h (_IO_vfwscanf, _IO_vfwprintf): Remove + __LDBL_REDIR_DECL. + + * math/bits/mathcalls.h: Guard __END_NAMESPACE_C99 with the + same #if condition as corresponding __BEGIN_NAMESPACE_C99. + (scalb): Don't define only if __USE_ISOC99. + + * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo. + * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps. + +2006-01-19 Thomas Schwinge + + * libio/genops.c: Include . + +2006-02-01 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_02_known): Add + some more entries. + * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_02_known): Likewise. + +2006-01-31 Jakub Jelinek + + * sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file. + * sysdeps/alpha/fpu/s_ceil.c: Include math_ldbl_opt.h, add + compat_symbol if LONG_DOUBLE_COMPAT. + * sysdeps/alpha/fpu/s_copysign.c: Likewise. + * sysdeps/alpha/fpu/s_fabs.c: Likewise. + * sysdeps/alpha/fpu/s_floor.c: Likewise. + * sysdeps/alpha/fpu/s_rint.c: Likewise. + * sysdeps/alpha/soft-fp/e_sqrtl.c: New file. + * sysdeps/alpha/Implies: Add ieee754/ldbl-128. + + * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: New file. + * sysdeps/unix/sysv/linux/alpha/Implies: Add ieee754/ldbl-64-128, + ieee754/ldbl-opt. + * sysdeps/alpha/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. + * sysdeps/unix/sysv/linux/alpha/nldbl-abi.h: New file. + * sysdeps/unix/sysv/linux/alpha/Makefile + [$(subdir) = math] (libm-routines): Add multc3, divtc3. + + * math/divtc3.c: New file. + * math/multc3.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile + [$(subdir) = math] (libm-routines): Add multc3, divtc3. + + * sysdeps/unix/sysv/linux/sparc/sparc32/fpu/Implies: New file. + * sysdeps/sparc/sparc32/fpu/s_fabsl.c: Include math.h and + math_ldbl_opt.h. + (fabsl): Use long_double_symbol instead of weak_alias. + * sysdeps/sparc/sparc32/fpu/s_fabs.c: Include math.h and + math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (fabsl): Add compat_symbol. + +2006-01-31 Martin Schwidefsky + Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/Implies: New file. + * sysdeps/unix/sysv/linux/s390/fpu/Implies: New file. + * sysdeps/unix/sysv/linux/s390/nldbl-abi.h: New file. + * sysdeps/s390/fpu/bits/mathinline.h (signbitl, sqrtl): New inlines. + * sysdeps/s390/bits/mathdef.h: New file. + * sysdeps/s390/fpu/e_sqrtl.c: New file. + * sysdeps/s390/s390-32/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL, + __NO_LONG_DOUBLE_MATH): Define. + * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. + * sysdeps/s390/Implies: Add ieee754/ldbl-128. + * sysdeps/s390/ldbl2mpn.c: File removed. + * sysdeps/s390/fpu/libm-test-ulps: Updated. + +2006-01-31 Roland McGrath + + * sysdeps/alpha/fpu/bits/mathdef.h: Moved to ... + * sysdeps/alpha/bits/mathdef.h: ... here. + * sysdeps/i386/fpu/bits/mathdef.h: Moved to ... + * sysdeps/i386/bits/mathdef.h: ... here. + * sysdeps/mips/fpu/bits/mathdef.h: Moved to ... + * sysdeps/mips/bits/mathdef.h: ... here. + * sysdeps/m68k/fpu/bits/mathdef.h: Moved to ... + * sysdeps/m68k/bits/mathdef.h: ... here. + * sysdeps/powerpc/fpu/bits/mathdef.h: Moved to ... + * sysdeps/powerpc/bits/mathdef.h: ... here. + * sysdeps/sparc/fpu/bits/mathdef.h: Moved to ... + * sysdeps/sparc/bits/mathdef.h: ... here. + * sysdeps/ia64/fpu/bits/mathdef.h: Moved to ... + * sysdeps/ia64/bits/mathdef.h: ... here. + * sysdeps/sh/sh4/fpu/bits/mathdef.h: Moved to ... + * sysdeps/sh/sh4/bits/mathdef.h: ... here. + * sysdeps/x86_64/fpu/bits/mathdef.h: Moved to ... + * sysdeps/x86_64/bits/mathdef.h: ... here. + +2006-01-31 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/fxstatat.c [XSTAT_IS_STAT64] + (__fxstatat64): Add libc_hidden_ver. + * sysdeps/unix/sysv/linux/fxstatat.c [XSTAT_IS_STAT64] (__fxstatat64): + Likewise. + + * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Remove jmpbuf-offsets.h + include. + +2006-01-31 Roland McGrath + + * sysdeps/powerpc/fpu/libm-test-ulps: Update by Jakub. + + * inet/rcmd.c (iruserfopen): Remove redundant initialization. + From Bernhard Fischer . + + * posix/regcomp.c (calc_eclosure_iter): Remove dead variables. + Reported by Mike Frysinger . + +2006-01-30 Steven Munroe + + * sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Correct index + for __sincosl_table. + * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c (__kernel_sincosl): Likewise. + * sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise. + + * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Correct sign of 0.0. + * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise. + + * sysdeps/ieee754/ldbl-128ibm/s_cprojl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_ctanl.c: New file. + +2006-01-29 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED, + EOWNERDEAD, ENOTRECOVERABLE): Define. + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define. + + * sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for + N64. + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use + size_t for msg_controllen. + (__cmsg_nxthdr): Correct test. + (__SCM_CONNECT): Delete. + +2006-01-30 Alexandre Oliva + Roland McGrath + + * configure.in (fno_unit_at_a_time): Set to + -fno-toplevel-reorder if the compiler supports it. + Otherwise use -fno-unit-at-a-time unconditionally. + * configure: Regenerated. + +2006-01-30 Jakub Jelinek + + * sysdeps/powerpc/fpu/libm-test-ulps: Merge ulps with older + libm-test-ulps rather than overwrite it. Remove excessively high ulps. + +2006-01-29 Joseph S. Myers + + * soft-fp/double.h (FP_CMP_UNORD_D): Also define in + [_FP_W_TYPE_SIZE >= 64] case. + * soft-fp/extended.h (FP_CMP_UNORD_E): Likewise. + * soft-fp/quad.h (FP_CMP_UNORD_Q): Likewise. + +2006-01-27 Dwayne Grant McConnell + Jakub Jelinek + Roland McGrath + Steven Munroe + Alan Modra + + * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. + + * sysdeps/powerpc/fpu/libm-test-ulps: Update. + + * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. + (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is + denormal. + [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, + rint_test, round_test, trunc_test): Add new tests. + + * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. + * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. + + * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. + * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. + + * sysdeps/unix/sysv/linux/powerpc/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. + * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. + * sysdeps/unix/sysv/linux/powerpc/configure: New file. + * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h + (__LONG_DOUBLE_MATH_OPTIONAL): Define. + (__NO_LONG_DOUBLE_MATH): Define. + * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. + * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. + + * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. + + * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. + * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. + * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. + * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. + * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. + * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. + * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. + * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. + * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. + * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. + + * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment. + +2006-01-22 Aurelien Jarno + + * sysdeps/gnu/errlist-compat.awk: Reduce required number of symbols in + sanity check. + +2006-01-21 Ulrich Drepper + + * sysdeps/unix/sysv/linux/renameat.c (__atfct_seterrno_2): Correctly + return EBADF for non-existing file descriptors. + * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): Likewise. + * io/tst-openat.c (do_test): Add some more tests. + * io/tst-faccessat.c (do_test): Likewise. + * io/tst-renameat.c (do_test): Likewise. + * io/tst-fstatat.c (do_test): Likewise. + * io/tst-fchmodat.c (do_test): Likewise. + * io/tst-fchownat.c (do_test): Likewise. + +2006-01-21 Roland McGrath + + * sysdeps/unix/sysv/linux/faccessat.c: Move RESULT defn inside block. + + * misc/tst-pselect.c: Include . + + * time/time.h [__need_timespec et al]: Include here too. + + * stdlib/fpioconst.c: Fix whitespace typo. + +2006-01-20 Jakub Jelinek + + * sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c: Moved to... + * sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c: ... here. New file. + * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h (long_double_symbol_1): For + C define again using _weak_alias, for assembler use weak_alias. + + * sysdeps/powerpc/powerpc64/fpu/e_sqrt.c: New file. + * sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c: New file. + * sysdeps/powerpc/fpu/bits/mathinline.h (__CPU_HAS_FSQRT): New macro. + (__ieee754_sqrt, __ieee754_sqrtf): Use it. + +2006-01-21 Ulrich Drepper + + * sysdeps/unix/sysv/linux/pselect.c (__pselect): Allow actual + system call code to be redefined in macro CALL_PSELECT6. + * sysdeps/unix/sysv/linux/i386/Makefile [subdir=misc] + (sysdep_routines): Add call_pselect6. + * sysdeps/unix/sysv/linux/i386/call_pselect6.S: New file. + * sysdeps/unix/sysv/linux/i386/pselect.c: New file. + * misc/Makefile (tests): Add tst-pselect. + * misc/tst-pselect.c: New file. + +2006-01-20 Roland McGrath + + * sysdeps/mach/hurd/ppoll.c: New file. + +2006-01-20 Ulrich Drepper + + * sysdeps/unix/sysv/linux/pselect.c: Fix typo in declaration. + + * sysdeps/unix/sysv/linux/xmknodat.c (__xmknodat): Cast k_dev + value to unsigned int to match kernel. + + * sysdeps/unix/sysv/linux/faccessat.c (faccessat): Try using the + syscall in more cases. + + * io/Makefile (tests): Add tst-symlinkat, tst-linkat, tst-readlinkat, + tst-mkdirat, tst-mknodat, and tst-mkfifoat. + * io/tst-symlinkat.c: New file. + * io/tst-linkat.c: New file. + * io/tst-readlinkat.c: New file. + * io/tst-mkdirat.c: New file. + * io/tst-mknodat.c: New file. + * io/tst-mkfifoat.c: New file. + + * dirent/Makefile (tests): Add tst-fdopendir2. + * dirent/tst-fdopendir2.c: New file. + +2006-01-20 Alexandre Oliva + + * sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h + (sigcontext_struct) [__WORDSIZE == 32]: Define. + +2006-01-20 Kaz Kojima + + * sysdeps/sh/sh4/__longjmp.S: Demangle also r14 and r15. + * sysdeps/sh/sh3/__longjmp.S: Likewise. + * sysdeps/sh/sh4/setjmp.S: Mangle also r14 and r15. + * sysdeps/sh/sh3/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep.h [__ASSEMBLER__] + (PTR_MANGLE): Add temporary register as the second parameter. + (PTR_DEMANGLE): Likewize. + (PTR_MANGLE2, PTR_DEMANGLE2): Define. + +2006-01-19 Ulrich Drepper + + * include/fcntl.h: Declare __have_atfcts. + * sysdeps/unix/sysv/linux/faccessat.c: Use syscall if available. + * sysdeps/unix/sysv/linux/fchmodat.c: Likewise. + * sysdeps/unix/sysv/linux/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/futimesat.c: Likewise. + * sysdeps/unix/sysv/linux/linkat.c: Likewise. + * sysdeps/unix/sysv/linux/mkdirat.c: Likewise. + * sysdeps/unix/sysv/linux/openat.c: Likewise. + * sysdeps/unix/sysv/linux/readlinkat.c: Likewise. + * sysdeps/unix/sysv/linux/renameat.c: Likewise. + * sysdeps/unix/sysv/linux/symlinkat.c: Likewise. + * sysdeps/unix/sysv/linux/unlinkat.c: Likewise. + * sysdeps/unix/sysv/linux/xmknodat.c: Likewise. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. + * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_PSELECT, + __ASSUME_PPOLL, and __ASSUME_ATFCTS if possible. + + * io/ppoll.c: New file. + * io/Makefile (routines): Add ppoll. + (CFLAGS-ppoll.c): Define. + * io/Versions: Export ppoll for GLIBC_2.4. + * io/sys/poll.h: Declare ppoll. + * sysdeps/unix/sysv/linux/ppoll.c: New file. + + * misc/pselect.c: Make it possible to include this file to define + the generic code as a static function. + * sysdeps/unix/sysv/linux/pselect.c: New file. + +2006-01-19 Jakub Jelinek + + * misc/pselect.c (__pselect): Remove static. + Include sysdep-cancel.h again. Add LIBC_CANCEL_HANDLED (). + +2006-01-18 Roland McGrath + + * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h [__ASSEMBLER__]: Don't + include problematic headers for assembler. + + * Makerules ($(+sysdir_pfx)sysd-rules): Don't emit m_%.c rules, + instead emit m_%.o compilation rules from s_%.? source files. + * math/Makefile ($(objpfx)m_%$o: s_%.c): New rule using o-iterator. + +2006-01-18 Ulrich Drepper + + * misc/pselect.c (__pselect): No need to enable async cancellation + here. This is done in select. + + * sysdeps/unix/sysv/linux/fxstatat.c [STAT_IS_KERNEL_STAT] + (__fxstatat): Correct handling of invalid vers values. + + [BZ #2173] + * libio/fileops.c (_IO_new_file_fopen): If ,ccs= is given, also + set vtable to the wide vtable. + * libio/tst-fopenloc2.c: New file. + * libio/Makefile (tests): Add tst-fopenloc2. + +2006-01-18 Roland McGrath + + * sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c: Restore + attribute_hidden here. + + * sysdeps/sparc/sparc64/Makefile (long-double-fcts): Move this ... + * sysdeps/sparc/Makefile (long-double-fcts): ... to here. + +2006-01-18 Jakub Jelinek + + * elf/dl-deps.c (_dl_map_object_deps): In case of failure also make a + copy of objname string. + +2006-01-16 Roland McGrath + + * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules to install + into $(inst_includedir)/%.h from sysdirs. + [headers]: Change static pattern rule for installing + $(headers) to do only those not matching %.h. + ($(inst_includedir)/%.h: $(objpfx)%.h): Add this pattern rule instead. + ($(inst_includedir)/%.h: %.h): Likewise. + ($(inst_includedir)/%.h: $(..)include/%.h): Likewise. + + * Makefile ($(inst_includedir)/gnu/stubs.h): + Add $(make-target-directory). + + * stdlib/Makefile (headers): Restore headers removed in last change. + +2006-01-16 Jakub Jelinek + + * math/e_exp2l.c: Don't include stdio.h, errno.h, stub-tag.h, include + math_private.h. + (__ieee754_exp2l): Compute for now as expl (M_LN2l * x) + instead of failing. + (exp2l): Remove stub_warning. + +2006-01-15 Jakub Jelinek + + * io/tst-faccessat.c (do_test): Don't fail if geteuid () == 0. + +2006-01-16 Ulrich Drepper + + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_TMPFS_NAME. + * sysdeps/unix/sysv/linux/shm_open.c [__ASSUME_TMPFS_NAME] + (where_is_shmfs): Don't test for obsolete shm filesystem name. + + * sysdeps/unix/sysv/linux/getsysstats.c: Don't search for proc + mount point. We assume procfs is mounted at /proc in many other + places already. + +2006-01-15 Andreas Jaeger + + [BZ #1950] + * posix/regex_internal.c (re_string_reconstruct): Adjust for + build_wcs_upper_buffer change. + (build_wcs_upper_buffer): Change return type. + + [BZ #2153] + * math/s_cacosh.c (__cacosh): Do not return a negative + value. Patch by Wes Loewer . + * math/s_cacoshl.c (__cacoshl): Likewise. + * math/s_cacoshf.c (__cacoshf): Likewise. + * math/libm-test.inc (cacosh_test): Adjust for change. + + * sysdeps/alpha/fpu/libm-test-ulps: Adopt for cacosh test change. + * sysdeps/hppa/fpu/libm-test-ulps: Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Likewise. + * sysdeps/ia64/fpu/libm-test-ulps: Likewise. + * sysdeps/m68k/fpu/libm-test-ulps: Likewise. + * sysdeps/mips/fpu/libm-test-ulps: Likewise. + * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. + + [BZ #2079] + * libio/fputwc_u.c (fputwc_unlocked): Fix return value. + * libio/getwc_u.c (__getwc_unlocked): Likewise. + * libio/wfileops.c (_IO_wdo_write): Likewise. + + [BZ #2078] + * libio/fputwc.c (fputwc): Use proper type for result. + * libio/ioungetwc.c (ungetwc): Likewise. + +2006-01-14 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/sched.h: Define SCHED_BATCH. + +2006-01-14 Roland McGrath + + * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Don't try + attribute_hidden here. + * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c (vsyslog): Restore + attribute_hidden here. + * sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c (__asprintf): Likewise. + * sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c (fprintf): Likewise. + * sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c (qecvt): Likewise. + * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c (qfcvt): Likewise. + * sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c (qgcvt): Likewise. + + * sysdeps/ieee754/ldbl-opt/configure.in: Use AC_TRY_COMPILE and + verify __LONG_DOUBLE_128__ predefine. + * sysdeps/ieee754/ldbl-opt/configure: Regenerated. + + * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_HIDDEN): Removed. + (NLDBL_DECL): Rewritten. + Remove __THROW from NLDBL_DECL uses. + Use NLDBL_DECL for __vstrfmon_l. + (__nldbl___vsyslog_chk): Restore missing decl. + * sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: Restore attribute_hidden. + +2006-01-14 Jakub Jelinek + + * misc/sys/cdefs.h (__LDBL_REDIR1_DECL): Define. + (__LDBL_REDIR_DECL): Stringize __nldbl and name. + * stdlib/bits/monetary-ldbl.h: Remove pastos from wchar-ldbl.h. + (strfmon, strfmon_l): Add __LDBL_REDIR_DECL. + * stdlib/bits/stdlib-ldbl.h (strtold, strtold_l, __strtold_internal, + qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): Use __LDBL_REDIR1_DECL + instead of __LDBL_REDIR_DECL. + * wcsmbs/bits/wchar-ldbl.h: Remove stale #if. + (__LDBL_REDIR_WCHAR): Remove. + (fwprintf, wprintf, swprintf, vfwprintf, vwprintf, vswprintf, + fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Use + __LDBL_REDIR_DECL instead of __LDBL_REDIR_WCHAR. + (wcstold, wcstold_l, __wcstold_internal): Add __LDBL_REDIR1_DECL. + * wcsmbs/wchar.h: Include bits/wchar-ldbl.h after bits/wchar2.h + instead of before it. + (wcstold inline): Move #ifndef __LDBL_COMPAT before + extern keyword. + * libio/bits/stdio-ldbl.h (__snprintf_chk, __vsnprintf_chk): Add + __LDBL_REDIR_DECL. + * misc/bits/syslog-ldbl.h (vsyslog): Protect with #ifdef __USE_BSD. + (__syslog_chk, __vsyslog_chk): Add __LDBL_REDIR_DECL. + +2006-01-14 Roland McGrath + + * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Fix typo. + (NLDBL_HIDDEN): New macro. + (NLDBL_DECL): Use it in place of attribute_hidden. + + * misc/efgcvt.c: Include instead of . + * misc/efgcvt_r.c: Likewise. + + * sysdeps/unix/sysv/linux/sparc/sparc32/nldbl-abi.h: New file. + * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: #include + to define LONG_DOUBLE_COMPAT_VERSION. Use that in place of + NLDBL_VERSION. + * sysdeps/ieee754/ldbl-opt/Versions: Include . + * sysdeps/unix/sysv/linux/sparc/sparc32/Versions: Revert last change. + +2006-01-14 Jakub Jelinek + + * math/math.h [__NO_LONG_DOUBLE_MATH] (__nldbl_nexttowardf): New + prototype. + (nexttowardf): Redirect to __nldbl_nexttowardf. + (nexttoward): Redirect to nextafter. + (__MATHDECL_2, __MATHDECL_1): Redirect *l functions to + non-*l versions if __LONG_DOUBLE_MATH_OPTIONAL and + __NO_LONG_DOUBLE_MATH. + * math/complex.h (__MATHDECL_1): Likewise. + * math/bits/mathcalls.h (nexttoward): Don't prototype if + __LDBL_COMPAT. + * misc/sys/cdefs.h: Include . + (__LDBL_COMPAT, __LDBL_REDIR1, __LDBL_REDIR, __LDBL_REDIR1_NTH, + __LDBL_REDIR_NTH, __LDBL_REDIR_DECL): New macros. + + * libio/bits/stdio-ldbl.h: New file. + * libio/Makefile (headers): Add it. + * libio/stdio.h [__LDBL_COMPAT]: #include it. + * libio/bits/libio-ldbl.h: New file. + * libio/Makefile (headers): Add it. + * libio/libio.h [__LDBL_COMPAT]: #include it. + * libio/libioP.h: Include . + * include/wchar.h (__fwprintf, __vfwprintf): Fix commented out + attribute. + (__vfwprintf_chk): New prototype. Add libc_hidden_proto. + * wcsmbs/bits/wchar-ldbl.h: New file. + * wcsmbs/Makefile (headers): Add it. + * wcsmbs/wchar.h [__LDBL_COMPAT]: #include it. + * wcsmbs/bits/wchar2.h (__vswprintf_alias): Removed. + (vswprintf): Define as a macro rather than inline function. + * stdio-common/bits/printf-ldbl.h: New file. + * stdio-common/Makefile (headers): Add it. + * stdio-common/printf.h [__LDBL_COMPAT]: #include it. + * libio/fwprintf.c: Include libioP.h. + (fwprintf): Use ldbl_weak_alias instead of weak_alias. + * libio/fwscanf.c: Include libioP.h. + (fwscanf): Rename to __fwscanf and add ldbl_strong_alias. + * libio/iovdprintf.c (vdprintf): Use ldbl_weak_alias instead of + weak_alias. + * libio/iovsprintf.c (_IO_vsprintf): Rename to __IO_vsprintf, + add ldbl_strong_alias and use INTDEF2 instead of INTDEF. + (vsprintf): Use ldbl_weak_alias instead of weak_alias. + * libio/iovsscanf.c (__vsscanf, vsscanf): Use ldbl_weak_alias + instead of weak_alias. + * libio/iovswscanf.c (vswscanf): Rename to __vswscanf, + add ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + * libio/obprintf.c (obstack_printf, obstack_vprintf): Use + ldbl_weak_alias instead of weak_alias. + * libio/swprintf.c: Include libioP.h. + (swprintf): Rename to __swprintf and add ldbl_strong_alias. + * libio/swscanf.c: Include libioP.h. + (swscanf): Rename to __swscanf and add ldbl_strong_alias. + * libio/vasprintf.c (vasprintf): Use ldbl_weak_alias instead of + weak_alias. + * libio/vscanf.c (vscanf): Use ldbl_weak_alias instead of + weak_alias. + * libio/vsnprintf.c (__vsnprintf, vsnprintf): Use ldbl_weak_alias + instead of weak_alias. + * libio/vswprintf.c (__vswprintf): Remove alias. + (vswprintf): Use ldbl_weak_alias instead of weak_alias. + * libio/vwprintf.c: Include libioP.h. + (vwprintf): Rename to __vwprintf and add ldbl_strong_alias. + * libio/vwscanf.c (vwscanf): Rename to __vwscanf and add + ldbl_strong_alias. + * libio/wprintf.c: Include libioP.h. + (wprintf): Rename to __wprintf and add ldbl_strong_alias. + * libio/wscanf.c: Include libioP.h. + (wscanf): Rename to __wscanf and add ldbl_strong_alias. + * stdio-common/asprintf.c (__asprintf): Rename to ___asprintf, add + ldbl_strong_alias and use INTDEF2 instead of INTDEF. + (asprintf): Use ldbl_weak_alias instead of weak_alias. + * stdio-common/dprintf.c (dprintf): Rename to __dprintf, add + ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + * stdio-common/fprintf.c: Include libioP.h. + (fprintf): Rename to __fprintf, add ldbl_strong_alias and + use ldbl_hidden_def instead of libc_hidden_def. + (_IO_fprintf): Use ldbl_weak_alias instead of weak_alias. + * stdio-common/fscanf.c: Include libioP.h. + (fscanf): Rename to __fscanf and add ldbl_strong_alias. + * stdio-common/printf.c: Include libioP.h. + (printf): Rename to __printf and add ldbl_strong_alias. + (_IO_printf): Use ldbl_strong_alias instead of strong_alias. + * stdio-common/printf_fp.c (__printf_fp): Rename to __printf_fp, add + ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + * stdio-common/printf_size.c (printf_size): Rename to __printf_size + and add ldbl_strong_alias. + * stdio-common/scanf.c (scanf): Rename to __scanf and add + ldbl_strong_alias. + * stdio-common/snprintf.c (snprintf): Use ldbl_weak_alias instead of + weak_alias. + * stdio-common/sprintf.c (sprintf): Rename to __sprintf, add + ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + (_IO_sprintf): Use ldbl_strong_alias instead of strong_alias. + * stdio-common/sscanf.c: Include libioP.h instead of iolibio.h. + (sscanf): Rename to __sscanf and add ldbl_strong_alias. + * stdio-common/vfprintf.c (vfprintf): Define to + _IO_vfprintf_internal. Use ldbl_strong_alias instead. Use + ldbl_hidden_def instead of libc_hidden_def. + (_IO_vfprintf_internal): Clear is_long_double if __ldbl_is_dbl, + handle the argument as double if it is non-zero. + (vfwprintf): Use ldbl_weak_alias instead of weak_alias. + (_IO_vfprintf): Add ldbl_strong_alias. + * stdio-common/vfscanf.c (_IO_vfscanf): Rename to + _IO_vfscanf_internal, don't use strtold if __ldbl_is_dbl, add + ldbl_strong_alias. + (vfwscanf): Use ldbl_weak_alias instead of weak_alias. + (__vfscanf): Rename to ___vfscanf, add ldbl_strong_alias and + use ldbl_hidden_def instead of libc_hidden_def. + (vfscanf): Use ldbl_weak_alias instead of weak_alias. + * stdio-common/vprintf.c: Include libioP.h. + (vprintf): Rename to __vprintf and add ldbl_strong_alias. + * debug/fprintf_chk.c (__fprintf_chk): Rename to ___fprintf_chk + and add ldbl_strong_alias. + * debug/printf_chk.c (__printf_chk): Rename to ___printf_chk + and add ldbl_strong_alias. + * debug/snprintf_chk.c: Include libioP.h. + (__snprintf_chk): Rename to ___snprintf_chk and add ldbl_strong_alias. + * debug/sprintf_chk.c: Include libioP.h. + (__sprintf_chk): Rename to ___sprintf_chk and add ldbl_strong_alias. + * debug/vfprintf_chk.c (__vfprintf_chk): Rename to ___vfprintf_chk, + add ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + * debug/vfwprintf_chk.c (__vfwprintf_chk): Add libc_hidden_def. + * debug/vprintf_chk.c (__vprintf_chk): Rename to ___vprintf_chk + and add ldbl_strong_alias. + * debug/vsnprintf_chk.c (__vsnprintf_chk): Rename to ___vsnprintf_chk, + add ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + * debug/vsprintf_chk.c (__vsprintf_chk): Rename to ___vsprintf_chk, + add ldbl_strong_alias and use ldbl_hidden_def instead of + libc_hidden_def. + + * stdlib/stdlib.h (strtold): Don't define inline if [!__LDBL_COMPAT]. + * wcsmbs/wchar.h (wcstold): Likewise. + * stdlib/strtod_l.c: Include math_ldbl_opt.h. + (____STRTOF_INTERNAL): Define. + (INTERNAL (__STRTOF)): Rename to ____STRTOF_INTERNAL. + (__STRTOF): Call ____STRTOF_INTERNAL instead. + [LONG_DOUBLE_COMPAT] (strtold_l, wcstold_l, __strtold_l, __wcstold_l): + Add compatibility symbols. + * stdlib/strtod.c: Include math_ldbl_opt.h. + [LONG_DOUBLE_COMPAT] (strtold, wcstold, __strtold_internal, + __wcstold_internal): Add compatibility symbols. + * stdlib/strtold.c: Include bits/wordsize.h, wchar.h. + (NEW, NEW1): Define. + (__new_strtold, __new_wcstold): New prototypes. + (____new_strtold_internal, ____new_wcstold_internal): Likewise. + Add libc_hidden_proto. + (STRTOF): Define to NEW (*told). + [__LONG_DOUBLE_MATH_OPTIONAL] (wcstold, strtold): Add + long_double_symbol. + [__LONG_DOUBLE_MATH_OPTIONAL] (__wcstold_internal, + __strtold_internal): Likewise. Add libc_hidden_ver. + + * stdlib/bits/stdlib-ldbl.h: New file. + * stdlib/Makefile (headers): Add it. + * stdlib/stdlib.h [__LDBL_COMPAT]: #include it. + * include/stdlib.h (ecvt_r, fcvt_r, qecvt_r, qfcvt_r): Remove + libc_hidden_proto. + (__ecvt, __fcvt, __gcvt, __ecvt_r, __fcvt_r, __qecvt, __qfcvt, + __qgcvt, __qecvt_r, __qfcvt_r): New prototypes. + * misc/efgcvt_r.c: Include shlib-compat.h. + (LONG_DOUBLE_CVT): Define. + (__APPEND, __APPEND2): Define. + (*fcvt_r): Use __APPEND instead of APPEND. Remove libc_hidden_def. + (*ecvt_r): Likewise. + (cvt_symbol): Define. Use it on fcvt_r and ecvt_r. + * misc/efgcvt.c: Include shlib-compat.h. + (LONG_DOUBLE_CVT): Define. + (__APPEND, __APPEND2): Define. + (fcvt): Use __APPEND instead of APPEND. Remove libc_hidden_def. + (ecvt, gcvt): Likewise. + (cvt_symbol): Define. Use it on fcvt, ecvt and gcvt. + + * stdlib/bits/monetary-ldbl.h: New file. + * stdlib/Makefile (headers): Add it. + * stdlib/monetary.h [__LDBL_COMPAT]: #include it. + * stdlib/strfmon.c: Include math_ldbl_opt.h. + (strfmon): Rename to __strfmon and add ldbl_strong_alias. + * stdlib/strfmon_l.c: Remove all traces of [!USE_IN_LIBIO]. + (__vstrfmon_l): Don't set is_long_double if __ldbl_is_dbl. + (__strfmon_l): Rename to ___strfmon_l and add ldbl_strong_alias. + (strfmon_l): Use ldbl_weak_alias instead of weak_alias. + + * misc/bits/syslog-ldbl.h: New file. + * misc/Makefile (headers): Add it. + * misc/sys/syslog.h [__LDBL_COMPAT]: #include it. + * misc/syslog.c: Include math_ldbl_opt.h. + (syslog): Rename to __syslog and add ldbl_strong_alias, + use ldbl_hidden_def instead of libc_hidden_def. + (vsyslog): Rename to __vsyslog and add ldbl_strong_alias, + use ldbl_hidden_def instead of libc_hidden_def. + + * sysdeps/generic/math_ldbl_opt.h: New file. + * math/w_j1l.c (j1l, y1l): Rename to __ prefixed variants. + Add weak_alias. + * math/w_j0l.c (j0l, y0l): Likewise. + * math/w_jnl.c (jnl, ynl): Likewise. + * sysdeps/ieee754/ldbl-96/s_nexttoward.c + (__nexttowardl): Remove strong_alias. + (nexttowardl): Remove weak_alias. + * sysdeps/ieee754/ldbl-96/s_erfl.c + (__erfl, __erfcl): Remove strong_alias. + (erfl, erfcl): Remove weak_alias. + + * sysdeps/ieee754/ldbl-64-128/s_asinhl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_atanl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_cbrtl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_ceill.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_copysignl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_cosl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_erfl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_expm1l.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_fabsl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_finitel.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_floorl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_fpclassifyl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_frexpl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_isinfl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_isnanl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_llrintl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_llroundl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_log1pl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_logbl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_lrintl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_lroundl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_modfl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_nextafterl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_nexttoward.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_nexttowardf.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_remquol.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_rintl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_roundl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_scalblnl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_signbitl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_sincosl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_sinl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_tanhl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_tanl.c: New file. + * sysdeps/ieee754/ldbl-64-128/s_truncl.c: New file. + * sysdeps/ieee754/ldbl-64-128/strtold_l.c: New file. + * sysdeps/ieee754/ldbl-64-128/w_expl.c: New file. + * sysdeps/ieee754/ldbl-opt/configure.in: New file. + * sysdeps/ieee754/ldbl-opt/configure: New file. + * sysdeps/ieee754/ldbl-opt/Makefile: New file. + * sysdeps/ieee754/ldbl-opt/Versions: New file. + * sysdeps/ieee754/ldbl-opt/cabs.c: New file. + * sysdeps/ieee754/ldbl-opt/cabsl.c: New file. + * sysdeps/ieee754/ldbl-opt/carg.c: New file. + * sysdeps/ieee754/ldbl-opt/cargl.c: New file. + * sysdeps/ieee754/ldbl-opt/cimag.c: New file. + * sysdeps/ieee754/ldbl-opt/cimagl.c: New file. + * sysdeps/ieee754/ldbl-opt/conj.c: New file. + * sysdeps/ieee754/ldbl-opt/conjl.c: New file. + * sysdeps/ieee754/ldbl-opt/creal.c: New file. + * sysdeps/ieee754/ldbl-opt/creall.c: New file. + * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c: New file. + * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-acos.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-acosh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-asin.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-atan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-atan2.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-atanh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cabs.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cacos.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-carg.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-casin.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-casinh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-catan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-catanh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ccos.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ceil.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cexp.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cimag.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-clog.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-clog10.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-compat.h: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-conj.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-copysign.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cos.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cosh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cpow.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-cproj.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-creal.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-csin.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-csinh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ctan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-drem.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-erf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-erfc.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-exp.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-exp10.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-exp2.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-expm1.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fabs.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fdim.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-finite.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-floor.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fma.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fmax.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fmin.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fmod.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-frexp.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-gamma.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-hypot.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-isinf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-isnan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-j0.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-j1.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-jn.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-llrint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-llround.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-log.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-log10.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-log1p.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-log2.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-logb.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-lrint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-lround.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-modf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-nan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-pow.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-printf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-remainder.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-remquo.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-rint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-round.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-scalb.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-scanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-signbit.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-significand.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sin.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sincos.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sinh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-strtold.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-syslog.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-tan.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-tanh.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-trunc.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-y0.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-y1.c: New file. + * sysdeps/ieee754/ldbl-opt/nldbl-yn.c: New file. + * sysdeps/ieee754/ldbl-opt/s_asinh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_atan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cacos.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cacosh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cacoshl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cacosl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_casin.c: New file. + * sysdeps/ieee754/ldbl-opt/s_casinh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_casinhl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_casinl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_catan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_catanh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_catanhl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_catanl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cbrt.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ccos.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ccosh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ccoshl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ccosl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ceil.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cexp.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cexpl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_clog.c: New file. + * sysdeps/ieee754/ldbl-opt/s_clog10.c: New file. + * sysdeps/ieee754/ldbl-opt/s_clog10l.c: New file. + * sysdeps/ieee754/ldbl-opt/s_clogl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_copysign.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cpow.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cpowl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cproj.c: New file. + * sysdeps/ieee754/ldbl-opt/s_cprojl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csin.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csinh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csinhl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csinl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csqrt.c: New file. + * sysdeps/ieee754/ldbl-opt/s_csqrtl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ctan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ctanh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ctanhl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ctanl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_erf.c: New file. + * sysdeps/ieee754/ldbl-opt/s_expm1.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fabs.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fdim.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fdiml.c: New file. + * sysdeps/ieee754/ldbl-opt/s_finite.c: New file. + * sysdeps/ieee754/ldbl-opt/s_floor.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fma.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fmal.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fmax.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fmaxl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fmin.c: New file. + * sysdeps/ieee754/ldbl-opt/s_fminl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_frexp.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ilogb.c: New file. + * sysdeps/ieee754/ldbl-opt/s_isinf.c: New file. + * sysdeps/ieee754/ldbl-opt/s_isnan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ldexp.c: New file. + * sysdeps/ieee754/ldbl-opt/s_ldexpl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_llrint.c: New file. + * sysdeps/ieee754/ldbl-opt/s_llround.c: New file. + * sysdeps/ieee754/ldbl-opt/s_log1p.c: New file. + * sysdeps/ieee754/ldbl-opt/s_logb.c: New file. + * sysdeps/ieee754/ldbl-opt/s_lrint.c: New file. + * sysdeps/ieee754/ldbl-opt/s_lround.c: New file. + * sysdeps/ieee754/ldbl-opt/s_modf.c: New file. + * sysdeps/ieee754/ldbl-opt/s_nan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_nanl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_nearbyint.c: New file. + * sysdeps/ieee754/ldbl-opt/s_nextafter.c: New file. + * sysdeps/ieee754/ldbl-opt/s_remquo.c: New file. + * sysdeps/ieee754/ldbl-opt/s_rint.c: New file. + * sysdeps/ieee754/ldbl-opt/s_round.c: New file. + * sysdeps/ieee754/ldbl-opt/s_scalbln.c: New file. + * sysdeps/ieee754/ldbl-opt/s_scalbn.c: New file. + * sysdeps/ieee754/ldbl-opt/s_significand.c: New file. + * sysdeps/ieee754/ldbl-opt/s_significandl.c: New file. + * sysdeps/ieee754/ldbl-opt/s_sin.c: New file. + * sysdeps/ieee754/ldbl-opt/s_sincos.c: New file. + * sysdeps/ieee754/ldbl-opt/s_tan.c: New file. + * sysdeps/ieee754/ldbl-opt/s_tanh.c: New file. + * sysdeps/ieee754/ldbl-opt/s_trunc.c: New file. + * sysdeps/ieee754/ldbl-opt/w_acos.c: New file. + * sysdeps/ieee754/ldbl-opt/w_acosh.c: New file. + * sysdeps/ieee754/ldbl-opt/w_acoshl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_acosl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_asin.c: New file. + * sysdeps/ieee754/ldbl-opt/w_asinl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_atan2.c: New file. + * sysdeps/ieee754/ldbl-opt/w_atan2l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_atanh.c: New file. + * sysdeps/ieee754/ldbl-opt/w_atanhl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_cosh.c: New file. + * sysdeps/ieee754/ldbl-opt/w_coshl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_drem.c: New file. + * sysdeps/ieee754/ldbl-opt/w_dreml.c: New file. + * sysdeps/ieee754/ldbl-opt/w_exp.c: New file. + * sysdeps/ieee754/ldbl-opt/w_exp10.c: New file. + * sysdeps/ieee754/ldbl-opt/w_exp10l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_fmod.c: New file. + * sysdeps/ieee754/ldbl-opt/w_fmodl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_hypot.c: New file. + * sysdeps/ieee754/ldbl-opt/w_hypotl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_j0.c: New file. + * sysdeps/ieee754/ldbl-opt/w_j0l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_j1.c: New file. + * sysdeps/ieee754/ldbl-opt/w_j1l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_jn.c: New file. + * sysdeps/ieee754/ldbl-opt/w_jnl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_lgamma.c: New file. + * sysdeps/ieee754/ldbl-opt/w_lgamma_r.c: New file. + * sysdeps/ieee754/ldbl-opt/w_lgammal.c: New file. + * sysdeps/ieee754/ldbl-opt/w_lgammal_r.c: New file. + * sysdeps/ieee754/ldbl-opt/w_log.c: New file. + * sysdeps/ieee754/ldbl-opt/w_log10.c: New file. + * sysdeps/ieee754/ldbl-opt/w_log10l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_log2.c: New file. + * sysdeps/ieee754/ldbl-opt/w_log2l.c: New file. + * sysdeps/ieee754/ldbl-opt/w_logl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_pow.c: New file. + * sysdeps/ieee754/ldbl-opt/w_powl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_remainder.c: New file. + * sysdeps/ieee754/ldbl-opt/w_remainderl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_scalb.c: New file. + * sysdeps/ieee754/ldbl-opt/w_scalbl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_sinh.c: New file. + * sysdeps/ieee754/ldbl-opt/w_sinhl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_sqrt.c: New file. + * sysdeps/ieee754/ldbl-opt/w_sqrtl.c: New file. + * sysdeps/ieee754/ldbl-opt/w_tgamma.c: New file. + * sysdeps/ieee754/ldbl-opt/w_tgammal.c: New file. + + * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/Implies: New file. + * sysdeps/sparc/sparc32/Implies: Move ldbl-128 first and flt-32 + after dbl-64. + * sysdeps/unix/sysv/linux/sparc/sparc32/Versions (NLDBL_VERSION): + %define this to to GLIBC_2.4. + * sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file. + * sysdeps/sparc/sparc32/fpu/s_fabs.c: New file. + * sysdeps/sparc/sparc32/fpu/s_fabsf.S: New file. + * sysdeps/sparc/sparc32/fpu/s_fabsl.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_qtoui.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_qtoux.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_qtox.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_uitoq.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_xtoq.c: Removed. + * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: New file. + * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: New file. + * sysdeps/sparc/sparc32/soft-fp/Versions: New file. + * sysdeps/sparc/fpu/bits/mathinline.h (__unordered_cmp, + __unordered_v9cmp): Define differently depending on + -m32 -mlong-double-{64,128}. + (__signbitl, sqrtl, __ieee754_sqrtl): New inlines. + * sysdeps/sparc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. + * sysdeps/sparc/sparc32/soft-fp/Makefile (sparc32-quad-routines): + Set. + (sysdep-routines): Add sparc32-quad-routines. + * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Include stdlib.h. + (FP_HANDLE_EXCEPTIONS): Call ___Q_simulate_exceptions as a normal + function. + * sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): New + alias to _Q_sqrt. + * sysdeps/sparc/sparc32/soft-fp/q_div.c (_Q_div): Fix a typo. + * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Include stdlib.h. + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. + + * libio/libio.h (_IO_vfscanf, _IO_vfprintf): Remove __THROW. + (_IO_vfwscanf, _IO_vfwprintf): Likewise. + * libio/libioP.h (_IO_vdprintf): Likewise. + +2006-01-13 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/sysdep.h (PTR_MANGLE, PTR_MANGLE2, + PTR_DEMANGLE, PTR_DEMANGLE2): Move ... + * sysdeps/unix/alpha/sysdep.h: ... here. + * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Define __GI___fxstatat64. + +2006-01-13 Andreas Jaeger + + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (ELF_NVRREG): Fix + value for PowerPC64. + +2006-01-12 Roland McGrath + + * sysdeps/s390/jmpbuf-offsets.h: New file. + * sysdeps/s390/jmpbuf-unwind.h: Include it. + + * sysdeps/alpha/__longjmp.S: Include + instead of . + * sysdeps/alpha/setjmp.S: Likewise. + * sysdeps/i386/__longjmp.S: Likewise. + * sysdeps/i386/bsd-_setjmp.S: Likewise. + * sysdeps/i386/bsd-setjmp.S: Likewise. + * sysdeps/i386/setjmp.S: Likewise. + * sysdeps/powerpc/powerpc32/__longjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. + * sysdeps/sh/sh3/setjmp.S: Likewise. + * sysdeps/sh/sh4/setjmp.S: Likewise. + * sysdeps/sparc/sparc32/__longjmp.S: Likewise. + * sysdeps/sparc/sparc32/setjmp.S: Likewise. + * sysdeps/x86_64/__longjmp.S: Likewise. + * sysdeps/x86_64/setjmp.S: Likewise. + * sysdeps/mach/hurd/i386/longjmp-ts.c: Include . + * sysdeps/mach/hurd/powerpc/longjmp-ts.c: Likewise. + * sysdeps/mach/hurd/alpha/longjmp-ts.c: Likewise. + * sysdeps/alpha/jmpbuf-unwind.h: Likewise. + * sysdeps/hppa/jmpbuf-unwind.h: Likewise. + * sysdeps/i386/jmpbuf-unwind.h: Likewise. + * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. + * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. + * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. + * sysdeps/x86_64/jmpbuf-unwind.h: Likewise. + * setjmp/jmpbuf-offsets.h: File removed. + * include/bits/setjmp.h: File removed. + +2006-01-11 Ulrich Drepper + + * libio/wmemstream.c: New file. + * libio/stdio.h: Declare open_wmemstream. + * libio/Versions: Export open_wmemstream for GLIBC_2.4. + * libio/Makefile (routines): Add wmemstream. + (tests): Add tst-memstream1, tst-memstream2, tst-wmemstream2, and + tst-wmemstream2. + * libio/tst-memstream1.c: New file. + * libio/tst-memstream2.c: New file. + * libio/tst-wmemstream1.c: New file. + * libio/tst-wmemstream2.c: New file. + + * libio/memstream.c (_IO_mem_sync): Remove useless call to + _IO_default_sync. + + * elf/check-textrel.c: Add missing argument. + + * Makerules: Define build-module-asneeded. + * iconvdata/extra-module.mk: Use build-module-asneeded. + needed. + +2006-01-09 Richard Henderson + + * iconvdata/extra-module.mk ($(objpfx)$(mod).so): Depend on ld.so. + * sysdeps/alpha/__longjmp.S: Use PTR_DEMANGLE. + * sysdeps/alpha/setjmp.S: Likewise. Avoid __sigjmp_save for rtld; + tailcall in libc.so. + * sysdeps/unix/sysv/linux/alpha/sysdep.h (PTR_MANGLE): Define. + (PTR_MANGLE2): Define. + +2006-01-11 Ulrich Drepper + + * elf/check-localplt.c: New file. + * elf/Makefile: Add rules to build and run check-localplt. + * scripts/data/localplt-x86_64-linux-gnu.data: New file. + * scripts/data/localplt-i386-linux-gnu.data: New file. + + * include/sys/stat.h: Add libc_hidden_proto for __fxstatat64. + * sysdeps/unix/sysv/linux/fxstatat64.c: Add libc_hidden_def for + __fxstatat64. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Add + __GI___fxstatat64 alias. + + * libio/memstream.c (_IO_mem_finish): Fix potential memory leak if + realloc fails. + + * include/sched.h: Add libc_hidden_proto for __sched_yield. + + * libio/genops.c (_IO_unbuffer_write): Give concurrently running + threads the chance to work correctly by trying to lock the stream. + If this does not work, proceed without locking. + +2006-01-10 Ulrich Drepper + + * libio/genops.c (_IO_unbuffer_write): Don't always free the + buffer. This is not necessary except in debug mode. If we don't + free the buffer but the FILE structure to a list. + (buffer_free): New function. Free buffers or tell _IO_unbuffer_write + to do so. + * libio/libio.h (struct _IO_FILE): Add new members to keep track + of which buffers have to be freed. + + * iconv/gconv_cache.c (free_mem): Don't call munmap if gconv_cache + is NULL. + +2005-10-14 Paul Eggert + + * malloc/obstack.c: Fix old comments. Update FSF snail mail address. + * malloc/obstack.h: Likewise. + + [BZ #321] + Fix portability bugs encountered when porting to Itanium. + * malloc/obstack.h (obstack_empty_p, obstack_finish): Do not + assume that the "contents" member is suitably aligned. It is + not, for some hosts and alignments: e.g., Itanium, long-double. + * malloc/obstack.c (_obstack_begin, _obstack_begin_1, + _obstack_newchunk): Likewise. + * malloc/obstack.c: Include , for size_t. + Include , if needed and available. + (DEFAULT_ALIGNMENT): Now an enum constant, not a macro. + Use C89 offsetof rather than K&R trick. + Use the maximum alignment of uintmax_t, long double, void * + rather than the alignment of double. + (union fooround): Use uintmax_t, long double, void * members + rather than just long and double. + + [BZ #321] + Fix portability bugs encountered when porting to the IBM iSeries, + where pointers are 256 bits wide and no integers are that wide. + * malloc/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove. + All uses changed to: + (__BPTR_ALIGN, __PTR_ALIGN): New macros. + (struct _obstack_chunk.temp): Change from int to a union + of pointer and int. All uses changed. + + [BZ #321] + * malloc/obstack.c (print_and_abort) [!_LIBC]: + Call fprintf (stderr, ...), not __fxprintf (NULL, ...). + [_LIBC && USE_IN_LIBIO]: Don't include ; no longer needed. + +2006-01-10 Derek Price + Paul Eggert + + [BZ #1060] + * posix/glob.c: Assume freestanding C89 compiler. Simplify cruft that + may be replaced with GNULIB modules. Make no attempt to find 64-bit + versions of file access functions directly when [!_LIBC]. + Don't define GLOB_* macros here. + (DIRENT_MUST_BE, DIRENT_MIGHT_BE_SYMLINK, DIRENT_MIGHT_BE_DIR): New + macros to abstract dirent->d_type access. + (GETPW_R_SIZE_MAX, GET_LOGIN_NAME_MAX): New macros to abstract sysconf + access. + +2006-01-10 Roland McGrath + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h + (PTR_MANGLE): Fix cast. + + * timezone/test-tz.c: Revert last change, updating to match + tzdata2005r definition of "MST". + +2006-01-10 Ulrich Drepper + + * include/bits/setjmp.h: Don't include jmpbuf-offsets.h if _ISOMAC is + defined. + +2006-01-10 Andreas Jaeger + + * include/time.h: Use normal comments. + +2006-01-10 Thomas Schwinge + + * hurd/sigunwind.c: Include instead of . + * sysdeps/mach/hurd/jmp-unwind.c: Likewise. + +2006-01-10 Jakub Jelinek + + * wcsmbs/bits/wchar2.h (vswprintf): Call __vswprintf_alias rather than + vswprintf recursively. + +2006-01-10 Ulrich Drepper + + * sysdeps/x86_64/bits/setjmp.h: Add back accidently removed #endif. + +2006-01-10 Roland McGrath + + * include/bits/setjmp.h: New file. + * setjmp/jmpbuf-offsets.h: New file. + * sysdeps/alpha/bits/setjmp.h: Move JB_* macros ... + * sysdeps/alpha/jmpbuf-offsets.h: ... here, new file. + * sysdeps/hppa/bits/setjmp.h (JB_SP): Macro moved ... + * sysdeps/hppa/jmpbuf-offsets.h: ... here, new file. + * sysdeps/i386/bits/setjmp.h: Move JB_* macros ... + * sysdeps/i386/jmpbuf-offsets.h: ... here, new file. + * sysdeps/mips/bits/setjmp.h (JB_PC): Macro removed. + * sysdeps/powerpc/bits/setjmp.h: Move JB_* macros ... + * sysdeps/powerpc/jmpbuf-offsets.h: ... here, new file. + * sysdeps/s390/bits/setjmp.h: Remove __JB_* macros. + * sysdeps/sh/bits/setjmp.h (JB_SIZE): Macro moved ... + * sysdeps/sh/jmpbuf-offsets.h: ... here, new file. + * sysdeps/sparc/sparc32/bits/setjmp.h: Move JB_* macros ... + * sysdeps/sparc/sparc32/jmpbuf-offsets.h: ... here, new file. + * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Remove JB_* macros. + * sysdeps/x86_64/bits/setjmp.h: Move JB_* macros ... + * sysdeps/x86_64/jmpbuf-offsets.h: ... here, new file. + + * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/powerpc/jmpbuf-unwind.h: ... here. + * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/alpha/jmpbuf-unwind.h: ... here. + * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/sparc/sparc32/jmpbuf-unwind.h: ... here. + * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/i386/jmpbuf-unwind.h: ... here. + * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/x86_64/jmpbuf-unwind.h: ... here. + * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/sh/jmpbuf-unwind.h: ... here. + * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/hppa/jmpbuf-unwind.h: ... here, new file. + * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/mips/jmpbuf-unwind.h: ... here. + * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/m68k/jmpbuf-unwind.h: ... here, new file. + * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... + * sysdeps/s390/jmpbuf-unwind.h: ... here. + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): + Move macro ... + * sysdeps/ia64/jmpbuf-unwind.h: ... here. + * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): + Move macro ... + * sysdeps/sparc/sparc64/jmpbuf-unwind.h: ... here. + + * sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/. + * sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/. + + * sysdeps/linkmap.h: File removed. + +2006-01-07 Carlos O'Donell + + * sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocations + by using LR and RR. Add %sr0 to iitlbp. + +2006-01-09 Roland McGrath + + * timezone/private.h: Update from tzcode2005r. + * timezone/tzfile.h: Likewise. + * timezone/zdump.c: Likewise. + * timezone/zic.c: Likewise. + * timezone/africa: Update from tzdata2005r. + * timezone/antarctica: Likewise. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/systemv: Likewise. + + * elf/Makefile ($(objpfx)reldep5.out): Fix dependency typo, + so we depend on $(objpfx)reldepmod6.so as intended. + +2006-01-09 Ulrich Drepper + + [BZ #2126] + * sysdeps/i386/i686/strtok.S: Store pointer to NUL byte if NULL is + returned. + * sysdeps/i386/strtok.S: Likewise. + * sysdeps/x86_64/strtok.S: Likewise. + * string/Makefile (tests): Add bug-strtok1. + * string/bug-strtok1.c: New file. + + * elf/check-textrel.c (AB): Also check for writable and executable + segments. + + * sysdeps/ieee754/dbl-64/e_exp2.c: Remove section attribute from + const variables, gas produces garbage. + * sysdeps/ieee754/flt-32/e_exp2f.c: Likewise. + * sysdeps/ieee754/flt-32/e_expf.c: Likewise. + * sysdeps/ieee754/flt-32/s_expm1f.c: Likewise. + +2006-01-09 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): Add + stack bias to mc_fp field. + + * sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h + (struct kernel_stat): Rename st_[amc]time fields to st_[amc]time_sec. + (struct kernel_stat64): New type. + (_HAVE___UNUSED1, _HAVE___UNUSED2, _HAVE_STAT___UNUSED1, + _HAVE_STAT___UNUSED2, _HAVE_STAT___UNUSED3, _HAVE_STAT___UNUSED4, + _HAVE_STAT___UNUSED5, _HAVE_STAT___PAD1, _HAVE_STAT___PAD2, + _HAVE_STAT64___UNUSED1, _HAVE_STAT64___UNUSED2, + _HAVE_STAT64___UNUSED3, _HAVE_STAT64___UNUSED4, + _HAVE_STAT64___UNUSED5, _HAVE_STAT64___PAD1, _HAVE_STAT64___PAD2): + Remove. + * sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Use i386/xstat.c. + * sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: + Use i386/fxstatat.c. + * sysdeps/unix/sysv/linux/sparc/sparc64/lxstat.c: Use i386/lxstat.c. + * sysdeps/unix/sysv/linux/sparc/sparc64/xstatconv.c: New file. + * sysdeps/unix/sysv/linux/sparc/bits/stat.h (struct stat, + struct stat64): Add nsec resolution for 64-bit code like already done + for 32-bit code. + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL): Don't define + for sparc64. + (__ASSUME_STAT64_SYSCALL): Only define for sparc64 for >= 2.6.12 + kernels. + + * scripts/data/c++-types-sparc-linux-gnu.data: New file. + * scripts/data/c++-types-sparc64-linux-gnu.data: New file. + * scripts/data/c++-types-alpha-linux-gnu.data: Adjust. + +2006-01-08 Roland McGrath + + [BZ #1535] + * sysdeps/unix/get_child_max.c: New file. + * posix/get_child_max.c: New file. + * posix/Makefile (routines): Add it. + * include/sys/sysinfo.h (__get_child_max): Declare it. + * sysdeps/posix/sysconf.c (__sysconf) [! CHILD_MAX]: Use it. + + * sysdeps/unix/sysv/linux/futimes.c [!__NR_fcntl && __NR_fcntl64]: Use + fcntl64 syscall instead. + + * stdio-common/tst-fmemopen2.c (do_test): Add a cast. + * stdio-common/printf-parsemb.c (__find_specmb): Likewise. + + * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in + #include for kernel-features.h. + * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/select.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. + * sysdeps/unix/sysv/linux/check_pf.c: Likewise. + * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise. + * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. + * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. + * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. + * sysdeps/unix/sysv/linux/clock_settime.c: Likewise. + * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. + * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. + * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. + * sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise. + * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/futimes.c: Likewise. + * sysdeps/unix/sysv/linux/futimesat.c: Likewise. + * sysdeps/unix/sysv/linux/fxstat64.c: Likewise. + * sysdeps/unix/sysv/linux/fxstatat64.c: Likewise. + * sysdeps/unix/sysv/linux/getcwd.c: Likewise. + * sysdeps/unix/sysv/linux/getdents.c: Likewise. + * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fchown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/lockf64.c: Likewise. + * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. + * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. + * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. + * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. + * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. + * sysdeps/unix/sysv/linux/ifreq.c: Likewise. + * sysdeps/unix/sysv/linux/ldsodefs.h: Likewise. + * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/chown.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mmap64.c: Likewise. + * sysdeps/unix/sysv/linux/msgctl.c: Likewise. + * sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise. + * sysdeps/unix/sysv/linux/opendir.c: Likewise. + * sysdeps/unix/sysv/linux/poll.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/pread.c: Likewise. + * sysdeps/unix/sysv/linux/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/prof-freq.c: Likewise. + * sysdeps/unix/sysv/linux/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise. + * sysdeps/unix/sysv/linux/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/shmctl.c: Likewise. + * sysdeps/unix/sysv/linux/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/sigpending.c: Likewise. + * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. + * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Likewise. + * sysdeps/unix/sysv/linux/statvfs64.c: Likewise. + * sysdeps/unix/sysv/linux/syslog.c: Likewise. + * sysdeps/unix/sysv/linux/testrtsig.h: Likewise. + * sysdeps/unix/sysv/linux/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/utimes.c: Likewise. + * sysdeps/unix/sysv/linux/xstat64.c: Likewise. + * sysdeps/unix/sysv/linux/xstatconv.h: Likewise. + +2006-01-07 Roland McGrath + + * po/libc.pot: Regenerated. + + * po/.cvsignore: List libc.pot.files, and not any .pot names. + + * manual/maint.texi (Porting): Don't mention Dist files. + * sysdeps/alpha/soft-fp/Dist: File removed. + * sysdeps/alpha/Dist: File removed. + * sysdeps/i386/i686/Dist: File removed. + * sysdeps/i386/soft-fp/Dist: File removed. + * sysdeps/i386/Dist: File removed. + * sysdeps/mips/soft-fp/Dist: File removed. + * sysdeps/mips/mips64/soft-fp/Dist: File removed. + * sysdeps/mips/mips64/Dist: File removed. + * sysdeps/mips/Dist: File removed. + * sysdeps/wordsize-32/Dist: File removed. + * sysdeps/m68k/fpu/switch/Dist: File removed. + * sysdeps/m68k/fpu/Dist: File removed. + * sysdeps/powerpc/powerpc64/Dist: File removed. + * sysdeps/powerpc/soft-fp/Dist: File removed. + * sysdeps/powerpc/powerpc32/fpu/Dist: File removed. + * sysdeps/powerpc/powerpc32/Dist: File removed. + * sysdeps/powerpc/fpu/Dist: File removed. + * sysdeps/powerpc/Dist: File removed. + * sysdeps/unix/common/Dist: File removed. + * sysdeps/unix/bsd/bsd4.4/Dist: File removed. + * sysdeps/unix/bsd/Dist: File removed. + * sysdeps/unix/sysv/linux/alpha/Dist: File removed. + * sysdeps/unix/sysv/linux/i386/Dist: File removed. + * sysdeps/unix/sysv/linux/mips/mips64/Dist: File removed. + * sysdeps/unix/sysv/linux/mips/Dist: File removed. + * sysdeps/unix/sysv/linux/m68k/Dist: File removed. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/Dist: File removed. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: File removed. + * sysdeps/unix/sysv/linux/powerpc/aix/Dist: File removed. + * sysdeps/unix/sysv/linux/powerpc/Dist: File removed. + * sysdeps/unix/sysv/linux/sparc/sparc32/Dist: File removed. + * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: File removed. + * sysdeps/unix/sysv/linux/sparc/Dist: File removed. + * sysdeps/unix/sysv/linux/ia64/Dist: File removed. + * sysdeps/unix/sysv/linux/s390/s390-64/Dist: File removed. + * sysdeps/unix/sysv/linux/s390/Dist: File removed. + * sysdeps/unix/sysv/linux/s390/s390-32/Dist: File removed. + * sysdeps/unix/sysv/linux/sh/Dist: File removed. + * sysdeps/unix/sysv/linux/x86_64/Dist: File removed. + * sysdeps/unix/sysv/linux/hppa/Dist: File removed. + * sysdeps/unix/sysv/linux/Dist: File removed. + * sysdeps/unix/sysv/Dist: File removed. + * sysdeps/unix/Dist: File removed. + * sysdeps/generic/Dist: File removed. + * sysdeps/sparc/sparc32/soft-fp/Dist: File removed. + * sysdeps/sparc/sparc32/sparcv9/Dist: File removed. + * sysdeps/sparc/sparc32/sparcv8/Dist: File removed. + * sysdeps/sparc/sparc32/Dist: File removed. + * sysdeps/sparc/sparc64/soft-fp/Dist: File removed. + * sysdeps/sparc/sparc64/Dist: File removed. + * sysdeps/sparc/Dist: File removed. + * sysdeps/gnu/Dist: File removed. + * sysdeps/ia64/fpu/Dist: File removed. + * sysdeps/ia64/Dist: File removed. + * sysdeps/mach/mips/Dist: File removed. + * sysdeps/mach/hurd/alpha/Dist: File removed. + * sysdeps/mach/hurd/i386/Dist: File removed. + * sysdeps/mach/hurd/mips/Dist: File removed. + * sysdeps/mach/hurd/powerpc/Dist: File removed. + * sysdeps/mach/hurd/Dist: File removed. + * sysdeps/s390/s390-64/Dist: File removed. + * sysdeps/s390/Dist: File removed. + * sysdeps/s390/s390-32/Dist: File removed. + * sysdeps/sh/Dist: File removed. + * sysdeps/posix/Dist: File removed. + * sysdeps/ieee754/dbl-64/Dist: File removed. + * sysdeps/ieee754/ldbl-128/Dist: File removed. + * sysdeps/ieee754/flt-32/Dist: File removed. + * sysdeps/ieee754/Dist: File removed. + * sysdeps/x86_64/soft-fp/Dist: File removed. + * sysdeps/x86_64/Dist: File removed. + * sysdeps/hppa/Dist: File removed. + + * Makerules (common-clean): Don't remove distinfo file. + ($(objpfx)distinfo): Target removed. + * manual/Makefile (mostlyclean): Don't remove distinfo file. + (glibc-targets): Remove echo-distinfo. + + * scripts/list-sources.sh: New file. + * Makefile (TAGS): New target. + * po/Makefile (libc.pot, libc.pot.files): New targets. + * Makeconfig (XGETTEXT): New variable. + * Makerules ($(..)po/%.pot): Rule removed. + (TAGS): Target removed. + * Rules (subdir_TAGS): Target removed. + * MakeTAGS: File removed. + + * Makefile (iconvdata/% localedata/% po/% manual/%): Depend on FORCE. + * Makeconfig ($(all-Depend-files)): New targets with no-op commands. + +2004-08-03 Marco Gerards + + [BZ #2119] + * sysdeps/mach/hurd/bits/ioctls.h (SIOCGIFHWADDR): New macro. + +2006-01-07 Ulrich Drepper + + * stdio-common/tstdiomisc.c (F): Use NAN to get NaN value. + +2006-01-06 Ulrich Drepper + + * elf/tst-tls8.c (do_test): Use $ORIGIN in module names. + +2006-01-03 Steven Munroe + + * sysdeps/generic/sysdep.h (cfi_same_value): Define macro. + + * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve, + _dl_profile_resolve): Add CFI directives for stack and LR save. + Save LR in LRSAVE of previous frame per ABI. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Add CFI directives + for LR save. + * sysdeps/powerpc/powerpc32/lshift.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S + (__makecontext, __novec_makecontext): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Add CFI directive + for LR save to register. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Add CFI directive + for stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. + * sysdeps/powerpc/powerpc32/ppc-mcount.S: Add CFI directives for stack + and LR save. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: + Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise. Don't use + negative stack addressing. + + * sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_runtime_resolve, + _dl_profile_resolve): Add CFI directives for stack and LR save. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Add CFI directives + for stack. + * sysdeps/powerpc/powerpc64/ppc-mcount.S (_mcount): Add CFI + directives for stack and LR save. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk): Add CFI + directives for stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Add CFI + directives for stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S + (__getcontext, __novec_getcontext): Add CFI directives for stack + and LR save. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S + (__makecontext): Add CFI directives for stack and LR save. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S + (__setcontext, __novec_setcontext): Add CFI directives for stack + and LR save. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S + (__swapcontext, __novec_swapcontext): Add CFI directives for stack + and LR save. + +2006-01-06 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include tls.h. + (SYSCALL_ERROR_HANDLER_ENTRY): Use %g4 instead of %g2, to avoid + the need of .register directive for it. + * configure.in (libc_cv_asm_cfi_directives): Use CFI rel offset + 2047 instead of 0 in the test on sparc64. + +2006-01-06 Ulrich Drepper + + * scripts/check-c++-types.sh: Add more pthread types. + * scripts/data//c++-types-i386-linux-gnu.data: Adjust. + * scripts/data//c++-types-ia64-linux-gnu.data: Likewise. + * scripts/data//c++-types-powerpc-linux-gnu.data: Likewise. + * scripts/data//c++-types-powerpc64-linux-gnu.data: Likewise. + * scripts/data//c++-types-s390-linux-gnu.data: Likewise. + * scripts/data//c++-types-s390x-linux-gnu.data: Likewise. + * scripts/data//c++-types-x86_64-linux-gnu.data: Likewise. + + * sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL_NCS): + Adjust for private->__private rename in tcbhead_t. + + [BZ #2114] + * ncsd/aicache.c: Don't use sendfile for records on the stack. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + Patch by dmueller@suse.com. + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Define MADV_REMOVE. + * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. + +2006-01-06 Roland McGrath + + * Makeconfig (+gnu-stabs): Remove ancient cruft. + + [BZ #2103] + * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_HWX25): Corrected macro + name (was typo ARPHDR_HWX25). + (ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP): New macros. + (ARPHRD_VOID, ARPHRD_NONE): New macros. + + * sysdeps/wordsize-32/divdi3.c (__moddi3): Add a cast. + + * io/fcntl.h [__USE_ATFILE] (AT_EACCESS): New macro. + * posix/unistd.h [__USE_ATFILE]: Declare faccessat. + * io/faccessat.c: New file. + * sysdeps/unix/sysv/linux/faccessat.c: New file. + * io/Makefile (routines): Add faccessat. + * io/Versions (libc: GLIBC_2.4): Likewise. + * io/tst-faccessat.c: New file. + * io/Makefile (tests): Add it. + + * scripts/check-local-headers.sh: Revert last change. + + * io/euidaccess.c: Add eaccess as an alias. + * sysdeps/mach/hurd/euidaccess.c: Likewise. + * sysdeps/posix/euidaccess.c: Likewise. + * posix/unistd.h [__USE_GNU]: Declare eaccess. + * io/Versions (libc: GLIBC_2.4): Add eaccess. + +2005-12-04 Joseph S. Myers + + * soft-fp/Makefile (gcc-single-routines): Add unordsf2, + floatunsisf, floatundisf. + (gcc-double-routines): Add unorddf2, floatunsidf, floatundidf. + (gcc-quad-routines): Add unordtf2, floatunsitf, floatunditf. + * soft-fp/op-common.h (_FP_CMP_UNORD): Define. + * soft-fp/single.h (FP_CMP_UNORD_S): Define. + * soft-fp/double.h (FP_CMP_UNORD_D): Define. + * soft-fp/quad.h (FP_CMP_UNORD_Q): Define. + * soft-fp/extended.h (FP_CMP_UNORD_E): Define. + * soft-fp/unordsf2.c: New file. + * soft-fp/unorddf2.c: New file. + * soft-fp/unordtf2.c: New file. + * soft-fp/floatunsisf.c: New file. + * soft-fp/floatundisf.c: New file. + * soft-fp/floatunsidf.c: New file. + * soft-fp/floatundidf.c: New file. + * soft-fp/floatunsitf.c: New file. + * soft-fp/floatunditf.c: New file. + + * soft-fp/op-common.h (__FP_CLZ): Define using __builtin_clz, + __builtin_clzl and __builtin_clzll. + +2006-01-05 Mike Frysinger + + * include/alloca.h (extend_alloca): Fix typoed name 'extern_alloca'. + +2006-01-05 Jakub Jelinek + + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL): + Only define for 2.6.12+ on s390{,x}. + (__ASSUME_GETDENTS32_D_TYPE): Only define for 2.6.8+ on most arches + and only for 2.6.11+ on s390{,x}. + +2006-01-05 Ulrich Drepper + + * sysdeps/pthread/aio_misc.h [!DONT_USE_BOOTSTRAP_MAP] + (struct waitlist): Don't add cond. + * sysdeps/pthread/aio_notify.c [!DONT_USE_BOOTSTRAP_MAP] + (__aio_notify): Use AIO_MISC_NOTIFY instead of pthread_cond_signal. + * sysdeps/pthread/aio_suspend.c [!DONT_USE_BOOTSTRAP_MAP]: Don't + use condvar, use AIO_MISC_WAIT. + * sysdeps/pthread/lio_listio.c: Likewise. + * rt/Makefile (tests): Add tst-aio9 and tst-aio10. + * rt/tst-aio9.c: New file. + * rt/tst-aio10.c: New file. + + * rt/tst-aio3.c: The thread is now supposed to be created. + +2006-01-05 Roland McGrath + + * include/features.h: Grok _ATFILE_SOURCE and define __USE_ATFILE when + it or _GNU_SOURCE is defined. + * io/fcntl.h: Protect *at and AT_* with [__USE_ATFILE] instead of + [__USE_GNU]. + * libio/stdio.h: Likewise. + * posix/unistd.h: Likewise. + * time/sys/time.h: Likewise. + * io/sys/stat.h: Likewise. + + * io/sys/stat.h [__USE_GNU]: Declare fchmodat. + * io/fchmodat.c: New file. + * io/Makefile (routines): Add fchmodat. + * io/Versions (libc: GLIBC_2.4): Likewise. + * sysdeps/unix/sysv/linux/fchmodat.c: New file. + * io/tst-fchmodat.c: New file. + * io/Makefile (tests): Add it. + +2006-01-03 Steven Munroe + + * sysdeps/powerpc/powerpc32/sysdep.h (ENTRY, EALIGN): Add cfi_startproc + directive to ENTRY macros. + (END): Add cfi_endproc directive to END macro. + * sysdeps/powerpc/powerpc64/sysdep.h (ENTRY, EALIGN): Add cfi_startproc + directive to ENTRY macros. + (END, END_GEN_TB): Add cfi_endproc directive to END macros. + * sysdeps/powerpc/powerpc32/dl-start.S: Remove ENTRY()s for + _dl_start_user and _dl_main_dispatch. + * sysdeps/powerpc/powerpc32/fpu/fprrest.S: Use END macro. + * sysdeps/powerpc/powerpc32/fpu/fprsave.S: Use Likewise. + * sysdeps/powerpc/powerpc32/gprrest0.S: Likewise. + * sysdeps/powerpc/powerpc32/gprrest1.S: Likewise. + * sysdeps/powerpc/powerpc32/gprsave0.S: Likewise. + * sysdeps/powerpc/powerpc32/gprsave1.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Remove redundant + cfi_startproc and cfi_endproc. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. + +2006-01-04 Ulrich Drepper + + * sysdeps/pthread/aio_misc.h (struct waitlist): Add result member. + * sysdeps/pthread/aio_notify.c (__aio_notify): For synchronous waiters, + failed I/O, and a result pointer, set value to -1. + * sysdeps/pthread/aio_suspend.c: Initialize result pointer to NULL. + * sysdeps/pthread/lio_listio.c: For LIO_WAIT, point result pointer in + wait list to local variable result. If nonzero afterwards, set errno + to EIO. For LIO_NOWAIT set result to NULL. + * rt/Makefile (tests): Add tst-aio8. + * rt/tst-aio8.c: New file. + +2005-12-25 Kristian Van Der Vliet + + * abi-tags (*-.*-syllable.*): New match, with ABI value 5. + * elf/cache.c (print_entry): Match the Syllable ABI tag. + +2006-01-04 Ulrich Drepper + + * include/stdlib.h: Make even more C++ compliant. + +2006-01-04 Joseph S. Myers + + * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Use + __SYSCALL_CLOBBERS. + +2006-01-03 H.J. Lu + + * configure.in (HAVE_LIBAUDIT): Check + audit_log_user_avc_message instead of audit_log_avc. + +2006-01-04 Joseph S. Myers + + * sysdeps/ieee754/bits/nan.h: Fix typo. + +2006-01-03 Jakub Jelinek + + * sysdeps/unix/sysv/linux/m68k/fchownat.c: Include string.h. + + * sysdeps/sparc/sparc32/dl-machine.h (LD_SO_PRELOAD): Remove unused + define. + + * sysdeps/sparc/sparc32/bits/atomic.h: Include stdint.h, add + {,u}atomic*_t typedefs. + (__sparc32_atomic_do_lock): Add __volatile and memory clobber. + (__sparc32_atomic_do_unlock): Add memory barrier. + (__sparc32_atomic_do_lock24, __sparc32_atomic_do_unlock24): Define. + [!SHARED] (__v9_compare_and_exchange_val_32_acq): Define. + (__v7_compare_and_exchange_val_acq, __v7_compare_and_exchange_bool_acq, + __v7_exchange_acq, __v7_exchange_and_add, __v7_exchange_24_rel, + __v7_compare_and_exchange_val_24_acq, __atomic_is_v9, + atomic_exchange_acq, atomic_compare_and_exchange_val_24_acq, + atomic_exchange_24_rel): Define. + [SHARED] (atomic_exchange_and_add): Define. + [!SHARED] (__ATOMIC_HWCAP_SPARC_V9): Define. + [!SHARED] (_dl_hwcap): New weak decl. + * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (atomic_exchange_24_rel, + atomic_compare_and_exchange_val_24_acq): Define. + * sysdeps/sparc/sparc64/bits/atomic.h (atomic_exchange_24_rel, + atomic_compare_and_exchange_val_24_acq): Define. + +2006-01-03 Ulrich Drepper + + lio_listio should emit an event for each individual request in + addition to the global event. + * sysdeps/pthread/lio_listio.c (lio_listio): Renamed to + lio_listio_internal. Remove mode parameter check. Only set sigevent + type to SIGEV_NONE if LIO_NO_INDIVIDUAL_EVENT is set. + (__lio_listio_21): New function. Compatiblity version which sets + LIO_NO_INDIVIDUAL_EVENT before calling lio_listio_internal. + (__lio_listio_item_notify): New function. + * sysdeps/pthread/lio_listio64.c: Define __lio_listio_21 and + __lio_listio_item_notify macros. + * sysdeps/pthread/Versions: New file. + * rt/tst-aio2.c: Adjust test for new semantics of lio_listio. + * include/aio.h: Define LIO_NO_INDIVIDUAL_EVENT. + * Versions.def: Add GLIBC_2.4 for librt. + + * rt/Versions: Whitespace fix. + * sysdeps/pthread/aio_misc.c: Likewise. + + * nscd/connections.c (nscd_init): Remove if block which should + have been removed as part of the -S option removal. + +2006-01-03 Andreas Jaeger + + * scripts/check-local-headers.sh: Allow $includedir/c++. + +2006-01-03 Jakub Jelinek + + * posix/unistd.h (ctermid): Remove __nonnull attribute. + +2006-01-02 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (PTR_MANGLE, + PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Define. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (PTR_MANGLE, + PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Define. + * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h [__WORDSIZE == 64] + (_JMPBUF_UNWINDS): Don't demangle uc_mcontext.mc_fp. + * sysdeps/sparc/sparc32/setjmp.S (__sigsetjmp): Mangle %fp, %sp + and %o7. + * sysdeps/sparc/sparc32/__longjmp.S (__longjmp): Demangle %fp, %sp + and %o7. + +2006-01-02 Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PTR_MANGLE2): + Define. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PTR_MANGLE2): + Likewise. + * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Demangle also %r15. + * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise. + * sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Mangle also %r15. + * sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise. + + * sysdeps/s390/bits/setjmp.h (__jmp_buf): Add __s390_jmp_buf + struct tag to make C++ happy. + +2006-01-02 Ulrich Drepper + + * posix/Makefile ($(objpfx)annexc.out): Move -I.. to the end of + the include list. + +2006-01-01 Ulrich Drepper + + * posix/getconf.c: Update copyright year. + * nss/getent.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * elf/ldconfig.c: Likewise. + * catgets/gencat.c: Likewise. + * csu/version.c: Likewise. + * elf/ldd.bash.in: Likewise. + * elf/sprof.c (print_version): Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * nscd/nscd.c (print_version): Likewise. + * debug/xtrace.sh: Likewise. + * malloc/memusage.sh: Likewise. + * malloc/mtrace.pl: Likewise. + * debug/catchsegv.sh: Likewise. + +2005-12-31 Andreas Jaeger + + [BZ #1395] + * manual/filesys.texi (Symbolic Links): Fix description of + canonicalize_file_name based on patch by Oskar Liljeblad + . + +2005-12-29 Andreas Jaeger + + * resolv/res_debug.c (latlon2ul): Use ISO C function definition. + (precsize_aton): Likewise. + (precsize_ntoa): Likewise. + + * resolv/gethnamaddr.c (_gethtbyname): Remove extra prototype. + (gethostbyname2): Likewise. + (gethostbyaddr): Likewise. + (getanswer): Use ISO C function definition. + +2005-12-29 Kaz Kojima + + * sysdeps/sh/sysdep.h: Add cfi instrumentation to asm fragments. + * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. + * sysdeps/sh/_mcount.S: Add cfi instrumentation. + * sysdeps/unix/sh/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/sh/makecontext.S: Adjust cfi_startproc. + * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: Remove now duplicate + cfi_startproc and cfi_endproc. + * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sh/socket.S: Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep.S: Add cfi_endproc. + +2005-12-30 Ulrich Drepper + + * sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard + value doesn't survive in a registers when the function returns. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + +2005-12-30 Jakub Jelinek + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define + PTR_MANGLE2. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define + PTR_MANGLE2 and PTR_DEMANGLE2. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Use PTR_DEMANGLE2. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Use PTR_MANGLE2. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + +2005-12-30 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): + Don't use _demangle parameter for now. + + [BZ #2080] + * libio/iogetwline.c (_IO_getwline_info): Move return to correct + location. + + * nscd/connections.c: Remove last remnants of -S option support. + * nscd/nscd.c: Likewise. + * nscd/nscd.h: Likewise. + +2005-12-30 Andreas Jaeger + + [BZ #1067] + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Fix struct msghdr + for 64-bit mips kernel. + +2005-12-08 Steven Munroe + Tom Gall + + * elf/rtld.c (dl_main): Initialize l_local_scope for sysinfo_map. + * sysdeps/powerpc/elf/libc-start.c: Move this... + * sysdeps/unix/sysv/linux/powerpc/libc-start.c: ...to here. + * sysdeps/powerpc/powerpc32/dl-start.S: Add _dl_main_dispatch label. + * sysdeps/powerpc/powerpc32/hp-timing.h: New file. + * sysdeps/unix/sysv/linux/powerpc/Versions: New file. + * sysdeps/unix/sysv/linux/clock_getres.c: If HAVE_CLOCK_GETRES_VSYSCALL + is not defined, redefine INTERNAL_VSYSCALL and INLINE_VSYSCALL to + INTERNAL_SYSCALL and INLINE_SYSCALL respectively. Otherwise include + . Use INLINE_VSYSCALL and INTERNAL_SYSCALL instead + of the normal versions throughout the code. + * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise if + HAVE_CLOCK_GETTIME_VSYSCALL is defined. + * sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h: New file. + * sysdeps/unix/sysv/linux/powerpc/dl-vdso.c: New file. + * sysdeps/unix/sysv/linux/powerpc/dl-vdso.h: New file. + * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Use vDSO. + * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c: New file. + * sysdeps/unix/sysv/linux/powerpc/Makefile: Add dl-vdso to routines. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define + INLINE_VSYSCALL, INTERNAL_VSYSCALL, INTERNAL_SYSCALL_NCS, + INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, HAVE_CLOCK_GETRES_VSYSCALL, + and HAVE_CLOCK_GETTIME_VSYSCALL. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. + +2005-12-29 Ulrich Drepper + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h [ASSEMBLER]: + Define PTR_DEMANGLE2. + * sysdeps/powerpc/powerpc32/setjmp-common.S [PTR_MANGLE]: Also + mangle r1. + * sysdeps/powerpc/powerpc32/__longjmp-common.S [PTR_DEMANGLE]: Also + demangle r1. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S [PTR_MANGLE]: Mangle + r0 and r1. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S [PTR_DEMANGLE]: + Demangle r0 and r1. + + * sysdeps/powerpc/powerpc64/setjmp-common.S [PTR_MANGLE]: Also + mangle r1. + * sysdeps/powerpc/powerpc64/__longjmp-common.S [PTR_DEMANGLE]: Also + demangle r1. + +2005-12-26 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: + Move common function to... + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: + Move common function to... + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: + Move common function to... + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: + New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym + (_FRAME_BACKCHAIN, _FRAME_LR_SAVE, _FRAME_PARM_SAVE1, + _FRAME_PARM_SAVE2, _FRAME_PARM_SAVE3, _FRAME_PARM_SAVE4): + Remove unrelated stack frame defines. + +2005-12-29 Ulrich Drepper + + * stdio-common/tstdiomisc.c [FLT_EVAL_METHOD!=2] (dbl_max): + Defining as macro as before the last change. + + * sysdeps/unix/sysv/linux/sigaction.c: If WRAPPER_INCLUDE is defined, + include the named file. + * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. + +2005-12-29 Roland McGrath + + * sysdeps/mach/hurd/errno.c: New file. + + * sysdeps/mach/hurd/ioctl.c (__ioctl): Use a union to avoid a cast. + + * sysdeps/posix/libc_fatal.c (__libc_message): Add a const, a cast. + + * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Fix cast. + * hurd/report-wait.c (_S_msg_report_wait): Likewise. + + * include/sys/xattr.h: New file. + +2005-12-28 Roland McGrath + + * hurd/sigunwind.c: Include . + * sysdeps/mach/hurd/jmp-unwind.c: Likewise. + +2005-12-28 Ulrich Drepper + + * nscd/selinux.c (log_callback): Use audit_log_user_avc_message. + Don't do anything if audit_fd is invalid. + (audit_init): Don't complain if kernel support is missing. + Patch by Steve Grubb . + + * sysdeps/i386/__longjmp.S [PTR_DEMANGLE]: Also demangle stack + pointer. Add CFI. + * sysdeps/i386/bsd-_setjmp.S [PTR_MANGLE]: Also mangle stack pointer. + * sysdeps/i386/bsd-setjmp.S: Likewise. + * sysdeps/i386/setjmp.S: Likewise. + + * sysdeps/x86_64/__longjmp.S: No need to make sure return value is + != 0, the caller did that. + +2005-12-27 Roland McGrath + + * sysdeps/x86_64/__longjmp.S: Don't confuse unwinder by loading + mangled values in %rbp and %rsp registers and by wrong cfi. + + * config.make.in (c++-sysincludes): New substituted variable. + * configure.in (CXX_SYSINCLUDES): New substituted variable. + * configure: Regenerated. + * Makeconfig (CXXFLAGS): Prepend $(c++-sysincludes) here. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h + (PTR_MANGLE): Fix cast. + + * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument + DEMANGLE, and pass SP value through it. + * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise. + * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise. + * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline + demangler function to _JMPBUF_UNWINDS. + * sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function. + (_longjmp_unwind): Pass it to _JMPBUF_UNWINDS. + + * posix/tst-execle1.c (do_test): Add a const. + * posix/tst-execle2.c (do_test): Likewise. + + * posix/transbug.c (run_test): Add some casts. + * posix/bug-regex22.c (main): Likewise. + * posix/bug-regex5.c (main): Likewise. + * wcsmbs/tst-mbsrtowcs.c (main): Likewise. + * string/test-strspn.c (do_test, do_random_tests): Likewise. + * string/test-strrchr.c (do_test, do_random_tests): Likewise. + * string/test-strlen.c (do_random_tests): Likewise. + * string/test-strpbrk.c (do_test, do_random_tests): Likewise. + * string/test-strcmp.c (do_random_tests): Likewise. + * string/test-strchr.c (do_test, do_random_tests): Likewise. + * string/test-strcat.c (do_test, do_random_tests): Likewise. + * string/test-strncpy.c (do_random_tests): Likewise. + * string/test-strcpy.c (do_test, do_random_tests): Likewise. + * string/test-memccpy.c (do_test): Likewise. + * string/test-memmove.c (do_test, do_random_tests): Likewise. + * string/test-memcpy.c (do_test, do_random_tests): Likewise. + * string/test-memcmp.c (do_test, do_random_tests): Likewise. + * string/test-memchr.c (do_test, do_random_tests): Likewise. + * dlfcn/bug-atexit1.c (do_test): Fix up prototype in cast. + * stdio-common/tst-fgets.c (do_test): Add a cast. + * iconvdata/bug-iconv4.c (xiconv): Add a cast. + + * locale/programs/simple-hash.c (insert_entry_2): Remove useless casts. + + * resolv/herror.c (herror): Remove unused extern decl. + + * libio/obprintf.c: Include "strfile.h". + + * elf/order2mod2.c (init): Cast ignored value to void. + +2005-12-27 Ulrich Drepper + + * elf/tst-tls13.c (do_test): Avoid using the library path when + looking for tst-tlsmod13a.so. + + * stdio-common/tstdiomisc.c: If FLT_EVAL_METHOD is 2, use long + double math to generate NaN results. + + * sysdeps/unix/sysv/linux/sparc/bits/errno.h: Define EOWNERDEAD + and ENOTRECOVERABLE if not already defined. + * sysdeps/unix/sysv/linux/alpha/bits/errno.h: Likewise. + +2005-12-27 Jakub Jelinek + + * sysdeps/unix/sysv/linux/alpha/Versions: Add new errlist-compat + entry for up to 138 errnos. + +2005-12-27 Jakub Jelinek + + * iconv/gconv_trans.c (__gconv_transliterate): Demangle step __fct + before calling it. + +2005-12-27 David S. Miller + + * sysdeps/unix/sysv/linux/sparc/Versions: Add new errlist-compat + entry for up to 134 errnos. + +2005-12-26 Ulrich Drepper + + * Versions.def: Add GLIBC_2.4 for libpthread. + +2005-12-25 Ulrich Drepper + + * stdlib/Makefile ($(objpfx)isomac.out): Move -I.. to the end so + that $(..)/bits is not found early. + +2005-12-24 Ulrich Drepper + + * manual/errno.texi: Add new Linux errno codes. + * sysdeps/unix/sysv/linux/Versions: Add new errlist-compat entry + for up to 132 errnos. + * sysdeps/unix/sysv/linux/bits/errno.h: Define EOWNERDEAD and + ENOTRECOVERABLE if not already defined. + +2005-12-23 Ulrich Drepper + + [BZ #1566] + * sysdeps/i386/i586/memusage.h: New file. + * sysdeps/i386/memusage.h: Don't define GETTIME. + +2005-12-22 Ulrich Drepper + + [BZ #1499] + * misc/syslog.c (SyslogAddr): Use sockaddr_un instead of sockaddr. + (openlog_internal): Adjust for this change. + + * Makeconfig: Define CXXFLAGS. Split out warnings from +gccwarn which + are not understood by the C++ compiler. + * Makerules: Add rules to build C++ code for test cases. + * include/stdlib.h: Protect for inclusion in C++ code. + * include/time.h: Likewise. + +2005-12-22 Roland McGrath + + * Makerules [gen-as-const-headers] (tests): Add one test per .sym + file, not just one. + ($(objpfx)test-as-const.c): Target replaced with ... + ($(objpfx)test-as-const-%.c): ... this pattern rule. + (generated): Add those files. + +2005-12-22 Ulrich Drepper + + * test-skeleton.c (timeout_handler): Rewrite ts initialization for + C++ compatibility. + + * sysdeps/x86_64/__longjmp.S: Also protect SP and BP. + * sysdeps/x86_64/setjmp.S: Likewise. + +2005-12-21 Roland McGrath + + * sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. + * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. + * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: + (gen-as-const-headers): Add it. + * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. + * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. + * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. + * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. + * stdlib/tst-ucontext-off.c: File removed. + * stdlib/Makefile (tests): Remove it. + + * scripts/gen-as-const.awk: Support generating a test program. + * Makerules [gen-as-const-headers] (tests): Add test-as-const. + [gen-as-const-headers] ($(objpfx)test-as-const.c): New target. + + * sysdeps/generic/bits: Subdirectory and all files moved to ... + * bits: ... here, new subdirectory. + * Makeconfig (+includes): Reordered includes to put build and sysdeps + dirs first after $(..)include, $(sysincludes) last. + + [BZ #2066] + * intl/l10nflist.c (_nl_make_l10nflist): Free ABS_FILENAME when later + malloc fails. + +2005-12-21 Jakub Jelinek + + * sysdeps/powerpc/fpu/libm-test-ulps: Update for GCC 4.1 prerelease. + +2005-12-21 Roland McGrath + + * sysdeps/mach/hurd/ifreq.c: Add missing #includes. + + * elf/cache.c: Use <> rather than "" #includes. + * elf/chroot_canon.c: Likewise. + * elf/dl-lookup.c: Likewise. + * elf/ldconfig.c: Likewise. + * elf/readlib.c: Likewise. + * elf/rtld.c: Likewise. + * gmon/mcount.c: Likewise. + * hurd/hurdfault.c: Likewise. + * hurd/hurdsig.c: Likewise. + * hurd/report-wait.c: Likewise. + * hurd/sigunwind.c: Likewise. + * mach/setup-thread.c: Likewise. + * rt/aio_read64.c: Likewise. + * rt/aio_sigqueue.c: Likewise. + * rt/aio_write64.c: Likewise. + * soft-fp/soft-fp.h: Likewise. + * stdio-common/tmpfile64.c: Likewise. + * sysdeps/mach/hurd/fork.c: Likewise. + * sysdeps/mach/hurd/hppa/trampoline.c: Likewise. + * sysdeps/mach/hurd/i386/trampoline.c: Likewise. + * sysdeps/mach/hurd/mips/trampoline.c: Likewise. + * sysdeps/mach/hurd/powerpc/trampoline.c: Likewise. + * sysdeps/posix/sprofil.c: Likewise. + * sysdeps/pthread/aio_cancel.c: Likewise. + * sysdeps/pthread/aio_fsync.c: Likewise. + * sysdeps/pthread/aio_read64.c: Likewise. + * sysdeps/pthread/aio_read.c: Likewise. + * sysdeps/pthread/aio_suspend.c: Likewise. + * sysdeps/pthread/aio_write64.c: Likewise. + * sysdeps/pthread/aio_write.c: Likewise. + * sysdeps/pthread/lio_listio64.c: Likewise. + * sysdeps/pthread/lio_listio.c: Likewise. + * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. + * sysdeps/unix/sysv/tcflow.c: Likewise. + + * sysdeps/generic/unwind-dw2.c (extract_cie_info): Add a cast. + + * elf/dl-error.c (_dl_signal_error): Use .__jmpbuf in __longjmp call. + + * csu/dso_handle.c (__dso_handle): Add const to pointer type too. + +2005-12-21 Ulrich Drepper + + * iconv/gconv_conf.c: Initialize empty_path_elem. + + * sysdeps/ieee754/dbl-64/halfulp.c: Mark tab54 as static and const. + * sysdeps/i386/fpu/e_expl.c: Mark c0 and c1 as const. + * sysdeps/ieee754/flt-32/s_expm1f.c: Make sure huge and tiny end + up in .rodata. + * sysdeps/ieee754/flt-32/e_exp2f.c: Make sure TWO127 and TWOM100 + end up in .rodata. + * sysdeps/ieee754/flt-32/e_expf.c: Likewise. + * sysdeps/ieee754/dbl-64/e_exp2.c: Make sure TWO1023 and TWOM1000 + end up in .rodata. + +2005-12-21 Thorsten Kukuk + + * elf/readlib.c: Fix include of readelflib.c. + +2005-12-21 Ulrich Drepper + + [BZ #1962] + * io/fts.c (fts_open): Change type of len to size_t. + (fts_build): Remove cast in call to fts_alloc. + (fts_alloc): Change third parameter's type to size_t. + + [BZ #1960] + * io/fts.c (fts_open): Avoid function call in MAX macro use. + +2005-12-20 Ulrich Drepper + + * locale/xlocale.c (_nl_C_locobj): Mark as const. + * include/locale.h: Define _nl_C_locobj_ptr. + * iconv/gconv_charset.h: Use _nl_C_locobj_ptr instead of using pointer + to _nl_C_locobj because we also need a cast. + * iconv/gconv_conf.c: Likewise. + * iconv/gconv_int.h: Likewise. + * iconv/gconv_open.c: Likewise. + * locale/duplocale.c: Likewise. + * locale/freelocale.c: Likewise. + * locale/newlocale.c: Likewise. + * misc/syslog.c: Likewise. + * stdlib/strtod_l.c: Likewise. + * sysdeps/unix/sysv/linux/getloadavg.c: Likewise. + + * csu/dso_handle.c (__dso_handle): Mark as const. + + * intl/plural-exp.c (GERMANIC_PLURAL): Mark as const. + * intl/plural-exp.h: Adjust declaration of + __gettext_germanic_plural. + + * resolv/herror.c (h_errlist): Mark as const. + (h_nerr): Likewise. + +2005-12-15 Thomas Schwinge + + [BZ #2061] + * sysdeps/mach/hurd/xmknod.c (__xmknod): Handle S_IFREG. + +2005-12-20 Roland McGrath + + * sysdeps/unix/sysv/linux/ifreq.h: File removed. + * sysdeps/unix/sysv/linux/ifreq.c: #include "kernel-features.h" here. + + * sysdeps/mach/hurd/ifreq.h: File removed. + (__ifreq): Function moved to ... + * sysdeps/mach/hurd/ifreq.c: ... here, new file. + +2005-12-20 Ulrich Drepper + + * sunrpc/clnt_unix.c (unix_ops): Mark as const. + * sunrpc/auth_des.c (authdes_ops): Likewise. + * sunrpc/svc_raw.c (server_ops): Likewise. + * sunrpc/clnt_udp.c (udp_ops): Likewise. + * sunrpc/clnt_tcp.c (tcp_ops): Likewise. + * sunrpc/clnt_raw.c (client_ops): Likewise. + * sunrpc/auth_unix.c (auth_unix_ops): Likewise. + * sunrpc/auth_none.c (ops): Likewise. + + * nss/nsswitch.c (databases): Mark as const. Change name field + into array. + * nss/databases.def: Add warning. + + * resolv/res_hconf.c (arg_service_list): Reduce size of svcs and + mark const. + (cmd): Mark as const. + (parse_line): Mark c as pointer to const. + + * misc/getusershell.c (initshells): Remove unnecessary tests. + (endusershell): Likewise. + (okshells): Mark as const. + + * sysdeps/posix/gai_strerror.c: Complete rewrite. Avoid relocations. + * sysdeps/posix/gai_strerror-strs.h: New file. + * sysdeps/posix/Dist: New file. + + * sysdeps/posix/getaddrinfo.c (gaih): Mark as const. + * locale/loadlocale.c (_nl_value_types): Likewise. + * iconv/gconv_conf.c (builtin_aliases): Likewise. + * iconv/gconv_open.c (internal_trans_names): Likewise. + +2005-12-19 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/sysdep.h: Include tls.h. + (PTR_MANGLE, PTR_DEMANGLE): Define. + (SYSCALL_ERROR_HANDLER): Fix typo. + * sysdeps/sh/sh4/__longjmp.S: Use PTR_DEMANGLE if defined. + * sysdeps/sh/sh3/__longjmp.S: Likewise. + * sysdeps/sh/sh4/setjmp.S: Use PTR_MANGLE if defined. + * sysdeps/sh/sh3/setjmp.S: Likewise. + +2005-12-20 Jakub Jelinek + + * sysdeps/ia64/fpu/libm-test-ulps: Update for GCC 4.1 prerelease. + + * sysdeps/unix/sysv/linux/time.c: If __NR_time is not defined, + use sysdeps/unix/time.c implementation. + +2005-12-19 Ulrich Drepper + + [BZ #1955] + * timezone/zic.c (tofile;): Fix typo in symlink creation. + Patch by Phil Estes . + + [BZ #1952] + * sysdeps/unix/sysv/linux/time.c: New file. + * sysdeps/unix/sysv/linux/i386/syscalls.list: Remove time entry. + +2005-12-15 Thomas Schwinge + + * io/xmknodat.c: Include . + * misc/futimesat.c: Remove weak_alias and correct stub_warning. + * stdio-common/renameat.c (renameat): Fix typo. + +2005-12-16 Thorsten Kukuk + + [BZ #1978] + * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): + Map more filesystem types to a string. + * sysdeps/unix/sysv/linux/linux_fsinfo.h: Add SYSFS_MAGIC. + +2005-12-19 Jakub Jelinek + + * locale/Makefile (programs/%-kw.h): Run $(GPERF) inside of the + programs subdirectory. + + * sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use + PTR_DEMANGLE for PC if defined. + * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): + Likewise. + * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Likewise. + * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Xor %r14 with + THREAD_GET_POINTER_GUARD () if PTR_DEMANGLE is defined. + * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S (__sigsetjmp): Use + PTR_MANGLE for PC if defined. + * sysdeps/powerpc/powerpc64/setjmp-common.S (__sigsetjmp): Likewise. + * sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Likewise. + Avoid call to __sigjmp_save if IS_IN_rtld. + * sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/unix/sysv/linux/ia64/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): + Define. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Include tls.h. + (PTR_MANGLE, PTR_DEMANGLE): Define. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Include tls.h + (PTR_MANGLE, PTR_DEMANGLE): Define. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include tls.h. + (PTR_MANGLE, PTR_DEMANGLE): Define. + (SYSCALL_ERROR_HANDLER): Add missing semicolons. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Include tls.h. + (PTR_MANGLE, PTR_DEMANGLE): Define. + * sysdeps/unix/sysv/linux/s390/s390-64/socket.S (__socket): Add + SYSCALL_ERROR_HANDLER. + +2005-12-19 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Handle NO_WEAK_ALIAS. + * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise. + Patch by Clint Adams. + +2005-12-16 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/sys/user.h: Copy struct user and + dependent definitions from the kernel header to sys/user.h and + remove the #include of asm/user.h. + +2005-12-19 Ulrich Drepper + + * sysdeps/gnu/Makefile: Make sure the correct errlist.c file is + used when generating errlist-compat.c. + +2005-12-18 Ulrich Drepper + + * iconv/gconv.c: Demangle pointers before use if necessary. + * iconv/gconv_cache.c: Likewise. + * iconv/skeleton.c: Likewise. + * libio/iofwide.c: Likewise. + * wcsmbs/btowc.c: Likewise. + * wcsmbs/mbrtowc.c: Likewise. + * wcsmbs/mbsnrtowcs.c: Likewise. + * wcsmbs/mbsrtowcs_l.c: Likewise. + * wcsmbs/wcrtomb.c: Likewise. + * wcsmbs/wcsnrtombs.c: Likewise. + * wcsmbs/wcsrtombs.c: Likewise. + * wcsmbs/wctob.c: Likewise. + * iconv_gconv_db.c: Likewise. After init functions returns mangle + btowc pointer if necessary. + * iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym. + + * iconv/gconv_builtin.c (builtin_map): Change type of size + information fields to int8_t. + + * libio/iofwide.c (__libio_codecvt): Mark as const. + (__libio_translit): Likewise. + * libio/libioP.h (__libio_codecvt): Adjust declaraction. + + * wcsmbs/wcsmbsload.c (to_wc): Mark as const. + (to_mb): Likewise. + +2005-12-18 Richard Henderson + + * sysdeps/alpha/libc-tls.c: Fix directory on include of base file. + +2005-12-18 Ulrich Drepper + + * iconv/gconv_builtin.c: Mark map with attribute_relro. + + * sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Define C + version for inside ld.so. + + * elf/rtld.c (dl_main): Don't use hp timing code unless it's available. + + * sysdeps/powerpc/powerpc32/setjmp-common.S [IS_IN_rtld]: Avoid + call to __sigjmp_save. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. + + * stdlib/cxa_atexit.c: Use PTR_MANGLE on function pointer. Fill in + flavor field last and protect with memory barrier. + * stdlib/on_exit.c: Likewise. + * stdlib/cxa_finalize.c: Use PTR_DEMANGLE on function pointer before + using it. + * stdlib/exit.c: Likewise. + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and + PTR_DEMANGLE for C code in libc. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + +2005-12-17 Ulrich Drepper + + * elf/Versions [GLIBC_PRIVATE]: Export __pointer_chk_guard if defined. + * elf/rtld.c: Define __pointer_chk_guard_local and if necessary + __pointer_chk_guard. + (_rtld_global_ro): Initialize _dl_pointer_guard. + (dl_main): Initialize __pointer_chk_guard_local and either + __pointer_chk_guard or TLS value if necessary. + (process_envvars): Recognize and handle LD_POINTER_GUARD. + * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_pointer_guard. + * sysdeps/i386/__longjmp.S: Use PTR_DEMANGLE for PC if defined. + * sysdeps/x86_64/__longjmp.S: Likewise. + * sysdeps/i386/bsd-_setjmp.S: Use PTR_MANGLE for PC if defined. + * sysdeps/i386/bsd-_setjmp.S: Likewise. + * sysdeps/i386/setjmp.S: Likewise. + [IS_IN_rtld]: Avoid call to __sigjmp_save. + * sysdeps/i386/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and + PTR_DEMANGLE. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + + * sysdeps/i386/elf/setjmp.S: Removed. + * sysdeps/i386/elf/bsd-setjmp.S: Removed. + + * elf/dl-error.c (_dl_catch_error): Use __sigsetgjmp instead of + setjmp. + * elf/dl-error.c (_dl_signal_error): Use __longjmp instead of longjmp. + * elf/dl-minimal.c (longjmp): Remove definition. + + * sysdeps/x86_64/bsd-setjmp.S [PIC] (setjmp): Add missing jmp. + +2005-12-14 Thorsten Kukuk + + * nscd/Makefile: Don't build nscd_nischeck. + * nscd/nscd_nischeck.c: Removed. + +2005-12-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/renameat.c: Move errno setting code in + separate function __atfct_seterrno_2. + * include/fcntl.h: Declare __atfct_seterrno_2. + * posix/unistd.h: Declare linkat, symlinkat, readlinkat. + * io/Makefile (routines): Add linkat, symlinkat, readlinkat. + * io/Versions [GLIBC_2.4]: Export linkat, symlinkat, readlinkat. + * io/linkat.c: New file. + * io/readlinkat.c: New file. + * io/symlinkat.c: New file. + * sysdeps/unix/sysv/linux/linkat.c: New file. + * sysdeps/unix/sysv/linux/readlinkat.c: New file. + * sysdeps/unix/sysv/linux/symlinkat.c: New file. + +2005-12-15 Roland McGrath + + [BZ #1997] + * manual/stdio.texi (String Streams): For open_memstream, elaborate a + little on malloc reference. + + * sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/. + * sysdeps/alpha/fpu/s_cacoshf.c: Likewise. + * sysdeps/alpha/fpu/s_casinf.c: Likewise. + * sysdeps/alpha/fpu/s_casinhf.c: Likewise. + * sysdeps/alpha/fpu/s_catanf.c: Likewise. + * sysdeps/alpha/fpu/s_catanhf.c: Likewise. + * sysdeps/alpha/fpu/s_ccosf.c: Likewise. + * sysdeps/alpha/fpu/s_ccoshf.c: Likewise. + * sysdeps/alpha/fpu/s_cexpf.c: Likewise. + * sysdeps/alpha/fpu/s_clog10f.c: Likewise. + * sysdeps/alpha/fpu/s_clogf.c: Likewise. + * sysdeps/alpha/fpu/s_cpowf.c: Likewise. + * sysdeps/alpha/fpu/s_cprojf.c: Likewise. + * sysdeps/alpha/fpu/s_csinf.c: Likewise. + * sysdeps/alpha/fpu/s_csinhf.c: Likewise. + * sysdeps/alpha/fpu/s_csqrtf.c: Likewise. + * sysdeps/alpha/fpu/s_ctanf.c: Likewise. + * sysdeps/alpha/fpu/s_ctanhf.c: Likewise. + * sysdeps/alpha/libc-tls.c: Likewise. + * sysdeps/gnu/glob64.c: Likewise. + * sysdeps/gnu/updwtmp.c: Likewise. + * sysdeps/gnu/utmp_file.c: Likewise. + * sysdeps/i386/bzero.c: Likewise. + * sysdeps/i386/ffs.c: Likewise. + * sysdeps/i386/i686/ffs.c: Likewise. + * sysdeps/i386/memset.c: Likewise. + * sysdeps/ia64/fpu/printf_fphex.c: Likewise. + * sysdeps/ia64/libc-tls.c: Likewise. + * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. + * sysdeps/m68k/ffs.c: Likewise. + * sysdeps/mach/hurd/getdents.c: Likewise. + * sysdeps/mach/hurd/init-posix.c: Likewise. + * sysdeps/mach/msync.c: Likewise. + * sysdeps/mips/libc-tls.c: Likewise. + * sysdeps/posix/profil.c: Likewise. + * sysdeps/posix/shm_open.c: Likewise. + * sysdeps/posix/shm_unlink.c: Likewise. + * sysdeps/posix/sprofil.c: Likewise. + * sysdeps/powerpc/ffs.c: Likewise. + * sysdeps/rs6000/ffs.c: Likewise. + * sysdeps/s390/libc-tls.c: Likewise. + * sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise. + * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. + * sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise. + * sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mq_close.c: Likewise. + * sysdeps/unix/sysv/linux/mq_getattr.c: Likewise. + * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. + * sysdeps/unix/sysv/linux/mq_open.c: Likewise. + * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. + * sysdeps/unix/sysv/linux/mq_send.c: Likewise. + * sysdeps/unix/sysv/linux/mq_unlink.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise. + * sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise. + * sysdeps/unix/sysv/linux/sigqueue.c: Likewise. + * sysdeps/unix/sysv/linux/sigstack.c: Likewise. + * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. + * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise. + * sysdeps/unix/sysv/linux/truncate64.c: Likewise. + * sysdeps/unix/sysv/linux/vfork.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise. + + * sysdeps/unix/sysv/linux/Makefile (inhibit-siglist): Removed. + +2005-12-13 Ulrich Drepper + + * locale/programs/charmap-kw.h: Regenerated with new gperf. + * locale/programs/locfile-kw.h: Likewise. + + * Makeconfig (+includes): Look in current directory late. + * Makerules: Add rules from rules before the rules for the current + directory. + * sysdeps/generic/__longjmp.c: Moved to... + * setjmp/__longjmp.c: ...here. + * sysdeps/generic/_exit.c: Moved to... + * posix/_exit.c: ...here. + * sysdeps/generic/_strerror.c: Moved to... + * string/_strerror.c: ...here. + * sysdeps/generic/abort.c: Moved to... + * stdlib/abort.c: ...here. + * sysdeps/generic/accept.c: Moved to... + * socket/accept.c: ...here. + * sysdeps/generic/access.c: Moved to... + * io/access.c: ...here. + * sysdeps/generic/acct.c: Moved to... + * misc/acct.c: ...here. + * sysdeps/generic/add_n.c: Moved to... + * stdlib/add_n.c: ...here. + * sysdeps/generic/addmul_1.c: Moved to... + * stdlib/addmul_1.c: ...here. + * sysdeps/generic/adjtime.c: Moved to... + * time/adjtime.c: ...here. + * sysdeps/generic/aio_cancel.c: Moved to... + * rt/aio_cancel.c: ...here. + * sysdeps/generic/aio_fsync.c: Moved to... + * rt/aio_fsync.c: ...here. + * sysdeps/generic/aio_misc.c: Moved to... + * rt/aio_misc.c: ...here. + * sysdeps/generic/aio_notify.c: Moved to... + * rt/aio_notify.c: ...here. + * sysdeps/generic/aio_read.c: Moved to... + * rt/aio_read.c: ...here. + * sysdeps/generic/aio_read64.c: Moved to... + * rt/aio_read64.c: ...here. + * sysdeps/generic/aio_sigqueue.c: Moved to... + * rt/aio_sigqueue.c: ...here. + * sysdeps/generic/aio_suspend.c: Moved to... + * rt/aio_suspend.c: ...here. + * sysdeps/generic/aio_write.c: Moved to... + * rt/aio_write.c: ...here. + * sysdeps/generic/aio_write64.c: Moved to... + * rt/aio_write64.c: ...here. + * sysdeps/generic/alarm.c: Moved to... + * posix/alarm.c: ...here. + * sysdeps/generic/allocrtsig.c: Moved to... + * signal/allocrtsig.c: ...here. + * sysdeps/generic/alphasort64.c: Moved to... + * dirent/alphasort64.c: ...here. + * sysdeps/generic/backtrace.c: Moved to... + * debug/backtrace.c: ...here. + * sysdeps/generic/backtracesyms.c: Moved to... + * debug/backtracesyms.c: ...here. + * sysdeps/generic/backtracesymsfd.c: Moved to... + * debug/backtracesymsfd.c: ...here. + * sysdeps/generic/bb_init_func.c: Moved to... + * gmon/bb_init_func.c: ...here. + * sysdeps/generic/bcopy.c: Moved to... + * string/bcopy.c: ...here. + * sysdeps/generic/bind.c: Moved to... + * socket/bind.c: ...here. + * sysdeps/generic/brdinit.c: Moved to... + * bare/brdinit.c: ...here. + * sysdeps/generic/brk.c: Moved to... + * misc/brk.c: ...here. + * sysdeps/generic/bsd-_setjmp.c: Moved to... + * setjmp/bsd-_setjmp.c: ...here. + * sysdeps/generic/bsd-setjmp.c: Moved to... + * setjmp/bsd-setjmp.c: ...here. + * sysdeps/generic/bzero.c: Moved to... + * string/bzero.c: ...here. + * sysdeps/generic/cabsf.c: Moved to... + * math/cabsf.c: ...here. + * sysdeps/generic/cargf.c: Moved to... + * math/cargf.c: ...here. + * sysdeps/generic/chdir.c: Moved to... + * io/chdir.c: ...here. + * sysdeps/generic/check_fds.c: Moved to... + * csu/check_fds.c: ...here. + * sysdeps/generic/check_pf.c: Moved to... + * inet/check_pf.c: ...here. + * sysdeps/generic/chflags.c: Moved to... + * misc/chflags.c: ...here. + * sysdeps/generic/chmod.c: Moved to... + * io/chmod.c: ...here. + * sysdeps/generic/chown.c: Moved to... + * io/chown.c: ...here. + * sysdeps/generic/chroot.c: Moved to... + * misc/chroot.c: ...here. + * sysdeps/generic/cimagf.c: Moved to... + * math/cimagf.c: ...here. + * sysdeps/generic/clock.c: Moved to... + * time/clock.c: ...here. + * sysdeps/generic/clock_getcpuclockid.c: Moved to... + * rt/clock_getcpuclockid.c: ...here. + * sysdeps/generic/clock_getres.c: Moved to... + * rt/clock_getres.c: ...here. + * sysdeps/generic/clock_gettime.c: Moved to... + * rt/clock_gettime.c: ...here. + * sysdeps/generic/clock_nanosleep.c: Moved to... + * rt/clock_nanosleep.c: ...here. + * sysdeps/generic/clock_settime.c: Moved to... + * rt/clock_settime.c: ...here. + * sysdeps/generic/close.c: Moved to... + * io/close.c: ...here. + * sysdeps/generic/closedir.c: Moved to... + * dirent/closedir.c: ...here. + * sysdeps/generic/cmp.c: Moved to... + * stdlib/cmp.c: ...here. + * sysdeps/generic/conjf.c: Moved to... + * math/conjf.c: ...here. + * sysdeps/generic/connect.c: Moved to... + * socket/connect.c: ...here. + * sysdeps/generic/console.c: Moved to... + * bare/console.c: ...here. + * sysdeps/generic/crealf.c: Moved to... + * math/crealf.c: ...here. + * sysdeps/generic/creat.c: Moved to... + * io/creat.c: ...here. + * sysdeps/generic/creat64.c: Moved to... + * io/creat64.c: ...here. + * sysdeps/generic/ctermid.c: Moved to... + * stdio-common/ctermid.c: ...here. + * sysdeps/generic/cuserid.c: Moved to... + * stdio-common/cuserid.c: ...here. + * sysdeps/generic/dbl2mpn.c: Moved to... + * stdlib/dbl2mpn.c: ...here. + * sysdeps/generic/dirfd.c: Moved to... + * dirent/dirfd.c: ...here. + * sysdeps/generic/div.c: Moved to... + * stdlib/div.c: ...here. + * sysdeps/generic/divmod_1.c: Moved to... + * stdlib/divmod_1.c: ...here. + * sysdeps/generic/divrem.c: Moved to... + * stdlib/divrem.c: ...here. + * sysdeps/generic/dl-brk.c: Moved to... + * elf/dl-brk.c: ...here. + * sysdeps/generic/dl-cache.c: Moved to... + * elf/dl-cache.c: ...here. + * sysdeps/generic/dl-environ.c: Moved to... + * elf/dl-environ.c: ...here. + * sysdeps/generic/dl-execstack.c: Moved to... + * elf/dl-execstack.c: ...here. + * sysdeps/generic/dl-fptr.c: Moved to... + * elf/dl-fptr.c: ...here. + * sysdeps/generic/dl-origin.c: Moved to... + * elf/dl-origin.c: ...here. + * sysdeps/generic/dl-sbrk.c: Moved to... + * elf/dl-sbrk.c: ...here. + * sysdeps/generic/dl-symaddr.c: Moved to... + * elf/dl-symaddr.c: ...here. + * sysdeps/generic/dl-sysdep.c: Moved to... + * elf/dl-sysdep.c: ...here. + * sysdeps/generic/dl-tls.c: Moved to... + * elf/dl-tls.c: ...here. + * sysdeps/generic/dl-trampoline.c: Moved to... + * elf/dl-trampoline.c: ...here. + * sysdeps/generic/dup.c: Moved to... + * io/dup.c: ...here. + * sysdeps/generic/dup2.c: Moved to... + * io/dup2.c: ...here. + * sysdeps/generic/e_acoshl.c: Moved to... + * math/e_acoshl.c: ...here. + * sysdeps/generic/e_acosl.c: Moved to... + * math/e_acosl.c: ...here. + * sysdeps/generic/e_asinl.c: Moved to... + * math/e_asinl.c: ...here. + * sysdeps/generic/e_atan2l.c: Moved to... + * math/e_atan2l.c: ...here. + * sysdeps/generic/e_atanhl.c: Moved to... + * math/e_atanhl.c: ...here. + * sysdeps/generic/e_coshl.c: Moved to... + * math/e_coshl.c: ...here. + * sysdeps/generic/e_exp10.c: Moved to... + * math/e_exp10.c: ...here. + * sysdeps/generic/e_exp10f.c: Moved to... + * math/e_exp10f.c: ...here. + * sysdeps/generic/e_exp10l.c: Moved to... + * math/e_exp10l.c: ...here. + * sysdeps/generic/e_exp2l.c: Moved to... + * math/e_exp2l.c: ...here. + * sysdeps/generic/e_expl.c: Moved to... + * math/e_expl.c: ...here. + * sysdeps/generic/e_fmodl.c: Moved to... + * math/e_fmodl.c: ...here. + * sysdeps/generic/e_gammal_r.c: Moved to... + * math/e_gammal_r.c: ...here. + * sysdeps/generic/e_hypotl.c: Moved to... + * math/e_hypotl.c: ...here. + * sysdeps/generic/e_j0l.c: Moved to... + * math/e_j0l.c: ...here. + * sysdeps/generic/e_j1l.c: Moved to... + * math/e_j1l.c: ...here. + * sysdeps/generic/e_jnl.c: Moved to... + * math/e_jnl.c: ...here. + * sysdeps/generic/e_lgammal_r.c: Moved to... + * math/e_lgammal_r.c: ...here. + * sysdeps/generic/e_log10l.c: Moved to... + * math/e_log10l.c: ...here. + * sysdeps/generic/e_log2l.c: Moved to... + * math/e_log2l.c: ...here. + * sysdeps/generic/e_logl.c: Moved to... + * math/e_logl.c: ...here. + * sysdeps/generic/e_powl.c: Moved to... + * math/e_powl.c: ...here. + * sysdeps/generic/e_rem_pio2l.c: Moved to... + * math/e_rem_pio2l.c: ...here. + * sysdeps/generic/e_scalb.c: Moved to... + * math/e_scalb.c: ...here. + * sysdeps/generic/e_scalbf.c: Moved to... + * math/e_scalbf.c: ...here. + * sysdeps/generic/e_scalbl.c: Moved to... + * math/e_scalbl.c: ...here. + * sysdeps/generic/e_sinhl.c: Moved to... + * math/e_sinhl.c: ...here. + * sysdeps/generic/e_sqrtl.c: Moved to... + * math/e_sqrtl.c: ...here. + * sysdeps/generic/enbl-secure.c: Moved to... + * elf/enbl-secure.c: ...here. + * sysdeps/generic/endutxent.c: Moved to... + * login/endutxent.c: ...here. + * sysdeps/generic/environ.c: Moved to... + * posix/environ.c: ...here. + * sysdeps/generic/errlist.c: Moved to... + * stdio-common/errlist.c: ...here. + * sysdeps/generic/errno-loc.c: Moved to... + * csu/errno-loc.c: ...here. + * sysdeps/generic/errno-loc.c: Moved to... + * csu/errno-loc.c: ...here. + * sysdeps/generic/errno.c: Moved to... + * csu/errno.c: ...here. + * sysdeps/generic/euidaccess.c: Moved to... + * io/euidaccess.c: ...here. + * sysdeps/generic/exc2signal.c: Moved to... + * hurd/exc2signal.c: ...here. + * sysdeps/generic/execve.c: Moved to... + * posix/execve.c: ...here. + * sysdeps/generic/fattach.c: Moved to... + * streams/fattach.c: ...here. + * sysdeps/generic/fchdir.c: Moved to... + * io/fchdir.c: ...here. + * sysdeps/generic/fchflags.c: Moved to... + * misc/fchflags.c: ...here. + * sysdeps/generic/fchmod.c: Moved to... + * io/fchmod.c: ...here. + * sysdeps/generic/fchown.c: Moved to... + * io/fchown.c: ...here. + * sysdeps/generic/fchownat.c: Moved to... + * io/fchownat.c: ...here. + * sysdeps/generic/fclrexcpt.c: Moved to... + * math/fclrexcpt.c: ...here. + * sysdeps/generic/fcntl.c: Moved to... + * io/fcntl.c: ...here. + * sysdeps/generic/fdatasync.c: Moved to... + * misc/fdatasync.c: ...here. + * sysdeps/generic/fdetach.c: Moved to... + * streams/fdetach.c: ...here. + * sysdeps/generic/fdopendir.c: Moved to... + * dirent/fdopendir.c: ...here. + * sysdeps/generic/fedisblxcpt.c: Moved to... + * math/fedisblxcpt.c: ...here. + * sysdeps/generic/feenablxcpt.c: Moved to... + * math/feenablxcpt.c: ...here. + * sysdeps/generic/fegetenv.c: Moved to... + * math/fegetenv.c: ...here. + * sysdeps/generic/fegetexcept.c: Moved to... + * math/fegetexcept.c: ...here. + * sysdeps/generic/fegetround.c: Moved to... + * math/fegetround.c: ...here. + * sysdeps/generic/feholdexcpt.c: Moved to... + * math/feholdexcpt.c: ...here. + * sysdeps/generic/fesetenv.c: Moved to... + * math/fesetenv.c: ...here. + * sysdeps/generic/fesetround.c: Moved to... + * math/fesetround.c: ...here. + * sysdeps/generic/feupdateenv.c: Moved to... + * math/feupdateenv.c: ...here. + * sysdeps/generic/fexecve.c: Moved to... + * posix/fexecve.c: ...here. + * sysdeps/generic/ffs.c: Moved to... + * string/ffs.c: ...here. + * sysdeps/generic/ffsll.c: Moved to... + * string/ffsll.c: ...here. + * sysdeps/generic/fgetexcptflg.c: Moved to... + * math/fgetexcptflg.c: ...here. + * sysdeps/generic/fgetxattr.c: Moved to... + * misc/fgetxattr.c: ...here. + * sysdeps/generic/flistxattr.c: Moved to... + * misc/flistxattr.c: ...here. + * sysdeps/generic/flock.c: Moved to... + * io/flock.c: ...here. + * sysdeps/generic/flockfile.c: Moved to... + * stdio-common/flockfile.c: ...here. + * sysdeps/generic/fork.c: Moved to... + * posix/fork.c: ...here. + * sysdeps/generic/fpathconf.c: Moved to... + * posix/fpathconf.c: ...here. + * sysdeps/generic/fpu_control.c: Moved to... + * math/fpu_control.c: ...here. + * sysdeps/generic/fraiseexcpt.c: Moved to... + * math/fraiseexcpt.c: ...here. + * sysdeps/generic/fremovexattr.c: Moved to... + * misc/fremovexattr.c: ...here. + * sysdeps/generic/fsetexcptflg.c: Moved to... + * math/fsetexcptflg.c: ...here. + * sysdeps/generic/fsetxattr.c: Moved to... + * misc/fsetxattr.c: ...here. + * sysdeps/generic/fstatfs.c: Moved to... + * io/fstatfs.c: ...here. + * sysdeps/generic/fstatfs64.c: Moved to... + * io/fstatfs64.c: ...here. + * sysdeps/generic/fstatvfs.c: Moved to... + * io/fstatvfs.c: ...here. + * sysdeps/generic/fstatvfs64.c: Moved to... + * io/fstatvfs64.c: ...here. + * sysdeps/generic/fsync.c: Moved to... + * misc/fsync.c: ...here. + * sysdeps/generic/ftestexcept.c: Moved to... + * math/ftestexcept.c: ...here. + * sysdeps/generic/ftime.c: Moved to... + * time/ftime.c: ...here. + * sysdeps/generic/ftruncate.c: Moved to... + * misc/ftruncate.c: ...here. + * sysdeps/generic/ftruncate64.c: Moved to... + * misc/ftruncate64.c: ...here. + * sysdeps/generic/ftrylockfile.c: Moved to... + * stdio-common/ftrylockfile.c: ...here. + * sysdeps/generic/funlockfile.c: Moved to... + * stdio-common/funlockfile.c: ...here. + * sysdeps/generic/futimes.c: Moved to... + * misc/futimes.c: ...here. + * sysdeps/generic/futimesat.c: Moved to... + * misc/futimesat.c: ...here. + * sysdeps/generic/fxstat.c: Moved to... + * io/fxstat.c: ...here. + * sysdeps/generic/fxstat64.c: Moved to... + * io/fxstat64.c: ...here. + * sysdeps/generic/fxstatat.c: Moved to... + * io/fxstatat.c: ...here. + * sysdeps/generic/fxstatat64.c: Moved to... + * io/fxstatat64.c: ...here. + * sysdeps/generic/gai_sigqueue.c: Moved to... + * resolv/gai_sigqueue.c: ...here. + * sysdeps/generic/gai_strerror.c: Moved to... + * posix/gai_strerror.c: ...here. + * sysdeps/generic/get_clockfreq.c: Moved to... + * rt/get_clockfreq.c: ...here. + * sysdeps/generic/getaddrinfo.c: Moved to... + * posix/getaddrinfo.c: ...here. + * sysdeps/generic/getclktck.c: Moved to... + * misc/getclktck.c: ...here. + * sysdeps/generic/getcontext.c: Moved to... + * stdlib/getcontext.c: ...here. + * sysdeps/generic/getcwd.c: Moved to... + * io/getcwd.c: ...here. + * sysdeps/generic/getdents.c: Moved to... + * dirent/getdents.c: ...here. + * sysdeps/generic/getdents64.c: Moved to... + * dirent/getdents64.c: ...here. + * sysdeps/generic/getdomain.c: Moved to... + * misc/getdomain.c: ...here. + * sysdeps/generic/getdtsz.c: Moved to... + * misc/getdtsz.c: ...here. + * sysdeps/generic/getegid.c: Moved to... + * posix/getegid.c: ...here. + * sysdeps/generic/getenv.c: Moved to... + * stdlib/getenv.c: ...here. + * sysdeps/generic/geteuid.c: Moved to... + * posix/geteuid.c: ...here. + * sysdeps/generic/getgid.c: Moved to... + * posix/getgid.c: ...here. + * sysdeps/generic/getgroups.c: Moved to... + * posix/getgroups.c: ...here. + * sysdeps/generic/gethostid.c: Moved to... + * misc/gethostid.c: ...here. + * sysdeps/generic/gethostname.c: Moved to... + * misc/gethostname.c: ...here. + * sysdeps/generic/getipv4sourcefilter.c: Moved to... + * inet/getipv4sourcefilter.c: ...here. + * sysdeps/generic/getitimer.c: Moved to... + * time/getitimer.c: ...here. + * sysdeps/generic/getloadavg.c: Moved to... + * misc/getloadavg.c: ...here. + * sysdeps/generic/getlogin.c: Moved to... + * posix/getlogin.c: ...here. + * sysdeps/generic/getlogin_r.c: Moved to... + * posix/getlogin_r.c: ...here. + * sysdeps/generic/getmsg.c: Moved to... + * streams/getmsg.c: ...here. + * sysdeps/generic/getpagesize.c: Moved to... + * misc/getpagesize.c: ...here. + * sysdeps/generic/getpeername.c: Moved to... + * socket/getpeername.c: ...here. + * sysdeps/generic/getpgid.c: Moved to... + * posix/getpgid.c: ...here. + * sysdeps/generic/getpgrp.c: Moved to... + * posix/getpgrp.c: ...here. + * sysdeps/generic/getpid.c: Moved to... + * posix/getpid.c: ...here. + * sysdeps/generic/getpmsg.c: Moved to... + * streams/getpmsg.c: ...here. + * sysdeps/generic/getppid.c: Moved to... + * posix/getppid.c: ...here. + * sysdeps/generic/getpriority.c: Moved to... + * resource/getpriority.c: ...here. + * sysdeps/generic/getpt.c: Moved to... + * login/getpt.c: ...here. + * sysdeps/generic/getresgid.c: Moved to... + * posix/getresgid.c: ...here. + * sysdeps/generic/getresuid.c: Moved to... + * posix/getresuid.c: ...here. + * sysdeps/generic/getrlimit.c: Moved to... + * resource/getrlimit.c: ...here. + * sysdeps/generic/getrlimit64.c: Moved to... + * resource/getrlimit64.c: ...here. + * sysdeps/generic/getrusage.c: Moved to... + * resource/getrusage.c: ...here. + * sysdeps/generic/getsid.c: Moved to... + * posix/getsid.c: ...here. + * sysdeps/generic/getsockname.c: Moved to... + * socket/getsockname.c: ...here. + * sysdeps/generic/getsockopt.c: Moved to... + * socket/getsockopt.c: ...here. + * sysdeps/generic/getsourcefilter.c: Moved to... + * inet/getsourcefilter.c: ...here. + * sysdeps/generic/getsysstats.c: Moved to... + * misc/getsysstats.c: ...here. + * sysdeps/generic/gettimeofday.c: Moved to... + * time/gettimeofday.c: ...here. + * sysdeps/generic/getuid.c: Moved to... + * posix/getuid.c: ...here. + * sysdeps/generic/getutmp.c: Moved to... + * login/getutmp.c: ...here. + * sysdeps/generic/getutmpx.c: Moved to... + * login/getutmpx.c: ...here. + * sysdeps/generic/getutxent.c: Moved to... + * login/getutxent.c: ...here. + * sysdeps/generic/getutxid.c: Moved to... + * login/getutxid.c: ...here. + * sysdeps/generic/getutxline.c: Moved to... + * login/getutxline.c: ...here. + * sysdeps/generic/getxattr.c: Moved to... + * misc/getxattr.c: ...here. + * sysdeps/generic/glob.c: Moved to... + * posix/glob.c: ...here. + * sysdeps/generic/glob64.c: Moved to... + * posix/glob64.c: ...here. + * sysdeps/generic/grantpt.c: Moved to... + * login/grantpt.c: ...here. + * sysdeps/generic/group_member.c: Moved to... + * posix/group_member.c: ...here. + * sysdeps/generic/gtty.c: Moved to... + * misc/gtty.c: ...here. + * sysdeps/generic/herrno-loc.c: Moved to... + * inet/herrno-loc.c: ...here. + * sysdeps/generic/htonl.c: Moved to... + * inet/htonl.c: ...here. + * sysdeps/generic/htons.c: Moved to... + * inet/htons.c: ...here. + * sysdeps/generic/if_index.c: Moved to... + * inet/if_index.c: ...here. + * sysdeps/generic/ifaddrs.c: Moved to... + * inet/ifaddrs.c: ...here. + * sysdeps/generic/ifreq.c: Moved to... + * inet/ifreq.c: ...here. + * sysdeps/generic/init-first.c: Moved to... + * csu/init-first.c: ...here. + * sysdeps/generic/init-posix.c: Moved to... + * posix/init-posix.c: ...here. + * sysdeps/generic/inlines.c: Moved to... + * stdlib/inlines.c: ...here. + * sysdeps/generic/ioctl.c: Moved to... + * misc/ioctl.c: ...here. + * sysdeps/generic/isastream.c: Moved to... + * streams/isastream.c: ...here. + * sysdeps/generic/isatty.c: Moved to... + * io/isatty.c: ...here. + * sysdeps/generic/isfdtype.c: Moved to... + * socket/isfdtype.c: ...here. + * sysdeps/generic/jmp-unwind.c: Moved to... + * setjmp/jmp-unwind.c: ...here. + * sysdeps/generic/k_cosl.c: Moved to... + * math/k_cosl.c: ...here. + * sysdeps/generic/k_rem_pio2l.c: Moved to... + * math/k_rem_pio2l.c: ...here. + * sysdeps/generic/k_sincosl.c: Moved to... + * math/k_sincosl.c: ...here. + * sysdeps/generic/k_sinl.c: Moved to... + * math/k_sinl.c: ...here. + * sysdeps/generic/k_tanl.c: Moved to... + * math/k_tanl.c: ...here. + * sysdeps/generic/kill.c: Moved to... + * signal/kill.c: ...here. + * sysdeps/generic/killpg.c: Moved to... + * signal/killpg.c: ...here. + * sysdeps/generic/labs.c: Moved to... + * stdlib/labs.c: ...here. + * sysdeps/generic/lchmod.c: Moved to... + * io/lchmod.c: ...here. + * sysdeps/generic/lchown.c: Moved to... + * io/lchown.c: ...here. + * sysdeps/generic/ldbl2mpn.c: Moved to... + * stdlib/ldbl2mpn.c: ...here. + * sysdeps/generic/ldiv.c: Moved to... + * stdlib/ldiv.c: ...here. + * sysdeps/generic/lgetxattr.c: Moved to... + * misc/lgetxattr.c: ...here. + * sysdeps/generic/libc-start.c: Moved to... + * csu/libc-start.c: ...here. + * sysdeps/generic/libc-tls.c: Moved to... + * csu/libc-tls.c: ...here. + * sysdeps/generic/libc_fatal.c: Moved to... + * libio/libc_fatal.c: ...here. + * sysdeps/generic/link.c: Moved to... + * io/link.c: ...here. + * sysdeps/generic/lio_listio.c: Moved to... + * rt/lio_listio.c: ...here. + * sysdeps/generic/lio_listio64.c: Moved to... + * rt/lio_listio64.c: ...here. + * sysdeps/generic/listen.c: Moved to... + * socket/listen.c: ...here. + * sysdeps/generic/listxattr.c: Moved to... + * misc/listxattr.c: ...here. + * sysdeps/generic/llabs.c: Moved to... + * stdlib/llabs.c: ...here. + * sysdeps/generic/lldiv.c: Moved to... + * stdlib/lldiv.c: ...here. + * sysdeps/generic/llistxattr.c: Moved to... + * misc/llistxattr.c: ...here. + * sysdeps/generic/lockf.c: Moved to... + * io/lockf.c: ...here. + * sysdeps/generic/lockf64.c: Moved to... + * io/lockf64.c: ...here. + * sysdeps/generic/longjmp-ts.c: Moved to... + * hurd/longjmp-ts.c: ...here. + * sysdeps/generic/longjmp.c: Moved to... + * setjmp/longjmp.c: ...here. + * sysdeps/generic/lremovexattr.c: Moved to... + * misc/lremovexattr.c: ...here. + * sysdeps/generic/lseek.c: Moved to... + * misc/lseek.c: ...here. + * sysdeps/generic/lseek64.c: Moved to... + * io/lseek64.c: ...here. + * sysdeps/generic/lsetxattr.c: Moved to... + * misc/lsetxattr.c: ...here. + * sysdeps/generic/lshift.c: Moved to... + * stdlib/lshift.c: ...here. + * sysdeps/generic/lutimes.c: Moved to... + * misc/lutimes.c: ...here. + * sysdeps/generic/lxstat.c: Moved to... + * io/lxstat.c: ...here. + * sysdeps/generic/lxstat64.c: Moved to... + * io/lxstat64.c: ...here. + * sysdeps/generic/madvise.c: Moved to... + * misc/madvise.c: ...here. + * sysdeps/generic/makecontext.c: Moved to... + * stdlib/makecontext.c: ...here. + * sysdeps/generic/memccpy.c: Moved to... + * string/memccpy.c: ...here. + * sysdeps/generic/memchr.c: Moved to... + * string/memchr.c: ...here. + * sysdeps/generic/memcmp.c: Moved to... + * string/memcmp.c: ...here. + * sysdeps/generic/memcpy.c: Moved to... + * string/memcpy.c: ...here. + * sysdeps/generic/memcpy_chk.c: Moved to... + * debug/memcpy_chk.c: ...here. + * sysdeps/generic/memmem.c: Moved to... + * string/memmem.c: ...here. + * sysdeps/generic/memmove.c: Moved to... + * string/memmove.c: ...here. + * sysdeps/generic/memmove_chk.c: Moved to... + * debug/memmove_chk.c: ...here. + * sysdeps/generic/mempcpy.c: Moved to... + * string/mempcpy.c: ...here. + * sysdeps/generic/mempcpy_chk.c: Moved to... + * debug/mempcpy_chk.c: ...here. + * sysdeps/generic/memrchr.c: Moved to... + * string/memrchr.c: ...here. + * sysdeps/generic/memset.c: Moved to... + * string/memset.c: ...here. + * sysdeps/generic/memset_chk.c: Moved to... + * debug/memset_chk.c: ...here. + * sysdeps/generic/mig-reply.c: Moved to... + * mach/mig-reply.c: ...here. + * sysdeps/generic/mincore.c: Moved to... + * misc/mincore.c: ...here. + * sysdeps/generic/mkdir.c: Moved to... + * io/mkdir.c: ...here. + * sysdeps/generic/mkdirat.c: Moved to... + * io/mkdirat.c: ...here. + * sysdeps/generic/mkfifo.c: Moved to... + * io/mkfifo.c: ...here. + * sysdeps/generic/mkfifoat.c: Moved to... + * io/mkfifoat.c: ...here. + * sysdeps/generic/mknod.c: Moved to... + * io/mknod.c: ...here. + * sysdeps/generic/mknodat.c: Moved to... + * io/mknodat.c: ...here. + * sysdeps/generic/mlock.c: Moved to... + * misc/mlock.c: ...here. + * sysdeps/generic/mlockall.c: Moved to... + * misc/mlockall.c: ...here. + * sysdeps/generic/mmap.c: Moved to... + * misc/mmap.c: ...here. + * sysdeps/generic/mmap64.c: Moved to... + * misc/mmap64.c: ...here. + * sysdeps/generic/mod_1.c: Moved to... + * stdlib/mod_1.c: ...here. + * sysdeps/generic/morecore.c: Moved to... + * malloc/morecore.c: ...here. + * sysdeps/generic/mp_clz_tab.c: Moved to... + * stdlib/mp_clz_tab.c: ...here. + * sysdeps/generic/mpn2dbl.c: Moved to... + * stdlib/mpn2dbl.c: ...here. + * sysdeps/generic/mpn2flt.c: Moved to... + * stdlib/mpn2flt.c: ...here. + * sysdeps/generic/mpn2ldbl.c: Moved to... + * stdlib/mpn2ldbl.c: ...here. + * sysdeps/generic/mprotect.c: Moved to... + * misc/mprotect.c: ...here. + * sysdeps/generic/mq_close.c: Moved to... + * rt/mq_close.c: ...here. + * sysdeps/generic/mq_getattr.c: Moved to... + * rt/mq_getattr.c: ...here. + * sysdeps/generic/mq_notify.c: Moved to... + * rt/mq_notify.c: ...here. + * sysdeps/generic/mq_open.c: Moved to... + * rt/mq_open.c: ...here. + * sysdeps/generic/mq_receive.c: Moved to... + * rt/mq_receive.c: ...here. + * sysdeps/generic/mq_send.c: Moved to... + * rt/mq_send.c: ...here. + * sysdeps/generic/mq_setattr.c: Moved to... + * rt/mq_setattr.c: ...here. + * sysdeps/generic/mq_timedreceive.c: Moved to... + * rt/mq_timedreceive.c: ...here. + * sysdeps/generic/mq_timedsend.c: Moved to... + * rt/mq_timedsend.c: ...here. + * sysdeps/generic/mq_unlink.c: Moved to... + * rt/mq_unlink.c: ...here. + * sysdeps/generic/msgctl.c: Moved to... + * sysvipc/msgctl.c: ...here. + * sysdeps/generic/msgget.c: Moved to... + * sysvipc/msgget.c: ...here. + * sysdeps/generic/msgrcv.c: Moved to... + * sysvipc/msgrcv.c: ...here. + * sysdeps/generic/msgsnd.c: Moved to... + * sysvipc/msgsnd.c: ...here. + * sysdeps/generic/msync.c: Moved to... + * misc/msync.c: ...here. + * sysdeps/generic/mul.c: Moved to... + * stdlib/mul.c: ...here. + * sysdeps/generic/mul_1.c: Moved to... + * stdlib/mul_1.c: ...here. + * sysdeps/generic/mul_n.c: Moved to... + * stdlib/mul_n.c: ...here. + * sysdeps/generic/munlock.c: Moved to... + * misc/munlock.c: ...here. + * sysdeps/generic/munlockall.c: Moved to... + * misc/munlockall.c: ...here. + * sysdeps/generic/munmap.c: Moved to... + * misc/munmap.c: ...here. + * sysdeps/generic/nanosleep.c: Moved to... + * posix/nanosleep.c: ...here. + * sysdeps/generic/nice.c: Moved to... + * resource/nice.c: ...here. + * sysdeps/generic/nscd_setup_thread.c: Moved to... + * nscd/nscd_setup_thread.c: ...here. + * sysdeps/generic/open.c: Moved to... + * io/open.c: ...here. + * sysdeps/generic/open64.c: Moved to... + * io/open64.c: ...here. + * sysdeps/generic/openat.c: Moved to... + * io/openat.c: ...here. + * sysdeps/generic/openat64.c: Moved to... + * io/openat64.c: ...here. + * sysdeps/generic/opendir.c: Moved to... + * dirent/opendir.c: ...here. + * sysdeps/generic/opensock.c: Moved to... + * socket/opensock.c: ...here. + * sysdeps/generic/pathconf.c: Moved to... + * posix/pathconf.c: ...here. + * sysdeps/generic/pause.c: Moved to... + * posix/pause.c: ...here. + * sysdeps/generic/pipe.c: Moved to... + * io/pipe.c: ...here. + * sysdeps/generic/poll.c: Moved to... + * io/poll.c: ...here. + * sysdeps/generic/posix_fadvise.c: Moved to... + * io/posix_fadvise.c: ...here. + * sysdeps/generic/posix_fadvise64.c: Moved to... + * io/posix_fadvise64.c: ...here. + * sysdeps/generic/posix_fallocate.c: Moved to... + * io/posix_fallocate.c: ...here. + * sysdeps/generic/posix_fallocate64.c: Moved to... + * io/posix_fallocate64.c: ...here. + * sysdeps/generic/posix_madvise.c: Moved to... + * posix/posix_madvise.c: ...here. + * sysdeps/generic/pread.c: Moved to... + * posix/pread.c: ...here. + * sysdeps/generic/pread64.c: Moved to... + * posix/pread64.c: ...here. + * sysdeps/generic/printf_fphex.c: Moved to... + * stdio-common/printf_fphex.c: ...here. + * sysdeps/generic/prof-freq.c: Moved to... + * gmon/prof-freq.c: ...here. + * sysdeps/generic/profil.c: Moved to... + * gmon/profil.c: ...here. + * sysdeps/generic/pselect.c: Moved to... + * misc/pselect.c: ...here. + * sysdeps/generic/ptrace.c: Moved to... + * misc/ptrace.c: ...here. + * sysdeps/generic/ptsname.c: Moved to... + * login/ptsname.c: ...here. + * sysdeps/generic/putenv.c: Moved to... + * stdlib/putenv.c: ...here. + * sysdeps/generic/putmsg.c: Moved to... + * streams/putmsg.c: ...here. + * sysdeps/generic/putpmsg.c: Moved to... + * streams/putpmsg.c: ...here. + * sysdeps/generic/pututxline.c: Moved to... + * login/pututxline.c: ...here. + * sysdeps/generic/pwrite.c: Moved to... + * posix/pwrite.c: ...here. + * sysdeps/generic/pwrite64.c: Moved to... + * posix/pwrite64.c: ...here. + * sysdeps/generic/raise.c: Moved to... + * signal/raise.c: ...here. + * sysdeps/generic/rawmemchr.c: Moved to... + * string/rawmemchr.c: ...here. + * sysdeps/generic/read.c: Moved to... + * io/read.c: ...here. + * sysdeps/generic/readdir.c: Moved to... + * dirent/readdir.c: ...here. + * sysdeps/generic/readdir64.c: Moved to... + * dirent/readdir64.c: ...here. + * sysdeps/generic/readdir64_r.c: Moved to... + * dirent/readdir64_r.c: ...here. + * sysdeps/generic/readdir_r.c: Moved to... + * dirent/readdir_r.c: ...here. + * sysdeps/generic/readelflib.c: Moved to... + * elf/readelflib.c: ...here. + * sysdeps/generic/readlink.c: Moved to... + * io/readlink.c: ...here. + * sysdeps/generic/readonly-area.c: Moved to... + * debug/readonly-area.c: ...here. + * sysdeps/generic/readv.c: Moved to... + * misc/readv.c: ...here. + * sysdeps/generic/reboot.c: Moved to... + * misc/reboot.c: ...here. + * sysdeps/generic/recv.c: Moved to... + * socket/recv.c: ...here. + * sysdeps/generic/recvfrom.c: Moved to... + * socket/recvfrom.c: ...here. + * sysdeps/generic/recvmsg.c: Moved to... + * socket/recvmsg.c: ...here. + * sysdeps/generic/remap_file_pages.c: Moved to... + * misc/remap_file_pages.c: ...here. + * sysdeps/generic/remove.c: Moved to... + * stdio-common/remove.c: ...here. + * sysdeps/generic/removexattr.c: Moved to... + * misc/removexattr.c: ...here. + * sysdeps/generic/rename.c: Moved to... + * stdio-common/rename.c: ...here. + * sysdeps/generic/renameat.c: Moved to... + * stdio-common/renameat.c: ...here. + * sysdeps/generic/res-state.c: Moved to... + * resolv/res-state.c: ...here. + * sysdeps/generic/revoke.c: Moved to... + * misc/revoke.c: ...here. + * sysdeps/generic/rewinddir.c: Moved to... + * dirent/rewinddir.c: ...here. + * sysdeps/generic/rmdir.c: Moved to... + * io/rmdir.c: ...here. + * sysdeps/generic/rshift.c: Moved to... + * stdlib/rshift.c: ...here. + * sysdeps/generic/s_asinhl.c: Moved to... + * math/s_asinhl.c: ...here. + * sysdeps/generic/s_atanl.c: Moved to... + * math/s_atanl.c: ...here. + * sysdeps/generic/s_cacos.c: Moved to... + * math/s_cacos.c: ...here. + * sysdeps/generic/s_cacosf.c: Moved to... + * math/s_cacosf.c: ...here. + * sysdeps/generic/s_cacosh.c: Moved to... + * math/s_cacosh.c: ...here. + * sysdeps/generic/s_cacoshf.c: Moved to... + * math/s_cacoshf.c: ...here. + * sysdeps/generic/s_cacoshl.c: Moved to... + * math/s_cacoshl.c: ...here. + * sysdeps/generic/s_cacosl.c: Moved to... + * math/s_cacosl.c: ...here. + * sysdeps/generic/s_casin.c: Moved to... + * math/s_casin.c: ...here. + * sysdeps/generic/s_casinf.c: Moved to... + * math/s_casinf.c: ...here. + * sysdeps/generic/s_casinh.c: Moved to... + * math/s_casinh.c: ...here. + * sysdeps/generic/s_casinhf.c: Moved to... + * math/s_casinhf.c: ...here. + * sysdeps/generic/s_casinhl.c: Moved to... + * math/s_casinhl.c: ...here. + * sysdeps/generic/s_casinl.c: Moved to... + * math/s_casinl.c: ...here. + * sysdeps/generic/s_catan.c: Moved to... + * math/s_catan.c: ...here. + * sysdeps/generic/s_catanf.c: Moved to... + * math/s_catanf.c: ...here. + * sysdeps/generic/s_catanh.c: Moved to... + * math/s_catanh.c: ...here. + * sysdeps/generic/s_catanhf.c: Moved to... + * math/s_catanhf.c: ...here. + * sysdeps/generic/s_catanhl.c: Moved to... + * math/s_catanhl.c: ...here. + * sysdeps/generic/s_catanl.c: Moved to... + * math/s_catanl.c: ...here. + * sysdeps/generic/s_cbrtl.c: Moved to... + * math/s_cbrtl.c: ...here. + * sysdeps/generic/s_ccos.c: Moved to... + * math/s_ccos.c: ...here. + * sysdeps/generic/s_ccosf.c: Moved to... + * math/s_ccosf.c: ...here. + * sysdeps/generic/s_ccosh.c: Moved to... + * math/s_ccosh.c: ...here. + * sysdeps/generic/s_ccoshf.c: Moved to... + * math/s_ccoshf.c: ...here. + * sysdeps/generic/s_ccoshl.c: Moved to... + * math/s_ccoshl.c: ...here. + * sysdeps/generic/s_ccosl.c: Moved to... + * math/s_ccosl.c: ...here. + * sysdeps/generic/s_cexp.c: Moved to... + * math/s_cexp.c: ...here. + * sysdeps/generic/s_cexpf.c: Moved to... + * math/s_cexpf.c: ...here. + * sysdeps/generic/s_cexpl.c: Moved to... + * math/s_cexpl.c: ...here. + * sysdeps/generic/s_clog.c: Moved to... + * math/s_clog.c: ...here. + * sysdeps/generic/s_clog10.c: Moved to... + * math/s_clog10.c: ...here. + * sysdeps/generic/s_clog10f.c: Moved to... + * math/s_clog10f.c: ...here. + * sysdeps/generic/s_clog10l.c: Moved to... + * math/s_clog10l.c: ...here. + * sysdeps/generic/s_clogf.c: Moved to... + * math/s_clogf.c: ...here. + * sysdeps/generic/s_clogl.c: Moved to... + * math/s_clogl.c: ...here. + * sysdeps/generic/s_cpow.c: Moved to... + * math/s_cpow.c: ...here. + * sysdeps/generic/s_cpowf.c: Moved to... + * math/s_cpowf.c: ...here. + * sysdeps/generic/s_cpowl.c: Moved to... + * math/s_cpowl.c: ...here. + * sysdeps/generic/s_cproj.c: Moved to... + * math/s_cproj.c: ...here. + * sysdeps/generic/s_cprojf.c: Moved to... + * math/s_cprojf.c: ...here. + * sysdeps/generic/s_cprojl.c: Moved to... + * math/s_cprojl.c: ...here. + * sysdeps/generic/s_csin.c: Moved to... + * math/s_csin.c: ...here. + * sysdeps/generic/s_csinf.c: Moved to... + * math/s_csinf.c: ...here. + * sysdeps/generic/s_csinh.c: Moved to... + * math/s_csinh.c: ...here. + * sysdeps/generic/s_csinhf.c: Moved to... + * math/s_csinhf.c: ...here. + * sysdeps/generic/s_csinhl.c: Moved to... + * math/s_csinhl.c: ...here. + * sysdeps/generic/s_csinl.c: Moved to... + * math/s_csinl.c: ...here. + * sysdeps/generic/s_csqrt.c: Moved to... + * math/s_csqrt.c: ...here. + * sysdeps/generic/s_csqrtf.c: Moved to... + * math/s_csqrtf.c: ...here. + * sysdeps/generic/s_csqrtl.c: Moved to... + * math/s_csqrtl.c: ...here. + * sysdeps/generic/s_ctan.c: Moved to... + * math/s_ctan.c: ...here. + * sysdeps/generic/s_ctanf.c: Moved to... + * math/s_ctanf.c: ...here. + * sysdeps/generic/s_ctanh.c: Moved to... + * math/s_ctanh.c: ...here. + * sysdeps/generic/s_ctanhf.c: Moved to... + * math/s_ctanhf.c: ...here. + * sysdeps/generic/s_ctanhl.c: Moved to... + * math/s_ctanhl.c: ...here. + * sysdeps/generic/s_ctanl.c: Moved to... + * math/s_ctanl.c: ...here. + * sysdeps/generic/s_erfl.c: Moved to... + * math/s_erfl.c: ...here. + * sysdeps/generic/s_expm1l.c: Moved to... + * math/s_expm1l.c: ...here. + * sysdeps/generic/s_fdim.c: Moved to... + * math/s_fdim.c: ...here. + * sysdeps/generic/s_fdimf.c: Moved to... + * math/s_fdimf.c: ...here. + * sysdeps/generic/s_fdiml.c: Moved to... + * math/s_fdiml.c: ...here. + * sysdeps/generic/s_fma.c: Moved to... + * math/s_fma.c: ...here. + * sysdeps/generic/s_fmaf.c: Moved to... + * math/s_fmaf.c: ...here. + * sysdeps/generic/s_fmal.c: Moved to... + * math/s_fmal.c: ...here. + * sysdeps/generic/s_fmax.c: Moved to... + * math/s_fmax.c: ...here. + * sysdeps/generic/s_fmaxf.c: Moved to... + * math/s_fmaxf.c: ...here. + * sysdeps/generic/s_fmaxl.c: Moved to... + * math/s_fmaxl.c: ...here. + * sysdeps/generic/s_fmin.c: Moved to... + * math/s_fmin.c: ...here. + * sysdeps/generic/s_fminf.c: Moved to... + * math/s_fminf.c: ...here. + * sysdeps/generic/s_fminl.c: Moved to... + * math/s_fminl.c: ...here. + * sysdeps/generic/s_ldexp.c: Moved to... + * math/s_ldexp.c: ...here. + * sysdeps/generic/s_ldexpf.c: Moved to... + * math/s_ldexpf.c: ...here. + * sysdeps/generic/s_ldexpl.c: Moved to... + * math/s_ldexpl.c: ...here. + * sysdeps/generic/s_log1pl.c: Moved to... + * math/s_log1pl.c: ...here. + * sysdeps/generic/s_nan.c: Moved to... + * math/s_nan.c: ...here. + * sysdeps/generic/s_nanf.c: Moved to... + * math/s_nanf.c: ...here. + * sysdeps/generic/s_nanl.c: Moved to... + * math/s_nanl.c: ...here. + * sysdeps/generic/s_nextafter.c: Moved to... + * math/s_nextafter.c: ...here. + * sysdeps/generic/s_nexttowardf.c: Moved to... + * math/s_nexttowardf.c: ...here. + * sysdeps/generic/s_nexttowardl.c: Moved to... + * math/s_nexttowardl.c: ...here. + * sysdeps/generic/s_significand.c: Moved to... + * math/s_significand.c: ...here. + * sysdeps/generic/s_significandf.c: Moved to... + * math/s_significandf.c: ...here. + * sysdeps/generic/s_significandl.c: Moved to... + * math/s_significandl.c: ...here. + * sysdeps/generic/s_tanhl.c: Moved to... + * math/s_tanhl.c: ...here. + * sysdeps/generic/sbrk.c: Moved to... + * misc/sbrk.c: ...here. + * sysdeps/generic/scandir64.c: Moved to... + * dirent/scandir64.c: ...here. + * sysdeps/generic/sched_getaffinity.c: Moved to... + * posix/sched_getaffinity.c: ...here. + * sysdeps/generic/sched_getp.c: Moved to... + * posix/sched_getp.c: ...here. + * sysdeps/generic/sched_gets.c: Moved to... + * posix/sched_gets.c: ...here. + * sysdeps/generic/sched_primax.c: Moved to... + * posix/sched_primax.c: ...here. + * sysdeps/generic/sched_primin.c: Moved to... + * posix/sched_primin.c: ...here. + * sysdeps/generic/sched_rr_gi.c: Moved to... + * posix/sched_rr_gi.c: ...here. + * sysdeps/generic/sched_setaffinity.c: Moved to... + * posix/sched_setaffinity.c: ...here. + * sysdeps/generic/sched_setp.c: Moved to... + * posix/sched_setp.c: ...here. + * sysdeps/generic/sched_sets.c: Moved to... + * posix/sched_sets.c: ...here. + * sysdeps/generic/sched_yield.c: Moved to... + * posix/sched_yield.c: ...here. + * sysdeps/generic/seekdir.c: Moved to... + * dirent/seekdir.c: ...here. + * sysdeps/generic/segfault.c: Moved to... + * debug/segfault.c: ...here. + * sysdeps/generic/select.c: Moved to... + * misc/select.c: ...here. + * sysdeps/generic/semctl.c: Moved to... + * sysvipc/semctl.c: ...here. + * sysdeps/generic/semget.c: Moved to... + * sysvipc/semget.c: ...here. + * sysdeps/generic/semop.c: Moved to... + * sysvipc/semop.c: ...here. + * sysdeps/generic/semtimedop.c: Moved to... + * sysvipc/semtimedop.c: ...here. + * sysdeps/generic/send.c: Moved to... + * socket/send.c: ...here. + * sysdeps/generic/sendfile.c: Moved to... + * io/sendfile.c: ...here. + * sysdeps/generic/sendfile64.c: Moved to... + * io/sendfile64.c: ...here. + * sysdeps/generic/sendmsg.c: Moved to... + * socket/sendmsg.c: ...here. + * sysdeps/generic/sendto.c: Moved to... + * socket/sendto.c: ...here. + * sysdeps/generic/setcontext.c: Moved to... + * stdlib/setcontext.c: ...here. + * sysdeps/generic/setdomain.c: Moved to... + * misc/setdomain.c: ...here. + * sysdeps/generic/setegid.c: Moved to... + * misc/setegid.c: ...here. + * sysdeps/generic/setenv.c: Moved to... + * stdlib/setenv.c: ...here. + * sysdeps/generic/seteuid.c: Moved to... + * misc/seteuid.c: ...here. + * sysdeps/generic/setfpucw.c: Moved to... + * math/setfpucw.c: ...here. + * sysdeps/generic/setgid.c: Moved to... + * posix/setgid.c: ...here. + * sysdeps/generic/setgroups.c: Moved to... + * grp/setgroups.c: ...here. + * sysdeps/generic/sethostid.c: Moved to... + * misc/sethostid.c: ...here. + * sysdeps/generic/sethostname.c: Moved to... + * misc/sethostname.c: ...here. + * sysdeps/generic/setipv4sourcefilter.c: Moved to... + * inet/setipv4sourcefilter.c: ...here. + * sysdeps/generic/setitimer.c: Moved to... + * time/setitimer.c: ...here. + * sysdeps/generic/setjmp.c: Moved to... + * setjmp/setjmp.c: ...here. + * sysdeps/generic/setlogin.c: Moved to... + * posix/setlogin.c: ...here. + * sysdeps/generic/setpgid.c: Moved to... + * posix/setpgid.c: ...here. + * sysdeps/generic/setpgrp.c: Moved to... + * posix/setpgrp.c: ...here. + * sysdeps/generic/setpriority.c: Moved to... + * resource/setpriority.c: ...here. + * sysdeps/generic/setregid.c: Moved to... + * misc/setregid.c: ...here. + * sysdeps/generic/setresgid.c: Moved to... + * posix/setresgid.c: ...here. + * sysdeps/generic/setresuid.c: Moved to... + * posix/setresuid.c: ...here. + * sysdeps/generic/setreuid.c: Moved to... + * misc/setreuid.c: ...here. + * sysdeps/generic/setrlimit.c: Moved to... + * resource/setrlimit.c: ...here. + * sysdeps/generic/setrlimit64.c: Moved to... + * resource/setrlimit64.c: ...here. + * sysdeps/generic/setsid.c: Moved to... + * posix/setsid.c: ...here. + * sysdeps/generic/setsockopt.c: Moved to... + * socket/setsockopt.c: ...here. + * sysdeps/generic/setsourcefilter.c: Moved to... + * inet/setsourcefilter.c: ...here. + * sysdeps/generic/settimeofday.c: Moved to... + * time/settimeofday.c: ...here. + * sysdeps/generic/setuid.c: Moved to... + * posix/setuid.c: ...here. + * sysdeps/generic/setutxent.c: Moved to... + * login/setutxent.c: ...here. + * sysdeps/generic/setxattr.c: Moved to... + * misc/setxattr.c: ...here. + * sysdeps/generic/shm_open.c: Moved to... + * rt/shm_open.c: ...here. + * sysdeps/generic/shm_unlink.c: Moved to... + * rt/shm_unlink.c: ...here. + * sysdeps/generic/shmat.c: Moved to... + * sysvipc/shmat.c: ...here. + * sysdeps/generic/shmctl.c: Moved to... + * sysvipc/shmctl.c: ...here. + * sysdeps/generic/shmdt.c: Moved to... + * sysvipc/shmdt.c: ...here. + * sysdeps/generic/shmget.c: Moved to... + * sysvipc/shmget.c: ...here. + * sysdeps/generic/shutdown.c: Moved to... + * socket/shutdown.c: ...here. + * sysdeps/generic/sigaction.c: Moved to... + * signal/sigaction.c: ...here. + * sysdeps/generic/sigaltstack.c: Moved to... + * signal/sigaltstack.c: ...here. + * sysdeps/generic/sigblock.c: Moved to... + * signal/sigblock.c: ...here. + * sysdeps/generic/sigfillset.c: Moved to... + * signal/sigfillset.c: ...here. + * sysdeps/generic/sigignore.c: Moved to... + * signal/sigignore.c: ...here. + * sysdeps/generic/sigintr.c: Moved to... + * signal/sigintr.c: ...here. + * sysdeps/generic/sigjmp.c: Moved to... + * setjmp/sigjmp.c: ...here. + * sysdeps/generic/siglist.c: Moved to... + * stdio-common/siglist.c: ...here. + * sysdeps/generic/signal.c: Moved to... + * signal/signal.c: ...here. + * sysdeps/generic/sigpause.c: Moved to... + * signal/sigpause.c: ...here. + * sysdeps/generic/sigpending.c: Moved to... + * signal/sigpending.c: ...here. + * sysdeps/generic/sigprocmask.c: Moved to... + * signal/sigprocmask.c: ...here. + * sysdeps/generic/sigqueue.c: Moved to... + * signal/sigqueue.c: ...here. + * sysdeps/generic/sigreturn.c: Moved to... + * signal/sigreturn.c: ...here. + * sysdeps/generic/sigset.c: Moved to... + * signal/sigset.c: ...here. + * sysdeps/generic/sigsetmask.c: Moved to... + * signal/sigsetmask.c: ...here. + * sysdeps/generic/sigstack.c: Moved to... + * signal/sigstack.c: ...here. + * sysdeps/generic/sigsuspend.c: Moved to... + * signal/sigsuspend.c: ...here. + * sysdeps/generic/sigtimedwait.c: Moved to... + * signal/sigtimedwait.c: ...here. + * sysdeps/generic/sigvec.c: Moved to... + * signal/sigvec.c: ...here. + * sysdeps/generic/sigwait.c: Moved to... + * signal/sigwait.c: ...here. + * sysdeps/generic/sigwaitinfo.c: Moved to... + * signal/sigwaitinfo.c: ...here. + * sysdeps/generic/sleep.c: Moved to... + * posix/sleep.c: ...here. + * sysdeps/generic/sockatmark.c: Moved to... + * socket/sockatmark.c: ...here. + * sysdeps/generic/socket.c: Moved to... + * socket/socket.c: ...here. + * sysdeps/generic/socketpair.c: Moved to... + * socket/socketpair.c: ...here. + * sysdeps/generic/spawni.c: Moved to... + * posix/spawni.c: ...here. + * sysdeps/generic/speed.c: Moved to... + * termios/speed.c: ...here. + * sysdeps/generic/sprofil.c: Moved to... + * gmon/sprofil.c: ...here. + * sysdeps/generic/sstk.c: Moved to... + * misc/sstk.c: ...here. + * sysdeps/generic/start.c: Moved to... + * csu/start.c: ...here. + * sysdeps/generic/statfs.c: Moved to... + * io/statfs.c: ...here. + * sysdeps/generic/statfs64.c: Moved to... + * io/statfs64.c: ...here. + * sysdeps/generic/statvfs.c: Moved to... + * io/statvfs.c: ...here. + * sysdeps/generic/statvfs64.c: Moved to... + * io/statvfs64.c: ...here. + * sysdeps/generic/stime.c: Moved to... + * time/stime.c: ...here. + * sysdeps/generic/stpcpy.c: Moved to... + * string/stpcpy.c: ...here. + * sysdeps/generic/stpcpy_chk.c: Moved to... + * debug/stpcpy_chk.c: ...here. + * sysdeps/generic/stpncpy.c: Moved to... + * string/stpncpy.c: ...here. + * sysdeps/generic/stpncpy_chk.c: Moved to... + * debug/stpncpy_chk.c: ...here. + * sysdeps/generic/strcasecmp.c: Moved to... + * string/strcasecmp.c: ...here. + * sysdeps/generic/strcasecmp_l.c: Moved to... + * string/strcasecmp_l.c: ...here. + * sysdeps/generic/strcasestr.c: Moved to... + * string/strcasestr.c: ...here. + * sysdeps/generic/strcat.c: Moved to... + * string/strcat.c: ...here. + * sysdeps/generic/strcat_chk.c: Moved to... + * debug/strcat_chk.c: ...here. + * sysdeps/generic/strchr.c: Moved to... + * string/strchr.c: ...here. + * sysdeps/generic/strchrnul.c: Moved to... + * string/strchrnul.c: ...here. + * sysdeps/generic/strcmp.c: Moved to... + * string/strcmp.c: ...here. + * sysdeps/generic/strcpy.c: Moved to... + * string/strcpy.c: ...here. + * sysdeps/generic/strcpy_chk.c: Moved to... + * debug/strcpy_chk.c: ...here. + * sysdeps/generic/strcspn.c: Moved to... + * string/strcspn.c: ...here. + * sysdeps/generic/string-inlines.c: Moved to... + * string/string-inlines.c: ...here. + * sysdeps/generic/strlen.c: Moved to... + * string/strlen.c: ...here. + * sysdeps/generic/strncase.c: Moved to... + * string/strncase.c: ...here. + * sysdeps/generic/strncase_l.c: Moved to... + * string/strncase_l.c: ...here. + * sysdeps/generic/strncat.c: Moved to... + * string/strncat.c: ...here. + * sysdeps/generic/strncat_chk.c: Moved to... + * debug/strncat_chk.c: ...here. + * sysdeps/generic/strncmp.c: Moved to... + * string/strncmp.c: ...here. + * sysdeps/generic/strncpy.c: Moved to... + * string/strncpy.c: ...here. + * sysdeps/generic/strncpy_chk.c: Moved to... + * debug/strncpy_chk.c: ...here. + * sysdeps/generic/strnlen.c: Moved to... + * string/strnlen.c: ...here. + * sysdeps/generic/strpbrk.c: Moved to... + * string/strpbrk.c: ...here. + * sysdeps/generic/strrchr.c: Moved to... + * string/strrchr.c: ...here. + * sysdeps/generic/strsep.c: Moved to... + * string/strsep.c: ...here. + * sysdeps/generic/strspn.c: Moved to... + * string/strspn.c: ...here. + * sysdeps/generic/strstr.c: Moved to... + * string/strstr.c: ...here. + * sysdeps/generic/strtoimax.c: Moved to... + * stdlib/strtoimax.c: ...here. + * sysdeps/generic/strtok.c: Moved to... + * string/strtok.c: ...here. + * sysdeps/generic/strtok_r.c: Moved to... + * string/strtok_r.c: ...here. + * sysdeps/generic/strtol.c: Moved to... + * stdlib/strtol.c: ...here. + * sysdeps/generic/strtol_l.c: Moved to... + * stdlib/strtol_l.c: ...here. + * sysdeps/generic/strtold_l.c: Moved to... + * stdlib/strtold_l.c: ...here. + * sysdeps/generic/strtoll.c: Moved to... + * stdlib/strtoll.c: ...here. + * sysdeps/generic/strtoll_l.c: Moved to... + * stdlib/strtoll_l.c: ...here. + * sysdeps/generic/strtoul.c: Moved to... + * stdlib/strtoul.c: ...here. + * sysdeps/generic/strtoul_l.c: Moved to... + * stdlib/strtoul_l.c: ...here. + * sysdeps/generic/strtoull.c: Moved to... + * stdlib/strtoull.c: ...here. + * sysdeps/generic/strtoull_l.c: Moved to... + * stdlib/strtoull_l.c: ...here. + * sysdeps/generic/strtoumax.c: Moved to... + * stdlib/strtoumax.c: ...here. + * sysdeps/generic/strtsupp.c: Moved to... + * bare/strtsupp.c: ...here. + * sysdeps/generic/stty.c: Moved to... + * misc/stty.c: ...here. + * sysdeps/generic/sub_n.c: Moved to... + * stdlib/sub_n.c: ...here. + * sysdeps/generic/submul_1.c: Moved to... + * stdlib/submul_1.c: ...here. + * sysdeps/generic/swapcontext.c: Moved to... + * stdlib/swapcontext.c: ...here. + * sysdeps/generic/swapoff.c: Moved to... + * misc/swapoff.c: ...here. + * sysdeps/generic/swapon.c: Moved to... + * misc/swapon.c: ...here. + * sysdeps/generic/symlink.c: Moved to... + * io/symlink.c: ...here. + * sysdeps/generic/sync.c: Moved to... + * misc/sync.c: ...here. + * sysdeps/generic/syscall.c: Moved to... + * misc/syscall.c: ...here. + * sysdeps/generic/sysconf.c: Moved to... + * posix/sysconf.c: ...here. + * sysdeps/generic/sysdep.c: Moved to... + * csu/sysdep.c: ...here. + * sysdeps/generic/syslog.c: Moved to... + * misc/syslog.c: ...here. + * sysdeps/generic/system.c: Moved to... + * stdlib/system.c: ...here. + * sysdeps/generic/sysv_signal.c: Moved to... + * signal/sysv_signal.c: ...here. + * sysdeps/generic/t_sincosl.c: Moved to... + * math/t_sincosl.c: ...here. + * sysdeps/generic/tcdrain.c: Moved to... + * termios/tcdrain.c: ...here. + * sysdeps/generic/tcflow.c: Moved to... + * termios/tcflow.c: ...here. + * sysdeps/generic/tcflush.c: Moved to... + * termios/tcflush.c: ...here. + * sysdeps/generic/tcgetattr.c: Moved to... + * termios/tcgetattr.c: ...here. + * sysdeps/generic/tcgetpgrp.c: Moved to... + * termios/tcgetpgrp.c: ...here. + * sysdeps/generic/tcsendbrk.c: Moved to... + * termios/tcsendbrk.c: ...here. + * sysdeps/generic/tcsetattr.c: Moved to... + * termios/tcsetattr.c: ...here. + * sysdeps/generic/tcsetpgrp.c: Moved to... + * termios/tcsetpgrp.c: ...here. + * sysdeps/generic/telldir.c: Moved to... + * dirent/telldir.c: ...here. + * sysdeps/generic/tempname.c: Moved to... + * stdio-common/tempname.c: ...here. + * sysdeps/generic/time.c: Moved to... + * time/time.c: ...here. + * sysdeps/generic/timer_create.c: Moved to... + * rt/timer_create.c: ...here. + * sysdeps/generic/timer_delete.c: Moved to... + * rt/timer_delete.c: ...here. + * sysdeps/generic/timer_getoverr.c: Moved to... + * rt/timer_getoverr.c: ...here. + * sysdeps/generic/timer_gettime.c: Moved to... + * rt/timer_gettime.c: ...here. + * sysdeps/generic/timer_settime.c: Moved to... + * rt/timer_settime.c: ...here. + * sysdeps/generic/times.c: Moved to... + * posix/times.c: ...here. + * sysdeps/generic/tmpfile.c: Moved to... + * stdio-common/tmpfile.c: ...here. + * sysdeps/generic/tmpfile64.c: Moved to... + * stdio-common/tmpfile64.c: ...here. + * sysdeps/generic/trampoline.c: Moved to... + * hurd/trampoline.c: ...here. + * sysdeps/generic/truncate.c: Moved to... + * misc/truncate.c: ...here. + * sysdeps/generic/truncate64.c: Moved to... + * misc/truncate64.c: ...here. + * sysdeps/generic/tst-timer.c: Moved to... + * rt/tst-timer.c: ...here. + * sysdeps/generic/ttyname.c: Moved to... + * io/ttyname.c: ...here. + * sysdeps/generic/ttyname_r.c: Moved to... + * io/ttyname_r.c: ...here. + * sysdeps/generic/ualarm.c: Moved to... + * misc/ualarm.c: ...here. + * sysdeps/generic/udiv_qrnnd.c: Moved to... + * stdlib/udiv_qrnnd.c: ...here. + * sysdeps/generic/ulimit.c: Moved to... + * resource/ulimit.c: ...here. + * sysdeps/generic/umask.c: Moved to... + * io/umask.c: ...here. + * sysdeps/generic/uname.c: Moved to... + * posix/uname.c: ...here. + * sysdeps/generic/unlink.c: Moved to... + * io/unlink.c: ...here. + * sysdeps/generic/unlinkat.c: Moved to... + * io/unlinkat.c: ...here. + * sysdeps/generic/unlockpt.c: Moved to... + * login/unlockpt.c: ...here. + * sysdeps/generic/updwtmp.c: Moved to... + * login/updwtmp.c: ...here. + * sysdeps/generic/updwtmpx.c: Moved to... + * login/updwtmpx.c: ...here. + * sysdeps/generic/usleep.c: Moved to... + * misc/usleep.c: ...here. + * sysdeps/generic/ustat.c: Moved to... + * misc/ustat.c: ...here. + * sysdeps/generic/utime.c: Moved to... + * io/utime.c: ...here. + * sysdeps/generic/utimes.c: Moved to... + * misc/utimes.c: ...here. + * sysdeps/generic/utmp_file.c: Moved to... + * login/utmp_file.c: ...here. + * sysdeps/generic/utmpxname.c: Moved to... + * login/utmpxname.c: ...here. + * sysdeps/generic/versionsort64.c: Moved to... + * dirent/versionsort64.c: ...here. + * sysdeps/generic/vfork.c: Moved to... + * posix/vfork.c: ...here. + * sysdeps/generic/vhangup.c: Moved to... + * misc/vhangup.c: ...here. + * sysdeps/generic/vlimit.c: Moved to... + * resource/vlimit.c: ...here. + * sysdeps/generic/vtimes.c: Moved to... + * resource/vtimes.c: ...here. + * sysdeps/generic/w_acos.c: Moved to... + * math/w_acos.c: ...here. + * sysdeps/generic/w_acosf.c: Moved to... + * math/w_acosf.c: ...here. + * sysdeps/generic/w_acosh.c: Moved to... + * math/w_acosh.c: ...here. + * sysdeps/generic/w_acoshf.c: Moved to... + * math/w_acoshf.c: ...here. + * sysdeps/generic/w_acoshl.c: Moved to... + * math/w_acoshl.c: ...here. + * sysdeps/generic/w_acosl.c: Moved to... + * math/w_acosl.c: ...here. + * sysdeps/generic/w_asin.c: Moved to... + * math/w_asin.c: ...here. + * sysdeps/generic/w_asinf.c: Moved to... + * math/w_asinf.c: ...here. + * sysdeps/generic/w_asinl.c: Moved to... + * math/w_asinl.c: ...here. + * sysdeps/generic/w_atan2.c: Moved to... + * math/w_atan2.c: ...here. + * sysdeps/generic/w_atan2f.c: Moved to... + * math/w_atan2f.c: ...here. + * sysdeps/generic/w_atan2l.c: Moved to... + * math/w_atan2l.c: ...here. + * sysdeps/generic/w_atanh.c: Moved to... + * math/w_atanh.c: ...here. + * sysdeps/generic/w_atanhf.c: Moved to... + * math/w_atanhf.c: ...here. + * sysdeps/generic/w_atanhl.c: Moved to... + * math/w_atanhl.c: ...here. + * sysdeps/generic/w_cosh.c: Moved to... + * math/w_cosh.c: ...here. + * sysdeps/generic/w_coshf.c: Moved to... + * math/w_coshf.c: ...here. + * sysdeps/generic/w_coshl.c: Moved to... + * math/w_coshl.c: ...here. + * sysdeps/generic/w_drem.c: Moved to... + * math/w_drem.c: ...here. + * sysdeps/generic/w_dremf.c: Moved to... + * math/w_dremf.c: ...here. + * sysdeps/generic/w_dreml.c: Moved to... + * math/w_dreml.c: ...here. + * sysdeps/generic/w_exp10.c: Moved to... + * math/w_exp10.c: ...here. + * sysdeps/generic/w_exp10f.c: Moved to... + * math/w_exp10f.c: ...here. + * sysdeps/generic/w_exp10l.c: Moved to... + * math/w_exp10l.c: ...here. + * sysdeps/generic/w_exp2.c: Moved to... + * math/w_exp2.c: ...here. + * sysdeps/generic/w_exp2f.c: Moved to... + * math/w_exp2f.c: ...here. + * sysdeps/generic/w_exp2l.c: Moved to... + * math/w_exp2l.c: ...here. + * sysdeps/generic/w_expl.c: Moved to... + * math/w_expl.c: ...here. + * sysdeps/generic/w_fmod.c: Moved to... + * math/w_fmod.c: ...here. + * sysdeps/generic/w_fmodf.c: Moved to... + * math/w_fmodf.c: ...here. + * sysdeps/generic/w_fmodl.c: Moved to... + * math/w_fmodl.c: ...here. + * sysdeps/generic/w_hypot.c: Moved to... + * math/w_hypot.c: ...here. + * sysdeps/generic/w_hypotf.c: Moved to... + * math/w_hypotf.c: ...here. + * sysdeps/generic/w_hypotl.c: Moved to... + * math/w_hypotl.c: ...here. + * sysdeps/generic/w_j0.c: Moved to... + * math/w_j0.c: ...here. + * sysdeps/generic/w_j0f.c: Moved to... + * math/w_j0f.c: ...here. + * sysdeps/generic/w_j0l.c: Moved to... + * math/w_j0l.c: ...here. + * sysdeps/generic/w_j1.c: Moved to... + * math/w_j1.c: ...here. + * sysdeps/generic/w_j1f.c: Moved to... + * math/w_j1f.c: ...here. + * sysdeps/generic/w_j1l.c: Moved to... + * math/w_j1l.c: ...here. + * sysdeps/generic/w_jn.c: Moved to... + * math/w_jn.c: ...here. + * sysdeps/generic/w_jnf.c: Moved to... + * math/w_jnf.c: ...here. + * sysdeps/generic/w_jnl.c: Moved to... + * math/w_jnl.c: ...here. + * sysdeps/generic/w_lgamma.c: Moved to... + * math/w_lgamma.c: ...here. + * sysdeps/generic/w_lgamma_r.c: Moved to... + * math/w_lgamma_r.c: ...here. + * sysdeps/generic/w_lgammaf.c: Moved to... + * math/w_lgammaf.c: ...here. + * sysdeps/generic/w_lgammaf_r.c: Moved to... + * math/w_lgammaf_r.c: ...here. + * sysdeps/generic/w_lgammal.c: Moved to... + * math/w_lgammal.c: ...here. + * sysdeps/generic/w_lgammal_r.c: Moved to... + * math/w_lgammal_r.c: ...here. + * sysdeps/generic/w_log.c: Moved to... + * math/w_log.c: ...here. + * sysdeps/generic/w_log10.c: Moved to... + * math/w_log10.c: ...here. + * sysdeps/generic/w_log10f.c: Moved to... + * math/w_log10f.c: ...here. + * sysdeps/generic/w_log10l.c: Moved to... + * math/w_log10l.c: ...here. + * sysdeps/generic/w_log2.c: Moved to... + * math/w_log2.c: ...here. + * sysdeps/generic/w_log2f.c: Moved to... + * math/w_log2f.c: ...here. + * sysdeps/generic/w_log2l.c: Moved to... + * math/w_log2l.c: ...here. + * sysdeps/generic/w_logf.c: Moved to... + * math/w_logf.c: ...here. + * sysdeps/generic/w_logl.c: Moved to... + * math/w_logl.c: ...here. + * sysdeps/generic/w_pow.c: Moved to... + * math/w_pow.c: ...here. + * sysdeps/generic/w_powf.c: Moved to... + * math/w_powf.c: ...here. + * sysdeps/generic/w_powl.c: Moved to... + * math/w_powl.c: ...here. + * sysdeps/generic/w_remainder.c: Moved to... + * math/w_remainder.c: ...here. + * sysdeps/generic/w_remainderf.c: Moved to... + * math/w_remainderf.c: ...here. + * sysdeps/generic/w_remainderl.c: Moved to... + * math/w_remainderl.c: ...here. + * sysdeps/generic/w_scalb.c: Moved to... + * math/w_scalb.c: ...here. + * sysdeps/generic/w_scalbf.c: Moved to... + * math/w_scalbf.c: ...here. + * sysdeps/generic/w_scalbl.c: Moved to... + * math/w_scalbl.c: ...here. + * sysdeps/generic/w_sinh.c: Moved to... + * math/w_sinh.c: ...here. + * sysdeps/generic/w_sinhf.c: Moved to... + * math/w_sinhf.c: ...here. + * sysdeps/generic/w_sinhl.c: Moved to... + * math/w_sinhl.c: ...here. + * sysdeps/generic/w_sqrt.c: Moved to... + * math/w_sqrt.c: ...here. + * sysdeps/generic/w_sqrtf.c: Moved to... + * math/w_sqrtf.c: ...here. + * sysdeps/generic/w_sqrtl.c: Moved to... + * math/w_sqrtl.c: ...here. + * sysdeps/generic/w_tgamma.c: Moved to... + * math/w_tgamma.c: ...here. + * sysdeps/generic/w_tgammaf.c: Moved to... + * math/w_tgammaf.c: ...here. + * sysdeps/generic/w_tgammal.c: Moved to... + * math/w_tgammal.c: ...here. + * sysdeps/generic/wait.c: Moved to... + * posix/wait.c: ...here. + * sysdeps/generic/wait3.c: Moved to... + * posix/wait3.c: ...here. + * sysdeps/generic/wait4.c: Moved to... + * posix/wait4.c: ...here. + * sysdeps/generic/waitid.c: Moved to... + * posix/waitid.c: ...here. + * sysdeps/generic/waitpid.c: Moved to... + * posix/waitpid.c: ...here. + * sysdeps/generic/wcstoimax.c: Moved to... + * stdlib/wcstoimax.c: ...here. + * sysdeps/generic/wcstol.c: Moved to... + * wcsmbs/wcstol.c: ...here. + * sysdeps/generic/wcstol_l.c: Moved to... + * wcsmbs/wcstol_l.c: ...here. + * sysdeps/generic/wcstoll.c: Moved to... + * wcsmbs/wcstoll.c: ...here. + * sysdeps/generic/wcstoll_l.c: Moved to... + * wcsmbs/wcstoll_l.c: ...here. + * sysdeps/generic/wcstoul.c: Moved to... + * wcsmbs/wcstoul.c: ...here. + * sysdeps/generic/wcstoul_l.c: Moved to... + * wcsmbs/wcstoul_l.c: ...here. + * sysdeps/generic/wcstoull.c: Moved to... + * wcsmbs/wcstoull.c: ...here. + * sysdeps/generic/wcstoull_l.c: Moved to... + * wcsmbs/wcstoull_l.c: ...here. + * sysdeps/generic/wcstoumax.c: Moved to... + * stdlib/wcstoumax.c: ...here. + * sysdeps/generic/wordcopy.c: Moved to... + * string/wordcopy.c: ...here. + * sysdeps/generic/wordexp.c: Moved to... + * posix/wordexp.c: ...here. + * sysdeps/generic/write.c: Moved to... + * io/write.c: ...here. + * sysdeps/generic/writev.c: Moved to... + * misc/writev.c: ...here. + * sysdeps/generic/xmknod.c: Moved to... + * io/xmknod.c: ...here. + * sysdeps/generic/xmknodat.c: Moved to... + * io/xmknodat.c: ...here. + * sysdeps/generic/xpg-strerror.c: Moved to... + * string/xpg-strerror.c: ...here. + * sysdeps/generic/xstat.c: Moved to... + * io/xstat.c: ...here. + * sysdeps/generic/xstat64.c: Moved to... + * io/xstat64.c: ...here. + * catgets/gencat.c: Use "config.h" to refer to the local config.h file. + * stdlib/stdtod_l.c: Use "..." for gmp-impl.h and longlong.h headers. + * sysdeps/ieee754/ldbl-96/printf_fphex.c: Adjust for files moving + out of sysdeps/generic. + * sysdeps/ieee754/ldbl-96/strtold_l.c: Likewise. + * sysdeps/powerpc/elf/libc-start.c: Likewise. + * sysdeps/unix/sysv/linux/dl-sbrk.c: Likewise. + * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. + * sysdeps/unix/sysv/linux/segfault.c: Likewise. + * sysdeps/unix/sysv/linux/sigreturn.c: Likewise. + * sysdeps/unix/sysv/linux/syslog.c: Likewise. + * sysdeps/unix/sysv/linux/updwtmp.c: Likewise. + * sysdeps/unix/sysv/linux/utmp_file.c: Likewise. + * sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise. + * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h: Likewise. + * sysdeps/wordsize-32/llabs.c: Likewise. + * sysdeps/wordsize-32/lldiv.c: Likewise. + * sysdeps/wordsize-64/glob.c: Likewise. + * sysdeps/wordsize-64/labs.c: Likewise. + * sysdeps/wordsize-64/ldiv.c: Likewise. + * sysdeps/wordsize-64/strtol.c: Likewise. + * sysdeps/wordsize-64/strtol_l.c: Likewise. + * sysdeps/wordsize-64/strtoul.c: Likewise. + * sysdeps/wordsize-64/strtoul_l.c: Likewise. + * sysdeps/wordsize-64/wcstol.c: Likewise. + * sysdeps/wordsize-64/wcstol_l.c: Likewise. + * sysdeps/wordsize-64/wcstoul.c: Likewise. + * sysdeps/wordsize-64/wcstoul_l.c: Likewise. + * sysdeps/x86_64/fpu/printf_fphex.c: Likewise. + * wcsmbs/Makefile (strtox-CFLAGS): remove -I../stdlib. + (CPPFLAGS-wcstold_l.c): Add -I../stdlib. + +2005-12-13 Roland McGrath + + * sysdeps/generic/Makefile: Remove remaining bits/endian.h cruft. + +2005-12-13 Ulrich Drepper + + * sysdeps/generic/signame.c: Removed. + * sysdeps/generic/signame.h: Removed. + * sysdeps/generic/configure.in: Removed. + * sysdeps/generic/Dist: Remove these files. + + * sysdeps/generic/det_endian.c: Removed. + * sysdeps/generic/Makefile: Remove rule to build it. + * sysdeps/generic/Dist: Don't distribute it. + +2005-12-13 Roland McGrath + + * sysdeps/powerpc/dl-procinfo.c: New file. + * sysdeps/powerpc/dl-procinfo.h: New file. + +2005-12-12 Ulrich Drepper + + * io/sys/stat.h: Add restrict to fstatat declarations. + +2005-12-10 Ulrich Drepper + + * posix/regex_internal.h: Include if available. + +2005-12-06 Paolo Bonzini + + * posix/regex_internal.h (SIZE_MAX): Provide a default definition. + +2005-12-08 Ulrich Drepper + + * nis/nis_call.c (inetstr2int): Optimize. + +2005-12-08 Jakub Jelinek + + * nis/nis_call.c (__nisbind_create): Remove __nisbind_destroy, + ->clnt cannot be != NULL. + (__do_niscall): No need to use __nisbind_destroy, __nisbind_next + did it. + (__nisbind_connect): use_auth is already TRUE, otherwise we would + not be here. + + * nis/nis_lookup.c (nis_lookup): Remove unnecessary + __nisbind_destroy calls. __nisbind_next does all that. + + * nis/ypclnt.c (yp_update): Before trying default authentication, + free DES descriptor. + +2005-12-07 Jakub Jelinek + + * nis/nis_table.c (nis_list): Fix memory handling in error case. + +2005-12-07 Ulrich Drepper + + * nis/nis_table.c (nis_list): Remove have_tablepath, just use the + pointer value itself. + +2005-12-06 Ulrich Drepper + + * catgets/gencat.c: Use GPL, not LGPL. + * elf/cache.c: Likewise. + * elf/chroot_canon.c: Likewise. + * elf/ldconfig.c: Likewise. + * elf/readlib.c: Likewise. + * iconv/dummy-repertoire.c: Likewise. + * iconv/iconv_charmap.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * locale/programs/3level.h: Likewise. + * locale/programs/charmap-dir.c: Likewise. + * locale/programs/charmap-dir.h: Likewise. + * locale/programs/charmap-kw.gperf: Likewise. + * locale/programs/charmap.c: Likewise. + * locale/programs/charmap.h: Likewise. + * locale/programs/config.h: Likewise. + * locale/programs/ld-address.c: Likewise. + * locale/programs/ld-collate.c: Likewise. + * locale/programs/ld-ctype.c: Likewise. + * locale/programs/ld-identification.c: Likewise. + * locale/programs/ld-measurement.c: Likewise. + * locale/programs/ld-messages.c: Likewise. + * locale/programs/ld-monetary.c: Likewise. + * locale/programs/ld-name.c: Likewise. + * locale/programs/ld-numeric.c: Likewise. + * locale/programs/ld-paper.c: Likewise. + * locale/programs/ld-telephone.c: Likewise. + * locale/programs/ld-time.c: Likewise. + * locale/programs/linereader.c: Likewise. + * locale/programs/linereader.h: Likewise. + * locale/programs/locale-spec.c: Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * locale/programs/localedef.h: Likewise. + * locale/programs/locarchive.c: Likewise. + * locale/programs/locfile-kw.gperf: Likewise. + * locale/programs/locfile-token.h: Likewise. + * locale/programs/locfile.c: Likewise. + * locale/programs/locfile.h: Likewise. + * locale/programs/repertoire.c: Likewise. + * locale/programs/repertoire.h: Likewise. + * locale/programs/simple-hash.c: Likewise. + * locale/programs/simple-hash.h: Likewise. + * locale/programs/xmalloc.c: Likewise. + * locale/programs/xstrdup.c: Likewise. + * malloc/memusagestat.c: Likewise. + * nscd/aicache.c: Likewise. + * nscd/cache.c: Likewise. + * nscd/connections.c: Likewise. + * nscd/dbg_log.c: Likewise. + * nscd/gai.c: Likewise. + * nscd/getgrgid_r.c: Likewise. + * nscd/getgrnam_r.c: Likewise. + * nscd/gethstbyad_r.c: Likewise. + * nscd/gethstbynm2_r.c: Likewise. + * nscd/getpwnam_r.c: Likewise. + * nscd/getpwuid_r.c: Likewise. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/mem.c: Likewise. + * nscd/nscd.c: Likewise. + * nscd/nscd_conf.c: Likewise. + * nscd/pwdcache.c: Likewise. + * posix/getconf.c: Likewise. + * sysdeps/generic/nscd_setup_thread.c: Likewise. + * sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise. + + * sunrpc/auth_des.c (authdes_pk_create): If conversation key + cannot be created, free memory. + Reported by rprasad@vmware.com. + +2005-11-15 Mike Frysinger + + * sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor + protection and allow pthread.h to include bits/setjmp.h as well as + setjmp.h. + * sysdeps/m68k/bits/setjmp.h: Likewise. + * sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h + are allow to include bits/setjmp.h. + * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs + cast of address. + * sysdeps/sh/bits/setjmp.h: Likewise. + +2005-11-12 Jim Meyering + + * sysdeps/unix/opendir.c (__alloc_dir): Declare STATP parameter + to be pointer to const. + * include/dirent.h: Update decl. + +2005-12-05 Roland McGrath + + * hurd/hurdmalloc.c: Remove $ tag $ magic. + * mach/err_kern.sub: Likewise. + * mach/err_server.sub: Likewise. + * mach/err_us.sub: Likewise. + * mach/error_compat.c: Likewise. + * mach/errorlib.h: Likewise. + * mach/errstring.c: Likewise. + * mach/mach/error.h: Likewise. + * mach/mach_error.c: Likewise. + * mach/mach_error.h: Likewise. + * mach/msg-destroy.c: Likewise. + * mach/msgserver.c: Likewise. + * sysdeps/mach/sys/reboot.h: Likewise. + + * sysdeps/generic/dwarf2.h: Replace license text with glibc LGPL. + +2005-11-28 Jakub Jelinek + + * malloc/tst-mallocfork.c (do_test): Make sure sa_flags is + initialized. Reported by John Reiser . + +2005-12-05 Daniel Jacobowitz + + * stdlib/longlong.h: Update from GCC. + +2005-12-04 Joseph S. Myers + + * soft-fp/soft-fp.h: Include . + + * soft-fp/floatdisf.c (__floatdisf): Return float. + +2005-12-05 Roland McGrath + + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_POSIX_CPU_TIMERS): New macro, for 2.6.12 and later. + +2005-12-03 Ulrich Drepper + + * nis/nis_table.c (nis_list): Optimize freeing and reallocation of + result record. + + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): + Better sized buffers. Correct error case handling. + * nis/nis_error.c (nis_sperror_r): Let snprintf determine whether + there is an overflow. + * nis/nss_nisplus/nisplus-service.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, remove + unnecessary variables, general cleanup. + * nis/nss_nisplus/nisplus-rpc.c: Likewise. + * nis/nss_nisplus/nisplus-proto.c: Likewise.. + * nis/nss_nisplus/nisplus-network.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, general cleanup. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_getipnodebyname_r): + Removed. + Fix locking to use _nss_create_tablename. Avoid unnecessary copying, + general cleanup. + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): + Correctly construct request. + Fix locking to use _nss_create_tablename. Avoid unnecessary copying, + general cleanup. + * nis/nss_nisplus/nisplus-alias.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, general cleanup. + * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_setnetgrent): + Rewrite to use snprintf. + * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): + Likewise. + +2005-12-02 Ulrich Drepper + + * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): + Renamed from _nss_create_tablename. Export from file (but not DSO). + (pwd_tablename_val): Renamed from tablename_val, mark hidden. + (pwd_tablename_len): Renamed from tablename_len, mark hidden. + Change all users. + * nis/nss_nisplus/nisplus-spwd.c (_nss_create_tablename): Removed. + Use _nss_pwd_create_tablename now. Use pwd_tablename_val and + pwd_tablename_len. Remove unnecessary variables, general cleanup. + + * nis/nss_nisplus/nisplus-pwd.c: Fix locking to use + _nss_create_tablename. Avoid unnecessary copying, remove + unnecessary variables, general cleanup. + * nis/nss_nisplus/nisplus-grp.c: Likewise. + + * io/Makefile (routines): Add mknodat, xmknodat, mkdirat, mkfifoat. + (static-only-routines): Add mknodat. + * io/Versions [GLIBC_2.4]: Add mkdirat, mkfifoat, __xmknodat. + * io/sys/stat.h: Declare mkditat, mknodat, mkfifoat, __xmknodat. + Define mknodat inline function. + * include/sys/stat.h: Add hidden proto for __xmknodat. + * sysdeps/generic/mkdirat.c: New file. + * sysdeps/generic/mkfifoat.c: New file. + * sysdeps/generic/mknodat.c: New file. + * sysdeps/generic/xmknodat.c: New file. + * sysdeps/unix/mkfifoat.c: New file. + * sysdeps/unix/sysv/linux/mkdirat.c: New file. + * sysdeps/unix/sysv/linux/xmknodat.c: New file. + + * sysdeps/generic/xmknod.c: Add one more parameter check. + +2005-11-28 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/bits/mman.h (MREMAP_FIXED): Added, + Patch by René Rebe . + +2005-11-27 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Avoid RFC 3484 sorting if there are + multiple return records but only one address. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Avoid some code duplication. + +2005-11-27 Roland McGrath + + * sysdeps/unix/sysv/linux/fchownat.c: Include alloca.h, sysdep.h. + Reported by René Rebe . + +2005-11-27 Ulrich Drepper + + * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Don't cache + euid and egid. + + * nis/nis_table.c (nis_list): Add more free calls in error cases. + +2005-11-26 Richard Henderson + + * sysdeps/alpha/strncmp.S: Don't read too much data when pointers + are co-aligned, and count is aligned with the end of the word. + +2005-11-26 Ulrich Drepper + + * nis/nis_lookup.c (nis_lookup): Mark RPCTIMEOUT as const. Pretty + printing. + + * nis/nis_table.c (__create_ib_request): Use strdupa instead of + variable size array. + (RPCTIMEOUT): Mark as const. + + * nis/ypclnt.c (yp_bind_ypbindprog): Initialize clnt_saddr by hand. + (ypdomainname): Renamed from __ypdomainname. No need for initializer. + (ypbindlist): Renamed from __ypbindlist. + (do_ypcall): Check memory allocation suceeded before calling + yp_bind_ypbindprog. + (yperr_string): Reduce size of function by using only one gettext call. + (ypbinderr_string): Likewise. + (yp_match): Free response in case memory for return value cannot be + allocated. + (yp_first): Likewise. + (yp_next): Likewise. + (do_ypcall_tr): New function which translates error codes as well. + (yp_match, yp_next, yp_master, yp_order, yp_maplist): Use it. + (yp_all): Correct test for invalid parameter. + Pretty printing. + (RPCTIMEOUT, UDPTIMEOUT): Mark as const. + +2005-11-25 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix typo. + (__fxstatat64): Alias from __fxstatat; remove other cnp errors. + * sysdeps/unix/sysv/linux/alpha/sigaction.c: Include sys/cdefs.h + and stddef.h. + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MREMAP_FIXED): Define. + +2005-11-25 Ulrich Drepper + + * Makeconfig (+cflags): Add -fmerge-all-constants by default. + + [BZ #1912] + * nss/function.def: Add entry to use gethostbyname2 for files. + +2005-11-25 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/fxstatat64.c: Include string.h. + +2005-11-25 Ulrich Drepper + + [BZ #1926] + * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Change + return value type to match expected type. + + [BZ #1925] + * nis/ypclnt.c (yp_order): Correct test for invalid parameter. + +2005-11-24 Ulrich Drepper + + * scripts/check-c++-types.sh: Improve comments. + + * scripts/check-local-headers.sh: New file. + * Makefile (tests): Run check-local-headers.sh. + +2005-11-23 Thorsten Kukuk + + * include/sys/sendfile.h: New file. + +2005-11-24 Andreas Schwab + + * time/sys/time.h: Remove nonnull attribute from futimesat. + +2005-11-22 Ulrich Drepper + + * nscd/connections.c (sendfileall): Define. + (handle_request): Use it instead of sendfile call. + * nscd/nscd-client.h: Declare sendfileall. + * nscd/aicache.c: Use sendfileall instead of sendfile. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + + [BZ #1908] + * manual/install.texi (Tools for Compilation): Require gawk. + +2005-11-22 Jakub Jelinek + + * sysdeps/generic/ldsodefs.h (struct rtld_global): Remove + unused is_static field from slotinfo array. + +2005-11-21 Jakub Jelinek + + * sunrpc/bindrsvprt.c (bindresvport): Wrap around to startport + in the loop if port is bigger than endport, initially set to + ENDPORT. When changing startport, set endport and port + appropriately. + +2005-11-21 Ulrich Drepper + + * Makefile.in: Remove RCS ID line. + * config-name.in: Likewise. + * config.make.in: Likewise. + * malloc/arena.c: Likewise. + * malloc/hooks.c: Likewise. + * malloc/malloc.c: Likewise. + * manual/dir: Likewise. + * math/math_private.h: Likewise. + * resolv/gethnamaddr.c: Likewise. + * scripts/mkinstalldirs: Likewise. + * sunrpc/rpc_clntout.c: Likewise. + * sunrpc/rpc_cout.c: Likewise. + * sunrpc/rpc_hout.c: Likewise. + * sunrpc/rpc_main.c: Likewise. + * sunrpc/rpc_parse.c: Likewise. + * sunrpc/rpc_sample.c: Likewise. + * sunrpc/rpc_scan.c: Likewise. + * sunrpc/rpc_svcout.c: Likewise. + * sunrpc/rpc_tblout.c: Likewise. + * sunrpc/rpc_util.c: Likewise. + * sysdeps/unix/sysv/linux/sys/quote.h: Likewise. + + * nscd/nscd_helper.c: Pretty printing. + +2005-11-19 Roland McGrath + + * elf/elf.h: Revert last change. + +2005-11-19 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ia64/bits/shm.h (shmatt_t): New type. + (struct shmid_ds): Use it for shm_nattch field. + +2005-11-18 Jakub Jelinek + + * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If FILE is NULL, + set access and modification times of the file referenced by FD. + * sysdeps/generic/futimesat.c (futimesat): Don't return EINVAL if + FILE is NULL. Don't check FD if FILE is absolute path. + +2005-11-19 Ulrich Drepper + + * nscd/nscd_gethst_r.c (nscd_gethst_r): Avoid unnecesary read call + if there are no aliases. + + * sysdeps/unix/sysv/linux/Makefile (CFLAGS-connections.c, + CFLAGS-pwdcache.c, CFLAGS-grpcache.c, CFLAGS-hstcache.c, + CFLAGS-aicache.c, CFLAGS-initgrcache.c): Add -DHAVE_SENDFILE. + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDFILE): + Define. + * nscd/pwdcache.c [HAVE_SENDFILE]: Include and + . + [HAVE_SENDFILE] (cache_addpw): Use sendfile to transmit positive + result. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/aicache.c: Likewise. + * nscd/initgrcache.c: Likewise. + * nscd/connectionc.c: Likewise. + +2005-11-18 Andreas Schwab + + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Remove useless alias. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Handle + NO_WEAK_ALIAS. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. + +2005-11-18 Paul Brook + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MREMAP_FIXED): New macro. + + * nscd/grpcache.c: Include . + * nscd/nscd_stat.c: Likewise. + * nscd/pwdcache.c: Likewise. + * sysdeps/unix/sysv/linux/unlinkat.c: Include , . + +2005-11-17 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Define SHM_NORESERVE. + * sysdeps/unix/sysv/linux/ia64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise. + +2005-11-17 Steven Munroe + + [BZ #1877] + * string/test-strncmp.c (do_test_limit): Handle zero length and + non-zero align values. + (test_main): Correct do_test_limit tests for 64-bit. + +2005-11-15 Steven Munroe + + * sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE, + PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE, + PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5, + PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970): + Define to match 2.6.15 kernel. + + * sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include. + * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise. + * sysdeps/powerpc/fpu/w_sqrtf.c: Likewise. + +2005-11-17 Roland McGrath + + * elf/elf.h (R_PPC64_ADDR30): Renamed to R_PPC64_REL30. + +2005-11-17 Jakub Jelinek + + * io/sys/stat.h (fstatat): If __REDIRECT_NTH isn't defined, + define fstatat to fstatat64. + +2005-11-17 Steven Munroe + + [BZ #1877] + * string/test-strncmp.c (do_test_limit): New function. + (do_test) Add cast to eliminate compiler warnings. + (do_random_tests) Add cast to eliminate compiler warnings. + (test_main) Add do_test_limit tests. + * sysdeps/powerpc/powerpc32/strncmp.S: Test length before unaligned + load. + * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. + +2005-11-17 Ulrich Drepper + + * include/resolv.h: Include . + Patch by Paul Brook. + + * io/sys/stat.h: Use __const not const in fstatat prototypes. + +2005-11-08 H.J. Lu + + * sysdeps/wordsize-32/Makefile (CPPFLAGS-divdi3.c): Set to + -Din_divdi3_c. + * sysdeps/wordsize-32/symbol-hacks.h: Skip if in_divdi3_c is defined. + +2005-11-16 Jakub Jelinek + + * sysdeps/unix/sysv/linux/fchownat.c: Include string.h. + * sysdeps/unix/sysv/linux/futimesat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise. + * sysdeps/unix/sysv/linux/renameat.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. + * sysdeps/unix/sysv/linux/unlinkat.c: Likewise. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise. + +2005-11-16 Ulrich Drepper + + * iconvdata/Makefile (modules): Add ISO_11548-1. + (distribute): Add iso_11548-1.c. + * iconvdata/gconv-modules: Add entries for ISO 11548-1. + * iconvdata/TESTS: Add entry for ISO 11548-1. + + [BZ 1872] + * iconvdata/iso_11548-1.c: New file. + * iconvdata/testdata/ISO_11548-1: New file. + * iconvdata/testdata/ISO_11548-1..UTF8: New file. + Patch by Samuel Thibault . + +2005-11-16 Kaz Kojima + + * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Remove incorrect &. + +2005-11-15 Ulrich Drepper + + [BZ 1865] + * inet/netinet/icmp6.h: More updates for RFC3542. + * inet/netinet/ip6.h: Likewise. + * sysdeps/unix/sysv/linux/bits/in.h: Adjust for current kernel sources. + Patch by David L Stevens . + + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c (__fxstatat): + Return -1 on failure. + * sysdeps/unix/sysv/linux/fchownat.c (fchownat): Likewise. + * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise.. + * sysdeps/unix/sysv/linux/fxstatat64.c [__ASSUME_STAT64_SYSCALL] + (__fxstatat64): Handle errors. + + * io/sys/poll.h: Add comment explaining poll is a cancellation point. + + * sysdeps/unix/sysv/linux/syscalls.list (epoll_wait): Align with + poll, make cancelable. + * sysdeps/unix/sysv/linux/sys/epoll.h: Add comment explaining + epoll_wait is a cancellation point. + +2005-11-15 Jakub Jelinek + + * io/sys/stat.h (fstatat): Don't use __THROW together with + __REDIRECT_NTH. + +2005-11-14 Ulrich Drepper + + * elf/dl-open.c [!SHARED]: Remove _dl_tls_static_size definition. + * sysdeps/generic/libc-tls.c: Initialize _dl_tls_static_size here. + +2005-11-11 Ulrich Drepper + + * io/Makefile (routines): Add fstatat, fstatat64, fxstatat, fxstatat64, + fchownat, and unlinkat. + (static-only-routines): Add fstatat and fstatat64. + (tests): Add tst-unlinkat, tst-fstatat, tst-futimesat, tst-renameat, + and tst-fchownat. + * io/Versions [GLIBC_2.4]: Add fchownat, __fxstatat, __fxstatat64, + and unlinkat. + * io/fcntl.h: Define AT_FDCWD, AT_SYMLINK_NOFOLLOW, and AT_REMOVEDIR. + * io/fstatat.c: New file. + * io/fstatat64.c: New file. + * io/sys/stat.h: Declare fstatat, fstatat64, __fxstatat, __fxstatat64 + and define fstatat and fstatat64 inline functions. + * libio/stdio.h: Declare renameat. + * misc/Makefile (routines): Add futimesat. + * misc/Versions [GLIBC_2.4]: Add futimesat. + * posix/unistd.h: Declare fchownat and unlinkat. + * stdio-common/Makefile (routines): Add renameat. + * stdio-common/Versions [GLIBC_2.4]: Add renameat. + * sysdeps/generic/fchownat.c: New file. + * sysdeps/generic/futimesat.c: New file. + * sysdeps/generic/fxstatat.c: New file. + * sysdeps/generic/fxstatat64.c: New file. + * sysdeps/generic/renameat.c: New file. + * sysdeps/generic/unlinkat.c: New file. + * sysdeps/unix/sysv/linux/fchownat.c: New file. + * sysdeps/unix/sysv/linux/futimesat.c: New file. + * sysdeps/unix/sysv/linux/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/fxstatat64.c: New file. + * sysdeps/unix/sysv/linux/renameat.c: New file. + * sysdeps/unix/sysv/linux/unlinkat.c: New file. + * sysdeps/unix/sysv/linux/alpha/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/i386/fchownat.c: New file. + * sysdeps/unix/sysv/linux/i386/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/m68k/fchownat.c: New file. + * sysdeps/unix/sysv/linux/m68k/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/powerpc/fchownat.c: New file. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/sh/fchownat.c: New file. + * sysdeps/unix/sysv/linux/sh/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: New file. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat64.c: New file. + * time/sys/time.h: Declare futimesat. + * include/fcntl.h: Declare __atfct_seterrno. + * sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): New function. + Split out from openat code and called. + (do_test): Allow openat to fail with ENOSYS. Handle AT_FDCWD. + * sysdeps/generic/openat.c: Handle AT_FDCWD. + * sysdeps/generic/openat64.c: Likewise. + * io/tst-unlinkat.c: New file. + * io/tst-fstatat.c: New file. + * io/tst-futimesat.c: New file. + * io/tst-renameat.c: New file. + * io/tst-fchownat.c: New file. + * io/tst-openat.c: Don't fail if openat is not implemented. + + * sysdeps/unix/sysv/linux/powerpc/chown.c: Don't provide backward + compatibility code if new kernel is guaranteed. + + * time/sys/time.h: Add a few nonnull attributes. + +2005-11-09 Ulrich Drepper + + * io/fcntl.h: Declare openat and openat64. + * io/Makefile (routines): Add openat and openat64. + (tests): Add tst-openat. + * io/Versions: Add openat and openat64 for GLIBC_2.4. + * sysdeps/generic/openat.c: New file. + * sysdeps/generic/openat64.c: New file. + * sysdeps/unix/sysv/linux/openat.c: New file. + * sysdeps/unix/sysv/linux/openat64.c: New file. + * io/tst-openat.c: New file. + + * sysdeps/generic/check_fds.c (check_one_fd): For writable + descriptors, use /dev/full. + (__libc_check_standard_fds): Reverse modes so that common operations on + the descriptors fail. + * sysdeps/unix/sysv/linux/device-nrs.h: Add info for /dev/full. + +2005-11-07 Kazuhiro Inaoka + + * elf/elf.h (R_M32R_REL32): New macro. + +2005-11-05 Marcus Brinkmann + + * sysdeps/mach/hurd/bits/stat.h (S_IMMAP0): New macro. + (S_ISPARE): Unset the S_IMMAP0 flag. + +2005-11-07 Roland McGrath + + * configure.in: Grok --with-cpu=CPU option. If given, search for + sysdeps/.../machine/CPU subdirs, and give error if none are found. + * configure: Regenerated. + * config.make.in (with-cpu): New substituted variable. + * Makeconfig (+cflags): Add -mcpu=$(with-cpu) if set. + + * malloc/malloc.c (munmap_chunk): Suppress warnings from last change. + + * sysdeps/unix/bsd/sun: Directory and all subdirectories removed, + saved in ports repository. + * sysdeps/unix/sysv/linux/tcflush.c: Rewritten. + * sysdeps/unix/sysv/linux/tcflow.c: Rewritten. + +2005-11-06 Ulrich Drepper + + * malloc/malloc.c (munmap_chunk): Add sanity checks. + + * sysdeps/pthread/configure: Fix comment. + +2005-11-05 Ulrich Drepper + + * configure.in: Remove gnu_as definition and everything using it. + * config.make.in: Remove gnu-as. + * config.h.in: Remove HAVE_GNU_AS. + + * configure.in: Remove gnu_ld definition and everything using it. + * config.h.in: Remove HAVE_GNU_LD. + * config.make.in: Remove gnu-ld. + * csu/Makefile: Remove use of gnu-ld. + * csu/munch.awk: Removed. + * csu/munch-tmpl.c: Removed. + * include/libc-symbols.h: Remove use of HAVE_GNU_LD. + * posix/execl.c: Likewise. + * posix/execv.c: Likewise. + * stdio-common/psignal.c: Likewise. + * stdlib/exit.c: Likewise. + * string/strsignal.c: Likewise. + * string/tester.c: Likewise. + * sysdeps/generic/errlist.c: Likewise. + * sysdeps/generic/getenv.c: Likewise. + * sysdeps/generic/getgroups.c: Likewise. + * sysdeps/generic/init-posix.c: Likewise. + * sysdeps/posix/gettimeofday.c: Likewise. + * sysdeps/posix/system.c: Likewise. + * sysdeps/unix/bsd/init-posix.c: Likewise. + * sysdeps/unix/bsd/ulimit.c: Likewise. + * sysdeps/unix/bsd/sun/m68k/brk.S: Likewise. + * sysdeps/unix/bsd/sun/m68k/sethostid.S: Likewise. + * sysdeps/unix/bsd/sun/sparc/sethostid.S: Likewise. + * sysdeps/unix/i386/brk.S: Likewise. + * sysdeps/unix/sparc/brk.S: Likewise. + + * configure.in: Remove test for support for subtracting local labels. + * config.h.in: Remove HAVE_SUBTRACT_LOCAL_LABELS. + * stdio-common/vfprintf.c: Remove test of + HAVE_SUBTRACT_LOCAL_LABELS. + + * configure.in: If init_array/fini_array support is not available, + bail out. + * config.h.in: Remove trace of optional init_array/fini_array support. + * config.make.in: Likewise. + * csu/elf-init.c: Likewise. + * dlfcn/dlfcn.c: Likewise. + * elf/soinit.c: Likewise. + * sysdeps/ia64/elf/initfinit.c: Likewise. + +2005-11-04 Roland McGrath + + * sysdeps/i386/configure.in (libc_mtune_example): Variable removed. + * sysdeps/i386/configure: Regenerated. + + [BZ #1089] + * configure.in: Change order of add-on sysdeps directories, + so they are interleaved with main sysdeps directories. + * configure: Regenerated. + +2005-11-03 Roland McGrath + + * NEWS: Synch with 2.3 branch updates. + +2005-11-03 Ulrich Drepper + + * sunrpc/svc.c (svc_getreq_poll): Fix inefficient loop test. + +2005-11-03 Roland McGrath + + [BZ #1548] + * sunrpc/svc.c (svc_getreqset): Use ffsl instead of ffs on fd_mask, + make sure constant is long. + From Jay Lan . + +2005-11-03 Ulrich Drepper + + [BZ #1774] + * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use simple + gethostbyname2 lookup if AI_V4MAPPED|AI_ALL is set. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Avoid alloca when possible + while looking for scope delimiter. + Some pretty printing. + +2005-10-31 Steven Munroe + + * sysdeps/powerpc/powerpc64/Makefile + (sysdep_routines, elide-routines.os): Add hp-timing. + * sysdeps/powerpc/powerpc64/hp-timing.c: New file. + * sysdeps/powerpc/powerpc64/hp-timing.h: New file. + * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: New file. + +2005-10-31 Ulrich Drepper + + * resolv/res_init.c (__res_iclose): New function. Broken out of + res_nclose. Take addition parameter which determines whether + addresses should be freed. + (res_nclose): Call __res_iclose. + (res_thread_freeres): Likewise. + * resolv/res_data.c (res_close): Call __res_iclose. + * resolv/res_libc.c (res_init): No need to separately free the + addresses. + (__res_maybe_init): Likewise. + * resolv/res_send.c: Use __res_iclose instead of res_nclose. + * resolv/Versions [GLIBC_PRIVATE]: Add __res_iclose. + * include/resolv.h: Declare __res_iclose. + Add libc_hidden_proto for __res_iclose. + * hesiod/hesiod.c (__hesiod_res_set): No need to free name server + addresses here again. + + [BZ #1579] + * debug/execinfo.h: Change backtrace_symbols_fd comment. + +2005-10-24 H.J. Lu + + * sysdeps/ia64/fpu/libm-symbols.h (WEAK_LIBM_ENTRY): Add "__" + prefix to LOCAL_LIBM_ENTRY. + (WEAK_LIBM_END): Add "__" prefix to LOCAL_LIBM_END. + +2005-10-26 Jakub Jelinek + + * elf/dl-conflict.c (_dl_resolve_conflicts): Use _dl_debug_printf + instead of _dl_printf to print conflict processing debug message. + Reported by John Reiser . + +2005-10-30 Ulrich Drepper + + * misc/hsearch_r.c (hsearch_r): Remove duplicate test. + Patch by Chris Caputo . + +2005-10-28 Kaz Kojima + + * sysdeps/unix/sh/sysdep.S: Remove unnecessary weak_alias. + * sysdeps/unix/sysv/linux/sh/socket.S: Honor NO_WEAK_ALIAS. + +2005-10-28 Thorsten Kukuk + + * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Fix off + by one error. + +2005-10-24 Roland McGrath + + [BZ #1534] + * include/string.h: Use libc_hidden_proto for strnlen, + not libc_hidden_builtin_proto. + +2005-10-23 Ulrich Drepper + + * rt/mqueue.h: Cleanups. + +2005-10-22 Roland McGrath + + [BZ #1254] + * sysdeps/mach/hurd/getpeername.c (__getpeername): Fix last change. + From Samuel Thibault . + +2005-10-17 Thomas Schwinge + + [BZ #1252] + * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Don't use ?: as lvalue. + * sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise. + +2005-10-20 Ulrich Drepper + + * iconvdata/ibm1364.h (__ucs4_to_ibm1364sb): Fix one mapping. + * iconvdata/ibm1388.h (__ucs4_to_ibm1388sb): Likewise. + * iconvdata/testdata/IBM1364: Add missing valid input. + * iconvdata/testdata/IBM1388: Likewise. + * iconvdata/testdata/IBM1364..UTF8: Adjust appropriately. + * iconvdata/testdata/IBM1388..UTF8: Likewise. + Patch by Masahide Washizawa . + +2005-08-23 GOTO Masanori + + [BZ #1498] + * sysdeps/alpha/remqu.S: Return the correct result when the same + dividend and divisor are provided, and they're negative numbers. + * sysdeps/alpha/divqu.S: Likewise. + +2005-10-18 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h (TESTS): + Define. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h (TESTS): + Likewise. + +2005-10-19 Ulrich Drepper + + * iconvdata/Makefile (modules): Add IBM1364, IBM1371, IBM1388, IBM1390, + and IBM1399. + (distribute): Add ibm1364.c, ibm1364.h, ibm1371.c, ibm1371.h, + ibm1388.c, ibm1388.h, ibm1390.c, ibm1390.h, ibm1399.c, and ibm1399.h. + * iconvdata/TESTS: Add entries for IBM1364, IBM1371, IBM1388, IBM1390, + and IBM1399. + * iconvdata/gconv-modules: Likewise. + * iconvdata/ibm1364.c: New file. + * iconvdata/ibm1364.h: New file. + * iconvdata/ibm1371.c: New file. + * iconvdata/ibm1371.h: New file. + * iconvdata/ibm1388.c: New file. + * iconvdata/ibm1388.h: New file. + * iconvdata/ibm1390.c: New file. + * iconvdata/ibm1390.h: New file. + * iconvdata/ibm1399.c: New file. + * iconvdata/ibm1399.h: New file. + * iconvdata/testdata/IBM1364: New file. + * iconvdata/testdata/IBM1364..UTF8: New file. + * iconvdata/testdata/IBM1371: New file. + * iconvdata/testdata/IBM1371..UTF8: New file. + * iconvdata/testdata/IBM1388: New file. + * iconvdata/testdata/IBM1388..UTF8: New file + * iconvdata/testdata/IBM1390: New file. + * iconvdata/testdata/IBM1390..UTF8: New file. + * iconvdata/testdata/IBM1399: New file. + * iconvdata/testdata/IBM1399..UTF8: New file. + Original patch by Masahide Washizawa . + +2005-10-17 Roland McGrath + + * elf/dl-load.c (MAP_COPY): When undefined, define to + MAP_PRIVATE|MAP_DENYWRITE instead of just MAP_PRIVATE. + (_dl_map_object_from_fd): Don't use MAP_DENYWRITE explicitly. + +2005-10-17 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h (SC_STSZ, TESTS): + Define. + * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h (SC_STSZ, TESTS): + Likewise. + +2005-10-17 Ulrich Drepper + + * libio/oldfileops.c (_IO_old_file_xsputn): Fix last patch. + Return EOF not 0. + + * sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Also + allow EACCES errors when opening /proc for now. + + * wctype/wcfuncs.c: Don't use expensive wide char lookups in isw* + functions if character is in ASCII range. + * wctype/wcfuncs_l.c: Likewise. + +2005-05-03 Robert Millan + + * abi-tags (.*-.*-knetbsd.*-gnu.*): New match, with ABI value 4. + * elf/cache.c (print_entry): Match the kNetBSD ABI tag. + +2005-10-16 Alfred M. Szmidt + + * sysdeps/generic/bits/mman.h + [__USE_GNU] (MREMAP_MAYMOVE, REMAP_FIXED): New macros. + +2005-10-16 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/makecontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Removed. + * sysdeps/unix/sysv/linux/sh/sh3/sys/ucontext.h: New file. + * sysdeps/unix/sysv/linux/sh/sh4/sys/ucontext.h: New file. + +2005-09-13 Jakub Jelinek + + [BZ #1228] + * include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Make sure these + are defined for -D_GNU_SOURCE or -D_ISOC99_SOURCE even when not + -std=c99. + +2005-10-16 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Define MREMAP_FIXED. + +2005-08-05 Alfred M. Szmidt + + [BZ #1252] + * sysdeps/mach/hurd/setitimer.c (restart_itimer): Move static fn + forward decl out of function body. + * sysdeps/mach/hurd/profil.c: Likewise. + +2005-10-16 Roland McGrath + + [BZ #1254] + * sysdeps/mach/hurd/getpeername.c (__getpeername): Respect *LEN + byte limit when setting ADDR->sa_family. + Reported by Samuel Thibault . + + [BZ #1253] + * sysdeps/mach/hurd/dl-sysdep.h + [SHARED] (DL_ARGV_NOT_RELRO): New macro. + + [BZ #1253] + * sysdeps/mach/hurd/i386/init-first.c (init): Make cast kosher. + (_hurd_stack_setup): Don't declare with arguments and ellipsis. + Use __builtin_frame_address and __builtin_return_address. + (_dl_init_first): Likewise. + + [BZ #1249] + * sysdeps/mach/hurd/i386/init-first.c (_cthread_init_routine): Declare + as weak extern. + (init): Check for it being undefined. + +2005-10-16 Daniel Jacobowitz + Roland McGrath + + * Makerules [module-names] (extra-modules-build): New variable. + ($(extra-modules-build:%=$(objpfx)%.so)): New static pattern rule. + Depend on libc.so and libc_nonshared.a. + * dlfcn/Makefile ($(test-modules)): Remove static pattern rule. + * elf/Makefile (modules-names-nobuild): New variable, add filtmod1. + ($(test-modules)): Remove static pattern rule. + +2005-10-15 Thomas Schwinge + + * include/dirent.h: Include . + * sysdeps/mach/hurd/fdopendir.c: Include . + (fdopendir): Correct argument to _hurd_fd_get(). + * sysdeps/mach/hurd/opendir.c (__opendir): Remove stray `}'. + +2005-08-20 Paul Eggert + + [BZ #1224] + * posix/regcomp.c (init_word_char, duplicate_node_closure, + fetch_token, peek_token_bracket, build_range_exp, + build_collating_symbol): Remove forward decls; no longer needed + now that we use prototypes. + +2005-10-15 Ulrich Drepper + + [BZ #1221] + * posix/regex_internal.h: Remove last traces of + RE_NO_INTERNAL_PROTOTYPES. + + [BZ #968] + * string/strxfrm_l.c (STRXFRM): Fix exit conditions of two loops. + + * sysdeps/unix/fdopendir.c (fdopendir): Make sure descriptor + allows reading. + + * wcsmbs/tst-mbrtowc2.c: Use de_DE.UTF-8 instead of en_US.UTF-8. + * wcsmbs/Makefile: Define tst-mbrtowc2-ENV. + + * posix/regexec.c: Finish prototyping of static functions. + * posix/regex_internal.c: Likewise. + +2005-10-14 Roland McGrath + + * sysdeps/mach/hurd/opendir.c (_hurd_fd_opendir): New function, broken + out of ... + (__opendir): ... here. Call it. + * sysdeps/mach/hurd/fdopendir.c: New file. + +2005-10-14 Ulrich Drepper + + [BZ #865] + * math/tgmath.h: Correctly determine result type for + __TGMATH_BINARY_REAL_ONLY, + __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY, + __TGMATH_TERNARY_REAL_ONLY, and __TGMATH_BINARY_REAL_IMAG. + +2005-09-17 Andreas Jaeger + + [BZ #865] + * math/test-tgmath-int.c: New file. + * math/Makefile (tests): Add test-tgmath-int. + +2005-10-14 Ulrich Drepper + + [BZ #804] + * malloc/tst-mtrace.sh: Work around for bootstraping. + + * locale/programs/ld-collate.c (collate_output): Fix counting of + elements. Don't limit table size. Use correct secondary hash + function. + * locale/localeinfo.h (LIMAGIC): Change value returned for LC_COLLATE. + * posix/fnmatch_loop.c: Adjust for changed secondary hash function. + * posix/regcomp.c: Likewise. + + * time/asctime.c (asctime_internal): Use __snprintf instead of + snprintf to avoid PLT entry. + + * sysdeps/unix/opendir.c (__opendir): Pass extra argument to + __alloc_dir. + (__alloc_dir): Only close descriptor on error if new parameter is true. + * sysdeps/unix/fdopendir.c (fdopendir): Pass extra argument to + __alloc_dir. Don't close fd on error. + * include/dirent.h (__alloc_dir): Adjust prototype. + + * stdlib/Makefile (tests): Add tst-ucontext-off. + * stdlib/tst-ucontext-off.c: New file. + * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h (TESTS): Define. + * sysdeps/unix/sysv/linux/i386/ucontext_i.h (TESTS): Likewise. + + [BZ #1468] + * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Fix values for + oFPREGS, oSIGMASK, oFPREGSMEM, and oMXCSR. + Patch by Nicholas Miell . + + [BZ #1460] + * time/asctime.c (asctime_internal): New function, derived from + asctime_r. Takes additional parameter which is the buffer length. + Use snprintf instead sprintf, if it overflows, fail. + (asctime_r): Call asctime_internal with 26 as buffer length. + (asctime): Call asctime_internal with length of internal buffer. + * time/Makefile (tests): Add bug-asctime_r. + * time/bug-asctime_r.c: New file. + + [BZ #1459] + * time/asctime.c (__asctime_r): Check for tm_year computation to + overflow and fail in this case. + * time/Makefile (tests): Add bug-asctime. + * time/bug-asctime.c: New file. + + [BZ #1458] + * sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MREMAP_FIXED. + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. + * misc/sys/mman.h: Add ellipsis after last parameter of mremap and + adjust leading comment. + * sysdeps/unix/sysv/linux/syscalls.list: Add pointer parameter to + mremap syscall. + * include/sys/mman.h (__mremap): Add ellipsis. + * malloc/memusage.c: Adjust mremap wrapper for optional additional + parameter. + +2005-10-13 Ulrich Drepper + + [BZ #1405] + * libio/iogetdelim.c (_IO_getdelim): Fix truncation of return + value. Avoid overflow in computation. + + [BZ #1373] + * argp/argp.h: Remove __NTH for __argp_usage inline function. + +2005-08-26 Paul Eggert + + [BZ #1248] + * posix/regex_internal.h (bitset_not, bitset_merge, bitset_not_merge, + bitset_mask, re_string_allocate, re_string_construct, + re_string_reconstruct, re_string_destruct, re_string_elem_size_at, + re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case, + re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1, + re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect, + re_node_set_init_union, re_node_set_merge, re_node_set_insert, + re_node_set_insert_last, re_node_set_compare, re_node_set_contains, + re_node_set_remove_at, re_dfa_add_node, re_acquire_state, + re_acquire_state_context): Remove unnecessary forward decls. + (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at): + Put __attribute at function definition, now that the function decl + has been removed. + * posix/regex_internal.c (re_string_peek_byte_case, + re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains): + Likewise. + +2005-08-23 Paul Eggert + + [BZ #1231] + * posix/regex_internal.c (re_string_skip_chars, register_state, + calc_state_hash): Remove forward decls. + * posix/regexec.c (acquire_init_state_context, check_halt_node_context, + proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes, + clean_state_log_if_needed): Likewise. + +2005-10-13 Ulrich Drepper + + * posix/regex.c: No need to use K&R definitions for static functions. + * posix/regex_internal.c: Likewise. + * posix/regcomp.c: Likewise. + + [BZ #1466] + * sysdeps/generic/s_csqrt.c (__csqrt): For zero real part, return + principal square root. + * sysdeps/generic/s_csqrtf.c (__csqrtf): Likewise. + * sysdeps/generic/s_csqrtl.c (__csqrtl): Likewise. + * math/libm-test.inc (csqrt_test): Add test for returning + principal value. + + * include/features.h: Define _POSIX_C_SOURCE to 200112 for + _XOPEN_SOURCE == 600. + +2005-10-12 Ulrich Drepper + + * malloc/malloc.c (_int_free): Fail if block size is obviously wrong. + + * include/malloc.h: Remove _int_new_arena prototype. + * malloc/arena.c (_int_new_arena): Move definition ahead of + arena_get2 and make static. + + Correctly implement M_MXFAST. + * malloc/malloc.c (struct malloc_state): Replace max_fast with flags + fields. + (global_max_fast): New variable. + (set_max_fast): Change to not require arena parameter and to modify + global_max_fast. Change all callers. + (get_max_fast): New macro. Use this instead of directly accessing + now removed max_fast arena member. + (have_fastchunks): Use flags instead of max_fast. + (clear_fastchunks): Likewise. + (set_fastchunks): Likewise. + (contiguous): Likewise. + (noncontiguous): Likewise. + (set_noncontiguous): Likewise. + (set_contiguous): Likewise. + (malloc_init_state): Explicitly set FASTCHUNKS_BIT. Call set_max_fast + only for main arena. + * malloc/hooks.c (public_sET_STATe): Adjust set_max_fast use. + +2005-10-10 Daniel Jacobowitz + + * sysdeps/generic/bits/byteswap.h (__bswap_constant_16): New macro. + (__bswap_16): Use it. + (__bswap_constant_32): New macro. + (__bswap_32): Use it. + +2005-10-10 Ulrich Drepper + + * malloc/arena.c (ptmalloc_unlock_all2): Reset atfork_recursive_cntr. + +2005-10-08 Jakub Jelinek + + * nss/getent.c (hosts_keys): Pass INADDRSZ as size rather + than IN6ADDRSZ to AF_INET gethostbyaddr. + +2005-10-07 Roland McGrath + + [BZ #1438] + * include/features.h: Make tests on _FORTIFY_SOURCE and __OPTIMIZE__ + friendly to -Wundef. + (__USE_FORTIFY_LEVEL): Always define it, to 0 if nothing else. + +2005-10-06 Ulrich Drepper + + * sysdeps/unix/sysv/linux/readonly-area.c: Allow fopen to fail because + the file does not exist. + +2005-10-05 Simon Josefsson + + [BZ #1423] + * crypt/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): New macros. + +2005-10-05 Roland McGrath + + * crypt/Makefile (distribute): Remove duplicate defn. + + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): + Use ARCH_PLTENTER_MEMBERS and ARCH_PLTEXIT_MEMBERS macros if defined. + * elf/tst-auditmod1.c: Include to define more + architecture-specific code. + * sysdeps/generic/tst-audit.h: New file. + * elf/Makefile (distribute): Add it. + +2005-10-05 Daniel Jacobowitz + + * elf/elf.h (R_ARM_TLS_DTPMOD32, R_ARM_TLS_DTPOFF32, + R_ARM_TLS_TPOFF32, R_ARM_TLS_GD32, R_ARM_TLS_LDM32, + R_ARM_TLS_LDO32, R_ARM_TLS_IE32, R_ARM_TLS_LE32): New macros. + +2005-10-03 Roland McGrath + + * sysdeps/powerpc/nofpu: Directory removed, saved in ports repository. + +2005-09-30 Ulrich Drepper + + * posix/regex.h: Pretty printing. + Clean up namespace a bit. + +2005-09-30 Jakub Jelinek + + * posix/regexec.c (update_cur_sifted_state, check_arrival, + check_arrival_add_next_nodes): Avoid using uninitialized variable. + + * malloc/memusage.c (dest): Fix a bunch of warnings on 32-bit arches. + + * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 4.0.x. + +2005-09-29 Ulrich Drepper + + * iconvdata/Makefile (modules): Add IBM803, IBM901, IBM902, IBM921, + IBM1008, IBM1008_420, IBM1097, IBM1112, IBM1123, IBM1130, IBM1140, + IBM1141, IBM1142, IBM1143, IBM1144, IBM1145, IBM1146, IBM1147, IBM1148, + IBM1149, IBM1166, IBM1167, IBM4517, IBM4899, IBM4909, IBM4971, + IBM5347, IBM9030, IBM9066, IBM9448, IBM12712, IBM16804. + (distribute): Add ibm803.c, ibm803.h, ibm901.c, ibm901.h, ibm902.c, + ibm902.h, ibm921.c, ibm921.h, ibm1008.c, ibm1008.h, ibm1008_420.c, + ibm1097.c, ibm1097.h, ibm1112.c, ibm1112.h, ibm1123.c, ibm1123.h, + ibm1130.c, ibm1130.h, ibm1140.c, ibm1140.h, ibm1141.c, ibm1141.h, + ibm1142.c, ibm1142.h, ibm1143.c, ibm1143.h, ibm1144.c, ibm1144.h, + ibm1145.c, ibm1145.h, ibm1146.c, ibm1146.h, ibm1147.c, ibm1147.h, + ibm1148.c, ibm1148.h, ibm1149.c, ibm1149.h, ibm1166.c, ibm1166.h, + ibm1167.c, ibm1167.h, ibm4517.c, ibm4517.h, ibm4899.c, ibm4899.h, + ibm4909.c, ibm4909.h, ibm4971.c, ibm4971.h, ibm5347.c, ibm5347.h, + ibm9030.c, ibm9030.h, ibm9066.c, ibm9066.h, ibm9448.c, ibm9448.h, + ibm12712.c, ibm12712.h, ibm16804.c, ibm16804.h. + * iconvdata/TESTS: Add entries for new modules. + * iconvdata/gconv-modules: Likewise. + * iconvdata/ibm803.c: New file. + * iconvdata/ibm803.h: New file. + * iconvdata/ibm901.c: New file. + * iconvdata/ibm901.h: New file. + * iconvdata/ibm902.c: New file. + * iconvdata/ibm902.h: New file. + * iconvdata/ibm921.c: New file. + * iconvdata/ibm921.h: New file. + * iconvdata/ibm1008.c: New file. + * iconvdata/ibm1008.h: New file. + * iconvdata/ibm1008_420.c: New file. + * iconvdata/ibm1097.c: New file. + * iconvdata/ibm1097.h: New file. + * iconvdata/ibm1112.c: New file. + * iconvdata/ibm1112.h: New file. + * iconvdata/ibm1123.c: New file. + * iconvdata/ibm1123.h: New file. + * iconvdata/ibm1130.c: New file. + * iconvdata/ibm1130.h: New file. + * iconvdata/ibm1140.c: New file. + * iconvdata/ibm1140.h: New file. + * iconvdata/ibm1141.c: New file. + * iconvdata/ibm1141.h: New file. + * iconvdata/ibm1142.c: New file. + * iconvdata/ibm1142.h: New file. + * iconvdata/ibm1143.c: New file. + * iconvdata/ibm1143.h: New file. + * iconvdata/ibm1144.c: New file. + * iconvdata/ibm1144.h: New file. + * iconvdata/ibm1145.c: New file. + * iconvdata/ibm1145.h: New file. + * iconvdata/ibm1146.c: New file. + * iconvdata/ibm1146.h: New file. + * iconvdata/ibm1147.c: New file. + * iconvdata/ibm1147.h: New file. + * iconvdata/ibm1148.c: New file. + * iconvdata/ibm1148.h: New file. + * iconvdata/ibm1149.c: New file. + * iconvdata/ibm1149.h: New file. + * iconvdata/ibm1166.c: New file. + * iconvdata/ibm1166.h: New file. + * iconvdata/ibm1167.c: New file. + * iconvdata/ibm1167.h: New file. + * iconvdata/ibm4517.c: New file. + * iconvdata/ibm4517.h: New file. + * iconvdata/ibm4899.c: New file. + * iconvdata/ibm4899.h: New file. + * iconvdata/ibm4909.c: New file. + * iconvdata/ibm4909.h: New file. + * iconvdata/ibm4971.c: New file. + * iconvdata/ibm4971.h: New file. + * iconvdata/ibm5347.c: New file. + * iconvdata/ibm5347.h: New file. + * iconvdata/ibm9030.c: New file. + * iconvdata/ibm9030.h: New file. + * iconvdata/ibm9066.c: New file. + * iconvdata/ibm9066.h: New file. + * iconvdata/ibm9448.c: New file. + * iconvdata/ibm9448.h: New file. + * iconvdata/ibm12712.c: New file. + * iconvdata/ibm12712.h: New file. + * iconvdata/ibm16804.c: New file. + * iconvdata/ibm16804.h: New file. + * iconvdata/testdata/IBM803: New file. + * iconvdata/testdata/IBM803..UTF8: New file. + * iconvdata/testdata/IBM901: New file. + * iconvdata/testdata/IBM901..UTF8: New file. + * iconvdata/testdata/IBM902: New file. + * iconvdata/testdata/IBM902..UTF8: New file. + * iconvdata/testdata/IBM921: New file. + * iconvdata/testdata/IBM921..UTF8: New file. + * iconvdata/testdata/IBM1008: New file. + * iconvdata/testdata/IBM1008..UTF8: New file. + * iconvdata/testdata/IBM1097: New file. + * iconvdata/testdata/IBM1097..UTF8: New file. + * iconvdata/testdata/IBM1112: New file. + * iconvdata/testdata/IBM1112..UTF8: New file. + * iconvdata/testdata/IBM1123: New file. + * iconvdata/testdata/IBM1123..UTF8: New file. + * iconvdata/testdata/IBM1130: New file. + * iconvdata/testdata/IBM1130..UTF8: New file. + * iconvdata/testdata/IBM1140: New file. + * iconvdata/testdata/IBM1140..UTF8: New file. + * iconvdata/testdata/IBM1141: New file. + * iconvdata/testdata/IBM1141..UTF8: New file. + * iconvdata/testdata/IBM1142: New file. + * iconvdata/testdata/IBM1142..UTF8: New file. + * iconvdata/testdata/IBM1143: New file. + * iconvdata/testdata/IBM1143..UTF8: New file. + * iconvdata/testdata/IBM1144: New file. + * iconvdata/testdata/IBM1144..UTF8: New file. + * iconvdata/testdata/IBM1145: New file. + * iconvdata/testdata/IBM1145..UTF8: New file. + * iconvdata/testdata/IBM1146: New file. + * iconvdata/testdata/IBM1146..UTF8: New file. + * iconvdata/testdata/IBM1147: New file. + * iconvdata/testdata/IBM1147..UTF8: New file. + * iconvdata/testdata/IBM1148: New file. + * iconvdata/testdata/IBM1148..UTF8: New file. + * iconvdata/testdata/IBM1149: New file. + * iconvdata/testdata/IBM1149..UTF8: New file. + * iconvdata/testdata/IBM1166: New file. + * iconvdata/testdata/IBM1166..UTF8: New file. + * iconvdata/testdata/IBM1167: New file. + * iconvdata/testdata/IBM1167..UTF8: New file. + * iconvdata/testdata/IBM4517: New file. + * iconvdata/testdata/IBM4517..UTF8: New file. + * iconvdata/testdata/IBM4899: New file. + * iconvdata/testdata/IBM4899..UTF8: New file. + * iconvdata/testdata/IBM4909: New file. + * iconvdata/testdata/IBM4909..UTF8: New file. + * iconvdata/testdata/IBM4971: New file. + * iconvdata/testdata/IBM4971..UTF8: New file. + * iconvdata/testdata/IBM5347: New file. + * iconvdata/testdata/IBM5347..UTF8: New file. + * iconvdata/testdata/IBM9030: New file. + * iconvdata/testdata/IBM9030..UTF8: New file. + * iconvdata/testdata/IBM9066: New file. + * iconvdata/testdata/IBM9066..UTF8: New file. + * iconvdata/testdata/IBM9448: New file. + * iconvdata/testdata/IBM9448..UTF8: New file. + * iconvdata/testdata/IBM12712: New file. + * iconvdata/testdata/IBM12712..UTF8: New file. + * iconvdata/testdata/IBM16804: New file. + * iconvdata/testdata/IBM16804..UTF8: New file. + Patch by Masahide WASHIZAWA . + + * iconvdata/run-iconv-test.sh: Run ASCII->encoding->ASCII suntzus + test only if $subset is N. + +2005-09-29 Roland McGrath + + [BZ #1392] + * posix/sys/wait.h [!__GNUC__ || __cplusplus] (__WAIT_INT): Use const. + +2005-09-29 Alfred M. Szmidt + + * elf/rtld.c [DL_ARGV_NOT_RELRO] (_dl_argc, _dl_skip_args): + Don't use attribute_relro. + +2005-09-29 Roland McGrath + + [BZ #1392] + * posix/sys/wait.h (__WAIT_INT): Rewrite using an initializer, + in case __typeof yields a const-qualified type. + +2005-09-28 Ulrich Drepper + + * dirent/dirent.h: Declare fdopendir. + * dirent/Versions: Export fdopendir for GLIBC_2.4. + * dirent/Makefile (routines): Add fdopendir. + (tests): Add tst-fdopendir. + * dirent/tst-fdopendir.c: New file. + * include/dirent.h: Declare __alloc_dir. + * sysdeps/generic/fdopendir.c: New file. + * sysdeps/unix/fdopendir.c: New file. + * sysdeps/unix/opendir.c: Split off back part of opendir into new + function __alloc_dir. + +2005-09-26 Steven Munroe + + [BZ #1384] + * sysdeps/powerpc/fpu/libm-test-ulps: Adjust expected y1, y1f, yn, + ynf results. + +2005-09-06 Paul Eggert + Ulrich Drepper + + [BZ #1302] + Change bitset word type from unsigned int to unsigned long int, + as this has better performance on typical 64-bit hosts. Change + bitset type name to bitset_t. + * posix/regcomp.c (build_equiv_class, build_charclass): + (build_range_exp, build_collating_symbol): + Prefer bitset_t to re_bitset_ptr_t in prototypes, when the actual + argument is a bitset. This is merely a style issue, but it makes + it clearer that an entire array is expected. + (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps, + lower_subexp): Adjust for new bitset_t definition. + (lower_subexp, parse_bracket_exp, built_charclass_op): Likewise. + * posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain, + bitset_not, bitset_merge, bitset_set_all, bitset_mask): Likewise. + * posix/regexec.c (check_dst_limits_calc_pos_1, + check_subexp_matching_top, build_trtable, group_nodes_into_DFAstates): + Likewise. + * posix/regcomp.c (utf8_sb_map): Don't assume initializer + == 0xffffffff. + * posix/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS. + All uses changed. + (BITSET_WORDS): Renamed from BITSET_UINTS. All uses changed. + (bitset_word_t): New type, replacing 'unsigned int' for bitset uses. + All uses changed. + (BITSET_WORD_MAX): New macro. + (bitset_set, bitset_clear, bitset_contain, bitset_empty, + (bitset_set_all, bitset_copy): Adjust for bitset_t change. + (bitset_empty, bitset_copy): + Prefer sizeof (bitset_t) to multiplying it out ourselves. + (bitset_not_merge): Remove; unused. + (bitset_contain): Return bool, not unsigned int with one bit on. + All callers changed. + * posix/regexec.c (build_trtable): Don't assume bitset_t has no + stricter alignment than re_node_set; do this by defining a new + internal type struct dests_alloc and using it to allocate memory. + +2005-09-27 Ulrich Drepper + + [BZ #1230] + * stdlib/strtod_l.c (STRNCASECMP): Always use C locale object. + (TOLOWER_C): Define. Use it when recognizing inf and nan. + * stdlib/Makefile (tests): Add bug-strtod2. + * stdlib/bug-strtod2.c: New file. + +2005-09-21 Ralf Wildenhues + + [BZ #1361] + * argp/argp-fmtstream.h [HAVE_CONFIG_H]: Do not #include . + * argp/argp-eexst.c, argp/argp-fmtstream.c, argp/argp-fs-xinl.c, + argp/argp-xinl.c: Fix up whitespace. + +2005-09-27 Ulrich Drepper + + [BZ #1158] + * stdlib/cxa_atexit.c (__new_exitfn): Rewrite to preserve order in + which the functions were registered. + * dlfcn/Makefile: Add rules to build and run bug-atexit1 and + bug-atexit2. + * dlfcn/bug-atexit1.c: New file. + * dlfcn/bug-atexit1-lib.c: New file. + * dlfcn/bug-atexit2.c: New file. + * dlfcn/bug-atexit2-lib.c: New file. + + [BZ #1078] + * libio/fileops.c (_IO_new_file_xsputn): Determine amount of + available space in non-line-buffered buffer correctly. + * libio/oldfileops.c (_IO_old_file_xsputn): Likewise. + * stdio-common/Makefile (tests): Add tst-fwrite. + * stdio-common/tst-fwrite.c: New file. + +2005-09-26 Ulrich Drepper + + [BZ #838] + * malloc/arena.c (ptmalloc_lock_all): If global lock already taken + by the same thread, just bump the counter. + (ptmalloc_unlock_all): If counter for recursive locks hasn't reached + zero, don't do anything else. + * malloc/Makefile (tests): Add tst-mallocfork. + * malloc/tst-mallocfork.c: New file. + + [BZ #808] + * malloc/malloc.c (_int_realloc): Make error message clearer. + + [BZ #713] + * libio/iofgets.c: Treat N==1 correctly. + * libio/iofgets_u.c: Likewise. + * libio/iofgetws.c: Likewise. + * libio/iofgetws_u.c: Likewise. + * stdio-common/Makefile (tests): Add tst-fgets. + * stdio-common/tst-fgets.c: New file. + +2005-01-11 Thorsten Kukuk + + [BZ #652] + * posix/getconf.c: Add new option -a to print the names of + the current system configuration variables to stdout. + Based on patch from Josh Aas . + +2005-09-26 Ulrich Drepper + + [BZ #644] + * sysdeps/posix/getaddrinfo.c (fls): New function. + (gaih_inet): Don't use ffs, use fls. Convert address to native byte + order first. + * posix/Makefile (tests): Add tst-rfc3484. + * posix/tst-rfc3484.c: New file. + + [BZ #627] + * libio/iofclose.c (_IO_new_fclose): Unlock the internal lock + before destroying it as part of the _IO_FINISH call. + * libio/oldiofclose.c (_IO_old_fclose): Likewise. + + [BZ #524] + * sysdeps/posix/getaddrinfo.c (match_prefix): Fix matching loop if + number of bits is multiple of 8. + Patch by Fredrik Tolf . + + [BZ #516] + * elf/dl-load.c: Report failed loading due to ELF class mismatch + with better words. + + [BZ #162] + * manual/llio.texi (Waiting for I/O): Correct description of read + conditions reported by select. + +2005-09-24 Jakub Jelinek + + * inet/getnetgrent_r.c (innetgr): Call endfct even if result != 0. + Return 1 only if result == 1. Patch by Benoit Capelle. + +2005-09-25 Ulrich Drepper + + [BZ #278] + * manual/stdio.texi (Hook Functions): Correct type of position + parameter of seeker and fix fallout of the change in the text. + + [BZ #714] + * iconv/loop.c [!STORE_REST] (SINGLE): Correctly record number of + left-over bytes and store them correctly. + * wcsmbs/tst-mbrtowc2.c: New file. + * wcsmbs/Makefile (tests): Add tst-mbrtowc2. + +2005-09-24 Roland McGrath + + * sysdeps/unix/sysv/i386/signal.S: Removed, saved in ports repository. + * sysdeps/unix/sysv/i386/sigreturn.S: Likewise. + +2005-09-24 Ulrich Drepper + + [BZ #545] + * locale/iso-639.def: More updates from the current spec. + + * locale/programs/ld-address.c (address_finish): Produce better + error messages for invalid lang_ab use. + + * locale/iso-639.def: Add a few updates from current spec. + +2005-09-23 Ulrich Drepper + + [BZ #704] + * locale/iso-4217.def: Replace MGF with MGA. + + * iconvdata/jis0208.c (__jisx0208_from_ucs4_lat1): Reduce size of + array. + * iconvdata/jis0208.h (ucs4_to_jisx0208): Adjust access. + +2004-08-13 GOTO Masanori + + [BZ #395] + * iconvdata/jis0208.c: Remove 0x005C mapping from + __jisx0208_from_ucs4_lat1. + Reported by Fumitoshi UKAI + +2005-09-23 Ulrich Drepper + + [BZ #394] + * libio/fmemopen.c (fmemopen_write): Return 0 instead of -1 if + nothing can be written. + * libio/iofopncook.c (_IO_cookie_write): If something went wrong, + set error bit. + +2005-09-22 Ulrich Drepper + + [BZ #281] + * posix/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *. + * posix/regcomp.c: Remove unnecessary uses of + unsigned RE_TRANSLATE_TYPE. + * posix/regex_internal.h: Likewise. + * posix/regex_internal.c: Likewise. + * posix/regexexec.c: Likewise. + Based on a patch by Stepan Kasal . + + [BZ #1035] + * locale/iso-4217.def: Replace TRL entry with TRY for new Turkish Lira. + + [BZ #1363] + * nscd/nscd_getpw_r.c (nscd_getpw_r): Remove incorrectly C&Ped + free call in code handling detection of GC runs. + +2005-09-22 Roland McGrath + + * elf/dl-tsd.c (__libc_dl_error_tsd): Use attribute_tls_model_ie for + static __thread variable. + From Alexandre Oliva + + * Makefile ($(objpfx)c++-types-check.out): Use $<, not $^, in command. + Reported by Alexandre Oliva . + +2005-09-20 Jakub Jelinek + + * nscd/dbg_log.c (init_logfile): Use fopen64 rather than fopen. + +2005-09-20 Roland McGrath + + * sysdeps/unix/sysv/linux/lddlibc4.c (main): Use execv, not execl. + + [BZ #1346] + * elf/dl-load.c (_dl_map_object_from_fd) [HAVE_Z_RELRO]: Do relro + magic on __stack_prot only if [SHARED]. Skip mprotect if __stack_prot + lies outside the page-rounded-down relro region. + +2005-09-19 Richard Henderson + + [BZ #1358] + * sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s) + to a temporary first. + (inline_syscall2, inline_syscall3, inline_syscall4): Likewise. + (inline_syscall5, inline_syscall6): Likewise. + + * sysdeps/alpha/ldiv.S (lldiv): Add alias. + +2005-09-17 Ulrich Drepper + + [BZ #1010] + * sysdeps/unix/sockatmark.c (sockatmark): Use SIOCATMARK correctly. + + [BZ #1053] + * debug/xtrace.sh: Add missing escape character in -? match. + Patch by Peter Breitenlohner . + + [BZ #1051] + * wctype/wctype.h: Remove stray __END_NAMESPACE_C99. + * stdlib/stdlib.h: Use __END_NAMESPACE_STD instead of + __END_NAMESPACE_C99 in one place. + * scripts/begin-end-check.pl: New file. + Patch by Ralph Loader . + * Makefile: Add rules to run scripts/begin-end-check.pl. + +2005-09-17 Andreas Jaeger + + * timezone/zdump.c: Include ctype.h. + +2005-09-16 Andreas Jaeger + + [BZ #1047] + * sysdeps/unix/sysv/linux/mips/getpagesize.c: New file. + +2005-09-16 Maciej W. Rozycki + + [BZ #933] + * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of + the syscall immediately before invocation. + * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise. + + * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use + macros to handle GP. + * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): + Likewise. Update inaccurate comments. + +2005-09-13 Ulrich Drepper + + * sysdeps/posix/spawni.c (__spawni): Automatically recognize some + more cases when we can use vfork. + +2005-08-29 Thomas Schwinge + + [BZ #1261] + * manual/memory.texi (Hooks for Malloc): Correct prototype of + my_init_hook and definition of my_free_hook. + +2005-09-12 Roland McGrath + + [BZ #1331] + * malloc/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed + macro argument. + Reported by Matej Vela . + +2005-09-12 Jakub Jelinek + + * malloc/malloc.c (struct malloc_chunk): Fix comment typo. + (public_cALLOc): For mmapped chunks and perturb_byte != 0, + don't clear SIZE_SZ bytes more than should be cleared. + +2005-09-09 Jakub Jelinek + + * inet/getnetgrent_r.c: Include assert. + (setup): Remove FUNC_NAME and ALL arguments, assume they are always + "setnetgrent" and 1. + (endnetgrent_hook): New function. + (internal_endnetgrent): Use it. + (__internal_setnetgrent_reuse): Use it. Adjust setup caller. + If status is NSS_STATUS_SUCCESS, yet action is continue, call + endnetgrent hook. + (internal_getnetgrent_r): Use __nss_lookup_function rather than + setup. Recompute getfct pointer after successful + __internal_setnetgrent_reuse. Don't use __nss_next. + (innetgr): Use __nss_lookup_function instead of __nss_lookup. + Adjust setup caller. + * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Always clear + data_size and cursor. Add libnss_files_hidden_proto and + libnss_files_hidden_def. + (_nss_files_setnetgrent): Call _nss_files_endnetgrent on failure. + * nis/nss_nis/nis-netgrp.c (internal_endnetgrent): Always clear + data_size and cursor. + (_nss_nis_setnetgrent): Don't call internal_endnetgrent. + (_nss_nis_getnetgrent_r): Remove result->cursor == NULL handling. + * nis/nss_nisplus/nisplus-netgrp.c (internal_endnetgrent): Always clear + data_size and position. + (_nss_nisplus_setnetgrent): Don't call internal_endnetgrent. + +2005-09-09 Ulrich Drepper + + * nss/getent.c (netgroup_keys): Call endnetgrent. + (main): Call mtrace. + + * nss/nss_files/files-netgrp.c (_nss_files_setnetgrent): We don't + need locking for the stream. Use feof_unlocked. + +2005-09-09 Jakub Jelinek + + [BZ #1318] + * locale/loadarchive.c (_nl_load_locale_from_archive): Free + normalized_codeset even if p was already normalized. + Reported by Jaroslav Snajdr . + +2005-09-08 Roland McGrath + + * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): Decode DSOCAPS + properly, first byte is bit number in mask. Skip disabled caps. + +2005-07-11 Derek R. Price + + [BZ #1061] + * sysdeps/generic/glob.c (glob): Only a 0 return from + getlogin_r means success, according to POSIX 1003.2. + +2005-06-23 Paul Eggert + + [BZ #1033] + * time/mktime.c: Import from gnulib. + The following macros are now consistent with other gnulib code. + This does not change mktime's behavior. + (TYPE_IS_INTEGER): New macro. + (time_t_is_integer): Use it. + (TYPE_TWOS_COMPLEMENT): New macro. + (twos_complement_arithmetic): Use it. + (TYPE_ONES_COMPLEMENT): New macro. + (TYPE_MINIMUM, TYPE_MAXIMUM): Now supports signed-magnitude. + mktime doesn't use this, but the code now matches other gnulib code. + (ranged_convert): Pacify GCC 4.0 in a different way, which + generates a few bytes less code. + (ranged_convert, __mktime_internal): When calling a function via a + pointer P, use P () rather than (*P) (), as we now assume C89 or + better. + +2005-09-07 Alexandre Oliva + + * timezone/test-tz.c: Update to match tzdata2005m. + * timezone/tst-timezone.c: Likewise. + +2005-09-07 Ulrich Drepper + + * posix/regexec.c (find_recover_state): Remove unnecessary + initialization. + (transit_state_bkref): Make DFA a const pointer. + (get_subexp): Likewise. + (check_arrival): Likewise. + (update_cur_sifted_state): Likewise. + (re_search_internal): Likewise. + (prune_impossible_nodes): Likewise. + (acquire_init_state_context): Likewise. + (proceed_next_node): Likewise. + (set_regs): Likewise. + (free_fail_stack_return): Likewise. + (check_arrival_expand_ecl): Mark DFA parameter as const. + (check_arrival_expand_ecl_sub): Likewise. + (check_subexp_limits): Likewise. + (sub_epsilon_src_nodes): Likewise. + (add_epsilon_src_nodes): Likewise. + (merge_state_array): Likewise. + (update_regs): Likewise. + (build_trtable): Likewise. + (sift_states_backward): Mark MCTX parameter as const. + (build_sifted_states): Likewise. + (update_cur_sifted_state): Likewise. + (sift_states_mkref): Likewise. + (check_arrival_expand_ecl): Mark eclosure as const. + (check_dst_limits_calc_pos_1): Likewise. + * posix/regex_internal.h (re_match_context_t): Make dfa a const + pointer. + +2005-09-06 Ulrich Drepper + + * timezone/africa: Update from tzdata2005m. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/zone.tab: Likewise. + * timezone/zdump.c: Update from tzcode2005m. + + * posix/regexec.c (merge_state_with_log): Define dfa as const pointer. + (transit_state_sb): Likewise. + (transit_state_mb): Likewise. + (sift_states_iter_mb): Likewise. + (check_arrival_add_next_nodes): Likewise. + (check_node_accept_bytes): Change first parameter to pointer-to-const. + [_LIBC] (re_search_2_stub): Use mempcpy. + + * posix/regex_internal.c (re_string_reconstruct): Avoid calling + mbrtowc for very simple UTF-8 case. + +2005-09-01 Paul Eggert + + * posix/regex_internal.c (build_wcs_upper_buffer): Fix portability + bugs in int versus size_t comparisons. + +2005-09-06 Ulrich Drepper + + * posix/regex_internal.c (re_acquire_state): Make DFA pointer arg + a pointer-to-const. + (re_acquire_state_context): Likewise. + * posix/regex_internal.h: Adjust prototypes. + +2005-08-31 Jim Meyering + + * posix/regcomp.c (search_duplicated_node): Make first pointer arg + a pointer-to-const. + * posix/regex_internal.c (create_ci_newstate, create_cd_newstate, + register_state): Likewise. + * posix/regexec.c (search_cur_bkref_entry, check_dst_limits): + (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos): + (group_nodes_into_DFAstates): Likewise. + +2005-08-31 Paul Eggert + + * posix/regexec.c (re_search_internal): Simplify update of + rm_so and rm_eo by replacing "if (A == B) A += C - B;" + with the equivalent of "if (A == B) A = C;". + +2005-09-06 Ulrich Drepper + + * posix/regcomp.c (re_compile_internal): Change third parameter type + to size_t. + (init_dfa): Likewise. Make sure that arithmetic on pat_len doesn't + overflow. + * posix/regex_internal.h (struct re_dfa_t): Change type of nodes_alloc + and nodes_len to size_t. + * posix/regex_internal.c (re_dfa_add_node): Use size_t as type for + new_nodes_alloc. Check for overflow. + +2005-08-31 Paul Eggert + + * posix/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char): + (optimize_subexps, lower_subexp): + Don't assume 1<<31 has defined behavior on hosts with 32-bit int, + since the signed shift might overflow. Use 1u<<31 instead. + * posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain): + Likewise. + * posix/regexec.c (check_dst_limits_calc_pos_1): Likewise. + (check_subexp_matching_top): Likewise. + * posix/regcomp.c (optimize_subexps, lower_subexp): + Use CHAR_BIT rather than 8, for clarity. + * posix/regexec.c (check_dst_limits_calc_pos_1): + (check_subexp_matching_top): Likewise. + * posix/regcomp.c (init_dfa): Make table_size unsigned, so that we + don't have to worry about portability issues when shifting it left. + Remove no-longer-needed test for table_size > 0. + * posix/regcomp.c (parse_sub_exp): Do not shift more bits than there + are in a word, as the resulting behavior is undefined. + * posix/regexec.c (check_dst_limits_calc_pos_1): Likewise; + in one case, a <= should have been an <, and in another case the + whole test was missing. + * posix/regex_internal.h (BYTE_BITS): Remove. All uses changed to + the standard name CHAR_BIT. + + * posix/regex_internal.h (re_sub_match_top_t): Remove unused member + next_last_offset. + (struct re_dfa_t): Remove unused member states_alloc. + * posix/regcomp.c (init_dfa): Don't initialize unused members. + +2005-08-25 Paul Eggert + + * posix/regexec.c (set_regs): Don't alloca with an unbounded size. + + alloca modernization/simplification for regex. + * posix/regex.c: Remove portability cruft for alloca. This no longer + needs to be at the start of the file, and can be moved into + regex_internal.h and simplified. + * posix/regex_internal.h: Include . + (__libc_use_alloca) [!defined _LIBC]: New macro. + * posix/regexec.c (build_trtable): Remove "#ifdef _LIBC", + since the code now works outside glibc. + +2005-09-06 Ulrich Drepper + + * include/regex.h: Remove use of _RE_ARGS. + +2005-08-25 Paul Eggert + + * posix/regexec.c (find_recover_state): Change "err" to "*err". + +2005-08-24 Paul Eggert + + * posix/regcomp.c (regerror): Pointer args are 'restrict', + as per POSIX. + * posix/regex.h (regerror): Likewise. + * manual/pattern.texi (POSIX Regexp Compilation): Likewise. + Similarly for regcomp and regexec. Also, first 2 args of regexec + and 2nd arg of regerror are const. + + * posix/regex.c: Do not include , as POSIX no longer + requires this. (The code never needed it.) + +2005-08-20 Paul Eggert + + * posix/regexec.c (sift_states_bkref): re_node_set_insert returns + int, not reg_errcode_t. + + * posix/regex_internal.c (calc_state_hash): Put 'inline' before type, + since some broken compilers warn about it otherwise. + + * posix/regcomp.c (create_initial_state): Remove duplicate decl. + +2005-08-20 Paul Eggert + + * posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume + C89 or better. All uses removed. + +2005-09-06 Ulrich Drepper + + * posix/regex.c: Prevent using C++ compilers. + +2005-08-19 Paul Eggert + + * posix/regcomp.c (duplicate_node): Return new index, not an error + code, and let the caller return REG_ESPACE if out of space. This + removes an uninitialied-variable warning with GCC 4.0.1, and also + avoids taking the address of a local variable. All callers + changed. + +2005-09-06 Ulrich Drepper + + * include/time.h (__strptime_internal): Rename parameter to avoid + bogus compiler warning. + +2005-08-19 Jim Meyering + + * posix/regexec.c (proceed_next_node): Redo local variables to + avoid GCC shadowing warnings. + +2005-09-06 Ulrich Drepper + + * posix/regex_internal.c (re_acquire_state): Minor code rearrangement. + (re_acquire_state_context): Likewise. + +2005-08-19 Paul Eggert + + * posix/regex_internal.c (re_string_realloc_buffers): + (re_node_set_insert, re_node_set_insert_last, re_dfa_add_node): + Rename local variables to avoid GCC shadowing warnings. + +2005-07-08 Eric Blake + Paul Eggert + + * posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not + wchar_t. Remove now-unnecessary cast. + (build_range_exp): Likewise. + +2005-08-31 Bob Wilson + + * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Remove the + exponent bias from the increment value for scaling by 2^60. + +2005-09-05 Alexandre Oliva + + * configure.in: Compile source test file with -fPIC for -shared. + +2005-09-04 Ulrich Drepper + + * iconv/skeleton.c: Eliminate DEFINE_DIRECTION_OBJECTS macro use, + it wasn't used. Remove use of from_object and to_object variable, + replace with some constants. Adjust users. + + * sysdeps/i386/bits/string.h: Removed. + + * stdio-common/Makefile (tests): Add tst-put-error. + * stdio-common/tst-put-error.c: New file. + * libio/fileops.c (_IO_new_file_xsputn): If overflow fails and no more + data would have to be written signal error. + * libio/oldfileops.c (_IO_old_file_xsputn): Likewise. + + * libio/fileops.c (_IO_new_file_overflow): Use NULL not 0. + +2005-09-02 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): No need to change + protection of memory used for the last segment. + +2005-08-22 Robert Millan + + * sysdeps/mach/hurd/nfs/nfs.h: Move to ... + * sysdeps/generic/nfs/nfs.h: ... here. + +2005-09-01 Ulrich Drepper + + * libio/stdio.h: Remove __wur from ungetc, sscanf, and vsscanf. + Add __wur to feof{,_unlocked}, ferror{,_unlocked}, + fileno{,_unlocked}, and popen. + +2005-08-30 Ulrich Drepper + + * sysdeps/ieee754/flt-32/e_hypotf.c [!__STDC__]: Fix function name. + +2005-08-01 Bob Wilson + Richard Sandiford + + * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Add missing + exponent bias to the value for 2^126. + +2005-08-30 Jakub Jelinek + Alan Modra + + * elf/dl-addr.c (_dl_addr): Use DL_ADDR_SYM_MATCH macro. + * sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): Define. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h: New file. + +2005-08-23 Ulrich Drepper + + * nscd/nscd.c (main): Use error while process isn't running in the + background, not dbg_log. + * nscd/nscd_conf.c (nscd_parse_file): Likewise. + Mark messages with _(). Unify testing for database name. + + * nscd/connection.c (DEFAULT_DATASIZE_PER_BUCKET): Move to nscd.h. + (dbs): Initialize max_db_size fields. + (nscd_init): When mapping the database, use max_db_size as the + mapping size even if it is bigger than the file size. + * nscd/mem.c (mempool_alloc): When resizing the file make sure the + limit in max_db_size is not exceeded. Don't use mremap, just + posix_fallocate is enough (according to Linus). Use posix_fallocate + correctly. + * nscd/nscd.conf: Add max-db-size parameters. + * nscd/nscd.h (struct database_dyn): Add max_db_size field. + Define DEFAULT_MAX_DB_SIZE and DEFAULT_DATASIZE_PER_BUCKET. + Temporarily define TEMP_FAILURE_RETRY_VAL here. + * nscd/nscd_conf.c (nscd_parse_file): Parse max-db-size parameter + and add sanity checks for it. + + * nscd/aicache.c (addhstaiX): Use send with MSG_NOSIGNAL not write to + send reply. + * nscd/connection.c (writeall): Likewise. + (handle_request): Likewise. + * nscd/grpcache.c (cache_addgr): Likewise. + * nscd/hstcache.c (cache_addhst): Likewise. + * nscd/initgrcache.c (addinitgroupsX): Likewise. + * nscd/nscd.c (parse_opt): Likewise. + * nscd/nscd_stat.c (send_stats): Likewise. + (receive_print_stats): Likewise. + * nscd/pwdcache.c (cache_addpw): Likewise. + + * sysdeps/unix/sysv/linux/Versions: Export inotify_* syscalls. + +2005-08-22 Jakub Jelinek + + * stdlib/bits/stdlib.h (mbstowcs): Divide __bos (__dst) by + sizeof (wchar_t) rather than multiplying __len by sizeof (wchar_t). + Pass __bos (__dst) / sizeof (wchar_t) to the *_chk routine. + * wcsmbs/bits/wchar2.h (mbsrtowcs, mbsnrtowcs): Likewise. + * debug/mbsnrtowcs_chk.c (__mbsnrtowcs_chk): Don't multiply + len by sizeof (wchar_t). + * debug/mbsrtowcs_chk.c (__mbsrtowcs_chk): Likewise. + * debug/mbstowcs_chk.c (__mbstowcs_chk): Likewise. + Fix type of SRC argument. Pass &SRC rather than SRC to + __mbsrtowcs. + * debug/wcstombs_chk.c (__wcstombs_chk): Pass &SRC rather than SRC + to __wcsrtombs. + * debug/tst-chk1.c: Include assert.h. + (do_test): Change enough array from VLA into a fixed size array. + Assert that MB_CUR_MAX is <= sizeof (enough). Use FAIL () macro + instead of print error details. Add several new tests. + Kill some unused variable warnings. + +2005-08-21 Ulrich Drepper + + * resolv/res_send.c (Aerror): Fix printing IP address. + + * resolv/res_send.c (send_vc): Pass correct sockaddr size to connect. + +2005-08-19 H.J. Lu + + * sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't abort. + +2005-08-17 Robert Love + + * sysdeps/unix/sysv/linux/sys/inotify.h: Add IN_MOVE_SELF event. + +2005-08-19 Bruno Haible + + * intl/localealias.c (read_alias_file): In case of failure, close the + file descriptor and sort the array before returning. + +2005-08-19 Ulrich Drepper + + * malloc/Makefile: Link libmemusage.so with ld.so. + * malloc/memusage.c: Use atomic operations for all counter and size + computations. Handle thread stacks. + * sysdeps/generic/memusage.h: Define memusage_cntr_t and + memusage_size_t. + * sysdeps/i386/i686/memusage.h: New file. + * include/atomic.h: Define atomic_max and atomic_min. + + * debug/tst-chk1.c: Add tests for mbstowcs and wcstombs. + +2005-08-17 Paul Eggert + + [BZ #1207] + * posix/regex.h: Remove spurious space-before-tab. From gnulib. + +2005-08-16 Ulrich Drepper + + * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add + sys/inotify.h. + * sysdeps/unix/sysv/linux/sys/inotify.h: New file. + * sysdeps/unix/sysv/linux/syscalls.list: Add inotify syscalls. + + * nscd/cache.c (prune_cache): Add more debug output. Only for + debug level 3 and higher and very verbose. + + * nscd/cache.c (prune_cache): Use stat64 not stat. + * nscd/connections.c (nscd_init): Likewise. + +2005-08-10 Sergio Gelato + + [BZ #1188] + * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check + from (len > 0) to (len >= 0). + +2005-08-16 Ulrich Drepper + + * nis/nis_xdr.c (_xdr_nis_result): Fix type of res variable. + Reported by Thomas Schwinge. + +2005-08-15 Jakub Jelinek + + * nis/nis_subr.c (nis_leaf_of_r): Handle buflen == 0 correctly. + +2005-08-16 Ulrich Drepper + + * nss/getent.c (more_help): Use open_memstream instead of handling + memory allocation ourselves. + +2005-08-16 Jay Fenlason + + * nss/getent.c (parse_options): change the -s option to support + {database}:{search} to override /etc/resolv.conf for only the + specified database. + +2005-08-08 Ulrich Drepper + + * nscd/connections.c (main_loop_epoll): Pass NULL as event + argument for epoll_ctl(EPOLL_CTL_DEL) calls. + + * nscd/nscd_stat.c (receive_print_stats): Really print values of + thread number, paranoia, and restart interval the server is using. + + * argp/argp-help.c: Use _IO_vasprintf instead of vasprintf. + * include/stdio.h: Add libc_hidden_proto for __vfprintf_chk. + * debug/vfprintf_chk.c: Add libc_hidden_def. + +2005-08-08 Roland McGrath + + * argp/argp-help.c (__argp_error): __asprintf -> vasprintf. + (__argp_failure): Likewise. + +2005-08-08 Ulrich Drepper + + * nscd/cache.c (cache_add): Commit hash table and header to disk. + + * nscd/mem.c (mempool_alloc): Use posix_fallocate instead of ftruncate. + * nscd/connections.c (nscd_init): Likewise. + +2005-08-08 Jakub Jelinek + + * stdio-common/fxprintf.c: Include libioP.h. + + * posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname, + getdomainname): Add __NTH. + * stdlib/bits/stdlib.h (ptsname_r, wctomb, mbstowcs, wcstombs): + Likewise. + (realpath): Likewise. Use __const instead of const. Add __restrict + keywords. + * socket/bits/socket2.h (recvfrom): Add __restrict keyword to __buf. + * wcsmbs/bits/wchar2.h (wmemcpy, wmemmove, wmempcpy, wmemset, + wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, vswprintf, wcrtomb, + mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Add __NTH. + * string/bits/string3.h (__memset_ichk): Likewise. + (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __strcpy_ichk, + __stpcpy_ichk, __strncpy_ichk, stpncpy, __strcat_ichk, + __strncat_ichk): Likewise. Use __const instead of const. + (__stpncpy_chk): Use __const instead of const. + (__stpncpy_alias): Use __REDIRECT_NTH instead of __REDIRECT. + +2005-08-08 Ulrich Drepper + Jakub Jelinek + + * nscd/mem.c (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): Move + definitions to... + * nscd/nscd.h (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): ...here. + * nscd/connections.c (usekey): New enum. + (check_use, verify_persistent_db): New functions. + (nscd_init): If persistent database is corrupted, unlink it and + recreate rather than falling back to non-persistent database. + Call verify_persistent_db. Avoid overflows in total computation. + +2005-08-08 Ulrich Drepper + + * iconvdata/utf-16.c (PREPARE_LOOP): Minor cleanups to make code + better readable. Avoid passing var to loop function, it's not + necessary at all. + +2005-08-07 Ulrich Drepper + + * elf/elf.h (DT_ALPHA_PLTRO): Use symbolic name in DT_ALPHA_PLTRO + definition. + +2005-08-05 Ulrich Drepper + + * timezone/checktab.awk: Update from tzcode2005k. + * timezone/private.h: Likewise. + * timezone/scheck.c: Likewise. + * timezone/tzselect.ksh: Likewise. + * timezone/zdump.c: Likewise. + * timezone/zic.c: Likewise. + * timezone/africa: Update from tzdata2005k. + * timezone/antarctica: Likewise. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/europe: Likewise. + * timezone/iso3166.tab: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/solar87: Likewise. + * timezone/solar88: Likewise. + * timezone/solar89: Likewise. + * timezone/southamerica: Likewise. + * timezone/zone.tab: Likewise. + +2005-08-05 Roland McGrath + + [BZ #1251] + * mach/shortcut.awk: Ignore `weak_alias' lines. + Reported by Alfred M. Szmidt . + + [BZ #1250] + * sysdeps/mach/hurd/mig-reply.c (reply_port): Don't use ?: as lvalue. + Reported by Alfred M. Szmidt . + +2005-08-03 Dwayne Grant McConnell + + * sysdeps/powerpc/powerpc32/Makefile (CFLAGS-initfini.s): + Use +=, not =, to append. Remove duplicate flags. + * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-initfini.s): + Likewise. Fix comments. + +2005-08-01 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Restart system + call if it returned EINTR. + +2005-07-31 Ulrich Drepper + + * sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Move + helper variable into .data.rel.ro. Simplify the code. Extend + comment to explain prelinking. + +2005-07-31 Andreas Jaeger + + * include/bits/syslog.h: New file. + +2005-07-30 Ulrich Drepper + + * elf/dl-load.c [__WORDSIZE==64] (FILEBUF_SIZE): Adjust the value + up. We have more program header entries now and the note section + was normally not loaded. + + * nis/nis_subr.c: Some minor code cleanups. + +2005-07-29 Ulrich Drepper + + * misc/bits/syslog.h: New file. + * misc/sys/syslog.h: Include for fortification. + * misc/Makefile (headers): Add bits/syslog.h. + * include/sys/syslog.h: Add __vsyslog_chk prototype and hidden_proto. + * sysdeps/generic/syslog.c: Change vsyslog function to __vsyslog_chk. + Call __vfprintf_chk if necessary. Make vsyslog a wrapper. Add + __syslog_chk. + * misc/Versions: Export __syslog_chk and __vsyslog_chk. + +2005-07-28 Thomas Schwinge + + [BZ #1137] + * misc/error.c [_LIBC]: Include and . + +2005-07-28 Ulrich Drepper + + * nis/nis_xdr.c: Help gcc to avoid generating unnecessary wrapper + functions. + +2005-07-28 Jakub Jelinek + + * stdio-common/fxprintf.c (__fxprintf): Add INTUSE to _IO_vfprintf + call. + * gmon/gmon.c (write_gmon): Use __snprintf rather than snprintf. + +2005-07-28 Ulrich Drepper + + * nis/nis_file.c: Rewrite the two pairs of functions into wrappers + around a pair of new, generalized functions. 22% size reduction. + +2005-07-27 Ulrich Drepper + + * nis/nis_xdr.c: Remove unnecessary cast which might hide bugs. + Rearrange code. This reduces the code size 10%. + +2005-07-26 Jakub Jelinek + + * misc/error.c (error_tail): Fix a comment typo. + +2005-07-25 Ulrich Drepper + + * po/zh_TW.po: Update from translation team. + + * debug/mbstowcs_chk.c: New file. + * debug/wcstombs_chk.c: New file. + * debug/Makefile (routines): Add mbstowcs_chk and wcstombs_chk. + * debug/Versions: Add __mbstowcs_chk and __wcstombs_chk. + * stdlib/bits/stdlib.h: Add definitions for mbstowcs and wcstombs. + + * wcsmbs/bits/wchar2.h (mbsrtowcs): Pretty printing. + +2005-07-24 Ulrich Drepper + + * string/test-memset.c (test_main): Use negative byte value in + test. + + * string/test-memset.c (do_one_test): Compare effect of call, not + only return value. + Add a few casts to avoid warnings. + +2005-07-24 SUGIOKA Toshinobu + + * sysdeps/sh/memset.S (memset): Correct 2nd argument handling. + +2005-07-24 Ulrich Drepper + + [BZ #1125] + * posix/Makefile (tests): Add tst-execvp4. + * posix/tst-execvp4.c: New file. + +2005-07-24 Jakub Jelinek + + [BZ #1125] + * posix/execvp.c (execvp): Change path_malloc to + char *, free that pointer on failure. + +2005-07-24 Ulrich Drepper + + * wcsmbs/bits/wchar2.h: Use __FILE not FILE. + * wcsmbs/Makefile: Add rules to build and run tst-wchar-h. + * wcsmbs/tst-wchar-h.c: New file. + +2005-07-22 Ulrich Drepper + + * stdio-common/fxprintf.c (__fxprintf): Define variable more local. + +2005-07-22 Jakub Jelinek + + * wcsmbs/bits/wchar2.h (__vfwprintf_chk, __vwprintf_chk): Use + __gnuc_va_list rather than _G_va_list. + +2005-07-22 Roland McGrath + + [BZ #869] + * Makerules ($(objpfx)stubs): Fix last change. + +2005-07-21 Roland McGrath + + * nscd/Makefile ($(objpfx)nscd): Pass $(nscd-cflags) to $(LINK.o). + + * stdlib/Makefile (headers): Move bits/wchar.h to ... + * wcsmbs/Makefile (headers): ... here. Add bits/wchar2.h too. + +2005-07-21 Jakub Jelinek + + * wcsmbs/bits/wchar2.h (swprintf): Remove format argument. + * debug/tst-chk1.c (do_test): Add test for swprintf with format + being the last argument. + +2005-07-21 Thorsten Kukuk + + * debug/getgroups_chk.c (__getgroups_chk): Fix return value. + + * stdio-common/fxprintf.c: Include string.h. + +2005-07-20 Ulrich Drepper + + [BZ #1138] + * sysdeps/x86_64/fpu/libm-test-ulps: Adjust expected atan2f results. + * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + +2005-07-20 Bob Wilson + Darin Petkov + + [BZ #1138] + * sysdeps/ieee754/flt-32/e_atan2f.c (pi_lo): Correct exponent value. + +2005-07-20 Jakub Jelinek + + * include/stdio.h (__fxprintf): Remove wfmt argument. + * stdio-common/fxprintf.c: Include assert.h, ctype.h and wchar.h. + (__fxprintf): Remove wfmt argument, create wfmt format string on + the fly from fmt. + * argp/argp-fmtstream.c: Adjust all __fxprintf callers. + * argp/argp-help.c: Likewise. + * assert/assert-perr.c: Likewise. + * assert/assert.c: Likewise. + * gmon/gmon.c: Likewise. + * inet/rcmd.c: Likewise. + * malloc/obstack.c: Likewise. + * misc/error.c: Likewise. + * misc/getpass.c: Likewise. + * posix/getopt.c: Likewise. + * resolv/res_hconf.c: Likewise. + * stdio-common/perror.c: Likewise. + * stdio-common/psignal.c: Likewise. + * stdlib/fmtmsg.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/xdr.c: Likewise. + * sunrpc/xdr_array.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sysdeps/generic/wordexp.c: Likewise. + +2005-07-20 Ulrich Drepper + + * wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs, + wcsrtombs, mbsnrtowcs, and wcsnrtombs. + * debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk, + wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk. + * debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk, + __wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk. + * debug/tst-chk1.c: Add tests for new functions. + * debug/mbsnrtowcs_chk.c: New file. + * debug/mbsrtowcs_chk.c: New file. + * debug/wcrtomb_chk.c: New file. + * debug/wcsnrtombs_chk.c: New file. + * debug/wcsrtombs_chk.c: New file. + +2005-07-19 Ulrich Drepper + + * stdio-common/Makefile (aux): Add fxprintf. + * stdio-common/fxprintf.c: New file. + * include/stdio.h: Add declaration for __fxprintf. + * argp/argp-fmtstream.c: Use __fxprintf instead of inline stream + orientation test and two separate function calls. + * argp/argp-help.c: Likewise. + * assert/assert-perr.c: Likewise. + * assert/assert.c: Likewise. + * gmon/gmon.c: Likewise. + * inet/rcmd.c: Likewise. + * malloc/obstack.c: Likewise. + * misc/error.c: Likewise. + * misc/getpass.c: Likewise. + * posix/getopt.c: Likewise. + * resolv/res_hconf.c: Likewise. + * stdio-common/perror.c: Likewise. + * stdio-common/psignal.c: Likewise. + * stdlib/fmtmsg.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/xdr.c: Likewise. + * sunrpc/xdr_array.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sysdeps/generic/wordexp.c: Likewise. + + [BZ #1137] + * misc/Makefile: Add rules to build and run tst-error1. + * misc/tst-error1.c: New file. + * misc/error.c: Fix memory leak and possibly endless loop. + + * configure.in: Check for -fstack-protector gcc option. + * config.make.in (have-ssp): Add template. + * nscd/Makefile (nscd-cflags): Add -fstack-protector if supported. + + * nscd/nscd.c (main): Don't ignore result of chdir call. + +2005-07-18 Roland McGrath + + [BZ #869] + * Makerules ($(objpfx)stubs): Do cd into $(objdir) to reduce size of + objdump command line. + +2005-07-18 Ulrich Drepper + + * nscd/Makefile (nscd-cflags): Add _FORTIFY_SOURCE. + + * nscd/connections.c: Fix a few wur warnings. + + [BZ #1113] + * nscd/grpcache.c (cache_addgr): Use correct maximum for group ID + length. Patch by Ivan Gyurdiev . + + * debug/confstr_chk.c: New file. + * debug/getdomainname_chk.c: New file. + * debug/getgroups_chk.c: New file. + * debug/gethostname_chk.c: New file. + * debug/getlogin_r_chk.c: New file. + * debug/ttyname_r_chk.c: New file. + * posix/bits/unistd.h: Add definitions for new debug versions. + * debug/tst-chk1.c: Add tests for new functions. + * debug/Versions: Export new functions. + * debug/Makefile (routines): Add new files. + + * stdlib/bits/stdlib.h: Fix typo. + +2005-07-13 Thorsten Kukuk + + * manual/Makefile (libc/index.html): Depend on dir-add.texi. + +2005-07-15 Ulrich Drepper + + * stdlib/bits/stdlib.h: Use __REDIRECT_NTH instead of __REDIRECT + where necessary. + * wcsmbs/bits/wchar2.h: Likewise. + +2005-07-15 Andreas Jaeger + + * debug/Makefile (tst-lfschk3-ENV): New, set locale. + (tst-lfschk2-ENV): New. + (tst-lfschk1-ENV): New. + (tst-chk3-ENV): New. + (tst-chk2-ENV): New. + (tst-chk1-ENV): New. + + [BZ #1079] + * include/stdlib.h: Remove malloc attribute from __posix_memalign. + * stdlib/stdlib.h: Likewise. + +2005-07-15 Ulrich Drepper + + * wcsmbs/bits/wchar2.h: New file. + * include/bits/wchar2.h: New file. + * wcsmbs/wchar.h: Include if fortification is + requested. + * wcsmbs/wcsncpy.c: Add __wcsncpy alias. + * string/bits/string3.h: Add fortified stpncpy definitions. + * sysdeps/generic/stpncpy_chk.c: New file. + * libio/vswprintf.c: Move _IO_wstrnfile definition to strfile.h. + Export _IO_wstrn_jumps. + * libio/strfile.h: Define _IO_wstrnfile and declare _IO_wstrn_jumps. + * include/wchar.h: Declare __wcsncpy and __vswprintf_chk. + * debug/fgetws_chk.c: New file. + * debug/fgetws_u_chk.c: New file. + * debug/fwprintf_chk.c: New file. + * debug/swprintf_chk.c: New file. + * debug/vfwprintf_chk.c: New file. + * debug/vswprintf_chk.c: New file. + * debug/vwprintf_chk.c: New file. + * debug/wcpcpy_chk.c: New file. + * debug/wcpncpy_chk.c: New file. + * debug/wcscat_chk.c: New file. + * debug/wcscpy_chk.c: New file. + * debug/wcsncat_chk.c: New file. + * debug/wcsncpy_chk.c: New file. + * debug/wmemcpy_chk.c: New file. + * debug/wmemmove_chk.c: New file. + * debug/wmempcpy_chk.c: New file. + * debug/wmemset_chk.c: New file. + * debug/wprintf_chk.c: New file. + * debug/tst-chk1.c: Add tests for new functions. + * debug/Versions: Export new functions. + * debug/Makefile (routines): Add new functions. + +2005-07-13 Ulrich Drepper + + * nscd/nscd_helper.c: Add a few __builtin_expect. + + [BZ #1080] + * nscd/connections.c (send_ro_fd): Make sure BUF is aligned correctly. + * nscd/nscd_helper.c (wait_on_socket): New function. + (get_mapping): Use wait_on_socket instead of poll. The former handles + EINTR of poll correctly. + (__nscd_open_socket): Likewise. + (get_mapping): Make sure BUF is aligned correctly. + (get_mapping): Use munmap on correct pointer. + +2005-07-12 Ulrich Drepper + + * include/libc-symbols.h: Define macros for librt hidden symbols. + * include/time.h: Add librt_hidden_proto definition for clock_gettime. + * sysdeps/generic/clock_gettime.c: Add librt_hidden_def. + * sysdeps/unix/clock_gettime.c: Likewise. + + * stdlib/bits/stdlib.h: New file. + * stdlib/stdlib.h: Include if fortification is + requested. + * Makefile (headers): Add bits/stdlib.h. + * include/bits/stdlib.h: New file. + * debug/Depend: New file. + * debug/ptsname_r_chk.c: New file. + * debug/realpath_chk.c: New file. + * debug/wctomb_chk.c: New file. + * debug/Makefile (routines): Add ptsname_r_chk, realpath_chk, and + wctomb_chk. + * debug/Versions: Export __ptsname_r_chk, __realpath_chk, and + __wctomb_chk. + * debug/tst-chk1.c: Add tests for __ptsname_r_chk, __realpath_chk, and + __wctomb_chk. + +2005-07-12 Jakub Jelinek + + [BZ #1106] + * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: Include not-cancel.h. + (has_cpuclock): Use open_not_cancel_2 instead of open, read_not_cancel + instead of read and close_not_cancel_no_status instead of close. + + [BZ #1106] + * sysdeps/s390/s390-64/bcopy.S (__bcopy): Use + HIDDEN_BUILTIN_JUMPTARGET to jump to memmove. + +2005-06-27 Carlos O'Donell + + * posix/regcomp.c (re_compile_internal): Call __libc_lock_init + after init_dfa. + +2005-07-08 Ulrich Drepper + + * sysdeps/x86_64/fpu/s_sincosl.S: Use retq not ret. Remove + alignment. + * sysdeps/x86_64/fpu/s_sincos.S: New file. + + * include/fenv.h: Add libm_hidden_proto for fesetround and + feholdexcept. + * sysdeps/alpha/fpu/feholdexcpt.c: Add libm_hidden_def. + * sysdeps/alpha/fpu/fesetround.c: Likewise. + * sysdeps/generic/feholdexcpt.c: Likewise. + * sysdeps/generic/fesetround.c: Likewise. + * sysdeps/i386/fpu/feholdexcpt.c: Likewise. + * sysdeps/i386/fpu/fesetround.c: Likewise. + * sysdeps/ia64/fpu/feholdexcpt.c: Likewise. + * sysdeps/ia64/fpu/fesetround.c: Likewise. + * sysdeps/powerpc/fpu/feholdexcpt.c: Likewise. + * sysdeps/powerpc/fpu/fesetround.c: Likewise. + * sysdeps/s390/fpu/feholdexcpt.c: Likewise. + * sysdeps/s390/fpu/fesetround.c: Likewise. + * sysdeps/sh/sh4/fpu/feholdexcpt.c: Likewise. + * sysdeps/sh/sh4/fpu/fesetround.c: Likewise. + * sysdeps/sparc/fpu/feholdexcpt.c: Likewise. + * sysdeps/sparc/fpu/fesetround.c: Likewise. + * sysdeps/x86_64/fpu/feholdexcpt.c: Likewise. + * sysdeps/x86_64/fpu/fesetround.c: Likewise. + * sysdeps/generic/s_significand.c (__significand): Use __ilogb not + ilogb. + * sysdeps/generic/s_significandf.c (__significandf): Use __ilogbf + not ilogbf. + * sysdeps/ieee754/dbl-64/s_sincos.c (__sincos): Use __sin and + __cos, not sin and cos. + +2005-07-07 Ulrich Drepper + + * resolv/res_send.c (send_dg): Recognize referral results and + treat them as server errors. + Based on a patch by Jason Vas Dias . + +2005-07-08 Carlos O'Donell + + * sysdeps/hppa/setjmp.S (__sigsetjmp): Use %r1 not %r19. + + * sysdeps/hppa/add_n.s (__mpn_add_n): Use sr0 or r0, not 0. + * sysdeps/hppa/lshift.s (__mpn_lshift): Likewise. + * sysdeps/hppa/rshift.s (__mpn_rshift): Likewise. + * sysdeps/hppa/sub_n.s (__mpn_sub_n): Likewise. + * sysdeps/hppa/udiv_qrnnd.s (__udiv_qrnnd): Likewise. + * sysdeps/hppa/hppa1.1/udiv_qrnnd.s (__udiv_qrnnd): Likewise. + +2005-07-07 Ulrich Drepper + + * sysdeps/generic/s_ctanh.c (__ctanh): Handle case of zero den better. + * sysdeps/generic/s_ctanhf.c (__ctanhf): Likewise. + * sysdeps/generic/s_ctanhl.c (__ctanhl): Likewise. + * sysdeps/generic/s_ctan.c (__ctan): Likewise. + * sysdeps/generic/s_ctanf.c (__ctanf): Likewise. + * sysdeps/generic/s_ctanl.c (__ctanl): Likewise. + +2005-04-13 H.J. Lu + + [BZ #974] + * csu/elf-init.c (__preinit_array_start): Take int, char **, char **. + (__preinit_array_end): Likewise. + (__init_array_start): Likewise. + (__init_array_end): Likewise. + (__libc_csu_init): Take int argc, char **argv, char **envp. + Call preinit_array and init_array with argc, argv, envp. + * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Remove + INIT_MAIN_ARGS. + * sysdeps/powerpc/elf/libc-start.c (INIT_MAIN_ARGS): Removed. + * elf/Makefile (distribute): Add tst-array5.c, tst-array5-static.c, + tst-array5dep.c, and tst-array5.exp. + (tests): Add tst-array5. + (tests-static): Add tst-array5-static. + ($(objpfx)tst-array5): New target. + ($(objpfx)tst-array5.out): Likewise. + ($(objpfx)tst-array5-static.out): Likewise. + * elf/tst-array5-static.c: New file. + * elf/tst-array5-static.exp: Likewise. + * elf/tst-array5.c: Likewise. + * elf/tst-array5.exp: Likewise. + * elf/tst-array5dep.c: Likewise. + +2005-07-07 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/sched.h: Adjust clone prototype. + +2005-07-05 Jakub Jelinek + + * elf/stackguard-macros.h (STACK_CHK_GUARD): Fix s390/s390x definition. + Reported by Ulrich Weigand . + + * elf/stackguard-macros.h (STACK_CHK_GUARD): Add ia64 definition. + +2005-07-06 Ulrich Drepper + + * elf/dl-error.c (_dl_signal_error): When testing for executable + being relocated, take into account that nothing might even be loaded. + + * elf/dl-reloc.c [PROF] (_dl_relocate_object): Define + consider_profiling always to zero. Don't count of compiler to + remove unreached if block. + * sysdeps/x86_64/dl-trampoline.S [PROF] (_dl_runtime_profile): + Don't compile. + * sysdeps/i386/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. + * sysdeps/ia64/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. + * sysdeps/s390/s390-64/dl-trampoline.S [PROF] (_dl_runtime_profile): + Likewise. + * sysdeps/s390/s390-32/dl-trampoline.S [PROF] (_dl_runtime_profile): + Likewise. + * sysdeps/powerpc/powerpc64/dl-trampoline.S [PROF] + (_dl_profile_resolve): Likewise. + * sysdeps/powerpc/powerpc32/dl-trampoline.S [PROF] + (_dl_profile_resolve): Likewise. + * gmon/Makefile: Add rules to build and run tst-profile-static. + * gmon/tst-profile-static.c: New file. + * Makeconfig (+link-static): Allow passing program-specific flags. + +2005-07-05 Thorsten Kukuk + + [BZ #1111] + * nis/nss_compat/compat-grp.c (internal_getgrgid_r): Check if NSS + module provides getgrgid_r. + (getgrnam_plusgroup): Preserve original return value. + * nis/nss_compat/compat-pwd.c (getpwnam_plususer): Preserve + original return value. + * nis/nss_compat/compat-spwd.c (getspnam_plususer): Likewise. + +2005-07-05 Ulrich Drepper + + [BZ #1101] + * posix/regex_internal.c (build_wcs_buffer): Use MB_LEN_MAX not + MB_CUR_MAX. + (build_wcs_upper_buffer): Likewise. + + * csu/elf-init.c (__libc_csu_fini): Pretty printing. + +2005-07-02 Roland McGrath + + * NEWS: Note LinuxThreads removal. + * manual/install.texi (Installation): Don't mention linuxthreads. + (Configuring and compiling): Don't use linuxthreads as example. + + * sysdeps/unix/sysv/linux/configure.in: Check for nptl add-on only, + not linuxthreads. + * sysdeps/unix/sysv/linux/configure: Regenerated. + * resolv/Depend: Add nptl. + * rt/Depend: Likewise. + + * linuxthreads, linuxthreads_db: Directories removed (preserved in + ports repository). + +2005-06-27 Jakub Jelinek + + [BZ #1037] + * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: -mv8 is deprecated, + use -mcpu=v8. + +2005-06-16 Jakub Jelinek + + [BZ #1016] + * sysdeps/ia64/strlen.S (strlen): Change l2 into a local label. + +2005-06-23 Thorsten Kukuk + + [BZ #1109] + * nscd/nscd_stat.c (receive_print_stats): Replace YESSTR/NOSTR + with own translation. + +2005-06-25 Jakub Jelinek + + [BZ #1097] + * sunrpc/xdr.c (xdr_hyper, xdr_u_hyper): When decoding, cast + t2 to uint32_t instead of ulong. + * sunrpc/Makefile (tests): Add tst-xdrmem. + * sunrpc/tst-xdrmem.c: New test. + + * Versions.def (ld): Add GLIBC_2.4. + * configure.in: Add --enable-stackguard-randomization option. + (ENABLE_STACKGUARD_RANDOMIZE): New define. + * config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add. + * sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h. + (_dl_setup_stack_chk_guard): New inline function. + * sysdeps/generic/dl-osinfo.h: Include stdint.h. + (_dl_setup_stack_chk_guard): New inline function. + * elf/rtld.c (__stack_chk_guard): New variable. + (dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE. + Set __stack_chk_guard to _dl_setup_stack_chk_guard (), + use THREAD_SET_STACK_GUARD if defined. + * elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4. + * sysdeps/generic/libc-start.c (__stack_chk_guard): New variable. + (__libc_start_main): Set __stack_chk_guard to + _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. + * sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all + traces of TLS_INIT_TP_EXPENSIVE. + * debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4. + * debug/Makefile (routines): Add stack_chk_fail. + (static-only-routines): Add stack_chk_fail_local. + * debug/stack_chk_fail_local.c: New file. + * debug/stack_chk_fail.c: New file. + * elf/Makefile: Add rules to build and run tst-stackguard1{,-static} + tests. + * elf/tst-stackguard1.c: New file. + * elf/tst-stackguard1-static.c: New file. + * elf/stackguard-macros.h: New file. + +2005-06-21 Ulrich Drepper + + * resource/Makefile (tests): Add tst-getrlimit. + * resource/tst-getrlimit.c: New file. + + * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_RTPRIO): Fix typo. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. + +2005-06-20 Ulrich Drepper + + * nscd/nscd.init: Get more in line with lsb3. + * nscd/nscd.c: Adjust some error codes to fit in better with lsb3. + * nscd/connections.c: Likewise. + +2005-06-20 Jakub Jelinek + + [BZ #653] + * sysdeps/unix/sysv/linux/sys/quota.h: Add definitions and types for + _LINUX_QUOTA_VERSION >= 2. + (_LINUX_QUOTA_VERSION): Define if not yet defined. + + * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_NICE, + RLIMIT_RTPRIO): Add. + (RLIMIT_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_NICE, + RLIMIT_RTPRIO): Add. + (RLIMIT_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_NICE, + RLIMIT_RTPRIO): Add. + (RLIMIT_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_NICE, + RLIMIT_RTPRIO): Add. + (RLIMIT_NLIMITS): Adjust. + +2005-06-17 Ulrich Drepper + + [BZ #1106] + * time/mktime.c: Always include for prototype of + implicitly used memcpy. + + [BZ #1104] + * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c + (truncate64): Use __truncate, not truncate. + (__have_no_truncate64): Renamed from have_no_truncate64. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c + (__have_no_truncate64): Renamed from have_no_truncate64. + + * sysdeps/powerpc/fpu/libm-test-ulps: Adjust ulps for complex + float functions for gcc 4. + +2005-06-10 Jakub Jelinek + + * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_runtime_setup): + Handle prelinked libraries and binaries with new style PLT. + +2005-06-07 Jakub Jelinek + + * elf/elf.h (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, + R_PPC_REL16_HA): Define. + +2005-06-14 Alan Modra + + * config.h.in (HAVE_ASM_PPC_REL16): Add. + * elf/elf.h (DT_PPC_GOT, DT_PPC_NUM): Define. + * elf/tls-macros.h (PowerPC32): Include config.h. Add variants of + TLS_IE, TLS_LD and TLS_GD for new PLT/GOT layout. + * sysdeps/powerpc/powerpc32/configure.in: New file, + * sysdeps/powerpc/powerpc32/dl-dtprocnum.h: New file. + * sysdeps/powerpc/powerpc32/dl-machine.h (DT_PPC): Define. + (ppc_got): New inline function. + (elf_machine_dynamic): Use ppc_got. Add attribute const. + (elf_machine_load_address): Add attribute const. Don't use int vars. + Use bcl rather than bl to save trashing branch target stack. Use + elf_machine_dynamic rather than duplicating code here. + (elf_machine_runtime_setup): New inline function replacing define. + Handle new PLT. + (elf_machine_fixup_plt): Handle new PLT. + (elf_machine_rela): Likewise. + * sysdeps/powerpc/powerpc32/sysdep.h: Include config.h. + (CALL_MCOUNT): Don't set up counter vars. + * sysdeps/powerpc/powerpc32/ppc-mcount.S: Correct comment. + * sysdeps/powerpc/powerpc32/elf/start.S (start_addressesp): Don't + define when HAVE_ASM_PPC_REL16. + (_start): Add HAVE_ASM_PPC_REL16 code. + * sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Don't bl + into the GOT when HAVE_ASM_PPC_REL16. + * sysdeps/powerpc/powerpc32/memset.S (memset): Likewise. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Ditto. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S (__ceil): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S (__ceilf): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S (__floor): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S (__floorf): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S (__lround): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S (__rint): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S (__rintf): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_round.S (__round): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S (__roundf): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S (__trunc): Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S (__truncf): Likewise. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S (__sigsetjmp): + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S (__brk): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S + (__getcontext): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S + (__setcontext): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S + (__swapcontext): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S (stackblock): + Comment. + (__socket): Bomb if NARGS >= 7. Invoke CGOTSETUP and CGOTRESTORE. + +2005-06-17 Ulrich Drepper + + [BZ #1106] + * sysdeps/posix/sigignore.c: Include to tell the compiler + to use __GI_memset. + * sysdeps/posix/signal.c: Likewise. + * sysdeps/posix/sigset.c: Likewise. + * sysdeps/posix/sysv_signal.c: Likewise. + * sysdeps/unix/sysv/linux/sleep.c: Likewise. + * sysdeps/unix/sysv/linux/sysctl.c: Likewise. + * sysdeps/unix/sysv/linux/system.c: Likewise. + +2005-06-15 Jakub Jelinek + + [BZ #1088] + * hesiod/hesiod.c (hesiod_init): Don't check for ctx->classes[0] == 0 + or both classes equal here. + (parse_config_file): If both classes are equal, clear the second one. + +2005-06-08 Karl Kelley + + [BZ #1088] + * hesiod/hesiod_p.h (struct hesiod_p): Add classes array. + * hesiod/hesiod.c (hesiod_init): Initialize classes. Fail if no + valid classes were given or if both are equal. + (hesiod_resolve): Use ctx->classes instead of hardcoded C_IN + and C_HS order. + (parse_config_file): Handle classes keyword. + * hesiod/README.hesiod: Mention addition of the classes keyword. + +2005-06-14 Ulrich Drepper + + [BZ #1085] + * configure.in: Add test for availability of libaudit. + * config.h.in: Define HAVE_LIBAUDIT. + * config.make.in: Define have-libaudit. + * nscd/Makefile: If libaudit is available, link nscd with it. + * nscd/selinux.c: If HAVE_LIBAUDIT is defined, log using libaudit. + Patch by Steve Grubb . + + * debug/pread64_chk.c: Use __libc_pread64 instead of __pread64. + * sysdeps/posix/posix_fallocate64.c: Likewise. + * include/string.h: Use libc_hidden_proto for strnlen. + * sysdeps/generic/strnlen.c: Add libc_hidden_def. + * include/libintl.h: Use libc_hidden_proto for __dcgettext. + * intl/dcgettext.c: Add libc_hidden_def. + * include/execinfo.h: Add libc_hidden_proto for __backtrace and + __backtrace_symbols_fd. + * sysdeps/generic/backtrace.c: Add libc_hidden_def. + * sysdeps/generic/backtracesymsfd.c: Likewise. + * sysdeps/generic/elf/backtracesymsfd.c: Likewise. + * sysdeps/i386/backtrace.c: Likewise. + * sysdeps/ia64/backtrace.c: Likewise. + * sysdeps/powerpc/powerpc32/backtrace.c: Likewise. + * sysdeps/powerpc/powerpc64/backtrace.c: Likewise. + * sysdeps/s390/s390-32/backtrace.c: Likewise. + * sysdeps/s390/s390-64/backtrace.c: Likewise. + +2005-06-13 Ulrich Drepper + + * sysdeps/unix/clock_gettime.c (clock_gettime): Implement case + where HANDLED_REALTIME is not defined. [BZ #966] + +2005-06-13 Jakub Jelinek + + [BZ #1096] + * sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_sendreq, + __netlink_receive): Remove prototypes. + (__netlink_request): New prototype. + * sysdeps/unix/sysv/linux/ifaddrs.c: Include and + . + (__netlink_sendreq): Make static. + (__netlink_receive): Rename to... + (__netlink_request): ... this. Add type argument, call + __netlink_sendreq. If MSG_TRUNC is set after recvmsg, retry + with a bigger buffer. Don't record buffers that contain no + messages we are expecting. + (getifaddrs): Use __netlink_request instead of __netlink_sendreq + and __netlink_receive pairs. Formatting. + * sysdeps/unix/sysv/linux/if_index.c (if_nameindex_netlink): Use + __netlink_request instead of __netlink_sendreq and __netlink_receive + pair. + +2005-06-13 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/netinet/if_tr.h: Don't include kernel + headers, instead copy important structs/defines. + +2005-06-13 Jakub Jelinek + + * elf/rtld.c (dl_main): Move DT_DEBUG setup before first + _dl_debug_state call. + +2005-06-12 Ulrich Drepper + + * elf/dl-error.c (_dl_signal_error): Store information about use of + real malloc in the catch object. + (_dl_catch_error): Forward information about malloc use to caller + in new parameter. + (_dl_out_of_memory): Make static. + * elf/dl-deps.c: Adjust callers of _dl_catch_error. + * elf/dl-libc.c: Likewise. + * elf/dl-open.c: Likewise. + * elf/rtld.c: Likewise. + Add new --audit option. + * sysdeps/generic/ldsodefs.h: Remove _dl_out_of_memory declaration. + (rtld_global_ro._dl_signal_error): Add new parameter. + * include/dlfcn.h (_dl_catch_error): Add new parameter. + * dlfcn/dlfcn.c (_dlerror_run): Pass additional parameter to + _dl_catch_error. Only free if the returned newly value says so. + +2005-06-01 Roland McGrath + + [BZ #959] + * posix/tst-mmap.c (main): Fill the test file with enough data for the + page size. + +2005-05-30 Jakub Jelinek + + * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): If + GLRO(dl_osversion) has been already set to a value smaller than + _dl_discover_osversion (), don't overwrite it here. + +2005-05-24 Thomas Schwinge + + * sysdeps/mach/i386/syscall.S (syscall): Call END. + +2005-05-28 Richard Henderson + + * elf/elf.h (DT_ALPHA_PLTRO, DT_ALPHA_NUM): New. + * sysdeps/alpha/dl-dtprocnum.h: New file. + * sysdeps/alpha/dl-machine.h (DT_ALPHA): New. + (elf_machine_load_address): Simplify to rely on gprel relocations. + (elf_machine_runtime_setup): Handle DT_ALPHA_PLTRO plt format. + Remove thread safety workaround for binutils 2.6. + (elf_machine_fixup_plt): Handle DT_ALPHA_PLTRO plt format. + * sysdeps/alpha/dl-trampoline.S (_dl_runtime_resolve_new): New. + (_dl_runtime_profile_new): New. + (_dl_runtime_resolve_old): Rename from _dl_runtime_resolve. + (_dl_runtime_profile_old): Rename from _dl_runtime_profile. Fix + typo in _dl_call_pltexit argument loading. + + * sysdeps/alpha/div_libc.h (funcnoplt): New. + * sysdeps/alpha/divl.S: Use it. + * sysdeps/alpha/divq.S: Likewise + * sysdeps/alpha/divqu.S: Likewise. + * sysdeps/alpha/reml.S: Likewise. + * sysdeps/alpha/remq.S: Likewise. + * sysdeps/alpha/remqu.S: Likewise. + +2005-05-26 Andreas Schwab + + * locale/Makefile (CFLAGS-loadlocale.c): Don't define. + +2005-05-26 Ulrich Drepper + + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_DIRECT): Fix value. + Reported by Colin Gibbs . [BZ #954] + +2005-05-17 Alan Modra + + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Corrent + _dl_hwcap access in PIC && !SHARED case. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + +2005-05-25 Dwayne Grant McConnell + + * gmon/gmon.c: Add space in weak_alias use. + * linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S: Likewise. + * sysdeps/alpha/htonl.S: Likewise. + * sysdeps/alpha/htons.S: Likewise. + * sysdeps/alpha/elf/start.S: Likewise. + * sysdeps/i386/i386-mcount.S: Likewise. + * sysdeps/ia64/strchr.S: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/mach/hurd/readdir64_r.c: Likewise. + * sysdeps/mach/hurd/sigaltstack.c: Likewise. + * sysdeps/powerpc/fpu/s_fabs.S: Likewise. + * sysdeps/powerpc/fpu/s_fabs.S: Likewise. + * sysdeps/powerpc/fpu/s_fabs.S: Likewise. + * sysdeps/powerpc/fpu/s_fabs.S: Likewise. + * sysdeps/powerpc/fpu/s_fmax.S: Likewise. + * sysdeps/powerpc/fpu/s_fmax.S: Likewise. + * sysdeps/powerpc/fpu/s_fmax.S: Likewise. + * sysdeps/powerpc/fpu/s_fmax.S: Likewise. + * sysdeps/powerpc/fpu/s_fmin.S: Likewise. + * sysdeps/powerpc/fpu/s_fmin.S: Likewise. + * sysdeps/powerpc/fpu/s_fmin.S: Likewise. + * sysdeps/powerpc/fpu/s_fmin.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. + * sysdeps/s390/s390-32/s390-mcount.S: Likewise. + * sysdeps/s390/s390-64/s390x-mcount.S: Likewise. + * sysdeps/sparc/sparc32/memset.S: Likewise. + * sysdeps/sparc/sparc32/stpcpy.S: Likewise. + * sysdeps/sparc/sparc32/strchr.S: Likewise. + * sysdeps/sparc/sparc32/strchr.S: Likewise. + * sysdeps/sparc/sparc64/memcmp.S: Likewise. + * sysdeps/sparc/sparc64/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/memset.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/readdir64.c: Likewise. + * sysdeps/unix/sysv/linux/readdir64_r.c: Likewise. + * sysdeps/unix/sysv/linux/hppa/clone.S: Likewise. + * sysdeps/unix/sysv/linux/i386/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/i386/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/i386/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. + * sysdeps/unix/sysv/linux/mips/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Likewise. + * sysdeps/unix/sysv/linux/wordsize-64/getdents.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/makecontext.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Likewise. + * sysdeps/x86_64/_mcount.S: Likewise. + +2005-05-24 Roland McGrath + + * sysdeps/unix/sysv/linux/i386/sysdep.h + (SETUP_PIC_REG, LOAD_PIC_REG): Move these macros ... + * sysdeps/i386/sysdep.h [PIC]: ... to here. + +2005-05-23 Roland McGrath + + * sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm: + Subdirectories moved to ports repository. + * configure.in (base_machine): Remove arm* and thumb* patterns. + * shlib-versions (arm.*-.*-linux.*): Remove this pattern. + +2005-05-23 Ulrich Drepper + + [BZ #1086] + * sunrpc/bindrsvprt.c (LOWPORT): Apparently some mountd + implementations are broken and don't accept ports < 512. + +2005-05-22 Dmitry V. Levin + + [BZ #961] + * io/sys/sendfile.h: Remove __nonnull from sendfile and sendfile64 + declarations. + +2005-05-23 Ulrich Drepper + + [BZ #1086] + * sunrpc/pm_getport.c (__get_socket): New function. + (pmap_getport): Use it to open a non-reserved socket to the portmapper + for TCP. + * include/rpc/pmap_clnt.h (__get_socket): Declare. + * sunrpc/pm_getmaps.c (pmap_getmaps): Use __get_socket to get an + non-reserved socket for the portmapper. + Based on a patch by Steve Dickson . + + [BZ #1086] + * sunrpc/bindrsvprt.c (bindresvport): Try harder to find a port. + If we tried looking at the usual range without success extend the + range to even lower ports. + + * sysdeps/unix/clock_gettime.c (clock_gettime): Revert last patch. + +2005-05-22 Andreas Schwab + + * elf/rtld.c: Include . + +2005-05-17 Alan Modra + + * sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_RET): Don't use + JUMPTARGET. Instead append @local to __syscall_error. + * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Delete all occurrences + of JUMPTARGET. Instead append @local to labels. + * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/ppc-mcount.S: Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise. + + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Use float constants. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise. Use one GOT + slot to access both constants. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Likewise. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise. + + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S (TWO52.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S (TWO23.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S (TWO52.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S (TWO23.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Comment typo. + (NEGZERO.0, POINTFIVE.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S (TWO52.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S (TWO23.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_round.S (__round): Code in .text. + (TWO52.0, POINTFIVE.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S (__roundf): Code in .text. + (TWO23.0, POINTFIVE.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S (__trunc): Code in .text. + (TWO52.0): Delete. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S (__truncf): Code in .text. + (TWO23.0): Delete. + * sysdeps/powerpc/powerpc32/memset.S (memset): Formatting. + +2005-05-19 Richard Henderson + + * sysdeps/unix/clock_gettime.c (clock_gettime): Fix typo around + CLOCK_REALTIME. + + * sysdeps/ia64/bits/atomic.h (__arch_compare_and_exchange_bool_32_acq, + __arch_compare_and_exchange_bool_64_acq, + __arch_compare_and_exchange_val_32_acq, + __arch_compare_and_exchange_val_64_acq, atomic_exchange_and_add): + Use __sync builtin without _si or _di suffix. + +2005-05-19 Jakub Jelinek + + [BZ #955] + * iconvdata/ibm939.c (BODY): Avoid segfaults with input characters + and above. + +2005-05-17 Andreas Schwab + + * sysdeps/unix/sysv/linux/clock_getcpuclockid.c + (clock_getcpuclockid): Always return a defined value. + +2005-05-17 Neal H. Walfield + + [BZ #1350] + * sysdeps/posix/getaddrinfo.c (gaih_local): Check [_HAVE_SA_LEN] + instead of [SALEN]. + (gaih_inet): Likewise. + +2005-05-11 Ulrich Drepper + + * elf/elf.h (Elf32_auxv_t): Make cross-compile safe. + (Elf64_auxv_t): Likewise. + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Adjust for + removal of a_ptr element in ElfXX_auxv_t. + * elf/dl-support.c (_dl_aux_init): Likewise. + +2005-05-09 Daniel Jacobowitz + + * sysdeps/unix/sysv/linux/clock_getres.c: Include . + * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. + +2005-05-09 Alan Modra + + * sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Use + .pushsection/.popsection in place of .section/.previous. + +2005-05-08 Ulrich Drepper + + * MakeTAGS: Make xgettext not look into test cases. + + * MakeTAGS: Make sure translations in error calls are marked with + c-format by xgettext. + +2005-05-07 Ulrich Drepper + + * intl/libintl.h: Always use __attribute_format_arg__ for gettext + functions since gcc sometimes forgets the attribute for the + standard functions. + +2005-05-06 Jakub Jelinek + + [BZ #934] + * posix/regex_internal.h: Include bits/libc-lock.h or define dummy + __libc_lock_* macros if not _LIBC. + (struct re_dfa_t): Add lock. + * posix/regcomp.c (re_compile_internal): Add __libc_lock_init. + * posix/regexec.c (regexec, re_search_stub): Add locking. + +2005-05-04 Jakub Jelinek + + * intl/Makefile (tst-gettext[45].out): Pass also $(run-program-prefix) + as argument to the scripts. + * intl/tst-gettext2.sh: Use mkdir -p instead of test -d + mkdir. + * intl/tst-gettext4.sh: Likewise. Use run_program_prefix argument. + * intl/tst-gettext5.sh: Likewise. + + * intl/tst-translit.sh: Add mkdir -p. + + * sysdeps/unix/sysv/linux/i386/sysdep.h (SETUP_PIC_REG): Use + .ifndef/.endif to allow use of this macro more than once per .S + file. + (LOAD_PIC_REG): New macro. + * sysdeps/unix/sysv/linux/i386/makecontext.S: Add call frame + information. + * sysdeps/unix/sysv/linux/i386/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. + * sysdeps/i386/fpu/s_asinh.S: Use LOAD_PIC_REG macro. Add call frame + information. + * sysdeps/i386/fpu/e_log10f.S: Likewise. + * sysdeps/i386/fpu/s_expm1.S: Likewise. + * sysdeps/i386/fpu/e_acoshf.S: Likewise. + * sysdeps/i386/fpu/e_log2l.S: Likewise. + * sysdeps/i386/fpu/s_log1pf.S: Likewise. + * sysdeps/i386/fpu/s_lrint.S: Likewise. + * sysdeps/i386/fpu/s_llrint.S: Likewise. + * sysdeps/i386/fpu/s_ilogbf.S: Likewise. + * sysdeps/i386/fpu/s_cbrtl.S: Likewise. + * sysdeps/i386/fpu/s_asinhf.S: Likewise. + * sysdeps/i386/fpu/e_log.S: Likewise. + * sysdeps/i386/fpu/e_atanhf.S: Likewise. + * sysdeps/i386/fpu/s_lrintl.S: Likewise. + * sysdeps/i386/fpu/e_atanhl.S: Likewise. + * sysdeps/i386/fpu/e_scalb.S: Likewise. + * sysdeps/i386/fpu/s_log1p.S: Likewise. + * sysdeps/i386/fpu/s_nearbyintl.S: Likewise. + * sysdeps/i386/fpu/s_frexpl.S: Likewise. + * sysdeps/i386/fpu/s_log1pl.S: Likewise. + * sysdeps/i386/fpu/s_nearbyintf.S: Likewise. + * sysdeps/i386/fpu/s_cbrt.S: Likewise. + * sysdeps/i386/fpu/s_expm1l.S: Likewise. + * sysdeps/i386/fpu/s_lrintf.S: Likewise. + * sysdeps/i386/fpu/e_acosh.S: Likewise. + * sysdeps/i386/fpu/s_cexp.S: Likewise. + * sysdeps/i386/fpu/s_ilogbl.S: Likewise. + * sysdeps/i386/fpu/s_expm1f.S: Likewise. + * sysdeps/i386/fpu/e_powl.S: Likewise. + * sysdeps/i386/fpu/e_powf.S: Likewise. + * sysdeps/i386/fpu/e_scalbf.S: Likewise. + * sysdeps/i386/fpu/e_logl.S: Likewise. + * sysdeps/i386/fpu/e_acoshl.S: Likewise. + * sysdeps/i386/fpu/s_frexp.S: Likewise. + * sysdeps/i386/fpu/e_pow.S: Likewise. + * sysdeps/i386/fpu/e_logf.S: Likewise. + * sysdeps/i386/fpu/e_log2.S: Likewise. + * sysdeps/i386/fpu/s_frexpf.S: Likewise. + * sysdeps/i386/fpu/s_cexpl.S: Likewise. + * sysdeps/i386/fpu/s_llrintf.S: Likewise. + * sysdeps/i386/fpu/s_ilogb.S: Likewise. + * sysdeps/i386/fpu/e_scalbl.S: Likewise. + * sysdeps/i386/fpu/e_atanh.S: Likewise. + * sysdeps/i386/fpu/e_log10.S: Likewise. + * sysdeps/i386/fpu/s_cbrtf.S: Likewise. + * sysdeps/i386/fpu/s_cexpf.S: Likewise. + * sysdeps/i386/fpu/s_llrintl.S: Likewise. + * sysdeps/i386/fpu/e_log10l.S: Likewise. + * sysdeps/i386/fpu/s_nearbyint.S: Likewise. + * sysdeps/i386/fpu/s_asinhl.S: Likewise. + * sysdeps/i386/fpu/e_log2f.S: Likewise. + * sysdeps/i386/addmul_1.S: Various fixes to cfi handling. + * sysdeps/i386/mul_1.S: Likewise. + * sysdeps/i386/strtok.S: Likewise. + * sysdeps/i386/sub_n.S: Likewise. + * sysdeps/i386/submul_1.S: Likewise. + * sysdeps/i386/i586/addmul_1.S: Likewise. + * sysdeps/i386/i586/memcpy.S: Likewise. + * sysdeps/i386/i586/mul_1.S: Likewise. + * sysdeps/i386/i586/rshift.S: Likewise. + * sysdeps/i386/i586/sub_n.S: Likewise. + * sysdeps/i386/i586/submul_1.S: Likewise. + * sysdeps/i386/i686/memcmp.S: Likewise. + * sysdeps/i386/i686/memmove.S: Likewise. + * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. + * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. + +2005-05-03 Ulrich Drepper + + * sysdeps/i386/add_n.S: Add call frame information. + * sysdeps/i386/addmul_1.S: Likewise. + * sysdeps/i386/bsd-setjmp.S: Likewise. + * sysdeps/i386/lshift.S: Likewise. + * sysdeps/i386/memchr.S: Likewise. + * sysdeps/i386/memcmp.S: Likewise. + * sysdeps/i386/mul_1.S: Likewise. + * sysdeps/i386/rawmemchr.S: Likewise. + * sysdeps/i386/rshift.S: Likewise. + * sysdeps/i386/stpncpy.S: Likewise. + * sysdeps/i386/strchr.S: Likewise. + * sysdeps/i386/strchrnul.S: Likewise. + * sysdeps/i386/strcspn.S: Likewise. + * sysdeps/i386/strpbrk.S: Likewise. + * sysdeps/i386/strrchr.S: Likewise. + * sysdeps/i386/strspn.S: Likewise. + * sysdeps/i386/strtok.S: Likewise. + * sysdeps/i386/sub_n.S: Likewise. + * sysdeps/i386/submul_1.S: Likewise. + * sysdeps/i386/elf/bsd-setjmp.S: Likewise. + * sysdeps/i386/i486/strcat.S: Likewise. + * sysdeps/i386/i586/add_n.S: Likewise. + * sysdeps/i386/i586/addmul_1.S: Likewise. + * sysdeps/i386/i586/lshift.S: Likewise. + * sysdeps/i386/i586/memcpy.S: Likewise. + * sysdeps/i386/i586/memset.S: Likewise. + * sysdeps/i386/i586/mul_1.S: Likewise. + * sysdeps/i386/i586/rshift.S: Likewise. + * sysdeps/i386/i586/strchr.S: Likewise. + * sysdeps/i386/i586/strcpy.S: Likewise. + * sysdeps/i386/i586/sub_n.S: Likewise. + * sysdeps/i386/i586/submul_1.S: Likewise. + * sysdeps/i386/i686/add_n.S: Likewise. + * sysdeps/i386/i686/memcmp.S: Likewise. + * sysdeps/i386/i686/memmove.S: Likewise. + * sysdeps/i386/i686/mempcpy.S: Likewise. + * sysdeps/i386/i686/memset.S: Likewise. + * sysdeps/i386/i686/strtok.S: Likewise. + * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. + * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. + * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise. + * sysdeps/unix/sysv/linux/i386/semtimedop.S: Likewise. + * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. + + * sysdeps/i386/fpu/libm-test-ulps: Adjust for gcc 4. + + * sysdeps/unix/sysv/linux/kernel-features.h: waitid is available + on ppc in 2.6.12. + +2005-04-29 Jakub Jelinek + + [BZ #1083] + * sysdeps/posix/posix_fallocate.c (posix_fallocate): If len == 0, + call ftruncate if offset is bigger than current size. Make sure + the file is offset + len bytes long if that is more than current size. + Don't overwrite previous content of the file. + * sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64): + Likewise. + +2005-05-02 Roland McGrath + + [BZ #924] + * crypt/md5.c [! HAVE_MEMCPY] (memcpy): Yield proper expression value. + +2005-04-29 Roland McGrath + + * timezone/africa: Update from tzdata2005i. + * timezone/asia: Likewise. + * timezone/northamerica: Likewise. + * timezone/yearistype: Likewise. + + * sysdeps/i386/sysdep.h (CALL_MCOUNT): Fix typo in last change. + +2005-04-29 Ulrich Drepper + + [BZ #1093] + * nis/nis_table.c: Fix realloc handling. + * nis/nis_removemember.c: Likewise. + +2005-04-28 Ulrich Drepper + + [BZ #798] + * nscd/Makefile: Help losers who use --with-headers. + +2005-04-28 Roland McGrath + + [BZ #796] + * sysdeps/unix/sysv/linux/dl-sysdep.h: New file. + Define NEED_DL_SYSINFO_DSO for all platforms. + + * sysdeps/generic/dl-sysdep.h: Remove multiple inclusion protection. + * sysdeps/alpha/dl-sysdep.h: Likewise. + Use #include_next instead of duplicating generic file's contents. + * sysdeps/ia64/dl-sysdep.h: Likewise. + * sysdeps/sparc/dl-sysdep.h: Likewise. + +2005-03-22 Steven Munroe + + * sysdeps/powerpc/powerpc64/memset.S (memset): Make ___memset local. + +2005-03-07 Steven Munroe + + [BZ #781] + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_TGKILL): Define for powerpc32/64 starting with 2.6.1. + (__ASSUME_UTIMES): Define for powerpc32/64 starting with 2.6.1. + (__ASSUME_FADVISE64_64_SYSCALL): Define for powerpc32 only starting + with 2.6.1. + (__ASSUME_WAITID_SYSCALL): Don't define for powerpc32/64. + +2005-04-28 Ulrich Drepper + + * sysdeps/i386/sysdep.h: Add cfi instrumentation to asm fragments. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/i386/socket.S: Remove now duplicate + cfi_startproc and cfi_endproc. + + * configure.in: Remove ultrasparc names. + + * sysdeps/i386/i686/memcmp.S: Move misplaced END. + +2005-03-27 Bruno Haible + + Make it possible for multiple threads to use gettext() in different + locales. + * intl/dcigettext.c (HAVE_PER_THREAD_LOCALE): New macro. + (struct known_translation_t): If HAVE_PER_THREAD_LOCALE, add localename + field. + (transcmp): If HAVE_PER_THREAD_LOCALE, compare localename fields. + (DCIGETTEXT): If HAVE_PER_THREAD_LOCALE, fill the localename field in + search and newp. + + * intl/tst-gettext4.c: New file. + * intl/tst-gettext4.sh: New file. + * intl/tst-gettext4-de.po: New file. + * intl/tst-gettext4-fr.po: New file. + * intl/tst-gettext5.c: New file. + * intl/tst-gettext5.sh: New file. + * intl/Makefile (distribute): Add tst-gettext4.sh, tst-gettext4-de.po, + tst-gettext4-fr.po, tst-gettext5.sh. + (multithread-test-srcs): New variable. + (test-srcs): Add its contents. + (tests): Depend on tst-gettext4.out, tst-gettext5.out. + (tst-gettext4.out, tst-gettext5.out): New rules. + (CFLAGS-tst-gettext4.c, CFLAGS-tst-gettext5.c): New variables. + Add rule for linking the multithread-test-srcs with the appropriate + thread-library. + +2005-04-28 Ulrich Drepper + + * po/rw.po: New file. From translation team. + + * scripts/config.guess: Update from upstream. + * scripts/config.sub: Likewise. + +2005-04-27 Ulrich Drepper + + [BZ #1094] + * nscd/connections.c (nscd_run): Use time() value in prune_cache + call, not timeout value, since the latter might be from another clock. + +2005-04-27 Roland McGrath + + [BZ #877] + * posix/unistd.h: Remove __nonnull from acct decl. + + * rt/tst-cpuclock1.c: New file. + * rt/tst-cpuclock2.c: New file. + * rt/tst-cputimer1.c: New file. + * rt/tst-cputimer2.c: New file. + * rt/tst-cputimer3.c: New file. + * rt/Makefile (tests): Add them. + + * sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h: New file. + * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: New file. + * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c + (HAS_CPUCLOCK): New macro. + (clock_getcpuclockid): Function removed. + #include the new linux file to define it instead. + * sysdeps/unix/clock_gettime.c [HP_TIMING_AVAIL] (hp_timing_gettime): + New function, broken out of ... + (clock_gettime) [HP_TIMING_AVAIL]: ... here. Call it. + (realtime_gettime): New function, broken out of ... + (clock_gettime) [! HANDLED_REALTIME]: ... here. Call it. + (clock_gettime) [SYSDEP_GETTIME_CPU]: Use new macro in default case. + * sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): New macro. + (SYSDEP_GETTIME_CPUTIME): New macro. + (SYSDEP_GETTIME): Use both. + [! __ASSUME_POSIX_TIMERS] (maybe_syscall_gettime): New function, broken + out of ... + (SYSDEP_GETTIME): ... here. Use it. + [__NR_clock_gettime] (HANDLED_CPUTIME): Define it. + (SYSDEP_GETTIME_CPUTIME): New macro. Handle CPU timers by trying + kernel support and falling back to hp-timing code. + * sysdeps/posix/clock_getres.c + [HP_TIMING_AVAIL] (hp_timing_getres): New function, broken out of ... + (clock_getres) [HP_TIMING_AVAIL]: ... here. Call it. + (realtime_getres): New function, broken out of ... + (clock_getres) [! HANDLED_REALTIME]: ... here. Call it. + (clock_getres) [SYSDEP_GETRES_CPU]: Use new macro in default case. + * sysdeps/unix/sysv/linux/clock_getres.c (SYSCALL_GETRES): New macro. + (SYSDEP_GETRES_CPUTIME): New macro. + (SYSDEP_GETRES): Use both. + [! __ASSUME_POSIX_TIMERS] (maybe_syscall_getres): New function, broken + out of ... + (SYSDEP_GETRES): ... here. Use it. + [__NR_clock_getres] (HANDLED_CPUTIME): Define it. + (SYSDEP_GETRES_CPUTIME): New macro. Handle CPU timers by trying + kernel support and falling back to hp-timing code. + * sysdeps/unix/sysv/linux/clock_nanosleep.c: Handle + CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially, + translating to the kernel clockid_t for our own process/thread clock. + +2005-04-27 Ulrich Drepper + + * stdlib/test-canon.c: Make doesExist a directory and add more tests + for the new error case. + +2004-06-02 Dmitry V. Levin + Ranjani Murthy + + * stdlib/canonicalize.c (__realpath): Change realpath(3) to + return NULL and set errno to ENOTDIR for such pathnames like + "/path/to/existing-non-directory/". + +2005-04-26 Ulrich Drepper + + [BZ #1105] + * time/strptime_l.c (__strptime_internal): Handle 'z' to set + tm_gmtoff. + * time/Makefile (tests): Add tst-strptime2. + * time/tst-strptime2.c: New file. + +2005-04-26 Jakub Jelinek + + [BZ #1081] + * elf/dl-close.c: Include stddef.h. + (_dl_close): If called recursively, just remember GC needs to be rerun + and decrease l_direct_opencount. Avoid GC if l_direct_opencount + decreased to 1. Rerun GC at the end if any destructor unloaded some + additional libraries. + * elf/Makefile: Add rules to build and run unload6 test. + * elf/unload6.c: New test. + * elf/unload6mod1.c: New file. + * elf/unload6mod2.c: New file. + * elf/unload6mod3.c: New file. + + * malloc/hooks.c (mem2chunk_check): Add magic_p argument, set *magic_p + if magic_p is not NULL. + (top_check): Invoke MALLOC_FAILURE_ACTION if MORECORE failed. + (malloc_check): Fail if sz == -1. + (free_check): Adjust mem2chunk_check caller. + (realloc_check): Likewise. Fail if bytes == -1. If bytes == 0 and + oldmem != NULL, call free_check and return NULL. If reallocating + and returning NULL, invert magic byte again to make oldmem valid + region for further checking. + (memalign_check): Fail if bytes == -1. + * malloc/Makefile: Add rules to build and run tst-mcheck. + * malloc/tst-mcheck.c: New test. + +2005-04-26 Ulrich Drepper + + [BZ #1110] + * stdio-common/vfscanf.c: Correctly account for characters of + decimal points right after +-. + +2005-04-26 Roland McGrath + + * elf/rtld-Rules (rtld-all): Test ifndef rtld-modules instead of + ifeq ($(subdir),elf) to distinguish main driver from subdir runs. + +2005-04-25 Roland McGrath + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h + (INTERNAL_SYSCALL_ERROR_P): Fix typo in last change. + + * sunrpc/xdr.c (xdr_u_int): Use `long' for L and cast where needed. + + * elf/dl-load.c: Revert last change. + +2005-04-24 Ulrich Drepper + + [BZ #1110] + * stdio-common/vfscanf.c: Fix parsing of decimal point after +-. + Patch by Hamed Malek . + +2005-04-21 Roland McGrath + + * elf/dl-load.c (_dl_map_object_from_fd): Don't use MAP_DENYWRITE, + since Linux ignores it in user mmap calls. + +2005-04-17 David S. Miller + + * sysdeps/sparc/sparc32/elf/start.S: Define __data_start. + * sysdeps/sparc/sparc64/elf/start.S: Likewise. + +2005-04-15 Roland McGrath + + * timezone/Makefile (zic-deps): New variable. + ($(testdata)/America/New_York): Use it instead of explicit deps. + ($(testdata)/Etc/UTC, $(testdata)/Australia/Melbourne): Likewise. + ($(testdata)/America/Sao_Paulo, $(testdata)/Asia/Tokyo): Likewise. + (%/UTC %/Universal): New pattern rule, replaces ... + ($(testdata)/UTC, $(testdata)/Universal): ... these removed targets. + ($(testdata)/%/Berlin $(testdata)/%/London): New pattern rule. + ($(testdata)/Europe/London, $(testdata)/Europe/Berlin): Removed. + +2005-04-14 Roland McGrath + + * MakeTAGS ($P/$(domain).pot): Depend on distinfo file as well. + (extract): Filter-out distinfo file name. + + [BZ #253] + * MakeTAGS (text-srcs): Match %.bash.in files too. + + [BZ #253] + * nscd/Makefile (all-nscd-modules): New variable, include selinux + module regardless of configuration. + (distribute): Use that instead of $(nscd-modules). + +2005-04-13 David S. Miller + + Add sparc64 TLS and NPTL support. + * elf/tls-macros.h: Add Sparc64 defines. + * sysdeps/sparc/sparc64/dl-machine.h (sparc64_fixup_plt): Mark as + always_inline. + (elf_machine_fixup_plt): Likewise. + (elf_machine_rela): Handle TLS relocations. + (elf_machine_type_cleaa): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h + (SYSCALL_ERROR_HANDLER_ENTRY): Use sethi/or for GOT reloc. + It does not always fit in R_SPARC_GOT13 when building -fPIC. + Also, add TLS handling. + * sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel): + Increase it to 2.4.21 for sparc64. + * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: NULL terminate + backtrace by zero'ing out %fp. Store away flags, func_ptr, + and func_arg in global registers not local registers. + * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Handle PTID, TLS, + and CTID arguments properly. Add RESET_PID handling. + * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Rework so that we + do not invoke __sigprocmask(). We can always assume rt signals + are present on sparc64, so just do an inline syscall. + +2005-04-13 Jakub Jelinek + + * sysdeps/sparc/sparc64/dl-machine.h: Add dl_machine_h multiple + inclusion guard for the first half of the header. + (elf_machine_type_class, ELF_MACHINE_JMP_SLOT, ELF_MACHINE_NO_REL, + ELF_MACHINE_PLTREL_OVERLAP, elf_machine_runtime_setup, + elf_machine_relplt, DL_STACK_END, RTLD_START): Move into the + #ifndef dl_machine_h guarded part of the header. + +2005-04-14 Ulrich Drepper + + [BZ #851] + * posix/execvp.c (execvp): Use file name including path when + trying to run it with shell. + * posix/Makefile: Add rules to build and run tst-execvp3. + * posix/tst-execvp3.c: New file. + +2005-04-12 Ulrich Drepper + + [BZ #1090] + * stdlib/random_r.c (__initstate_r): Don't use non-existing state. + * string/tst-strfry.c: New file. + * string/Makefile (tests): Add tst-strfry. + +2005-04-11 James A. Morrison + + * manual/string.texi: Fix typo in wmemcpy decl. + +2005-04-10 David S. Miller + + * sysdeps/sparc/sparc32/dl-trampoline.S: Use std not stx. + +2005-04-08 Carlos O'Donell + + * FAQ.in: Explain why `make' might fail running rpcgen. + * FAQ: Regenerated. + +2005-04-07 Roland McGrath + + * po/libc.pot: Regenerated. + +2005-04-07 Roland McGrath + + * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion) + [(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan + GLRO(dl_sysinfo_map) for PT_NOTE giving Linux kernel version, + we can skip the uname call if it's there. + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Don't use + DL_SYSDEP_OSCHECK here. + * elf/rtld.c (dl_main) [DL_SYSDEP_OSCHECK]: Do it here instead. + + * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): + Add _dl_sysinfo_map. + * elf/rtld.c (dl_main): Don't call _dl_init_paths early in the + rtld_is_main case. Call it unconditionally later. + Move GLRO(dl_sysinfo_dso) handling earlier, before _dl_init_paths call. + Initialize GLRO(dl_sysinfo_map). + * elf/dl-load.c (open_path): Bail out if _dl_init_paths wasn't called. + * sysdeps/generic/dl-sysdep.c (_DL_FIRST_EXTRA): New macro. + (_dl_important_hwcaps) + [(NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO) && SHARED]: Scan + GLRO(dl_sysinfo_map) for PT_NOTE giving synthetic hwcap names + and bit values. + * elf/ldconfig.c (_DL_FIRST_EXTRA): New macro. + (hwcap_extra): New static variable. + (is_hwcap_platform): Check hwcap_extra for a matching name. + Remove tls special case. + (path_hwcap): Likewise. + (parse_conf): Parse "hwcap" directive to define synthetic hwcap bits + and their names, stored in hwcap_extra. + (main) [USE_TLS]: Initialize final synthetic hwcap bit as "tls". + + * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Use uint64_t for + _dl_hwcap and _dl_hwcap_mask. + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Cast a_val for + AT_HWCAP to unsigned long int. + * elf/dl-support.c (_dl_aux_init): Likewise. + (_dl_hwcap): Update defn. + + * elf/cache.c (print_entry): Pad hwcap value with 0s in diagnostic. + * elf/ldconfig.c (search_dir): Likewise. + +2005-04-05 Roland McGrath + + * NEWS: Copy 2.3.5 section from 2.3 branch. + + * intl/tst-codeset.sh: Use mkdir -p. Put msgfmt output in temporary + file and mv it into place. + * intl/tst-gettext3.sh: Likewise. + + * Makefile (glibc-%.tar rule): Use make -q to ensure configure scripts + are up to date in srcdir. Touch all configure scripts after export. + + * iconv/gconv_int.h: Include and . + +2005-04-05 H.J. Lu + + [BZ #592] + * sysdeps/ia64/fpu/e_acosh.S: Update from Intel libm 2005-04-05 + (comment changes only). + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + +2005-04-05 Roland McGrath + + * scripts/config.guess: Update from master, timestamp='2005-03-24'. + * scripts/config.sub: Update from master, timestamp='2005-02-10'. + +2005-04-04 David S. Miller + + * sysdeps/sparc/sparc32/dl-trampoline.S: New file. + * sysdeps/sparc/sparc32/dl-machine.h: Move PLT trampolines there. + Use RESOLVE_MAP instead of RESOLVE to protect relocation code. + (elf_machine_runtime_setup): Test for dl_profile non-null. + * sysdeps/sparc/sparc64/dl-trampoline.S: New file. + (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. + * sysdeps/sparc/sparc64/dl-machine.h: Move PLT trampolines there. + Use RESOLVE_MAP instead of RESOLVE to protect relocation code. + (elf_machine_runtime_setup): Test for dl_profile non-null. + * sysdeps/sparc/bits/link.h: New file. + * sysdeps/generic/ldsodefs.h (La_sparc32_regs, La_sparc32_retval, + La_sparc64_regs, La_sparc64_retval): New. + (struct audit_ifaces): Add sparc entries. + * elf/tst-auditmod1.c: Add sparc entries. + +2005-03-27 Bruno Haible + + * intl/tst-gettext3.c: New file. + * intl/tst-gettext3.sh: New file. + * intl/Makefile (distribute): Add tst-gettext3.sh. + (test-srcs): Add tst-gettext3. + (tests): Depend on tst-gettext3.out. + (tst-gettext3.out): New rule. + (CFLAGS-tst-gettext3.c): New variable. + + Fix bug exposed by tst-gettext3. + * intl/gettextP.h (struct converted_domain): New type. + (struct loaded_domain): Remove the conv, conv_tab fields. Add + conversions, nconversions fields. + (_nl_init_domain_conv): Remove declaration. + (_nl_free_domain_conv): Remove declaration. + (_nl_find_msg): Add convert argument. + * intl/dcigettext.c (DCIGETTEXT): Call _nl_find_msg with convert=1. + (_nl_find_msg): Add convert argument. When a conversion to a different + charset is needed, create a new converted_domain element, instead of + throwing away the old converted translations. + (get_output_charset): New function. + * intl/loadmsgcat.c (_nl_init_domain_conv): Remove function. + (_nl_free_domain_conv): Remove function. + (_nl_load_domain): Initialize the conversions array to empty. Use + _nl_find_msg instead of _nl_init_domain_conv to retrieve the header + entry. + (_nl_unload_domain): Free the conversions array and its contents. + + * intl/gettextP.h (struct loaded_domain): Remove codeset_cntr field. + (struct binding): Likewise. + * intl/bindtextdom.c (set_binding_values): Drop codeset_cntr + modifications. + +2005-04-04 Jakub Jelinek + + [BZ #1082] + * sunrpc/pmap_rmt.c (xdr_rmtcall_args): Use a dummy arglen instead + of trying to encode uninitialized arglen. + +2005-04-04 Ulrich Drepper + + [BZ #825] + * timezone/scheck.c: Update from tzcode2005h. + * timezone/tzfile.h: Likewise. + * timezone/zdump.c: Likewise. + * timezone/zic.c: Likewise. + + [BZ #825] + * timezone/antarctica: Update from tzdata2005h. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/etcetera: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/leapseconds: Likewise. + * timezone/iso3166.tab: Likewise. + +2005-03-31 H.J. Lu + + [BZ #592] + * sysdeps/ia64/fpu/libm_cpu_defs.h: Update copyright. + +2005-04-01 Ulrich Drepper + + * wcsmbs/btowc.c (__btowc): Optimize parameters in ASCII range. + * wcsmbs/wctob.c (wctob): Likewise. + * wcsmbs/wchar.h (btowc): Add optimized inline function. + (wctob): Likewise. + +2005-03-31 Jakub Jelinek + + * sysdeps/unix/sysv/linux/x86_64/getcontext.S: Use functionally + equivalent, but shorter instructions. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/swapcontext.S: Likewise. + * sysdeps/unix/x86_64/sysdep.S: Likewise. + * sysdeps/x86_64/strchr.S: Likewise. + * sysdeps/x86_64/memset.S: Likewise. + * sysdeps/x86_64/strcspn.S: Likewise. + * sysdeps/x86_64/strcmp.S: Likewise. + * sysdeps/x86_64/elf/start.S: Likewise. + * sysdeps/x86_64/strspn.S: Likewise. + * sysdeps/x86_64/dl-machine.h: Likewise. + * sysdeps/x86_64/bsd-_setjmp.S: Likewise. + * sysdeps/x86_64/bsd-setjmp.S: Likewise. + * sysdeps/x86_64/strtok.S: Likewise. + +2005-03-30 H.J. Lu + + [BZ #592] + * sysdeps/ia64/fpu/e_acosf.S: Update from Intel libm 2005-03-21. + * sysdeps/ia64/fpu/e_acoshf.S: Likewise. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_acosh.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_acos.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_asin.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_atan2.S: Likewise. + * sysdeps/ia64/fpu/e_atanhf.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp10l.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2l.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_fmodf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_fmod.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_powl.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_support.h: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_cosl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_fdimf.S: Likewise. + * sysdeps/ia64/fpu/s_fdiml.S: Likewise. + * sysdeps/ia64/fpu/s_fdim.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. + * sysdeps/ia64/fpu/s_ilogb.S: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_log1pf.S: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_logbf.S: Likewise. + * sysdeps/ia64/fpu/s_logbl.S: Likewise. + * sysdeps/ia64/fpu/s_logb.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbn.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.c: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/libm_cpu_defs.h: New file. + * sysdeps/ia64/fpu/libm_error_codes.h: New file. + + [BZ #592] + * sysdeps/ia64/fpu/gen_import_file_list: Updated for Intel libm + 2005-03-21. + * sysdeps/ia64/fpu/import_file.awk: Likewise. + * sysdeps/ia64/fpu/import_intel_libm: Likewise. + * sysdeps/ia64/fpu/Makefile: Likewise. + +2005-03-29 Jakub Jelinek + + [BZ #1087] + * posix/fnmatch.c (fnmatch): For short patterns or strings attempt to + avoid calling mbsrtowcs twice. + +2005-03-29 Roland McGrath + + * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion): New + function, inline broken out of ... + (DL_SYSDEP_OSCHECK): ... here. Use that. + Do the discovery and set GLRO(dl_osversion) if successful, + if __LINUX_KERNEL_VERSION <= 0. + * elf/dl-load.c: Don't include dl-osinfo.h here. + +2005-03-29 Alfred M. Szmidt + + * manual/install.texi (Tools for Compilation): GNU binutils 2.15 + is now needed. + +2005-03-19 Bruno Haible + + * intl/dcigettext.c (struct known_translation_t): Change type of + domainname field to 'const char *'. + (DCIGETTEXT): Remove const-cast. + +2005-03-29 Thorsten Kukuk + + [BZ #661] + * grp/initgroups.c (internal_getgrouplist): Check if we have + enough space before adding the primary group to the list. + + * posix/tst-execle1.c (do_test): Fix execle arguments. + * posix/tst-execle2.c (do_test): Likewise. + +2005-03-28 Roland McGrath + + * sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names. + Reported by Mark Mitchell . + * Versions.def (libm): Define GLIBC_2.4 set. + * math/Versions (libm: GLIBC_2.4): Add this set, with exp2l. + * sysdeps/i386/Versions (libm: GLIBC_2.1): Add this set, with exp2l. + * sysdeps/ia64/Versions: Likewise. + * sysdeps/m68k/Versions: Likewise. + * sysdeps/sparc/sparc64/Versions: Likewise. + * sysdeps/x86_64/Versions: New file. + * sysdeps/mips/mips64/Versions: New file. + + * locale/langinfo.h (_NL_LOCALE_NAME): New macro. + [__USE_GNU] (NL_LOCALE_NAME): New macro. + * locale/nl_langinfo.c: Grok special item value for _NL_LOCALE_NAME, + return locale name string for the category. + +2005-03-25 Jakub Jelinek + + [BZ #721] + * sysdeps/generic/wcstoul_l.c: Include "wcstol_l.c" rather than + . + +2005-03-28 Daniel Jacobowitz + + * sysdeps/mips/atomicity.h: Remove unused file. + * sysdeps/mips/dl-machine.h (elf_machine_rel): Add TLS relocations. + * sysdeps/mips/dl-tls.h: New file. + * sysdeps/mips/libc-tls.c: New file. + * sysdeps/mips/tls-macros.h: New file. + * sysdeps/mips/bits/atomic.h: New file. + * sysdeps/mips/bits/setjmp.h: Protect against multiple inclusion. + * sysdeps/mips/elf/configure.in: New file. + * sysdeps/mips/elf/configure: Generated. + * sysdeps/mips/sys/asm.h: New file. + * sysdeps/unix/sysv/linux/mips/vfork.S: New file. + * sysdeps/unix/sysv/linux/mips/clone.S: Add NPTL and five-argument + clone support. + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (INTERNAL_SYSCALL_NCS): New. + (INTERNAL_SYSCALL): Update for non-constant support. + (internal_syscall0): Likewise. + (internal_syscall1): Likewise. + (internal_syscall2): Likewise. + (internal_syscall3): Likewise. + (internal_syscall4): Likewise. + (internal_syscall5): Likewise. + (internal_syscall6): Likewise. + (internal_syscall7): Likewise. + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (SIGEV_THREAD): + Update to match the kernel. + (SIGEV_CALLBACK): Likewise. + (SIGEV_THREAD_ID): Likewise. + +2005-03-28 Daniel Jacobowitz + + [BZ #783] + * elf/tst-auditmod1.c: Add MIPS support. + * sysdeps/generic/ldsodefs.h (La_mips_32_regs): New. + (La_mips_32_retval): New. + (La_mips_64_regs): New. + (La_mips_64_retval): New. + (struct audit_ifaces): Add MIPS entries. + * sysdeps/mips/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE. + (elf_machine_runtime_link_map, ELF_DL_FRAME_SIZE, + ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS, + ELF_MACHINE_RUNTIME_TRAMPOLINE): Move to dl-trampoline.c. + (RTLD_START): Align the stack before calling _dl_init_internal. + Use .ent for _dl_start_user. + (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define. + (elf_machine_rel, elf_machine_rel_relative, elf_machine_lazy_rel) + (elf_machine_runtime_setup): Use "auto inline". + (elf_machine_rela, elf_machine_rela_relative): Provide empty versions. + (elf_machine_got_rel): Likewise. Use RESOLVE_MAP. + * sysdeps/mips/dl-trampoline.c: New file. + * sysdeps/mips/bits/link.h: New file. + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (internal_syscall5): Use register operands instead of non-lvalue + memory operands. + (internal_syscall6): Likewise. + (internal_syscall7): Likewise. + +2005-03-27 Andreas Jaeger + + * debug/warning-nop.c (__builtin___memcpy_chk): Define away to + avoid warnings with older compiler. + (__builtin___memcpy_chk): Likewise. + (__builtin___memmove_chk: Likewise. + (__builtin___mempcpy_chk): Likewise. + (__builtin___memset_chk): Likewise. + (__builtin___stpcpy_chk): Likewise. + (__builtin___strcat_chk): Likewise. + (__builtin___strcpy_chk): Likewise. + (__builtin___strncat_chk): Likewise. + (__builtin___strncpy_chk): Likewise. + (__builtin_object_size): Likewise. + +2005-03-27 Daniel Jacobowitz + + * elf/tls-macros.h: Correct typo. + +2005-03-23 Jakub Jelinek + + [BZ #822] + * nis/ypclnt.c (yp_2_yperr): Revert 2004-11-30 patch. + (ypprot_err): Use yp_2_yperr table also for YP_NODOM .. YP_NOMORE. + +2005-03-22 Roland McGrath + + * locale/setlocale.c: Comment typo. + + * scripts/versions.awk: No errors for GLIBC_PRIVATE. + + * Versions.def (libdl, librt): Add GLIBC_2.3.4 version. + + * scripts/versions.awk: Print all errors and die at the end. + Use library name in versions array keys. + +2005-03-22 Daniel Jacobowitz + + * elf/elf.h (PT_ARM_EXIDX): New macro. + +2005-03-21 Thorsten Kukuk + + [BZ #1098] + * sunrpc/xdr_stdio.c (xdrstdio_getlong, xdrstdio_putlong): + Convert correctly between long/int on 64bit big-endian. + +2005-03-21 David Mosberger + + * sysdeps/ia64/_mcount.S: Newer kernels don't like register-frames + with more than 8 output registers. Fix this by passing original + ar.pfs to _mcount_ret_helper via r3. + +2005-03-15 Jakub Jelinek + + [BZ #786] + * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle + GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx). + * elf/Makefile: Add rules to build and run tst-tls15. + * elf/tst-tls15.c: New test. + * elf/tst-tlsmod15a.c: New file. + * elf/tst-tlsmod15b.c: New file. + +2005-03-20 Ulrich Drepper + + * elf/rtld.c (dl_main): Always call init_tls if we have audit modules. + +2005-03-20 Alfred M. Szmidt + + * elf/dl-open.c (dl_open_worker): Fix typo. + +2005-03-20 Ulrich Drepper + + * malloc/malloc.c (public_cALLOc): We cannot skip the memory + clearing if perturb_byte != 0. + +2005-03-20 Jakub Jelinek + + * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t + instead of __off_t for last argument. + * debug/Makefile (tests): Add tst-lfschk{1,2,3}. + * debug/tst-lfschk1.c: New test. + * debug/tst-lfschk2.c: New test. + * debug/tst-lfschk3.c: New test. + +2005-02-09 Jakub Jelinek + + * sysdeps/unix/sysv/linux/bits/termios.h (CMSPAR): Define. + * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Add __USE_MISC + and __USE_XOPEN guards to match linux/bits/termios.h. + * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. + (CMSPAR): Define. + * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. + +2005-02-10 H.J. Lu + + [BZ #1076] + * sysdeps/ia64/elf/initfini.c: Add local _init and _fini labels. + +2005-02-27 Denis Barbier + + [BZ #549] + * locale/iso-4217.def: Add CSD currency. + +2005-03-19 Ulrich Drepper + + * inet/test-ifaddrs.c: Use test-skeleton. + * inet/test_ifindex.c: Likewise. + + [BZ #821] + * elf/dl-lookup.c (add_dependency): Always search l_initfini if + the list exists. + + [BZ #821] + * elf/Makefile: Add rules to build and run order2. + * elf/order2.c: New file. + * elf/order2mod1.c: New file. + * elf/order2mod2.c: New file. + * elf/order2mod3.c: New file. + * elf/order2mod4.c: New file. + +2005-03-19 Jakub Jelinek + + [BZ #821] + * elf/dl-open.c (dl_open_worker): Print exact l_direct_opencount value, + it has been incremented before. + +2005-03-18 Ulrich Drepper + + [BZ #821] + * elf/dl-fini.c (_dl_fini): Split sorting of the maps in separate + function _dl_sort_fini. + (_dl_sort_fini): New function. + * sysdeps/generic/ldsodefs.h: Declare _dl_sort_fini. + * elf/dl-close.c (_dl_close): Call _dl_sort_fini before running + destructors to call them in the right order. + +2005-02-07 Steven Munroe + + * sysdeps/powerpc/bits/link.h (La_ppc64_regs): Add lr_vrsave. + (La_ppc64_retval): Correct size of lrc_fp. + * sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_profile_resolve): + Fix up ABI problems and complete function. + +2005-03-10 Jakub Jelinek + + * math/test-misc.c (main): Add some more tests. + +2005-03-17 Jakub Jelinek + + * posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed + __wcrtomb. Check return values of other __wcrtomb calls. + * posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars): + Change mbclen type to size_t. + (build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t. + Handle mb chars whose upper case doesn't have multibyte representation + in locale's charset. + +2005-03-15 Jakub Jelinek + + * malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc, + public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with + #ifndef _LIBC. + + [BZ #779] + * malloc/malloc.c (public_mTRIm): Initialize malloc if not yet + initialized. + +2005-03-10 Jakub Jelinek + + * misc/sys/cdefs.h (__always_inline): Define. + * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): + Use __always_inline instead of __inline. + * socket/bits/socket2.h (recv, recvfrom): Likewise. + * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise. + * string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, + __memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk, + __strcat_ichk, __strncat_ichk): Use __always_inline instead of + __inline__ __attribute__ ((__always_inline__)). + +2005-03-09 Jakub Jelinek + + * debug/tst-chk1.c: Include sys/socket.h and sys/un.h. + (do_test): Add new tests for recv, recvfrom, getcwd, getwd and + readlink. Add some more tests for read, pread, pread64, fgets and + fgets_unlocked. + + * posix/bits/unistd.h (read, pread, pread64, readlink, + getcwd, getwd): Change macros into extern inline functions. + (__read_alias, __pread_alias, __pread64_alias, __readlink_alias, + __getcwd_alias, __getwd_alias): New prototypes. + * socket/bits/socket2.h (recv, recvfrom): Change macros into + extern inline functions. + (__recv_alias, __recvfrom_alias): New prototypes. + * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros + into extern inline functions. + (__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes. + + * debug/pread_chk.c (__pread_chk): Fix order of arguments passed + to __pread. + * debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed + to __pread64. + +2005-03-18 Daniel Jacobowitz + + * configure.in: Use %function instead of @function. + +2005-03-18 Ulrich Drepper + + [BZ #821] + * include/link.h (struct link_map): Remove l_opencount. Add l_removed. + Change type of l_idx to int. + * elf/dl-close.c: Basically rewrite. Do not use l_opencount to + determine whether a DSO has to be unloaded. Instead compute this + in this function. + * elf/dl-deps.c: No need to manipulate l_opencount anymore. + * elf/dl-lookup.c: Likewise. + * elf/rtld.c: Likewise + * elf/dl-open.c: Likewise. Use l_init_called to determine whether + object was just loaded. + * elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount. + * elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which + is about to be unloaded as a match. + (_dl_map_object): Likewise. + * elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about + to be unloaded. + * elf/circleload1.c: Don't use l_opencount anymore. + * elf/neededtest.c: Likewise. + * elf/neededtest2.c: Likewise. + * elf/neededtest3.c: Likewise. + * elf/neededtest4.c: Likewise. + * elf/unload.c: Likewise. + * elf/unload2.c: Likewise. + * elf/loadtest.c: Likewise. + + [BZ #821] + * elf/rtld.c: Preloading errors are now never fatal. + +2005-03-08 Jakub Jelinek + + [BZ #821] + * elf/Makefile: Add rules to build and run unload5 test. + * elf/unload5.c: New file. + + [BZ #821] + * elf/Makefile: Add rules to build and run unload4 test. + * elf/unload4.c: New file. + * elf/unload4mod1.c: New file. + * elf/unload4mod2.c: New file. + * elf/unload4mod3.c: New file. + * elf/unload4mod4.c: New file. + +2005-03-17 Roland McGrath + + * nscd/aicache.c (addhstaiX): Tweak type to avoid warning. + +2005-03-16 Richard Henderson + + [BZ #721] + * include/libc-symbols.h (__hidden_proto): Remove bogus declaration + of internal. + (__hidden_def1, __hidden_dot_def1): Remove. + (__hidden_def2, __hidden_def3): Remove. + (__hidden_ver1): New. + (hidden_ver, hidden_def, hidden_weak): Use it. + (hidden_data_ver, hidden_data_ver, hidden_data_weak): Use non-data + version of the macro. + + [BZ #721] + * include/wchar.h (__wcscoll): Remove. + * wcsmbs/wcscoll.c: Define wcscoll directly instead of via __wcscoll. + * string/strcoll.c: Don't issue libc_hidden_def STRCOLL redefined. + +2005-03-16 Daniel Jacobowitz + + * elf/elf.h: Define MIPS TLS relocations. + +2005-03-16 Ulrich Drepper + + * elf/circleload1.c (main): Pretty printing. + +2005-03-15 Jakub Jelinek + + * sysdeps/generic/wordexp.c (exec_comm_child): Add inline keyword. + Patch by Dan Kegel . + + [BZ #721] + * elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative, + elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): + Add inline keyword. + * sysdeps/alpha/dl-machine.h (elf_machine_rela, + elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline + attribute. + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, + elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change + static inline into auto inline. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, + elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. + * sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela): + Likewise. + * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative, + elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): + Likewise. + +2005-03-15 Jakub Jelinek + + [BZ #789] + * sysdeps/i386/i686/hp-timing.h (HP_TIMING_ACCUM): Fix asm constraints. + Remove memory clobber. + + * sysdeps/x86_64/hp-timing.h (HP_TIMING_ACCUM): Make the addition + thread-safe. Subtract GLRO(dl_hp_timing_overhead) from Diff. + +2005-03-14 Jakub Jelinek + + * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Don't include + asm/types.h. + +2005-03-10 GOTO Masanori + + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Define MAP_POPULATE and + MAP_NONBLOCK. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + Correct MAP_GROWSDOWN value. + +2005-03-13 Roland McGrath + + * elf/tls-macros.h: #include_next to get a sysdeps + version if there is one. Only #error if macros are then undefined. + * sysdeps/generic/tls-macros.h: New file. + +2005-03-10 GOTO Masanori + + * sysdeps/hppa/configure.in: Remove old Makefile leftovers. + * sysdeps/hppa/configure: Regenerated. + +2005-03-08 Roland McGrath + + * sysdeps/gnu/errlist-compat.awk: Use NERR in all array decls, so + array types match exactly in C alias decls. + +2005-03-07 Ulrich Drepper + + * malloc/arena.c (ptmalloc_init): Recognize MALLOC_PERTURB_ and call + mallopt appropriately. + * malloc/malloc.h: Define M_PERTURB. + * malloc/malloc.c (perturb_byte): New variable. + (alloc_perturb, free_perturb): New macros. + (_int_malloc): Before returning, overwrite the memory if this is + requested. + (_int_free): Overwrite freed memory if requested. + (mALLOPt): Handle M_PERTURB. + * test-skeleton.c: Add call to mallopt with M_PERTURB command. + + * elf/dl-close.c (_dl_close): Decrement l_opencount before + printing debug message. + * elf/dl-open.c (dl_open_worker): Always print the new opencount + in debug messages. + +2005-03-06 Ulrich Drepper + + * elf/dl-close.c (_dl_close): Unify debug message format. + + * elf/dl-close.c (_dl_close): Print debug message just before + destroying a link map. + + * elf/do-lookup.h (do_lookup_x): Add namespace info to debug output. + * elf/dl-version.c (match_symbol): Likewise. + + * posix/bits/unistd.h (pread): Fix typo in __USE_FILE_OFFSET64 code. + + * debug/recv_chk.c (__recv_chk): Always fail if request could + overflow the buffer. + * debug/recvfrom_chk.c (__recvfrom_chk): Likewise. + * socket/bits/socket2.h (recv): Avoid calls to the _chk variant if + we know the call succeeds. + (recvfrom): Likewise. + +2005-03-05 Ulrich Drepper + + * posix/regexec.c (check_node_accept_bytes): Correct cast to avoid + warning. + * posix/regex_internal.c (re_string_reconstruct): Add cast to + avoid warning. + (build_wcs_upper_buffer): Change type of bug to plain char. + * locale/weightwc.h (findidx): Add casts to avoid warnings. + * time/mktime.c (ranged_convert): Initialize tm to make the + compiler happy. + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Add casts to avoid warnings. + * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Add casts to avoid warnings. + * wcsmbs/mbsnrtowcs.c: Add casts to avoid warnings. + * wcsmbs/wcsrtombs.c (__wcsrtombs): Add casts to avoid warnings. + * wcsmbs/wcrtomb.c (__wcrtomb): Add casts to avoid warnings. + * wcsmbs/mbrtowc.c (__mbrtowc): Use unsigned char for outbuf. + * wcsmbs/wctob.c (wctob): Make buf array of unsigned char. + * sysdeps/generic/strchrnul.c: Add cast to avoid warning. + * libio/iofwide.c: Add casts to avoid warnings. + * stdio-common/printf-prs.c (parse_printf_format): Introduce new + variable f to avoid warnings. + * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): + Fix a few casts to avoid warnings. + * iconv/gconv_simple.c (internal_utf8_loop): Make start unsigned + to avoid warning. + + [BZ #1101] + * posix/regex_internal.c [_LIBC] (build_wcs_buffer): Avoid using + dynamically sized array. + (build_wcs_upper_buffer): Likewise. + +2005-03-05 Jakub Jelinek + + * include/bits/unistd.h: New file. + * include/bits/socket2.h: New file. + +2005-03-05 Ulrich Drepper + + * sunrpc/key_call.c: Remove doors support. + * sunrpc/Makefile: Remove CPPFLAGS-key_call.c definition. + * configure.in: Remove test for doors support which never existed. + * config.make.in: Remove have_doors entry. + + * configure.in: Make sure at least gcc 3.4 is used. Undo last change. + * config.make.in: Undo last change. + + * sysdeps/i386/Makefile (CFLAGS-initfini.s): Unconditionally use + -mtune. + +2005-03-05 Roland McGrath + + * sysdeps/generic/ldsodefs.h (_dl_out_of_memory_internal): Remove decl. + (_dl_out_of_memory): Use rtld_hidden_proto. + * elf/dl-error.c (_dl_out_of_memory): Use rtld_hidden_data_def. + (_dl_signal_error): Don't use INTUSE on _dl_out_of_memory. + * elf/dl-open.c (_dl_open): Likewise. + * elf/dl-deps.c (_dl_map_object_deps): Likewise. + + * sunrpc/des_impl.c (des_set_key): Make first argument unsigned char *. + + * elf/dl-addr.c (_dl_addr): Add a cast. + + [BZ #821] + * elf/unload3mod4.c: Declare foo. + * elf/testobj2.c: Include . + + * sysdeps/gnu/errlist.awk: Emit NERR macro for _sys_nerr_internal + value constant, and use it in the defn. + * sysdeps/gnu/errlist-compat.awk: Use NERR in array decl. + Use actual size for compat array decls. + + * config.make.in (cc-mtune): New substituted variable. + * configure.in (libc_cv_cc_mtune): New test for -mtune= switch, + done only if libc_mtune_example is defined. + * sysdeps/i386/configure.in (libc_mtune_example): Set it. + * sysdeps/i386/Makefile (CFLAGS-initfini.s): Use $(cc-mtune). + +2005-03-05 Jakub Jelinek + + [BZ #721] + * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define + unconditionally to (defined RTLD_BOOTSTRAP). + * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise. + +2005-03-05 Jakub Jelinek + + * Makerules ($(inst_libdir)/libc.so): Use $(slibdir) instead of + $(inst_slibdir) in AS_NEEDED directive. + +2005-03-03 Jakub Jelinek + + * posix/bits/unistd.h (pread, pread64): Don't swap function arguments. + +2005-03-01 H.J. Lu + + [BZ #776] + * iconv/iconvconfig.c: Fix comment for the output file. + (write_output): Clear padding in header. + +2005-03-03 Ulrich Drepper + + [BZ #821] + * elf/dl-close.c (_dl_close): Don't try to set up new searchpath if the + loader is closed. Fixes unload3. + * elf/tst-global1.c: New file. + * elf/Makefile (tests): Add tst-global1. + * elf/testobj2.c (p): New function. + +2005-03-03 Jakub Jelinek + + [BZ #821] + * elf/Makefile: Add rules to build and run unload3 test. + * elf/unload3.c: New test. + * elf/unload3mod1.c: New file. + * elf/unload3mod2.c: New file. + * elf/unload3mod3.c: New file. + * elf/unload3mod4.c: New file. + +2005-02-21 Alan Modra + + [BZ #1394] + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't + use __uint128_t. + +2005-03-01 Jakub Jelinek + + * posix/bits/unistd.h (read, pread, pread64): Use __bos0 instead + of __bos. + * socket/bits/socket2.h (recv, recvfrom): Likewise. + +2005-03-01 Roland McGrath + + [BZ #721] + * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside + of [RESOLVE_MAP]. + +2005-03-01 Alfred M. Szmidt + + [BZ #777] + * elf/dl-load.c (__stack_prot) [!PROT_GROWSUP && !PROT_GROWSDOWN]: + Add missing initializer. + + [BZ #777] + * malloc/arena.c: #include outside of [SHARED && + USE_TLS && !USE___THREAD]. + +2005-02-26 GOTO Masanori + + * csu/Makefile: Use printf instead of echo for some shells. + +2005-02-28 Roland McGrath + + * debug/warning-nop.c (__nop): Rename to nop, make it static. + (__warndecl): Use alias attribute directly, instead of strong_alias + macro. Add attribute_hidden. + +2005-02-28 Ulrich Drepper + + * posix/bits/unistd.h: Avoid calling __*_chk variants if we can + determine the call will never trigger a failure. + * debug/read_chk.c (__read_chk): Always fail if the buffer is too + small. + * debug/readlink_chk.c (__readlink_chk): Likewise. + * debug/pread64_chk.c (__pread64_chk): Likewise. + * debug/pread_chk.c (__pread_chk): Likewise. + + * sysdeps/i386/i686/memset_chk.S: Remove alias and warning. + * sysdeps/x86_64/memset_chk.S: Likewise. + +2005-02-24 Roland McGrath + + * debug/Versions (libc: GLIBC_2.4): Remove + __memset_zero_constant_len_parameter. + * sysdeps/generic/memset_chk.c: Remove alias and warning. + * misc/sys/cdefs.h (__warndecl): New macro. + * debug/warning-nop.c: New file. + * string/bits/string3.h (memset): Call __warn_memset_zero_len with no + arguments, instead of calling __memset_zero_constant_len_parameter. + Use __warndecl for __warn_memset_zero_len. + * debug/Makefile (routines): Add $(static-only-routines). + (static-only-routines): New variable. + +2005-02-27 Ulrich Drepper + + * po/tr.po: Update from translation team. + +2005-02-26 Ulrich Drepper + + * elf/dl-addr.c: Cleanups. Move declaration next to first use. + + * dlfcn/dlerror.c (check_free): New function. Extract common code + from fini and free_key_mem. Check whether this is libdl in the + base namespace. + +2005-02-25 Ulrich Drepper + + * elf/dl-lookup.c (_dl_debug_bindings): Add namespace information + to debug output. + +2004-11-11 Richard Sandiford + + [BZ #758] + * sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): Only + preprocess if it defines ABI-prefixed syscall names + like __NR_N32_open. Just include otherwise. + * sysdeps/unix/sysv/linux/mips/configure: Regenerate. + * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: Delete + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (SYS_ify): Use the + standard __NR prefix. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (SYS_ify): Likewise. + * sysdeps/unix/sysv/linux/mips/Makefile (syscall-%.h): Rework so that + the output file is compatible with both pre-2.6 and 2.6 kernel headers. + Extract separate syscall lists for each ABI. + +2005-02-23 Ulrich Drepper + + * Makerules (libc.so): Add AS_NEEDED line for dynamic linker. + + [BZ #719] + * elf/Makefile: Run tst-tls9-static again. + +2005-02-22 Ulrich Drepper + + [BZ #719] + * sysdeps/generic/libc-tls.c (static_dtv): Size the same as the + slotinfo array. + (__libc_setup_tls): Initialize length of DTV based on array length. + * elf/dl-load.c: Revert last change. + * sysdeps/generic/dl-tls.c: Revert last change. + + * posix/Makefile (tests): Add tst-execvp1, tst-execvp2, tst-execlp1, + tst-execlp2, tst-execv1, tst-execv2, tst-execl1, tst-execl2, + tst-execve1, tst-execve2, tst-execle1, and tst-execle2. + * posix/tst-execl1.c: New file. + * posix/tst-execl2.c: New file. + * posix/tst-execle1.c: New file. + * posix/tst-execle2.c: New file. + * posix/tst-execlp1.c: New file. + * posix/tst-execlp2.c: New file. + * posix/tst-execv1.c: New file. + * posix/tst-execv2.c: New file. + * posix/tst-execve1.c: New file. + * posix/tst-execve2.c: New file. + * posix/tst-execvp1.c: New file. + * posix/tst-execvp2.c: New file. + +2005-02-22 Roland McGrath + + * include/signal.h: Revert last change. + (__sigemptyset): Use __builtin_memset instead of memset. + +2005-02-22 Ulrich Drepper + + * sysdeps/unix/sysv/linux/libc_fatal.c (__libc_message): Use + non-cancelable I/O functions. + +2005-02-22 Jakub Jelinek + + [BZ #769] + * nscd/nscd-client.h: Include sys/uio.h. + (__readall, __readvall, writeall): New prototypes. + * nscd/connections.c (writeall): New function. + (handle_request): Use it. + * nscd/aicache.c (addhstaiX): Likewise. + * nscd/initgrcache.c (addinitgroupsX): Likewise. + * nscd/hstcache.c (cache_addhst): Likewise. + * nscd/grpcache.c (cache_addgr): Likewise. + * nscd/pwdcache.c (cache_addpw): Likewise. + * nscd/nscd_helper.c (__readall, __readvall): New functions. + * nscd/nscd_getai.c (__nscd_getai): Use them. + * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. + * nscd/nscd_getgr_r.c (__nscd_getgr_r): Likewise. + * nscd/nscd_gethst_r.c (__nscd_gethst_r): Likewise. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. + +2005-02-22 Roland McGrath + + * include/sys/socket.h: Declare __recv. + * sysdeps/generic/recv.c (recv): Rename to __recv, and add weak alias. + * sysdeps/mach/hurd/recv.c: Likewise. + + * sysdeps/unix/sysv/linux/libc_fatal.c: Include for + __backtrace_* decls. + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h + (INTERNAL_SYSCALL_ERROR_P): Evalute VAL. Parenthesize ERR. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. + + * include/signal.h: Include for memset decl. + +2005-02-22 Andreas Schwab + + * posix/execvp.c (execvp): Fix invalid free. + +2005-02-22 Jakub Jelinek + + [BZ #1095] + * malloc/Makefile (CFLAGS-mcheck-init.c): Add. + * sunrpc/Makefile: Add $(PIC-ccflag) to CFLAGS-x* for + librpcsvc.a objects. + +2005-02-21 Ulrich Drepper + + [BZ #1107] + * iconvdata/ibm930.h: Correct Yen mapping. + * iconvdata/ibm939.h: Likewise. + * iconvdata/testdata/IBM930..UTF8: Adjust test data. + * iconvdata/testdata/IBM939..UTF8: Likewise. + Patch by Jiro Sekiba . + + * iconvdata/Makefile (modules): Add IBM1025, IBM1122, IBM1137, IBM1153, + IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158. + (distribute): Add ibm1025.c, ibm1025.h, ibm1122.c, ibm1122.h, + ibm1137.c, ibm1137.h, ibm1153.c, ibm1153.h, ibm1154.c, ibm1154.h, + ibm1155.c, ibm1155.h, ibm1156.c, ibm1156.h, ibm1157.c, ibm1157.h, + ibm1158.c, and ibm1158.h. + * iconvdata/TESTS: Add IBM1025, IBM1122, IBM1137, IBM1153, + IBM1154, IBM1155, IBM1156, IBM1157, and IBM1158. + * iconvdata/gconv-modules: Likewise. + * iconvdata/ibm1025.c: New file. + * iconvdata/ibm1025.h: New file. + * iconvdata/ibm1122.c: New file. + * iconvdata/ibm1122.h: New file. + * iconvdata/ibm1137.c: New file. + * iconvdata/ibm1137.h: New file. + * iconvdata/ibm1153.c: New file. + * iconvdata/ibm1153.h: New file. + * iconvdata/ibm1154.c: New file. + * iconvdata/ibm1154.h: New file. + * iconvdata/ibm1155.c: New file. + * iconvdata/ibm1155.h: New file. + * iconvdata/ibm1156.c: New file. + * iconvdata/ibm1156.h: New file. + * iconvdata/ibm1157.c: New file. + * iconvdata/ibm1157.h: New file. + * iconvdata/ibm1158.c: New file. + * iconvdata/ibm1158.h: New file. + * iconvdata/testdata/IBM1025: New file. + * iconvdata/testdata/IBM1025..UTF8: New file. + * iconvdata/testdata/IBM1122: New file. + * iconvdata/testdata/IBM1122..UTF8: New file. + * iconvdata/testdata/IBM1137: New file. + * iconvdata/testdata/IBM1137..UTF8: New file. + * iconvdata/testdata/IBM1153: New file. + * iconvdata/testdata/IBM1153..UTF8: New file. + * iconvdata/testdata/IBM1154: New file. + * iconvdata/testdata/IBM1154..UTF8: New file. + * iconvdata/testdata/IBM1155: New file. + * iconvdata/testdata/IBM1155..UTF8: New file. + * iconvdata/testdata/IBM1156: New file. + * iconvdata/testdata/IBM1156..UTF8: New file. + * iconvdata/testdata/IBM1157: New file. + * iconvdata/testdata/IBM1157..UTF8: New file. + * iconvdata/testdata/IBM1158: New file. + * iconvdata/testdata/IBM1158..UTF8: New file. + Contributed by Jiro Sekiba . + +2005-02-10 Paolo Bonzini + + * posix/regcomp.c (lower_subexp): Do not optimize empty + subexpressions even with REG_NOSUB. + * posix/rxspencer/tests: Add a previously failing testcase. + +2005-02-21 Alan Modra + + [BZ #719] + * elf/dl-reloc.c (_dl_nothread_init_static_tls): Assert that dtv + array index is within bounds. + +2005-02-21 Ulrich Drepper + + [BZ #719] + * elf/dl-load.c: Do not allow PT_TLS in modules loaded in statically + linked code. + * sysdeps/generic/dl-tls.c [!SHARED]: Don't build _dl_next_tls_modid. + * elf/Makefile: Remove rules to build and run tst-tls9-static. + + [BZ #719] + * elf/dl-reloc.c (_dl_nothread_init_static_tls): Avoid using + THREAD_DTV multiple times, this minimally reduces code size on + some archs. + +2005-02-21 Jakub Jelinek + + [BZ #768] + * nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to + NETDB_INTERNAL if buffer is too small. + + [BZ #768] + * nscd/hstcache.c (INCR): Remove. + (addhstbyX): Double buflen in each iteration rather than add INCR. + * nscd/grpcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + +2005-02-21 Ulrich Drepper + + * sysdeps/unix/sysv/linux/libc_fatal.c: Print backtrace and memory + map if requested. + * debug/chk_fail.c: Request backtrace and memory map dump. + + * Versions.def: Add GLIBC_2.4 for libc. + * debug/fgets_chk.c: New file. + * debug/fgets_u_chk.c: New file. + * debug/getcwd_chk.c: New file. + * debug/getwd_chk.c: New file. + * debug/readlink_chk.c: New file. + * debug/read_chk.c: New file. + * debug/pread_chk.c: New file. + * debug/pread64_chk.c: New file. + * debug/recv_chk.c: New file. + * debug/recvfrom_chk.c: New file. + * debug/Versions: Add all new functions with version GLIBC_2.4. + * debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk, + pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk, + getwd_chk, and getcwd_chk. Plus appropriate CFLAGS definitions. + * debug/tst-chk1.c: Add more tests. + * libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked. + * include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk. + * posix/unistd.h: Include for fortification. + * posix/bits/unistd.h: New file. + * posix/Makefile (headers): Add bits/unistd.h. + * socket/sys/socket.h: Include for fortification. + * socket/bits/socket2.h: New file. + * socket/Makefile (headers): Add bits/socket2.h. + + * string/bits/string3.h: Extend memset macro to check for zero 3rd + parameter and use __memset_zero_constant_len_parameter in that case. + * sysdeps/generic/memset_chk.c: Add + __memset_zero_constant_len_parameter alias and linker warning. + * debug/Versions: Add __memset_zero_constant_len_parameter to libc + with version GLIBC_2.4. + + * sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__ + in __STD_TYPE definition. + +2005-02-21 Jakub Jelinek + + * malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print + the error message rather than program name. + +2005-02-21 Ulrich Drepper + + [BZ #767] + * posix/unistd.h: symlink and readlink are unconditionally + available in the 2001 spec. + +2005-02-16 Roland McGrath + + * intl/dcigettext.c (_nl_find_msg): Add a cast. + + * nis/nis_clone_dir.c (nis_clone_directory): Use char * for ADDR. + * nis/nis_clone_obj.c (nis_clone_object): Likewise. + * nis/nis_clone_res.c (nis_clone_result): Likewise. + + * resolv/nss_dns/dns-network.c (getanswer_r): Use const unsigned char * + for END_OF_MESSAGE and CP. + + * resolv/res_send.c (send_dg): Add else branch for case impossible + unless `poll' is buggy. + + * crypt/crypt_util.c (__setkey_r): Add a cast. + + * locale/programs/linereader.c (get_toplvl_escape): Use size_t for + NBYTES, and unsigned char * for BYTES. + + * locale/programs/charmap.c (charmap_new_char): Use size_t and + unsighed char * for NBYTES, BYTES parameters. + + * sysdeps/generic/dl-hash.h (_dl_elf_hash): Take const char * argument + and cast it. + * sysdeps/i386/i686/dl-hash.h (_dl_elf_hash): Likewise. + + * sunrpc/create_xid.c (_create_xid): Don't use unsigned long for RES. + + * sunrpc/svcauth_des.c (_svcauth_des): Fix cast type. + + * sunrpc/auth_des.c (authdes_create): Don't use u_char for PKEY_DATA. + (authdes_marshal): Don't use unsigned int for LEN. + * sunrpc/xdr.c (xdr_hyper): Don't use unsigned long for T2. + (xdr_u_hyper): Likewise. + (xdr_u_short): Don't use u_long for L. + * sunrpc/xdr_intXX_t.c (xdr_int64_t): Don't use uint32_t for T2. + + * inet/rexec.c (rexec_af): Use socklen_t. + * sunrpc/key_call.c (getkeyserv_handle): Likewise. + * sunrpc/rtime.c (rtime): Likewise. + * resolv/res_send.c (send_vc, send_dg): Likewise. + * nis/nis_callback.c (__nis_create_callback): Likewise. + + * sysdeps/generic/libc-start.c: Use unsigned int for nthreads ptr. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix type of ADDR local. + + * libio/libio.h (_IO_BE): Add parenthesis around EXPR. + + * intl/dcigettext.c (INTVARDEF, INTUSE): Macros removed. + (_nl_default_dirname): Use libc_hidden_data_def instead of INTVARDEF. + (libc_freeres_fn, DCIGETTEXT): Don't use INTUSE. + * intl/bindtextdom.c (INTUSE): Macro removed. + (_nl_default_dirname): Use libc_hidden_proto. + (set_binding_values): Don't use INTUSE. + * include/libintl.h (_libc_intl_domainname_internal): Decl removed. + (_libc_intl_domainname): Use libc_hidden_proto. + * posix/regex_internal.h (gettext): Remove INTUSE on it. + * locale/SYS_libc.c (_libc_intl_domainname): Use libc_hidden_data_def + rather than INTDEF. + * include/libintl.h (_): Don't use *_internal name. + + * ctype/ctype-extn.c (__ctype_tolower, __ctype_toupper): Use int32_t, + not uint32_t. + * locale/lc-ctype.c (_nl_postload_ctype): Likewise for assignments. + + * iconv/gconv_open.c (__gconv_open): Remove useless cast. + + [BZ #721] + * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside + of [RESOLVE_MAP]. + * sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise. + * sysdeps/powerpc/powerpc32/dl-machine.h + (elf_machine_rel, elf_machine_rel_relative): Removed. + * sysdeps/powerpc/powerpc64/dl-machine.h + (elf_machine_rel, elf_machine_rel_relative): Removed. + +2005-02-03 Alexandre Oliva + + [BZ #721] + * elf/dynamic-link.h: Don't declare nested auto functions that are + not going to be defined. + +2004-07-23 Jakub Jelinek + + [BZ #284] + * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define + if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined. + +2005-02-16 Roland McGrath + + * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Move UBP_EV defn + inside [! SHARED] where it's used. + +2005-02-15 Ulrich Drepper + + * sysdeps/generic/bits/byteswap.h: Make sure result of all the + functions and macros is unsigned. + +2005-02-11 Barry deFrese + + [BZ #722] + * sysdeps/mach/hurd/setresgid.c: Use weak_alias. + * sysdeps/mach/hurd/setresuid.c: Likewise. + +2005-02-14 GOTO Masanori + + * misc/sys/syslog.h: Fix typo in comment. + +2005-02-14 Roland McGrath + + [BZ #720] + * sysdeps/unix/sysv/linux/sys/kd.h: Don't leave _LINUX_TYPES_H defined + if it wasn't originally. + +2005-02-14 GOTO Masanori + + * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove the duplicated + getpeername entry. + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. + +2005-02-11 Jakub Jelinek + + * scripts/soversions.awk: Only record first WORDSIZE{32,64} + matching line. + +2005-02-14 Alan Modra + + [BZ #721] + * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define + with auto inline, and attribute always_inline. + (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. + (elf_machine_rel, elf_machine_rel_relative): Likewise. + * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise. + (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. + (elf_machine_rel, elf_machine_rel_relative): Likewise. + (elf_machine_tprel): Likewise. + +2005-02-14 Andreas Schwab + + * manual/filesys.texi (Random Access Directory): Fix type of file + position value for telldir and seekdir. + (Attribute Meanings): Fix typo. + +2005-02-14 H.J. Lu + + * csu/elf-init.c (__libc_csu_fini): Enable if LIBC_NONSHARED + isn't defined. + * sysdeps/generic/libc-start.c (LIBC_START_MAIN): Call fini + if SHARED isn't defined. + * elf/Makefile (tests-static): Add tst-array1-static. + ($(objpfx)tst-array1-static.out): New target. + * elf/tst-array1-static.c: New file. + +2005-02-11 Jakub Jelinek + + [BZ #1100] + * debug/chk_fail.c (__chk_fail): Add a while (1) loop around + __libc_message to kill GCC warning about noreturn function returning. + + * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag + before relocating ld.so again. + + * elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even + for already prelinked ld.so. + +2005-02-11 Roland McGrath + + [BZ #715] + * Makefile (installed-stubs): New variable. + Set to $(inst_includedir)/gnu/stubs.h if $(biarch) is no, + or to $(inst_includedir)/gnu/stubs-$(biarch).h if otherwise. + [$(biarch) != no] (install-others-nosubdir): Add $(installed-stubs). + ($(inst_includedir)/gnu/stubs.h): Use $(installed-stubs) for this + rule's target. + ($(inst_includedir)/gnu/stubs.h): New target, install from ... + * include/stubs-biarch.h: New file. + + * shlib-versions (i.86-.*-.*): Add WORDSIZE64 line mapping to x86_64. + + * Makeconfig ($(common-objpfx)soversions.mk): Depend on Makeconfig. + Emit defn for variable `biarch'. + + * include/stub-tag.h: Update comment. + + * scripts/soversions.awk: Fix default version set handling. + +2005-02-10 Roland McGrath + + [BZ #157] + * include/libc-symbols.h (stub_warning): Emit a marker section called + .gnu.glibc-stub.NAME. + * Makerules ($(objpfx)stubs): Depend on object files, not dep files. + Use objdump to collect those marker section names. + ($(common-objpfx)shlib.lds): Discard .gnu.glibc-stub.* sections. + + * Rules (subdir_objs, subdir_stubs): New phony targets. + * Makefile (+subdir_targets): Add them. + + * Makerules ($(common-objpfx)Versions.all): Grok new leading column in + soversions.i. + + * scripts/lib-names.awk: Consider [0-9].* a "number", not just [0-9]+. + Reported by H.J. Lu . + + * scripts/lib-names.awk: Always print WORDSIZE32 section first when + doing two. + +2005-02-10 Jakub Jelinek + + * sysdeps/powerpc/powerpc32/bits/link.h: Removed. + * sysdeps/powerpc/powerpc64/bits/link.h: Moved to... + * sysdeps/powerpc/bits/link.h: ... here. New file. + +2005-02-09 Jakub Jelinek + + [BZ #710] + * stdlib/random_r.c (__initstate_r): Save old state. + * stdlib/Makefile (tests): Add tst-random2. + * stdlib/tst-random2.c: New test. + Reported by Peter Bergner . + +2005-01-25 H.J. Lu + + * dlfcn/dlfcn.c (init): Put it in .init_array section. + +2005-02-10 Roland McGrath + + [BZ #632] + * scripts/soversions.awk: Expect cpu, vendor, os as separate variables + from command line. + Grok shlib-versions lines with WORDSIZE* in second column. + Add new leading column to output, DEFAULT for existing output lines. + Also emit lines with WORDSIZE* for alternate configurations. + * Makeconfig ($(common-objpfx)soversions.i): Pass those variables. + ($(common-objpfx)soversions.mk): Grok new column, use only DEFAULT. + ($(common-objpfx)gnu/lib-names.stmp): Depend on soversions.i instead + of soversions.mk; replace inline shell script with use of ... + * scripts/lib-names.awk: New file. If input has non-DEFAULT lines, + emit multiple sets of macros under #if. + * shlib-versions (x86_64-.*-.*): Add WORDSIZE32 line mapping to i686. + (s390x-.*-.*): Likewise for s390. + (powerpc64-.*-.*): Likewise for powerpc. + (sparc64-.*-.*): Likewise for sparc. + (s390-.*-.*, powerpc.*-.*-.*, sparc.*-.*-.*): Add WORDSIZE64 entries + for these mapping back to the above. + +2005-02-08 Jakub Jelinek + + * elf/dl-load.c (_dl_map_object_from_fd): Fix a typo. + +2005-02-08 Andreas Schwab + + * sysdeps/m68k/dl-machine.h (elf_machine_rela): Remove use of + RESOLVE. + +2005-02-07 Richard Henderson + + [BZ #721] + * iconvdata/jis0208.h (struct jisx0208_ucs_idx): Move before use. + +2005-02-08 Kaz Kojima + + * sysdeps/sh/dl-machine.h (elf_machine_rela): Remove code using + RESOLVE. + +2005-02-07 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): Make sure registers are + set correctly. + +2005-01-07 Richard Henderson + + [BZ #721] + * math/math_private.h (__copysign): Define as builtin for gcc 4. + (__copysignf, __copysignl): Likewise. + * sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define + for gcc 4.0. + (copysignf, copysignl, fabsf, fabs): Likewise. + (__copysign, __copysignf, __copysignl): Remove. + (__fabs, __fabsf): Remove. + +2005-01-07 Jakub Jelinek + + [BZ #738] + * elf/dl-load.c (open_path): If rtld_search_dirs is in RELRO segment, + avoid writing to it if none of the standard search directories exist. + +2005-02-07 Steven Munroe + + [BZ #700] + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S + (__novec_setcontext, __setcontext): Fix typo so CCR is restored. + Load MSR as a doubleword. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S + (__novec_swapcontext, __swapcontext): Likewise. + +2005-02-07 Ulrich Drepper + + * iconv/iconv_prog.c (main): Provide more help in case on an error. + + * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Define. + +2005-02-07 Jakub Jelinek + + [BZ #741] + * nscd/nscd.c (termination_handler): Avoid segfault if some database + is not enabled. + + [BZ #741] + * nscd/nscd_getai.c (__nscd_getai): If ai_resp->found == -1, set + __nss_not_use_nscd_hosts and return -1. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): If + initgr_resp->found == -1, set __nss_not_use_nscd_group and return -1. + Avoid leaking sockets. + +2005-01-28 Andreas Schwab + H.J. Lu + + [BZ #677] + * elf/dl-runtime.c (fixup): Change return type to + DL_FIXUP_VALUE_TYPE. Use DL_FIXUP_VALUE_TYPE, + DL_FIXUP_MAKE_VALUE and DL_FIXUP_VALUE_CODE_ADDR for relocation + values. Use DL_FIXUP_VALUE_ADDR and DL_FIXUP_ADDR_VALUE to + store and retrieve relocation values. + (profile_fixup): Likewise. + * include/link.h (link_map): Use DL_FIXUP_VALUE_TYPE for + l_reloc_result. + * sysdeps/generic/dl-fptr.h (link_map): Forward declaration. + * sysdeps/generic/dl-lookupcfg.h (DL_FIXUP_VALUE_TYPE): New. + (DL_FIXUP_MAKE_VALUE): Likewise. + (DL_FIXUP_VALUE_CODE_ADDR): Likewise. + (DL_FIXUP_VALUE_ADDR): Likewise. + (DL_FIXUP_ADDR_VALUE): Likewise. + * sysdeps/ia64/dl-lookupcfg.h: Include for "struct fdesc". + (DL_FIXUP_VALUE_TYPE): New. + (DL_FIXUP_MAKE_VALUE): Likewise. + (DL_FIXUP_VALUE_CODE_ADDR): Likewise. + (DL_FIXUP_VALUE_ADDR): Likewise. + (DL_FIXUP_ADDR_VALUE): Likewise. + * sysdeps/ia64/dl-machine.h (elf_machine_profile_fixup_plt): Removed. + (elf_machine_profile_plt): Removed. + (elf_machine_fixup_plt): Change return type and type of value + parameter to struct fdesc. + (elf_machine_plt_value): Likewise. + (elf_machine_rela): Use DL_FIXUP_MAKE_VALUE to construct + argument for elf_machine_fixup_plt. + +2005-02-07 Jakub Jelinek + + [BZ #742] + * nscd/nscd.init (reload): Print Reloading nscd: before and a newline + after the status string printed by killproc. + +2004-11-18 Alexandre Oliva + + * manual/.cvsignore: Add dir-add.texi. + +2005-02-06 Richard Henderson + + * sysdeps/alpha/dl-machine.h (elf_machine_rela): Use RESOLVE_MAP + all the time. + +2004-11-03 Marcus Brinkmann + + * configure.in (sysnames): Append sysdeps/generic for each add-on. + * configure: Regenerated. + +2005-02-02 Alfred M. Szmidt + + * sysdeps/mach/hurd/tls.h: Include + (dtv_t): Change pointer type to be a struct which also contains + information whether the memory pointed to is static TLS or not. + + * sysdeps/generic/syslog.c (send_flags) [!send_flags]: Define it. + + * shadow/sgetspent_r.c (FALSE): Macro renamed to ... + (FALSEP): ... this. Updated all references. + + [BZ #765] + * libio/fmemopen.c: Include . + +2005-01-30 Ulrich Drepper + + [BZ #1103] + * nscd/nscd_helper.c (get_mapping): Use MSG_NOSIGNAL if available. + * nscd/connections.c (send_ro_fd): Likewise. + +2005-01-28 H.J. Lu + + * elf/tst-auditmod1.c: Add ia64 entries. + * sysdeps/generic/ldsodefs.h (La_ia64_regs): New. + (La_ia64_retval): New. + (audit_ifaces): Add ia64 entries. + * sysdeps/ia64/bits/link.h: New file. + * sysdeps/ia64/dl-machine.h (elf_machine_runtime_setup): Test + for dl_profile non-null. + (ARCH_LA_PLTENTER): New. + (ARCH_LA_PLTEXIT): New. + * sysdeps/ia64/dl-trampoline.S (_dl_runtime_resolve): Allocate + only 2 output registers. Allocate stack to save/restore + 8 incoming fp registers. Call _dl_fixup instead of fixup. + (_dl_runtime_profile): Rewrite. + +2005-01-28 Martin Schwidefsky + + * sysdeps/s390/bits/link.h: New file. + * sysdeps/s390/s390-32/dl-trampoline.S: New file. + * sysdeps/s390/s390-64/dl-trampoline.S: New file. + * sysdeps/s390/s390-32/dl-machine.h: Move PLT trampolines to + dl-trampoline.S. Use RESOLVE_MAP instead of RESOLVE to protect + relocation code. + (elf_machine_runtime_setup): Test for dl_profile non-null. + (elf_machine_rela): Remove code using RESOLVE. + (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. + * sysdeps/s390/s390-64/dl-machine.h: Likewise. + * sysdeps/generic/ldsodefs.h (La_s390_32_regs, La_s390_32_retval, + La_s390_64_regs, La_s390_64_retval): New. + * elf/tst-auditmod1.c: Add s390 entries. + + [BZ #743] + * sysdeps/s390/bits/string.h (strlen, strncpy, strcat, strncat, + strncat, memchr, strcmp): Add missing memory clobber. + +2005-01-27 Ulrich Drepper + + * sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_globfree): Also + copy gl_offs. Patch by Sergey Tikhonov . + +2005-01-27 Paolo Bonzini + + [BZ #558] + * posix/regcomp.c (calc_inveclosure): Return reg_errcode_t. + Initialize the node sets in dfa->inveclosures. + (analyze): Initialize inveclosures only if it is needed. + Check errors from calc_inveclosure. + * posix/regex_internal.c (re_dfa_add_node): Do not initialize + the inveclosure node set. + * posix/regexec.c (re_search_internal): If nmatch includes unused + subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here. + + * posix/regcomp.c (parse_bracket_exp) [!RE_ENABLE_I18N]: + Do build a SIMPLE_BRACKET token. + + * posix/regexec.c (transit_state_mb): Do not examine nodes + where ACCEPT_MB is not set. + +2005-01-27 Jakub Jelinek + + * stdlib/tst-fmtmsg.c: Include stdlib.h. + * stdio-common/tst-fmemopen2.c: Include string.h. + * posix/execvp.c: Include stdbool.h. + +2004-12-13 Paolo Bonzini + + Separate parsing and creation of the NFA. Avoided recursion on + the (very unbalanced) parse tree. + [BZ #611] + * posix/regcomp.c (struct subexp_optimize, analyze_tree, calc_epsdest, + re_dfa_add_tree_node, mark_opt_subexp_iter): Removed. + (optimize_subexps, duplicate_tree, calc_first, calc_next, + mark_opt_subexp): Rewritten. + (preorder, postorder, lower_subexps, lower_subexp, link_nfa_nodes, + create_token_tree, free_tree, free_token): New. + (analyze): Accept a regex_t *. Invoke the passes via the preorder and + postorder generic visitors. Do not initialize the fields in the + re_dfa_t that represent the transitions. + (free_dfa_content): Use free_token. + (re_compile_internal): Analyze before UTF-8 optimizations. Do not + include optimization of subexpressions. + (create_initial_state): Fetch the DFA node index from the first node's + bin_tree_t *. + (optimize_utf8): Abort on unexpected nodes, including OP_DUP_QUESTION. + Return on COMPLEX_BRACKET. + (duplicate_node_closure): Fix comment. + (duplicate_node): Do not initialize the fields in the + re_dfa_t that represent the transitions. + (calc_eclosure, calc_inveclosure): Do not handle OP_DELETED_SUBEXP. + (create_tree): Remove final argument. All callers adjusted. Rewritten + to use create_token_tree. + (parse_reg_exp, parse_branch, parse_expression, parse_bracket_exp, + build_charclass_op): Use create_tree or create_token_tree instead + of re_dfa_add_tree_node. + (parse_dup_op): Likewise. Also free the tree using free_tree for + "{0}", and lower OP_DUP_QUESTION to OP_ALT: "a?" is equivalent + to "a|". Adjust invocation of mark_opt_subexp. + (parse_sub_exp): Create a single SUBEXP node. + * posix/regex_internal.c (re_dfa_add_node): Remove last parameter, + always perform as if it was 1. Do not initialize OPT_SUBEXP and + DUPLICATED, and initialize the DFA fields representing the transitions. + * posix/regex_internal.h (re_dfa_add_node): Adjust prototype. + (re_token_type_t): Move OP_DUP_PLUS and OP_DUP_QUESTION to the tokens + section. Add a tree-only code SUBEXP. Remove OP_DELETED_SUBEXP. + (bin_tree_t): Include a full re_token_t for TOKEN. Turn FIRST and + NEXT into pointers to trees. Remove ECLOSURE. + +2004-12-28 Paolo Bonzini + + [BZ #605] + * posix/regcomp.c (parse_bracket_exp): Do not modify DFA nodes + that were already created. + * posix/regex_internal.c (re_dfa_add_node): Set accept_mb field + in the token if needed. + (create_ci_newstate, create_cd_newstate): Set accept_mb field + from the tokens' field. + * posix/regex_internal.h (re_token_t): Add accept_mb field. + (ACCEPT_MB_NODE): Removed. + * posix/regexec.c (proceed_next_node, transit_states_mb, + build_sifted_states, check_arrival_add_next_nodes): Use + accept_mb instead of ACCEPT_MB_NODE. + +2005-01-26 Ulrich Drepper + + [BZ #1100] + * debug/chk_fail.c (__chk_fail): Print program name in final message. + + * sysdeps/unix/sysv/linux/kernel-features.h: Found reference to + MSG_NOSIGNAL being in 2.2 kernels. + +2005-01-26 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/sysdep.h + (SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm. + + [BZ #693] + * posix/regex_internal.h (DUMMY_CONSTRAINT): Rename to... + (WORD_DELIM_CONSTRAINT): ...this. + (NOT_WORD_DELIM_CONSTRAINT): Define. + (re_context_type): Add INSIDE_NOTWORD and NOT_WORD_DELIM, + change WORD_DELIM to use WORD_DELIM_CONSTRAINT. + * posix/regcomp.c (peek_token): For \B create NOT_WORD_DELIM + anchor instead of INSIDE_WORD. + (parse_expression): Handle NOT_WORD_DELIM constraint. + * posix/bug-regex19.c (tests): Adjust tests that relied on \B + being inside word instead of not word delim. + * posix/tst-rxspencer.c (mb_frob_pattern): Don't frob escaped + characters. + * posix/rxspencer/tests: Add some new tests. + +2005-01-14 GOTO Masanori + + [BZ #1108] + * sunrpc/rpc_main.c (s_output): Generate #include + irrespective of Cflag. + + * manual/memory.texi (sbrk): Fix definition. + * manual/string.texi (strcasestr): Fix example typo. + +2005-01-25 Roland McGrath + + * sysdeps/generic/syslog.c [NO_SIGPIPE]: Protect sigpipe_handler decl. + +2005-01-23 Roland McGrath + + [BZ #737] + * sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears + in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS. + * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD] + (SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer + from %gs:0 and add to that value, rather that direct %gs:OFFSET access. + * sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise. + +2005-01-25 Jakub Jelinek + + [BZ #731] + * stdlib/fmtmsg.c (addseverity): Remove new_string variable. + (free_mem): Don't free string. + * stdlib/tst-fmtmsg.c: Include string.h. + (main): Add some more tests. + +2005-01-25 Andreas Schwab + + [BZ #736] + * timezone/asia: Update from tzdata2005c. + * timezone/backward: Likewise. + * timezone/europe: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + + [BZ #736] + * timezone/private.h: Update from tzcode2005c. + * timezone/tzfile.h: Likewise. + * timezone/zdump.c: Likewise. + * timezone/zic.c: Likewise. + +2005-01-25 Ulrich Drepper + + * sysdeps/i386/dl-machine.h (elf_machine_rel): Remove code using + RESOLVE. + * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Remove code + using RESOLVE. + * elf/rtld.c (_dl_start): Remove RESOLVE definition. + +2005-01-25 Alan Modra + + * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Test + sym_map, not sym, against zero. + +2005-01-24 Ulrich Drepper + + [BZ #671] + * misc/syslog.c: Moved to... + * sysdeps/generic/syslog.c: ...here. + [NO_SIGIPE]: Don't install SIGPIPE handler. + * sysdeps/unix/sysv/linux/syslog.c: New file. + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_MSG_NOSIGNAL. + +2005-01-22 Richard Henderson + + * sysdeps/alpha/dl-trampoline.S: New file. + * sysdeps/alpha/dl-machine.h: Move PLT trampolines there. + Use RESOLVE_MAP instead of RESOLVE to protect relocation code. + (elf_machine_runtime_setup): Test for dl_profile non-null. + (ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New. + * sysdeps/alpha/bits/link.h: New file. + * sysdeps/generic/ldsodefs.h (La_alpha_regs, La_alpha_retval): New. + (struct audit_ifaces): Add alpha entries. + * elf/tst-auditmod1.c: Add alpha entries. + +2005-01-22 Ulrich Drepper + + * sysdeps/ia64/dl-machine.h: Remove PLT trampolines here. + * sysdeps/ia64/dl-trampoline.S: New file. + + * sysdeps/x86_64/bits/link.h: Use namespace-safe identifiers in + La_x86_64_xmm definition. + + * posix/Makefile: Use CFLAGS-*.os instead of CFLAGS-*.c for frame + pointer option. + * stdlib/Makefile (CFLAGS-system.os): Use this instead of + CFLAGS-system.c for frame pointer option. + +2005-01-21 Roland McGrath + + * elf/dl-runtime.c (_dl_profile_fixup): Remove const from REGS. + * sysdeps/i386/dl-machine.h: Update decl. + +2005-01-21 Jakub Jelinek + + [BZ #735] + * elf/Makefile: Add rules to build and run tst-align2. + * elf/tst-align2.c: New test. + * elf/tst-alignmod2.c: New file. + * sysdeps/powerpc/tst-stack-align.h: New file. + * sysdeps/i386/dl-machine.h (RTLD_START): Align stack and clear frame + pointer before calling _dl_init. + * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. + +2005-01-20 Ulrich Drepper + + * posix/execl.c: Do not allocate potentially large buffers on the + stack. + * posix/execle.c: Likewise. + * posix/execlp.c: Likewise. + * posix/execvp.c: Likewise. + (script_execute): Removed. + (allocate_scripts_argv): New function. Called at most once to + allocate memory, not every time a script is run. Adjust caller. + + * sysdeps/generic/wordexp.c (exec_comm): Add a few + TEMP_FAILURE_RETRY. Reorganize code to avoid multiple calls to + exec_comm_child. + (exec_comm_child): Can now be inlined. + + * posix/Makefile: Add -fomit-frame-pointer for a few more files. + * stdlib/Makefile: Likewise. + +2005-01-19 Roland McGrath + + [BZ #681] + * sunrpc/openchild.c (_openchild): Use NULL instead of 0 for trailing + argument to execlp. + Reported by Marcus Meissner . + +2005-01-19 Jakub Jelinek + + * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Fix a typo + in assert. + * iconv/strtab.c (strtabfinalize): Likewise. + + * libio/iofopncook.c (_IO_cookie_seekoff): Add prototype. + +2005-01-17 Roland McGrath + + [BZ #745] + * nscd/Makefile (LDLIBS-nscd): New variable. + ($(objpfx)nscd): Use that instead of selinux-LIBS. + + * Makeconfig (link-extra-libs): Define just as $(LDLIBS-$(@F)). + (link-extra-libs-static): Define to $(link-extra-libs). + (link-extra-libs-bounded): Likewise. + +2005-01-17 Ulrich Drepper + + * include/link.h: Remove stray definition of pltenter. + +2005-01-16 GOTO Masanori + + [BZ #734] + * sysdeps/unix/rewinddir.c: Reset filepos. + * dirent/tst-seekdir.c: Check telldir value after calling rewinddir. + +2005-01-15 Ulrich Drepper + + * elf/tst-auditmod1.c: Reduce duplication. + +2005-01-16 Andreas Schwab + + * sysdeps/m68k/dl-machine.h: Remove trampoline code. Define + ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. + (elf_machine_runtime_setup): If profile != 0 does not anymore mean + GLRO(dl_profile) != NULL. + * sysdeps/m68k/dl-trampoline.S: New file. + * sysdeps/m68k/bits/link.h: New file. + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add m68k + variants. + * elf/tst-auditmod1.c: Add m68k support. + +2005-01-14 Ulrich Drepper + + * posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant + LC_* variable. Patch by Aharon Robbins . + + [BZ #731] + * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. + * stdlib/tst-fmtmsg.c (main): Add another addseverity test. + +2005-01-12 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): We don't have to allow + callers from libc anymore. + + * elf/dl-open.c (dl_open_worker): Pass __RTLD_AUDIT flag from caller + to _dl_map_object_deps. + * elf/dl-load.c (_dl_map_object_from_fd): Don't change memory + protections when loading auditing modules. + + * dlfcn/dlopen.c (dlopen_doit): Catch invalid mode arguments and fail. + + * posix/getconf.c: Update copyright year. + * nss/getent.c: Likewise. + * nscd/nscd_nischeck.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * elf/ldconfig.c: Likewise. + * catgets/gencat.c: Likewise. + * csu/version.c: Likewise. + * elf/ldd.bash.in: Likewise. + * elf/sprof.c (print_version): Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * nscd/nscd.c (print_version): Likewise. + * debug/xtrace.sh: Likewise. + * malloc/memusage.sh: Likewise. + * malloc/mtrace.pl: Likewise. + * debug/catchsegv.sh: Likewise. + +2005-01-11 Thorsten Kukuk + + [BZ #733] + * sunrpc/svc_tcp.c (svctcp_create): Call listen with SOMAXCONN + as backlog. + * sunrpc/svc_unix.c (svcunix_create): Likewise. + + [BZ #1099] + * grp/putgrent.c (putgrent): Don't write 0 as group + ID if groupname starts with + or -. + * pwd/putpwent.c (putpwent): Don't write 0 as user or + group ID if user name starts with + or -. + +2005-01-09 Kaz Kojima + + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add sh variants. + * sysdeps/elf/tst-auditmod1.c: Add sh support. + * sysdeps/sh/bits/link.h: New. + * sysdeps/sh/dl-machine.h: Remove trampoline code here. Define + ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. Remove obsolete comments. + (RTLD_START): Define __fpscr_values. + * sysdeps/sh/dl-trampoline.S: New file. + * sysdeps/sh/sh4/dl-trampoline.S: New file. + * sysdeps/sh/sh4/Versions [ld]: Add __fpscr_values. + * sysdeps/sh/sh4/dl-machine.h: Remove. + +2005-01-10 Jakub Jelinek + + [BZ #732] + * time/tst-strptime.c (day_tests): Add 2 new tests. + (test_tm, main): Issue an error instead of segfaulting if + strptime returns NULL. + +2005-01-10 H.J. Lu + + * sysdeps/alpha/libc-tls.c (__tls_get_addr): Updated for dtv_t union. + * sysdeps/ia64/libc-tls.c (__tls_get_addr): Likewise. + +2005-01-11 Ulrich Drepper + + * malloc/malloc.h: Remove no-glibc support. + +2005-01-12 GOTO Masanori + + [BZ #650] + * malloc/malloc.h: Always include features.h. + +2005-01-10 Roland McGrath + + * sysdeps/ia64/fpu/e_logl.c: File removed. + + * dlfcn/dlfcn.c (init): Fix typo in attribute decl. + +2005-01-10 Ulrich Drepper + + * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and + recognition of last entry. + +2005-01-09 Ulrich Drepper + + * elf/dl-runtime.c: Include . + + * elf/Makefile (headers): Add bits/link.h. + +2005-01-09 Andreas Schwab + + * elf/rtld.c (dl_main): Create main_map with __RTLD_OPENEXEC. + +2005-01-09 Andreas Jaeger + + [BZ #732] + * time/strptime_l.c (__strptime_internal): Add braces to avoid + warning. + + * sysdeps/x86_64/bits/link.h: Use vector_size for GCC 4.0. + + * elf/rtld.c (dl_main): Call _dl_add_to_slotinfo only if USE_TLS. + +2005-01-08 Jakub Jelinek + + * elf/Makefile (generated): Add tst-pie1{,.out,.o}. + +2005-01-09 Ulrich Drepper + + * elf/dl-fini.c (_dl_fini): Call destructors of audit DSOs after + those of all the regular objects. + + * elf/dl-debug.c (_dl_debug_initialize): Take extra parameter and + use it to select the r_debug structure for that namespace. + * elf/dl-close.c (_dl_close): Adjust call to _dl_debug_initialize. + * elf/dl-load.c (_dl_map_object_from_fd): Likewise. + * elf/dl-open.c (_dl_open): Likewise. + * elf/rtld.c (dl_main): Likewise. + * sysdeps/generic/ldsodefs.h (struct link_namespaces): Add _ns_debug + member. + (_dl_debug_initialize): Add new parameter in declaration. + + * elf/dl-close.c (_dl_close): Make sure auditing callbacks are not + called for the auditing objects themselves. + * elf/dl-load.c (_dl_map_object_from_fd): Likewise. + +2005-01-07 Ulrich Drepper + + * sysdeps/powerpc/powerpc64/dl-machine.h + (elf_machine_runtime_setup): If profile != 0 does not anymore mean + GLRO(dl_profile) != NULL. + * sysdeps/powerpc/powerpc64/bits/link.h (struct la_ppc64_regs): Add + padding. + * sysdeps/powerpc/powerpc64/dl-trampoline.S: (_dl_profile_resolve): + Extend _dl_prof_resolve to add pass extra parameters to + _dl_profile_fixup and set up structure with register content. + + * sysdeps/powerpc/powerpc32/dl-machine.c (__elf_machine_runtime_setup): + If profile != 0 does not anymore mean GLRO(dl_profile) != NULL. + * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_prof_resolve): + Extend _dl_prof_resolve to add pass extra parameters to + _dl_profile_fixup and set up structure with register content. + * sysdeps/powerpc/powerpc32/bits/link.h: Fix types of some fields in + the register and result structures. + * sysdeps/powerpc/powerpc64/bits/link.h: Fix types of some fields + in the 32-bit register and result structures. + + * sysdeps/powerpc/powerpc64/dl-trampoline.S: Use register names. + + * sysdeps/powerpc/powerpc32/dl-trampoline.S: New file. + * sysdeps/powerpc/powerpc32/dl-machine.h: Remove trampoline code here. + Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ppc32 variants. + * elf/tst-auditmod1.c: Add ppc32 support. + * sysdeps/powerpc/powerpc32/bits/link.h: New file. + * sysdeps/powerpc/powerpc64/bits/link.h: Add ppc32 definitions. + + * malloc/malloc.c (malloc_printerr): Print program name as part of + error message. + + * misc/sys/cdefs.h (__attribute_warn_unused_result__): Define. + * stdlib/stdlib.h: Make realloc with + __attribute_warn_unused_result__ instead of __wur. + * malloc/malloc.h: Add __wur and __attribute_warn_unused_result__ + markers as in . + + * libio/stdio.h: Remove __wur from rename and remove. + * posix/unistd.h: Remove __wur from dup2. + +2005-01-03 Andreas Jaeger + + * elf/Makefile (tests): Revert patch from 2005-01-03. + +2005-01-07 Ulrich Drepper + + * sysdeps/unix/sysv/linux/init-first.c (__libc_init_first): Don't + make __libc_init_first hidden. + + * elf/rtld.c [!DONT_USE_BOOTSTRAP_MAP] (_dl_start_final): Initialize + l_relocated of rtld map. + * sysdeps/powerpc/powerpc64/dl-trampoline.S: New file. + * sysdeps/powerpc/powerpc64/dl-machine.h: Remove trampoline code here. + Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. + * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ppc64 variants. + * elf/tst-auditmod1.c: Add ppc64 support. + * sysdeps/powerpc/powerpc64/bits/link.h: New file. + +2005-01-06 Roland McGrath + + [BZ #633] + * sysdeps/unix/sysv/linux/futimes.c (__futimes): Catch errno values + indicating file-name lookup errors, and return ENOSYS or EBADF instead. + +2005-01-06 Ulrich Drepper + + * csu/elf-init.c (__libc_csu_fini): Don't do anything here. + * sysdeps/generic/libc-start.c: Don't register program destructor here. + + * dlfcn/Makefile: Add rules to build dlfcn.c. + (LDFLAGS-dl.so): Removed. + * dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer + table. + * dlfcn/dlmopen.c: Likewise for _dl_open. + * dlfcn/dlopen.c: Likewise. + * dlfcn/dlopenold.c: Likewise. + * elf/dl-libc.c: Likewise for _dl_open and _dl_close. + * elf/Makefile (routines): Remove dl-open and dl-close. + (dl-routines): Add dl-open, dl-close, and dl-trampoline. + Add rules to build and run tst-audit1. + * elf/tst-audit1.c: New file. + * elf/tst-auditmod1.c: New file. + * elf/Versions [libc]: Remove _dl_open and _dl_close. + * elf/dl-close.c: Change for use inside ld.so instead of libc.so. + * elf/dl-open.c: Likewise. + * elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization, + signaled by nonzero parameter. + * elf/dl-init.c: Fix use of r_state. + * elf/dl-load.c: Likewise. + + * elf/dl-close.c: Add auditing checkpoints. + * elf/dl-open.c: Likewise. + * elf/dl-fini.c: Likewise. + * elf/dl-load.c: Likewise. + * elf/dl-sym.c: Likewise. + * sysdeps/generic/libc-start.c: Likewise. + * elf/dl-object.c: Allocate memory for auditing information. + * elf/dl-reloc.c: Remove RESOLV. We now always need the map. + Correctly initialize slotinfo. + * elf/dynamic-link.h: Adjust after removal of RESOLV. + * sysdeps/hppa/dl-lookupcfg.h: Likewise. + * sysdeps/ia64/dl-lookupcfg.h: Likewise. + * sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed. + * elf/dl-runtime.c (_dl_fixup): Little cleanup. + (_dl_profile_fixup): New parameters to point to register struct and + variable for frame size. + Add auditing checkpoints. + (_dl_call_pltexit): New function. + Don't define trampoline code here. + * elf/rtld.c: Recognize LD_AUDIT. Load modules on startup. + Remove all the functions from _rtld_global_ro which only _dl_open + and _dl_close needed. + Add auditing checkpoints. + * elf/link.h: Define symbols for auditing interfaces. + * include/link.h: Likewise. + * include/dlfcn.h: Define __RTLD_AUDIT. + Remove prototypes for _dl_open and _dl_close. + Adjust access to argc and argv in libdl. + * dlfcn/dlfcn.c: New file. + * sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE + is gone. + * sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces. + * sysdeps/generic/unsecvars.h: Add LD_AUDIT. + * sysdeps/i386/dl-machine.h: Remove trampoline code here. + Adjust for removal of RESOLVE. + * sysdeps/x86_64/dl-machine.h: Likewise. + * sysdeps/generic/dl-trampoline.c: New file. + * sysdeps/i386/dl-trampoline.c: New file. + * sysdeps/x86_64/dl-trampoline.c: New file. + + * sysdeps/generic/dl-tls.c: Cleanups. Fixup for dtv_t change. + Fix updating of DTV. + * sysdeps/generic/libc-tls.c: Likewise. + + * sysdeps/arm/bits/link.h: Renamed to ... + * sysdeps/arm/bits/linkmap.h: ...this. + * sysdeps/generic/bits/link.h: Renamed to... + * sysdeps/generic/bits/linkmap.h: ...this. + * sysdeps/hppa/bits/link.h: Renamed to... + * sysdeps/hppa/bits/linkmap.h: ...this. + * sysdeps/i386/bits/link.h: Renamed to... + * sysdeps/i386/bits/linkmap.h: ...this. + * sysdeps/ia64/bits/link.h: Renamed to... + * sysdeps/ia64/bits/linkmap.h: ...this. + * sysdeps/s390/bits/link.h: Renamed to... + * sysdeps/s390/bits/linkmap.h: ...this. + * sysdeps/sh/bits/link.h: Renamed to... + * sysdeps/sh/bits/linkmap.h: ...this. + * sysdeps/x86_64/bits/link.h: Renamed to... + * sysdeps/x86_64/bits/linkmap.h: ...this. + + * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] + +2004-12-22 Steven Munroe + + [BZ #602] + * math/libm-test.inc (rint_test_tonearest): New test. + (rint_test_towardzero): New test. + (rint_test_downward): New test. + (rint_test_upward): New test. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Fix -0.0 case. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Fix -0.0 case. + Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Fix -0.0 case. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Fix -0.0 case. + Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + +2005-01-06 Ulrich Drepper + + * misc/sys/cdefs.h: Define __wur. + * libio/stdio.h: Use __wur for a number of interfaces. + * posix/unistd.h: Likewise. + * stdlib/stdlib.h: Likewise. + +2004-12-29 Jakub Jelinek + + [BZ #592] + * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Use + libc_hidden_proto instead of HIDDEN_PROTO. + * sysdeps/ia64/fpu/libm-symbols.h (HIDDEN_PROTO): Remove. + (__libm_error_support): If ASSEMBLER and in libc, define to + HIDDEN_JUMPTARGET(__libm_error_support). + +2004-12-28 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/Makefile (duplicated-routines): New macro. + (sysdep_routines): Replace libm_ldexp{,f,l} and libm_scalbn{,f,l} + with $(duplicated-routines). + (libm-sysdep_routines): Likewise, but substitute "s_" prefix for + "m_" prefix. + +2004-12-27 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/libm-symbols.h: Add include of and + undefine "ret" macro. Add __libm_error_support hidden definitions. + + [BZ #592] + * sysdeps/ia64/fpu/e_lgamma_r.c: Remove CVS-id comment. Add + missing portion of copyright statement. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/w_lgamma.c: Remove CVS-id comment. Add + missing portion of copyright statement. + (__ieee754_lgamma): Rename from lgamma(). Make lgamma() a weak alias. + (__ieee754_gamma): Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + +2004-12-09 H.J. Lu + + [BZ #592] + * sysdeps/ia64/fpu/s_nextafterl.c: Remove. + * sysdeps/ia64/fpu/s_nexttoward.c: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.c: Likewise. + * sysdeps/ia64/fpu/e_atan2l.S: Remove (duplicate of e_atan2l.c). + * sysdeps/ia64/fpu/e_expl.S: Likewise. + * sysdeps/ia64/fpu/e_logl.c: Remove (conflicts with e_logl.S). + +2004-11-18 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/README: New file. + * sysdeps/ia64/fpu/gen_import_file_list: New file. + * sysdeps/ia64/fpu/import_check: Likewise. + * sysdeps/ia64/fpu/import_diffs: Likewise. + * sysdeps/ia64/fpu/import_file.awk: Likewise. + * sysdeps/ia64/fpu/import_intel_libm: Likewise. + * sysdeps/ia64/fpu/libm-symbols.h: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_acos.S: Update from Intel libm v2.1+. + * sysdeps/ia64/fpu/e_acosf.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_asin.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_atan2.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_fmod.S: Likewise. + * sysdeps/ia64/fpu/e_fmodf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_powl.S: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_reduce.c: Likewise. + * sysdeps/ia64/fpu/libm_support.h: Likewise. + * sysdeps/ia64/fpu/s_atan.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrt.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_ceil.S: Likewise. + * sysdeps/ia64/fpu/s_ceilf.S: Likewise. + * sysdeps/ia64/fpu/s_ceill.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_cosl.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_fabs.S: Likewise. + * sysdeps/ia64/fpu/s_fabsf.S: Likewise. + * sysdeps/ia64/fpu/s_fabsl.S: Likewise. + * sysdeps/ia64/fpu/s_floor.S: Likewise. + * sysdeps/ia64/fpu/s_floorf.S: Likewise. + * sysdeps/ia64/fpu/s_floorl.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ilogb.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_log1pf.S: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_logb.S: Likewise. + * sysdeps/ia64/fpu/s_logbf.S: Likewise. + * sysdeps/ia64/fpu/s_logbl.S: Likewise. + * sysdeps/ia64/fpu/s_modf.S: Likewise. + * sysdeps/ia64/fpu/s_modff.S: Likewise. + * sysdeps/ia64/fpu/s_modfl.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. + * sysdeps/ia64/fpu/s_rint.S: Likewise. + * sysdeps/ia64/fpu/s_rintf.S: Likewise. + * sysdeps/ia64/fpu/s_rintl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_significand.S: Likewise. + * sysdeps/ia64/fpu/s_significandf.S: Likewise. + * sysdeps/ia64/fpu/s_significandl.S: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/s_trunc.S: Likewise. + * sysdeps/ia64/fpu/s_truncf.S: Likewise. + * sysdeps/ia64/fpu/s_truncl.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_acosh.S: New file from Intel libm v2.1+. + * sysdeps/ia64/fpu/e_acoshf.S: Likewise. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_atanhf.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp10l.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2l.S: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.S: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.S: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/libm_frexp.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpf.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_asinhf.S: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_fdim.S: Likewise. + * sysdeps/ia64/fpu/s_fdimf.S: Likewise. + * sysdeps/ia64/fpu/s_fdiml.S: Likewise. + * sysdeps/ia64/fpu/s_fma.S: Likewise. + * sysdeps/ia64/fpu/s_fmaf.S: Likewise. + * sysdeps/ia64/fpu/s_fmal.S: Likewise. + * sysdeps/ia64/fpu/s_fmax.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxf.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxl.S: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_gamma_r.c: New empty dummy-file. + * sysdeps/ia64/fpu/e_gammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_gammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_acosh.c: Likewise. + * sysdeps/ia64/fpu/w_acoshf.c: Likewise. + * sysdeps/ia64/fpu/w_acoshl.c: Likewise. + * sysdeps/ia64/fpu/w_atanh.c: Likewise. + * sysdeps/ia64/fpu/w_atanhf.c: Likewise. + * sysdeps/ia64/fpu/w_atanhl.c: Likewise. + * sysdeps/ia64/fpu/w_exp10.c: Likewise. + * sysdeps/ia64/fpu/w_exp10f.c: Likewise. + * sysdeps/ia64/fpu/w_exp10l.c: Likewise. + * sysdeps/ia64/fpu/w_exp2.c: Likewise. + * sysdeps/ia64/fpu/w_exp2f.c: Likewise. + * sysdeps/ia64/fpu/w_exp2l.c: Likewise. + * sysdeps/ia64/fpu/w_expl.c: Likewise. + * sysdeps/ia64/fpu/e_expl.S: Likewise. + * sysdeps/ia64/fpu/w_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_log2.c: Likewise. + * sysdeps/ia64/fpu/w_log2f.c: Likewise. + * sysdeps/ia64/fpu/w_log2l.c: Likewise. + * sysdeps/ia64/fpu/w_sinh.c: Likewise. + * sysdeps/ia64/fpu/w_sinhf.c: Likewise. + * sysdeps/ia64/fpu/w_sinhl.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/libm_atan2_reg.S: Remove. + * sysdeps/ia64/fpu/s_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/s_sincos.c: Make it an empty dummy-file. + * sysdeps/ia64/fpu/s_sincosf.c: Likewise. + * sysdeps/ia64/fpu/s_sincosl.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_atan2l.S: Add "Not needed" comment. + + [BZ #592] + * sysdeps/ia64/fpu/s_copysign.S: Add __libm_copysign{,f,l} + alias for use by libm_error.c + + [BZ #592] + * sysdeps/ia64/fpu/Makefile (libm-sysdep_routines): Remove + libm_atan2_reg, libm_tan, libm_frexp4{f,l}. + Mention s_erfc{,f,l}, libm_frexp{,f,l}, libm_ldexp{,f,l}, + libm_sincos{,f,l}, libm_sincos_large, libm_lgamma{,f,l}, + libm_scalbn{,f,l}, libm_scalblnf. + (sysdep_routines): Remove libm_frexp4{,f,l}. + Mention libm_frexp{,f,l}, libm_ldexp{,f,l}, and libm_scalbn{,f,l}. + (sysdep-CPPFLAGS): Add -include libm-symbols.h, -D__POSIX__, + _D_LIB_VERSIONIMF=_LIB_VERSION, -DSIZE_LONG_INT_64, and + -DSIZE_LONG_LONG_INT_64. + +2005-01-05 Steven Munroe + + [BZ #729] + * elf/rtld.c (dl_main) [NEED_DL_SYSINFO_DSO]: Insure l_map_end and + l_text_end are set for a VDSO with a single PT_LOAD entry. + +2005-01-05 Ulrich Drepper + + [BZ #730] + * libio/iofopncook.c (_IO_cookie_seekoff): Define. Mark offset as + invalid to disable optimizations in fileops which won't work here. + (_IO_cookie_jumps): Use it. + (_IO_old_cookie_jumps): Likewise. + * libio/fmemopen.c (fmemopen_seek): Result must be returned in *P, + not the return value. + * stdio-common/Makefile (tests): Add tst-fmemopen2. + * stdio-common/tst-fmemopen2.c: New file. + + * sysdeps/unix/sysv/linux/bits/waitflags.h: Define __WNOTHREAD. + +2005-01-05 Roland McGrath + + * configure.in (libc_cv_cpp_asm_debuginfo): Checked moved ... + * sysdeps/i386/configure.in: ... here. New file. + +2005-01-03 Ulrich Drepper + + [BZ #727] + * sysdeps/generic/libc-start.c [SHARED] (__libc_start_main): Don't + initialize __environ again. + * stdlib/Makefile: Add rules to build and run tst-putenv. + * stdlib/tst-putenv.c: New file. + * stdlib/tst-putenvmod.c: New file. + + * sysdeps/unix/sysv/linux/init-first.c: Clean file up. Don't + define unnecessary wrappers or aliases of static functions. + +2005-01-03 Andreas Jaeger + + * csu/Makefile (generated): Add start.os and start.ob. + + * elf/Makefile (tests): Change rule for tst-pie1 so that make + clean works. + +2004-12-29 Roland McGrath + + [BZ #626] + * sysdeps/unix/alarm.c (alarm): Round return value to nearest rather + than always up; when nearest is zero, round up to one. + +2004-12-28 Ulrich Drepper + + * po/es.po: Update from translation team. + + [BZ #726] + * sysdeps/generic/dl-tls.c (__tls_get_addr): Fix typo. + +2004-12-27 Ulrich Drepper + + [BZ #744] + * include/signal.h: Define __sigemptyset. + +2004-04-27 Paolo Bonzini + + * posix/regex_internal.h (struct re_dfastate_t): Make + word_trtable a pointer to the 512-item transition table. + * posix/regexec.c (build_trtable): Fill in either state->trtable + or state->word_trtable. Return a boolean indicating success. + (transit_state): Expect state->trtable to be a 256-item + transition table. Reorganize code to have less tests in + the common case, and to save an indentation level. + * posix/regex_internal.c (free_state): Free word_trtable. + +2004-12-21 Jakub Jelinek + + [BZ #723] + * sysdeps/unix/sysv/linux/i386/clone.S (__clone): Make sure %esp when + calling fn is 16 byte aligned. + * sysdeps/i386/tst-stack-align.h: New file. + + [BZ #725] + * misc/efgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. + (ecvt_r): Special case denormals. + * misc/qefgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. + * misc/tst-efgcvt.c: Include float.h. + (ecvt_tests): Add 2 new tests. + +2004-12-20 Roland McGrath + + * version.h (RELEASE, VERSION): development, 2.3.90 + * include/features.h (__GLIBC_MINOR__): Now 4. + + +See ChangeLog.15 for earlier changes. diff -uprN glibc-2.4/ChangeLog.5 glibc-2.5/ChangeLog.5 --- glibc-2.4/ChangeLog.5 1996-07-20 12:06:02.000000000 +0000 +++ glibc-2.5/ChangeLog.5 2006-05-03 06:31:13.000000000 +0000 @@ -6911,9 +6911,9 @@ Sat Sep 30 11:47:05 1995 Roland McGrath Fri Sep 29 15:07:10 1995 Ulrich Drepper - * sysdeps/unix/sysv/linux/adjtime.c (__adjtime): - Change name of field `mode' in `struct timex' to `modes'. - Linux-1.3.28 updates this name according to RFC 1489. + * sysdeps/unix/sysv/linux/adjtime.c (__adjtime): + Change name of field `mode' in `struct timex' to `modes'. + Linux-1.3.28 updates this name according to RFC 1589. Thu Sep 28 13:05:54 1995 Roland McGrath diff -uprN glibc-2.4/config.make.in glibc-2.5/config.make.in --- glibc-2.4/config.make.in 2006-02-28 07:05:38.000000000 +0000 +++ glibc-2.5/config.make.in 2006-07-10 21:43:51.000000000 +0000 @@ -61,9 +61,11 @@ have-fpie = @libc_cv_fpie@ have-ssp = @libc_cv_ssp@ have-selinux = @have_selinux@ have-libaudit = @have_libaudit@ +have-libcap = @have_libcap@ have-cc-with-libunwind = @libc_cv_cc_with_libunwind@ fno-unit-at-a-time = @fno_unit_at_a_time@ bind-now = @bindnow@ +have-hash-style = @libc_cv_hashstyle@ static-libgcc = @libc_cv_gcc_static_libgcc@ diff -uprN glibc-2.4/configure glibc-2.5/configure --- glibc-2.4/configure 2006-03-06 11:18:56.000000000 +0000 +++ glibc-2.5/configure 2006-09-29 20:18:33.000000000 +0000 @@ -313,7 +313,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -5876,6 +5876,33 @@ echo "$as_me:$LINENO: result: $libc_cv_f echo "${ECHO_T}$libc_cv_fpie" >&6 + + echo "$as_me:$LINENO: checking for --hash-style option" >&5 +echo $ECHO_N "checking for --hash-style option... $ECHO_C" >&6 +if test "${libc_cv_hashstyle+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } + then + libc_cv_hashstyle=yes + else + libc_cv_hashstyle=no + fi + rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_hashstyle" >&5 +echo "${ECHO_T}$libc_cv_hashstyle" >&6 + fi echo "$as_me:$LINENO: checking for -fno-toplevel-reorder" >&5 @@ -6831,6 +6858,86 @@ _ACEOF fi + + # See if we have the libcap library + echo "$as_me:$LINENO: checking for cap_init in -lcap" >&5 +echo $ECHO_N "checking for cap_init in -lcap... $ECHO_C" >&6 +if test "${ac_cv_lib_cap_cap_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcap $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char cap_init (); +int +main () +{ +cap_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_cap_cap_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_cap_cap_init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_cap_cap_init" >&5 +echo "${ECHO_T}$ac_cv_lib_cap_cap_init" >&6 +if test $ac_cv_lib_cap_cap_init = yes; then + have_libcap=yes +else + have_libcap=no +fi + + if test "x$have_libcap" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBCAP 1 +_ACEOF + + fi + fi @@ -8416,6 +8523,7 @@ s,@ASFLAGS_config@,$ASFLAGS_config,;t t s,@libc_cv_z_combreloc@,$libc_cv_z_combreloc,;t t s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t s,@libc_cv_fpie@,$libc_cv_fpie,;t t +s,@libc_cv_hashstyle@,$libc_cv_hashstyle,;t t s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t s,@libc_cv_ssp@,$libc_cv_ssp,;t t s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t @@ -8423,6 +8531,7 @@ s,@no_whole_archive@,$no_whole_archive,; s,@exceptions@,$exceptions,;t t s,@LIBGD@,$LIBGD,;t t s,@have_libaudit@,$have_libaudit,;t t +s,@have_libcap@,$have_libcap,;t t s,@have_selinux@,$have_selinux,;t t s,@EGREP@,$EGREP,;t t s,@sizeof_long_double@,$sizeof_long_double,;t t diff -uprN glibc-2.4/configure.in glibc-2.5/configure.in --- glibc-2.4/configure.in 2006-03-01 09:17:40.000000000 +0000 +++ glibc-2.5/configure.in 2006-07-10 21:45:29.000000000 +0000 @@ -1589,6 +1589,22 @@ EOF rm -f conftest*]) AC_SUBST(libc_cv_fpie) + + AC_CACHE_CHECK(for --hash-style option, + libc_cv_hashstyle, [dnl + cat > conftest.c <&AS_MESSAGE_LOG_FD]) + then + libc_cv_hashstyle=yes + else + libc_cv_hashstyle=no + fi + rm -f conftest*]) + AC_SUBST(libc_cv_hashstyle) fi AC_CACHE_CHECK(for -fno-toplevel-reorder, libc_cv_fno_toplevel_reorder, [dnl @@ -1982,6 +1998,13 @@ if test "x$have_selinux" = xyes; then AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support]) fi AC_SUBST(have_libaudit) + + # See if we have the libcap library + AC_CHECK_LIB(cap, cap_init, have_libcap=yes, have_libcap=no) + if test "x$have_libcap" = xyes; then + AC_DEFINE(HAVE_LIBCAP, 1, [SELinux libcap support]) + fi + AC_SUBST(have_libcap) fi AC_SUBST(have_selinux) diff -uprN glibc-2.4/debug/Makefile glibc-2.5/debug/Makefile --- glibc-2.4/debug/Makefile 2005-07-25 21:39:37.000000000 +0000 +++ glibc-2.5/debug/Makefile 2006-05-19 16:44:45.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001,2004,2005 Free Software Foundation, Inc. +# Copyright (C) 1998-2001,2004,2005,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,8 @@ routines = backtrace backtracesyms back printf_chk fprintf_chk vprintf_chk vfprintf_chk \ gets_chk chk_fail readonly-area fgets_chk fgets_u_chk \ read_chk pread_chk pread64_chk recv_chk recvfrom_chk \ - readlink_chk getwd_chk getcwd_chk realpath_chk ptsname_r_chk \ + readlink_chk readlinkat_chk getwd_chk getcwd_chk \ + realpath_chk ptsname_r_chk \ wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \ wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \ wcpncpy_chk \ @@ -106,6 +107,8 @@ generated = catchsegv xtrace include ../Rules +sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') + $(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \ $(common-objpfx)config.make slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \ @@ -118,7 +121,7 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofi $(objpfx)xtrace: xtrace.sh rm -f $@.new sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \ - -e 's|@SLIBDIR@|$(slibdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \ + -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \ && rm -f $@ && mv $@.new $@ && chmod +x $@ # Depend on libc.so so a DT_NEEDED is generated in the shared objects. diff -uprN glibc-2.4/debug/readlinkat_chk.c glibc-2.5/debug/readlinkat_chk.c --- glibc-2.4/debug/readlinkat_chk.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/debug/readlinkat_chk.c 2006-04-24 16:56:12.000000000 +0000 @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + + +ssize_t +__readlinkat_chk (int fd, const char *path, void *buf, size_t len, + size_t buflen) +{ + if (len > buflen) + __chk_fail (); + + return readlinkat (fd, path, buf, len); +} diff -uprN glibc-2.4/debug/tst-chk1.c glibc-2.5/debug/tst-chk1.c --- glibc-2.4/debug/tst-chk1.c 2005-08-22 15:12:34.000000000 +0000 +++ glibc-2.5/debug/tst-chk1.c 2006-04-24 17:00:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2004. @@ -944,6 +944,34 @@ do_test (void) CHK_FAIL_END #endif + int tmpfd = open ("/tmp", O_RDONLY | O_DIRECTORY); + if (tmpfd < 0) + FAIL (); + + if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf, 4) != 3 + || memcmp (readlinkbuf, "bar", 3) != 0) + FAIL (); + if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 1, + l0 + 3) != 3 + || memcmp (readlinkbuf, "bbar", 4) != 0) + FAIL (); + +#if __USE_FORTIFY_LEVEL >= 1 + CHK_FAIL_START + if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 2, + l0 + 3) != 3) + FAIL (); + CHK_FAIL_END + + CHK_FAIL_START + if (readlinkat (tmpfd, fname + sizeof ("/tmp/") - 1, readlinkbuf + 3, + 4) != 3) + FAIL (); + CHK_FAIL_END +#endif + + close (tmpfd); + char *cwd1 = getcwd (NULL, 0); if (cwd1 == NULL) FAIL (); diff -uprN glibc-2.4/debug/Versions glibc-2.5/debug/Versions --- glibc-2.4/debug/Versions 2005-07-25 21:40:34.000000000 +0000 +++ glibc-2.5/debug/Versions 2006-04-24 16:59:05.000000000 +0000 @@ -36,4 +36,7 @@ libc { __stack_chk_fail; } + GLIBC_2.5 { + __readlinkat_chk; + } } diff -uprN glibc-2.4/debug/xtrace.sh glibc-2.5/debug/xtrace.sh --- glibc-2.4/debug/xtrace.sh 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/debug/xtrace.sh 2006-05-19 16:43:31.000000000 +0000 @@ -18,8 +18,8 @@ # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. -pcprofileso=@SLIBDIR@/libpcprofile.so -pcprofiledump=@BINDIR@/pcprofiledump +pcprofileso='@SLIBDIR@/libpcprofile.so' +pcprofiledump='@BINDIR@/pcprofiledump' TEXTDOMAIN=libc # Print usage message. diff -uprN glibc-2.4/dlfcn/bug-atexit3.c glibc-2.5/dlfcn/bug-atexit3.c --- glibc-2.4/dlfcn/bug-atexit3.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/dlfcn/bug-atexit3.c 2006-07-27 01:28:45.000000000 +0000 @@ -0,0 +1,18 @@ +#include +#include + +static int +do_test (void) +{ + void *handle = dlopen ("$ORIGIN/bug-atexit3-lib.so", RTLD_LAZY); + if (handle == NULL) + { + printf ("dlopen failed: %s\n", dlerror ()); + return 1; + } + dlclose (handle); + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/dlfcn/bug-atexit3-lib.cc glibc-2.5/dlfcn/bug-atexit3-lib.cc --- glibc-2.4/dlfcn/bug-atexit3-lib.cc 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/dlfcn/bug-atexit3-lib.cc 2006-07-27 01:30:07.000000000 +0000 @@ -0,0 +1,23 @@ +#include + +struct statclass +{ + statclass() + { + write (1, "statclass\n", 10); + } + ~statclass() + { + write (1, "~statclass\n", 11); + } +}; + +struct extclass +{ + ~extclass() + { + static statclass var; + } +}; + +extclass globvar; diff -uprN glibc-2.4/dlfcn/dlmopen.c glibc-2.5/dlfcn/dlmopen.c --- glibc-2.4/dlfcn/dlmopen.c 2005-01-06 22:40:27.000000000 +0000 +++ glibc-2.5/dlfcn/dlmopen.c 2006-07-26 08:21:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Load a shared object at run time. - Copyright (C) 1995,96,97,98,99,2000,2003,2004 Free Software Foundation, Inc. + Copyright (C) 1995-2000,2003,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,12 +55,19 @@ dlmopen_doit (void *a) /* Non-shared code has no support for multiple namespaces. */ if (args->nsid != LM_ID_BASE) + { # ifdef SHARED - /* If trying to open the link map for the main executable the namespace - must be the main one. */ - if (args->file == NULL) + /* If trying to open the link map for the main executable the namespace + must be the main one. */ + if (args->file == NULL) # endif - GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid namespace")); + GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid namespace")); + + /* It makes no sense to use RTLD_GLOBAL when loading a DSO into + a namespace other than the base namespace. */ + if (__builtin_expect (args->mode & RTLD_GLOBAL, 0)) + GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid mode")); + } args->new = GLRO(dl_open) (args->file ?: "", args->mode | __RTLD_DLOPEN, args->caller, diff -uprN glibc-2.4/dlfcn/Makefile glibc-2.5/dlfcn/Makefile --- glibc-2.4/dlfcn/Makefile 2005-10-16 09:25:43.000000000 +0000 +++ glibc-2.5/dlfcn/Makefile 2006-08-31 16:59:15.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1995-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -40,7 +40,8 @@ endif ifeq (yes,$(build-shared)) tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ - bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 + bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ + bug-atexit3 ifeq (yes,$(have-protected)) tests += tstatexit endif @@ -48,7 +49,7 @@ endif modules-names = glreflib1 glreflib2 failtestmod defaultmod1 defaultmod2 \ errmsg1mod modatexit modcxaatexit \ bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ - bug-atexit2-lib + bug-atexit2-lib bug-atexit3-lib failtestmod.so-no-z-defs = yes glreflib2.so-no-z-defs = yes @@ -62,7 +63,7 @@ tststatic-ENV = LD_LIBRARY_PATH=$(objpfx tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf endif -extra-objs += $(modules-names:=.os) +extra-test-objs += $(modules-names:=.os) generated := $(modules-names:=.so) include ../Rules @@ -135,6 +136,13 @@ $(objpfx)bug-atexit2.out: $(objpfx)bug-a $(objpfx)bug-atexit2-lib.so: $(common-objpfx)libc.so \ $(common-objpfx)libc_nonshared.a +LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)elf/ld.so \ + $(common-objpfx)libc_nonshared.a +$(objpfx)bug-atexit3: $(libdl) +$(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so +$(objpfx)bug-atexit3-lib.so: $(common-objpfx)libc.so \ + $(common-objpfx)libc_nonshared.a + # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by diff -uprN glibc-2.4/elf/cache.c glibc-2.5/elf/cache.c --- glibc-2.4/elf/cache.c 2006-01-04 17:14:52.000000000 +0000 +++ glibc-2.5/elf/cache.c 2006-04-07 03:36:30.000000000 +0000 @@ -1,5 +1,4 @@ -/* Copyright (C) 1999,2000,2001,2002,2003,2005 - Free Software Foundation, Inc. +/* Copyright (C) 1999-2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -421,7 +420,7 @@ save_cache (const char *cache_name) if (opt_format != 2) { if (write (fd, file_entries, file_entries_size) - != (ssize_t)file_entries_size) + != (ssize_t) file_entries_size) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } if (opt_format != 0) @@ -430,15 +429,16 @@ save_cache (const char *cache_name) if (opt_format != 2) { char zero[pad]; - if (write (fd, zero, pad) != (ssize_t)pad) + memset (zero, '\0', pad); + if (write (fd, zero, pad) != (ssize_t) pad) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } if (write (fd, file_entries_new, file_entries_new_size) - != (ssize_t)file_entries_new_size) + != (ssize_t) file_entries_new_size) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } - if (write (fd, strings, total_strlen) != (ssize_t)total_strlen) + if (write (fd, strings, total_strlen) != (ssize_t) total_strlen) error (EXIT_FAILURE, errno, _("Writing of cache data failed.")); close (fd); @@ -455,6 +455,7 @@ save_cache (const char *cache_name) cache_name); /* Free all allocated memory. */ + free (file_entries_new); free (file_entries); free (strings); diff -uprN glibc-2.4/elf/dl-addr.c glibc-2.5/elf/dl-addr.c --- glibc-2.4/elf/dl-addr.c 2005-08-30 22:31:41.000000000 +0000 +++ glibc-2.5/elf/dl-addr.c 2006-08-24 20:18:04.000000000 +0000 @@ -1,5 +1,5 @@ /* Locate the shared object symbol nearest a given address. - Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -74,27 +74,64 @@ _dl_addr (const void *address, Dl_info * ElfW(Word) strtabsize = match->l_info[DT_STRSZ]->d_un.d_val; - const ElfW(Sym) *symtabend; - if (match->l_info[DT_HASH] != NULL) - symtabend = (symtab - + ((Elf_Symndx *) D_PTR (match, l_info[DT_HASH]))[1]); + const ElfW(Sym) *matchsym = NULL; + if (match->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM + + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] != NULL) + { + /* We look at all symbol table entries referenced by the + hash table. */ + for (Elf_Symndx bucket = 0; bucket < match->l_nbuckets; ++bucket) + { + Elf32_Word symndx = match->l_gnu_buckets[bucket]; + if (symndx != 0) + { + const Elf32_Word *hasharr = &match->l_gnu_chain_zero[symndx]; + + do + { + /* The hash table never references local symbols + so we can omit that test here. */ + if ((symtab[symndx].st_shndx != SHN_UNDEF + || symtab[symndx].st_value != 0) +#ifdef USE_TLS + && ELFW(ST_TYPE) (symtab[symndx].st_info) != STT_TLS +#endif + && DL_ADDR_SYM_MATCH (match, &symtab[symndx], + matchsym, addr) + && symtab[symndx].st_name < strtabsize) + matchsym = (ElfW(Sym) *) &symtab[symndx]; + + ++symndx; + } + while ((*hasharr++ & 1u) == 0); + } + } + } else - /* There is no direct way to determine the number of symbols in the - dynamic symbol table and no hash table is present. The ELF - binary is ill-formed but what shall we do? Use the beginning of - the string table which generally follows the symbol table. */ - symtabend = (const ElfW(Sym) *) strtab; - - const ElfW(Sym) *matchsym; - for (matchsym = NULL; (void *) symtab < (void *) symtabend; ++symtab) - if ((ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL - || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK) -#if defined USE_TLS - && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS + { + const ElfW(Sym) *symtabend; + if (match->l_info[DT_HASH] != NULL) + symtabend = (symtab + + ((Elf_Symndx *) D_PTR (match, l_info[DT_HASH]))[1]); + else + /* There is no direct way to determine the number of symbols in the + dynamic symbol table and no hash table is present. The ELF + binary is ill-formed but what shall we do? Use the beginning of + the string table which generally follows the symbol table. */ + symtabend = (const ElfW(Sym) *) strtab; + + for (; (void *) symtab < (void *) symtabend; ++symtab) + if ((ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL + || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK) +#ifdef USE_TLS + && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS #endif - && DL_ADDR_SYM_MATCH (match, symtab, matchsym, addr) - && symtab->st_name < strtabsize) - matchsym = (ElfW(Sym) *) symtab; + && (symtab->st_shndx != SHN_UNDEF + || symtab->st_value != 0) + && DL_ADDR_SYM_MATCH (match, symtab, matchsym, addr) + && symtab->st_name < strtabsize) + matchsym = (ElfW(Sym) *) symtab; + } if (mapp) *mapp = match; diff -uprN glibc-2.4/elf/dl-cache.c glibc-2.5/elf/dl-cache.c --- glibc-2.4/elf/dl-cache.c 2005-12-14 08:34:10.000000000 +0000 +++ glibc-2.5/elf/dl-cache.c 2006-09-19 17:06:31.000000000 +0000 @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -264,7 +264,7 @@ _dl_load_cache_lookup (const char *name) #define HWCAP_CHECK \ if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \ continue; \ - if (_DL_PLATFORMS_COUNT && platform != -1 \ + if (_DL_PLATFORMS_COUNT \ && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \ && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \ continue; \ diff -uprN glibc-2.4/elf/dl-close.c glibc-2.5/elf/dl-close.c --- glibc-2.4/elf/dl-close.c 2005-04-27 01:32:01.000000000 +0000 +++ glibc-2.5/elf/dl-close.c 2006-09-19 14:39:42.000000000 +0000 @@ -1,5 +1,5 @@ /* Close a shared object opened by `_dl_open'. - Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -330,7 +330,7 @@ _dl_close (void *_map) for (cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) /* This relies on l_scope[] entries being always set either - to its own l_symbolic_searchlist address, or some other map's + to its own l_symbolic_searchlist address, or some map's l_searchlist address. */ if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) { @@ -347,6 +347,21 @@ _dl_close (void *_map) } } } + else + { + unsigned int cnt = 0; + while (imap->l_scope[cnt] != NULL) + { + if (imap->l_scope[cnt] == &map->l_searchlist) + { + while ((imap->l_scope[cnt] = imap->l_scope[cnt + 1]) + != NULL) + ++cnt; + break; + } + ++cnt; + } + } /* The loader is gone, so mark the object as not having one. Note: l_idx != -1 -> object will be removed. */ diff -uprN glibc-2.4/elf/dl-deps.c glibc-2.5/elf/dl-deps.c --- glibc-2.4/elf/dl-deps.c 2006-01-18 19:48:53.000000000 +0000 +++ glibc-2.5/elf/dl-deps.c 2006-06-17 16:51:56.000000000 +0000 @@ -1,5 +1,5 @@ /* Load the dependencies of a mapped object. - Copyright (C) 1996-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -92,7 +92,7 @@ struct list { int done; /* Nonzero if this map was processed. */ struct link_map *map; /* The data. */ - struct list *next; /* Elements for normal list. */ + struct list *next; /* Elements for normal list. */ }; @@ -101,9 +101,9 @@ struct list ({ \ const char *__str = (str); \ const char *__result = __str; \ - size_t __cnt = DL_DST_COUNT(__str, 0); \ + size_t __dst_cnt = DL_DST_COUNT (__str, 0); \ \ - if (__cnt != 0) \ + if (__dst_cnt != 0) \ { \ char *__newp; \ \ @@ -113,9 +113,9 @@ struct list DST not allowed in SUID/SGID programs")); \ \ __newp = (char *) alloca (DL_DST_REQUIRED (l, __str, strlen (__str), \ - __cnt)); \ + __dst_cnt)); \ \ - __result = _dl_dst_substitute (l, __str, __newp, 0); \ + __result = _dl_dst_substitute (l, __str, __newp, 0); \ \ if (*__result == '\0') \ { \ diff -uprN glibc-2.4/elf/dl-dst.h glibc-2.5/elf/dl-dst.h --- glibc-2.4/elf/dl-dst.h 2004-03-06 08:12:41.000000000 +0000 +++ glibc-2.5/elf/dl-dst.h 2006-05-09 21:44:31.000000000 +0000 @@ -1,5 +1,5 @@ /* Handling of dynamic sring tokens. - Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1999,2001,2002,2003,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -50,6 +50,7 @@ \ First get the origin string if it is not available yet. \ This can only happen for the map of the executable. */ \ + DL_DST_REQ_STATIC \ if ((l)->l_origin == NULL) \ { \ assert ((l)->l_name[0] == '\0'); \ @@ -66,6 +67,18 @@ \ __len; }) +#ifdef SHARED +# define DL_DST_REQ_STATIC /* nothing */ +#else +# define DL_DST_REQ_STATIC \ + if ((l) == NULL) \ + { \ + const char *origin = _dl_get_origin (); \ + origin_len = (origin && origin != (char *) -1 ? strlen (origin) : 0); \ + } \ + else +#endif + #ifndef IS_IN_rtld # define _dl_get_origin GLRO(dl_get_origin) # define _dl_dst_substitute GLRO(dl_dst_substitute) diff -uprN glibc-2.4/elf/dl-load.c glibc-2.5/elf/dl-load.c --- glibc-2.4/elf/dl-load.c 2005-10-17 20:59:28.000000000 +0000 +++ glibc-2.5/elf/dl-load.c 2006-08-29 01:43:42.000000000 +0000 @@ -1,5 +1,5 @@ /* Map in a shared object's segments from the file. - Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -266,7 +266,14 @@ _dl_dst_substitute (struct link_map *l, ++name; if ((len = is_dst (start, name, "ORIGIN", is_path, INTUSE(__libc_enable_secure))) != 0) - repl = l->l_origin; + { +#ifndef SHARED + if (l == NULL) + repl = _dl_get_origin (); + else +#endif + repl = l->l_origin; + } else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0) repl = GLRO(dl_platform); else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0) @@ -742,7 +749,25 @@ _dl_init_paths (const char *llp) { size_t nllp; const char *cp = llp; - char *llp_tmp = strdupa (llp); + char *llp_tmp; + +#ifdef SHARED + /* Expand DSTs. */ + size_t cnt = DL_DST_COUNT (llp, 1); + if (__builtin_expect (cnt == 0, 1)) + llp_tmp = strdupa (llp); + else + { + /* Determine the length of the substituted string. */ + size_t total = DL_DST_REQUIRED (l, llp, strlen (llp), cnt); + + /* Allocate the necessary memory. */ + llp_tmp = (char *) alloca (total + 1); + llp_tmp = _dl_dst_substitute (l, llp, llp_tmp, 1); + } +#else + llp_tmp = strdupa (llp); +#endif /* Decompose the LD_LIBRARY_PATH contents. First determine how many elements it has. */ @@ -785,7 +810,7 @@ _dl_init_paths (const char *llp) static void __attribute__ ((noreturn, noinline)) lose (int code, int fd, const char *name, char *realname, struct link_map *l, - const char *msg) + const char *msg, struct r_debug *r) { /* The file might already be closed. */ if (fd != -1) @@ -804,6 +829,13 @@ lose (int code, int fd, const char *name free (l); } free (realname); + + if (r != NULL) + { + r->r_state = RT_CONSISTENT; + _dl_debug_state (); + } + _dl_signal_error (code, name, NULL, msg); } @@ -839,13 +871,8 @@ _dl_map_object_from_fd (const char *name call_lose_errno: errval = errno; call_lose: - if (make_consistent) - { - r->r_state = RT_CONSISTENT; - _dl_debug_state (); - } - - lose (errval, fd, name, realname, l, errstring); + lose (errval, fd, name, realname, l, errstring, + make_consistent ? r : NULL); } /* Look again to see if the real name matched another already loaded. */ @@ -1554,7 +1581,7 @@ print_search_path (struct r_search_path_ user might want to know about this. */ static int open_verify (const char *name, struct filebuf *fbp, struct link_map *loader, - int whatcode, bool *found_other_class) + int whatcode, bool *found_other_class, bool free_name) { /* This is the expected ELF header. */ #define ELF32_CLASS ELFCLASS32 @@ -1635,7 +1662,13 @@ open_verify (const char *name, struct fi errstring = (errval == 0 ? N_("file too short") : N_("cannot read file data")); call_lose: - lose (errval, fd, name, NULL, NULL, errstring); + if (free_name) + { + char *realname = (char *) name; + name = strdupa (realname); + free (realname); + } + lose (errval, fd, name, NULL, NULL, errstring, NULL); } /* See whether the ELF header is what we expect. */ @@ -1821,7 +1854,8 @@ open_path (const char *name, size_t name if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)) _dl_debug_printf (" trying file=%s\n", buf); - fd = open_verify (buf, fbp, loader, whatcode, found_other_class); + fd = open_verify (buf, fbp, loader, whatcode, found_other_class, + false); if (this_dir->status[cnt] == unknown) { if (fd != -1) @@ -1830,7 +1864,7 @@ open_path (const char *name, size_t name auditing code. We must try to disturb the program as little as possible. */ else if (loader == NULL - || GL(dl_ns)[loader->l_ns]._ns_loaded->l_audit == 0) + || GL(dl_ns)[loader->l_ns]._ns_loaded->l_auditing == 0) { /* We failed to open machine dependent library. Let's test whether there is any directory at all. */ @@ -2014,25 +2048,34 @@ _dl_map_object (struct link_map *loader, RPATHs. */ if (loader == NULL || loader->l_info[DT_RUNPATH] == NULL) { + /* This is the executable's map (if there is one). Make sure that + we do not look at it twice. */ + struct link_map *main_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; + bool did_main_map = false; + /* First try the DT_RPATH of the dependent object that caused NAME to be loaded. Then that object's dependent, and on up. */ - for (l = loader; fd == -1 && l; l = l->l_loader) + for (l = loader; l; l = l->l_loader) if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH")) - fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, - &realname, &fb, loader, LA_SER_RUNPATH, - &found_other_class); + { + fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, + &realname, &fb, loader, LA_SER_RUNPATH, + &found_other_class); + if (fd != -1) + break; + + did_main_map |= l == main_map; + } /* If dynamically linked, try the DT_RPATH of the executable itself. NB: we do this for lookups in any namespace. */ - if (fd == -1) - { - l = GL(dl_ns)[LM_ID_BASE]._ns_loaded; - if (l && l->l_type != lt_loaded && l != loader - && cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH")) - fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, - &realname, &fb, loader ?: l, LA_SER_RUNPATH, - &found_other_class); - } + if (fd == -1 && !did_main_map + && main_map != NULL && main_map->l_type != lt_loaded + && cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH, + "RPATH")) + fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs, + &realname, &fb, loader ?: main_map, LA_SER_RUNPATH, + &found_other_class); } /* Try the LD_LIBRARY_PATH environment variable. */ @@ -2098,7 +2141,7 @@ _dl_map_object (struct link_map *loader, { fd = open_verify (cached, &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded, - LA_SER_CONFIG, &found_other_class); + LA_SER_CONFIG, &found_other_class, false); if (__builtin_expect (fd != -1, 1)) { realname = local_strdup (cached); @@ -2136,7 +2179,7 @@ _dl_map_object (struct link_map *loader, { fd = open_verify (realname, &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded, 0, - &found_other_class); + &found_other_class, true); if (__builtin_expect (fd, 0) == -1) free (realname); } @@ -2166,8 +2209,11 @@ _dl_map_object (struct link_map *loader, if ((name_copy = local_strdup (name)) == NULL || (l = _dl_new_object (name_copy, name, type, loader, mode, nsid)) == NULL) - _dl_signal_error (ENOMEM, name, NULL, - N_("cannot create shared object descriptor")); + { + free (name_copy); + _dl_signal_error (ENOMEM, name, NULL, + N_("cannot create shared object descriptor")); + } /* Signal that this is a faked entry. */ l->l_faked = 1; /* Since the descriptor is initialized with zero we do not diff -uprN glibc-2.4/elf/dl-lookup.c glibc-2.5/elf/dl-lookup.c --- glibc-2.4/elf/dl-lookup.c 2005-12-21 22:16:20.000000000 +0000 +++ glibc-2.5/elf/dl-lookup.c 2006-07-10 21:49:38.000000000 +0000 @@ -1,5 +1,5 @@ /* Look up a symbol in the loaded objects. - Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -72,6 +72,16 @@ struct sym_val #include "do-lookup.h" +static uint_fast32_t +dl_new_hash (const char *s) +{ + uint_fast32_t h = 5381; + for (unsigned char c = *s; c != '\0'; c = *++s) + h = h * 33 + c; + return h & 0xffffffff; +} + + /* Add extra dependency on MAP to UNDEF_MAP. */ static int internal_function @@ -206,7 +216,8 @@ _dl_lookup_symbol_x (const char *undef_n const struct r_found_version *version, int type_class, int flags, struct link_map *skip_map) { - const unsigned long int hash = _dl_elf_hash (undef_name); + const uint_fast32_t new_hash = dl_new_hash (undef_name); + unsigned long int old_hash = 0xffffffff; struct sym_val current_value = { NULL, NULL }; struct r_scope_elem **scope = symbol_scope; @@ -229,8 +240,9 @@ _dl_lookup_symbol_x (const char *undef_n /* Search the relevant loaded objects for a definition. */ for (size_t start = i; *scope != NULL; start = 0, ++scope) { - int res = do_lookup_x (undef_name, hash, *ref, ¤t_value, *scope, - start, version, flags, skip_map, type_class); + int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, + ¤t_value, *scope, start, version, flags, + skip_map, type_class); if (res > 0) break; @@ -301,9 +313,9 @@ _dl_lookup_symbol_x (const char *undef_n struct sym_val protected_value = { NULL, NULL }; for (scope = symbol_scope; *scope != NULL; i = 0, ++scope) - if (do_lookup_x (undef_name, hash, *ref, &protected_value, - *scope, i, version, flags, skip_map, - ELF_RTYPE_CLASS_PLT) != 0) + if (do_lookup_x (undef_name, new_hash, &old_hash, *ref, + &protected_value, *scope, i, version, flags, + skip_map, ELF_RTYPE_CLASS_PLT) != 0) break; if (protected_value.s != NULL && protected_value.m != undef_map) @@ -352,6 +364,31 @@ _dl_setup_hash (struct link_map *map) Elf_Symndx *hash; Elf_Symndx nchain; + if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + + DT_THISPROCNUM + DT_VERSIONTAGNUM + + DT_EXTRANUM + DT_VALNUM] != NULL, 1)) + { + Elf32_Word *hash32 + = (void *) D_PTR (map, l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + + DT_THISPROCNUM + DT_VERSIONTAGNUM + + DT_EXTRANUM + DT_VALNUM]); + map->l_nbuckets = *hash32++; + Elf32_Word symbias = *hash32++; + Elf32_Word bitmask_nwords = *hash32++; + /* Must be a power of two. */ + assert ((bitmask_nwords & (bitmask_nwords - 1)) == 0); + map->l_gnu_bitmask_idxbits = bitmask_nwords - 1; + map->l_gnu_shift = *hash32++; + + map->l_gnu_bitmask = (ElfW(Addr) *) hash32; + hash32 += __ELF_NATIVE_CLASS / 32 * bitmask_nwords; + + map->l_gnu_buckets = hash32; + hash32 += map->l_nbuckets; + map->l_gnu_chain_zero = hash32 - symbias; + return; + } + if (!map->l_info[DT_HASH]) return; hash = (void *) D_PTR (map, l_info[DT_HASH]); @@ -399,9 +436,10 @@ _dl_debug_bindings (const char *undef_na || GLRO(dl_trace_prelink_map) == GL(dl_ns)[LM_ID_BASE]._ns_loaded) && undef_map != GL(dl_ns)[LM_ID_BASE]._ns_loaded) { - const unsigned long int hash = _dl_elf_hash (undef_name); + const uint_fast32_t new_hash = dl_new_hash (undef_name); + unsigned long int old_hash = 0xffffffff; - do_lookup_x (undef_name, hash, *ref, &val, + do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val, undef_map->l_local_scope[0], 0, version, 0, NULL, type_class); diff -uprN glibc-2.4/elf/dl-misc.c glibc-2.5/elf/dl-misc.c --- glibc-2.4/elf/dl-misc.c 2004-07-06 04:16:01.000000000 +0000 +++ glibc-2.5/elf/dl-misc.c 2006-07-10 21:50:36.000000000 +0000 @@ -1,5 +1,5 @@ /* Miscellaneous support functions for dynamic linker - Copyright (C) 1997-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1997-2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -308,7 +308,7 @@ _dl_dprintf (int fd, const char *fmt, .. /* Test whether given NAME matches any of the names of the given object. */ int internal_function -_dl_name_match_p (const char *name, struct link_map *map) +_dl_name_match_p (const char *name, const struct link_map *map) { if (strcmp (name, map->l_name) == 0) return 1; diff -uprN glibc-2.4/elf/dl-open.c glibc-2.5/elf/dl-open.c --- glibc-2.4/elf/dl-open.c 2005-11-15 07:14:59.000000000 +0000 +++ glibc-2.5/elf/dl-open.c 2006-08-28 22:56:50.000000000 +0000 @@ -1,5 +1,5 @@ /* Load a shared object at runtime, relocate it, and run its initializer. - Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -221,13 +221,6 @@ dl_open_worker (void *a) size_t required; char *new_file; - /* DSTs must not appear in SUID/SGID programs. */ - if (INTUSE(__libc_enable_secure)) - /* This is an error. */ - _dl_signal_error (0, "dlopen", NULL, - N_("DST not allowed in SUID/SGID programs")); - - /* Determine how much space we need. We have to allocate the memory locally. */ required = DL_DST_REQUIRED (call_map, file, len, _dl_dst_count (dst, 0)); @@ -341,7 +334,7 @@ dl_open_worker (void *a) if (! l->l_real->l_relocated) { #ifdef SHARED - if (GLRO(dl_profile) != NULL) + if (__builtin_expect (GLRO(dl_profile) != NULL, 0)) { /* If this here is the shared object which we want to profile make sure the profile is started. We can find out whether diff -uprN glibc-2.4/elf/do-lookup.h glibc-2.5/elf/do-lookup.h --- glibc-2.4/elf/do-lookup.h 2006-02-26 20:49:35.000000000 +0000 +++ glibc-2.5/elf/do-lookup.h 2006-09-04 20:40:11.000000000 +0000 @@ -17,32 +17,29 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ + /* Inner part of the lookup functions. We return a value > 0 if we found the symbol, the value 0 if nothing is found and < 0 if something bad happened. */ static int __attribute_noinline__ -do_lookup_x (const char *undef_name, unsigned long int hash, - const ElfW(Sym) *ref, struct sym_val *result, - struct r_scope_elem *scope, size_t i, +do_lookup_x (const char *undef_name, uint_fast32_t new_hash, + unsigned long int *old_hash, const ElfW(Sym) *ref, + struct sym_val *result, struct r_scope_elem *scope, size_t i, const struct r_found_version *const version, int flags, struct link_map *skip, int type_class) { struct link_map **list = scope->r_list; size_t n = scope->r_nlist; - struct link_map *map; do { - const ElfW(Sym) *symtab; - const char *strtab; - const ElfW(Half) *verstab; + /* These variables are used in the nested function. */ Elf_Symndx symidx; - const ElfW(Sym) *sym; int num_versions = 0; const ElfW(Sym) *versioned_sym = NULL; - map = list[i]->l_real; + const struct link_map *map = list[i]->l_real; /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */ if (map == skip) @@ -63,109 +60,160 @@ do_lookup_x (const char *undef_name, uns map->l_name[0] ? map->l_name : rtld_progname, map->l_ns); - symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); - strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - verstab = map->l_versyms; - - /* Search the appropriate hash bucket in this object's symbol table - for a definition for the same symbol name. */ - for (symidx = map->l_buckets[hash % map->l_nbuckets]; - symidx != STN_UNDEF; - symidx = map->l_chain[symidx]) - { - sym = &symtab[symidx]; + /* If the hash table is empty there is nothing to do here. */ + if (map->l_nbuckets == 0) + continue; - assert (ELF_RTYPE_CLASS_PLT == 1); - if ((sym->st_value == 0 /* No value. */ -#ifdef USE_TLS - && ELFW(ST_TYPE) (sym->st_info) != STT_TLS -#endif - ) - || (type_class & (sym->st_shndx == SHN_UNDEF))) - continue; - - if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC -#ifdef USE_TLS - && ELFW(ST_TYPE) (sym->st_info) != STT_TLS -#endif - ) - /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC - entries (and STT_TLS if TLS is supported) since these - are no code/data definitions. */ - continue; - - if (sym != ref && strcmp (strtab + sym->st_name, undef_name)) - /* Not the symbol we are looking for. */ - continue; + /* The tables for this map. */ + const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + + + /* Nested routine to check whether the symbol matches. */ + const ElfW(Sym) * + __attribute_noinline__ + check_match (const ElfW(Sym) *sym) + { + assert (ELF_RTYPE_CLASS_PLT == 1); + if (__builtin_expect ((sym->st_value == 0 /* No value. */ + && ELFW(ST_TYPE) (sym->st_info) != STT_TLS) + || (type_class & (sym->st_shndx == SHN_UNDEF)), + 0)) + return NULL; + + if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC + && ELFW(ST_TYPE) (sym->st_info) != STT_TLS, 0)) + /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC + entries (and STT_TLS if TLS is supported) since these + are no code/data definitions. */ + return NULL; + + if (sym != ref && strcmp (strtab + sym->st_name, undef_name)) + /* Not the symbol we are looking for. */ + return NULL; + + const ElfW(Half) *verstab = map->l_versyms; + if (version != NULL) + { + if (__builtin_expect (verstab == NULL, 0)) + { + /* We need a versioned symbol but haven't found any. If + this is the object which is referenced in the verneed + entry it is a bug in the library since a symbol must + not simply disappear. + + It would also be a bug in the object since it means that + the list of required versions is incomplete and so the + tests in dl-version.c haven't found a problem.*/ + assert (version->filename == NULL + || ! _dl_name_match_p (version->filename, map)); + + /* Otherwise we accept the symbol. */ + } + else + { + /* We can match the version information or use the + default one if it is not hidden. */ + ElfW(Half) ndx = verstab[symidx] & 0x7fff; + if ((map->l_versions[ndx].hash != version->hash + || strcmp (map->l_versions[ndx].name, version->name)) + && (version->hidden || map->l_versions[ndx].hash + || (verstab[symidx] & 0x8000))) + /* It's not the version we want. */ + return NULL; + } + } + else + { + /* No specific version is selected. There are two ways we + can got here: + + - a binary which does not include versioning information + is loaded + + - dlsym() instead of dlvsym() is used to get a symbol which + might exist in more than one form + + If the library does not provide symbol version information + there is no problem at at: we simply use the symbol if it + is defined. + + These two lookups need to be handled differently if the + library defines versions. In the case of the old + unversioned application the oldest (default) version + should be used. In case of a dlsym() call the latest and + public interface should be returned. */ + if (verstab != NULL) + { + if ((verstab[symidx] & 0x7fff) + >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3)) + { + /* Don't accept hidden symbols. */ + if ((verstab[symidx] & 0x8000) == 0 + && num_versions++ == 0) + /* No version so far. */ + versioned_sym = sym; + + return NULL; + } + } + } + + /* There cannot be another entry for this symbol so stop here. */ + return sym; + } - if (version != NULL) - { - if (__builtin_expect (verstab == NULL, 0)) - { - /* We need a versioned symbol but haven't found any. If - this is the object which is referenced in the verneed - entry it is a bug in the library since a symbol must - not simply disappear. - - It would also be a bug in the object since it means that - the list of required versions is incomplete and so the - tests in dl-version.c haven't found a problem.*/ - assert (version->filename == NULL - || ! _dl_name_match_p (version->filename, map)); + const ElfW(Sym) *sym; + const ElfW(Addr) *bitmask = map->l_gnu_bitmask; + if (__builtin_expect (bitmask != NULL, 1)) + { + ElfW(Addr) bitmask_word + = bitmask[(new_hash / __ELF_NATIVE_CLASS) + & map->l_gnu_bitmask_idxbits]; + + unsigned int hashbit1 = new_hash & (__ELF_NATIVE_CLASS - 1); + unsigned int hashbit2 = ((new_hash >> map->l_gnu_shift) + & (__ELF_NATIVE_CLASS - 1)); - /* Otherwise we accept the symbol. */ - } - else - { - /* We can match the version information or use the - default one if it is not hidden. */ - ElfW(Half) ndx = verstab[symidx] & 0x7fff; - if ((map->l_versions[ndx].hash != version->hash - || strcmp (map->l_versions[ndx].name, version->name)) - && (version->hidden || map->l_versions[ndx].hash - || (verstab[symidx] & 0x8000))) - /* It's not the version we want. */ - continue; - } - } - else + if (__builtin_expect ((bitmask_word >> hashbit1) + & (bitmask_word >> hashbit2) & 1, 0)) { - /* No specific version is selected. There are two ways we - can got here: - - - a binary which does not include versioning information - is loaded - - - dlsym() instead of dlvsym() is used to get a symbol which - might exist in more than one form - - If the library does not provide symbol version - information there is no problem at at: we simply use the - symbol if it is defined. - - These two lookups need to be handled differently if the - library defines versions. In the case of the old - unversioned application the oldest (default) version - should be used. In case of a dlsym() call the latest and - public interface should be returned. */ - if (verstab != NULL) + Elf32_Word bucket = map->l_gnu_buckets[new_hash + % map->l_nbuckets]; + if (bucket != 0) { - if ((verstab[symidx] & 0x7fff) - >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3)) - { - /* Don't accept hidden symbols. */ - if ((verstab[symidx] & 0x8000) == 0 - && num_versions++ == 0) - /* No version so far. */ - versioned_sym = sym; + const Elf32_Word *hasharr = &map->l_gnu_chain_zero[bucket]; - continue; - } + do + if ((*hasharr & ~1u) == (new_hash & ~1u)) + { + symidx = hasharr - map->l_gnu_chain_zero; + sym = check_match (&symtab[symidx]); + if (sym != NULL) + goto found_it; + } + while ((*hasharr++ & 1u) == 0); } } + /* No symbol found. */ + symidx = SHN_UNDEF; + } + else + { + if (*old_hash == 0xffffffff) + *old_hash = _dl_elf_hash (undef_name); - /* There cannot be another entry for this symbol so stop here. */ - goto found_it; + /* Use the old SysV-style hash table. Search the appropriate + hash bucket in this object's symbol table for a definition + for the same symbol name. */ + for (symidx = map->l_buckets[*old_hash % map->l_nbuckets]; + symidx != STN_UNDEF; + symidx = map->l_chain[symidx]) + { + sym = check_match (&symtab[symidx]); + if (sym != NULL) + goto found_it; + } } /* If we have seen exactly one versioned symbol while we are @@ -186,7 +234,7 @@ do_lookup_x (const char *undef_name, uns if (! result->s) { result->s = sym; - result->m = map; + result->m = (struct link_map *) map; } break; } @@ -194,7 +242,7 @@ do_lookup_x (const char *undef_name, uns case STB_GLOBAL: /* Global definition. Just what we need. */ result->s = sym; - result->m = map; + result->m = (struct link_map *) map; return 1; default: /* Local symbols are ignored. */ @@ -213,7 +261,3 @@ do_lookup_x (const char *undef_name, uns /* We have not found anything until now. */ return 0; } - -#undef FCT -#undef ARG -#undef VERSIONED diff -uprN glibc-2.4/elf/dynamic-link.h glibc-2.5/elf/dynamic-link.h --- glibc-2.4/elf/dynamic-link.h 2005-03-15 22:57:25.000000000 +0000 +++ glibc-2.5/elf/dynamic-link.h 2006-07-10 21:52:18.000000000 +0000 @@ -1,5 +1,5 @@ /* Inline functions for dynamic linking. - Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -143,6 +143,8 @@ elf_get_dynamic_info (struct link_map *l # endif ADJUST_DYN_INFO (DT_JMPREL); ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM)); + ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM + + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM); # undef ADJUST_DYN_INFO assert (cnt <= DL_RO_DYN_TEMP_CNT); } diff -uprN glibc-2.4/elf/elf.h glibc-2.5/elf/elf.h --- glibc-2.4/elf/elf.h 2006-02-25 01:57:44.000000000 +0000 +++ glibc-2.5/elf/elf.h 2006-07-10 21:54:02.000000000 +0000 @@ -329,7 +329,8 @@ typedef struct #define SHT_GROUP 17 /* Section group */ #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ #define SHT_NUM 19 /* Number of defined types. */ -#define SHT_LOOS 0x60000000 /* Start OS-specific */ +#define SHT_LOOS 0x60000000 /* Start OS-specific. */ +#define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ #define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */ #define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */ #define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */ @@ -699,6 +700,9 @@ typedef struct If any adjustment is made to the ELF object after it has been built these entries will need to be adjusted. */ #define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table. */ +#define DT_TLSDESC_PLT 0x6ffffef6 +#define DT_TLSDESC_GOT 0x6ffffef7 #define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */ #define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */ #define DT_CONFIG 0x6ffffefa /* Configuration information. */ @@ -709,7 +713,7 @@ typedef struct #define DT_SYMINFO 0x6ffffeff /* Syminfo table. */ #define DT_ADDRRNGHI 0x6ffffeff #define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */ -#define DT_ADDRNUM 10 +#define DT_ADDRNUM 11 /* The versioning entry types. The next are defined as part of the GNU extension. */ diff -uprN glibc-2.4/elf/ldconfig.c glibc-2.5/elf/ldconfig.c --- glibc-2.4/elf/ldconfig.c 2006-03-06 08:40:11.000000000 +0000 +++ glibc-2.5/elf/ldconfig.c 2006-04-07 06:57:49.000000000 +0000 @@ -1194,7 +1194,7 @@ main (int argc, char **argv) if (opt_chroot) { /* Normalize the path a bit, we might need it for printing later. */ - char *endp = strchr (opt_chroot, '\0'); + char *endp = rawmemchr (opt_chroot, '\0'); while (endp > opt_chroot && endp[-1] == '/') --endp; *endp = '\0'; diff -uprN glibc-2.4/elf/ldd.bash.in glibc-2.5/elf/ldd.bash.in --- glibc-2.4/elf/ldd.bash.in 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/elf/ldd.bash.in 2006-04-30 16:06:20.000000000 +0000 @@ -144,13 +144,17 @@ for file do *) file=./$file ;; esac - if test ! -f "$file"; then + if test ! -e "$file"; then echo "ldd: ${file}:" $"No such file or directory" >&2 result=1 + elif test ! -f "$file"; then + echo "ldd: ${file}:" $"not regular file" >&2 + result=1 elif test -r "$file"; then test -x "$file" || echo 'ldd:' $"\ warning: you do not have execution permission for" "\`$file'" >&2 RTLD= + ret=1 for rtld in ${RTLDLIST}; do if test -x $rtld; then verify_out=`${rtld} --verify "$file"` @@ -160,12 +164,6 @@ warning: you do not have execution permi esac fi done - if test -z "${RTLD}"; then - set ${RTLDLIST} - RTLD=$1 - verify_out=`${RTLD} --verify "$file"` - ret=$? - fi case $ret in 0) # If the program exits with exit code 5, it means the process has been diff -uprN glibc-2.4/elf/Makefile glibc-2.5/elf/Makefile --- glibc-2.4/elf/Makefile 2006-03-01 06:18:26.000000000 +0000 +++ glibc-2.5/elf/Makefile 2006-09-19 14:41:41.000000000 +0000 @@ -87,11 +87,12 @@ distribute := rtld-Rules \ unload3mod1.c unload3mod2.c unload3mod3.c unload3mod4.c \ unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \ unload6mod1.c unload6mod2.c unload6mod3.c \ + unload7mod1.c unload7mod2.c \ tst-auditmod1.c tst-audit.sh \ order2mod1.c order2mod2.c order2mod3.c order2mod4.c \ tst-stackguard1.c tst-stackguard1-static.c \ tst-array5.c tst-array5-static.c tst-array5dep.c \ - tst-array5.exp + tst-array5.exp tst-leaks1.c CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables @@ -139,7 +140,7 @@ vpath %.c ../locale/programs endif endif -tests = tst-tls1 tst-tls2 tst-tls9 +tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 ifeq (yes,$(have-initfini-array)) tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 endif @@ -168,8 +169,9 @@ tests += loadtest restest1 preloadtest l tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \ tst-dlmodcount tst-dlopenrpath tst-deep1 \ tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ - unload3 unload4 unload5 unload6 tst-audit1 tst-global1 order2 \ - tst-stackguard1 + unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \ + tst-audit1 tst-audit2 \ + tst-stackguard1 tst-addr1 # reldep9 test-srcs = tst-pathopt tests-vis-yes = vismain @@ -180,6 +182,7 @@ endif ifeq (yesyes,$(have-fpie)$(build-shared)) tests: $(objpfx)tst-pie1.out endif +tests: $(objpfx)tst-leaks1-mem modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ testobj1_1 failobj constload2 constload3 unloadmod \ dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \ @@ -209,6 +212,7 @@ modules-names = testobj1 testobj2 testob unload3mod1 unload3mod2 unload3mod3 unload3mod4 \ unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ unload6mod1 unload6mod2 unload6mod3 \ + unload7mod1 unload7mod2 \ order2mod1 order2mod2 order2mod3 order2mod4 ifeq (yes,$(have-initfini-array)) modules-names += tst-array2dep tst-array5dep @@ -221,7 +225,7 @@ modules-nodelete-yes = nodelmod1 nodelmo nodel2mod1 nodel2mod2 nodel2mod3 modules-nodlopen-yes = nodlopenmod nodlopenmod2 modules-execstack-yes = tst-execstack-mod -extra-objs += $(addsuffix .os,$(strip $(modules-names))) +extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) # We need this variable to be sure the test modules get the right CPPFLAGS. test-extras += $(modules-names) @@ -453,6 +457,8 @@ $(objpfx)unload4mod2.so: $(objpfx)unload $(objpfx)unload6mod1.so: $(libdl) $(objpfx)unload6mod2.so: $(libdl) $(objpfx)unload6mod3.so: $(libdl) +$(objpfx)unload7mod1.so: $(libdl) +$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so LDFLAGS-tst-tlsmod5.so = -nostdlib LDFLAGS-tst-tlsmod6.so = -nostdlib @@ -730,6 +736,10 @@ $(objpfx)unload6: $(libdl) $(objpfx)unload6.out: $(objpfx)unload6mod1.so $(objpfx)unload6mod2.so \ $(objpfx)unload6mod3.so +$(objpfx)unload7: $(libdl) +$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so +unload7-ENV = MALLOC_PERTURB_=85 + ifdef libdl $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so @@ -878,6 +888,9 @@ $(objpfx)tst-dlmopen3.out: $(objpfx)tst- $(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so +$(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so +tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + $(objpfx)tst-global1: $(libdl) $(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so @@ -895,3 +908,11 @@ order2mod2.so-no-z-defs = yes tst-stackguard1-ARGS = --command "$(built-program-cmd) --child" tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child" + +$(objpfx)tst-leaks1: $(libdl) +$(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out + $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@ + +tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace + +$(objpfx)tst-addr1: $(libdl) diff -uprN glibc-2.4/elf/rtld.c glibc-2.5/elf/rtld.c --- glibc-2.4/elf/rtld.c 2005-12-30 07:22:27.000000000 +0000 +++ glibc-2.5/elf/rtld.c 2006-09-29 16:56:15.000000000 +0000 @@ -1,5 +1,5 @@ /* Run time dynamic linker. - Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -303,7 +303,6 @@ _dl_start_final (void *arg, struct dl_st GL(dl_rtld_map).l_tls_offset = info->l.l_tls_offset; GL(dl_rtld_map).l_tls_modid = 1; # else - assert (info->l.l_tls_modid == 0); # if NO_TLS_OFFSET != 0 GL(dl_rtld_map).l_tls_offset = NO_TLS_OFFSET; # endif @@ -389,6 +388,9 @@ _dl_start (void *arg) ++cnt) bootstrap_map.l_info[cnt] = 0; # endif +# if USE___THREAD + bootstrap_map.l_tls_modid = 0; +# endif #endif /* Figure out the run-time load address of the dynamic linker itself. */ @@ -2200,7 +2202,6 @@ ERROR: ld.so: object '%s' cannot be load #ifndef HP_TIMING_NONAVAIL hp_timing_t start; hp_timing_t stop; - hp_timing_t add; #endif /* If we are profiling we also must do lazy reloaction. */ @@ -2255,19 +2256,6 @@ ERROR: ld.so: object '%s' cannot be load if (__builtin_expect (GL(dl_profile_map) != NULL, 0)) /* We must prepare the profiling. */ _dl_start_profile (); - - if (rtld_multiple_ref) - { - /* There was an explicit ref to the dynamic linker as a shared lib. - Re-relocate ourselves with user-controlled symbol definitions. */ - HP_TIMING_NOW (start); - /* Mark the link map as not yet relocated again. */ - GL(dl_rtld_map).l_relocated = 0; - _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0); - HP_TIMING_NOW (stop); - HP_TIMING_DIFF (add, start, stop); - HP_TIMING_ACCUM_NT (relocate_time, add); - } } #ifndef NONTLS_INIT_TP @@ -2296,6 +2284,30 @@ ERROR: ld.so: object '%s' cannot be load NONTLS_INIT_TP; #endif + if (! prelinked && rtld_multiple_ref) + { + /* There was an explicit ref to the dynamic linker as a shared lib. + Re-relocate ourselves with user-controlled symbol definitions. + + We must do this after TLS initialization in case after this + re-relocation, we might call a user-supplied function + (e.g. calloc from _dl_relocate_object) that uses TLS data. */ + +#ifndef HP_TIMING_NONAVAIL + hp_timing_t start; + hp_timing_t stop; + hp_timing_t add; +#endif + + HP_TIMING_NOW (start); + /* Mark the link map as not yet relocated again. */ + GL(dl_rtld_map).l_relocated = 0; + _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0); + HP_TIMING_NOW (stop); + HP_TIMING_DIFF (add, start, stop); + HP_TIMING_ACCUM_NT (relocate_time, add); + } + #ifdef SHARED /* Auditing checkpoint: we have added all objects. */ if (__builtin_expect (GLRO(dl_naudit) > 0, 0)) @@ -2614,7 +2626,7 @@ process_envvars (enum mode *modep) } if (memcmp (envline, "POINTER_GUARD", 13) == 0) - GLRO(dl_pointer_guard) = envline[14] == '0'; + GLRO(dl_pointer_guard) = envline[14] != '0'; break; case 14: diff -uprN glibc-2.4/elf/tst-addr1.c glibc-2.5/elf/tst-addr1.c --- glibc-2.4/elf/tst-addr1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/tst-addr1.c 2006-08-31 16:55:41.000000000 +0000 @@ -0,0 +1,26 @@ +#include +#include +#include + +static int +do_test (void) +{ + Dl_info i; + if (dladdr (&printf, &i) == 0) + { + puts ("not found"); + return 1; + } + printf ("found symbol %s in %s\n", i.dli_sname, i.dli_fname); + return i.dli_sname == NULL + || (strcmp (i.dli_sname, "printf") != 0 + /* On architectures which create PIC code by default + &printf may resolve to an address in libc.so + rather than in the binary. printf and _IO_printf + are aliased and which one comes first in the + hash table is up to the linker. */ + && strcmp (i.dli_sname, "_IO_printf") != 0); +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/elf/tst-audit2.c glibc-2.5/elf/tst-audit2.c --- glibc-2.4/elf/tst-audit2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/tst-audit2.c 2006-03-19 07:47:47.000000000 +0000 @@ -0,0 +1,50 @@ +/* Test case for early TLS initialization in dynamic linker. */ + +#include +#include +#include + +#if HAVE___THREAD +# define MAGIC1 0xabcdef72 +# define MAGIC2 0xd8675309 +static __thread unsigned int magic[] = { MAGIC1, MAGIC2 }; +#endif + +#undef calloc + +/* This calloc definition will be called by the dynamic linker itself. + We test that it has initialized our TLS block by the time it does so. */ + +void * +calloc (size_t n, size_t m) +{ +#if HAVE___THREAD + if (magic[0] != MAGIC1 || magic[1] != MAGIC2) + { + printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC1, MAGIC2); + abort (); + } + magic[0] = MAGIC2; + magic[1] = MAGIC1; +#endif + + n *= m; + void *ptr = malloc (n); + if (ptr != NULL) + memset (ptr, '\0', n); + return ptr; +} + +int +main (void) +{ +#if HAVE___THREAD + if (magic[1] != MAGIC1 || magic[0] != MAGIC2) + { + printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC2, MAGIC1); + return 1; + } +#endif + + return 0; +} diff -uprN glibc-2.4/elf/tst-auditmod1.c glibc-2.5/elf/tst-auditmod1.c --- glibc-2.4/elf/tst-auditmod1.c 2005-10-05 18:57:00.000000000 +0000 +++ glibc-2.5/elf/tst-auditmod1.c 2006-08-01 06:48:46.000000000 +0000 @@ -132,12 +132,6 @@ la_symbind64 (Elf64_Sym *sym, unsigned i # define La_regs La_sh_regs # define La_retval La_sh_retval # define int_retval lrv_r0 -#elif defined __mc68000__ -# define pltenter la_m68k_gnu_pltenter -# define pltexit la_m68k_gnu_pltexit -# define La_regs La_m68k_regs -# define La_retval La_m68k_retval -# define int_retval lrv_d0 #elif defined __alpha__ # define pltenter la_alpha_gnu_pltenter # define pltexit la_alpha_gnu_pltexit @@ -162,24 +156,6 @@ la_symbind64 (Elf64_Sym *sym, unsigned i # define La_regs La_ia64_regs # define La_retval La_ia64_retval # define int_retval lrv_r8 -#elif defined __mips__ && _MIPS_SIM == _ABIO32 -# define pltenter la_mips_o32_gnu_pltenter -# define pltexit la_mips_o32_gnu_pltexit -# define La_regs La_mips_32_regs -# define La_retval La_mips_32_retval -# define int_retval lrv_v0 -#elif defined __mips__ && _MIPS_SIM == _ABIN32 -# define pltenter la_mips_n32_gnu_pltenter -# define pltexit la_mips_n32_gnu_pltexit -# define La_regs La_mips_64_regs -# define La_retval La_mips_64_retval -# define int_retval lrv_v0 -#elif defined __mips__ && _MIPS_SIM == _ABI64 -# define pltenter la_mips_n64_gnu_pltenter -# define pltexit la_mips_n64_gnu_pltexit -# define La_regs La_mips_64_regs -# define La_retval La_mips_64_retval -# define int_retval lrv_v0 #elif defined __sparc__ && __WORDSIZE == 32 # define pltenter la_sparc32_gnu_pltenter # define pltexit la_sparc32_gnu_pltexit @@ -197,7 +173,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned i #include #if (!defined (pltenter) || !defined (pltexit) || !defined (La_regs) \ || !defined (La_retval) || !defined (int_retval)) -# error "architecture specific code needed in sysdeps/CPU/tls-audit.h or here" +# error "architecture specific code needed in sysdeps/CPU/tst-audit.h or here" #endif diff -uprN glibc-2.4/elf/tst-leaks1.c glibc-2.5/elf/tst-leaks1.c --- glibc-2.4/elf/tst-leaks1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/tst-leaks1.c 2006-03-19 07:47:56.000000000 +0000 @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +int +main (void) +{ + mtrace (); + + int ret = 0; + for (int i = 0; i < 10; i++) + { + void *h = dlopen (i < 5 ? "./tst-leaks1.c" + : "$ORIGIN/tst-leaks1.o", RTLD_LAZY); + if (h != NULL) + { + puts ("dlopen unexpectedly succeeded"); + ret = 1; + dlclose (h); + } + } + + return ret; +} diff -uprN glibc-2.4/elf/unload7.c glibc-2.5/elf/unload7.c --- glibc-2.4/elf/unload7.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/unload7.c 2006-09-19 14:41:09.000000000 +0000 @@ -0,0 +1,39 @@ +#include +#include + +int +main (void) +{ + void *h = dlopen ("$ORIGIN/unload7mod1.so", RTLD_LAZY); + if (h == NULL) + { + puts ("dlopen unload7mod1.so failed"); + return 1; + } + + int (*fn) (void); + fn = dlsym (h, "foo"); + if (fn == NULL) + { + puts ("dlsym failed"); + return 1; + } + + int ret = 0; + if (fn () == 0) + ++ret; + + void *h2 = dlopen ("$ORIGIN/unload7mod2.so", RTLD_LAZY); + if (h2 == NULL) + { + puts ("dlopen unload7mod2.so failed"); + return 1; + } + dlclose (h2); + + if (fn () == 0) + ++ret; + + dlclose (h); + return ret; +} diff -uprN glibc-2.4/elf/unload7mod1.c glibc-2.5/elf/unload7mod1.c --- glibc-2.4/elf/unload7mod1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/unload7mod1.c 2006-09-19 14:41:09.000000000 +0000 @@ -0,0 +1,11 @@ +#include +#include + +int +foo (int i) +{ + if (dlsym (RTLD_DEFAULT, "unload7_nonexistent_symbol") == NULL) + return 1; + puts ("dlsym returned non-NULL"); + return 0; +} diff -uprN glibc-2.4/elf/unload7mod2.c glibc-2.5/elf/unload7mod2.c --- glibc-2.4/elf/unload7mod2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/elf/unload7mod2.c 2006-09-19 14:41:09.000000000 +0000 @@ -0,0 +1 @@ +int x; diff -uprN glibc-2.4/grp/initgroups.c glibc-2.5/grp/initgroups.c --- glibc-2.4/grp/initgroups.c 2005-03-29 23:39:59.000000000 +0000 +++ glibc-2.5/grp/initgroups.c 2006-08-03 15:39:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1989,91,93,1996-2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1989,91,93,1996-2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include #include #include #include @@ -74,8 +75,8 @@ internal_getgrouplist (const char *user, long int start = 1; /* Never store more than the starting *SIZE number of elements. */ - if (*size > 0) - (*groupsp)[0] = group; + assert (*size > 0); + (*groupsp)[0] = group; if (__nss_group_database != NULL) { @@ -142,11 +143,9 @@ internal_getgrouplist (const char *user, int getgrouplist (const char *user, gid_t group, gid_t *groups, int *ngroups) { - gid_t *newgroups; long int size = MAX (1, *ngroups); - int result; - newgroups = (gid_t *) malloc ((size + 1) * sizeof (gid_t)); + gid_t *newgroups = (gid_t *) malloc (size * sizeof (gid_t)); if (__builtin_expect (newgroups == NULL, 0)) /* No more memory. */ // XXX This is wrong. The user provided memory, we have to use @@ -155,20 +154,16 @@ getgrouplist (const char *user, gid_t gr // XXX too small. For initgroups a flag could say: increase size. return -1; - result = internal_getgrouplist (user, group, &size, &newgroups, -1); - - memcpy (groups, newgroups, MIN (*ngroups, result) * sizeof (gid_t)); + int total = internal_getgrouplist (user, group, &size, &newgroups, -1); - if (result > *ngroups) - { - *ngroups = result; - result = -1; - } - else - *ngroups = result; + memcpy (groups, newgroups, MIN (*ngroups, total) * sizeof (gid_t)); free (newgroups); - return result; + + int retval = total > *ngroups ? -1 : total; + *ngroups = total; + + return retval; } static_link_warning (getgrouplist) diff -uprN glibc-2.4/hurd/getdport.c glibc-2.5/hurd/getdport.c --- glibc-2.4/hurd/getdport.c 2001-07-06 04:54:47.000000000 +0000 +++ glibc-2.5/hurd/getdport.c 2006-08-03 01:18:36.000000000 +0000 @@ -35,8 +35,11 @@ __getdport (int fd) so we don't bother allocating a real table. */ if (_hurd_init_dtable == NULL) - /* Never had a descriptor table. */ - return EBADF; + { + /* Never had a descriptor table. */ + errno = EBADF; + return MACH_PORT_NULL; + } if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize || _hurd_init_dtable[fd] == MACH_PORT_NULL) diff -uprN glibc-2.4/iconv/gconv_builtin.h glibc-2.5/iconv/gconv_builtin.h --- glibc-2.4/iconv/gconv_builtin.h 2002-12-02 21:46:00.000000000 +0000 +++ glibc-2.5/iconv/gconv_builtin.h 2006-05-15 16:36:51.000000000 +0000 @@ -1,5 +1,5 @@ /* Builtin transformations. - Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1997-1999, 2000-2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -18,6 +18,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +/* All encoding named must be in upper case. There must be no extra + spaces. */ + BUILTIN_ALIAS ("UCS4//", "ISO-10646/UCS4/") BUILTIN_ALIAS ("UCS-4//", "ISO-10646/UCS4/") BUILTIN_ALIAS ("UCS-4BE//", "ISO-10646/UCS4/") diff -uprN glibc-2.4/iconv/gconv_conf.c glibc-2.5/iconv/gconv_conf.c --- glibc-2.4/iconv/gconv_conf.c 2005-12-21 19:29:30.000000000 +0000 +++ glibc-2.5/iconv/gconv_conf.c 2006-05-15 16:38:23.000000000 +0000 @@ -1,5 +1,5 @@ /* Handle configuration data. - Copyright (C) 1997-2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997-2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -78,11 +78,11 @@ static struct gconv_module builtin_modul #undef BUILTIN_ALIAS }; -static const char *const builtin_aliases[] = +static const char builtin_aliases[] = { #define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, BtowcFct, \ MinF, MaxF, MinT, MaxT) -#define BUILTIN_ALIAS(From, To) From " " To, +#define BUILTIN_ALIAS(From, To) From "\0" To "\0" #include "gconv_builtin.h" @@ -124,13 +124,41 @@ detect_conflict (const char *alias) } +/* The actual code to add aliases. */ +static void +add_alias2 (const char *from, const char *to, const char *wp, void *modules) +{ + /* Test whether this alias conflicts with any available module. */ + if (detect_conflict (from)) + /* It does conflict, don't add the alias. */ + return; + + struct gconv_alias *new_alias = (struct gconv_alias *) + malloc (sizeof (struct gconv_alias) + (wp - from)); + if (new_alias != NULL) + { + void **inserted; + + new_alias->fromname = memcpy ((char *) new_alias + + sizeof (struct gconv_alias), + from, wp - from); + new_alias->toname = new_alias->fromname + (to - from); + + inserted = (void **) __tsearch (new_alias, &__gconv_alias_db, + __gconv_alias_compare); + if (inserted == NULL || *inserted != new_alias) + /* Something went wrong, free this entry. */ + free (new_alias); + } +} + + /* Add new alias. */ static void add_alias (char *rp, void *modules) { /* We now expect two more string. The strings are normalized (converted to UPPER case) and strored in the alias database. */ - struct gconv_alias *new_alias; char *from, *to, *wp; while (__isspace_l (*rp, _nl_C_locobj_ptr)) @@ -152,28 +180,7 @@ add_alias (char *rp, void *modules) return; *wp++ = '\0'; - /* Test whether this alias conflicts with any available module. */ - if (detect_conflict (from)) - /* It does conflict, don't add the alias. */ - return; - - new_alias = (struct gconv_alias *) - malloc (sizeof (struct gconv_alias) + (wp - from)); - if (new_alias != NULL) - { - void **inserted; - - new_alias->fromname = memcpy ((char *) new_alias - + sizeof (struct gconv_alias), - from, wp - from); - new_alias->toname = new_alias->fromname + (to - from); - - inserted = (void **) __tsearch (new_alias, &__gconv_alias_db, - __gconv_alias_compare); - if (inserted == NULL || *inserted != new_alias) - /* Something went wrong, free this entry. */ - free (new_alias); - } + add_alias2 (from, to, wp, modules); } @@ -588,12 +595,16 @@ __gconv_read_conf (void) } /* Add aliases for builtin conversions. */ - cnt = sizeof (builtin_aliases) / sizeof (builtin_aliases[0]); - while (cnt > 0) + const char *cp = builtin_aliases; + do { - char *copy = strdupa (builtin_aliases[--cnt]); - add_alias (copy, modules); + const char *from = cp; + const char *to = __rawmemchr (from, '\0') + 1; + cp = __rawmemchr (to, '\0') + 1; + + add_alias2 (from, to, cp, modules); } + while (*cp != '\0'); /* Restore the error number. */ __set_errno (save_errno); diff -uprN glibc-2.4/iconv/gconv_db.c glibc-2.5/iconv/gconv_db.c --- glibc-2.4/iconv/gconv_db.c 2005-12-19 07:25:25.000000000 +0000 +++ glibc-2.5/iconv/gconv_db.c 2006-04-25 17:45:02.000000000 +0000 @@ -1,5 +1,5 @@ /* Provide access to the collection of available transformation modules. - Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1997-2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -227,7 +227,7 @@ __gconv_release_step (struct __gconv_ste step->__shlib_handle = NULL; #endif } - else + else if (step->__shlib_handle == NULL) /* Builtin modules should not have end functions. */ assert (step->__end_fct == NULL); } diff -uprN glibc-2.4/iconv/gconv_int.h glibc-2.5/iconv/gconv_int.h --- glibc-2.4/iconv/gconv_int.h 2005-12-21 07:27:27.000000000 +0000 +++ glibc-2.5/iconv/gconv_int.h 2006-05-15 20:14:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -128,7 +128,7 @@ extern struct gconv_module *__gconv_modu extern const char *__gconv_path_envvar attribute_hidden; /* Lock for the conversion database content. */ -__libc_lock_define (extern, __gconv_lock); +__libc_lock_define (extern, __gconv_lock attribute_hidden) /* The gconv functions expects the name to be in upper case and complete, diff -uprN glibc-2.4/iconv/iconv_charmap.c glibc-2.5/iconv/iconv_charmap.c --- glibc-2.4/iconv/iconv_charmap.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/iconv/iconv_charmap.c 2006-05-10 02:06:18.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert using charmaps and possibly iconv(). - Copyright (C) 2001, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -365,19 +365,27 @@ use_to_charmap (const char *from_code, s if (outptr != (char *) outbuf) { /* We got some output. Good, use it. */ - struct charseq *newp; + union + { + struct charseq seq; + struct + { + const char *name; + uint32_t ucs4; + int nbytes; + unsigned char bytes[outlen]; + } mem; + } new; outlen = sizeof (outbuf) - outlen; assert ((char *) outbuf + outlen == outptr); - newp = (struct charseq *) xmalloc (sizeof (struct charseq) - + outlen); - newp->name = out->name; - newp->ucs4 = out->ucs4; - newp->nbytes = outlen; - memcpy (newp->bytes, outbuf, outlen); + new.mem.name = out->name; + new.mem.ucs4 = out->ucs4; + new.mem.nbytes = outlen; + memcpy (new.mem.bytes, outbuf, outlen); - add_bytes (rettbl, newp, out); + add_bytes (rettbl, &new.seq, out); } /* Clear any possible state left behind. */ @@ -488,7 +496,7 @@ process_fd (struct convtable *tbl, int f process it in one step. */ static char *inbuf = NULL; static size_t maxlen = 0; - char *inptr = NULL; + char *inptr = inbuf; size_t actlen = 0; while (actlen < maxlen) diff -uprN glibc-2.4/iconv/iconvconfig.c glibc-2.5/iconv/iconvconfig.c --- glibc-2.4/iconv/iconvconfig.c 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/iconv/iconvconfig.c 2006-09-21 03:57:30.000000000 +0000 @@ -339,7 +339,7 @@ main (int argc, char *argv[]) if (status == 0) status = write_output (); else - error (1, 0, _("no output file produced because warning were issued")); + error (1, 0, _("no output file produced because warnings were issued")); return status; } diff -uprN glibc-2.4/iconv/iconv_prog.c glibc-2.5/iconv/iconv_prog.c --- glibc-2.4/iconv/iconv_prog.c 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/iconv/iconv_prog.c 2006-09-21 03:57:30.000000000 +0000 @@ -183,12 +183,12 @@ main (int argc, char *argv[]) if (strchr (from_code, '/') != NULL) /* The from-name might be a charmap file name. Try reading the file. */ - from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0); + from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0, 0); if (strchr (orig_to_code, '/') != NULL) /* The to-name might be a charmap file name. Try reading the file. */ - to_charmap = charmap_read (orig_to_code, /*0, 1,*/1,0, 0); + to_charmap = charmap_read (orig_to_code, /*0, 1,*/1, 0, 0, 0); /* Determine output file. */ @@ -239,7 +239,7 @@ main (int argc, char *argv[]) if (to_wrong) error (0, 0, _("\ -conversion from `%s' and to `%s' are not supported"), +conversions from `%s' and to `%s' are not supported"), from_pretty, to_pretty); else error (0, 0, diff -uprN glibc-2.4/iconvdata/gconv-modules glibc-2.5/iconvdata/gconv-modules --- glibc-2.4/iconvdata/gconv-modules 2005-11-16 08:15:06.000000000 +0000 +++ glibc-2.5/iconvdata/gconv-modules 2006-05-01 14:19:48.000000000 +0000 @@ -1903,3 +1903,7 @@ alias ISO/TR_11548-1/ ISO_11548-1// alias ISO11548-1// ISO_11548-1// module ISO_11548-1// INTERNAL ISO_11548-1 1 module INTERNAL ISO_11548-1// ISO_11548-1 1 + +# from to module cost +module MIK// INTERNAL MIK 1 +module INTERNAL MIK// MIK 1 diff -uprN glibc-2.4/iconvdata/ibm437.c glibc-2.5/iconvdata/ibm437.c --- glibc-2.4/iconvdata/ibm437.c 2001-07-06 04:54:50.000000000 +0000 +++ glibc-2.5/iconvdata/ibm437.c 2006-04-21 18:17:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion from and to IBM437. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,6 +24,6 @@ #define TABLES #define CHARSET_NAME "IBM437//" -#define HAS_HOLES 1 /* Not all 256 character are defined. */ +#define HAS_HOLES 0 /* All 256 character are defined. */ #include <8bit-gap.c> diff -uprN glibc-2.4/iconvdata/ibm861.c glibc-2.5/iconvdata/ibm861.c --- glibc-2.4/iconvdata/ibm861.c 2001-07-06 04:54:50.000000000 +0000 +++ glibc-2.5/iconvdata/ibm861.c 2006-04-21 18:17:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion from and to IBM861. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,6 +24,6 @@ #define TABLES #define CHARSET_NAME "IBM861//" -#define HAS_HOLES 1 /* Not all 256 character are defined. */ +#define HAS_HOLES 0 /* All 256 character are defined. */ #include <8bit-gap.c> diff -uprN glibc-2.4/iconvdata/ibm862.c glibc-2.5/iconvdata/ibm862.c --- glibc-2.4/iconvdata/ibm862.c 2001-07-06 04:54:50.000000000 +0000 +++ glibc-2.5/iconvdata/ibm862.c 2006-04-21 18:17:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion from and to IBM862. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,6 +24,6 @@ #define TABLES #define CHARSET_NAME "IBM862//" -#define HAS_HOLES 1 /* Not all 256 character are defined. */ +#define HAS_HOLES 0 /* All 256 character are defined. */ #include <8bit-gap.c> diff -uprN glibc-2.4/iconvdata/ibm863.c glibc-2.5/iconvdata/ibm863.c --- glibc-2.4/iconvdata/ibm863.c 2001-07-06 04:54:50.000000000 +0000 +++ glibc-2.5/iconvdata/ibm863.c 2006-04-21 18:17:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion from and to IBM863. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,6 +24,6 @@ #define TABLES #define CHARSET_NAME "IBM863//" -#define HAS_HOLES 1 /* Not all 256 character are defined. */ +#define HAS_HOLES 0 /* All 256 character are defined. */ #include <8bit-gap.c> diff -uprN glibc-2.4/iconvdata/ibm865.c glibc-2.5/iconvdata/ibm865.c --- glibc-2.4/iconvdata/ibm865.c 2001-07-06 04:54:50.000000000 +0000 +++ glibc-2.5/iconvdata/ibm865.c 2006-04-21 18:17:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Conversion from and to IBM865. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -24,6 +24,6 @@ #define TABLES #define CHARSET_NAME "IBM865//" -#define HAS_HOLES 1 /* Not all 256 character are defined. */ +#define HAS_HOLES 0 /* All 256 character are defined. */ #include <8bit-gap.c> diff -uprN glibc-2.4/iconvdata/ibm932.c glibc-2.5/iconvdata/ibm932.c --- glibc-2.4/iconvdata/ibm932.c 2004-08-02 22:32:06.000000000 +0000 +++ glibc-2.5/iconvdata/ibm932.c 2006-04-27 04:06:47.000000000 +0000 @@ -94,16 +94,10 @@ } \ else \ { \ - if (res == 0x1c) \ - res = 0x1a; \ - else if (res == 0x7f) \ - res = 0x1c; \ - else if (res == 0xa5) \ + if (res == 0xa5) \ res = 0x5c; \ else if (res == 0x203e) \ res = 0x7e; \ - else if (res == 0x1a) \ - res = 0x7f; \ put32 (outptr, res); \ outptr += 4; \ inptr++; \ @@ -117,16 +111,10 @@ uint32_t res = __ibm932sb_to_ucs4[c]; \ if (res == 0 && c != 0) \ return WEOF; \ - if (res == 0x1c) \ - res = 0x1a; \ - else if (res == 0x7f) \ - res = 0x1c; \ - else if (res == 0xa5) \ + if (res == 0xa5) \ res = 0x5c; \ else if (res == 0x203e) \ res = 0x7e; \ - else if (res == 0x1a) \ - res = 0x7f; \ return res; \ } #include diff -uprN glibc-2.4/iconvdata/ibm943.c glibc-2.5/iconvdata/ibm943.c --- glibc-2.4/iconvdata/ibm943.c 2004-08-02 22:32:06.000000000 +0000 +++ glibc-2.5/iconvdata/ibm943.c 2006-04-27 04:06:47.000000000 +0000 @@ -95,16 +95,10 @@ } \ else \ { \ - if (res == 0x1c) \ - res = 0x1a; \ - else if (res == 0x7f) \ - res = 0x1c; \ - else if (res == 0xa5) \ + if (res == 0xa5) \ res = 0x5c; \ else if (res == 0x203e) \ res = 0x7e; \ - else if (res == 0x1a) \ - res = 0x7f; \ put32 (outptr, res); \ outptr += 4; \ inptr++; \ @@ -118,16 +112,10 @@ uint32_t res = __ibm943sb_to_ucs4[c]; \ if (res == 0 && c != 0) \ return WEOF; \ - if (res == 0x1c) \ - res = 0x1a; \ - else if (res == 0x7f) \ - res = 0x1c; \ - else if (res == 0xa5) \ + if (res == 0xa5) \ res = 0x5c; \ else if (res == 0x203e) \ res = 0x7e; \ - else if (res == 0x1a) \ - res = 0x7f; \ return res; \ } #include diff -uprN glibc-2.4/iconvdata/Makefile glibc-2.5/iconvdata/Makefile --- glibc-2.4/iconvdata/Makefile 2005-11-16 08:15:54.000000000 +0000 +++ glibc-2.5/iconvdata/Makefile 2006-05-01 14:18:49.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1997-2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1997-2004,2005,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -58,14 +58,15 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 IBM1142 IBM1143 IBM1144 IBM1145 IBM1146 IBM1147 IBM1148 \ IBM1149 IBM1166 IBM1167 IBM4517 IBM4899 IBM4909 IBM4971 \ IBM5347 IBM9030 IBM9066 IBM9448 IBM12712 IBM16804 \ - IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 + IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 MIK modules.so := $(addsuffix .so, $(modules)) include ../Makeconfig ifeq (yes,$(build-shared)) -tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 +tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 ifeq ($(have-thread-library),yes) tests += bug-iconv3 endif @@ -195,7 +196,7 @@ distribute := gconv-modules extra-module ibm9030.c ibm9030.h ibm9066.c ibm9066.h ibm9448.c ibm9448.h \ ibm12712.c ibm12712.h ibm16804.c ibm16804.h \ ibm1364.c ibm1364.h ibm1371.c ibm1371.h ibm1388.c ibm1388.h \ - ibm1390.c ibm1390.h ibm1399.c ibm1399.h iso_11548-1.c + ibm1390.c ibm1390.h ibm1399.c ibm1399.h iso_11548-1.c mik.c # We build the transformation modules only when we build shared libs. ifeq (yes,$(build-shared)) @@ -236,7 +237,7 @@ gen-8bit-gap-modules := koi8-r latin-gre iso8859-13 iso8859-14 iso8859-15 mac-uk sami-ws2 \ iso-ir-197 tis-620 koi8-u ibm874 cp10007 koi8-t \ georgian-ps georgian-academy iso-ir-209 mac-sami \ - iso8859-11 ibm866nav pt154 rk1048 + iso8859-11 ibm866nav pt154 rk1048 mik gen-special-modules := iso8859-7jp @@ -255,14 +256,14 @@ export AWK define generate-8bit-table $(make-target-directory) -$(SHELL) ./gen-8bit.sh $< > $(@:stmp=T) +LC_ALL=C $(SHELL) ./gen-8bit.sh $< > $(@:stmp=T) $(move-if-change) $(@:stmp=T) $(@:stmp=h) touch $@ endef define generate-8bit-gap-table $(make-target-directory) -$(SHELL) ./gen-8bit-gap.sh $< > $(@:stmp=T) +LC_ALL=C $(SHELL) ./gen-8bit-gap.sh $< > $(@:stmp=T) $(move-if-change) $(@:stmp=T) $(@:stmp=h) touch $@ endef @@ -304,7 +305,7 @@ $(gen-8bit-gap-modules:%=$(objpfx)%.stmp $(objpfx)iso8859-7jp.stmp: $(charmaps)/ISO-8859-7 gen-8bit-gap-1.sh $(make-target-directory) - $(SHELL) ./gen-8bit-gap-1.sh $< > $(@:stmp=T) + LC_ALL=C $(SHELL) ./gen-8bit-gap-1.sh $< > $(@:stmp=T) $(move-if-change) $(@:stmp=T) $(@:stmp=h) touch $@ diff -uprN glibc-2.4/iconvdata/mik.c glibc-2.5/iconvdata/mik.c --- glibc-2.4/iconvdata/mik.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/iconvdata/mik.c 2006-05-01 14:15:59.000000000 +0000 @@ -0,0 +1,32 @@ +/* Conversion from and to MIK. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Alexander Shopov , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "MIK//" +#define HAS_HOLES 0 /* All 256 character are defined. */ + +#include <8bit-gap.c> + + + diff -uprN glibc-2.4/iconvdata/run-iconv-test.sh glibc-2.5/iconvdata/run-iconv-test.sh --- glibc-2.4/iconvdata/run-iconv-test.sh 2005-09-29 21:43:12.000000000 +0000 +++ glibc-2.5/iconvdata/run-iconv-test.sh 2006-08-01 06:45:49.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh -f # Run available iconv(1) tests. -# Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc. +# Copyright (C) 1998-2002, 2005, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1998. # @@ -66,7 +66,7 @@ while read from to subset targets; do echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" if test -s testdata/$from..$t; then - cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo $ac_n "/OK$ac_c" fi @@ -75,7 +75,8 @@ while read from to subset targets; do { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || + test -s $temp1 && + LC_ALL=C cmp testdata/$from $temp2 > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" rm -f $temp1 $temp2 @@ -91,7 +92,7 @@ while read from to subset targets; do { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - cmp testdata/suntzus $temp1 || + LC_ALL=C cmp testdata/suntzus $temp1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" fi @@ -110,7 +111,7 @@ while read from to subset targets; do echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" if test -s testdata/$from..$t; then - cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/$from..$t > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo $ac_n "/OK$ac_c" fi @@ -120,7 +121,8 @@ while read from to subset targets; do { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 || + test -s $temp1 && + LC_ALL=C cmp testdata/$from $temp2 > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" rm -f $temp1 $temp2 @@ -135,7 +137,7 @@ while read from to subset targets; do { if test $? -gt 128; then exit 1; fi echo "FAILED"; failed=1; continue; } echo $ac_n "OK$ac_c" - cmp testdata/suntzus $temp1 || + LC_ALL=C cmp testdata/suntzus $temp1 || { echo "/FAILED"; failed=1; continue; } echo "/OK" fi @@ -153,32 +155,32 @@ while read utf8 from filename; do # Test conversion to the endianness dependent encoding. echo $ac_n "test encoder: $utf8 -> $from $ac_c" $PROG -f $utf8 -t $from < testdata/${filename}..${utf8} > $temp1 - cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || - cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" # Test conversion from the endianness dependent encoding. echo $ac_n "test decoder: $from -> $utf8 $ac_c" $PROG -f $from -t $utf8 < testdata/${filename}..${from}.BE > $temp1 - cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } $PROG -f $from -t $utf8 < testdata/${filename}..${from}.LE > $temp1 - cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${utf8} > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" # Test byte swapping behaviour. echo $ac_n "test non-BOM: ${from}BE -> ${from}LE $ac_c" $PROG -f ${from}BE -t ${from}LE < testdata/${filename}..${from}.BE > $temp1 - cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${from}.LE > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" # Test byte swapping behaviour. echo $ac_n "test non-BOM: ${from}LE -> ${from}BE $ac_c" $PROG -f ${from}LE -t ${from}BE < testdata/${filename}..${from}.LE > $temp1 - cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || + LC_ALL=C cmp $temp1 testdata/${filename}..${from}.BE > /dev/null 2>&1 || { echo "/FAILED"; failed=1; continue; } echo "OK" diff -uprN glibc-2.4/iconvdata/testdata/MIK glibc-2.5/iconvdata/testdata/MIK --- glibc-2.4/iconvdata/testdata/MIK 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/iconvdata/testdata/MIK 2006-05-02 20:08:15.000000000 +0000 @@ -0,0 +1,14 @@ + ! " # $ % & ' ( ) * + , - . / +0 1 2 3 4 5 6 7 8 9 : ; < = > ? +@ A B C D E F G H I J K L M N O +P Q R S T U V W X Y Z [ \ ] ^ _ +` a b c d e f g h i j k l m n o +p q r s t u v w x y z { | } ~  +€ ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž + ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ +  ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ +° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ +À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï +Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß +à á â ã ä å æ ç è é ê ë ì í î ï +ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ diff -uprN glibc-2.4/iconvdata/testdata/MIK..UTF8 glibc-2.5/iconvdata/testdata/MIK..UTF8 --- glibc-2.4/iconvdata/testdata/MIK..UTF8 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/iconvdata/testdata/MIK..UTF8 2006-05-01 14:15:03.000000000 +0000 @@ -0,0 +1,14 @@ + ! " # $ % & ' ( ) * + , - . / +0 1 2 3 4 5 6 7 8 9 : ; < = > ? +@ A B C D E F G H I J K L M N O +P Q R S T U V W X Y Z [ \ ] ^ _ +` a b c d e f g h i j k l m n o +p q r s t u v w x y z { | } ~  +РБ Ð’ Г Д Е Ж З И Й К Л Ðœ РО П +Р С Т У Ф Ð¥ Ц Ч Ш Щ Ъ Ы Ь Э Ю Я +а б в г д е ж з и й к л м н о п +Ñ€ Ñ Ñ‚ у Ñ„ Ñ… ц ч ш щ ÑŠ Ñ‹ ÑŒ Ñ ÑŽ Ñ +â”” â”´ ┬ ├ ─ ┼ â•£ â•‘ â•š â•” â•© ╦ â•  ╠╬ â” +â–‘ â–’ â–“ │ ┤ â„– § â•— ╠┘ ┌ â–ˆ â–„ â–Œ â– â–€ +α ß Γ Ï€ Σ σ µ Ï„ Φ Θ Ω δ ∞ φ ε ∩ +≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⿠² â–    diff -uprN glibc-2.4/iconvdata/TESTS glibc-2.5/iconvdata/TESTS --- glibc-2.4/iconvdata/TESTS 2005-11-16 08:12:20.000000000 +0000 +++ glibc-2.5/iconvdata/TESTS 2006-05-01 14:19:48.000000000 +0000 @@ -165,3 +165,4 @@ IBM1388 IBM1388 N UTF8 IBM1390 IBM1390 N UTF8 IBM1399 IBM1399 N UTF8 ISO_11548-1 ISO_11548-1 - UTF8 +MIK MIK Y UTF8 diff -uprN glibc-2.4/iconvdata/tst-iconv6.c glibc-2.5/iconvdata/tst-iconv6.c --- glibc-2.4/iconvdata/tst-iconv6.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/iconvdata/tst-iconv6.c 2006-04-25 17:42:47.000000000 +0000 @@ -0,0 +1,35 @@ +/* BZ #2569 */ + +#include +#include + +static int +do_test (void) +{ + iconv_t cd0 = iconv_open ("ISO-8859-7", "UTF-16LE"); + if (cd0 == (iconv_t) -1) + { + puts ("first iconv_open failed"); + return 1; + } + iconv_t cd1 = iconv_open ("ISO-8859-7", "UTF-16LE"); + if (cd1 == (iconv_t) -1) + { + puts ("second iconv_open failed"); + return 1; + } + if (iconv_close (cd0) != 0) + { + puts ("first iconv_close failed"); + return 1; + } + if (iconv_close (cd1) != 0) + { + puts ("second iconv_close failed"); + return 1; + } + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/iconvdata/tst-tables.sh glibc-2.5/iconvdata/tst-tables.sh --- glibc-2.4/iconvdata/tst-tables.sh 2004-04-17 21:59:40.000000000 +0000 +++ glibc-2.5/iconvdata/tst-tables.sh 2006-05-01 14:19:48.000000000 +0000 @@ -207,6 +207,7 @@ cat < @ [ ] ^ _ ` { | } */ -static const unsigned char xdirect_tab[128/8] = +static const unsigned char xdirect_tab[128 / 8] = { 0x00, 0x26, 0x00, 0x00, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0x3f @@ -79,7 +79,7 @@ isxdirect (uint32_t ch) A-Z a-z 0-9 + / - */ -static const unsigned char xbase64_tab[128/8] = +static const unsigned char xbase64_tab[128 / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x07 @@ -170,7 +170,7 @@ base64 (unsigned int i) } \ else if (__builtin_expect (ch == '+', 1)) \ { \ - if (__builtin_expect (inptr + 2 >= inend, 0)) \ + if (__builtin_expect (inptr + 2 > inend, 0)) \ { \ /* Not enough input available. */ \ result = __GCONV_INCOMPLETE_INPUT; \ diff -uprN glibc-2.4/include/arpa/nameser.h glibc-2.5/include/arpa/nameser.h --- glibc-2.4/include/arpa/nameser.h 1997-06-21 01:19:09.000000000 +0000 +++ glibc-2.5/include/arpa/nameser.h 2006-05-12 04:15:38.000000000 +0000 @@ -1 +1,46 @@ #include + +/* If the machine allows unaligned access we can do better than using + the NS_GET16, NS_GET32, NS_PUT16, and NS_PUT32 macros from the + installed header. */ +#include +#include +#include + +extern struct _ns_flagdata _ns_flagdata[] attribute_hidden; + +#if _STRING_ARCH_unaligned + +# undef NS_GET16 +# define NS_GET16(s, cp) \ + do { \ + uint16_t *t_cp = (uint16_t *) (cp); \ + (s) = ntohs (*t_cp); \ + (cp) += NS_INT16SZ; \ + } while (0) + +# undef NS_GET32 +# define NS_GET32(l, cp) \ + do { \ + uint32_t *t_cp = (uint32_t *) (cp); \ + (l) = ntohl (*t_cp); \ + (cp) += NS_INT32SZ; \ + } while (0) + +# undef NS_PUT16 +# define NS_PUT16(s, cp) \ + do { \ + uint16_t *t_cp = (uint16_t *) (cp); \ + *t_cp = htons (s); \ + (cp) += NS_INT16SZ; \ + } while (0) + +# undef NS_PUT32 +# define NS_PUT32(l, cp) \ + do { \ + uint32_t *t_cp = (uint32_t *) (cp); \ + *t_cp = htonl (l); \ + (cp) += NS_INT32SZ; \ + } while (0) + +#endif diff -uprN glibc-2.4/include/features.h glibc-2.5/include/features.h --- glibc-2.4/include/features.h 2006-01-05 12:25:35.000000000 +0000 +++ glibc-2.5/include/features.h 2006-04-25 20:34:32.000000000 +0000 @@ -151,7 +151,7 @@ # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 199506L +# define _POSIX_C_SOURCE 200112L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 600 # undef _XOPEN_SOURCE_EXTENDED diff -uprN glibc-2.4/include/ifaddrs.h glibc-2.5/include/ifaddrs.h --- glibc-2.4/include/ifaddrs.h 2003-06-10 08:53:57.000000000 +0000 +++ glibc-2.5/include/ifaddrs.h 2006-09-24 16:49:19.000000000 +0000 @@ -1,10 +1,23 @@ #ifndef _IFADDRS_H #include #include +#include libc_hidden_proto (getifaddrs) libc_hidden_proto (freeifaddrs) -extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6) attribute_hidden; +struct in6addrinfo +{ + enum { + in6ai_deprecated = 1, + in6ai_temporary = 2, + in6ai_homeaddress = 4 + } flags; + uint32_t addr[4]; +}; + +extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) + attribute_hidden; #endif /* ifaddrs.h */ diff -uprN glibc-2.4/include/link.h glibc-2.5/include/link.h --- glibc-2.4/include/link.h 2006-03-01 06:18:30.000000000 +0000 +++ glibc-2.5/include/link.h 2006-09-20 20:28:55.000000000 +0000 @@ -124,7 +124,7 @@ struct link_map const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */ ElfW(Addr) l_entry; /* Entry point location. */ ElfW(Half) l_phnum; /* Number of program header entries. */ - ElfW(Half) l_ldnum; /* Number of dynamic segment entries. */ + ElfW(Half) l_ldnum; /* Number of dynamic segment entries. */ /* Array of DT_NEEDED dependencies and their dependencies, in dependency order for symbol lookup (with and without @@ -141,7 +141,19 @@ struct link_map /* Symbol hash table. */ Elf_Symndx l_nbuckets; - const Elf_Symndx *l_buckets, *l_chain; + Elf32_Word l_gnu_bitmask_idxbits; + Elf32_Word l_gnu_shift; + const ElfW(Addr) *l_gnu_bitmask; + union + { + const Elf32_Word *l_gnu_buckets; + const Elf_Symndx *l_chain; + }; + union + { + const Elf32_Word *l_gnu_chain_zero; + const Elf_Symndx *l_buckets; + }; unsigned int l_direct_opencount; /* Reference count for dlopen/dlclose. */ enum /* Where this object came from. */ @@ -204,7 +216,7 @@ struct link_map /* Size of array allocated for 'l_scope'. */ size_t l_scope_max; /* This is an array defining the lookup scope for this link map. - There are at most three different scope lists. */ + There are initially at most three different scope lists. */ struct r_scope_elem **l_scope; /* A similar array, this time only with the local scope. This is diff -uprN glibc-2.4/include/netinet/in.h glibc-2.5/include/netinet/in.h --- glibc-2.4/include/netinet/in.h 2003-06-14 08:40:36.000000000 +0000 +++ glibc-2.5/include/netinet/in.h 2006-05-25 16:51:56.000000000 +0000 @@ -5,6 +5,5 @@ libc_hidden_proto (bindresvport) libc_hidden_proto (in6addr_loopback) libc_hidden_proto (in6addr_any) -libc_hidden_proto (inet6_option_alloc) #endif diff -uprN glibc-2.4/include/rpc/auth.h glibc-2.5/include/rpc/auth.h --- glibc-2.4/include/rpc/auth.h 2002-08-06 06:08:48.000000000 +0000 +++ glibc-2.5/include/rpc/auth.h 2006-05-15 19:46:17.000000000 +0000 @@ -22,8 +22,10 @@ DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES -extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp); -extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *); +extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp) + attribute_hidden; +extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *) + attribute_hidden; extern AUTH *authunix_create_internal (char *__machname, __uid_t __uid, __gid_t __gid, int __len, diff -uprN glibc-2.4/include/rpc/key_prot.h glibc-2.5/include/rpc/key_prot.h --- glibc-2.4/include/rpc/key_prot.h 2002-02-26 01:43:48.000000000 +0000 +++ glibc-2.5/include/rpc/key_prot.h 2006-05-15 19:48:52.000000000 +0000 @@ -1,11 +1,15 @@ #include -extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp); -extern bool_t xdr_keystatus_internal (XDR *, keystatus*); -extern bool_t xdr_keybuf_internal (XDR *, keybuf); -extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*); -extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*); -extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*); -extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*); -extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*); -extern bool_t xdr_unixcred_internal (XDR *, unixcred*); +extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp) + attribute_hidden; +extern bool_t xdr_keystatus_internal (XDR *, keystatus*) attribute_hidden; +extern bool_t xdr_keybuf_internal (XDR *, keybuf) attribute_hidden; +extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*) attribute_hidden; +extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*) + attribute_hidden; +extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*) + attribute_hidden; +extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*) + attribute_hidden; +extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*) attribute_hidden; +extern bool_t xdr_unixcred_internal (XDR *, unixcred*) attribute_hidden; diff -uprN glibc-2.4/include/rpc/pmap_prot.h glibc-2.5/include/rpc/pmap_prot.h --- glibc-2.4/include/rpc/pmap_prot.h 2002-02-26 01:43:48.000000000 +0000 +++ glibc-2.5/include/rpc/pmap_prot.h 2006-05-15 20:43:30.000000000 +0000 @@ -1,5 +1,7 @@ #include -extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs); -extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp); +extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs) + attribute_hidden; +extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp) + attribute_hidden; diff -uprN glibc-2.4/include/rpc/pmap_rmt.h glibc-2.5/include/rpc/pmap_rmt.h --- glibc-2.4/include/rpc/pmap_rmt.h 2002-02-26 01:43:48.000000000 +0000 +++ glibc-2.5/include/rpc/pmap_rmt.h 2006-05-15 20:35:07.000000000 +0000 @@ -1,5 +1,7 @@ #include extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs, - struct rmtcallargs *__crp); -extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp); + struct rmtcallargs *__crp) + attribute_hidden; +extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp) + attribute_hidden; diff -uprN glibc-2.4/include/rpc/xdr.h glibc-2.5/include/rpc/xdr.h --- glibc-2.4/include/rpc/xdr.h 2002-09-17 10:58:04.000000000 +0000 +++ glibc-2.5/include/rpc/xdr.h 2006-05-15 19:37:36.000000000 +0000 @@ -1,36 +1,54 @@ #include -extern bool_t xdr_void_internal (void); -extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp); -extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp); -extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp); -extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up); -extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp); -extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp); -extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp); -extern bool_t xdr_int_internal (XDR *__xdrs, int *__up); -extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp); -extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep); +extern bool_t xdr_void_internal (void) attribute_hidden; +extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp) attribute_hidden; +extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp) + attribute_hidden; +extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp) + attribute_hidden; +extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up) + attribute_hidden; +extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp) + attribute_hidden; +extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp) + attribute_hidden; +extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp) + attribute_hidden; +extern bool_t xdr_int_internal (XDR *__xdrs, int *__up) + attribute_hidden; +extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp) + attribute_hidden; +extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep) + attribute_hidden; extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp, const struct xdr_discrim *choices, - xdrproc_t dfault); + xdrproc_t dfault) attribute_hidden; extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize); extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep, u_int __maxsize, - u_int __elsize, xdrproc_t __elproc); + u_int __elsize, xdrproc_t __elproc) + attribute_hidden; extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp, - u_int __size, xdrproc_t __proc); + u_int __size, xdrproc_t __proc) + attribute_hidden; extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep, - u_int maxsize); -extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np); -extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt); + u_int maxsize) attribute_hidden; +extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np) + attribute_hidden; +extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt) + attribute_hidden; extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize, u_int __recvsize, caddr_t __tcp_handle, int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int)); -extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op); -extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow); -extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs); -extern bool_t xdrrec_eof_internal (XDR *__xdrs); + int (*__writeit) (char *, char *, int)) + attribute_hidden; +extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op) + attribute_hidden; +extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow) + attribute_hidden; +extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs) + attribute_hidden; +extern bool_t xdrrec_eof_internal (XDR *__xdrs) + attribute_hidden; libc_hidden_proto (xdrstdio_create) diff -uprN glibc-2.4/include/rpcsvc/nis_callback.h glibc-2.5/include/rpcsvc/nis_callback.h --- glibc-2.4/include/rpcsvc/nis_callback.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/include/rpcsvc/nis_callback.h 2006-05-12 02:40:06.000000000 +0000 @@ -0,0 +1,7 @@ +#ifndef _RPCSVC_NIS_CALLBACK_H +#include + +libnsl_hidden_proto (xdr_obj_p) +libnsl_hidden_proto (xdr_cback_data) + +#endif diff -uprN glibc-2.4/include/rpcsvc/yp.h glibc-2.5/include/rpcsvc/yp.h --- glibc-2.4/include/rpcsvc/yp.h 2004-10-24 21:27:26.000000000 +0000 +++ glibc-2.5/include/rpcsvc/yp.h 2006-05-12 02:45:42.000000000 +0000 @@ -14,5 +14,13 @@ libnsl_hidden_proto (xdr_ypresp_all) libnsl_hidden_proto (xdr_yppush_status) libnsl_hidden_proto (xdr_ypbind_resptype) libnsl_hidden_proto (xdr_ypbind_binding) +libnsl_hidden_proto (xdr_ypreq_nokey) +libnsl_hidden_proto (xdr_ypmaplist) +libnsl_hidden_proto (xdr_ypreq_key) +libnsl_hidden_proto (xdr_ypresp_val) +libnsl_hidden_proto (xdr_ypresp_maplist) +libnsl_hidden_proto (xdr_ypresp_order) +libnsl_hidden_proto (xdr_ypbind_resp) +libnsl_hidden_proto (xdr_ypresp_master) #endif diff -uprN glibc-2.4/include/rpcsvc/ypupd.h glibc-2.5/include/rpcsvc/ypupd.h --- glibc-2.4/include/rpcsvc/ypupd.h 2004-10-24 21:29:05.000000000 +0000 +++ glibc-2.5/include/rpcsvc/ypupd.h 2006-05-12 02:36:56.000000000 +0000 @@ -2,5 +2,7 @@ #include libnsl_hidden_proto (xdr_yp_buf) +libnsl_hidden_proto (xdr_ypdelete_args) +libnsl_hidden_proto (xdr_ypupdate_args) #endif diff -uprN glibc-2.4/include/signal.h glibc-2.5/include/signal.h --- glibc-2.4/include/signal.h 2005-02-22 23:18:11.000000000 +0000 +++ glibc-2.5/include/signal.h 2006-07-31 05:57:58.000000000 +0000 @@ -26,6 +26,9 @@ extern int __sigprocmask (int __how, __const sigset_t *__set, sigset_t *__oset); extern int __sigsuspend (__const sigset_t *__set); libc_hidden_proto (__sigsuspend) +#ifndef NO_CANCELLATION +extern int __sigsuspend_nocancel (__const sigset_t *__set) attribute_hidden; +#endif extern int __sigwait (__const sigset_t *__set, int *__sig); libc_hidden_proto (__sigwait) extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info); diff -uprN glibc-2.4/include/sys/msg.h glibc-2.5/include/sys/msg.h --- glibc-2.4/include/sys/msg.h 2002-10-09 09:08:02.000000000 +0000 +++ glibc-2.5/include/sys/msg.h 2006-08-03 20:31:44.000000000 +0000 @@ -1,8 +1,8 @@ #ifndef _SYS_MSG_H #include -extern int __libc_msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, - int msgflg); +extern ssize_t __libc_msgrcv (int msqid, void *msgp, size_t msgsz, + long int msgtyp, int msgflg); extern int __libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg); diff -uprN glibc-2.4/include/time.h glibc-2.5/include/time.h --- glibc-2.4/include/time.h 2006-01-10 19:46:49.000000000 +0000 +++ glibc-2.5/include/time.h 2006-07-31 05:57:52.000000000 +0000 @@ -81,7 +81,10 @@ extern long int __tzname_max (void); extern int __nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); -libc_hidden_proto(__nanosleep) +libc_hidden_proto (__nanosleep) +extern int __nanosleep_nocancel (__const struct timespec *__requested_time, + struct timespec *__remaining) + attribute_hidden; extern int __getdate_r (__const char *__string, struct tm *__resbufp); diff -uprN glibc-2.4/include/unistd.h glibc-2.5/include/unistd.h --- glibc-2.4/include/unistd.h 2006-02-21 02:28:30.000000000 +0000 +++ glibc-2.5/include/unistd.h 2006-07-31 05:57:52.000000000 +0000 @@ -15,6 +15,7 @@ libc_hidden_proto (getlogin_r) libc_hidden_proto (seteuid) libc_hidden_proto (setegid) libc_hidden_proto (tcgetpgrp) +libc_hidden_proto (readlinkat) /* Now define the internal interfaces. */ extern int __access (__const char *__name, int __type); @@ -161,5 +162,7 @@ extern __pid_t __libc_fork (void); /* Suspend the process until a signal arrives. This always returns -1 and sets `errno' to EINTR. */ extern int __libc_pause (void); +/* Not cancelable variant. */ +extern int __pause_nocancel (void) attribute_hidden; #endif diff -uprN glibc-2.4/inet/check_pf.c glibc-2.5/inet/check_pf.c --- glibc-2.4/inet/check_pf.c 2005-12-14 08:25:30.000000000 +0000 +++ glibc-2.5/inet/check_pf.c 2006-04-16 21:26:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine protocol families for which interfaces exist. Generic version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,8 +23,14 @@ void attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6) +__check_pf (bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) { + /* By default we have no way to determine information about + deprecated and temporary addresses. */ + *in6ai = NULL; + *in6ailen = 0; + /* Get the interface list via getifaddrs. */ struct ifaddrs *ifa = NULL; if (getifaddrs (&ifa) != 0) diff -uprN glibc-2.4/inet/getnameinfo.c glibc-2.5/inet/getnameinfo.c --- glibc-2.4/inet/getnameinfo.c 2004-03-17 20:01:25.000000000 +0000 +++ glibc-2.5/inet/getnameinfo.c 2006-08-28 16:23:18.000000000 +0000 @@ -203,48 +203,40 @@ getnameinfo (const struct sockaddr *sa, if (!(flags & NI_NUMERICHOST)) { struct hostent *h = NULL; + if (sa->sa_family == AF_INET6) + { + while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in6 *) sa)->sin6_addr), + sizeof(struct in6_addr), + AF_INET6, &th, tmpbuf, tmpbuflen, + &h, &herrno)) + if (herrno == NETDB_INTERNAL && errno == ERANGE) + tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); + else + break; + } + else + { + while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in *)sa)->sin_addr), + sizeof(struct in_addr), AF_INET, + &th, tmpbuf, tmpbuflen, + &h, &herrno)) + if (herrno == NETDB_INTERNAL && errno == ERANGE) + tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); + else + break; + } + if (h == NULL) { - if (sa->sa_family == AF_INET6) + if (herrno == NETDB_INTERNAL) { - while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in6 *) sa)->sin6_addr), - sizeof(struct in6_addr), - AF_INET6, &th, tmpbuf, tmpbuflen, - &h, &herrno)) - { - if (herrno == NETDB_INTERNAL) - { - if (errno == ERANGE) - tmpbuf = extend_alloca (tmpbuf, tmpbuflen, - 2 * tmpbuflen); - else - { - __set_h_errno (herrno); - __set_errno (serrno); - return EAI_SYSTEM; - } - } - else - { - break; - } - } + __set_h_errno (herrno); + return EAI_SYSTEM; } - else + if (herrno == TRY_AGAIN) { - while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in *)sa)->sin_addr), - sizeof(struct in_addr), AF_INET, - &th, tmpbuf, tmpbuflen, - &h, &herrno)) - { - if (errno == ERANGE) - tmpbuf = extend_alloca (tmpbuf, tmpbuflen, - 2 * tmpbuflen); - else - { - break; - } - } + __set_h_errno (herrno); + return EAI_AGAIN; } } @@ -361,10 +353,7 @@ getnameinfo (const struct sockaddr *sa, (const void *) &(((const struct sockaddr_in *) sa)->sin_addr), host, hostlen); if (c == NULL) - { - __set_errno (serrno); - return EAI_SYSTEM; - } + return EAI_SYSTEM; } ok = 1; } @@ -403,25 +392,16 @@ getnameinfo (const struct sockaddr *sa, if (!(flags & NI_NUMERICSERV)) { struct servent *s, ts; - while (__getservbyport_r (((const struct sockaddr_in *) sa)->sin_port, - ((flags & NI_DGRAM) ? "udp" : "tcp"), - &ts, tmpbuf, tmpbuflen, &s)) + int e; + while ((e = __getservbyport_r (((const struct sockaddr_in *) sa)->sin_port, + ((flags & NI_DGRAM) + ? "udp" : "tcp"), + &ts, tmpbuf, tmpbuflen, &s))) { - if (herrno == NETDB_INTERNAL) - { - if (errno == ERANGE) - tmpbuf = extend_alloca (tmpbuf, tmpbuflen, - 2 * tmpbuflen); - else - { - __set_errno (serrno); - return EAI_SYSTEM; - } - } + if (e == ERANGE) + tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); else - { - break; - } + break; } if (s) { diff -uprN glibc-2.4/inet/inet6_opt.c glibc-2.5/inet/inet6_opt.c --- glibc-2.4/inet/inet6_opt.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/inet/inet6_opt.c 2006-05-25 04:38:02.000000000 +0000 @@ -0,0 +1,278 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* RFC 3542, 10.1 + + This function returns the number of bytes needed for the empty + extension header i.e., without any options. If EXTBUF is not NULL it + also initializes the extension header to have the correct length + field. In that case if the EXTLEN value is not a positive (i.e., + non-zero) multiple of 8 the function fails and returns -1. */ +int +inet6_opt_init (void *extbuf, socklen_t extlen) +{ + if (extbuf != NULL) + { + if (extlen <= 0 || (extlen % 8) != 0) + return -1; + + /* Fill in the length in units of 8 octets. */ + struct ip6_hbh *extp = (struct ip6_hbh *) extbuf; + extp->ip6h_len = extlen / 8; + } + + return sizeof (struct ip6_hbh); +} + + +static void +add_padding (uint8_t *extbuf, int offset, int npad) +{ + if (npad == 1) + extbuf[offset] = IP6OPT_PAD1; + else + { + struct ip6_opt *pad_opt = (struct ip6_opt *) (extbuf + offset); + + pad_opt->ip6o_type = IP6OPT_PADN; + pad_opt->ip6o_len = npad - sizeof (struct ip6_opt); + /* Clear the memory used by the padding. */ + memset (pad_opt + 1, '\0', pad_opt->ip6o_len); + } +} + + + +/* RFC 3542, 10.2 + + This function returns the updated total length taking into account + adding an option with length 'len' and alignment 'align'. If + EXTBUF is not NULL then, in addition to returning the length, the + function inserts any needed pad option, initializes the option + (setting the type and length fields) and returns a pointer to the + location for the option content in databufp. If the option does + not fit in the extension header buffer the function returns -1. */ +int +inet6_opt_append (void *extbuf, socklen_t extlen, int offset, uint8_t type, + socklen_t len, uint8_t align, void **databufp) +{ + /* Check minimum offset. */ + if (offset < sizeof (struct ip6_hbh)) + return -1; + + /* One cannot add padding options. */ + if (type == IP6OPT_PAD1 || type == IP6OPT_PADN) + return -1; + + /* The option length must fit in one octet. */ + if (len > 255) + return -1; + + /* The alignment can only by 1, 2, 4, or 8 and must not exceed the + option length. */ + if (align == 0 || align > 8 || (align & (align - 1)) != 0 || align > len) + return -1; + + /* Determine the needed padding for alignment. Following the + current content of the buffer we have the is the IPv6 option type + and length, followed immediately by the data. The data has the + alignment constraints. Therefore padding must be inserted in the + form of padding options before the new option. */ + int data_offset = offset + sizeof (struct ip6_opt); + int npad = (align - data_offset % align) & (align - 1); + + /* Now we can check whether the buffer is large enough. */ + if (data_offset + npad + len > extlen) + return -1; + + if (npad != 0) + { + if (extbuf != NULL) + add_padding (extbuf, offset, npad); + + offset += npad; + } + + /* Now prepare the option itself. */ + if (extbuf != NULL) + { + struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset); + + opt->ip6o_type = type; + opt->ip6o_len = len; + + *databufp = opt + 1; + } + + return offset + sizeof (struct ip6_opt) + len; +} + + +/* RFC 3542, 10.3 + + This function returns the updated total length taking into account + the final padding of the extension header to make it a multiple of + 8 bytes. If EXTBUF is not NULL the function also initializes the + option by inserting a Pad1 or PadN option of the proper length. */ +int +inet6_opt_finish (void *extbuf, socklen_t extlen, int offset) +{ + /* Check minimum offset. */ + if (offset < sizeof (struct ip6_hbh)) + return -1; + + /* Required padding at the end. */ + int npad = (8 - (offset & 7)) & 7; + + /* Make sure the buffer is large enough. */ + if (offset + npad > extlen) + return -1; + + if (extbuf != NULL) + add_padding (extbuf, offset, npad); + + return offset + npad; +} + + +/* RFC 3542, 10.4 + + This function inserts data items of various sizes in the data + portion of the option. VAL should point to the data to be + inserted. OFFSET specifies where in the data portion of the option + the value should be inserted; the first byte after the option type + and length is accessed by specifying an offset of zero. */ +int +inet6_opt_set_val (void *databuf, int offset, void *val, socklen_t vallen) +{ + memcpy ((uint8_t *) databuf + offset, val, vallen); + + return offset + vallen; +} + + +/* RFC 3542, 10.5 + + This function parses received option extension headers returning + the next option. EXTBUF and EXTLEN specifies the extension header. + OFFSET should either be zero (for the first option) or the length + returned by a previous call to 'inet6_opt_next' or + 'inet6_opt_find'. It specifies the position where to continue + scanning the extension buffer. */ +int +inet6_opt_next (void *extbuf, socklen_t extlen, int offset, uint8_t *typep, + socklen_t *lenp, void **databufp) +{ + if (offset == 0) + offset = sizeof (struct ip6_hbh); + else if (offset < sizeof (struct ip6_hbh)) + return -1; + + while (offset < extlen) + { + struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset); + + if (opt->ip6o_type == IP6OPT_PAD1) + /* Single byte padding. */ + ++offset; + else if (opt->ip6o_type == IP6OPT_PADN) + offset += sizeof (struct ip6_opt) + opt->ip6o_len; + else + { + /* Check whether the option is valid. */ + offset += sizeof (struct ip6_opt) + opt->ip6o_len; + if (offset > extlen) + return -1; + + *typep = opt->ip6o_type; + *lenp = opt->ip6o_len; + *databufp = opt + 1; + return offset; + } + } + + return -1; +} + + +/* RFC 3542, 10.6 + + This function is similar to the previously described + 'inet6_opt_next' function, except this function lets the caller + specify the option type to be searched for, instead of always + returning the next option in the extension header. */ +int +inet6_opt_find (void *extbuf, socklen_t extlen, int offset, uint8_t type, + socklen_t *lenp, void **databufp) +{ + if (offset == 0) + offset = sizeof (struct ip6_hbh); + else if (offset < sizeof (struct ip6_hbh)) + return -1; + + while (offset < extlen) + { + struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset); + + if (opt->ip6o_type == IP6OPT_PAD1) + { + /* Single byte padding. */ + ++offset; + if (type == IP6OPT_PAD1) + { + *lenp = 0; + *databufp = (uint8_t *) extbuf + offset; + return offset; + } + } + else if (opt->ip6o_type != type) + offset += sizeof (struct ip6_opt) + opt->ip6o_len; + else + { + /* Check whether the option is valid. */ + offset += sizeof (struct ip6_opt) + opt->ip6o_len; + if (offset > extlen) + return -1; + + *lenp = opt->ip6o_len; + *databufp = opt + 1; + return offset; + } + } + + return -1; +} + + +/* RFC 3542, 10.7 + + This function extracts data items of various sizes in the data + portion of the option. */ +int +inet6_opt_get_val (void *databuf, int offset, void *val, socklen_t vallen) +{ + memcpy (val, (uint8_t *) databuf + offset, vallen); + + return offset + vallen; +} diff -uprN glibc-2.4/inet/inet6_option.c glibc-2.5/inet/inet6_option.c --- glibc-2.4/inet/inet6_option.c 2003-06-14 08:43:24.000000000 +0000 +++ glibc-2.5/inet/inet6_option.c 2006-09-20 20:14:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -75,6 +75,10 @@ get_opt_end (const uint8_t **result, con } +static uint8_t *option_alloc (struct cmsghdr *cmsg, int datalen, int multx, + int plusy); + + /* RFC 2292, 6.3.1 This function returns the number of bytes required to hold an option @@ -93,6 +97,8 @@ inet6_option_space (nbytes) return CMSG_SPACE (roundup (nbytes, 8)); } +link_warning (inet6_option_space, + "inet6_option_space is obsolete, use the RFC 3542 interfaces") /* RFC 2292, 6.3.2 @@ -127,6 +133,8 @@ inet6_option_init (bp, cmsgp, type) return 0; } +link_warning (inet6_option_init, + "inet6_option_init is obsolete, use the RFC 3542 interfaces") /* RFC 2292, 6.3.3 @@ -150,7 +158,7 @@ inet6_option_append (cmsg, typep, multx, int len = typep[0] == IP6OPT_PAD1 ? 1 : typep[1] + 2; /* Get the pointer to the space in the message. */ - uint8_t *ptr = inet6_option_alloc (cmsg, len, multx, plusy); + uint8_t *ptr = option_alloc (cmsg, len, multx, plusy); if (ptr == NULL) /* Some problem with the parameters. */ return -1; @@ -160,6 +168,8 @@ inet6_option_append (cmsg, typep, multx, return 0; } +link_warning (inet6_option_append, + "inet6_option_append is obsolete, use the RFC 3542 interfaces") /* RFC 2292, 6.3.4 @@ -169,12 +179,8 @@ inet6_option_append (cmsg, typep, multx, inet6_option_init(). This function returns a pointer to the 8-bit option type field that starts the option on success, or NULL on an error. */ -uint8_t * -inet6_option_alloc (cmsg, datalen, multx, plusy) - struct cmsghdr *cmsg; - int datalen; - int multx; - int plusy; +static uint8_t * +option_alloc (struct cmsghdr *cmsg, int datalen, int multx, int plusy) { /* The RFC limits the value of the alignment values. */ if ((multx != 1 && multx != 2 && multx != 4 && multx != 8) @@ -214,7 +220,19 @@ inet6_option_alloc (cmsg, datalen, multx return result; } -libc_hidden_def (inet6_option_alloc) + + +uint8_t * +inet6_option_alloc (cmsg, datalen, multx, plusy) + struct cmsghdr *cmsg; + int datalen; + int multx; + int plusy; +{ + return option_alloc (cmsg, datalen, multx, plusy); +} +link_warning (inet6_option_alloc, + "inet6_option_alloc is obsolete, use the RFC 3542 interfaces") /* RFC 2292, 6.3.5 @@ -251,7 +269,7 @@ inet6_option_next (cmsg, tptrp) const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8; const uint8_t *result; - if (tptrp == NULL) + if (*tptrp == NULL) /* This is the first call, return the first option if there is one. */ result = (const uint8_t *) (ip6e + 1); else @@ -272,6 +290,8 @@ inet6_option_next (cmsg, tptrp) /* Check the option is fully represented in the message. */ return get_opt_end (&result, result, endp); } +link_warning (inet6_option_next, + "inet6_option_next is obsolete, use the RFC 3542 interfaces") /* RFC 2292, 6.3.6 @@ -308,7 +328,7 @@ inet6_option_find (cmsg, tptrp, type) const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8; const uint8_t *next; - if (tptrp == NULL) + if (*tptrp == NULL) /* This is the first call, return the first option if there is one. */ next = (const uint8_t *) (ip6e + 1); else @@ -341,3 +361,5 @@ inet6_option_find (cmsg, tptrp, type) /* Success. */ return 0; } +link_warning (inet6_option_find, + "inet6_option_find is obsolete, use the RFC 3542 interfaces") diff -uprN glibc-2.4/inet/inet6_rth.c glibc-2.5/inet/inet6_rth.c --- glibc-2.4/inet/inet6_rth.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/inet/inet6_rth.c 2006-05-25 04:38:02.000000000 +0000 @@ -0,0 +1,192 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* RFC 3542, 7.1 + + This function returns the number of bytes required to hold a + Routing header of the specified type containing the specified + number of segments (addresses). For an IPv6 Type 0 Routing header, + the number of segments must be between 0 and 127, inclusive. */ +socklen_t +inet6_rth_space (int type, int segments) +{ + switch (type) + { + case IPV6_RTHDR_TYPE_0: + if (segments < 0 || segments > 127) + return 0; + + return sizeof (struct ip6_rthdr0) + segments * sizeof (struct in6_addr); + } + + return 0; +} + + +/* RFC 3542, 7.2 + + This function initializes the buffer pointed to by BP to contain a + Routing header of the specified type and sets ip6r_len based on the + segments parameter. */ +void * +inet6_rth_init (void *bp, socklen_t bp_len, int type, int segments) +{ + struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp; + + switch (type) + { + case IPV6_RTHDR_TYPE_0: + /* Make sure the parameters are valid and the buffer is large enough. */ + if (segments < 0 || segments > 127) + break; + + socklen_t len = (sizeof (struct ip6_rthdr0) + + segments * sizeof (struct in6_addr)); + if (len > bp_len) + break; + + /* Some implementations seem to initialize the whole memory area. */ + memset (bp, '\0', len); + + /* Length in units of 8 octets. */ + rthdr->ip6r_len = segments * sizeof (struct in6_addr) / 8; + rthdr->ip6r_type = IPV6_RTHDR_TYPE_0; + return bp; + } + + return NULL; +} + + +/* RFC 3542, 7.3 + + This function adds the IPv6 address pointed to by addr to the end of + the Routing header being constructed. */ +int +inet6_rth_add (void *bp, const struct in6_addr *addr) +{ + struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp; + + switch (rthdr->ip6r_type) + { + struct ip6_rthdr0 *rthdr0; + case IPV6_RTHDR_TYPE_0: + rthdr0 = (struct ip6_rthdr0 *) rthdr; + + memcpy (&rthdr0->ip6r0_addr[rthdr0->ip6r0_segleft++], + addr, sizeof (struct in6_addr)); + + return 0; + } + + return -1; +} + + +/* RFC 3542, 7.4 + + This function takes a Routing header extension header (pointed to by + the first argument) and writes a new Routing header that sends + datagrams along the reverse of that route. The function reverses the + order of the addresses and sets the segleft member in the new Routing + header to the number of segments. */ +int +inet6_rth_reverse (const void *in, void *out) +{ + struct ip6_rthdr *in_rthdr = (struct ip6_rthdr *) in; + + switch (in_rthdr->ip6r_type) + { + struct ip6_rthdr0 *in_rthdr0; + struct ip6_rthdr0 *out_rthdr0; + case IPV6_RTHDR_TYPE_0: + in_rthdr0 = (struct ip6_rthdr0 *) in; + out_rthdr0 = (struct ip6_rthdr0 *) out; + + /* Copy header, not the addresses. The memory regions can overlap. */ + memmove (out_rthdr0, in_rthdr0, sizeof (struct ip6_rthdr0)); + + int total = in_rthdr0->ip6r0_segleft * 8 / sizeof (struct in6_addr); + for (int i = 0; i < total / 2; ++i) + { + /* Remember, IN_RTHDR0 and OUT_RTHDR0 might overlap. */ + struct in6_addr temp = in_rthdr0->ip6r0_addr[i]; + out_rthdr0->ip6r0_addr[i] = in_rthdr0->ip6r0_addr[total - 1 - i]; + out_rthdr0->ip6r0_addr[total - 1 - i] = temp; + } + if (total % 2 != 0 && in != out) + out_rthdr0->ip6r0_addr[total / 2] = in_rthdr0->ip6r0_addr[total / 2]; + + return 0; + } + + return -1; +} + + +/* RFC 3542, 7.5 + + This function returns the number of segments (addresses) contained in + the Routing header described by BP. */ +int +inet6_rth_segments (const void *bp) +{ + struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp; + + switch (rthdr->ip6r_type) + { + case IPV6_RTHDR_TYPE_0: + + return rthdr->ip6r_len * 8 / sizeof (struct in6_addr); + } + + return -1; +} + + +/* RFC 3542, 7.6 + + This function returns a pointer to the IPv6 address specified by + index (which must have a value between 0 and one less than the + value returned by 'inet6_rth_segments') in the Routing header + described by BP. */ +struct in6_addr * +inet6_rth_getaddr (const void *bp, int index) +{ + struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp; + + switch (rthdr->ip6r_type) + { + struct ip6_rthdr0 *rthdr0; + case IPV6_RTHDR_TYPE_0: + rthdr0 = (struct ip6_rthdr0 *) rthdr; + + if (index >= rthdr0->ip6r0_len * 8 / sizeof (struct in6_addr)) + break; + + return &rthdr0->ip6r0_addr[index]; + } + + return NULL; +} diff -uprN glibc-2.4/inet/inet_ntoa.c glibc-2.5/inet/inet_ntoa.c --- glibc-2.4/inet/inet_ntoa.c 2001-08-14 23:19:46.000000000 +0000 +++ glibc-2.5/inet/inet_ntoa.c 2006-04-09 05:50:08.000000000 +0000 @@ -21,78 +21,19 @@ #include #include #include -#include /* The interface of this function is completely stupid, it requires a - static buffer. We relax this a bit in that we allow at least one - buffer for each thread. */ - -/* This is the key for the thread specific memory. */ -static __libc_key_t key; - -/* If nonzero the key allocation failed and we should better use a - static buffer than fail. */ -static char local_buf[18]; -static char *static_buf; - -/* Destructor for the thread-specific data. */ -static void init (void); -static void free_key_mem (void *mem); + static buffer. We relax this a bit in that we allow one buffer for + each thread. */ +static __thread char buffer[18]; char * inet_ntoa (struct in_addr in) { - __libc_once_define (static, once); - char *buffer; - unsigned char *bytes; - - /* If we have not yet initialized the buffer do it now. */ - __libc_once (once, init); - - if (static_buf != NULL) - buffer = static_buf; - else - { - /* We don't use the static buffer and so we have a key. Use it - to get the thread-specific buffer. */ - buffer = __libc_getspecific (key); - if (buffer == NULL) - { - /* No buffer allocated so far. */ - buffer = malloc (18); - if (buffer == NULL) - /* No more memory available. We use the static buffer. */ - buffer = local_buf; - else - __libc_setspecific (key, buffer); - } - } - - bytes = (unsigned char *) ∈ - __snprintf (buffer, 18, "%d.%d.%d.%d", + unsigned char *bytes = (unsigned char *) ∈ + __snprintf (buffer, sizeof (buffer), "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]); return buffer; } - - -/* Initialize buffer. */ -static void -init (void) -{ - if (__libc_key_create (&key, free_key_mem)) - /* Creating the key failed. This means something really went - wrong. In any case use a static buffer which is better than - nothing. */ - static_buf = local_buf; -} - - -/* Free the thread specific data, this is done if a thread terminates. */ -static void -free_key_mem (void *mem) -{ - free (mem); - __libc_setspecific (key, NULL); -} diff -uprN glibc-2.4/inet/Makefile glibc-2.5/inet/Makefile --- glibc-2.4/inet/Makefile 2004-07-26 04:28:37.000000000 +0000 +++ glibc-2.5/inet/Makefile 2006-05-25 04:38:29.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1991-2002, 2003, 2004, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ routines := htonl htons \ getaliasent_r getaliasent getaliasname getaliasname_r \ in6_addr getnameinfo if_index ifaddrs inet6_option \ getipv4sourcefilter setipv4sourcefilter \ - getsourcefilter setsourcefilter + getsourcefilter setsourcefilter inet6_opt inet6_rth aux := check_pf ifreq diff -uprN glibc-2.4/inet/netinet/icmp6.h glibc-2.5/inet/netinet/icmp6.h --- glibc-2.4/inet/netinet/icmp6.h 2005-11-16 07:51:04.000000000 +0000 +++ glibc-2.5/inet/netinet/icmp6.h 2006-05-25 04:39:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -191,13 +191,13 @@ struct nd_opt_hdr /* Neighbo /* followed by option specific data */ }; -#define ND_OPT_SOURCE_LINKADDR 1 -#define ND_OPT_TARGET_LINKADDR 2 -#define ND_OPT_PREFIX_INFORMATION 3 -#define ND_OPT_REDIRECTED_HEADER 4 -#define ND_OPT_MTU 5 -#define ND_OPT_RTR_ADV_INTERVAL 7 -#define ND_OPT_HOME_AGENT_INFO 8 +#define ND_OPT_SOURCE_LINKADDR 1 +#define ND_OPT_TARGET_LINKADDR 2 +#define ND_OPT_PREFIX_INFORMATION 3 +#define ND_OPT_REDIRECTED_HEADER 4 +#define ND_OPT_MTU 5 +#define ND_OPT_RTR_ADV_INTERVAL 7 +#define ND_OPT_HOME_AGENT_INFO 8 struct nd_opt_prefix_info /* prefix information */ { @@ -211,9 +211,9 @@ struct nd_opt_prefix_info /* prefix struct in6_addr nd_opt_pi_prefix; }; -#define ND_OPT_PI_FLAG_ONLINK 0x80 -#define ND_OPT_PI_FLAG_AUTO 0x40 -#define ND_OPT_PI_FLAG_RADDR 0x20 +#define ND_OPT_PI_FLAG_ONLINK 0x80 +#define ND_OPT_PI_FLAG_AUTO 0x40 +#define ND_OPT_PI_FLAG_RADDR 0x20 struct nd_opt_rd_hdr /* redirected header */ { @@ -300,11 +300,11 @@ struct rr_pco_use /* use prefix par #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10 #if BYTE_ORDER == BIG_ENDIAN -# define ICMP6_RR_PCOUSE_DECRVLTIME 0x80000000 -# define ICMP6_RR_PCOUSE_DECRPLTIME 0x40000000 +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 #elif BYTE_ORDER == LITTLE_ENDIAN -# define ICMP6_RR_PCOUSE_DECRVLTIME 0x80 -# define ICMP6_RR_PCOUSE_DECRPLTIME 0x40 +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 #endif struct rr_result /* router renumbering result message */ diff -uprN glibc-2.4/inet/netinet/in.h glibc-2.5/inet/netinet/in.h --- glibc-2.4/inet/netinet/in.h 2004-12-19 20:40:06.000000000 +0000 +++ glibc-2.5/inet/netinet/in.h 2006-05-25 04:40:42.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-2001, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -455,25 +455,66 @@ extern int bindresvport6 (int __sockfd, /* IPv6 packet information. */ struct in6_pktinfo { - struct in6_addr ipi6_addr; /* src/dst IPv6 address */ - unsigned int ipi6_ifindex; /* send/recv interface index */ + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + unsigned int ipi6_ifindex; /* send/recv interface index */ + }; + +/* IPv6 MTU information. */ +struct ip6_mtuinfo + { + struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ + uint32_t ip6m_mtu; /* path MTU in host byte order */ }; #ifdef __USE_GNU -/* Hop-by-Hop and Destination Options Processing. */ -extern int inet6_option_space (int __nbytes) __THROW; +/* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ +extern int inet6_option_space (int __nbytes) + __THROW __attribute_deprecated__; extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, - int __type) __THROW; + int __type) __THROW __attribute_deprecated__; extern int inet6_option_append (struct cmsghdr *__cmsg, __const uint8_t *__typep, int __multx, - int __plusy) __THROW; + int __plusy) __THROW __attribute_deprecated__; extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, - int __multx, int __plusy) __THROW; + int __multx, int __plusy) + __THROW __attribute_deprecated__; extern int inet6_option_next (__const struct cmsghdr *__cmsg, - uint8_t **__tptrp) __THROW; + uint8_t **__tptrp) + __THROW __attribute_deprecated__; extern int inet6_option_find (__const struct cmsghdr *__cmsg, - uint8_t **__tptrp, int __type) __THROW; + uint8_t **__tptrp, int __type) + __THROW __attribute_deprecated__; + + +/* Hop-by-Hop and Destination Options Processing (RFC 3542). */ +extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW; +extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t __len, uint8_t __align, + void **__databufp) __THROW; +extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) + __THROW; +extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) __THROW; +extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t *__typep, socklen_t *__lenp, + void **__databufp) __THROW; +extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t *__lenp, + void **__databufp) __THROW; +extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) __THROW; + + +/* Routing Header Option (RFC 3542). */ +extern socklen_t inet6_rth_space (int __type, int __segments) __THROW; +extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, + int __segments) __THROW; +extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __THROW; +extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW; +extern int inet6_rth_segments (__const void *__bp) __THROW; +extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) + __THROW; /* Multicast source filter support. */ diff -uprN glibc-2.4/inet/netinet/ip6.h glibc-2.5/inet/netinet/ip6.h --- glibc-2.4/inet/netinet/ip6.h 2005-11-16 07:51:04.000000000 +0000 +++ glibc-2.5/inet/netinet/ip6.h 2006-05-25 04:41:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1997, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991-1997, 2001, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -89,7 +89,8 @@ struct ip6_rthdr0 uint8_t ip6r0_segleft; /* segments left */ uint8_t ip6r0_reserved; /* reserved field */ uint8_t ip6r0_slmap[3]; /* strict/loose bit map */ - struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */ + /* followed by up to 127 struct in6_addr */ + struct in6_addr ip6r0_addr[0]; }; /* Fragment header */ @@ -101,14 +102,14 @@ struct ip6_frag uint32_t ip6f_ident; /* identification */ }; -#if BYTE_ORDER == BIG_ENDIAN -#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ -#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ -#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ +#if BYTE_ORDER == BIG_ENDIAN +# define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ +# define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ +# define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ #else /* BYTE_ORDER == LITTLE_ENDIAN */ -#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ -#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ -#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ +# define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ +# define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ +# define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ #endif /* IPv6 options */ @@ -175,7 +176,7 @@ struct ip6_opt_router }; /* Router alert values (in network byte order) */ -#if BYTE_ORDER == BIG_ENDIAN +#if BYTE_ORDER == BIG_ENDIAN # define IP6_ALERT_MLD 0x0000 # define IP6_ALERT_RSVP 0x0001 # define IP6_ALERT_AN 0x0002 diff -uprN glibc-2.4/inet/rexec.c glibc-2.5/inet/rexec.c --- glibc-2.4/inet/rexec.c 2005-02-17 01:15:44.000000000 +0000 +++ glibc-2.5/inet/rexec.c 2006-04-07 08:08:51.000000000 +0000 @@ -87,8 +87,11 @@ rexec_af(ahost, rport, name, pass, cmd, return (-1); } *ahost = ahostbuf; - } else + } else { *ahost = NULL; + __set_errno (ENOENT); + return -1; + } ruserpass(res0->ai_canonname, &name, &pass); retry: s = __socket(res0->ai_family, res0->ai_socktype, 0); diff -uprN glibc-2.4/inet/Versions glibc-2.5/inet/Versions --- glibc-2.4/inet/Versions 2004-07-26 04:27:49.000000000 +0000 +++ glibc-2.5/inet/Versions 2006-05-25 04:39:12.000000000 +0000 @@ -78,6 +78,12 @@ libc { getipv4sourcefilter; setipv4sourcefilter; getsourcefilter; setsourcefilter; } + GLIBC_2.5 { + inet6_opt_init; inet6_opt_append; inet6_opt_finish; inet6_opt_set_val; + inet6_opt_next; inet6_opt_find; inet6_opt_get_val; + inet6_rth_space; inet6_rth_init; inet6_rth_add; inet6_rth_reverse; + inet6_rth_segments; inet6_rth_getaddr; + } GLIBC_PRIVATE { # functions used in other libraries __internal_endnetgrent; __internal_getnetgrent_r; diff -uprN glibc-2.4/INTERFACE glibc-2.5/INTERFACE --- glibc-2.4/INTERFACE 1999-10-31 17:02:25.000000000 +0000 +++ glibc-2.5/INTERFACE 1970-01-01 00:00:00.000000000 +0000 @@ -1,1508 +0,0 @@ -2.0.7-19981020 2.0.98-19981020 -=============================================================================== - -a64l a64l -abort abort -abs abs -accept accept -access access -acct acct -acos acos -acosf acosf -acosh acosh -acoshf acoshf -acoshl acoshl -acosl acosl -addmntent addmntent - > addseverity NEW: fmtmsg -adjtime adjtime -adjtimex adjtimex -advance advance -alarm alarm -alphasort alphasort - > alphasort64 NEW: LFS - > argp_err_exit_status NEW: argp - > argp_error NEW: argp - > argp_failure NEW: argp - > argp_help NEW: argp - > argp_parse NEW: argp - > argp_program_bug_address NEW: argp - > argp_program_version NEW: argp - > argp_program_version_hook NEW: argp - > argp_state_help NEW: argp - > argp_usage NEW: argp -argz_add argz_add -argz_add_sep argz_add_sep -argz_append argz_append -argz_count argz_count -argz_create argz_create -argz_create_sep argz_create_sep -argz_delete argz_delete -argz_extract argz_extract -argz_insert argz_insert -argz_next argz_next -argz_replace argz_replace -argz_stringify argz_stringify -asctime asctime -asctime_r asctime_r -asin asin -asinf asinf -asinh asinh -asinhf asinhf -asinhl asinhl -asinl asinl -asprintf asprintf -atan atan -atan2 atan2 -atan2f atan2f -atan2l atan2l -atanf atanf -atanh atanh -atanhf atanhf -atanhl atanhl -atanl atanl -atexit atexit -atof atof -atoi atoi -atol atol -atoll atoll - > authdes_create NEW: SecureRPC - > authdes_getucred NEW: SecureRPC - > authdes_pk_create NEW: SecureRPC -authnone_create authnone_create -authunix_create authunix_create -authunix_create_default authunix_create_default - > backtrace NEW: GNU ext. - > backtrace_symbols NEW: GNU ext. - > backtrace_symbols_fd NEW: GNU ext. -basename basename -bcmp bcmp -bcopy bcopy -bdflush bdflush -bind bind -bindresvport bindresvport -bindtextdomain bindtextdomain -brk brk -bsd_signal bsd_signal -bsearch bsearch -btowc btowc -bzero bzero -cabs cabs -cabsf cabsf -cabsl cabsl - > cacos NEW: ISO C99 - > cacosf NEW: ISO C99 - > cacosh NEW: ISO C99 - > cacoshf NEW: ISO C99 - > cacoshl NEW: ISO C99 - > cacosl NEW: ISO C99 -calloc calloc -callrpc callrpc -canonicalize_file_name canonicalize_file_name - > capget NEW: kernel - > capset NEW: kernel - > carg NEW: ISO C99 - > cargf NEW: ISO C99 - > cargl NEW: ISO C99 - > casin NEW: ISO C99 - > casinf NEW: ISO C99 - > casinh NEW: ISO C99 - > casinhf NEW: ISO C99 - > casinhl NEW: ISO C99 - > casinl NEW: ISO C99 - > catan NEW: ISO C99 - > catanf NEW: ISO C99 - > catanh NEW: ISO C99 - > catanhf NEW: ISO C99 - > catanhl NEW: ISO C99 - > catanl NEW: ISO C99 -catclose catclose -catgets catgets -catopen catopen - > cbc_crypt NEW: SecureRPC -cbrt cbrt -cbrtf cbrtf -cbrtl cbrtl - > ccos NEW: ISO C99 - > ccosf NEW: ISO C99 - > ccosh NEW: ISO C99 - > ccoshf NEW: ISO C99 - > ccoshl NEW: ISO C99 - > ccosl NEW: ISO C99 -ceil ceil -ceilf ceilf -ceill ceill - > cexp NEW: ISO C99 - > cexpf NEW: ISO C99 - > cexpl NEW: ISO C99 -cfgetispeed cfgetispeed -cfgetospeed cfgetospeed -cfmakeraw cfmakeraw -cfree cfree -cfsetispeed cfsetispeed -cfsetospeed cfsetospeed -cfsetspeed cfsetspeed -chdir chdir -chflags chflags -chmod chmod -chown chown -chroot chroot - > cimag NEW: ISO C99 - > cimagf NEW: ISO C99 - > cimagl NEW: ISO C99 -clearenv clearenv -clearerr clearerr -clearerr_locked < REMOVED -clearerr_unlocked clearerr_unlocked -clnt_broadcast clnt_broadcast -clnt_create clnt_create -clnt_pcreateerror clnt_pcreateerror -clnt_perrno clnt_perrno -clnt_perror clnt_perror -clnt_spcreateerror clnt_spcreateerror -clnt_sperrno clnt_sperrno -clnt_sperror clnt_sperror -clntraw_create clntraw_create -clnttcp_create clnttcp_create -clntudp_bufcreate clntudp_bufcreate -clntudp_create clntudp_create - > clntunix_create NEW: sunrpc ext -clock clock - > clog NEW: ISO C99 - > clog10 NEW: ISO C99 - > clog10f NEW: ISO C99 - > clog10l NEW: ISO C99 - > clogf NEW: ISO C99 - > clogl NEW: ISO C99 -clone clone -close close -closedir closedir -closelog closelog -confstr confstr - > conj NEW: ISO C99 - > conjf NEW: ISO C99 - > conjl NEW: ISO C99 -connect connect -copysign copysign -copysignf copysignf -copysignl copysignl -cos cos -cosf cosf -cosh cosh -coshf coshf -coshl coshl -cosl cosl - > cpow NEW: ISO C99 - > cpowf NEW: ISO C99 - > cpowl NEW: ISO C99 - > cproj NEW: ISO C99 - > cprojf NEW: ISO C99 - > cprojl NEW: ISO C99 - > creal NEW: ISO C99 - > crealf NEW: ISO C99 - > creall NEW: ISO C99 -creat creat - > creat64 NEW: LFS -create_module create_module - > csin NEW: ISO C99 - > csinf NEW: ISO C99 - > csinh NEW: ISO C99 - > csinhf NEW: ISO C99 - > csinhl NEW: ISO C99 - > csinl NEW: ISO C99 - > csqrt NEW: ISO C99 - > csqrtf NEW: ISO C99 - > csqrtl NEW: ISO C99 - > ctan NEW: ISO C99 - > ctanf NEW: ISO C99 - > ctanh NEW: ISO C99 - > ctanhf NEW: ISO C99 - > ctanhl NEW: ISO C99 - > ctanl NEW: ISO C99 -ctermid ctermid -ctime ctime -ctime_r ctime_r -cuserid cuserid -daemon daemon -daylight daylight -dcgettext dcgettext -delete_module delete_module - > des_setparity NEW: SecureRPC -dgettext dgettext -difftime difftime -dirfd dirfd -dirname dirname -div div -dprintf dprintf -drand48 drand48 -drand48_r drand48_r -drem drem -dremf dremf -dreml dreml -dup dup -dup2 dup2 -dysize dysize - > ecb_crypt NEW: SecureRPC -ecvt ecvt -ecvt_r ecvt_r -endaliasent endaliasent -endfsent endfsent -endgrent endgrent -endhostent endhostent -endmntent endmntent -endnetent endnetent -endnetgrent endnetgrent -endprotoent endprotoent -endpwent endpwent -endrpcent endrpcent -endservent endservent -endspent endspent -endttyent endttyent -endusershell endusershell -endutent endutent - > endutxent NEW: utmpx -environ environ -envz_add envz_add -envz_entry envz_entry -envz_get envz_get -envz_merge envz_merge -envz_remove envz_remove -envz_strip envz_strip -erand48 erand48 -erand48_r erand48_r -erf erf -erfc erfc -erfcf erfcf -erfcl erfcl -erff erff -erfl erfl -err err -errno errno -error error -error_at_line error_at_line -error_message_count error_message_count -error_one_per_line error_one_per_line -error_print_progname error_print_progname -errx errx -ether_aton ether_aton -ether_aton_r ether_aton_r -ether_hostton ether_hostton -ether_line ether_line -ether_ntoa ether_ntoa -ether_ntoa_r ether_ntoa_r -ether_ntohost ether_ntohost -euidaccess euidaccess -execl execl -execle execle -execlp execlp -execv execv -execve execve -execvp execvp -exit exit -exp exp - > exp10 NEW: ISO C99 - > exp10f NEW: ISO C99 - > exp10l NEW: ISO C99 - > exp2 NEW: ISO C99 - > exp2f NEW: ISO C99 - > exp2l NEW: ISO C99 -expf expf -expl expl -expm1 expm1 -expm1f expm1f -expm1l expm1l -fabs fabs -fabsf fabsf -fabsl fabsl - > fattach NEW: STREAMS -fchdir fchdir -fchflags fchflags -fchmod fchmod -fchown fchown -fclose fclose -fcloseall fcloseall -fcntl fcntl -fcvt fcvt -fcvt_r fcvt_r -fdatasync fdatasync - > fdetach NEW: STREAMS - > fdim NEW: ISO C99 - > fdimf NEW: ISO C99 - > fdiml NEW: ISO C99 -fdopen fdopen - > feclearexcept NEW: ISO C99 - > fegetenv NEW: ISO C99 - > fegetexceptflag NEW: ISO C99 - > fegetround NEW: ISO C99 - > feholdexcept NEW: ISO C99 -feof feof -feof_locked < REMOVED -feof_unlocked feof_unlocked - > feraiseexcept NEW: ISO C99 -ferror ferror -ferror_locked < REMOVED -ferror_unlocked ferror_unlocked - > fesetenv NEW: ISO C99 - > fesetexceptflag NEW: ISO C99 - > fesetround NEW: ISO C99 - > fetestexcept NEW: ISO C99 - > feupdateenv NEW: ISO C99 -fexecve fexecve -fflush fflush -fflush_locked < REMOVED -fflush_unlocked fflush_unlocked -ffs ffs - > ffsl NEW: GNU ext. - > ffsll NEW: GNU ext. -fgetc fgetc -fgetgrent fgetgrent -fgetgrent_r fgetgrent_r -fgetpos fgetpos - > fgetpos64 NEW: LFS -fgetpwent fgetpwent -fgetpwent_r fgetpwent_r -fgets fgets - > fgets_unlocked NEW: GNU ext. -fgetspent fgetspent -fgetspent_r fgetspent_r -fileno fileno -fileno_locked < REMOVED -fileno_unlocked fileno_unlocked -finite finite -finitef finitef -finitel finitel -flock flock -flockfile flockfile -floor floor -floorf floorf -floorl floorl - > fma NEW: ISO C99 - > fmaf NEW: ISO C99 - > fmal NEW: ISO C99 - > fmax NEW: ISO C99 - > fmaxf NEW: ISO C99 - > fmaxl NEW: ISO C99 - > fmin NEW: ISO C99 - > fminf NEW: ISO C99 - > fminl NEW: ISO C99 -fmod fmod -fmodf fmodf -fmodl fmodl - > fmtmsg NEW: fmtmsg -fnmatch fnmatch -fopen fopen - > fopen64 NEW: LFS -fopencookie fopencookie -fork fork -fpathconf fpathconf -fprintf fprintf -fputc fputc -fputc_locked < REMOVED -fputc_unlocked fputc_unlocked -fputs fputs - > fputs_unlocked NEW: GNU ext. -fread fread - > fread_unlocked NEW: GNU ext. -free free -freeaddrinfo freeaddrinfo -freopen freopen - > freopen64 NEW: LFS -frexp frexp -frexpf frexpf -frexpl frexpl -fscanf fscanf -fseek fseek - > fseeko NEW: Unix98 - > fseeko64 -fsetpos fsetpos - > fsetpos64 NEW: LFS -fstatfs fstatfs - > fstatfs64 NEW: LFS - > fstatvfs NEW: Unix98 - > fstatvfs64 NEW: LFS -fsync fsync -ftell ftell - > ftello NEW: Unix98 - > ftello64 NEW: LFS -ftime ftime -ftok ftok -ftruncate ftruncate - > ftruncate64 NEW: LFS -ftrylockfile ftrylockfile -fts_children fts_children -fts_close fts_close -fts_open fts_open -fts_read fts_read -fts_set fts_set -ftw ftw - > ftw64 NEW: LFS -funlockfile funlockfile -fwrite fwrite - > fwrite_unlocked NEW: GNU ext. - > gai_strerror NEW: IPv6 -gamma gamma -gamma_r < REMOVED -gammaf gammaf -gammaf_r < REMOVED -gammal gammal -gammal_r < REMOVED -gcvt gcvt -get_avphys_pages get_avphys_pages -get_current_dir_name get_current_dir_name -get_kernel_syms get_kernel_syms -get_myaddress get_myaddress -get_nprocs get_nprocs -get_nprocs_conf get_nprocs_conf -get_phys_pages get_phys_pages -getaddrinfo getaddrinfo -getaliasbyname getaliasbyname -getaliasbyname_r getaliasbyname_r -getaliasent getaliasent -getaliasent_r getaliasent_r -getc getc -getc_locked < REMOVE -getc_unlocked getc_unlocked -getchar getchar -getchar_locked < REMOVED -getchar_unlocked getchar_unlocked - > getcontext -getcwd getcwd - > getdate NEW: Unix98 - > getdate_err NEW: Unix98 - > getdate_r NEW: GNU ext. -getdelim getdelim -getdirentries getdirentries -getdomainname getdomainname -getdtablesize getdtablesize -getegid getegid -getenv getenv -geteuid geteuid -getfsent getfsent -getfsfile getfsfile -getfsspec getfsspec -getgid getgid -getgrent getgrent -getgrent_r getgrent_r -getgrgid getgrgid -getgrgid_r getgrgid_r -getgrnam getgrnam -getgrnam_r getgrnam_r -getgroups getgroups -gethostbyaddr gethostbyaddr -gethostbyaddr_r gethostbyaddr_r -gethostbyname gethostbyname -gethostbyname2 gethostbyname2 -gethostbyname2_r gethostbyname2_r -gethostbyname_r gethostbyname_r -gethostent gethostent -gethostent_r gethostent_r -gethostid gethostid -gethostname gethostname -getitimer getitimer -getline getline -getlogin getlogin -getlogin_r getlogin_r -getmntent getmntent -getmntent_r getmntent_r - > getmsg NEW: STREAMS - > getnameinfo NEW: IPv6 -getnetbyaddr getnetbyaddr -getnetbyaddr_r getnetbyaddr_r -getnetbyname getnetbyname -getnetbyname_r getnetbyname_r -getnetent getnetent -getnetent_r getnetent_r -getnetgrent getnetgrent -getnetgrent_r getnetgrent_r - > getnetname NEW: SecureRPC -getopt getopt -getopt_long getopt_long -getopt_long_only getopt_long_only -getpagesize getpagesize -getpass getpass -getpeername getpeername -getpgid getpgid -getpgrp getpgrp -getpid getpid - > getpmsg NEW: STREAMS -getppid getppid -getpriority getpriority -getprotobyname getprotobyname -getprotobyname_r getprotobyname_r -getprotobynumber getprotobynumber -getprotobynumber_r getprotobynumber_r -getprotoent getprotoent -getprotoent_r getprotoent_r - > getpt NEW: Unix98 PTY -getpublickey getpublickey -getpw getpw -getpwent getpwent -getpwent_r getpwent_r -getpwnam getpwnam -getpwnam_r getpwnam_r -getpwuid getpwuid -getpwuid_r getpwuid_r -getresgid getresgid -getresuid getresuid -getrlimit getrlimit - > getrlimit64 NEW: LFS -getrpcbyname getrpcbyname -getrpcbyname_r getrpcbyname_r -getrpcbynumber getrpcbynumber -getrpcbynumber_r getrpcbynumber_r -getrpcent getrpcent -getrpcent_r getrpcent_r -getrpcport getrpcport -getrusage getrusage -gets gets -getsecretkey getsecretkey -getservbyname getservbyname -getservbyname_r getservbyname_r -getservbyport getservbyport -getservbyport_r getservbyport_r -getservent getservent -getservent_r getservent_r -getsid getsid -getsockname getsockname -getsockopt getsockopt -getspent getspent -getspent_r getspent_r -getspnam getspnam -getspnam_r getspnam_r -getsubopt getsubopt -gettext gettext -gettimeofday gettimeofday -getttyent getttyent -getttynam getttynam -getuid getuid -getusershell getusershell -getutent getutent -getutent_r getutent_r -getutid getutid -getutid_r getutid_r -getutline getutline -getutline_r getutline_r - > getutxent NEW: utmpx - > getutxid NEW: utmpx - > getutxline NEW: utmpx -getw getw -getwd getwd -glob glob - > glob64 NEW: GNU ext. -glob_pattern_p glob_pattern_p -globfree globfree - > globfree64 NEW: GNU ext. -gmtime gmtime -gmtime_r gmtime_r - > gnu_get_libc_release NEW: GNU ext. - > gnu_get_libc_version NEW: GNU ext. - > grantpt NEW: Unix98 PTY -group_member group_member -gsignal gsignal -gtty gtty -h_errlist h_errlist -h_errno h_errno -h_nerr h_nerr -hasmntopt hasmntopt -hcreate hcreate -hcreate_r hcreate_r -hdestroy hdestroy -hdestroy_r hdestroy_r -herror herror - > host2netname NEW: SecureRPC -hsearch hsearch -hsearch_r hsearch_r -hstrerror hstrerror -htonl htonl -htons htons -hypot hypot -hypotf hypotf -hypotl hypotl - > iconv NEW: iconv - > iconv_close NEW: iconv - > iconv_open NEW: iconv - > if_freenameindex NEW: IPv6 - > if_indextoname NEW: IPv6 - > if_nameindex NEW: IPv6 - > if_nametoindex NEW: IPv6 -ilogb ilogb -ilogbf ilogbf -ilogbl ilogbl - > in6addr_any NEW: IPv6 - > in6addr_loopback NEW: IPv6 -index index - > inet6_isipv4mapped NEW: IPv6 -inet_addr inet_addr -inet_aton inet_aton -inet_lnaof inet_lnaof -inet_makeaddr inet_makeaddr -inet_netof inet_netof -inet_network inet_network -inet_nsap_addr inet_nsap_addr -inet_nsap_ntoa inet_nsap_ntoa -inet_ntoa inet_ntoa -inet_ntop inet_ntop -inet_pton inet_pton -init_module init_module -initgroups initgroups -initstate initstate -initstate_r initstate_r -innetgr innetgr -insque insque -ioctl ioctl -ioperm ioperm -iopl iopl -iruserok iruserok -isalnum isalnum -isalpha isalpha -isascii isascii - > isastream NEW: STREAMS -isatty isatty -isblank isblank -iscntrl iscntrl -isdigit isdigit -isfdtype isfdtype -isgraph isgraph -isinf isinf -isinff isinff -isinfl isinfl -islower islower -isnan isnan -isnanf isnanf -isnanl isnanl -isprint isprint -ispunct ispunct -isspace isspace -isupper isupper -iswalnum iswalnum -iswalpha iswalpha - > iswblank NEW: GNU ext. -iswcntrl iswcntrl -iswctype iswctype -iswdigit iswdigit -iswgraph iswgraph -iswlower iswlower -iswprint iswprint -iswpunct iswpunct -iswspace iswspace -iswupper iswupper -iswxdigit iswxdigit -isxdigit isxdigit -j0 j0 -j0f j0f -j0l j0l -j1 j1 -j1f j1f -j1l j1l -jn jn -jnf jnf -jnl jnl -jrand48 jrand48 -jrand48_r jrand48_r - > key_decryptsession NEW: SecureRPC - > key_decryptsession_pk NEW: SecureRPC - > key_encryptsession NEW: SecureRPC - > key_encryptsession_pk NEW: SecureRPC - > key_gendes NEW: SecureRPC - > key_get_conv NEW: SecureRPC - > key_secretkey_is_set NEW: SecureRPC - > key_setnet NEW: SecureRPC - > key_setsecret NEW: SecureRPC -kill kill -killpg killpg -klogctl klogctl -l64a l64a -labs labs -lchown lchown -lckpwdf lckpwdf -lcong48 lcong48 -lcong48_r lcong48_r -ldexp ldexp -ldexpf ldexpf -ldexpl ldexpl -ldiv ldiv -lfind lfind -lgamma lgamma -lgamma_r lgamma_r -lgammaf lgammaf -lgammaf_r lgammaf_r -lgammal lgammal -lgammal_r lgammal_r -link link -listen listen -llabs llabs -lldiv lldiv - > llrint NEW: ISO C99 - > llrintf NEW: ISO C99 - > llrintl NEW: ISO C99 - > llround NEW: ISO C99 - > llroundf NEW: ISO C99 - > llroundl NEW: ISO C99 -llseek llseek -loc1 loc1 -loc2 loc2 -localeconv localeconv -localtime localtime -localtime_r localtime_r -lockf lockf -locs locs -log log -log10 log10 -log10f log10f -log10l log10l -log1p log1p -log1pf log1pf -log1pl log1pl - > log2 NEW: ISO C99 - > log2f NEW: ISO C99 - > log2l NEW: ISO C99 -logb logb -logbf logbf -logbl logbl -logf logf -logl logl -longjmp longjmp -lrand48 lrand48 -lrand48_r lrand48_r - > lrint NEW: ISO C99 - > lrintf NEW: ISO C99 - > lrintl NEW: ISO C99 - > lround NEW: ISO C99 - > lroundf NEW: ISO C99 - > lroundl NEW: ISO C99 -lsearch lsearch -lseek lseek - > lseek64 NEW: LFS -madvise madvise - > makecontext NEW: Unix98 -mallinfo mallinfo -malloc malloc -malloc_get_state malloc_get_state -malloc_set_state malloc_set_state -malloc_stats malloc_stats -malloc_trim malloc_trim -malloc_usable_size malloc_usable_size -mallopt mallopt -mallwatch mallwatch -matherr matherr -mblen mblen -mbrlen mbrlen -mbrtowc mbrtowc -mbsinit mbsinit -mbsnrtowcs mbsnrtowcs -mbsrtowcs mbsrtowcs -mbstowcs mbstowcs -mbtowc mbtowc -mcheck mcheck -mcount mcount -memalign memalign -memccpy memccpy -memchr memchr -memcmp memcmp -memcpy memcpy -memfrob memfrob -memmem memmem -memmove memmove - > mempcpy NEW: GNU ext. -memset memset -mkdir mkdir -mkfifo mkfifo -mkstemp mkstemp -mktemp mktemp -mktime mktime -mlock mlock -mlockall mlockall -mmap mmap - > mmap64 NEW: LFS -modf modf -modff modff -modfl modfl -moncontrol < REMOVED - > modify_ldt NEW: kernel -monstartup monstartup -mount mount -mprobe mprobe -mprotect mprotect -mrand48 mrand48 -mrand48_r mrand48_r -mremap mremap -msgctl msgctl -msgget msgget -msgrcv msgrcv -msgsnd msgsnd -msync msync -mtrace mtrace -munlock munlock -munlockall munlockall -munmap munmap -muntrace muntrace - > nan NEW: ISO C99 - > nanf NEW: ISO C99 - > nanl NEW: ISO C99 -nanosleep nanosleep - > nearbyint NEW: ISO C99 - > nearbyintf NEW: ISO C99 - > nearbyintl NEW: ISO C99 - > netname2host NEW: Secure RPC - > netname2user NEW: Secure RPC -nextafter nextafter -nextafterf nextafterf -nextafterl nextafterl - > nexttoward NEW: ISO C99 - > nexttowardf NEW: ISO C99 - > nexttowardl NEW: ISO C99 -nfsservctl nfsservctl - > nftw NEW: Unix98 - > nftw64 NEW: LFS -nice nice -nl_langinfo nl_langinfo -nrand48 nrand48 -nrand48_r nrand48_r -ntohl ntohl -ntohs ntohs -obstack_alloc_failed_handler obstack_alloc_failed_handler -obstack_exit_failure obstack_exit_failure -obstack_free obstack_free -obstack_printf obstack_printf -obstack_vprintf obstack_vprintf -on_exit on_exit -open open - > open64 NEW: LFS -open_memstream open_memstream -opendir opendir -openlog openlog -optarg optarg -opterr opterr -optind optind -optopt optopt -parse_printf_format parse_printf_format - > passwd2des NEW: SecureRPC -pathconf pathconf -pause pause -pclose pclose -perror perror -personality personality -pipe pipe -pmap_getmaps pmap_getmaps -pmap_getport pmap_getport -pmap_rmtcall pmap_rmtcall -pmap_set pmap_set -pmap_unset pmap_unset -poll poll -popen popen -pow pow - > pow10 NEW: GNU ext. - > pow10f NEW: GNU ext. - > pow10l NEW: GNU ext. -powf powf -powl powl -prctl prctl - > pread NEW: Unix98 - > pread64 NEW: LFS -printf printf - > printf_size NEW: GNU ext. - > printf_size_info NEW: GNU ext. -profil profil -profil_counter < REMOVED -program_invocation_name program_invocation_name -program_invocation_short_name program_invocation_short_name -pselect pselect -psignal psignal -pthread_attr_destroy pthread_attr_destroy -pthread_attr_getdetachstate pthread_attr_getdetachstate -pthread_attr_getinheritsched pthread_attr_getinheritsched -pthread_attr_getschedparam pthread_attr_getschedparam -pthread_attr_getschedpolicy pthread_attr_getschedpolicy -pthread_attr_getscope pthread_attr_getscope -pthread_attr_init pthread_attr_init -pthread_attr_setdetachstate pthread_attr_setdetachstate -pthread_attr_setinheritsched pthread_attr_setinheritsched -pthread_attr_setschedparam pthread_attr_setschedparam -pthread_attr_setschedpolicy pthread_attr_setschedpolicy -pthread_attr_setscope pthread_attr_setscope -pthread_cond_broadcast pthread_cond_broadcast -pthread_cond_destroy pthread_cond_destroy -pthread_cond_init pthread_cond_init -pthread_cond_signal pthread_cond_signal -pthread_cond_wait pthread_cond_wait -pthread_condattr_destroy pthread_condattr_destroy -pthread_condattr_init pthread_condattr_init -pthread_equal pthread_equal -pthread_exit pthread_exit -pthread_getschedparam pthread_getschedparam -pthread_mutex_destroy pthread_mutex_destroy -pthread_mutex_init pthread_mutex_init -pthread_mutex_lock pthread_mutex_lock -pthread_mutex_unlock pthread_mutex_unlock -pthread_mutexattr_getkind_np < REPLACED -pthread_mutexattr_setkind_np < REPLACED -pthread_self pthread_self -pthread_setcancelstate pthread_setcancelstate -pthread_setcanceltype pthread_setcanceltype -pthread_setschedparam pthread_setschedparam -ptrace ptrace - > ptsname NEW: Unix98 PTY - > ptsname_r NEW: Unix98 PTY -putc putc -putc_locked < REMOVED -putc_unlocked putc_unlocked -putchar putchar -putchar_locked < REMOVED -putchar_unlocked putchar_unlocked -putenv putenv - > putgrent NEW: GNU ext. - > putmsg NEW: STREAMS - > putpmsg NEW: STREAMS -putpwent putpwent -puts puts -putspent putspent -pututline pututline - > pututxline NEW: utmpx -putw putw -pvalloc pvalloc - > pwrite NEW: Unix98 - > pwrite64 NEW: LFS -qecvt qecvt -qecvt_r qecvt_r -qfcvt qfcvt -qfcvt_r qfcvt_r -qgcvt qgcvt -qsort qsort -query_module query_module -quotactl quotactl -raise raise -rand rand -rand_r rand_r -random random -random_r random_r -rcmd rcmd -re_comp re_comp -re_compile_fastmap re_compile_fastmap -re_compile_pattern re_compile_pattern -re_exec re_exec -re_match re_match -re_match_2 re_match_2 -re_max_failures re_max_failures -re_search re_search -re_search_2 re_search_2 -re_set_registers re_set_registers -re_set_syntax re_set_syntax -re_syntax_options re_syntax_options -read read -readdir readdir - > readdir64 NEW: LFS - > readdir64_r NEW: LFS -readdir_r readdir_r -readlink readlink -readv readv -realloc realloc -realpath realpath -reboot reboot -recv recv -recvfrom recvfrom -recvmsg recvmsg -regcomp regcomp -regerror regerror -regexec regexec -regfree regfree -register_printf_function register_printf_function -registerrpc registerrpc -remainder remainder -remainderf remainderf -remainderl remainderl -remove remove -remque remque - > remquo NEW: ISO C99 - > remquof NEW: ISO C99 - > remquol NEW: ISO C99 -rename rename -res_init res_init -revoke revoke -rewind rewind -rewinddir rewinddir -rexec rexec -rexecoptions rexecoptions -rindex rindex -rint rint -rintf rintf -rintl rintl -rmdir rmdir - > round NEW: ISO C99 - > roundf NEW: ISO C99 - > roundl NEW: ISO C99 -rpc_createerr rpc_createerr -rpmatch rpmatch -rresvport rresvport - > rtime NEW: GNU ext. -ruserok ruserok -ruserpass ruserpass -sbrk sbrk -scalb scalb -scalbf scalbf -scalbl scalbl - > scalbln NEW: ISO C99 - > scalblnf NEW: ISO C99 - > scalblnl NEW: ISO C99 -scalbn scalbn -scalbnf scalbnf -scalbnl scalbnl -scandir scandir - > scandir64 NEW: LFS -scanf scanf -sched_get_priority_max sched_get_priority_max -sched_get_priority_min sched_get_priority_min -sched_getparam sched_getparam -sched_getscheduler sched_getscheduler -sched_rr_get_interval sched_rr_get_interval -sched_setparam sched_setparam -sched_setscheduler sched_setscheduler -sched_yield sched_yield -seed48 seed48 -seed48_r seed48_r -seekdir seekdir -select select -semctl semctl -semget semget -semop semop -send send - > sendfile NEW: kernel -sendmsg sendmsg -sendto sendto -setaliasent setaliasent -setbuf setbuf -setbuffer setbuffer - > setcontext NEW: Unix98 -setdomainname setdomainname -setegid setegid -setenv setenv -seteuid seteuid -setfsent setfsent -setfsgid setfsgid -setfsuid setfsuid -setgid setgid -setgrent setgrent -setgroups setgroups -sethostent sethostent -sethostid sethostid -sethostname sethostname -setitimer setitimer -setjmp setjmp -setlinebuf setlinebuf -setlocale setlocale -setlogin setlogin -setlogmask setlogmask -setmntent setmntent -setnetent setnetent -setnetgrent setnetgrent -setpgid setpgid -setpgrp setpgrp -setpriority setpriority -setprotoent setprotoent -setpwent setpwent -setregid setregid -setresgid setresgid -setresuid setresuid -setreuid setreuid -setrlimit setrlimit - > setrlimit64 NEW: LFS -setrpcent setrpcent -setservent setservent -setsid setsid -setsockopt setsockopt -setspent setspent -setstate setstate -setstate_r setstate_r -settimeofday settimeofday -setttyent setttyent -setuid setuid -setusershell setusershell -setutent setutent - > setutxent NEW: utmpx -setvbuf setvbuf -sgetspent sgetspent -sgetspent_r sgetspent_r -shmat shmat -shmctl shmctl -shmdt shmdt -shmget shmget -shutdown shutdown -sigaction sigaction -sigaddset sigaddset -sigaltstack sigaltstack -sigandset sigandset -sigblock sigblock -sigdelset sigdelset -sigemptyset sigemptyset -sigfillset sigfillset -siggetmask siggetmask - > sighold NEW: Unix98 - > sigignore NEW: Unix98 -siginterrupt siginterrupt -sigisemptyset sigisemptyset -sigismember sigismember -siglongjmp siglongjmp -signal signal -signgam signgam -significand significand -significandf significandf -significandl significandl -sigorset sigorset -sigpause sigpause -sigpending sigpending -sigprocmask sigprocmask - > sigqueue NEW: POSIX.1b - > sigrelse NEW: Unix98 -sigreturn sigreturn - > sigset NEW: POSIX.1b -sigsetmask sigsetmask -sigstack sigstack -sigsuspend sigsuspend - > sigtimedwait NEW: POSIX.1b -sigvec sigvec -sigwait sigwait - > sigwaitinfo NEW: POSIX.1b -sin sin - > sincos NEW: GNU ext. - > sincosf NEW: GNU ext. - > sincosl NEW: GNU ext. -sinf sinf -sinh sinh -sinhf sinhf -sinhl sinhl -sinl sinl -sleep sleep -snprintf snprintf -socket socket -socketpair socketpair -sprintf sprintf -sqrt sqrt -sqrtf sqrtf -sqrtl sqrtl -srand srand -srand48 srand48 -srand48_r srand48_r -srandom srandom -srandom_r srandom_r -sscanf sscanf -ssignal ssignal -sstk sstk -statfs statfs - > statfs64 NEW: LFS - > statvfs NEW: Unix98 - > statvfs64 NEW: LFS -stderr stderr -stdin stdin -stdout stdout -step step -stime stime -stpcpy stpcpy -stpncpy stpncpy -strcasecmp strcasecmp - > strcasestr NEW: GNU ext. -strcat strcat -strchr strchr -strcmp strcmp -strcoll strcoll -strcpy strcpy -strcspn strcspn -strdup strdup -strerror strerror -strerror_r strerror_r -strfmon strfmon -strfry strfry -strftime strftime -strlen strlen -strncasecmp strncasecmp -strncat strncat -strncmp strncmp -strncpy strncpy -strndup strndup -strnlen strnlen -strpbrk strpbrk -strptime strptime -strrchr strrchr -strsep strsep -strsignal strsignal -strspn strspn -strstr strstr -strtod strtod -strtof strtof - > strtoimax NEW: ISO C99 -strtok strtok -strtok_r strtok_r -strtol strtol -strtold strtold -strtoll strtoll -strtoq strtoq -strtoul strtoul -strtoull strtoull - > strtoumax NEW: ISO C99 -strtouq strtouq - > strverscmp NEW: GNU ext. -strxfrm strxfrm -stty stty -svc_exit svc_exit -svc_fdset svc_fdset -svc_getreq svc_getreq -svc_getreqset svc_getreqset -svc_register svc_register -svc_run svc_run -svc_sendreply svc_sendreply -svc_unregister svc_unregister - > svcauthdes_stats NEW: SecureRPC -svcerr_auth svcerr_auth -svcerr_decode svcerr_decode -svcerr_noproc svcerr_noproc -svcerr_noprog svcerr_noprog -svcerr_progvers svcerr_progvers -svcerr_systemerr svcerr_systemerr -svcerr_weakauth svcerr_weakauth -svcfd_create svcfd_create -svcraw_create svcraw_create -svctcp_create svctcp_create -svcudp_bufcreate svcudp_bufcreate -svcudp_create svcudp_create -svcudp_enablecache svcudp_enablecache - > svcunix_create NEW: sunrpc etx - > svcunixfd_create NEW: sunrpc ext -swab swab - > swapcontext NEW: Unix98 -swapoff swapoff -swapon swapon -symlink symlink -sync sync -sys_errlist sys_errlist -sys_nerr sys_nerr -sys_sigabbrev sys_sigabbrev -sys_siglist sys_siglist -syscall syscall -sysconf sysconf -sysctl sysctl -sysinfo sysinfo -syslog syslog -system system -sysv_signal sysv_signal -tan tan -tanf tanf -tanh tanh -tanhf tanhf -tanhl tanhl -tanl tanl -tcdrain tcdrain -tcflow tcflow -tcflush tcflush -tcgetattr tcgetattr -tcgetpgrp tcgetpgrp - > tcgetsid NEW: Unix98 PTY -tcsendbreak tcsendbreak -tcsetattr tcsetattr -tcsetpgrp tcsetpgrp -tdelete tdelete - > tdestroy NEW: GNU ext. -telldir telldir -tempnam tempnam -textdomain textdomain -tfind tfind - > tgamma NEW: ISO C99 - > tgammaf NEW: ISO C99 - > tgammal NEW: ISO C99 -time time -timegm timegm -timelocal timelocal -times times -timezone timezone -tmpfile tmpfile - > tmpfile64 NEW: LFS -tmpnam tmpnam -tmpnam_r tmpnam_r -toascii toascii -tolower tolower -toupper toupper -towctrans towctrans -towlower towlower -towupper towupper -tr_break tr_break - > trunc NEW: ISO C99 -truncate truncate - > truncate64 NEW: LFS - > truncf NEW: ISO C99 - > truncl NEW: ISO C99 -tsearch tsearch -ttyname ttyname -ttyname_r ttyname_r -ttyslot ttyslot -twalk twalk -tzname tzname -tzset tzset -ualarm ualarm -ulckpwdf ulckpwdf -ulimit ulimit -umask umask -umount umount - > umount2 NEW: kernel -uname uname -ungetc ungetc -unlink unlink - > unlockpt NEW: Unix98 PTY -unsetenv unsetenv -updwtmp updwtmp - > updwtmpx NEW: utmpx -uselib uselib - > user2netname NEW: SecureRPC -usleep usleep -ustat ustat -utime utime -utimes utimes -utmpname utmpname - > utmpxname NEW: utmpx -valloc valloc -vasprintf vasprintf -vdprintf vdprintf -verr verr -verrx verrx - > versionsort NEW: GNU ext. - > versionsort64 NEW: LFS -vfork vfork -vfprintf vfprintf -vfscanf vfscanf -vhangup vhangup -vlimit vlimit -vm86 vm86 -vprintf vprintf -vscanf vscanf -vsnprintf vsnprintf -vsprintf vsprintf -vsscanf vsscanf -vsyslog vsyslog -vtimes vtimes -vwarn vwarn -vwarnx vwarnx -wait wait -wait3 wait3 -wait4 wait4 - > waitid NEW: Unix98 -waitpid waitpid -warn warn -warnx warnx -wcpcpy wcpcpy -wcpncpy wcpncpy -wcrtomb wcrtomb - > wcscasecmp NEW: GNU ext. -wcscat wcscat -wcschr wcschr -wcscmp wcscmp -wcscoll wcscoll -wcscpy wcscpy -wcscspn wcscspn -wcsdup wcsdup -wcslen wcslen - > wcsncasecmp NEW: GNU ext. -wcsncat wcsncat -wcsncmp wcsncmp -wcsncpy wcsncpy - > wcsnlen NEW: GNU ext. -wcsnrtombs wcsnrtombs -wcspbrk wcspbrk -wcsrchr wcsrchr -wcsrtombs wcsrtombs -wcsspn wcsspn -wcsstr wcsstr -wcstod wcstod -wcstof wcstof - > wcstoimax NEW: ISO C99 -wcstok wcstok -wcstol wcstol -wcstold wcstold - > wcstoll NEW: ISO C99 -wcstombs wcstombs -wcstoq wcstoq -wcstoul wcstoul - > wcstoull NEW: ISO C99 - > wcstoumax NEW: ISO C99 -wcstouq wcstouq - > wcswcs NEW: Unix98 -wcswidth wcswidth -wcsxfrm wcsxfrm -wctob wctob -wctomb wctomb -wctrans wctrans -wctype wctype -wcwidth wcwidth -wmemchr wmemchr -wmemcmp wmemcmp -wmemcpy wmemcpy -wmemmove wmemmove -wmemset wmemset - > wordexp NEW: POSIX.2 - > wordfree NEW: POSIX.2 -write write -write_profiling < REMOVED -writev writev - > xdecrypt NEW: SecureRPC -xdr_accepted_reply xdr_accepted_reply -xdr_array xdr_array - > xdr_authdes_cred NEW: SecureRPC - > xdr_authdes_verf NEW: SecureRPC -xdr_authunix_parms xdr_authunix_parms -xdr_bool xdr_bool -xdr_bytes xdr_bytes -xdr_callhdr xdr_callhdr -xdr_callmsg xdr_callmsg -xdr_char xdr_char - > xdr_cryptkeyarg NEW: SecureRPC - > xdr_cryptkeyarg2 NEW: SecureRPC - > xdr_cryptkeyres NEW: SecureRPC -xdr_des_block xdr_des_block -xdr_double xdr_double -xdr_enum xdr_enum -xdr_float xdr_float -xdr_free xdr_free - > xdr_getcredres NEW: SecureRPC -xdr_int xdr_int - > xdr_key_netstarg NEW: SecureRPC - > xdr_key_netstres NEW: SecureRPC - > xdr_keybuf NEW: SecureRPC - > xdr_keystatus NEW: SecureRPC -xdr_long xdr_long - > xdr_netnamestr NEW: SecureRPC -xdr_netobj xdr_netobj -xdr_opaque xdr_opaque -xdr_opaque_auth xdr_opaque_auth -xdr_pmap xdr_pmap -xdr_pmaplist xdr_pmaplist -xdr_pointer xdr_pointer -xdr_reference xdr_reference -xdr_rejected_reply xdr_rejected_reply -xdr_replymsg xdr_replymsg -xdr_rmtcall_args xdr_rmtcall_args -xdr_rmtcallres xdr_rmtcallres -xdr_short xdr_short - > xdr_sizeof NEW: SecureRPC -xdr_string xdr_string -xdr_u_char xdr_u_char -xdr_u_int xdr_u_int -xdr_u_long xdr_u_long -xdr_u_short xdr_u_short -xdr_union xdr_union - > xdr_unixcred NEW: sunrpc ext -xdr_vector xdr_vector -xdr_void xdr_void -xdr_wrapstring xdr_wrapstring -xdrmem_create xdrmem_create -xdrrec_create xdrrec_create -xdrrec_endofrecord xdrrec_endofrecord -xdrrec_eof xdrrec_eof -xdrrec_skiprecord xdrrec_skiprecord -xdrstdio_create xdrstdio_create - > xencrypt NEW: SecureRPC -xprt_register xprt_register -xprt_unregister xprt_unregister -y0 y0 -y0f y0f -y0l y0l -y1 y1 -y1f y1f -y1l y1l -yn yn -ynf ynf -ynl ynl diff -uprN glibc-2.4/intl/dcigettext.c glibc-2.5/intl/dcigettext.c --- glibc-2.4/intl/dcigettext.c 2005-04-28 15:46:01.000000000 +0000 +++ glibc-2.5/intl/dcigettext.c 2006-06-22 23:58:37.000000000 +0000 @@ -1,5 +1,5 @@ /* Implementation of the internal dcigettext function. - Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -286,7 +286,8 @@ static const char *guess_category_value internal_function; #ifdef _LIBC # include "../locale/localeinfo.h" -# define category_to_name(category) _nl_category_names[category] +# define category_to_name(category) \ + _nl_category_names.str + _nl_category_name_idxs[category] #else static const char *category_to_name PARAMS ((int category)) internal_function; #endif @@ -610,6 +611,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) { + no_translation: FREE_BLOCKS (block_list); __libc_rwlock_unlock (_nl_state_lock); __set_errno (saved_errno); @@ -645,6 +647,12 @@ DCIGETTEXT (domainname, msgid1, msgid2, } } + /* Returning -1 means that some resource problem exists + (likely memory) and that the strings could not be + converted. Return the original strings. */ + if (__builtin_expect (retval == (char *) -1, 0)) + goto no_translation; + if (retval != NULL) { /* Found the translation of MSGID1 in domain DOMAIN: @@ -864,21 +872,22 @@ _nl_find_msg (domain_file, domainbinding encoding. */ struct converted_domain *new_conversions = (struct converted_domain *) - (domain->conversions != NULL - ? realloc (domain->conversions, - (nconversions + 1) * sizeof (struct converted_domain)) - : malloc ((nconversions + 1) * sizeof (struct converted_domain))); + realloc (domain->conversions, + (nconversions + 1) * sizeof (struct converted_domain)); if (__builtin_expect (new_conversions == NULL, 0)) - /* Nothing we can do, no more memory. */ - goto converted; + /* Nothing we can do, no more memory. We cannot use the + translation because it might be encoded incorrectly. */ + return (char *) -1; + domain->conversions = new_conversions; /* Copy the 'encoding' string to permanent storage. */ encoding = strdup (encoding); if (__builtin_expect (encoding == NULL, 0)) - /* Nothing we can do, no more memory. */ - goto converted; + /* Nothing we can do, no more memory. We cannot use the + translation because it might be encoded incorrectly. */ + return (char *) -1; convd = &new_conversions[nconversions]; convd->encoding = encoding; @@ -932,10 +941,18 @@ _nl_find_msg (domain_file, domainbinding /* We always want to use transliteration. */ outcharset = norm_add_slashes (outcharset, "TRANSLIT"); charset = norm_add_slashes (charset, ""); - if (__gconv_open (outcharset, charset, &convd->conv, - GCONV_AVOID_NOCONV) - != __GCONV_OK) - convd->conv = (__gconv_t) -1; + int r = __gconv_open (outcharset, charset, &convd->conv, + GCONV_AVOID_NOCONV); + if (__builtin_expect (r != __GCONV_OK, 0)) + { + /* If the output encoding is the same there is + nothing to do. Otherwise do not use the + translation at all. */ + if (__builtin_expect (r != __GCONV_NOCONV, 1)) + return NULL; + + convd->conv = (__gconv_t) -1; + } # else # if HAVE_ICONV /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, @@ -999,8 +1016,9 @@ _nl_find_msg (domain_file, domainbinding convd->conv_tab = (char **) -1; if (__builtin_expect (convd->conv_tab == (char **) -1, 0)) - /* Nothing we can do, no more memory. */ - goto converted; + /* Nothing we can do, no more memory. We cannot use the + translation because it might be encoded incorrectly. */ + return (char *) -1; if (convd->conv_tab[act] == NULL) { @@ -1048,8 +1066,10 @@ _nl_find_msg (domain_file, domainbinding if (res != __GCONV_FULL_OUTPUT) { + /* We should not use the translation at all, it + is incorrectly encoded. */ __libc_lock_unlock (lock); - goto converted; + return NULL; } inbuf = (const unsigned char *) result; @@ -1075,7 +1095,7 @@ _nl_find_msg (domain_file, domainbinding if (errno != E2BIG) { __libc_lock_unlock (lock); - goto converted; + return NULL; } # endif # endif @@ -1111,7 +1131,7 @@ _nl_find_msg (domain_file, domainbinding freemem = NULL; freemem_size = 0; __libc_lock_unlock (lock); - goto converted; + return (char *) -1; } # ifdef _LIBC @@ -1150,7 +1170,6 @@ _nl_find_msg (domain_file, domainbinding } } - converted: /* The result string is converted. */ #endif /* _LIBC || HAVE_ICONV */ diff -uprN glibc-2.4/intl/explodename.c glibc-2.5/intl/explodename.c --- glibc-2.4/intl/explodename.c 2003-01-08 06:34:43.000000000 +0000 +++ glibc-2.5/intl/explodename.c 2006-04-07 06:59:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -78,7 +78,7 @@ _nl_explode_name (name, language, modifi if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ - cp = strchr (*language, '\0'); + cp = __rawmemchr (*language, '\0'); else if (cp[0] != '@') { if (cp[0] == '_') diff -uprN glibc-2.4/intl/finddomain.c glibc-2.5/intl/finddomain.c --- glibc-2.4/intl/finddomain.c 2004-09-26 04:30:40.000000000 +0000 +++ glibc-2.5/intl/finddomain.c 2006-04-07 03:27:32.000000000 +0000 @@ -1,5 +1,5 @@ /* Handle list of needed message catalogs - Copyright (C) 1995-1999, 2000, 2001, 2002, 2004 + Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper , 1995. @@ -110,7 +110,7 @@ _nl_find_domain (dirname, locale, domain break; } - return cnt >= 0 ? retval : NULL; + return retval; /* NOTREACHED */ } @@ -119,20 +119,7 @@ _nl_find_domain (dirname, locale, domain done. */ alias_value = _nl_expand_alias (locale); if (alias_value != NULL) - { -#if defined _LIBC || defined HAVE_STRDUP - locale = strdup (alias_value); - if (locale == NULL) - return NULL; -#else - size_t len = strlen (alias_value) + 1; - locale = (char *) malloc (len); - if (locale == NULL) - return NULL; - - memcpy (locale, alias_value, len); -#endif - } + locale = strdupa (alias_value); /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if @@ -169,10 +156,6 @@ _nl_find_domain (dirname, locale, domain } } - /* The room for an alias was dynamically allocated. Free it now. */ - if (alias_value != NULL) - free (locale); - /* The space for normalized_codeset is dynamically allocated. Free it. */ if (mask & XPG_NORM_CODESET) free ((void *) normalized_codeset); diff -uprN glibc-2.4/io/fts.c glibc-2.5/io/fts.c --- glibc-2.4/io/fts.c 2005-12-21 08:33:31.000000000 +0000 +++ glibc-2.5/io/fts.c 2006-04-08 19:33:17.000000000 +0000 @@ -93,7 +93,8 @@ fts_open(argv, options, compar) register FTS *sp; register FTSENT *p, *root; register int nitems; - FTSENT *parent, *tmp; + FTSENT *parent = NULL; + FTSENT *tmp; /* Options check. */ if (options & ~FTS_OPTIONMASK) { @@ -124,9 +125,11 @@ fts_open(argv, options, compar) goto mem1; /* Allocate/initialize root's parent. */ - if ((parent = fts_alloc(sp, "", 0)) == NULL) - goto mem2; - parent->fts_level = FTS_ROOTPARENTLEVEL; + if (*argv != NULL) { + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; + } /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { @@ -744,6 +747,10 @@ mem1: saved_errno = errno; p->fts_flags |= FTS_ISW; #endif +#if 0 + /* Unreachable code. cderrno is only ever set to a nonnull + value if dirp is closed at the same time. But then we + cannot enter this loop. */ if (cderrno) { if (nlinks) { p->fts_info = FTS_NS; @@ -751,7 +758,9 @@ mem1: saved_errno = errno; } else p->fts_info = FTS_NSOK; p->fts_accpath = cur->fts_accpath; - } else if (nlinks == 0 + } else +#endif + if (nlinks == 0 #if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE || (nostat && dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) @@ -819,6 +828,7 @@ mem1: saved_errno = errno; fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { cur->fts_info = FTS_ERR; SET(FTS_STOP); + fts_lfree(head); return (NULL); } @@ -826,6 +836,7 @@ mem1: saved_errno = errno; if (!nitems) { if (type == BREAD) cur->fts_info = FTS_DP; + fts_lfree(head); return (NULL); } diff -uprN glibc-2.4/io/ftw.c glibc-2.5/io/ftw.c --- glibc-2.4/io/ftw.c 2006-03-02 16:29:51.000000000 +0000 +++ glibc-2.5/io/ftw.c 2006-05-10 06:35:59.000000000 +0000 @@ -301,8 +301,7 @@ open_dir_stream (int *dfdp, struct ftw_d int save_err = errno; free (buf); __set_errno (save_err); - result = -1; - break; + return -1; } buf = newp; } @@ -526,7 +525,7 @@ fail: /* Next, update the `struct FTW' information. */ ++data->ftw.level; - startp = strchr (data->dirbuf, '\0'); + startp = __rawmemchr (data->dirbuf, '\0'); /* There always must be a directory name. */ assert (startp != data->dirbuf); if (startp[-1] != '/') diff -uprN glibc-2.4/io/Makefile glibc-2.5/io/Makefile --- glibc-2.4/io/Makefile 2006-01-20 23:23:11.000000000 +0000 +++ glibc-2.5/io/Makefile 2006-09-17 07:25:55.000000000 +0000 @@ -98,6 +98,9 @@ CFLAGS-mknod.c = -DHAVE_DOT_HIDDEN CFLAGS-stat64.c = -DHAVE_DOT_HIDDEN CFLAGS-fstat64.c = -DHAVE_DOT_HIDDEN CFLAGS-lstat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstatat.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstatat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-mknodat.c = -DHAVE_DOT_HIDDEN endif test-stat2-ARGS = Makefile . $(objpfx)test-stat2 diff -uprN glibc-2.4/io/readlinkat.c glibc-2.5/io/readlinkat.c --- glibc-2.4/io/readlinkat.c 2005-12-16 00:19:08.000000000 +0000 +++ glibc-2.5/io/readlinkat.c 2006-04-24 16:54:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ /* Read the contents of the symbolic link PATH relative to FD into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -int +ssize_t readlinkat (fd, path, buf, len) int fd; const char *path; @@ -46,5 +46,6 @@ readlinkat (fd, path, buf, len) return -1; } stub_warning (readlinkat) +libc_hidden_def (readlinkat) #include diff -uprN glibc-2.4/io/readlink.c glibc-2.5/io/readlink.c --- glibc-2.4/io/readlink.c 2005-12-14 10:06:12.000000000 +0000 +++ glibc-2.5/io/readlink.c 2006-04-01 19:11:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -int +ssize_t __readlink (path, buf, len) const char *path; char *buf; diff -uprN glibc-2.4/io/test-lfs.c glibc-2.5/io/test-lfs.c --- glibc-2.4/io/test-lfs.c 2001-07-06 04:54:53.000000000 +0000 +++ glibc-2.5/io/test-lfs.c 2006-09-12 11:18:34.000000000 +0000 @@ -50,7 +50,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; struct rlimit64 rlim; name_len = strlen (test_dir); diff -uprN glibc-2.4/io/tst-fcntl.c glibc-2.5/io/tst-fcntl.c --- glibc-2.4/io/tst-fcntl.c 2001-07-06 04:54:53.000000000 +0000 +++ glibc-2.5/io/tst-fcntl.c 2006-09-12 11:18:34.000000000 +0000 @@ -42,7 +42,7 @@ static char *name; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/fcntlXXXXXX")); diff -uprN glibc-2.4/libio/bug-memstream1.c glibc-2.5/libio/bug-memstream1.c --- glibc-2.4/libio/bug-memstream1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/libio/bug-memstream1.c 2006-08-14 22:11:34.000000000 +0000 @@ -0,0 +1,133 @@ +#include +#include + + +static int +do_test (void) +{ + size_t size; + char *buf; + FILE *fp = open_memstream (&buf, &size); + if (fp == NULL) + { + puts ("open_memstream failed"); + return 1; + } + + off64_t off = ftello64 (fp); + if (off != 0) + { + puts ("initial position wrong"); + return 1; + } + + if (fseek (fp, 32768, SEEK_SET) != 0) + { + puts ("fseek failed"); + return 1; + } + + if (fputs ("foo", fp) == EOF) + { + puts ("fputs failed"); + return 1; + } + + if (fclose (fp) == EOF) + { + puts ("fclose failed"); + return 1; + } + + if (size != 32768 + 3) + { + printf ("expected size %d, got %zu\n", 32768 + 3, size); + return 1; + } + + for (int i = 0; i < 32768; ++i) + if (buf[i] != '\0') + { + printf ("byte at offset %d is %#hhx\n", i, buf[i]); + return 1; + } + + if (memcmp (buf + 32768, "foo", 3) != 0) + { + puts ("written string incorrect"); + return 1; + } + + /* Mark the buffer. */ + memset (buf, 'A', size); + free (buf); + + /* Try again, this time with write mode enabled before the seek. */ + fp = open_memstream (&buf, &size); + if (fp == NULL) + { + puts ("2nd open_memstream failed"); + return 1; + } + + off = ftello64 (fp); + if (off != 0) + { + puts ("2nd initial position wrong"); + return 1; + } + + if (fputs ("bar", fp) == EOF) + { + puts ("2nd fputs failed"); + return 1; + } + + if (fseek (fp, 32768, SEEK_SET) != 0) + { + puts ("2nd fseek failed"); + return 1; + } + + if (fputs ("foo", fp) == EOF) + { + puts ("3rd fputs failed"); + return 1; + } + + if (fclose (fp) == EOF) + { + puts ("2nd fclose failed"); + return 1; + } + + if (size != 32768 + 3) + { + printf ("2nd expected size %d, got %zu\n", 32768 + 3, size); + return 1; + } + + if (memcmp (buf, "bar", 3) != 0) + { + puts ("initial string incorrect in 2nd try"); + return 1; + } + + for (int i = 3; i < 32768; ++i) + if (buf[i] != '\0') + { + printf ("byte at offset %d is %#hhx in 2nd try\n", i, buf[i]); + return 1; + } + + if (memcmp (buf + 32768, "foo", 3) != 0) + { + puts ("written string incorrect in 2nd try"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/libio/bug-wmemstream1.c glibc-2.5/libio/bug-wmemstream1.c --- glibc-2.4/libio/bug-wmemstream1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/libio/bug-wmemstream1.c 2006-08-14 22:11:34.000000000 +0000 @@ -0,0 +1,135 @@ +#include +#include + + +static int +do_test (void) +{ + size_t size; + wchar_t *buf; + FILE *fp = open_wmemstream (&buf, &size); + if (fp == NULL) + { + puts ("open_wmemstream failed"); + return 1; + } + + off64_t off = ftello64 (fp); + if (off != 0) + { + puts ("initial position wrong"); + return 1; + } + + if (fseek (fp, 32768, SEEK_SET) != 0) + { + puts ("fseek failed"); + return 1; + } + + if (fputws (L"foo", fp) == EOF) + { + puts ("fputws failed"); + return 1; + } + + if (fclose (fp) == EOF) + { + puts ("fclose failed"); + return 1; + } + + if (size != 32768 + 3) + { + printf ("expected size %d, got %zu\n", 32768 + 3, size); + return 1; + } + + for (int i = 0; i < 32768; ++i) + if (buf[i] != L'\0') + { + printf ("wide character at offset %d is %#x\n", + i, (unsigned int) buf[i]); + return 1; + } + + if (wmemcmp (buf + 32768, L"foo", 3) != 0) + { + puts ("written string incorrect"); + return 1; + } + + /* Mark the buffer. */ + wmemset (buf, L'A', size); + free (buf); + + /* Try again, this time with write mode enabled before the seek. */ + fp = open_wmemstream (&buf, &size); + if (fp == NULL) + { + puts ("2nd open_wmemstream failed"); + return 1; + } + + off = ftello64 (fp); + if (off != 0) + { + puts ("2nd initial position wrong"); + return 1; + } + + if (fputws (L"bar", fp) == EOF) + { + puts ("2nd fputws failed"); + return 1; + } + + if (fseek (fp, 32768, SEEK_SET) != 0) + { + puts ("2nd fseek failed"); + return 1; + } + + if (fputws (L"foo", fp) == EOF) + { + puts ("3rd fputws failed"); + return 1; + } + + if (fclose (fp) == EOF) + { + puts ("2nd fclose failed"); + return 1; + } + + if (size != 32768 + 3) + { + printf ("2nd expected size %d, got %zu\n", 32768 + 3, size); + return 1; + } + + if (wmemcmp (buf, L"bar", 3) != 0) + { + puts ("initial string incorrect in 2nd try"); + return 1; + } + + for (int i = 3; i < 32768; ++i) + if (buf[i] != L'\0') + { + printf ("wide character at offset %d is %#x in 2nd try\n", + i, (unsigned int) buf[i]); + return 1; + } + + if (wmemcmp (buf + 32768, L"foo", 3) != 0) + { + puts ("written string incorrect in 2nd try"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/libio/fmemopen.c glibc-2.5/libio/fmemopen.c --- glibc-2.4/libio/fmemopen.c 2005-09-23 16:34:35.000000000 +0000 +++ glibc-2.5/libio/fmemopen.c 2006-04-07 04:23:37.000000000 +0000 @@ -1,5 +1,5 @@ /* Fmemopen implementation. - Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hanno Mueller, kontakt@hanno.de, 2000. @@ -202,7 +202,7 @@ fmemopen (void *buf, size_t len, const c cookie_io_functions_t iof; fmemopen_cookie_t *c; - if (len == 0) + if (__builtin_expect (len == 0, 0)) { einval: __set_errno (EINVAL); @@ -227,8 +227,11 @@ fmemopen (void *buf, size_t len, const c } else { - if ((uintptr_t) len > -(uintptr_t) buf) - goto einval; + if (__builtin_expect ((uintptr_t) len > -(uintptr_t) buf, 0)) + { + free (c); + goto einval; + } c->buffer = buf; } diff -uprN glibc-2.4/libio/Makefile glibc-2.5/libio/Makefile --- glibc-2.4/libio/Makefile 2006-01-19 01:22:48.000000000 +0000 +++ glibc-2.5/libio/Makefile 2006-08-14 22:12:27.000000000 +0000 @@ -56,7 +56,8 @@ tests = tst_swprintf tst_wprintf tst_sws tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ tst-memstream1 tst-memstream2 \ - tst-wmemstream1 tst-wmemstream2 + tst-wmemstream1 tst-wmemstream2 \ + bug-memstream1 bug-wmemstream1 test-srcs = test-freopen all: # Make this the default target; it will be defined in Rules. diff -uprN glibc-2.4/libio/memstream.c glibc-2.5/libio/memstream.c --- glibc-2.4/libio/memstream.c 2006-01-12 01:57:54.000000000 +0000 +++ glibc-2.5/libio/memstream.c 2006-08-14 22:13:13.000000000 +0000 @@ -83,7 +83,7 @@ open_memstream (bufloc, sizeloc) new_f->fp._sf._sbf._f._lock = &new_f->lock; #endif - buf = malloc (_IO_BUFSIZ); + buf = calloc (1, _IO_BUFSIZ); if (buf == NULL) return NULL; INTUSE(_IO_init) (&new_f->fp._sf._sbf._f, 0); diff -uprN glibc-2.4/libio/stdio.h glibc-2.5/libio/stdio.h --- glibc-2.4/libio/stdio.h 2006-01-16 20:12:21.000000000 +0000 +++ glibc-2.5/libio/stdio.h 2006-09-27 15:55:23.000000000 +0000 @@ -291,13 +291,7 @@ extern FILE *fmemopen (void *__s, size_t /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ -extern FILE *open_memstream (char **__restrict __bufloc, - size_t *__restrict __sizeloc) __THROW; - -/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces - a wide character string. */ -extern FILE *open_wmemstream (wchar_t **__restrict __bufloc, - size_t *__restrict __sizeloc) __THROW; +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW; #endif diff -uprN glibc-2.4/libio/strops.c glibc-2.5/libio/strops.c --- glibc-2.4/libio/strops.c 2004-01-14 18:40:03.000000000 +0000 +++ glibc-2.5/libio/strops.c 2006-08-14 22:14:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997-2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,43 +25,12 @@ This exception applies to code released by its copyright holders in files containing the exception. */ +#include #include "strfile.h" #include "libioP.h" #include #include -#if 0 -/* The following definitions are for exposition only. - They map the terminology used in the ANSI/ISO C++ draft standard - to the implementation. */ - -/* allocated: set when a dynamic array object has been allocated, and - hence should be freed by the destructor for the strstreambuf object. */ -#define ALLOCATED(FP) ((FP)->_f._IO_buf_base && DYNAMIC(FP)) - -/* constant: set when the array object has const elements, - so the output sequence cannot be written. */ -#define CONSTANT(FP) ((FP)->_f._IO_file_flags & _IO_NO_WRITES) - -/* alsize: the suggested minimum size for a dynamic array object. */ -#define ALSIZE(FP) ??? /* not stored */ - -/* palloc: points to the function to call to allocate a dynamic array object.*/ -#define PALLOC(FP) \ - ((FP)->_s._allocate_buffer == default_alloc ? 0 : (FP)->_s._allocate_buffer) - -/* pfree: points to the function to call to free a dynamic array object. */ -#define PFREE(FP) \ - ((FP)->_s._free_buffer == default_free ? 0 : (FP)->_s._free_buffer) - -#endif - -#ifdef TODO -/* An "unbounded buffer" is when a buffer is supplied, but with no - specified length. An example is the buffer argument to sprintf. - */ -#endif - void _IO_str_init_static_internal (sf, ptr, size, pstart) _IO_strfile *sf; @@ -134,7 +103,7 @@ _IO_str_overflow (fp, c) fp->_IO_write_ptr = fp->_IO_read_ptr; fp->_IO_read_ptr = fp->_IO_read_end; } - pos = fp->_IO_write_ptr - fp->_IO_write_base; + pos = fp->_IO_write_ptr - fp->_IO_write_base; if (pos >= (_IO_size_t) (_IO_blen (fp) + flush_only)) { if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */ @@ -143,7 +112,10 @@ _IO_str_overflow (fp, c) { char *new_buf; char *old_buf = fp->_IO_buf_base; - _IO_size_t new_size = 2 * _IO_blen (fp) + 100; + size_t old_blen = _IO_blen (fp); + _IO_size_t new_size = 2 * old_blen + 100; + if (new_size < old_blen) + return EOF; new_buf = (char *) (*((_IO_strfile *) fp)->_s._allocate_buffer) (new_size); if (new_buf == NULL) @@ -153,15 +125,13 @@ _IO_str_overflow (fp, c) } if (old_buf) { - memcpy (new_buf, old_buf, _IO_blen (fp)); + memcpy (new_buf, old_buf, old_blen); (*((_IO_strfile *) fp)->_s._free_buffer) (old_buf); /* Make sure _IO_setb won't try to delete _IO_buf_base. */ fp->_IO_buf_base = NULL; } -#if 0 - if (lenp == &LEN(fp)) /* use '\0'-filling */ - memset (new_buf + pos, 0, blen() - pos); -#endif + memset (new_buf + old_blen, '\0', new_size - old_blen); + INTUSE(_IO_setb) (fp, new_buf, new_buf + new_size, 1); fp->_IO_read_base = new_buf + (fp->_IO_read_base - old_buf); fp->_IO_read_ptr = new_buf + (fp->_IO_read_ptr - old_buf); @@ -211,6 +181,71 @@ _IO_str_count (fp) - fp->_IO_read_base); } + +static int +enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading) +{ + if ((_IO_ssize_t) offset <= _IO_blen (fp)) + return 0; + + _IO_ssize_t oldend = fp->_IO_write_end - fp->_IO_write_base; + + /* Try to enlarge the buffer. */ + if (fp->_flags & _IO_USER_BUF) + /* User-provided buffer. */ + return 1; + + _IO_size_t newsize = offset + 100; + char *oldbuf = fp->_IO_buf_base; + char *newbuf + = (char *) (*((_IO_strfile *) fp)->_s._allocate_buffer) (newsize); + if (newbuf == NULL) + return 1; + + if (oldbuf != NULL) + { + memcpy (newbuf, oldbuf, _IO_blen (fp)); + (*((_IO_strfile *) fp)->_s._free_buffer) (oldbuf); + /* Make sure _IO_setb won't try to delete + _IO_buf_base. */ + fp->_IO_buf_base = NULL; + } + + INTUSE(_IO_setb) (fp, newbuf, newbuf + newsize, 1); + + if (reading) + { + fp->_IO_write_base = newbuf + (fp->_IO_write_base - oldbuf); + fp->_IO_write_ptr = newbuf + (fp->_IO_write_ptr - oldbuf); + fp->_IO_write_end = newbuf + (fp->_IO_write_end - oldbuf); + fp->_IO_read_ptr = newbuf + (fp->_IO_read_ptr - oldbuf); + + fp->_IO_read_base = newbuf; + fp->_IO_read_end = fp->_IO_buf_end; + } + else + { + fp->_IO_read_base = newbuf + (fp->_IO_read_base - oldbuf); + fp->_IO_read_ptr = newbuf + (fp->_IO_read_ptr - oldbuf); + fp->_IO_read_end = newbuf + (fp->_IO_read_end - oldbuf); + fp->_IO_write_ptr = newbuf + (fp->_IO_write_ptr - oldbuf); + + fp->_IO_write_base = newbuf; + fp->_IO_write_end = fp->_IO_buf_end; + } + + /* Clear the area between the last write position and th + new position. */ + assert (offset >= oldend); + if (reading) + memset (fp->_IO_read_base + oldend, '\0', offset - oldend); + else + memset (fp->_IO_write_base + oldend, '\0', offset - oldend); + + return 0; +} + + _IO_off64_t _IO_str_seekoff (fp, offset, dir, mode) _IO_FILE *fp; @@ -251,7 +286,10 @@ _IO_str_seekoff (fp, offset, dir, mode) default: /* case _IO_seek_set: */ break; } - if (offset < 0 || (_IO_ssize_t) offset > cur_size) + if (offset < 0) + return EOF; + if ((_IO_ssize_t) offset > cur_size + && enlarge_userbuf (fp, offset, 1) != 0) return EOF; fp->_IO_read_ptr = fp->_IO_read_base + offset; fp->_IO_read_end = fp->_IO_read_base + cur_size; @@ -272,7 +310,10 @@ _IO_str_seekoff (fp, offset, dir, mode) default: /* case _IO_seek_set: */ break; } - if (offset < 0 || (_IO_ssize_t) offset > cur_size) + if (offset < 0) + return EOF; + if ((_IO_ssize_t) offset > cur_size + && enlarge_userbuf (fp, offset, 0) != 0) return EOF; fp->_IO_write_ptr = fp->_IO_write_base + offset; new_pos = offset; diff -uprN glibc-2.4/libio/vasprintf.c glibc-2.5/libio/vasprintf.c --- glibc-2.4/libio/vasprintf.c 2006-01-14 12:09:46.000000000 +0000 +++ glibc-2.5/libio/vasprintf.c 2006-08-14 22:15:33.000000000 +0000 @@ -46,6 +46,8 @@ _IO_vasprintf (result_ptr, format, args) int ret; _IO_size_t needed; _IO_size_t allocated; + /* No need to clear the memory here (unlike for open_memstream) since + we know we will never seek on the stream. */ string = (char *) malloc (init_string_size); if (string == NULL) return -1; diff -uprN glibc-2.4/libio/wmemstream.c glibc-2.5/libio/wmemstream.c --- glibc-2.4/libio/wmemstream.c 2006-01-12 01:59:57.000000000 +0000 +++ glibc-2.5/libio/wmemstream.c 2006-08-14 22:13:48.000000000 +0000 @@ -83,7 +83,7 @@ open_wmemstream (bufloc, sizeloc) new_f->fp._sf._sbf._f._lock = &new_f->lock; #endif - buf = malloc (_IO_BUFSIZ); + buf = calloc (1, _IO_BUFSIZ); if (buf == NULL) return NULL; diff -uprN glibc-2.4/libio/wstrops.c glibc-2.5/libio/wstrops.c --- glibc-2.4/libio/wstrops.c 2004-01-14 18:40:03.000000000 +0000 +++ glibc-2.5/libio/wstrops.c 2006-08-14 22:14:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1997-1999,2001-2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1993,1997-1999,2001-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,44 +25,13 @@ This exception applies to code released by its copyright holders in files containing the exception. */ +#include #include "strfile.h" #include "libioP.h" #include #include #include -#if 0 -/* The following definitions are for exposition only. - They map the terminology used in the ANSI/ISO C++ draft standard - to the implementation. */ - -/* allocated: set when a dynamic array object has been allocated, and - hence should be freed by the destructor for the strstreambuf object. */ -#define ALLOCATED(FP) ((FP)->_f._IO_buf_base && DYNAMIC(FP)) - -/* constant: set when the array object has const elements, - so the output sequence cannot be written. */ -#define CONSTANT(FP) ((FP)->_f._IO_file_flags & _IO_NO_WRITES) - -/* alsize: the suggested minimum size for a dynamic array object. */ -#define ALSIZE(FP) ??? /* not stored */ - -/* palloc: points to the function to call to allocate a dynamic array object.*/ -#define PALLOC(FP) \ - ((FP)->_s._allocate_buffer == default_alloc ? 0 : (FP)->_s._allocate_buffer) - -/* pfree: points to the function to call to free a dynamic array object. */ -#define PFREE(FP) \ - ((FP)->_s._free_buffer == default_free ? 0 : (FP)->_s._free_buffer) - -#endif - -#ifdef TODO -/* An "unbounded buffer" is when a buffer is supplied, but with no - specified length. An example is the buffer argument to sprintf. - */ -#endif - void _IO_wstr_init_static (fp, ptr, size, pstart) _IO_FILE *fp; @@ -98,7 +67,7 @@ _IO_wstr_init_static (fp, ptr, size, pst fp->_wide_data->_IO_read_end = end; } /* A null _allocate_buffer function flags the strfile as being static. */ - (((_IO_strfile *) fp)->_s._allocate_buffer) = (_IO_alloc_type)0; + (((_IO_strfile *) fp)->_s._allocate_buffer) = (_IO_alloc_type)0; } _IO_wint_t @@ -116,7 +85,7 @@ _IO_wstr_overflow (fp, c) fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_read_ptr; fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end; } - pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base; + pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base; if (pos >= (_IO_size_t) (_IO_wblen (fp) + flush_only)) { if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */ @@ -125,7 +94,10 @@ _IO_wstr_overflow (fp, c) { wchar_t *new_buf; wchar_t *old_buf = fp->_wide_data->_IO_buf_base; - _IO_size_t new_size = 2 * _IO_wblen (fp) + 100; + size_t old_wblen = _IO_wblen (fp); + _IO_size_t new_size = 2 * old_wblen + 100; + if (new_size < old_wblen) + return EOF; new_buf = (wchar_t *) (*((_IO_strfile *) fp)->_s._allocate_buffer) (new_size * sizeof (wchar_t)); @@ -136,11 +108,14 @@ _IO_wstr_overflow (fp, c) } if (old_buf) { - __wmemcpy (new_buf, old_buf, _IO_wblen (fp)); + __wmemcpy (new_buf, old_buf, old_wblen); (*((_IO_strfile *) fp)->_s._free_buffer) (old_buf); /* Make sure _IO_setb won't try to delete _IO_buf_base. */ fp->_wide_data->_IO_buf_base = NULL; } + + wmemset (new_buf + old_wblen, L'\0', new_size - old_wblen); + INTUSE(_IO_wsetb) (fp, new_buf, new_buf + new_size, 1); fp->_wide_data->_IO_read_base = new_buf + (fp->_wide_data->_IO_read_base - old_buf); @@ -163,6 +138,7 @@ _IO_wstr_overflow (fp, c) return c; } + _IO_wint_t _IO_wstr_underflow (fp) _IO_FILE *fp; @@ -181,17 +157,87 @@ _IO_wstr_underflow (fp) return WEOF; } -/* The size of the valid part of the buffer. */ +/* The size of the valid part of the buffer. */ _IO_ssize_t _IO_wstr_count (fp) _IO_FILE *fp; { - return ((fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_read_end - ? fp->_wide_data->_IO_write_ptr : fp->_wide_data->_IO_read_end) - - fp->_wide_data->_IO_read_base); + struct _IO_wide_data *wd = fp->_wide_data; + + return ((wd->_IO_write_ptr > wd->_IO_read_end + ? wd->_IO_write_ptr : wd->_IO_read_end) + - wd->_IO_read_base); } + +static int +enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading) +{ + if ((_IO_ssize_t) offset <= _IO_blen (fp)) + return 0; + + struct _IO_wide_data *wd = fp->_wide_data; + + _IO_ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base; + + /* Try to enlarge the buffer. */ + if (fp->_flags & _IO_USER_BUF) + /* User-provided buffer. */ + return 1; + + _IO_size_t newsize = offset + 100; + wchar_t *oldbuf = wd->_IO_buf_base; + wchar_t *newbuf + = (wchar_t *) (*((_IO_strfile *) fp)->_s._allocate_buffer) (newsize + * sizeof (wchar_t)); + if (newbuf == NULL) + return 1; + + if (oldbuf != NULL) + { + __wmemcpy (newbuf, oldbuf, _IO_wblen (fp)); + (*((_IO_strfile *) fp)->_s._free_buffer) (oldbuf); + /* Make sure _IO_setb won't try to delete + _IO_buf_base. */ + wd->_IO_buf_base = NULL; + } + + INTUSE(_IO_wsetb) (fp, newbuf, newbuf + newsize, 1); + + if (reading) + { + wd->_IO_write_base = newbuf + (wd->_IO_write_base - oldbuf); + wd->_IO_write_ptr = newbuf + (wd->_IO_write_ptr - oldbuf); + wd->_IO_write_end = newbuf + (wd->_IO_write_end - oldbuf); + wd->_IO_read_ptr = newbuf + (wd->_IO_read_ptr - oldbuf); + + wd->_IO_read_base = newbuf; + wd->_IO_read_end = wd->_IO_buf_end; + } + else + { + wd->_IO_read_base = newbuf + (wd->_IO_read_base - oldbuf); + wd->_IO_read_ptr = newbuf + (wd->_IO_read_ptr - oldbuf); + wd->_IO_read_end = newbuf + (wd->_IO_read_end - oldbuf); + wd->_IO_write_ptr = newbuf + (wd->_IO_write_ptr - oldbuf); + + wd->_IO_write_base = newbuf; + wd->_IO_write_end = wd->_IO_buf_end; + } + + /* Clear the area between the last write position and th + new position. */ + assert (offset >= oldend); + if (reading) + wmemset (wd->_IO_read_base + oldend, L'\0', offset - oldend); + else + wmemset (wd->_IO_write_base + oldend, L'\0', offset - oldend); + + return 0; +} + + _IO_off64_t _IO_wstr_seekoff (fp, offset, dir, mode) _IO_FILE *fp; @@ -234,7 +280,10 @@ _IO_wstr_seekoff (fp, offset, dir, mode) default: /* case _IO_seek_set: */ break; } - if (offset < 0 || (_IO_ssize_t) offset > cur_size) + if (offset < 0) + return EOF; + if ((_IO_ssize_t) offset > cur_size + && enlarge_userbuf (fp, offset, 1) != 0) return EOF; fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base + offset); @@ -258,7 +307,10 @@ _IO_wstr_seekoff (fp, offset, dir, mode) default: /* case _IO_seek_set: */ break; } - if (offset < 0 || (_IO_ssize_t) offset > cur_size) + if (offset < 0) + return EOF; + if ((_IO_ssize_t) offset > cur_size + && enlarge_userbuf (fp, offset, 0) != 0) return EOF; fp->_wide_data->_IO_write_ptr = (fp->_wide_data->_IO_write_base + offset); diff -uprN glibc-2.4/locale/findlocale.c glibc-2.5/locale/findlocale.c --- glibc-2.4/locale/findlocale.c 2003-06-11 21:49:52.000000000 +0000 +++ glibc-2.5/locale/findlocale.c 2006-05-15 18:31:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -80,7 +80,8 @@ _nl_find_locale (const char *locale_path variables. */ *name = getenv ("LC_ALL"); if (*name == NULL || (*name)[0] == '\0') - *name = getenv (_nl_category_names[category]); + *name = getenv (_nl_category_names.str + + _nl_category_name_idxs[category]); if (*name == NULL || (*name)[0] == '\0') *name = getenv ("LANG"); } @@ -145,7 +146,8 @@ _nl_find_locale (const char *locale_path locale_path, locale_path_len, mask, language, territory, codeset, normalized_codeset, modifier, - _nl_category_names[category], 0); + _nl_category_names.str + + _nl_category_name_idxs[category], 0); if (locale_file == NULL) { @@ -155,7 +157,8 @@ _nl_find_locale (const char *locale_path locale_path, locale_path_len, mask, language, territory, codeset, normalized_codeset, modifier, - _nl_category_names[category], 1); + _nl_category_names.str + + _nl_category_name_idxs[category], 1); if (locale_file == NULL) /* This means we are out of core. */ return NULL; diff -uprN glibc-2.4/locale/iso-3166.def glibc-2.5/locale/iso-3166.def --- glibc-2.4/locale/iso-3166.def 2004-08-10 05:10:38.000000000 +0000 +++ glibc-2.5/locale/iso-3166.def 2006-09-29 18:07:50.000000000 +0000 @@ -6,6 +6,7 @@ * http://www.gnu.org/software/libc/bugs.html and follow * instructions there to file a bug report. */ +DEFINE_COUNTRY_CODE ("AALAND ISLANDS", AX, ALA, 248) DEFINE_COUNTRY_CODE ("AFGHANISTAN", AF, AFG, 4) DEFINE_COUNTRY_CODE ("ALBANIA", AL, ALB, 8) DEFINE_COUNTRY_CODE ("ALGERIA", DZ, DZA, 12) @@ -149,6 +150,7 @@ DEFINE_COUNTRY_CODE ("MICRONESIA, FEDERA DEFINE_COUNTRY_CODE ("MOLDOVA, REPUBLIC OF", MD, MDA, 498) DEFINE_COUNTRY_CODE ("MONACO", MC, MCO, 492) DEFINE_COUNTRY_CODE ("MONGOLIA", MN, MNG, 496) +DEFINE_COUNTRY_CODE ("MONTENEGRO", ME, MNE, 499) DEFINE_COUNTRY_CODE ("MONTSERRAT", MS, MSR, 500) DEFINE_COUNTRY_CODE ("MOROCCO", MA, MAR, 504) DEFINE_COUNTRY_CODE ("MOZAMBIQUE", MZ, MOZ, 508) diff -uprN glibc-2.4/locale/iso-4217.def glibc-2.5/locale/iso-4217.def --- glibc-2.4/locale/iso-4217.def 2005-09-23 19:07:54.000000000 +0000 +++ glibc-2.5/locale/iso-4217.def 2006-04-26 07:14:53.000000000 +0000 @@ -9,7 +9,7 @@ * !!! The list has to be sorted !!! */ DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */ -DEFINE_INT_CURR("AFA") /* Afghanistan Afgani */ +DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */ DEFINE_INT_CURR("ALL") /* Albanian Lek */ DEFINE_INT_CURR("AMD") /* Armenia Dram */ DEFINE_INT_CURR("ANG") /* Netherlands Antilles */ @@ -18,10 +18,10 @@ DEFINE_INT_CURR("ARS") /* Argentine Pes DEFINE_INT_CURR("AUD") /* Australian Dollar */ DEFINE_INT_CURR("AWG") /* Aruba Guilder */ DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */ -DEFINE_INT_CURR("BAK") /* Bosnian and Herzegovina Convertible Mark */ +DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */ DEFINE_INT_CURR("BBD") /* Barbados Dollar */ DEFINE_INT_CURR("BDT") /* Bangladesh Taka */ -DEFINE_INT_CURR("BGL") /* Bulgarian Lev */ +DEFINE_INT_CURR("BGN") /* Bulgarian Lev */ DEFINE_INT_CURR("BHD") /* Bahraini Dinar */ DEFINE_INT_CURR("BIF") /* Burundi Franc */ DEFINE_INT_CURR("BMD") /* Burmudian Dollar */ @@ -76,6 +76,7 @@ DEFINE_INT_CURR("INR") /* Indian Rupee DEFINE_INT_CURR("IQD") /* Iraqi Dinar */ DEFINE_INT_CURR("IRR") /* Iranian Rial */ DEFINE_INT_CURR("ISK") /* Iceland Krona */ +DEFINE_INT_CURR("JEP") /* Jersey Pound */ DEFINE_INT_CURR("JMD") /* Jamaican Dollar */ DEFINE_INT_CURR("JOD") /* Jordanian Dinar */ DEFINE_INT_CURR("JPY") /* Japanese Yen */ @@ -108,7 +109,7 @@ DEFINE_INT_CURR("MTL") /* Maltese Lira DEFINE_INT_CURR("MUR") /* Mauritius Rupee */ DEFINE_INT_CURR("MVR") /* Maldives Rupee */ DEFINE_INT_CURR("MWK") /* Malawi Kwacha */ -DEFINE_INT_CURR("MXP") /* Mexican Peso */ +DEFINE_INT_CURR("MXN") /* Mexican Peso */ DEFINE_INT_CURR("MYR") /* Malaysian Ringgit */ DEFINE_INT_CURR("MZM") /* Mozambique Metical */ DEFINE_INT_CURR("NAD") /* Namibia Dollar */ @@ -127,7 +128,8 @@ DEFINE_INT_CURR("PLN") /* Polish Zloty DEFINE_INT_CURR("PYG") /* Paraguay Guarani */ DEFINE_INT_CURR("QAR") /* Qatar Rial */ DEFINE_INT_CURR("ROL") /* Romanian Leu */ -DEFINE_INT_CURR("RUR") /* Russian Ruble */ +DEFINE_INT_CURR("RON") /* Romanian New Leu */ +DEFINE_INT_CURR("RUB") /* Russian Ruble */ DEFINE_INT_CURR("RWF") /* Rwanda Franc */ DEFINE_INT_CURR("SAR") /* Saudi Arabia Riyal */ DEFINE_INT_CURR("SBD") /* Solomon Islands Dollar */ @@ -147,7 +149,7 @@ DEFINE_INT_CURR("SVC") /* El Salvador C DEFINE_INT_CURR("SYP") /* Syrian Arab Republic Pound */ DEFINE_INT_CURR("SZL") /* Swaziland Lilangeni */ DEFINE_INT_CURR("THB") /* Thai Baht */ -DEFINE_INT_CURR("TJR") /* Tajikistani Ruble */ +DEFINE_INT_CURR("TJS") /* Tajikistani Somoni */ DEFINE_INT_CURR("TMM") /* Turkmenistan Manet */ DEFINE_INT_CURR("TND") /* Tunisian Dinar */ DEFINE_INT_CURR("TOP") /* Tonga Pa'Anga */ @@ -171,7 +173,6 @@ DEFINE_INT_CURR("XDR") /* International DEFINE_INT_CURR("XOF") /* West African Franc (Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta) */ DEFINE_INT_CURR("XPF") /* French polynesia, New Caledonia, Wallis and Futuna Islands */ DEFINE_INT_CURR("YER") /* Yemeni Rial */ -DEFINE_INT_CURR("YUM") /* Yugoslavian New Dinar */ DEFINE_INT_CURR("ZAR") /* South Africa Rand (Lesotho, Namibia) */ DEFINE_INT_CURR("ZMK") /* Zambian Kwacha */ DEFINE_INT_CURR("ZWD") /* Zimbabwe Dollar */ diff -uprN glibc-2.4/locale/loadlocale.c glibc-2.5/locale/loadlocale.c --- glibc-2.4/locale/loadlocale.c 2005-12-20 16:33:42.000000000 +0000 +++ glibc-2.5/locale/loadlocale.c 2006-05-15 18:31:52.000000000 +0000 @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -198,7 +198,7 @@ _nl_load_locale (struct loaded_l10nfile + 5 + _nl_category_name_sizes[category] + 1); __mempcpy (__mempcpy (__mempcpy (newp, file->filename, filenamelen), "/SYS_", 5), - _nl_category_names[category], + _nl_category_names.str + _nl_category_name_idxs[category], _nl_category_name_sizes[category] + 1); fd = open_not_cancel_2 (newp, O_RDONLY); diff -uprN glibc-2.4/locale/localeinfo.h glibc-2.5/locale/localeinfo.h --- glibc-2.4/locale/localeinfo.h 2005-10-14 22:41:05.000000000 +0000 +++ glibc-2.5/locale/localeinfo.h 2006-05-15 18:30:35.000000000 +0000 @@ -1,5 +1,5 @@ /* Declarations for internal libc locale interfaces - Copyright (C) 1995-2001, 2002, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -172,8 +172,22 @@ enum #define _ISCTYPE(c, desc) \ (((((const uint32_t *) (desc)) - 8)[(c) >> 5] >> ((c) & 0x1f)) & 1) -extern const char *const _nl_category_names[__LC_LAST] attribute_hidden; -extern const size_t _nl_category_name_sizes[__LC_LAST] attribute_hidden; +/* Category name handling variables. */ +#define CATNAMEMF(line) CATNAMEMF1 (line) +#define CATNAMEMF1(line) str##line +extern const union catnamestr_t +{ + struct + { +#define DEFINE_CATEGORY(category, category_name, items, a) \ + char CATNAMEMF (__LINE__)[sizeof (category_name)]; +#include "categories.def" +#undef DEFINE_CATEGORY + }; + char str[0]; +} _nl_category_names attribute_hidden; +const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden; +extern const uint8_t _nl_category_name_sizes[__LC_LAST] attribute_hidden; /* Name of the standard locales. */ extern const char _nl_C_name[] attribute_hidden; diff -uprN glibc-2.4/locale/newlocale.c glibc-2.5/locale/newlocale.c --- glibc-2.4/locale/newlocale.c 2005-12-21 07:27:27.000000000 +0000 +++ glibc-2.5/locale/newlocale.c 2006-05-15 18:31:52.000000000 +0000 @@ -1,5 +1,5 @@ /* Return a reference to locale information record. - Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005 + Copyright (C) 1996, 1997, 1999, 2000-2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -133,7 +133,8 @@ __newlocale (int category_mask, const ch for (cnt = 0; cnt < __LC_LAST; ++cnt) if (cnt != LC_ALL && (size_t) (cp - np) == _nl_category_name_sizes[cnt] - && memcmp (np, _nl_category_names[cnt], cp - np) == 0) + && memcmp (np, (_nl_category_names.str + + _nl_category_name_idxs[cnt]), cp - np) == 0) break; if (cnt == __LC_LAST) diff -uprN glibc-2.4/locale/programs/charmap.c glibc-2.5/locale/programs/charmap.c --- glibc-2.4/locale/programs/charmap.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/charmap.c 2006-08-19 17:50:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1998-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998-2004,2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -86,7 +86,8 @@ cmlr_open (const char *directory, const } struct charmap_t * -charmap_read (const char *filename, int verbose, int be_quiet, int use_default) +charmap_read (const char *filename, int verbose, int error_not_found, + int be_quiet, int use_default) { struct charmap_t *result = NULL; @@ -130,13 +131,11 @@ charmap_read (const char *filename, int } if (cmfile != NULL) - { - result = parse_charmap (cmfile, verbose, be_quiet); + result = parse_charmap (cmfile, verbose, be_quiet); - if (result == NULL && !be_quiet) - WITH_CUR_LOCALE (error (0, errno, _("\ + if (result == NULL && error_not_found) + WITH_CUR_LOCALE (error (0, errno, _("\ character map file `%s' not found"), filename)); - } } if (result == NULL && filename != NULL && strchr (filename, '/') == NULL) diff -uprN glibc-2.4/locale/programs/charmap.h glibc-2.5/locale/programs/charmap.h --- glibc-2.4/locale/programs/charmap.h 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/charmap.h 2006-08-19 17:53:09.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -69,7 +69,8 @@ extern bool enc_not_ascii_compatible; /* Prototypes for charmap handling functions. */ extern struct charmap_t *charmap_read (const char *filename, int verbose, - int be_quiet, int use_default); + int error_not_found, int be_quiet, + int use_default); /* Return the value stored under the given key in the hashing table. */ extern struct charseq *charmap_find_value (const struct charmap_t *charmap, diff -uprN glibc-2.4/locale/programs/ld-address.c glibc-2.5/locale/programs/ld-address.c --- glibc-2.4/locale/programs/ld-address.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/ld-address.c 2006-05-05 13:35:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -222,18 +222,23 @@ No definition for %s category found"), " if (address->lang_ab == NULL) { - if (iso639[cnt].ab[0] != '\0' && verbose && ! nothing) + if ((cnt == sizeof (iso639) / sizeof (iso639[0]) + || iso639[cnt].ab[0] != '\0') + && verbose && ! nothing) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", "lang_ab")); address->lang_ab = ""; } else if (address->lang_ab[0] == '\0') { - if (iso639[cnt].ab[0] != '\0' && verbose) + if ((cnt == sizeof (iso639) / sizeof (iso639[0]) + || iso639[cnt].ab[0] != '\0') + && verbose) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), "LC_ADDRESS", "lang_ab")); } - else if (iso639[cnt].ab[0] == '\0') + else if (cnt < sizeof (iso639) / sizeof (iso639[0]) + && iso639[cnt].ab[0] == '\0') { WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be defined"), "LC_ADDRESS", "lang_ab")); diff -uprN glibc-2.4/locale/programs/ld-collate.c glibc-2.5/locale/programs/ld-collate.c --- glibc-2.4/locale/programs/ld-collate.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/ld-collate.c 2006-09-21 03:57:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -1295,7 +1295,7 @@ order for `%.*s' already defined at %s:% { invalid_range: lr_error (ldfile, _("\ -`%s' and `%.*s' are no valid names for symbolic range"), +`%s' and `%.*s' are not valid names for symbolic range"), startp->name, (int) lento, endp->name); return; } @@ -2671,6 +2671,9 @@ collate_read (struct linereader *ldfile, if (locfile_read (copy_locale, charmap) != 0) goto skip_category; } + + if (copy_locale->categories[LC_COLLATE].collate == NULL) + return; } lr_ignore_rest (ldfile, 1); @@ -3065,7 +3068,7 @@ collate_read (struct linereader *ldfile, lr_error (ldfile, _("\ %s: unknown symbol `%s' in equivalent definition"), "LC_COLLATE", symname); - goto col_sym_free; + goto sym_equiv_free; } if (insert_entry (&collate->sym_table, @@ -3530,13 +3533,13 @@ error while adding equivalent collating break; } + struct element_t *seqp; if (state == 0) { /* We are outside an `order_start' region. This means we must only accept definitions of values for collation symbols since these are purely abstract values and don't need directions associated. */ - struct element_t *seqp; void *ptr; if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0) @@ -3583,7 +3586,6 @@ error while adding equivalent collating { /* It is possible that we already have this collation sequence. In this case we move the entry. */ - struct element_t *seqp = NULL; void *sym; void *ptr; diff -uprN glibc-2.4/locale/programs/ld-ctype.c glibc-2.5/locale/programs/ld-ctype.c --- glibc-2.4/locale/programs/ld-ctype.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/ld-ctype.c 2006-09-21 03:57:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -992,8 +992,8 @@ ctype_output (struct localedef_t *locale total += iov[2 + elem + offset].iov_len; } iov[2 + elem + offset].iov_base = (void *) nulbytes; - iov[2 + elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); - total += 1 + (4 - ((total + 1) % 4)); + iov[2 + elem + offset].iov_len = 4 - (total % 4); + total += 4 - (total % 4); idx[elem + 1] = idx[elem] + total; break; @@ -1010,8 +1010,8 @@ ctype_output (struct localedef_t *locale total += iov[2 + elem + offset].iov_len; } iov[2 + elem + offset].iov_base = (void *) nulbytes; - iov[2 + elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); - total += 1 + (4 - ((total + 1) % 4)); + iov[2 + elem + offset].iov_len = 4 - (total % 4); + total += 4 - (total % 4); idx[elem + 1] = idx[elem] + total; break; @@ -1153,7 +1153,7 @@ ctype_output (struct localedef_t *locale iov[2 + elem + offset].iov_base = ctype->default_missing ?: (uint32_t *) L""; iov[2 + elem + offset].iov_len = - wcslen (iov[2 + elem + offset].iov_base); + wcslen (iov[2 + elem + offset].iov_base) * sizeof (uint32_t); idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; break; @@ -1472,7 +1472,7 @@ charclass_symbolic_ellipsis (struct line { invalid_range: lr_error (ldfile, - _("`%s' and `%.*s' are no valid names for symbolic range"), + _("`%s' and `%.*s' are not valid names for symbolic range"), last_str, (int) now->val.str.lenmb, nowstr); return; } @@ -2245,6 +2245,9 @@ ctype_read (struct linereader *ldfile, s if (locfile_read (copy_locale, charmap) != 0) goto skip_category; } + + if (copy_locale->categories[LC_CTYPE].ctype == NULL) + return; } lr_ignore_rest (ldfile, 1); @@ -3766,7 +3769,7 @@ translit_flatten (struct locale_ctype_t other = find_locale (LC_CTYPE, copy_locale, copy_repertoire, charmap); - if (other == NULL) + if (other == NULL || other->categories[LC_CTYPE].ctype == NULL) { WITH_CUR_LOCALE (error (0, 0, _("\ %s: transliteration data from locale `%s' not available"), @@ -3844,9 +3847,14 @@ allocate_arrays (struct locale_ctype_t * { ctype->class_b[nr] = (uint32_t *) xcalloc (256 / 32, sizeof (uint32_t)); - for (idx = 0; idx < 256; ++idx) - if (ctype->class256_collection[idx] & _ISbit (nr)) - ctype->class_b[nr][idx >> 5] |= (uint32_t)1 << (idx & 0x1f); + /* We only set CLASS_B for the bits in the ISO C classes, not + the user defined classes. The number should not change but + who knows. */ +#define LAST_ISO_C_BIT 11 + if (nr <= LAST_ISO_C_BIT) + for (idx = 0; idx < 256; ++idx) + if (ctype->class256_collection[idx] & _ISbit (nr)) + ctype->class_b[nr][idx >> 5] |= (uint32_t) 1 << (idx & 0x1f); } for (nr = 0; nr < ctype->nr_charclass; nr++) diff -uprN glibc-2.4/locale/programs/ld-numeric.c glibc-2.5/locale/programs/ld-numeric.c --- glibc-2.4/locale/programs/ld-numeric.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/ld-numeric.c 2006-04-07 18:30:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -302,7 +302,7 @@ numeric_read (struct linereader *ldfile, { size_t act = 0; size_t max = 10; - char *grouping = ignore_content ? NULL : xmalloc (max); + char *grouping = xmalloc (max); do { @@ -321,24 +321,20 @@ numeric_read (struct linereader *ldfile, } if (now->tok == tok_minus1) - { - if (!ignore_content) - grouping[act++] = '\177'; - } + grouping[act++] = '\177'; else if (now->val.num == 0) { /* A value of 0 disables grouping from here on but we must not store a NUL character since this terminates the string. Use something different which must not be used otherwise. */ - if (!ignore_content) - grouping[act++] = '\377'; + grouping[act++] = '\377'; } else if (now->val.num > 126) lr_error (ldfile, _("\ %s: values for field `%s' must be smaller than 127"), "LC_NUMERIC", "grouping"); - else if (!ignore_content) + else grouping[act++] = now->val.num; /* Next must be semicolon. */ @@ -353,13 +349,10 @@ numeric_read (struct linereader *ldfile, if (now->tok != tok_eol) goto err_label; - if (!ignore_content) - { - grouping[act++] = '\0'; + grouping[act++] = '\0'; - numeric->grouping = xrealloc (grouping, act); - numeric->grouping_len = act; - } + numeric->grouping = xrealloc (grouping, act); + numeric->grouping_len = act; } break; diff -uprN glibc-2.4/locale/programs/ld-time.c glibc-2.5/locale/programs/ld-time.c --- glibc-2.4/locale/programs/ld-time.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/ld-time.c 2006-08-12 20:18:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -467,10 +467,22 @@ No definition for %s category found"), " wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */ wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */ - time->era_entries[idx].wname = (uint32_t *) wstr + 1; - wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end name */ - *wstr = L'\0'; - time->era_entries[idx].wformat = (uint32_t *) wstr + 1; + if (wstr != NULL) + { + time->era_entries[idx].wname = (uint32_t *) wstr + 1; + wstr = wcschr (wstr + 1, L':'); /* end name */ + if (wstr != NULL) + { + *wstr = L'\0'; + time->era_entries[idx].wformat = (uint32_t *) wstr + 1; + } + else + time->era_entries[idx].wname = + time->era_entries[idx].wformat = (uint32_t *) L""; + } + else + time->era_entries[idx].wname = + time->era_entries[idx].wformat = (uint32_t *) L""; } } @@ -530,7 +542,7 @@ time_output (struct localedef_t *locale, * (2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 2 + time->num_era * 10 - 1)); + + 2 + time->num_era * 10)); struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)]; size_t cnt, last_idx, num, n; @@ -889,6 +901,12 @@ time_output (struct localedef_t *locale, ++cnt; ++last_idx; + /* We must align the following data. */ + iov[2 + cnt].iov_base = (void *) "\0\0"; + iov[2 + cnt].iov_len = -idx[last_idx] & 3; + idx[last_idx] += -idx[last_idx] & 3; + ++cnt; + iov[2 + cnt].iov_base = (void *) time->wdate_fmt; iov[2 + cnt].iov_len = ((wcslen (iov[2 + cnt].iov_base) + 1) * sizeof (uint32_t)); @@ -904,7 +922,7 @@ time_output (struct localedef_t *locale, assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 2 + time->num_era * 10 - 1)); + + 2 + time->num_era * 10)); assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME)); write_locale_data (output_path, LC_TIME, "LC_TIME", 2 + cnt, iov); diff -uprN glibc-2.4/locale/programs/linereader.c glibc-2.5/locale/programs/linereader.c --- glibc-2.4/locale/programs/linereader.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/linereader.c 2006-04-07 18:33:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001,2002,2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -214,12 +214,6 @@ lr_token (struct linereader *lr, const s } while (isspace (ch)); - if (ch == EOF) - { - lr->token.tok = tok_eof; - return &lr->token; - }; - if (ch != lr->comment_char) break; diff -uprN glibc-2.4/locale/programs/localedef.c glibc-2.5/locale/programs/localedef.c --- glibc-2.4/locale/programs/localedef.c 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/locale/programs/localedef.c 2006-09-21 03:57:30.000000000 +0000 @@ -243,7 +243,7 @@ main (int argc, char *argv[]) FATAL: system does not define `_POSIX2_LOCALEDEF'"))); /* Process charmap file. */ - charmap = charmap_read (charmap_file, verbose, be_quiet, 1); + charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); /* Add the first entry in the locale list. */ memset (&global, '\0', sizeof (struct localedef_t)); @@ -288,7 +288,7 @@ cannot write output files to `%s'"), out } else WITH_CUR_LOCALE (error (4, 0, _("\ -no output file produced because warning were issued"))); +no output file produced because warnings were issued"))); /* This exit status is prescribed by POSIX.2 4.35.7. */ exit (error_message_count != 0); @@ -530,7 +530,7 @@ normalize_codeset (codeset, name_len) struct localedef_t * -add_to_readlist (int locale, const char *name, const char *repertoire_name, +add_to_readlist (int category, const char *name, const char *repertoire_name, int generate, struct localedef_t *copy_locale) { struct localedef_t *runp = locales; @@ -561,39 +561,39 @@ add_to_readlist (int locale, const char } if (generate - && (runp->needed & (1 << locale)) != 0 - && (runp->avail & (1 << locale)) == 0) + && (runp->needed & (1 << category)) != 0 + && (runp->avail & (1 << category)) == 0) WITH_CUR_LOCALE (error (5, 0, _("\ circular dependencies between locale definitions"))); if (copy_locale != NULL) { - if (runp->categories[locale].generic != NULL) + if (runp->categories[category].generic != NULL) WITH_CUR_LOCALE (error (5, 0, _("\ cannot add already read locale `%s' a second time"), name)); else - runp->categories[locale].generic = - copy_locale->categories[locale].generic; + runp->categories[category].generic = + copy_locale->categories[category].generic; } - runp->needed |= 1 << locale; + runp->needed |= 1 << category; return runp; } struct localedef_t * -find_locale (int locale, const char *name, const char *repertoire_name, +find_locale (int category, const char *name, const char *repertoire_name, const struct charmap_t *charmap) { struct localedef_t *result; /* Find the locale, but do not generate it since this would be a bug. */ - result = add_to_readlist (locale, name, repertoire_name, 0, NULL); + result = add_to_readlist (category, name, repertoire_name, 0, NULL); assert (result != NULL); - if ((result->avail & (1 << locale)) == 0 + if ((result->avail & (1 << category)) == 0 && locfile_read (result, charmap) != 0) WITH_CUR_LOCALE (error (4, errno, _("\ cannot open locale definition file `%s'"), result->name)); @@ -603,17 +603,17 @@ cannot open locale definition file `%s'" struct localedef_t * -load_locale (int locale, const char *name, const char *repertoire_name, +load_locale (int category, const char *name, const char *repertoire_name, const struct charmap_t *charmap, struct localedef_t *copy_locale) { struct localedef_t *result; /* Generate the locale if it does not exist. */ - result = add_to_readlist (locale, name, repertoire_name, 1, copy_locale); + result = add_to_readlist (category, name, repertoire_name, 1, copy_locale); assert (result != NULL); - if ((result->avail & (1 << locale)) == 0 + if ((result->avail & (1 << category)) == 0 && locfile_read (result, charmap) != 0) WITH_CUR_LOCALE (error (4, errno, _("\ cannot open locale definition file `%s'"), result->name)); diff -uprN glibc-2.4/locale/programs/locfile.c glibc-2.5/locale/programs/locfile.c --- glibc-2.4/locale/programs/locfile.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/locfile.c 2006-05-10 02:12:39.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -155,10 +155,11 @@ argument to `%s' must be a single charac if (repertoire_name == NULL) { - repertoire_name = memcpy (xmalloc (arg->val.str.lenmb + 1), - arg->val.str.startmb, - arg->val.str.lenmb); - ((char *) repertoire_name)[arg->val.str.lenmb] = '\0'; + char *newp = alloca (arg->val.str.lenmb + 1); + + *((char *) mempcpy (newp, arg->val.str.startmb, + arg->val.str.lenmb)) = '\0'; + repertoire_name = newp; } break; diff -uprN glibc-2.4/locale/programs/repertoire.c glibc-2.5/locale/programs/repertoire.c --- glibc-2.4/locale/programs/repertoire.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/locale/programs/repertoire.c 2006-09-21 03:57:30.000000000 +0000 @@ -328,7 +328,7 @@ argument to <%s> must be a single charac if (tsearch (result, &known, &repertoire_compare) == NULL) /* Something went wrong. */ - WITH_CUR_LOCALE (error (0, errno, _("cannot safe new repertoire map"))); + WITH_CUR_LOCALE (error (0, errno, _("cannot save new repertoire map"))); return result; } diff -uprN glibc-2.4/locale/setlocale.c glibc-2.5/locale/setlocale.c --- glibc-2.4/locale/setlocale.c 2005-03-23 03:01:50.000000000 +0000 +++ glibc-2.5/locale/setlocale.c 2006-05-15 18:29:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004 +/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -66,18 +66,27 @@ static char *const _nl_current_used[] = #endif -/* Define an array of category names (also the environment variable names), - indexed by integral category. */ -const char *const _nl_category_names[] = +/* Define an array of category names (also the environment variable names). */ +const union catnamestr_t _nl_category_names attribute_hidden = { + { #define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = category_name, + category_name, #include "categories.def" -#undef DEFINE_CATEGORY - [LC_ALL] = "LC_ALL" +#undef DEFINE_CATEGORY + } }; + +const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden = + { +#define DEFINE_CATEGORY(category, category_name, items, a) \ + [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)), +#include "categories.def" +#undef DEFINE_CATEGORY + }; + /* An array of their lengths, for convenience. */ -const size_t _nl_category_name_sizes[] = +const uint8_t _nl_category_name_sizes[] attribute_hidden = { #define DEFINE_CATEGORY(category, category_name, items, a) \ [category] = sizeof (category_name) - 1, @@ -173,7 +182,7 @@ new_composite_name (int category, const const char *name = (category == LC_ALL ? newnames[i] : category == i ? newnames[0] : _nl_global_locale.__names[i]); - p = __stpcpy (p, _nl_category_names[i]); + p = __stpcpy (p, _nl_category_names.str + _nl_category_name_idxs[i]); *p++ = '='; p = __stpcpy (p, name); *p++ = ';'; @@ -275,7 +284,9 @@ setlocale (int category, const char *loc for (cnt = 0; cnt < __LC_LAST; ++cnt) if (cnt != LC_ALL && (size_t) (cp - np) == _nl_category_name_sizes[cnt] - && memcmp (np, _nl_category_names[cnt], cp - np) == 0) + && (memcmp (np, (_nl_category_names.str + + _nl_category_name_idxs[cnt]), cp - np) + == 0)) break; if (cnt == __LC_LAST) diff -uprN glibc-2.4/localedata/ChangeLog glibc-2.5/localedata/ChangeLog --- glibc-2.4/localedata/ChangeLog 2006-01-04 17:09:13.000000000 +0000 +++ glibc-2.5/localedata/ChangeLog 2006-09-29 18:30:52.000000000 +0000 @@ -1,3 +1,391 @@ +2006-09-29 Ulrich Drepper + + [BZ #39] + * locales/sr_ME: New file. + * SUPPORTED (SUPPORTED-LOCALES): Add sr_ME. + +2006-09-20 Ulrich Drepper + + [BZ #2823] + * locales/mk_MK: Fix date_fmt. Add week, first_weekday, and + first_workday information. + Patch by Damjan Georgievski. + +2006-09-05 Ulrich Drepper + + * locales/or_IN (mon): Fix February string. + +2006-08-24 Ulrich Drepper + + [BZ #2695] + * locales/et_EE: Update LC_ADDRESS category. + Patch by Priit Laes . + +2006-08-23 Ulrich Drepper + + [BZ #2662] + * locales/bn_BD: Fix abday and day spelling of Tuesday. + + [BZ #2473] + * locales/en_NZ: Define am/pm formats. + +2006-08-22 Ulrich Drepper + + * locales/nn_NO: Copy more categories from nb_NO. + +2006-08-19 Ulrich Drepper + + [BZ #3034] + * locales/ml_IN (abmon): Fix June entry. + * locales/bn_IN (abday): Fix Tuesday entry. + (day): Likewise. + (abmon): Fix January and February entries. + (mon): Likewise. + Patches by Mayank Jain . + +2006-08-13 Ulrich Drepper + + [BZ #935] + * SUPPORTED (SUPPORTED-LOCALES): Add fy_NL. + * locales/fy_NL: New file. + +2006-08-12 Ulrich Drepper + + [BZ #3034] + * locales/pa_IN (day): Fix spelling of Saturday. + * locales/or_IN (mon): Fix spelling of May. + * locales/ml_IN (day): Fix spelling of Sunday, Monday, Wednesday. + (abmon): Fix spelling of March to October. + (mon): Fix spelling of March, April, June, August to December. + Patches by Mayank Jain . + +2006-06-03 Eddy Petrisor + + [BZ #2125] + * locales/ro_RO: Fix collation rules for and . + Define first_weekday, first_workdayweek_day, work_day, + country_isbn and country_post fields. + Comments for terminology and bibliographic codes were added. + +2006-08-03 Ulrich Drepper + + * SUPPORTED (SUPPORTED-LOCALES): Add csb_PL.UTF-8. + + [BZ #2961] + * locales/csb_PL: New file. + +2006-08-01 Ulrich Drepper + + * locales/es_NI: Define real t_fmt_ampm and am_pm. + * locales/es_PE: Likewise. + +2006-07-30 Ulrich Drepper + + * locales/te_IN: Minor fixups. + * locales/pt_PT: Likewise. + + * locales/aa_DJ: Add transliateration support to LC_CTYPE. + * locales/af_ZA: Likewise. + * locales/am_ET: Likewise. + * locales/ar_AE: Likewise. + * locales/ar_BH: Likewise. + * locales/ar_DZ: Likewise. + * locales/ar_EG: Likewise. + * locales/ar_IN: Likewise. + * locales/ar_IQ: Likewise. + * locales/ar_JO: Likewise. + * locales/ar_KW: Likewise. + * locales/ar_LB: Likewise. + * locales/ar_LY: Likewise. + * locales/ar_MA: Likewise. + * locales/ar_OM: Likewise. + * locales/ar_QA: Likewise. + * locales/ar_SA: Likewise. + * locales/ar_SD: Likewise. + * locales/ar_SY: Likewise. + * locales/ar_TN: Likewise. + * locales/ar_YE: Likewise. + * locales/as_IN: Likewise. + * locales/az_AZ: Likewise. + * locales/be_BY: Likewise. + * locales/bg_BG: Likewise. + * locales/bn_BD: Likewise. + * locales/bn_IN: Likewise. + * locales/ca_AD: Likewise. + * locales/ca_ES: Likewise. + * locales/ca_ES@euro: Likewise. + * locales/ca_FR: Likewise. + * locales/ca_IT: Likewise. + * locales/cs_CZ: Likewise. + * locales/dz_BT: Likewise. + * locales/el_CY: Likewise. + * locales/el_GR: Likewise. + * locales/en_AU: Likewise. + * locales/en_CA: Likewise. + * locales/en_DK: Likewise. + * locales/en_GB: Likewise. + * locales/en_HK: Likewise. + * locales/en_IE: Likewise. + * locales/en_IE@euro: Likewise. + * locales/en_IN: Likewise. + * locales/en_NZ: Likewise. + * locales/en_PH: Likewise. + * locales/en_SG: Likewise. + * locales/en_US: Likewise. + * locales/en_ZA: Likewise. + * locales/es_AR: Likewise. + * locales/es_BO: Likewise. + * locales/es_CL: Likewise. + * locales/es_CO: Likewise. + * locales/es_CR: Likewise. + * locales/es_DO: Likewise. + * locales/es_EC: Likewise. + * locales/es_ES: Likewise. + * locales/es_ES@euro: Likewise. + * locales/es_GT: Likewise. + * locales/es_HN: Likewise. + * locales/es_MX: Likewise. + * locales/es_NI: Likewise. + * locales/es_PA: Likewise. + * locales/es_PE: Likewise. + * locales/es_PR: Likewise. + * locales/es_PY: Likewise. + * locales/es_SV: Likewise. + * locales/es_US: Likewise. + * locales/es_UY: Likewise. + * locales/es_VE: Likewise. + * locales/et_EE: Likewise. + * locales/eu_ES: Likewise. + * locales/eu_ES@euro: Likewise. + * locales/fa_IR: Likewise. + * locales/fi_FI: Likewise. + * locales/fi_FI@euro: Likewise. + * locales/fo_FO: Likewise. + * locales/ga_IE: Likewise. + * locales/ga_IE@euro: Likewise. + * locales/gez_ER: Likewise. + * locales/gez_ET: Likewise. + * locales/gl_ES: Likewise. + * locales/gl_ES@euro: Likewise. + * locales/gu_IN: Likewise. + * locales/gv_GB: Likewise. + * locales/he_IL: Likewise. + * locales/hi_IN: Likewise. + * locales/hr_HR: Likewise. + * locales/hy_AM: Likewise. + * locales/id_ID: Likewise. + * locales/is_IS: Likewise. + * locales/it_CH: Likewise. + * locales/it_IT: Likewise. + * locales/it_IT@euro: Likewise. + * locales/iw_IL: Likewise. + * locales/ja_JP: Likewise. + * locales/kk_KZ: Likewise. + * locales/kl_GL: Likewise. + * locales/km_KH: Likewise. + * locales/kn_IN: Likewise. + * locales/ko_KR: Likewise. + * locales/kw_GB: Likewise. + * locales/ky_KG: Likewise. + * locales/lg_UG: Likewise. + * locales/lt_LT: Likewise. + * locales/lv_LV: Likewise. + * locales/mk_MK: Likewise. + * locales/mr_IN: Likewise. + * locales/ms_MY: Likewise. + * locales/mt_MT: Likewise. + * locales/nb_NO: Likewise. + * locales/ne_NP: Likewise. + * locales/nl_BE: Likewise. + * locales/nl_BE@euro: Likewise. + * locales/nl_NL: Likewise. + * locales/nl_NL@euro: Likewise. + * locales/nn_NO: Likewise. + * locales/nr_ZA: Likewise. + * locales/om_KE: Likewise. + * locales/or_IN: Likewise. + * locales/pa_IN: Likewise. + * locales/pl_PL: Likewise. + * locales/pt_BR: Likewise. + * locales/pt_PT: Likewise. + * locales/pt_PT@euro: Likewise. + * locales/ru_RU: Likewise. + * locales/ru_UA: Likewise. + * locales/rw_RW: Likewise. + * locales/se_NO: Likewise. + * locales/si_LK: Likewise. + * locales/sk_SK: Likewise. + * locales/sl_SI: Likewise. + * locales/so_SO: Likewise. + * locales/sq_AL: Likewise. + * locales/ss_ZA: Likewise. + * locales/st_ZA: Likewise. + * locales/sv_FI: Likewise. + * locales/sv_FI@euro: Likewise. + * locales/sv_SE: Likewise. + * locales/ta_IN: Likewise. + * locales/te_IN: Likewise. + * locales/tg_TJ: Likewise. + * locales/th_TH: Likewise. + * locales/ti_ET: Likewise. + * locales/tn_ZA: Likewise. + * locales/tr_TR: Likewise. + * locales/ts_ZA: Likewise. + * locales/tt_RU: Likewise. + * locales/uk_UA: Likewise. + * locales/ve_ZA: Likewise. + * locales/vi_VN: Likewise. + * locales/xh_ZA: Likewise. + * locales/zh_CN: Likewise. + * locales/zh_HK: Likewise. + * locales/zh_SG: Likewise. + * locales/zu_ZA: Likewise. + +2006-05-26 Ulrich Drepper + + * SUPPORTED (SUPPORTED-LOCALES): Add as_IN.UTF-8 and or_IN.UTF-8. + * locales/as_IN: New file. + * locales/or_IN: New file. + Patch by Masahide Washizawa . + +2006-05-02 Ulrich Drepper + + [BZ #1203] + * locales/de_DE: Fix order of day of month and month name in + date_fmt. Add period after the day number and avoid padding. + + * SUPPORTED (SUPPORTED-LOCALES): Add tr_CY.ISO-8859-9 and + tr_CY.UTF-8. + + [BZ #531] + * locales/tr_CY: New file. + +2006-01-07 Eddy Petrisor + + * locales/ro_RO: The sorting order of the letters a circumflex and + a with breve was corrected according to the Romanian alphabet. + Capital A with breve is in no longer used within day names. + Romanian post-92 writing rules are used within day and abday fields. + Fixed the international currency symbol because after the + denomination (starting with the 1st of July 2005), the symbol is + RON (1 RON = 10000 ROL). + Grouping sign for thousands, which is ".", is used for Romanian. + Numbers are grouped in sets of 3 digits. + The short date format is %d.%m.%Y for Romanian in Romania. + The year is placed before the time in date_fmt. + %Z was replaced with %z in date formats because %Z is not + used nor widely known in Romania, and Romania uses daylight saving + and the difference is more obvious this way. + abday for Saturday was changed because i> looks bad and is + incorrect according to post-92 writing rules. + In Romanian months' names are not capitalized. The same goes for + the days' names. + A4 is the prefered paper type and metric system is used; + FIXMEs were removed. + country_name, country_car, lang_name and lang_ab were added. + name_mr, name_mrs, name_miss were added; name_ms omitted as + there is no proper form it in Romanian. + An explanation related to the cedilla/comma issue and + the reson why the transliteration is a good idea was added. + The default encoding was changed to UTF-8 because this is the + only encoding that supports all Romanian specific symbols and + dicritics. + The name format was corrected while salutation abbreviation was + omitted. + postal_fmt was corrected according to the Romanian style of + writing this information. + +2006-05-01 Ulrich Drepper + + * SUPPORTED (SUPPORTED-LOCALES): Add el_CY.ISO-8859-7 and el_CY.UTF-8. + + [BZ #531] + * locales/el_CY: New file. + + [BZ #192] + * locales/hu_HU: Better month name abbreviations. + + * SUPPORTED (SUPPORTED-LOCALES): Add hy_AM.UTF-8 and hy_AM.ARMSCII-8. + + [BZ #68] + * locales/hy_AM: Remove special collation rules. Fix yesexpr, noexpr, + country_name, country_car, lang_name, name_fmt, name_miss, name_mr, + and name_mrs. + + [BZ #388] + * locales/pl_PL: Don't ignore U0020 in collation. + + [BZ #352] + * locales/ru_RU: Use U2002 for thousands_sep and mon_throusands_sep. + +2006-05-01 Alexander Shopov + + [BZ #2625] + * charmaps/MIK: New file. + +2006-04-26 Ulrich Drepper + + * locales/bg_BG: Update after iso-4217.def update. + * locales/bs_BA: Likewise. + * locales/es_MX: Likewise. + * locales/ru_RU: Likewise. + * locales/tg_TJ: Likewise. + * locales/tt_RU: Likewise. + +2006-04-25 Ulrich Drepper + + [BZ #2376] + * locales/es_UY: Change curreny_symbol. + +2006-04-24 Ulrich Drepper + + [BZ #2349] + * locales/de_CH: Change thousand separator to '. + +2006-01-17 Robert Millan + + [BZ #2158] + * SUPPORTED: Add ca_AD, ca_FR and ca_IT variants. + * locales/ca_AD: New file. + * locales/ca_FR: New file. + * locales/ca_IT: New file. + +2006-04-23 Ulrich Drepper + + [BZ #2134] + * locales/pa_PK: New file. + * SUPPORTED: Add pa_PK.UTF-8. + + [BZ #1974] + * locales/vi_VN: Fix int_frac_digits/frac_digits, abmon, mon, d_t_fmt, + am_pm, and name_fmt. + + [BZ #1787] + * locales/en_ZA: Updates. + + [BZ #1786] + * locales/af_ZA: Updates. + + [BZ #1785] + * locales/st_ZA: Updates and formatting changes. + + [BZ #1784] + * locales/zu_ZA: Updates and formatting changes. + + [BZ #1783] + * locales/xh_ZA: Updates and formatting changes. + + [BZ #1782] + * locales/nr_ZA: New file. + * locales/SUPPORTED: Add nr_ZA.UTF-8. + +2006-04-10 Jakub Jelinek + + * locales/cs_CZ (LC_TIME): Define week. + * locales/sk_SK (LC_TIME): Likewise. + * locales/pl_PL (LC_TIME): Likewise. + * locales/en_US (LC_TIME): Change week to 7;19971130;7. + 2005-12-27 Roland McGrath * tst-ctype.c (main): Add some casts. diff -uprN glibc-2.4/localedata/charmaps/MIK glibc-2.5/localedata/charmaps/MIK --- glibc-2.4/localedata/charmaps/MIK 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/charmaps/MIK 2006-05-01 14:11:09.000000000 +0000 @@ -0,0 +1,266 @@ + MIK + % + / +% version: 1.0 +% source: http://en.wikipedia.org/wiki/MIK_Code_page +% charnames: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt +% ASCII chars: CP437 GNU libc codepage + +CHARMAP + /x00 NULL (NUL) + /x01 START OF HEADING (SOH) + /x02 START OF TEXT (STX) + /x03 END OF TEXT (ETX) + /x04 END OF TRANSMISSION (EOT) + /x05 ENQUIRY (ENQ) + /x06 ACKNOWLEDGE (ACK) + /x07 BELL (BEL) + /x08 BACKSPACE (BS) + /x09 CHARACTER TABULATION (HT) + /x0a LINE FEED (LF) + /x0b LINE TABULATION (VT) + /x0c FORM FEED (FF) + /x0d CARRIAGE RETURN (CR) + /x0e SHIFT OUT (SO) + /x0f SHIFT IN (SI) + /x10 DATALINK ESCAPE (DLE) + /x11 DEVICE CONTROL ONE (DC1) + /x12 DEVICE CONTROL TWO (DC2) + /x13 DEVICE CONTROL THREE (DC3) + /x14 DEVICE CONTROL FOUR (DC4) + /x15 NEGATIVE ACKNOWLEDGE (NAK) + /x16 SYNCHRONOUS IDLE (SYN) + /x17 END OF TRANSMISSION BLOCK (ETB) + /x18 CANCEL (CAN) + /x19 END OF MEDIUM (EM) + /x1a SUBSTITUTE (SUB) + /x1b ESCAPE (ESC) + /x1c FILE SEPARATOR (IS4) + /x1d GROUP SEPARATOR (IS3) + /x1e RECORD SEPARATOR (IS2) + /x1f UNIT SEPARATOR (IS1) + /x20 SPACE + /x21 EXCLAMATION MARK + /x22 QUOTATION MARK + /x23 NUMBER SIGN + /x24 DOLLAR SIGN + /x25 PERCENT SIGN + /x26 AMPERSAND + /x27 APOSTROPHE + /x28 LEFT PARENTHESIS + /x29 RIGHT PARENTHESIS + /x2a ASTERISK + /x2b PLUS SIGN + /x2c COMMA + /x2d HYPHEN-MINUS + /x2e FULL STOP + /x2f SOLIDUS + /x30 DIGIT ZERO + /x31 DIGIT ONE + /x32 DIGIT TWO + /x33 DIGIT THREE + /x34 DIGIT FOUR + /x35 DIGIT FIVE + /x36 DIGIT SIX + /x37 DIGIT SEVEN + /x38 DIGIT EIGHT + /x39 DIGIT NINE + /x3a COLON + /x3b SEMICOLON + /x3c LESS-THAN SIGN + /x3d EQUALS SIGN + /x3e GREATER-THAN SIGN + /x3f QUESTION MARK + /x40 COMMERCIAL AT + /x41 LATIN CAPITAL LETTER A + /x42 LATIN CAPITAL LETTER B + /x43 LATIN CAPITAL LETTER C + /x44 LATIN CAPITAL LETTER D + /x45 LATIN CAPITAL LETTER E + /x46 LATIN CAPITAL LETTER F + /x47 LATIN CAPITAL LETTER G + /x48 LATIN CAPITAL LETTER H + /x49 LATIN CAPITAL LETTER I + /x4a LATIN CAPITAL LETTER J + /x4b LATIN CAPITAL LETTER K + /x4c LATIN CAPITAL LETTER L + /x4d LATIN CAPITAL LETTER M + /x4e LATIN CAPITAL LETTER N + /x4f LATIN CAPITAL LETTER O + /x50 LATIN CAPITAL LETTER P + /x51 LATIN CAPITAL LETTER Q + /x52 LATIN CAPITAL LETTER R + /x53 LATIN CAPITAL LETTER S + /x54 LATIN CAPITAL LETTER T + /x55 LATIN CAPITAL LETTER U + /x56 LATIN CAPITAL LETTER V + /x57 LATIN CAPITAL LETTER W + /x58 LATIN CAPITAL LETTER X + /x59 LATIN CAPITAL LETTER Y + /x5a LATIN CAPITAL LETTER Z + /x5b LEFT SQUARE BRACKET + /x5c REVERSE SOLIDUS + /x5d RIGHT SQUARE BRACKET + /x5e CIRCUMFLEX ACCENT + /x5f LOW LINE + /x60 GRAVE ACCENT + /x61 LATIN SMALL LETTER A + /x62 LATIN SMALL LETTER B + /x63 LATIN SMALL LETTER C + /x64 LATIN SMALL LETTER D + /x65 LATIN SMALL LETTER E + /x66 LATIN SMALL LETTER F + /x67 LATIN SMALL LETTER G + /x68 LATIN SMALL LETTER H + /x69 LATIN SMALL LETTER I + /x6a LATIN SMALL LETTER J + /x6b LATIN SMALL LETTER K + /x6c LATIN SMALL LETTER L + /x6d LATIN SMALL LETTER M + /x6e LATIN SMALL LETTER N + /x6f LATIN SMALL LETTER O + /x70 LATIN SMALL LETTER P + /x71 LATIN SMALL LETTER Q + /x72 LATIN SMALL LETTER R + /x73 LATIN SMALL LETTER S + /x74 LATIN SMALL LETTER T + /x75 LATIN SMALL LETTER U + /x76 LATIN SMALL LETTER V + /x77 LATIN SMALL LETTER W + /x78 LATIN SMALL LETTER X + /x79 LATIN SMALL LETTER Y + /x7a LATIN SMALL LETTER Z + /x7b LEFT CURLY BRACKET + /x7c VERTICAL LINE + /x7d RIGHT CURLY BRACKET + /x7e TILDE + /x7f DELETE (DEL) + /x80 CYRILLIC CAPITAL LETTER A + /x81 CYRILLIC CAPITAL LETTER BE + /x82 CYRILLIC CAPITAL LETTER VE + /x83 CYRILLIC CAPITAL LETTER GHE + /x84 CYRILLIC CAPITAL LETTER DE + /x85 CYRILLIC CAPITAL LETTER IE + /x86 CYRILLIC CAPITAL LETTER ZHE + /x87 CYRILLIC CAPITAL LETTER ZE + /x88 CYRILLIC CAPITAL LETTER I + /x89 CYRILLIC CAPITAL LETTER SHORT I + /x8a CYRILLIC CAPITAL LETTER KA + /x8b CYRILLIC CAPITAL LETTER EL + /x8c CYRILLIC CAPITAL LETTER EM + /x8d CYRILLIC CAPITAL LETTER EN + /x8e CYRILLIC CAPITAL LETTER O + /x8f CYRILLIC CAPITAL LETTER PE + /x90 CYRILLIC CAPITAL LETTER ER + /x91 CYRILLIC CAPITAL LETTER ES + /x92 CYRILLIC CAPITAL LETTER TE + /x93 CYRILLIC CAPITAL LETTER U + /x94 CYRILLIC CAPITAL LETTER EF + /x95 CYRILLIC CAPITAL LETTER HA + /x96 CYRILLIC CAPITAL LETTER TSE + /x97 CYRILLIC CAPITAL LETTER CHE + /x98 CYRILLIC CAPITAL LETTER SHA + /x99 CYRILLIC CAPITAL LETTER SHCHA + /x9a CYRILLIC CAPITAL LETTER HARD SIGN + /x9b CYRILLIC CAPITAL LETTER YERU + /x9c CYRILLIC CAPITAL LETTER SOFT SIGN + /x9d CYRILLIC CAPITAL LETTER E + /x9e CYRILLIC CAPITAL LETTER YU + /x9f CYRILLIC CAPITAL LETTER YA + /xa0 CYRILLIC SMALL LETTER A + /xa1 CYRILLIC SMALL LETTER BE + /xa2 CYRILLIC SMALL LETTER VE + /xa3 CYRILLIC SMALL LETTER GHE + /xa4 CYRILLIC SMALL LETTER DE + /xa5 CYRILLIC SMALL LETTER IE + /xa6 CYRILLIC SMALL LETTER ZHE + /xa7 CYRILLIC SMALL LETTER ZE + /xa8 CYRILLIC SMALL LETTER I + /xa9 CYRILLIC SMALL LETTER SHORT I + /xaa CYRILLIC SMALL LETTER KA + /xab CYRILLIC SMALL LETTER EL + /xac CYRILLIC SMALL LETTER EM + /xad CYRILLIC SMALL LETTER EN + /xae CYRILLIC SMALL LETTER O + /xaf CYRILLIC SMALL LETTER PE + /xb0 CYRILLIC SMALL LETTER ER + /xb1 CYRILLIC SMALL LETTER ES + /xb2 CYRILLIC SMALL LETTER TE + /xb3 CYRILLIC SMALL LETTER U + /xb4 CYRILLIC SMALL LETTER EF + /xb5 CYRILLIC SMALL LETTER HA + /xb6 CYRILLIC SMALL LETTER TSE + /xb7 CYRILLIC SMALL LETTER CHE + /xb8 CYRILLIC SMALL LETTER SHA + /xb9 CYRILLIC SMALL LETTER SHCHA + /xba CYRILLIC SMALL LETTER HARD SIGN + /xbb CYRILLIC SMALL LETTER YERU + /xbc CYRILLIC SMALL LETTER SOFT SIGN + /xbd CYRILLIC SMALL LETTER E + /xbe CYRILLIC SMALL LETTER YU + /xbf CYRILLIC SMALL LETTER YA + /xc0 BOX DRAWINGS LIGHT UP AND RIGHT + /xc1 BOX DRAWINGS LIGHT UP AND HORIZONTAL + /xc2 BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + /xc3 BOX DRAWINGS LIGHT VERTICAL AND RIGHT + /xc4 BOX DRAWINGS LIGHT HORIZONTAL + /xc5 BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + /xc6 BOX DRAWINGS DOUBLE VERTICAL AND LEFT + /xc7 BOX DRAWINGS DOUBLE VERTICAL + /xc8 BOX DRAWINGS DOUBLE UP AND RIGHT + /xc9 BOX DRAWINGS DOUBLE DOWN AND RIGHT + /xca BOX DRAWINGS DOUBLE UP AND HORIZONTAL + /xcb BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + /xcc BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + /xcd BOX DRAWINGS DOUBLE HORIZONTAL + /xce BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + /xcf BOX DRAWINGS LIGHT DOWN AND LEFT + /xd0 LIGHT SHADE + /xd1 MEDIUM SHADE + /xd2 DARK SHADE + /xd3 BOX DRAWINGS LIGHT VERTICAL + /xd4 BOX DRAWINGS LIGHT VERTICAL AND LEFT + /xd5 NUMERO SIGN + /xd6 SECTION SIGN + /xd7 BOX DRAWINGS DOUBLE DOWN AND LEFT + /xd8 BOX DRAWINGS DOUBLE UP AND LEFT + /xd9 BOX DRAWINGS LIGHT UP AND LEFT + /xda BOX DRAWINGS LIGHT DOWN AND RIGHT + /xdb FULL BLOCK + /xdc LOWER HALF BLOCK + /xdd LEFT HALF BLOCK + /xde RIGHT HALF BLOCK + /xdf UPPER HALF BLOCK + /xe0 GREEK SMALL LETTER ALPHA + /xe1 LATIN SMALL LETTER SHARP S + /xe2 GREEK CAPITAL LETTER GAMMA + /xe3 GREEK SMALL LETTER PI + /xe4 GREEK CAPITAL LETTER SIGMA + /xe5 GREEK SMALL LETTER SIGMA + /xe6 MICRO SIGN + /xe7 GREEK SMALL LETTER TAU + /xe8 GREEK CAPITAL LETTER PHI + /xe9 GREEK CAPITAL LETTER THETA + /xea GREEK CAPITAL LETTER OMEGA + /xeb GREEK SMALL LETTER DELTA + /xec INFINITY + /xed GREEK SMALL LETTER PHI + /xee GREEK SMALL LETTER EPSILON + /xef INTERSECTION + /xf0 IDENTICAL TO + /xf1 PLUS-MINUS SIGN + /xf2 GREATER-THAN OR EQUAL TO + /xf3 LESS-THAN OR EQUAL TO + /xf4 TOP HALF INTEGRAL + /xf5 BOTTOM HALF INTEGRAL + /xf6 DIVISION SIGN + /xf7 ALMOST EQUAL TO + /xf8 DEGREE SIGN + /xf9 BULLET OPERATOR + /xfa MIDDLE DOT + /xfb SQUARE ROOT + /xfc SUPERSCRIPT LATIN SMALL LETTER N + /xfd SUPERSCRIPT TWO + /xfe BLACK SQUARE + /xff NO-BREAK SPACE +END CHARMAP diff -uprN glibc-2.4/localedata/locales/aa_DJ glibc-2.5/localedata/locales/aa_DJ --- glibc-2.4/localedata/locales/aa_DJ 2003-12-06 07:40:37.000000000 +0000 +++ glibc-2.5/localedata/locales/aa_DJ 2006-07-30 22:19:44.000000000 +0000 @@ -62,6 +62,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/af_ZA glibc-2.5/localedata/locales/af_ZA --- glibc-2.4/localedata/locales/af_ZA 2005-09-24 15:12:05.000000000 +0000 +++ glibc-2.5/localedata/locales/af_ZA 2006-07-30 22:19:44.000000000 +0000 @@ -1,7 +1,13 @@ escape_char / comment_char % +% Charset: ISO-8859-1 + % ChangeLog +% 1.2.1 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Added 'Charset: ISO-8859-1' information +% - Updated contact information % 1.2 (2004-10-28): % 2004-10-28 Dwayne Bailey % - Corrected country_name should be "Suid-Afrika" @@ -27,19 +33,18 @@ comment_char % % - Add all name_* to LC_NAME % - Add various comments explaining items - LC_IDENTIFICATION title "Afrikaans locale for South Africa" source "Zuza Software Foundation (Translate.org.za)" address "Box 28364, Sunnyside, 0132, South Africa" contact "Dwayne Bailey" email "dwayne@translate.org.za" -tel "+27 12 343 0389" -fax "+27 12 343 0389" +tel "+27 12 460 1095" +fax "+27 12 460 1095" language "Afrikaans" territory "South Africa" -revision "1.2" -date "2004-10-28" +revision "1.2.1" +date "2005-10-13" % category "af_ZA:2000";LC_IDENTIFICATION category "af_ZA:2000";LC_CTYPE @@ -58,6 +63,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -90,7 +99,7 @@ day "";/ "" -% abmon - The abbreviations for the months +% abmon - The abbreviations for the months % - Jan, Feb, Mrt, Apr, Mei, Jun, Jul, Aug, Sep, Okt, Nov, Des abmon "";"";/ "";"";/ @@ -99,7 +108,7 @@ abmon "";"";"";/ "";"" -% mon - The full names of the months - +% mon - The full names of the months - % Januarie, Februarie, Maart, April, Mei, Junie % Julie, Augustus, September, Oktober, November, Desember mon "";/ @@ -200,7 +209,7 @@ name_gen "" % Salutation for unmarried females % "mej" name_miss "" - + % Salutation for males % "mnr" name_mr "" diff -uprN glibc-2.4/localedata/locales/am_ET glibc-2.5/localedata/locales/am_ET --- glibc-2.4/localedata/locales/am_ET 2003-12-06 07:40:37.000000000 +0000 +++ glibc-2.5/localedata/locales/am_ET 2006-07-30 22:19:44.000000000 +0000 @@ -593,6 +593,8 @@ LC_CTYPE copy "i18n" space translit_start +include "translit_combining";"" + % hoy-sadis followed by a vowel diff -uprN glibc-2.4/localedata/locales/ar_AE glibc-2.5/localedata/locales/ar_AE --- glibc-2.4/localedata/locales/ar_AE 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_AE 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_AE:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_BH glibc-2.5/localedata/locales/ar_BH --- glibc-2.4/localedata/locales/ar_BH 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_BH 2006-07-30 22:19:44.000000000 +0000 @@ -33,7 +33,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_DZ glibc-2.5/localedata/locales/ar_DZ --- glibc-2.4/localedata/locales/ar_DZ 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_DZ 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_DZ:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_EG glibc-2.5/localedata/locales/ar_EG --- glibc-2.4/localedata/locales/ar_EG 2005-10-15 01:10:44.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_EG 2006-07-30 22:19:44.000000000 +0000 @@ -33,6 +33,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_IN glibc-2.5/localedata/locales/ar_IN --- glibc-2.4/localedata/locales/ar_IN 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_IN 2006-07-30 22:19:44.000000000 +0000 @@ -34,7 +34,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/ar_IQ glibc-2.5/localedata/locales/ar_IQ --- glibc-2.4/localedata/locales/ar_IQ 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_IQ 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_IQ:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_JO glibc-2.5/localedata/locales/ar_JO --- glibc-2.4/localedata/locales/ar_JO 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_JO 2006-07-30 22:19:44.000000000 +0000 @@ -33,7 +33,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_KW glibc-2.5/localedata/locales/ar_KW --- glibc-2.4/localedata/locales/ar_KW 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_KW 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_KW:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_LB glibc-2.5/localedata/locales/ar_LB --- glibc-2.4/localedata/locales/ar_LB 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_LB 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_LB:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_LY glibc-2.5/localedata/locales/ar_LY --- glibc-2.4/localedata/locales/ar_LY 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_LY 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_LY:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_MA glibc-2.5/localedata/locales/ar_MA --- glibc-2.4/localedata/locales/ar_MA 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_MA 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_MA:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_OM glibc-2.5/localedata/locales/ar_OM --- glibc-2.4/localedata/locales/ar_OM 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_OM 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_OM:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_QA glibc-2.5/localedata/locales/ar_QA --- glibc-2.4/localedata/locales/ar_QA 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_QA 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_QA:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_SA glibc-2.5/localedata/locales/ar_SA --- glibc-2.4/localedata/locales/ar_SA 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_SA 2006-07-30 22:19:44.000000000 +0000 @@ -36,7 +36,7 @@ category "ar_SA:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/ar_SD glibc-2.5/localedata/locales/ar_SD --- glibc-2.4/localedata/locales/ar_SD 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_SD 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_SD:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_SY glibc-2.5/localedata/locales/ar_SY --- glibc-2.4/localedata/locales/ar_SY 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_SY 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_SY:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_TN glibc-2.5/localedata/locales/ar_TN --- glibc-2.4/localedata/locales/ar_TN 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_TN 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_TN:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ar_YE glibc-2.5/localedata/locales/ar_YE --- glibc-2.4/localedata/locales/ar_YE 2005-10-15 01:11:39.000000000 +0000 +++ glibc-2.5/localedata/locales/ar_YE 2006-07-30 22:19:44.000000000 +0000 @@ -32,7 +32,7 @@ category "ar_YE:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ar_EG" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/as_IN glibc-2.5/localedata/locales/as_IN --- glibc-2.4/localedata/locales/as_IN 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/as_IN 2006-07-30 22:19:44.000000000 +0000 @@ -0,0 +1,732 @@ +comment_char % +escape_char / + +% Assamese locale for India. +% Contributed by Masahide Washizawa + +%%%%%%%%%%%%% +LC_IDENTIFICATION +title "Assamese language locale for India" +source "IBM AP Linux Technology Center, Yamato Software Laboratory" +address "1623-14, Shimotsuruma, Yamato-shi, Kanagawa-ken, 242-8502, Japan" +contact "" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Assamese" +territory "India" +revision "1.0" +date "2006-05-25" +% +category "as_IN:2000";LC_IDENTIFICATION +category "as_IN:2000";LC_CTYPE +category "as_IN:2000";LC_COLLATE +category "as_IN:2000";LC_TIME +category "as_IN:2000";LC_NUMERIC +category "as_IN:2000";LC_MONETARY +category "as_IN:2000";LC_MESSAGES +category "as_IN:2000";LC_PAPER +category "as_IN:2000";LC_NAME +category "as_IN:2000";LC_ADDRESS +category "as_IN:2000";LC_TELEPHONE +END LC_IDENTIFICATION + +%%%%%%%%%%%%% +LC_CTYPE +copy "i18n" + +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE + +%%%%%%%%%%%%% +LC_COLLATE + +% Define collation weights as symbols +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +order_start forward;forward;forward;forward + + +% collation weights in order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +% assignment of characters to weights + + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;"";"";IGNORE + IGNORE;"";"";IGNORE + IGNORE;"";"";IGNORE + IGNORE;"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +% FIXME ;;;IGNORE +% (Bengali sign avagraha) is defined from Unicode4.0 + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";;"";IGNORE +UNDEFINED IGNORE;IGNORE;IGNORE;%... + +order_end +END LC_COLLATE + +%%%%%%%%%%%%% +LC_NUMERIC +copy "en_IN" +END LC_NUMERIC + +%%%%%%%%%%%%% +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;2 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 1 +p_sep_by_space 1 +n_cs_precedes 1 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 +int_p_cs_precedes 1 +int_p_sep_by_space 1 +int_n_cs_precedes 1 +int_n_sep_by_space 1 +int_p_sign_posn 1 +int_n_sign_posn 1 +END LC_MONETARY + +%%%%%%%%%%%%% +LC_TIME +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% d_fmt "%e-%m-%Y" +d_fmt "" +% t_fmt "%I.%M.%S %p" +t_fmt "" +% d_t_fmt"%e %B, %Y %I.%M.%S %p %Z" +d_t_fmt "" +am_pm "";"" +% t_fmt_ampm "%I.%M.%S %p" +t_fmt_ampm "" +END LC_TIME + +%%%%%%%%%%%%% +LC_MESSAGES +yesstr "" +nostr "" +yesexpr "" +noexpr "" +END LC_MESSAGES + +%%%%%%%%%%%%% +LC_PAPER +copy "hi_IN" +END LC_PAPER + +%%%%%%%%%%%%% +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the +% LC_NAME category. +% +name_fmt "/ +" +name_gen "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" +END LC_NAME + +%%%%%%%%%%%%% +LC_ADDRESS +% This is the ISO_IEC TR14652 Locale definition for the +% LC_ADDRESS +postal_fmt "/ +" +END LC_ADDRESS + +%%%%%%%%%%%%% +LC_TELEPHONE +% This is the ISO_IEC TR14652 Locale definition for the +tel_int_fmt "" +int_prefix "" +int_select "" +END LC_TELEPHONE + +%%%%%%%%%%%%% +LC_MEASUREMENT +copy "hi_IN" +END LC_MEASUREMENT diff -uprN glibc-2.4/localedata/locales/az_AZ glibc-2.5/localedata/locales/az_AZ --- glibc-2.4/localedata/locales/az_AZ 2005-09-24 18:41:17.000000000 +0000 +++ glibc-2.5/localedata/locales/az_AZ 2006-07-30 22:19:44.000000000 +0000 @@ -2,7 +2,7 @@ comment_char % escape_char / % % Azeri Language Locale for Azerbaijan (latin) -% Source: +% Source: % Contact: Pablo Saratxaga % Email: % Language: az @@ -47,8 +47,8 @@ END LC_IDENTIFICATION % TODO: fix LC_MONETARY LC_COLLATE -% The new (1991) latin azeri alphabet is: -% , , , , , , , , , , , , +% The new (1991) latin azeri alphabet is: +% , , , , , , , , , , , , % (dotless i), (i with dot), , , , , , , , % ,

, , , , , , , , , % @@ -187,10 +187,8 @@ reorder-end END LC_COLLATE LC_CTYPE -%copy "i18n" copy "tr_TR" translit_start -include "translit_combining";"" % schwa -> a: "" diff -uprN glibc-2.4/localedata/locales/be_BY glibc-2.5/localedata/locales/be_BY --- glibc-2.4/localedata/locales/be_BY 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/be_BY 2006-07-30 22:19:44.000000000 +0000 @@ -62,6 +62,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/bg_BG glibc-2.5/localedata/locales/bg_BG --- glibc-2.4/localedata/locales/bg_BG 2002-09-10 18:14:00.000000000 +0000 +++ glibc-2.5/localedata/locales/bg_BG 2006-07-30 22:19:44.000000000 +0000 @@ -40,9 +40,11 @@ category "bg_BG:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE - copy "i18n" +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -155,7 +157,7 @@ reorder-end END LC_COLLATE LC_MONETARY -int_curr_symbol "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" mon_thousands_sep "" diff -uprN glibc-2.4/localedata/locales/bn_BD glibc-2.5/localedata/locales/bn_BD --- glibc-2.4/localedata/locales/bn_BD 2005-10-15 01:17:59.000000000 +0000 +++ glibc-2.5/localedata/locales/bn_BD 2006-08-24 06:39:08.000000000 +0000 @@ -38,6 +38,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY @@ -69,7 +73,7 @@ END LC_NUMERIC LC_TIME abday ""; / "";/ - "";/ + "";/ "";/ "";/ "";/ @@ -77,7 +81,7 @@ abday ""; / day "";/ "";/ - "";/ + "";/ "";/ "";/ "";/ diff -uprN glibc-2.4/localedata/locales/bn_IN glibc-2.5/localedata/locales/bn_IN --- glibc-2.4/localedata/locales/bn_IN 2005-10-15 01:16:28.000000000 +0000 +++ glibc-2.5/localedata/locales/bn_IN 2006-08-19 15:45:14.000000000 +0000 @@ -1,6 +1,8 @@ comment_char % escape_char / +% Last Update by Runa Bhattacharjee + LC_IDENTIFICATION % This is the ISO_IEC TR14652 Locale definition for the LC_IDENTIFICATION % category generated by IBM Basic CountryPack Transformer. @@ -14,7 +16,7 @@ fax "" language "Bengali" territory "India" revision "1.0" -date "2000, October" +date "2006-05-29" % category "bn_IN:2000";LC_IDENTIFICATION category "bn_IN:2000";LC_CTYPE @@ -32,10 +34,7 @@ END LC_IDENTIFICATION LC_CTYPE -% This is the POSIX Locale difinition for LC_CTYPE category -% generated by IBM Basic CountryPack Transformer. -% -copy "i18n" +copy "bn_BD" END LC_CTYPE @@ -90,21 +89,21 @@ LC_TIME % % Abbreviated weekday names (%a) abday "";"";/ - "";"";/ + "";"";/ "";"";/ "" % % Full weekday names (%A) day "";"";/ - "";"";/ + "";"";/ "";/ "";"" % % Abbreviated month names (%b) -abmon "";/ - "";/ +abmon "";/ + "";/ "";"";/ "";"";/ "";"";/ @@ -115,8 +114,8 @@ abmon "";/ - "";/ +mon "";/ + "";/ "";"";/ "";"";/ "";"";/ @@ -154,6 +153,7 @@ copy "bn_BD" END LC_MESSAGES +% Default paper: A4 LC_PAPER copy "hi_IN" END LC_PAPER diff -uprN glibc-2.4/localedata/locales/bs_BA glibc-2.5/localedata/locales/bs_BA --- glibc-2.4/localedata/locales/bs_BA 2005-09-24 18:45:03.000000000 +0000 +++ glibc-2.5/localedata/locales/bs_BA 2006-04-26 07:20:23.000000000 +0000 @@ -149,7 +149,7 @@ noexpr "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" mon_thousands_sep "" diff -uprN glibc-2.4/localedata/locales/ca_AD glibc-2.5/localedata/locales/ca_AD --- glibc-2.4/localedata/locales/ca_AD 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/ca_AD 2006-07-30 22:19:44.000000000 +0000 @@ -0,0 +1,94 @@ +comment_char % +escape_char / +% +% Catalan Language Locale for Andorra +% Language: ca +% Territory: AD +% Option: euro +% Revision: 1.0 +% Date: 2006-01-16 +% Application: general +% Users: general +% Charset: ISO-8859-15 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Catalan locale for Andorra " +source "Robert Millan" +address "" +contact "" +email "" +tel "" +fax "" +language "Catalan" +territory "Andorra" +revision "1.0" +date "2006-01-16" +% +category "ca_AD:2000";LC_IDENTIFICATION +category "ca_AD:2000";LC_CTYPE +category "ca_AD:2000";LC_COLLATE +category "ca_AD:2000";LC_TIME +category "ca_AD:2000";LC_NUMERIC +category "ca_AD:2000";LC_MONETARY +category "ca_AD:2000";LC_MESSAGES +category "ca_AD:2000";LC_PAPER +category "ca_AD:2000";LC_NAME +category "ca_AD:2000";LC_ADDRESS +category "ca_AD:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_COLLATE +copy "ca_ES" +END LC_COLLATE + +LC_CTYPE +copy "ca_ES" +END LC_CTYPE + +LC_MESSAGES +copy "ca_ES" +END LC_MESSAGES + +LC_MONETARY +copy "ca_ES" +END LC_MONETARY + +LC_NUMERIC +copy "ca_ES" +END LC_NUMERIC + +LC_TIME +copy "ca_ES" +END LC_TIME + +LC_PAPER +copy "ca_ES" +END LC_PAPER + +LC_TELEPHONE +tel_int_fmt "/ +" +int_prefix "" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "ca_ES" +END LC_MEASUREMENT + +LC_NAME +copy "ca_ES" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +country_num 20 +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/ca_ES glibc-2.5/localedata/locales/ca_ES --- glibc-2.4/localedata/locales/ca_ES 2005-10-14 17:50:06.000000000 +0000 +++ glibc-2.5/localedata/locales/ca_ES 2006-07-30 22:19:44.000000000 +0000 @@ -2112,6 +2112,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/ca_ES@euro glibc-2.5/localedata/locales/ca_ES@euro --- glibc-2.4/localedata/locales/ca_ES@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/ca_ES@euro 2006-07-30 22:19:44.000000000 +0000 @@ -45,7 +45,7 @@ copy "ca_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "ca_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/ca_FR glibc-2.5/localedata/locales/ca_FR --- glibc-2.4/localedata/locales/ca_FR 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/ca_FR 2006-07-30 22:19:44.000000000 +0000 @@ -0,0 +1,85 @@ +comment_char % +escape_char / +% +% Catalan Language Locale for France +% Language: ca +% Territory: FR +% Option: euro +% Revision: 1.0 +% Date: 2006-01-16 +% Application: general +% Users: general +% Charset: ISO-8859-15 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Catalan locale for France " +source "Robert Millan" +address "" +contact "" +email "" +tel "" +fax "" +language "Catalan" +territory "France" +revision "1.0" +date "2006-01-16" +% +category "ca_FR:2000";LC_IDENTIFICATION +category "ca_FR:2000";LC_CTYPE +category "ca_FR:2000";LC_COLLATE +category "ca_FR:2000";LC_TIME +category "ca_FR:2000";LC_NUMERIC +category "ca_FR:2000";LC_MONETARY +category "ca_FR:2000";LC_MESSAGES +category "ca_FR:2000";LC_PAPER +category "ca_FR:2000";LC_NAME +category "ca_FR:2000";LC_ADDRESS +category "ca_FR:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_COLLATE +copy "ca_ES" +END LC_COLLATE + +LC_CTYPE +copy "ca_ES" +END LC_CTYPE + +LC_MESSAGES +copy "ca_ES" +END LC_MESSAGES + +LC_MONETARY +copy "ca_ES" +END LC_MONETARY + +LC_NUMERIC +copy "ca_ES" +END LC_NUMERIC + +LC_TIME +copy "ca_ES" +END LC_TIME + +LC_PAPER +copy "fr_FR" +END LC_PAPER + +LC_TELEPHONE +copy "fr_FR" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "fr_FR" +END LC_MEASUREMENT + +LC_NAME +copy "ca_ES" +END LC_NAME + +LC_ADDRESS +copy "fr_FR" +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/ca_IT glibc-2.5/localedata/locales/ca_IT --- glibc-2.4/localedata/locales/ca_IT 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/ca_IT 2006-07-30 22:19:44.000000000 +0000 @@ -0,0 +1,85 @@ +comment_char % +escape_char / +% +% Catalan Language Locale for Italy (L'Alguer) +% Language: ca +% Territory: IT +% Option: euro +% Revision: 1.0 +% Date: 2006-01-16 +% Application: general +% Users: general +% Charset: ISO-8859-15 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Catalan locale for Italy (L'Alguer) " +source "Robert Millan" +address "" +contact "" +email "" +tel "" +fax "" +language "Catalan" +territory "Italy (L'Alguer)" +revision "1.0" +date "2006-01-16" +% +category "ca_IT:2000";LC_IDENTIFICATION +category "ca_IT:2000";LC_CTYPE +category "ca_IT:2000";LC_COLLATE +category "ca_IT:2000";LC_TIME +category "ca_IT:2000";LC_NUMERIC +category "ca_IT:2000";LC_MONETARY +category "ca_IT:2000";LC_MESSAGES +category "ca_IT:2000";LC_PAPER +category "ca_IT:2000";LC_NAME +category "ca_IT:2000";LC_ADDRESS +category "ca_IT:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_COLLATE +copy "ca_ES" +END LC_COLLATE + +LC_CTYPE +copy "ca_ES" +END LC_CTYPE + +LC_MESSAGES +copy "ca_ES" +END LC_MESSAGES + +LC_MONETARY +copy "ca_ES" +END LC_MONETARY + +LC_NUMERIC +copy "ca_ES" +END LC_NUMERIC + +LC_TIME +copy "ca_ES" +END LC_TIME + +LC_PAPER +copy "it_IT" +END LC_PAPER + +LC_TELEPHONE +copy "it_IT" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "it_IT" +END LC_MEASUREMENT + +LC_NAME +copy "ca_ES" +END LC_NAME + +LC_ADDRESS +copy "it_IT" +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/csb_PL glibc-2.5/localedata/locales/csb_PL --- glibc-2.4/localedata/locales/csb_PL 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/csb_PL 2006-08-03 08:15:06.000000000 +0000 @@ -0,0 +1,210 @@ +comment_char % +escape_char / +% +% Kashubian Language Locale for Poland +% Source: csb_PL locale +% Contact: Michal Ostrowski +% Email: ostrowski.michal@gmail.com +% Tel: +48586717262 +% Fax: none +% Language: csb +% Territory: PL +% Revision: 1.0 +% Date: 2006-07-25 +% Application: general +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Kashubian locale for Poland" +source "csb_PL locale" +address "" +contact "Michal Ostrowski" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Kashubian" +territory "Poland" +revision "1.0" +date "2006-07-25" +audience "general" +application "GNU locale" +abbreviation "" +% +category "csb_PL:2000";LC_IDENTIFICATION +category "csb_PL:2000";LC_CTYPE +category "csb_PL:2000";LC_COLLATE +category "csb_PL:2000";LC_TIME +category "csb_PL:2000";LC_NUMERIC +category "csb_PL:2000";LC_MONETARY +category "csb_PL:2000";LC_MESSAGES +category "csb_PL:2000";LC_PAPER +category "csb_PL:2000";LC_NAME +category "csb_PL:2000";LC_ADDRESS +category "csb_PL:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "pl_PL" +END LC_CTYPE + +LC_COLLATE +copy "iso14651_t1" + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +reorder-after + + + +reorder-after + + + +reorder-after + + +reorder-after + + +reorder-after + + + + +reorder-after + + +reorder-after + + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + +reorder-end + +END LC_COLLATE + +LC_MESSAGES +yesexpr "" +noexpr "" + +END LC_MESSAGES + +LC_MONETARY +copy "pl_PL" +END LC_MONETARY + +LC_NUMERIC +copy "pl_PL" +END LC_NUMERIC + +LC_TIME +abday ""; "";/ + ""; "";/ + ""; "";/ + "" + +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon ""; "";/ + ""; "";/ + ""; "";/ + ""; "";/ + ""; "";/ + ""; "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +d_t_fmt "" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ +/ +" +week 7;19971201;4 +first_weekday 2 +first_workday 2 +END LC_TIME + +LC_PAPER +copy "pl_PL" +END LC_PAPER + +LC_TELEPHONE +copy "pl_PL" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "pl_PL" +END LC_MEASUREMENT + +LC_NAME +copy "pl_PL" +END LC_NAME + +LC_ADDRESS +copy "pl_PL" +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/cs_CZ glibc-2.5/localedata/locales/cs_CZ --- glibc-2.4/localedata/locales/cs_CZ 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/cs_CZ 2006-07-30 22:19:44.000000000 +0000 @@ -2303,6 +2303,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE %% LC_MESSAGES @@ -2434,7 +2438,7 @@ abmon "";/ % "";/ % "" -%week ??? +week 7;19971201;4 d_t_fmt "" diff -uprN glibc-2.4/localedata/locales/de_CH glibc-2.5/localedata/locales/de_CH --- glibc-2.4/localedata/locales/de_CH 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/de_CH 2006-04-24 07:27:46.000000000 +0000 @@ -62,7 +62,7 @@ LC_MONETARY int_curr_symbol "" currency_symbol "" mon_decimal_point "" -mon_thousands_sep "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" @@ -78,7 +78,7 @@ END LC_MONETARY LC_NUMERIC decimal_point "" -thousands_sep "" +thousands_sep "" grouping 3;3 END LC_NUMERIC diff -uprN glibc-2.4/localedata/locales/de_DE glibc-2.5/localedata/locales/de_DE --- glibc-2.4/localedata/locales/de_DE 2005-10-15 00:38:18.000000000 +0000 +++ glibc-2.5/localedata/locales/de_DE 2006-05-02 21:52:52.000000000 +0000 @@ -150,9 +150,9 @@ d_fmt "" t_fmt_ampm "" -date_fmt "/ -/ -" +date_fmt "/ +/ +" END LC_TIME LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/dz_BT glibc-2.5/localedata/locales/dz_BT --- glibc-2.4/localedata/locales/dz_BT 2005-10-14 22:54:12.000000000 +0000 +++ glibc-2.5/localedata/locales/dz_BT 2006-07-30 22:19:44.000000000 +0000 @@ -47,6 +47,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -56,7 +60,7 @@ script % 30 base letters collating-symbol -collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -1191,7 +1195,7 @@ reorder-after ;;;IGNORE % o ;;;IGNORE % oo -% FIXME: 0F39, 0F7F, 0F84, 0F85, 0F86, 0F87, +% FIXME: 0F39, 0F7F, 0F84, 0F85, 0F86, 0F87, % FIXME: 0F88, UF89, UF8A, 0F8B IGNORE;;IGNORE;IGNORE @@ -1278,12 +1282,12 @@ mon "%y%m/ %d%H/ %M%S" -% Appropriate date representation +% Appropriate date representation d_fmt "%y/ %m%d" @@ -1357,4 +1361,3 @@ lang_ab "" lang_term "" lang_lib "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/el_CY glibc-2.5/localedata/locales/el_CY --- glibc-2.4/localedata/locales/el_CY 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/el_CY 2006-07-30 22:19:44.000000000 +0000 @@ -0,0 +1,104 @@ +comment_char % +escape_char / +% +% Greek Language Locale for Cyprus +% Based on locale el_GR by Keld Simonsen. + +LC_IDENTIFICATION +title "Greek locale for Cyprus" +source "Greek Debian Translation Team" +address "Konstantinos Margaritis, M. Asias 50, Nafplion 21100, Greece" +contact "" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Greek" +territory "Cyprus" +revision "1.0" +date "2004-10-20" +% +category "el_CY:2000";LC_IDENTIFICATION +category "el_CY:2000";LC_CTYPE +category "el_CY:2000";LC_COLLATE +category "el_CY:2000";LC_TIME +category "el_CY:2000";LC_NUMERIC +category "el_CY:2000";LC_MONETARY +category "el_CY:2000";LC_MESSAGES +category "el_CY:2000";LC_PAPER +category "el_CY:2000";LC_NAME +category "el_CY:2000";LC_ADDRESS +category "el_CY:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_COLLATE +copy "iso14651_t1" +END LC_COLLATE + +LC_CTYPE +copy "el_GR" +END LC_CTYPE + +LC_MESSAGES +copy "el_GR" +END LC_MESSAGES + +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3 +positive_sign "" +negative_sign "" +int_frac_digits 4 +frac_digits 4 +p_cs_precedes 0 +p_sep_by_space 0 +n_cs_precedes 1 +n_sep_by_space 0 +p_sign_posn 1 +n_sign_posn 1 +END LC_MONETARY + +LC_NUMERIC +decimal_point "" +thousands_sep "" +grouping 0;0 +END LC_NUMERIC + +LC_TIME +copy "el_GR" +END LC_TIME + +LC_PAPER +copy "el_GR" +END LC_PAPER + +LC_TELEPHONE +tel_int_fmt "/ +" +int_prefix "" +int_select "" +END LC_TELEPHONE + +LC_MEASUREMENT +% FIXME +measurement 1 +END LC_MEASUREMENT + +LC_NAME +name_fmt "/ +" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +country_num 196 +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/el_GR glibc-2.5/localedata/locales/el_GR --- glibc-2.4/localedata/locales/el_GR 2005-09-24 17:53:32.000000000 +0000 +++ glibc-2.5/localedata/locales/el_GR 2006-07-30 22:19:44.000000000 +0000 @@ -51,6 +51,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/en_AU glibc-2.5/localedata/locales/en_AU --- glibc-2.4/localedata/locales/en_AU 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_AU 2006-07-30 22:19:44.000000000 +0000 @@ -47,7 +47,7 @@ category "en_AU:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/en_CA glibc-2.5/localedata/locales/en_CA --- glibc-2.4/localedata/locales/en_CA 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_CA 2006-07-30 22:19:44.000000000 +0000 @@ -2114,7 +2114,7 @@ order_end END LC_COLLATE LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/en_DK glibc-2.5/localedata/locales/en_DK --- glibc-2.4/localedata/locales/en_DK 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_DK 2006-07-30 22:19:44.000000000 +0000 @@ -56,7 +56,7 @@ copy "iso14651_t1" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/en_GB glibc-2.5/localedata/locales/en_GB --- glibc-2.4/localedata/locales/en_GB 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_GB 2006-07-30 22:19:44.000000000 +0000 @@ -48,6 +48,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/en_HK glibc-2.5/localedata/locales/en_HK --- glibc-2.4/localedata/locales/en_HK 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_HK 2006-07-30 22:19:44.000000000 +0000 @@ -37,7 +37,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/en_IE glibc-2.5/localedata/locales/en_IE --- glibc-2.4/localedata/locales/en_IE 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_IE 2006-07-30 22:19:44.000000000 +0000 @@ -47,7 +47,7 @@ category "en_IE:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/en_IE@euro glibc-2.5/localedata/locales/en_IE@euro --- glibc-2.4/localedata/locales/en_IE@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_IE@euro 2006-07-30 22:19:44.000000000 +0000 @@ -39,7 +39,7 @@ category "en_IE@euro:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_IE" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/en_IN glibc-2.5/localedata/locales/en_IN --- glibc-2.4/localedata/locales/en_IN 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_IN 2006-07-30 22:19:44.000000000 +0000 @@ -34,7 +34,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/en_NZ glibc-2.5/localedata/locales/en_NZ --- glibc-2.4/localedata/locales/en_NZ 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_NZ 2006-08-24 06:33:25.000000000 +0000 @@ -47,7 +47,7 @@ category "en_NZ:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE @@ -111,8 +111,9 @@ mon "" d_fmt "" t_fmt "" -am_pm "";"" -t_fmt_ampm "" +am_pm "";"" +t_fmt_ampm "/ +" date_fmt "/ / " diff -uprN glibc-2.4/localedata/locales/en_PH glibc-2.5/localedata/locales/en_PH --- glibc-2.4/localedata/locales/en_PH 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_PH 2006-07-30 22:19:44.000000000 +0000 @@ -36,7 +36,7 @@ END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE @@ -49,7 +49,7 @@ END LC_COLLATE LC_MONETARY % This is the POSIX Locale definition the LC_MONETARY category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale defintion file +% These are generated based on XML base Locale defintion file % for IBM Class for Unicode. % int_curr_symbol "" @@ -84,7 +84,7 @@ END LC_NUMERIC LC_TIME % This is the POSIX Locale definition for the LC_TIME category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale difintion file +% These are generated based on XML base Locale difintion file % for IBM Class for Unicode. % % Abbreviated weekday names (%a) @@ -115,22 +115,22 @@ mon "";"";/ "";"" % -% Equivalent of AM PM +% Equivalent of AM PM am_pm "";"" % -% Appropriate date and time representation +% Appropriate date and time representation % %A, %d %B, %Y %I:%M:%S %Z d_t_fmt "" % -% Appropriate date representation +% Appropriate date representation % %A, %d %B, %Y d_fmt "" % -% Appropriate time representation +% Appropriate time representation % %I:%M:%S %Z t_fmt "" % -% Appropriate 12 h time representation (%r) +% Appropriate 12 h time representation (%r) t_fmt_ampm "" % END LC_TIME @@ -145,14 +145,14 @@ LC_MESSAGES % ^[yY] yesexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % yesexpr "" % % ^[nN] noexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % noexpr "" % @@ -177,8 +177,8 @@ END LC_PAPER LC_NAME % This is the ISO_IEC TR14652 Locale definition for the LC_NAME category % generated by IBM Basic CountryPack Transformer. -% -% +% +% name_fmt "" name_gen "" name_mr "" @@ -213,5 +213,3 @@ LC_MEASUREMENT measurement 1 END LC_MEASUREMENT - - diff -uprN glibc-2.4/localedata/locales/en_SG glibc-2.5/localedata/locales/en_SG --- glibc-2.4/localedata/locales/en_SG 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/en_SG 2006-07-30 22:19:44.000000000 +0000 @@ -33,7 +33,7 @@ category "en_SG:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE @@ -47,7 +47,7 @@ END LC_COLLATE LC_MONETARY % This is the POSIX Locale definition the LC_MONETARY category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale defintion file +% These are generated based on XML base Locale defintion file % for IBM Class for Unicode. % int_curr_symbol "" @@ -82,7 +82,7 @@ END LC_NUMERIC LC_TIME % This is the POSIX Locale definition for the LC_TIME category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale difintion file +% These are generated based on XML base Locale difintion file % for IBM Class for Unicode. % % Abbreviated weekday names (%a) @@ -113,22 +113,22 @@ mon "";"";/ "";"" % -% Equivalent of AM PM +% Equivalent of AM PM am_pm "";"" % -% Appropriate date and time representation +% Appropriate date and time representation % %A %d,%B,%Y %I:%M:%S %Z d_t_fmt "" % -% Appropriate date representation +% Appropriate date representation % %A %d,%B,%Y d_fmt "" % -% Appropriate time representation +% Appropriate time representation % %I:%M:%S %Z t_fmt "" % -% Appropriate 12 h time representation (%r) +% Appropriate 12 h time representation (%r) t_fmt_ampm "" % END LC_TIME @@ -143,14 +143,14 @@ LC_MESSAGES % ^[yY] yesexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % yesexpr "" % % ^[nN] noexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % noexpr "" % @@ -175,8 +175,8 @@ END LC_PAPER LC_NAME % This is the ISO_IEC TR14652 Locale definition for the LC_NAME category % generated by IBM Basic CountryPack Transformer. -% -% +% +% name_fmt "" name_gen "" name_mr "" diff -uprN glibc-2.4/localedata/locales/en_US glibc-2.5/localedata/locales/en_US --- glibc-2.4/localedata/locales/en_US 2005-09-30 00:00:42.000000000 +0000 +++ glibc-2.5/localedata/locales/en_US 2006-07-30 22:19:44.000000000 +0000 @@ -31,7 +31,7 @@ category "en_US:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE @@ -81,7 +81,7 @@ day " "";/ "" -week 7;19971201;4 +week 7;19971130;7 abmon "";"";/ "";"";/ "";"";/ diff -uprN glibc-2.4/localedata/locales/en_ZA glibc-2.5/localedata/locales/en_ZA --- glibc-2.4/localedata/locales/en_ZA 2004-12-14 20:59:44.000000000 +0000 +++ glibc-2.5/localedata/locales/en_ZA 2006-07-30 22:19:44.000000000 +0000 @@ -8,8 +8,8 @@ comment_char % % Fax: +27 12 3430389 % Language: en % Territory: ZA -% Revision: 1.2 -% Date: 2003-10-27 +% Revision: 1.2.1 +% Date: 2005-10-13 % Users: general % Repertoiremap: mnemonic,ds % Charset: ISO-8859-1 @@ -17,6 +17,9 @@ comment_char % % for commercial purposes. % % Changelog +% 1.2.1 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Update contact information % 1.2 (2004-10-27): % 2004-10-27 Dwayne Bailey % - Remove .* from LC_MESSAGES yes/noexpr @@ -28,7 +31,7 @@ comment_char % % 2003-05-17 Dwayne Bailey % - Add lang_ab, lang_term % - Add various comments for reference documents -% - Add country_isbn, country_car, country_ab2, +% - Add country_isbn, country_car, country_ab2, % country_ab3, country_num % - Add name_* for all salutations % 1.1 (2003-03-14): @@ -45,15 +48,15 @@ source "Zuza Software Foundation (Tr address "Box 28364, Sunnyside, 0132, South Africa" contact "Dwayne Bailey" email "dwayne@translate.org.za" -tel "+27 12 343 0389" -fax "+27 12 343 0389" +tel "+27 12 460 1095" +fax "+27 12 460 1095" language "English" territory "South Africa" % audience "" % application "" abbreviation "Translate.org.za" -revision "1.2" -date "2003-10-27" +revision "1.2.1" +date "2005-10-13" % category "en_ZA:2003";LC_IDENTIFICATION category "en_ZA:2000";LC_CTYPE @@ -71,7 +74,7 @@ category "en_ZA:2003";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "en_GB" END LC_CTYPE LC_COLLATE @@ -134,7 +137,7 @@ day "";/ "" -% abmon - The abbreviations for the months +% abmon - The abbreviations for the months % - Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec abmon "";"";/ "";"";/ @@ -143,7 +146,7 @@ abmon "";"";"";/ "";"" -% mon - The full names of the months - +% mon - The full names of the months - % - January, February, March, April, May, June % July, August, September, October, November, December mon "";/ @@ -266,7 +269,7 @@ name_gen "" % Salutation for unmarried females % "Miss" name_miss "" - + % Salutation for males % "Mr" name_mr "" diff -uprN glibc-2.4/localedata/locales/es_AR glibc-2.5/localedata/locales/es_AR --- glibc-2.4/localedata/locales/es_AR 2005-10-15 14:15:05.000000000 +0000 +++ glibc-2.5/localedata/locales/es_AR 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_BO glibc-2.5/localedata/locales/es_BO --- glibc-2.4/localedata/locales/es_BO 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_BO 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_CL glibc-2.5/localedata/locales/es_CL --- glibc-2.4/localedata/locales/es_CL 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_CL 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_CO glibc-2.5/localedata/locales/es_CO --- glibc-2.4/localedata/locales/es_CO 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_CO 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_CR glibc-2.5/localedata/locales/es_CR --- glibc-2.4/localedata/locales/es_CR 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_CR 2006-07-30 22:19:44.000000000 +0000 @@ -43,7 +43,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_DO glibc-2.5/localedata/locales/es_DO --- glibc-2.4/localedata/locales/es_DO 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_DO 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_EC glibc-2.5/localedata/locales/es_EC --- glibc-2.4/localedata/locales/es_EC 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_EC 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_US" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_ES glibc-2.5/localedata/locales/es_ES --- glibc-2.4/localedata/locales/es_ES 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_ES 2006-07-30 22:19:44.000000000 +0000 @@ -2114,6 +2114,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_ES@euro glibc-2.5/localedata/locales/es_ES@euro --- glibc-2.4/localedata/locales/es_ES@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_ES@euro 2006-07-30 22:19:44.000000000 +0000 @@ -43,7 +43,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_GT glibc-2.5/localedata/locales/es_GT --- glibc-2.4/localedata/locales/es_GT 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_GT 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_HN glibc-2.5/localedata/locales/es_HN --- glibc-2.4/localedata/locales/es_HN 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_HN 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_MX glibc-2.5/localedata/locales/es_MX --- glibc-2.4/localedata/locales/es_MX 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_MX 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES @@ -61,7 +61,7 @@ noexpr "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" mon_thousands_sep "" diff -uprN glibc-2.4/localedata/locales/es_NI glibc-2.5/localedata/locales/es_NI --- glibc-2.4/localedata/locales/es_NI 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_NI 2006-08-02 02:18:23.000000000 +0000 @@ -43,7 +43,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES @@ -108,8 +108,9 @@ mon "" d_fmt "" t_fmt "" -am_pm "";"" -t_fmt_ampm "" +t_fmt_ampm "/ +" +am_pm "";"" date_fmt "/ / " diff -uprN glibc-2.4/localedata/locales/es_PA glibc-2.5/localedata/locales/es_PA --- glibc-2.4/localedata/locales/es_PA 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_PA 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_PE glibc-2.5/localedata/locales/es_PE --- glibc-2.4/localedata/locales/es_PE 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_PE 2006-08-02 02:18:23.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES @@ -117,8 +117,9 @@ mon "" d_fmt "" t_fmt "" -am_pm "";"" -t_fmt_ampm "" +t_fmt_ampm "/ +" +am_pm "";"" date_fmt "/ / " diff -uprN glibc-2.4/localedata/locales/es_PR glibc-2.5/localedata/locales/es_PR --- glibc-2.4/localedata/locales/es_PR 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_PR 2006-07-30 22:19:44.000000000 +0000 @@ -43,7 +43,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_PY glibc-2.5/localedata/locales/es_PY --- glibc-2.4/localedata/locales/es_PY 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_PY 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_SV glibc-2.5/localedata/locales/es_SV --- glibc-2.4/localedata/locales/es_SV 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_SV 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_US glibc-2.5/localedata/locales/es_US --- glibc-2.4/localedata/locales/es_US 2005-09-30 00:02:09.000000000 +0000 +++ glibc-2.5/localedata/locales/es_US 2006-07-30 22:19:44.000000000 +0000 @@ -2129,7 +2129,7 @@ order_end END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/es_UY glibc-2.5/localedata/locales/es_UY --- glibc-2.4/localedata/locales/es_UY 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_UY 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES @@ -62,7 +62,7 @@ END LC_MESSAGES LC_MONETARY int_curr_symbol "" -currency_symbol "" +currency_symbol "" mon_decimal_point "" mon_thousands_sep "" mon_grouping 3;3 diff -uprN glibc-2.4/localedata/locales/es_VE glibc-2.5/localedata/locales/es_VE --- glibc-2.4/localedata/locales/es_VE 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/es_VE 2006-07-30 22:19:44.000000000 +0000 @@ -52,7 +52,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/et_EE glibc-2.5/localedata/locales/et_EE --- glibc-2.4/localedata/locales/et_EE 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/et_EE 2006-08-24 07:09:01.000000000 +0000 @@ -2121,6 +2121,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY @@ -2224,12 +2228,22 @@ name_fmt "/ -/ -/ -/ -" -country_ab2 "" -country_ab3 "" -country_num 233 +postal_fmt "/ + / + / + / + / + / + " +country_name "" +country_post "" +country_ab2 "" +country_ab3 "" +country_num 233 +country_car "" +country_isbn "" +lang_name "" +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/eu_ES glibc-2.5/localedata/locales/eu_ES --- glibc-2.4/localedata/locales/eu_ES 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/eu_ES 2006-07-30 22:19:44.000000000 +0000 @@ -55,7 +55,7 @@ copy "iso14651_t1" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/eu_ES@euro glibc-2.5/localedata/locales/eu_ES@euro --- glibc-2.4/localedata/locales/eu_ES@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/eu_ES@euro 2006-07-30 22:19:44.000000000 +0000 @@ -44,7 +44,7 @@ copy "iso14651_t1" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "eu_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/fa_IR glibc-2.5/localedata/locales/fa_IR --- glibc-2.4/localedata/locales/fa_IR 2005-04-27 03:41:09.000000000 +0000 +++ glibc-2.5/localedata/locales/fa_IR 2006-07-30 22:19:44.000000000 +0000 @@ -72,6 +72,10 @@ map to_inpunct; / map to_outpunct; / (,); / (,) + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/fi_FI glibc-2.5/localedata/locales/fi_FI --- glibc-2.4/localedata/locales/fi_FI 2006-01-02 20:00:57.000000000 +0000 +++ glibc-2.5/localedata/locales/fi_FI 2006-07-30 22:19:44.000000000 +0000 @@ -2119,6 +2119,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/fi_FI@euro glibc-2.5/localedata/locales/fi_FI@euro --- glibc-2.4/localedata/locales/fi_FI@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/fi_FI@euro 2006-07-30 22:19:44.000000000 +0000 @@ -44,7 +44,7 @@ copy "fi_FI" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "fi_FI" END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/fo_FO glibc-2.5/localedata/locales/fo_FO --- glibc-2.4/localedata/locales/fo_FO 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/fo_FO 2006-07-30 22:19:44.000000000 +0000 @@ -50,7 +50,7 @@ category "fo_FO:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "da_DK" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/fy_NL glibc-2.5/localedata/locales/fy_NL --- glibc-2.4/localedata/locales/fy_NL 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/fy_NL 2006-08-13 20:15:48.000000000 +0000 @@ -0,0 +1,139 @@ +comment_char % +escape_char / +% +% Frisian Language Locale for the Netherlands +% Language: fy +% Territory: NL +% Date: 2006-8-13 +% Users: general +% Charset: ISO-8859-1 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Frisian locale for the Netherlands" +source "Free Software Foundation, Inc." +address "59 Temple Place - Suite 330, Boston, MA 02111-1307, USA" +contact "" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Frisian" +territory "Netherlands" +revision "1.0" +date "2006-08-13" +% +category "fy_NL:2000";LC_IDENTIFICATION +category "fy_NL:2000";LC_CTYPE +category "fy_NL:2000";LC_COLLATE +category "fy_NL:2000";LC_TIME +category "fy_NL:2000";LC_NUMERIC +category "fy_NL:2000";LC_MONETARY +category "fy_NL:2000";LC_MEASUREMENT +category "fy_NL:2000";LC_MESSAGES +category "fy_NL:2000";LC_PAPER +category "fy_NL:2000";LC_NAME +category "fy_NL:2000";LC_ADDRESS +category "fy_NL:2000";LC_TELEPHONE +END LC_IDENTIFICATION + +LC_CTYPE +copy "nl_NL" +END LC_CTYPE + +LC_COLLATE +copy "nl_NL" +END LC_COLLATE + +LC_TIME +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +d_t_fmt "" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ +/ +" +END LC_TIME + +LC_NUMERIC +copy "nl_NL" +END LC_NUMERIC + +LC_MONETARY +copy "nl_NL" +END LC_MONETARY + +LC_MEASUREMENT +copy "nl_NL" +END LC_MEASUREMENT + +LC_MESSAGES +copy "nl_NL" +END LC_MESSAGES + +LC_PAPER +copy "nl_NL" +END LC_PAPER + +LC_NAME +copy "nl_NL" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_ab2 "" +country_ab3 "" +country_num 528 +country_car "" +lang_name "" +lang_ab "" +lang_term "" +lang_lib "" +END LC_ADDRESS + +LC_TELEPHONE +copy "nl_NL" +END LC_TELEPHONE diff -uprN glibc-2.4/localedata/locales/ga_IE glibc-2.5/localedata/locales/ga_IE --- glibc-2.4/localedata/locales/ga_IE 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/ga_IE 2006-07-30 22:19:44.000000000 +0000 @@ -45,6 +45,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ga_IE@euro glibc-2.5/localedata/locales/ga_IE@euro --- glibc-2.4/localedata/locales/ga_IE@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/ga_IE@euro 2006-07-30 22:19:44.000000000 +0000 @@ -38,7 +38,7 @@ category "ga_IE@euro:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ga_IE" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/gez_ER glibc-2.5/localedata/locales/gez_ER --- glibc-2.4/localedata/locales/gez_ER 2003-11-04 04:54:11.000000000 +0000 +++ glibc-2.5/localedata/locales/gez_ER 2006-07-30 22:19:44.000000000 +0000 @@ -110,7 +110,7 @@ country_num 232 % country_car unknown % country_isbn unknown, Need ISO 2108 lang_name "" -lang_ab "" +%lang_ab "" lang_term "" % % Petter Reinholdtsen reports uncommenting the below breaks compilation diff -uprN glibc-2.4/localedata/locales/gez_ET glibc-2.5/localedata/locales/gez_ET --- glibc-2.4/localedata/locales/gez_ET 2003-11-04 04:55:07.000000000 +0000 +++ glibc-2.5/localedata/locales/gez_ET 2006-07-30 22:19:44.000000000 +0000 @@ -110,7 +110,7 @@ country_num 231 % 210 found in at le % country_car unknown % country_isbn unknown, Need ISO 2108 lang_name "" -lang_ab "" +%lang_ab "" lang_term "" % % Petter Reinholdtsen reports uncommenting the below breaks compilation diff -uprN glibc-2.4/localedata/locales/gl_ES glibc-2.5/localedata/locales/gl_ES --- glibc-2.4/localedata/locales/gl_ES 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/gl_ES 2006-07-30 22:19:43.000000000 +0000 @@ -51,7 +51,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "es_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/gl_ES@euro glibc-2.5/localedata/locales/gl_ES@euro --- glibc-2.4/localedata/locales/gl_ES@euro 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/gl_ES@euro 2006-07-30 22:19:43.000000000 +0000 @@ -44,7 +44,7 @@ copy "es_ES" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "gl_ES" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/gu_IN glibc-2.5/localedata/locales/gu_IN --- glibc-2.4/localedata/locales/gu_IN 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/gu_IN 2006-07-30 22:19:43.000000000 +0000 @@ -34,6 +34,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/gv_GB glibc-2.5/localedata/locales/gv_GB --- glibc-2.4/localedata/locales/gv_GB 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/gv_GB 2006-07-30 22:19:43.000000000 +0000 @@ -1,7 +1,7 @@ escape_char / comment_char % -% WARNING: UNOFFICIAL; EXPERIMENTAL. CHECK WITH Keld Simonsen +% WARNING: UNOFFICIAL; EXPERIMENTAL. CHECK WITH Keld Simonsen % to see if there is an offical release for Manx Gaelic. % Manx Gaelic language locale for Britain @@ -50,6 +50,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/he_IL glibc-2.5/localedata/locales/he_IL --- glibc-2.4/localedata/locales/he_IL 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/he_IL 2006-07-30 22:19:43.000000000 +0000 @@ -52,6 +52,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/hi_IN glibc-2.5/localedata/locales/hi_IN --- glibc-2.4/localedata/locales/hi_IN 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/hi_IN 2006-07-30 22:19:43.000000000 +0000 @@ -33,6 +33,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/hr_HR glibc-2.5/localedata/locales/hr_HR --- glibc-2.4/localedata/locales/hr_HR 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/hr_HR 2006-07-30 22:19:43.000000000 +0000 @@ -2138,6 +2138,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/hu_HU glibc-2.5/localedata/locales/hu_HU --- glibc-2.4/localedata/locales/hu_HU 2005-10-14 20:30:03.000000000 +0000 +++ glibc-2.5/localedata/locales/hu_HU 2006-05-01 17:52:03.000000000 +0000 @@ -527,11 +527,11 @@ day "";/ "";/ "" -abmon "";"";/ - "";"";/ +abmon "";"";/ + "";"";/ "";"";/ "";"";/ - "";"";/ + "";"";/ "";"" mon "";/ "";/ diff -uprN glibc-2.4/localedata/locales/hy_AM glibc-2.5/localedata/locales/hy_AM --- glibc-2.4/localedata/locales/hy_AM 2004-03-23 07:36:58.000000000 +0000 +++ glibc-2.5/localedata/locales/hy_AM 2006-07-30 22:19:43.000000000 +0000 @@ -1,16 +1,16 @@ escape_char / comment_char % -% charset "ARMSCII-8" +% Charset: UTF-8 % Distribution and use is free, also for commercial purposes. LC_IDENTIFICATION title "Armenian language locale for Armenia" -source "http://moon.yerphi.am/~hovik/ArmSCII/ArmCS-005.html" +source "http://www.freenet.am/armscii" % Eugene Sevinian completed % LC_MONETARY and LC_TIME address "" contact "Pablo Saratxaga" -email "srtxg@chanae.alphanet.ch" +email "pablo@mandrakesoft.com" tel "" fax "" language "Armenian" @@ -18,17 +18,17 @@ territory "Armenia" revision "0.4" date "2001-01-26" -category hy_AM:2000;LC_IDENTIFICATION -category hy_AM:2000;LC_COLLATE -category hy_AM:2000;LC_CTYPE -category hy_AM:2000;LC_MESSAGES -category hy_AM:2000;LC_MONETARY -category hy_AM:2000;LC_NUMERIC -category hy_AM:2000;LC_TIME -category hy_AM:2000;LC_PAPER -category hy_AM:2000;LC_MEASUREMENT -category hy_AM:2000;LC_TELEPHONE -category hy_AM:2000;LC_ADDRESS +category "hy_AM:2000";LC_IDENTIFICATION +category "hy_AM:2000";LC_COLLATE +category "hy_AM:2000";LC_CTYPE +category "hy_AM:2000";LC_MESSAGES +category "hy_AM:2000";LC_MONETARY +category "hy_AM:2000";LC_NUMERIC +category "hy_AM:2000";LC_TIME +category "hy_AM:2000";LC_PAPER +category "hy_AM:2000";LC_MEASUREMENT +category "hy_AM:2000";LC_TELEPHONE +category "hy_AM:2000";LC_ADDRESS % ISO/IEC 14652: Converted comments to LC_IDENTIFICATION % added LC_PAPER, LC_MEASUREMENT, LC_TELEPHONE @@ -67,140 +67,15 @@ END LC_IDENTIFICATION %%%%%%%%%%%% LC_COLLATE - -% Armenian sorting is not yet on iso14651_t1 - -script - -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol - - copy "iso14651_t1" - -order_start ;forward;forward;forward;forward,position - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE -order_end - -reorder-sections-after - -reorder-sections-end - END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY @@ -277,8 +152,8 @@ END LC_TIME LC_MESSAGES yesstr "" nostr "" -yesexpr "" -noexpr "" +yesexpr "" +noexpr "" END LC_MESSAGES % Metric Measurement system (ISO 1000) @@ -303,20 +178,23 @@ LC_ADDRESS postal_fmt "/ / " -% FIXME country_name "Armenia" in Armenian +country_name "" % FIXME country_post for Armenia? country_ab2 "" country_ab3 "" country_num 51 -% FIXME country_car for Armenia ? +country_car "" country_isbn "" -% FIXME lang_name Armenian in Armenian +lang_name "" lang_ab "" lang_term "" lang_lib "" END LC_ADDRESS LC_NAME -% FIXME -name_fmt "???" +name_fmt "/ +" +name_miss "" +name_mr "" +name_mrs "" END LC_NAME diff -uprN glibc-2.4/localedata/locales/id_ID glibc-2.5/localedata/locales/id_ID --- glibc-2.4/localedata/locales/id_ID 2004-10-31 23:42:26.000000000 +0000 +++ glibc-2.5/localedata/locales/id_ID 2006-07-30 22:19:43.000000000 +0000 @@ -48,6 +48,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/is_IS glibc-2.5/localedata/locales/is_IS --- glibc-2.4/localedata/locales/is_IS 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/is_IS 2006-07-30 22:19:43.000000000 +0000 @@ -2157,6 +2157,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/it_CH glibc-2.5/localedata/locales/it_CH --- glibc-2.4/localedata/locales/it_CH 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/it_CH 2006-07-30 22:19:43.000000000 +0000 @@ -40,7 +40,7 @@ category "it_CH:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "it_IT" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/it_IT glibc-2.5/localedata/locales/it_IT --- glibc-2.4/localedata/locales/it_IT 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/it_IT 2006-07-30 22:19:43.000000000 +0000 @@ -51,6 +51,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/it_IT@euro glibc-2.5/localedata/locales/it_IT@euro --- glibc-2.4/localedata/locales/it_IT@euro 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/it_IT@euro 2006-07-30 22:19:43.000000000 +0000 @@ -43,7 +43,7 @@ copy "iso14651_t1" END LC_COLLATE LC_CTYPE -copy "i18n" +copy "it_IT" END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/iw_IL glibc-2.5/localedata/locales/iw_IL --- glibc-2.4/localedata/locales/iw_IL 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/iw_IL 2006-07-30 22:19:43.000000000 +0000 @@ -51,6 +51,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ja_JP glibc-2.5/localedata/locales/ja_JP --- glibc-2.4/localedata/locales/ja_JP 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/ja_JP 2006-07-30 22:19:43.000000000 +0000 @@ -1672,6 +1672,7 @@ tojkata (,);(,;/ ;/ @@ -894,6 +890,10 @@ tolower (,);/ (,);/ (,) +translit_start +include "translit_combining";"" +translit_end + END LC_CTYPE LC_COLLATE @@ -1782,7 +1782,7 @@ abday "";/ "";/ "";/ "" - + day "";/ "";/ "";/ diff -uprN glibc-2.4/localedata/locales/kn_IN glibc-2.5/localedata/locales/kn_IN --- glibc-2.4/localedata/locales/kn_IN 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/kn_IN 2006-07-30 22:19:43.000000000 +0000 @@ -35,6 +35,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ko_KR glibc-2.5/localedata/locales/ko_KR --- glibc-2.4/localedata/locales/ko_KR 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/ko_KR 2006-07-30 22:19:43.000000000 +0000 @@ -6091,6 +6091,7 @@ hanja ..;..; translit_start +include "translit_combining";"" include "translit_hangul";"" translit_end diff -uprN glibc-2.4/localedata/locales/kw_GB glibc-2.5/localedata/locales/kw_GB --- glibc-2.4/localedata/locales/kw_GB 2005-10-15 01:19:34.000000000 +0000 +++ glibc-2.5/localedata/locales/kw_GB 2006-07-30 22:19:43.000000000 +0000 @@ -51,6 +51,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ky_KG glibc-2.5/localedata/locales/ky_KG --- glibc-2.4/localedata/locales/ky_KG 2005-09-24 16:07:41.000000000 +0000 +++ glibc-2.5/localedata/locales/ky_KG 2006-07-30 22:19:43.000000000 +0000 @@ -79,6 +79,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/lg_UG glibc-2.5/localedata/locales/lg_UG --- glibc-2.4/localedata/locales/lg_UG 2004-03-23 07:36:58.000000000 +0000 +++ glibc-2.5/localedata/locales/lg_UG 2006-07-30 22:19:43.000000000 +0000 @@ -50,6 +50,10 @@ LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" % copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -327,4 +331,3 @@ postal_fmt "" country_num 800 END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/lt_LT glibc-2.5/localedata/locales/lt_LT --- glibc-2.4/localedata/locales/lt_LT 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/lt_LT 2006-07-30 22:19:43.000000000 +0000 @@ -2124,6 +2124,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/lv_LV glibc-2.5/localedata/locales/lv_LV --- glibc-2.4/localedata/locales/lv_LV 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/lv_LV 2006-07-30 22:19:43.000000000 +0000 @@ -2116,6 +2116,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/mk_MK glibc-2.5/localedata/locales/mk_MK --- glibc-2.4/localedata/locales/mk_MK 2004-03-23 07:36:58.000000000 +0000 +++ glibc-2.5/localedata/locales/mk_MK 2006-09-20 17:27:26.000000000 +0000 @@ -1,8 +1,8 @@ comment_char % escape_char / % Macedonian language locale for Macedonia -% Damjan Georgievski -% Revision: 1.8 (2000-11-07) +% Damjan Georgievski { gdamjan %% gmail.com } +% Revision: 2.2 (2006-09-12) % Charsets: UTF-8, ISO-8859-5, CP1251 % Distribution and use is free, also % for commercial purposes. @@ -11,14 +11,14 @@ LC_IDENTIFICATION title "Macedonian locale for Macedonia" source "" address "" -contact "Damjan Georgievski" -email "gdamjan@freemail.org.mk" +contact "Damjan Georgievski" +email "bug-glibc-locales@gnu.org" tel "" fax "" language "Macedonian" territory "Macedonia" -revision "1.8" -date "2000-11-07" +revision "2.2" +date "2006-09-12" % category "mk_MK:2000";LC_IDENTIFICATION category "mk_MK:2000";LC_CTYPE @@ -40,13 +40,17 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_TIME abday "";"";/ "";"";/ "";"";/ -"" +"" day "";/ "";/ "";/ @@ -78,9 +82,12 @@ d_fmt "" am_pm "";"" t_fmt_ampm "" -date_fmt "/ +date_fmt "/ / " +week 7;19971201;4 +first_weekday 1 % Monday +first_workday 1 % Monday END LC_TIME LC_MONETARY @@ -161,4 +168,3 @@ END LC_PAPER LC_MEASUREMENT measurement 1 END LC_MEASUREMENT - diff -uprN glibc-2.4/localedata/locales/ml_IN glibc-2.5/localedata/locales/ml_IN --- glibc-2.4/localedata/locales/ml_IN 2005-10-15 01:21:19.000000000 +0000 +++ glibc-2.5/localedata/locales/ml_IN 2006-08-19 15:40:45.000000000 +0000 @@ -90,10 +90,10 @@ abday "";"" % % Full weekday names (%A) -day "";/ -"";/ +day "";/ +"";/ "";/ -"";/ +"";/ "";/ "";/ "" @@ -101,30 +101,30 @@ day "";/ "";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ -"";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ +"";/ "";/ "" % % FULL month names (%B) mon "";/ "";/ -"";/ -"";/ +"";/ +"";/ "";/ -"";/ +"";/ "";/ -"";/ -"";/ -"";/ -"";/ -"" +"";/ +"";/ +"";/ +"";/ +"" % % % Equivalent of AM PM diff -uprN glibc-2.4/localedata/locales/mr_IN glibc-2.5/localedata/locales/mr_IN --- glibc-2.4/localedata/locales/mr_IN 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/mr_IN 2006-07-30 22:19:43.000000000 +0000 @@ -33,6 +33,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ms_MY glibc-2.5/localedata/locales/ms_MY --- glibc-2.4/localedata/locales/ms_MY 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/ms_MY 2006-07-30 22:19:43.000000000 +0000 @@ -35,6 +35,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/mt_MT glibc-2.5/localedata/locales/mt_MT --- glibc-2.4/localedata/locales/mt_MT 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/mt_MT 2006-07-30 22:19:43.000000000 +0000 @@ -36,6 +36,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nb_NO glibc-2.5/localedata/locales/nb_NO --- glibc-2.4/localedata/locales/nb_NO 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/nb_NO 2006-07-30 22:19:43.000000000 +0000 @@ -2125,6 +2125,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/ne_NP glibc-2.5/localedata/locales/ne_NP --- glibc-2.4/localedata/locales/ne_NP 2003-12-04 04:49:56.000000000 +0000 +++ glibc-2.5/localedata/locales/ne_NP 2006-07-30 22:19:43.000000000 +0000 @@ -1,7 +1,7 @@ comment_char % escape_char / % Nepali language locale for Nepal. -% Contributed by Pawan Chitrakar +% Contributed by Pawan Chitrakar LC_IDENTIFICATION title "Nepali language locale for Nepal" @@ -32,6 +32,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nl_BE glibc-2.5/localedata/locales/nl_BE --- glibc-2.4/localedata/locales/nl_BE 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/nl_BE 2006-07-30 22:19:43.000000000 +0000 @@ -47,7 +47,7 @@ category "nl_BE:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "nl_NL" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nl_BE@euro glibc-2.5/localedata/locales/nl_BE@euro --- glibc-2.4/localedata/locales/nl_BE@euro 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/nl_BE@euro 2006-07-30 22:19:43.000000000 +0000 @@ -39,7 +39,7 @@ category "nl_BE@euro:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "nl_BE" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nl_NL glibc-2.5/localedata/locales/nl_NL --- glibc-2.4/localedata/locales/nl_NL 2005-10-14 17:36:24.000000000 +0000 +++ glibc-2.5/localedata/locales/nl_NL 2006-07-30 22:19:43.000000000 +0000 @@ -47,6 +47,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nl_NL@euro glibc-2.5/localedata/locales/nl_NL@euro --- glibc-2.4/localedata/locales/nl_NL@euro 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/nl_NL@euro 2006-07-30 22:19:43.000000000 +0000 @@ -39,7 +39,7 @@ category "nl_NL@euro:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "nl_NL" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/nn_NO glibc-2.5/localedata/locales/nn_NO --- glibc-2.4/localedata/locales/nn_NO 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/nn_NO 2006-08-22 17:05:13.000000000 +0000 @@ -32,7 +32,7 @@ category "nn_NO:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "nb_NO" END LC_CTYPE LC_COLLATE @@ -65,12 +65,7 @@ END LC_MONETARY LC_NUMERIC -% This is the POSIX Locale definition for the LC_NUMERIC category. -% -decimal_point "" -thousands_sep "" -grouping 3 -% +copy "nb_NO" END LC_NUMERIC @@ -151,40 +146,25 @@ END LC_MESSAGES LC_PAPER -height 297 -width 210 +copy "nb_NO" END LC_PAPER LC_NAME -name_fmt "/ -" +copy "nb_NO" END LC_NAME LC_ADDRESS -postal_fmt "/ -/ -/ -/ -" -country_ab2 "" -country_ab3 "" -country_num 578 +copy "nb_NO" END LC_ADDRESS LC_TELEPHONE -tel_int_fmt "" -tel_dom_fmt "" -int_select "" -int_prefix "" +copy "nb_NO" END LC_TELEPHONE LC_MEASUREMENT -% This is the ISO_IEC TR14652 Locale definition for the -% -measurement 1 - +copy "nb_NO" END LC_MEASUREMENT diff -uprN glibc-2.4/localedata/locales/nr_ZA glibc-2.5/localedata/locales/nr_ZA --- glibc-2.4/localedata/locales/nr_ZA 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/nr_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -0,0 +1,284 @@ +escape_char / +comment_char % + +% Charset: UTF-8 + +% ChangeLog +% 0.3 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Added 'Charset: UTF-8' information +% - Update contact information +% - Allign spellings of month and weekday names with Dept. of +% Art and Culture's: Multilingual Mathematics Dictionary +% 0.2 (2004-11-09): +% 2004-11-09 Dwayne Bailey +% - escape everything +% - Update all contact information +% - Change %d to %-e for d_t_fmt and date_fmt +% - Reset yes/noexpr to English +% - set all abmon, mon, abday, day to English until correct defintions +% are available. +% 2004-03-30 Dwayne Bailey +% - Added country_ab2/3, country_num +% 2004-02-27 Dwayne Bailey +% - Correct capatilisation of lang_name +% 0.1 (2004-02-24): +% - Initial Southern Ndebele locale for South Africa +% by Zuza Software Foundation + +LC_IDENTIFICATION +title "Southern Ndebele locale for South Africa" +source "Zuza Software Foundation (Translate.org.za)" +address "PO Box 28364, Sunnyside, 0132, South Africa" +contact "Dwayne Bailey" +email "dwayne@translate.org.za" +tel "+27 12 460 1095" +fax "+27 12 460 1095" +language "Southern Ndebele" +territory "South Africa" +revision "0.3" +date "2005-10-13" +% +category "nr_ZA:2004";LC_IDENTIFICATION +category "nr_ZA:2004";LC_CTYPE +category "nr_ZA:2004";LC_COLLATE +category "nr_ZA:2004";LC_TIME +category "nr_ZA:2004";LC_NUMERIC +category "nr_ZA:2004";LC_MONETARY +category "nr_ZA:2004";LC_MESSAGES +category "nr_ZA:2004";LC_PAPER +category "nr_ZA:2004";LC_NAME +category "nr_ZA:2004";LC_ADDRESS +category "nr_ZA:2004";LC_TELEPHONE +category "nr_ZA:2004";LC_MEASUREMENT + +END LC_IDENTIFICATION + +LC_CTYPE +% Use the characters described in the charmap file "i18n.tgz" +copy "i18n" + +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE + +LC_COLLATE +% Copy the template from ISO/IEC 14651 i.e. +% use the rules there when making ordered lists of words. +copy "iso14651_t1" +END LC_COLLATE + +LC_MONETARY +copy "en_ZA" +END LC_MONETARY + +LC_NUMERIC +copy "en_ZA" +END LC_NUMERIC + +LC_TIME + +% abday - The abbreviations for the week days: +% - Son, Mvu, Bil, Tha, Ne, Hla, Gqi +abday "";"";/ + "";"";/ + "";"";/ + "" + +% day - The full names of the week days: +% - uSonto, uMvulo, uLesibili, lesithathu, uLesine, ngoLesihlanu, umGqibelo +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% abmon - The abbreviations for the months +% - Jan, Feb, Mat, Apr, Mey, Jun, Jul, Arh, Sep, Okt, Usi, Dis +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" + +% mon - The full names of the months - +% - Janabari, uFeberbari, uMatjhi, u-Apreli, Meyi, Juni +% Julayi, Arhostosi, Septemba, Oktoba, Usinyikhaba, Disemba +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% Abreviated date and time representation to be referenced by the "%c" field descriptor - +d_t_fmt "" +% +% "%a" (short weekday name), +% "%-e" (day of month as a decimal number), +% "%b" (short month name), +% "%Y" (year with century as a decimal number), +% "%T" (24-hour clock time in format HH:MM:SS), +% "%Z" (Time zone name) + +% Date representation to be referenced by the "%x" field descriptor - +d_fmt "" +% "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). + +% Time representation to be referenced by the "%X" field descriptor - +t_fmt "" +% "%T" (24-hour clock time in format HH:MM:SS) + +% Define representation of ante meridiem and post meridiem strings - +am_pm "";"" +% The "" mean 'default to "AM" and "PM". + +% Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" +t_fmt_ampm "" +% The "" means that this format is not supported. + +% Date representation not described in ISO/IEC 14652. Comes out as - +% "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output +date_fmt "/ +/ +" +% +% %a - abbreviated weekday name, +% %b - abreviated month name, +% %-e - day of month as a decimal number with leading space (1 to 31), +% %H - hour (24-hour clock) as a decimal number (00 to 23), +% %M - minute as a decimal number (00 to 59), +% %S - seconds as a decimal number (00 to 59), +% %Z - time-zone name, +% %Y - year with century as a decimal number,e.g. 2001. + +END LC_TIME + +LC_MESSAGES +% FIXME: Check both of these +% The affirmative response - TODO +% "^[yY]" +yesexpr "" + +% The negative response - TODO +% "^[nN]" +noexpr "" +END LC_MESSAGES + +LC_PAPER +copy "en_ZA" +END LC_PAPER + +LC_TELEPHONE +copy "en_ZA" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "en_ZA" +END LC_MEASUREMENT + +LC_NAME +% Format for addressing a person. +name_fmt "/ +" +% "%d%t%g%t%m%t%f" +% "Salutation", +% "Empty string, or ", +% "First given name", +% "Empty string, or ", +% "Middle names", +% "Empty string, or ", +% "Clan names" + +% FIXME - define all the following name_* +% General salutation for any sex +% name_gen "" + +% Salutation for unmarried females - "" +% name_miss "" + +% Salutation for males - "" +% name_mr "" + +% Salutation for married females - "" +% name_mrs "" + +% Salutation valid for all females - "" (no term) +% name_ms "" + +END LC_NAME + +LC_ADDRESS +% Country name in Southern Ndebele - "iSewula Afrika" +country_name "" + +% Abbreviated country postal name - "ZA" +country_post "" + +% UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic +% http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf +% "ZA" +country_car "" + +% FIXME define the following correctly +% country_isbn "" +% country_num + +% Language name in Southern Ndebele - "IsiNdebele" +lang_name "" + +% ISO 639 two and three letter language names +% see http://www.loc.gov/standards/iso639-2/englangn.html +% "nr", "nbl" +lang_ab "" +lang_term "" + +% Representation of postal addresses (minus the addressee's name) in South +% Africa. (Ignored for now) +postal_fmt "/ +/ +/ +/ +" +% "%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N", which gives - +% "firm name", +% "end of line", +% "C/O address", +% "end of line", +% "department name", +% "Building name", +% "end of line", +% "street or block name", +% "space", +% "house number or designation", +% "space", +% "floor number", +% "space", +% "room number, door designation", +% "end of line", +% "postal code", +% "space", +% "town, city", +% "end of line", +% "country designation for the keyword", +% "end of line +% + +% ISO 3166 country number and 2 and 3 letter abreviations +% http://www.unicode.org/onlinedat/countries.html +% "ZA", "ZAF" +country_num 710 +country_ab2 "" +country_ab3 "" + +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/om_KE glibc-2.5/localedata/locales/om_KE --- glibc-2.4/localedata/locales/om_KE 2003-11-04 04:56:22.000000000 +0000 +++ glibc-2.5/localedata/locales/om_KE 2006-07-30 22:19:43.000000000 +0000 @@ -132,6 +132,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/or_IN glibc-2.5/localedata/locales/or_IN --- glibc-2.4/localedata/locales/or_IN 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/or_IN 2006-09-05 15:31:29.000000000 +0000 @@ -0,0 +1,811 @@ +comment_char % +escape_char / + +% Oriya locale for India. +% Contributed by Masahide Washizawa + +%%%%%%%%%%%%% +LC_IDENTIFICATION +title "Oriya language locale for India" +source "IBM AP Linux Technology Center, Yamato Software Laboratory" +address "1623-14, Shimotsuruma, Yamato-shi, Kanagawa-ken, 242-8502, Japan" +contact "" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Oriya" +territory "India" +revision "1.0" +date "2006-05-25" +% +category "or_IN:2004";LC_IDENTIFICATION +category "or_IN:2004";LC_CTYPE +category "or_IN:2004";LC_COLLATE +category "or_IN:2004";LC_TIME +category "or_IN:2004";LC_NUMERIC +category "or_IN:2004";LC_MONETARY +category "or_IN:2004";LC_MESSAGES +category "or_IN:2004";LC_PAPER +category "or_IN:2004";LC_NAME +category "or_IN:2004";LC_ADDRESS +category "or_IN:2004";LC_TELEPHONE +END LC_IDENTIFICATION + +%%%%%%%%%%%%% +LC_CTYPE +copy "i18n" + +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE + +%%%%%%%%%%%%% +LC_COLLATE + +collating-element from "" +collating-element from "" +collating-element from "" + +% Define collation weights as symbols + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +order_start forward;forward;forward;forward + + +% collation weights in order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +% assignment of characters to weights + + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + IGNORE;IGNORE;IGNORE; + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;"";"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";;"";IGNORE + "";;"";"" + "";;"";"" + "";;"";"" + "";;"";"" + "";;"";IGNORE +% FIXME ORIYA_LETTER_WA "";;"";IGNORE +% FIXME ORIYA_LETTER_VA "";;"";IGNORE +% ORIYA_LETTER_WA and ORIYA_LETTER_VA are not defined in unicode 3.0 + "";;"";IGNORE + "";;"";IGNORE + "";;"";IGNORE + "";;"";IGNORE + "";;"";IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +UNDEFINED IGNORE;IGNORE;IGNORE;%... + +order_end +END LC_COLLATE + +%%%%%%%%%%%%% +LC_NUMERIC +decimal_point "" +thousands_sep "" +grouping 3;2 +END LC_NUMERIC + +%%%%%%%%%%%%% +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;2 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 1 +p_sep_by_space 1 +n_cs_precedes 1 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 +int_p_cs_precedes 1 +int_p_sep_by_space 1 +int_n_cs_precedes 1 +int_n_sep_by_space 1 +int_p_sign_posn 1 +int_n_sign_posn 1 +END LC_MONETARY + +%%%%%%%%%%%%% +LC_TIME +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% d_fmt "%Od-%Om-%Oy" +d_fmt "" +% t_fmt "%OI:%OM:%OS %p" +t_fmt "" +% d_t_fmt "%Oe %B %Oy %OI:%OM:%OS %p %Z" +d_t_fmt "" +am_pm "";"" +% t_fmt_ampm "%OI:%OM:%OS %p" +t_fmt_ampm "" +alt_digits "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +END LC_TIME + +%%%%%%%%%%%%% +LC_MESSAGES +% FIXME These need support for the translated words +yesexpr "" +noexpr "" +END LC_MESSAGES + +%%%%%%%%%%%%% +LC_PAPER +copy "hi_IN" +END LC_PAPER + +%%%%%%%%%%%%% +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the +% LC_NAME category. +% +name_fmt "/ +" +name_gen "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" +END LC_NAME + +%%%%%%%%%%%%% +LC_ADDRESS +% This is the ISO_IEC TR14652 Locale definition for the +% LC_ADDRESS +postal_fmt "/ +" +END LC_ADDRESS + +%%%%%%%%%%%%% +LC_TELEPHONE +% This is the ISO_IEC TR14652 Locale definition for the +tel_int_fmt "" +int_prefix "" +int_select "" +END LC_TELEPHONE + +%%%%%%%%%%%%% +LC_MEASUREMENT +copy "hi_IN" +END LC_MEASUREMENT diff -uprN glibc-2.4/localedata/locales/pa_IN glibc-2.5/localedata/locales/pa_IN --- glibc-2.4/localedata/locales/pa_IN 2005-06-08 20:22:49.000000000 +0000 +++ glibc-2.5/localedata/locales/pa_IN 2006-08-13 05:47:24.000000000 +0000 @@ -31,7 +31,7 @@ category "pa_IN:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "pa_PK" END LC_CTYPE @@ -89,7 +89,7 @@ day "< "";/ "";/ "";/ - "" + "" % Abbreviated month names (%b) diff -uprN glibc-2.4/localedata/locales/pa_PK glibc-2.5/localedata/locales/pa_PK --- glibc-2.4/localedata/locales/pa_PK 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/pa_PK 2006-04-24 06:55:34.000000000 +0000 @@ -0,0 +1,187 @@ +comment_char % +escape_char / +% +% Punjabi (Shamukhi) Language Locale for Pakistan +% Source: +% Contact: Amanpreet Singh Alam +% Email: amanpreetalam@yahoo.com +% Language: pa +% Territory: PK +% Revision: 0.1 +% Date: 2005-12-31 +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Punjabi (Shahmukhi) Language Locale for Pakistan" +source "" +address "" +contact "" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Punjabi (Shahmukhi)" +territory "Pakistan" +revision "0.3" +date "2000-07-11" +% +category "pa_PK:2000";LC_IDENTIFICATION +category "pa_PK:2000";LC_CTYPE +category "pa_PK:2000";LC_COLLATE +category "pa_PK:2000";LC_TIME +category "pa_PK:2000";LC_NUMERIC +category "pa_PK:2000";LC_MONETARY +category "pa_PK:2000";LC_MESSAGES +category "pa_PK:2000";LC_PAPER +category "pa_PK:2000";LC_NAME +category "pa_PK:2000";LC_ADDRESS +category "pa_PK:2000";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "i18n" +translit_start +include "translit_combining";"" + +% those two lettes are not in cp1256... + +% Maddah above -> Alef with madda above + "" +% Farsi yeh -> yeh + "" + +translit_end +END LC_CTYPE + +LC_COLLATE +copy "en_DK" +END LC_COLLATE + +LC_MONETARY +copy "ur_PK" +END LC_MONETARY + +LC_NUMERIC +copy "ur_PK" +END LC_NUMERIC + +% Since their is no abbreviated version of the days in urdu I have used the +% full names of the days +% Using only the first letters of the day would have caused a conflict here +% as both "Jumairat(Thurs)" and "Juma(Friday)" have the same starting letter +% Jeem +LC_TIME + +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% Date Time Format +d_t_fmt "" + +% date Format. I have put this in reverse order to try to get the date +% in R->L order +d_fmt "" + +% time format +t_fmt "" + +% stands for +% stands for +am_pm "";"" + +%time format in 12 hour clock +t_fmt_ampm "" + +% display columns right to left ? +cal_direction 3 +END LC_TIME + +LC_MESSAGES + +% locale based messages +% Can we put in the values for a cancel exression here?? I found a term that +% would define cancel appropriately +% = , the last tag is for noon-ghunna! +% = +% again and are place holders +% = +yesstr "" +nostr "" +yesexpr "" +noexpr "" + +END LC_MESSAGES + +%Draft Finished: 17:00 09/07/2000 + +LC_PAPER +copy "ur_PK" +END LC_PAPER + +LC_MEASUREMENT +copy "ur_PK" +END LC_MEASUREMENT + +LC_NAME +% FIXME +copy "ur_PK" +END LC_NAME + +LC_ADDRESS +% FIXME +postal_fmt "/ +/ +/ +/ +" + +country_ab2 "" +country_ab3 "" +country_num 586 +END LC_ADDRESS + +LC_TELEPHONE +% Changed from ur_PK as that Locale just copy from en_DK, which is not suitable to Punjabi (Shahmukhi) ISD 92 +tel_int_fmt "" +int_prefix "" +int_select "" +END LC_TELEPHONE diff -uprN glibc-2.4/localedata/locales/pl_PL glibc-2.5/localedata/locales/pl_PL --- glibc-2.4/localedata/locales/pl_PL 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/pl_PL 2006-07-30 22:19:43.000000000 +0000 @@ -287,7 +287,7 @@ order_start forward;backward/ ;;;IGNORE - IGNORE;IGNORE;IGNORE; + ;IGNORE;; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; IGNORE;IGNORE;IGNORE; @@ -2114,6 +2114,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES @@ -2183,6 +2187,7 @@ t_fmt_ampm "" date_fmt "/ / " +week 7;19971201;4 END LC_TIME LC_PAPER diff -uprN glibc-2.4/localedata/locales/pt_BR glibc-2.5/localedata/locales/pt_BR --- glibc-2.4/localedata/locales/pt_BR 2005-11-12 02:10:55.000000000 +0000 +++ glibc-2.5/localedata/locales/pt_BR 2006-07-30 22:19:43.000000000 +0000 @@ -74,7 +74,7 @@ n_sign_posn 1 END LC_MONETARY LC_CTYPE -copy "i18n" +copy "pt_PT" END LC_CTYPE LC_NUMERIC diff -uprN glibc-2.4/localedata/locales/pt_PT glibc-2.5/localedata/locales/pt_PT --- glibc-2.4/localedata/locales/pt_PT 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/pt_PT 2006-07-30 22:19:43.000000000 +0000 @@ -49,6 +49,14 @@ LC_COLLATE copy "iso14651_t1" END LC_COLLATE +LC_CTYPE +copy "i18n" + +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE + LC_MESSAGES yesexpr "" noexpr "" @@ -72,10 +80,6 @@ p_sign_posn 1 n_sign_posn 1 END LC_MONETARY -LC_CTYPE -copy "i18n" -END LC_CTYPE - LC_NUMERIC decimal_point "" thousands_sep "" diff -uprN glibc-2.4/localedata/locales/pt_PT@euro glibc-2.5/localedata/locales/pt_PT@euro --- glibc-2.4/localedata/locales/pt_PT@euro 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/pt_PT@euro 2006-07-30 22:19:43.000000000 +0000 @@ -51,7 +51,7 @@ copy "pt_PT" END LC_MONETARY LC_CTYPE -copy "i18n" +copy "pt_PT" END LC_CTYPE LC_NUMERIC diff -uprN glibc-2.4/localedata/locales/ro_RO glibc-2.5/localedata/locales/ro_RO --- glibc-2.4/localedata/locales/ro_RO 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/ro_RO 2006-08-03 18:37:41.000000000 +0000 @@ -15,9 +15,13 @@ escape_char / % Date: 1996-10-15 % Application: general % Users: general -% Charset: ISO-8859-2 +% Charset: UTF-8 % Distribution and use is free, also % for commercial purposes. +% +% Corrections by: +% 2006-01-07 +% Eddy Petrisor LC_IDENTIFICATION title "Romanian locale for Romania" @@ -51,10 +55,11 @@ LC_COLLATE % Copy the template from ISO/IEC 14651 copy "iso14651_t1" -% a a> a( b c d e f g h i i> j k l m n o p q r s s, t t, u v w x y z +% The modern Romanian alphabet has 31 letters, ordered as below: +% a a( a> b c d e f g h i i> j k l m n o p q r s s, t t, u v w x y z -collating-symbol > collating-symbol +collating-symbol > collating-symbol > collating-symbol collating-symbol @@ -64,8 +69,8 @@ reorder-after reorder-after -> +> reorder-after > reorder-after @@ -74,11 +79,11 @@ reorder-after reorder-after - >;;;IGNORE ;;;IGNORE + >;;;IGNORE reorder-after - >;;;IGNORE ;;;IGNORE + >;;;IGNORE reorder-after >;;;IGNORE @@ -89,23 +94,36 @@ reorder-after ;;;IGNORE ;;;IGNORE reorder-after - ;;;IGNORE + ;;;IGNORE ;;;IGNORE reorder-after ;;;IGNORE ;;;IGNORE reorder-after - ;;;IGNORE + ;;;IGNORE ;;;IGNORE reorder-end END LC_COLLATE + + LC_CTYPE copy "i18n" +% +% Transliteration is _currently_ a good idea as most fonts/applications do not +% have the correct diacritics for "t comma bellow" (U021A, U021B) and +% "s comma bellow" (U0218, U0219). Thus we currently use and compromise with +% "t cedilla" (U0162, U0163) - which, actually, does not belong to any +% language - and "s cedilla" (U015E, U015F) - which is _not_ correct for +% Romanian, but is correct for Turkish. +% +% This issue should be fixed in the future, when enough font and application +% support will be provided in current operating systems. +% translit_start include "translit_combining";"" @@ -124,19 +142,31 @@ include "translit_combining";"" translit_end END LC_CTYPE + + LC_MESSAGES yesexpr "" noexpr "" END LC_MESSAGES + LC_MONETARY -int_curr_symbol "" +% Since the 1st of July 2005, the new currency is the ROmanian New leu +% the symbol is RON and 1 RON = 10000 ROL (old ROmanian Leu)... +int_curr_symbol "" +% but representing counted coins is made in the same way as before. currency_symbol "" +% decimal point is comma mon_decimal_point "" +% the separation of digits is made in groups of three +% and the separator between the groups is the full stop (dot) mon_thousands_sep "" mon_grouping 3;3 +% the positive sign is not usualy represented positive_sign "" +% while the negative one is negative_sign "" +% usualy one will display only two digits after the decimal point int_frac_digits 2 frac_digits 2 p_cs_precedes 1 @@ -147,80 +177,214 @@ p_sign_posn 1 n_sign_posn 1 END LC_MONETARY + LC_NUMERIC +% same rules as for monetary apply for regular figures: +% decimal point is comma decimal_point "" -thousands_sep "" -grouping 0;0 +% and the separator between groups is full stop +thousands_sep "" +% the separation of figures is made in groups of three +grouping 3;3 END LC_NUMERIC + LC_TIME +% abbreviated day names are (starting from Monday): Lu Ma Mi Jo Vi Sb Du abday "";"";"";"";/ - "";"";"" -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" + "";"";"" +% +% Because in 1992 the Romanian Academy stated that within words the +% writing of the letter i> (i circumflex - U00EE) should be replaced +% by a> (acircumflex - U00E2), we use the post92 writing. +% Note: The actual rule is more complex, but the case which applies for +% Satruday is covered by the exposed explanation above. +% +% Day names are not capitalized: +% duminic, luni, mari, +% miercuri, joi, vineri, +% smbt +% +% Note that Tuesday Romanian day should be using t comma, not t cedilla, +% but due to the low availability of the glyph (U021B) in fonts we use +% the "so called t cedilla" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% All month abbreviations are composed of the first three letters of the full +% Romanian names of the months, except for November, whose abbreviation comes +% from the Latin month name, thus the abbreviation is "nov" +% +% Month names are not capitalized: +% ian feb mar apr mai iun iul aug sep oct nov dec abmon "";"";/ "";"";/ "";"";/ "";"";/ "";"";/ "";"" -mon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -d_t_fmt "" -d_fmt "" +% +% Month names are _not_ capitalized in Romanian: +% ianuarie februarie martie +% aprilie mai iunie +% iulie august septembrie +% octombrie noiembrie decembrie +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% Appropriate date and time representation (%c) +% Romania uses daylight saving and the names of the time zones are +% not widely known nor used +% "%a %d %b %Y %T %z" +d_t_fmt "/ +" +% +% Appropriate date representation (%x) +% "%d.%m.%Y" +d_fmt "" +% 24 hour format is used, t_fmt "" +% thus no am/pm markers are defined/used am_pm "";"" +% also am/pm hour display format is not used t_fmt_ampm "" -date_fmt "/ -/ -" +% %A %-e %B %Y, %H:%M:%S %z +date_fmt "/ +/ +" +% First week day is Monday +first_weekday 2 +% First work day is Monday +first_workday 2 END LC_TIME + +% Romania uses A4 paper format LC_PAPER -% FIXME height 297 -% FIXME width 210 END LC_PAPER + LC_TELEPHONE tel_int_fmt "/ " int_prefix "" END LC_TELEPHONE + +% Romania uses the metric system LC_MEASUREMENT -% FIXME measurement 1 END LC_MEASUREMENT + LC_NAME -name_fmt "/ -" +% Format of a name, taken from the glibc locale for Ukrainian. +% %f Family names. +% %F Family names in uppercase. +% %g First given name. +% %G First given initial. +% %l First given name with Latin letters. +% %o Other shorter name. +% %m Additional given names. +% %M Initials for additional given names. +% %p Profession. +% %s Salutation, such as "Doctor" +% %S Abbreviated salutation, such as "Mr." or "Dr." +% %d Salutation, using the FDCC-sets conventions +% 1 for the name_gen +% 2 for name_mr +% 3 for name_mrs +% 4 for name_miss +% 5 for name_ms +% %t If the preceding field descriptor resulted in an empty string, +% then the empty string, else a . +% +% FIXME: There are two prefered ways: +% %d%t%s%t%g%t%f and %d%t%s%t%f%t%g%t%m +% The current tendency is to use the first form, while the second is the most +% popular form, it is widespread and widely known. +% Now we stick to the traditional/old/second form: %d%t%s%t%f%t%g%t%m +name_fmt "/ +/ +" +% Dl. +name_mr "" +% D-na. +name_mrs "" +% D-ra. +name_miss "" END LC_NAME LC_ADDRESS -postal_fmt "/ -/ -/ -/ -" +% Format of an address. The fields have the following meaning +% (inspired originaly by glibc locale for Ukranian): + +% %n Person's name, possibly constructed with the LC_NAME +% "name_fmt" keyword. (it appears to be invalid) +% %a Care of person, or organization. +% %f Firm name. +% %d Department name. +% %b Building name. +% %s Street or block (eg. Japanese) name. +% %h House number or designation. +% %N Insert an if the previous descriptor +% value was not an empty string; otherwise ignore. +% %t Insert a if the previous descriptor value +% was not an empty string; otherwise ignore. +% %r Room number, door designation. +% %e Floor number. +% %C Country designation, from the keyword. +% %l Local township within town or city. (it appears to be invalid) +% %z Zip number, postal code. +% %T Town, city. +% %S State, province, or prefecture. +% %c Country, as taken from data record. +% +% FIXME: it appears that %n and %l are not working; correct form is: +% %n%N%f%N%a%d%N%s%t%h%N%b%t%e%t%r%N%l%z%t%T%N%S%t%c%N +% implemented form: +% %f%N%a%d%N%s%t%h%N%b%t%e%t%r%N%z%t%T%N%S%t%c%N +postal_fmt "/ +/ +/ +/ +/ +/ +" +% Country names are capitalized: Roma>nia +country_name "" country_ab2 "" country_ab3 "" country_num 642 +country_car "" +% ISBN code is 973 +% see: http://homepages.cwi.nl/~dik/english/codes/isbn.html +% and other sources +country_isbn 973 +% FIXME: is it really RO? +country_post "" +% language names are not capitalized in Romanian ( roma>na( ) +lang_name "" +lang_ab "" +% set the terminology code to "ron" as defined in iso639-2 +lang_term "" +% set the bibliographic code to "rum" as defined in iso639-2 +lang_lib "" END LC_ADDRESS + diff -uprN glibc-2.4/localedata/locales/ru_RU glibc-2.5/localedata/locales/ru_RU --- glibc-2.4/localedata/locales/ru_RU 2005-09-24 16:18:17.000000000 +0000 +++ glibc-2.5/localedata/locales/ru_RU 2006-07-30 22:19:43.000000000 +0000 @@ -66,6 +66,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES @@ -74,10 +78,10 @@ noexpr "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" -mon_thousands_sep "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" @@ -93,7 +97,7 @@ END LC_MONETARY LC_NUMERIC decimal_point "" -thousands_sep "" +thousands_sep "" grouping 3;3 END LC_NUMERIC diff -uprN glibc-2.4/localedata/locales/ru_UA glibc-2.5/localedata/locales/ru_UA --- glibc-2.4/localedata/locales/ru_UA 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/ru_UA 2006-07-30 22:19:43.000000000 +0000 @@ -43,7 +43,7 @@ category "ru_UA:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "ru_RU" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/rw_RW glibc-2.5/localedata/locales/rw_RW --- glibc-2.4/localedata/locales/rw_RW 2005-10-15 04:29:28.000000000 +0000 +++ glibc-2.5/localedata/locales/rw_RW 2006-07-30 22:19:43.000000000 +0000 @@ -35,6 +35,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -147,4 +151,3 @@ END LC_TELEPHONE LC_MEASUREMENT measurement 1 END LC_MEASUREMENT - diff -uprN glibc-2.4/localedata/locales/se_NO glibc-2.5/localedata/locales/se_NO --- glibc-2.4/localedata/locales/se_NO 2005-11-21 15:44:20.000000000 +0000 +++ glibc-2.5/localedata/locales/se_NO 2006-07-30 22:19:43.000000000 +0000 @@ -197,6 +197,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/si_LK glibc-2.5/localedata/locales/si_LK --- glibc-2.4/localedata/locales/si_LK 2005-10-15 04:13:49.000000000 +0000 +++ glibc-2.5/localedata/locales/si_LK 2006-07-30 22:19:43.000000000 +0000 @@ -34,6 +34,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -122,7 +126,7 @@ mon "";/ "" % -% Equivalent of AM PM +% Equivalent of AM PM am_pm "";"" % % Appropriate date and time representation (use the same as ISO) @@ -133,7 +137,7 @@ d_t_fmt "" % -% Appropriate time representation +% Appropriate time representation % %H:%M:%S t_fmt "" % diff -uprN glibc-2.4/localedata/locales/sk_SK glibc-2.5/localedata/locales/sk_SK --- glibc-2.4/localedata/locales/sk_SK 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/sk_SK 2006-07-30 22:19:43.000000000 +0000 @@ -60,6 +60,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE % Triedenie @@ -179,6 +183,8 @@ date_fmt "/ " +week 7;19971201;4 + END LC_TIME %% END OF LOCALIZATION FILE for sk_SK.ISO-8859-2 diff -uprN glibc-2.4/localedata/locales/sl_SI glibc-2.5/localedata/locales/sl_SI --- glibc-2.4/localedata/locales/sl_SI 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/sl_SI 2006-07-30 22:19:43.000000000 +0000 @@ -2114,6 +2114,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/so_SO glibc-2.5/localedata/locales/so_SO --- glibc-2.4/localedata/locales/so_SO 2003-11-04 04:57:40.000000000 +0000 +++ glibc-2.5/localedata/locales/so_SO 2006-07-30 22:19:43.000000000 +0000 @@ -62,6 +62,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/sq_AL glibc-2.5/localedata/locales/sq_AL --- glibc-2.4/localedata/locales/sq_AL 2005-09-24 18:50:15.000000000 +0000 +++ glibc-2.5/localedata/locales/sq_AL 2006-07-30 22:19:43.000000000 +0000 @@ -34,6 +34,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/sr_ME glibc-2.5/localedata/locales/sr_ME --- glibc-2.4/localedata/locales/sr_ME 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/sr_ME 2006-09-29 18:28:32.000000000 +0000 @@ -0,0 +1,140 @@ +comment_char % +escape_char / +% +% Serbian Language in Jekavian dialect Locale for Serbia and Montenegro +% Source: sr_YU locale +% Address: +% +% Contact: Danilo Segan +% Email: dsegan@gmx.net +% Tel: +381 63 8626082 +% Fax: none +% Language: sr +% Territory: CS +% Revision: 1.0 +% Date: 2003-08-13 +% Application: general +% Users: general +% Charset: UTF-8, ISO-8859-5 +% Distribution and use is free, also +% for commercial purposes. +% +% TODO: +% -- fix LC_COLLATE to work correctly for latin alphabet too +% + +LC_IDENTIFICATION +title "Serbian locale for Serbia and Montenegro" +source "sr_YU locale" +address "" +contact "Danilo Segan" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Serbian" +territory "Serbia and Montenegro" +revision "1.1" +date "2004-01-10" +audience "general" +application "" +abbreviation "" +% +category i18n:1997;LC_IDENTIFICATION +category i18n:1997;LC_CTYPE +category i18n:1997;LC_COLLATE +category i18n:1997;LC_MONETARY +category i18n:1997;LC_NUMERIC +category i18n:1997;LC_TIME +category i18n:1997;LC_MESSAGES +category i18n:1997;LC_PAPER +category i18n:1997;LC_NAME +category i18n:1997;LC_ADDRESS +category i18n:1997;LC_TELEPHONE +category i18n:1997;LC_MEASUREMENT +END LC_IDENTIFICATION + +LC_CTYPE +copy "sr_CS" +END LC_CTYPE + +LC_COLLATE +copy "sr_CS" +END LC_COLLATE + +LC_MONETARY +copy "sr_CS" +END LC_MONETARY + +LC_NUMERIC +copy "sr_CS" +END LC_NUMERIC + +LC_TIME +abday "";"";/ + "";"";/ + "";"";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +d_t_fmt "/ +/ +" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ +/ +" +week 7;19971201;4 +first_weekday 2 +first_workday 2 +END LC_TIME + +LC_MESSAGES +copy "sr_CS" +END LC_MESSAGES + +LC_PAPER +copy "sr_CS" +END LC_PAPER + +LC_NAME +copy "sr_CS" +END LC_NAME + +LC_ADDRESS +copy "sr_CS" +END LC_ADDRESS + +LC_TELEPHONE +copy "sr_CS" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "sr_CS" +END LC_MEASUREMENT diff -uprN glibc-2.4/localedata/locales/ss_ZA glibc-2.5/localedata/locales/ss_ZA --- glibc-2.4/localedata/locales/ss_ZA 2005-10-13 16:22:21.000000000 +0000 +++ glibc-2.5/localedata/locales/ss_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -59,6 +59,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -86,7 +90,7 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: % - Lisontfo, uMsombuluko, Lesibili, Lesitsatfu, Lesine, Lesihlanu, uMgcibelo day "";/ @@ -96,8 +100,8 @@ day "";/ "";/ "" - -% abmon - The abbreviations for the months + +% abmon - The abbreviations for the months % - Bhi, Van, Vul, Mab, Ink, Nhl, Kho, Ngc, Nyo, Imp, Lwe, Ngo abmon "";"";/ "";"";/ @@ -105,8 +109,8 @@ abmon "";"";"";/ "";"";/ "";"" - -% mon - The full names of the months - + +% mon - The full names of the months - % - Bhimbidvwane, iNdlovane, iNdlovulenkhulu, Mabasa, Inkhwenkhweti, iNhlaba % Kholwane, iNgci, iNyoni, Impala, Lweti, iNgongoni mon "";/ @@ -121,7 +125,7 @@ mon "";/ "";/ "" - + % Abreviated date and time representation to be referenced by the "%c" field descriptor - d_t_fmt "" % @@ -131,23 +135,23 @@ d_t_fmt "" % "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). - + % Time representation to be referenced by the "%X" field descriptor - t_fmt "" % "%T" (24-hour clock time in format HH:MM:SS) - + % Define representation of ante meridiem and post meridiem strings - am_pm "";"" % The "" mean 'default to "AM" and "PM". - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" t_fmt_ampm "" % The "" means that this format is not supported. - + % Date representation not described in ISO/IEC 14652. Comes out as - % "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output date_fmt "/ @@ -162,7 +166,7 @@ date_fmt "", % "Clan names" - + % FIXME - define all the following name_* % General salutation for any sex % name_gen "" % Salutation for unmarried females - "" % name_miss "" - + % Salutation for males - "" % name_mr "" @@ -222,10 +226,10 @@ END LC_NAME LC_ADDRESS % Country name in Swati - "iNingizimu Afrika" country_name "" - + % Abbreviated country postal name - "ZA" country_post "" - + % UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic % http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf % "ZA" @@ -233,7 +237,7 @@ country_car "" % FIXME define the following correctly % country_isbn "" - + % Language name in Swati - "SiSwati" lang_name "" @@ -242,7 +246,7 @@ lang_name "< % "ss", ssw" lang_ab "" lang_term "" - + % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) postal_fmt "/ @@ -282,4 +286,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/st_ZA glibc-2.5/localedata/locales/st_ZA --- glibc-2.4/localedata/locales/st_ZA 2005-09-24 15:53:58.000000000 +0000 +++ glibc-2.5/localedata/locales/st_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -1,7 +1,15 @@ escape_char / comment_char % +% Charset: UTF-8 + % ChangeLog +% 0.3 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Added 'Charset: UTF-8' information +% - Update contact information +% - Allign spellings of month and weekday names with Dept. of +% Art and Culture's: Multilingual Mathematics Dictionary % 0.2 (2004-11-03): % 2004-11-02 Dwayne Bailey % - Change all contact information @@ -22,12 +30,12 @@ source "Zuza Software Foundation (Tr address "PO Box 28364, Sunnyside, 0132, South Africa" contact "Dwayne Bailey" email "dwayne@translate.org.za" -tel "+27 12 343 0389" -fax "+27 12 343 0389" +tel "+27 12 460 1095" +fax "+27 12 460 1095" language "Sotho" territory "South Africa" -revision "0.2" -date "2004-11-03" +revision "0.3" +date "2005-10-13" % category "st_ZA:2003";LC_IDENTIFICATION category "st_ZA:2003";LC_CTYPE @@ -47,6 +55,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -74,42 +86,42 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: -% - Sontaha, Mmantaha, Labobedi, Laboraru, Labone, Labohlane, Moqebelo +% - Sontaha, Mantaha, Labobedi, Laboraro, Labone, Labohlano, Moqebelo day "";/ - "";/ + "";/ "";/ - "";/ + "";/ "";/ - "";/ + "";/ "" - -% abmon - The abbreviations for the months -% - Phe, Kol, Ube, Mme, Mot, Jan, Upu, Pha, Leo, Mph, Pun, Tsh -abmon "";"";/ - "";"";/ + +% abmon - The abbreviations for the months +% - Phe, Hla, Tlh, Mme, Mot, Jan, Upu, Pha, Leo, Mph, Pud, Tsh +abmon "";"";/ + "";"";/ "";"";/ "";"";/ "";"";/ - "";"" - -% mon - The full names of the months - -% - Phesekgong, Hlakola, Hlakubele, Mmese, Motsheanong, Phupjane, -% Phupu, Phata, Leotshe, Mphalane, Pundungwane, Tshitwe -mon "";/ + "";"" + +% mon - The full names of the months - +% - Pherekgong, Hlakola, Tlhakubele, Mmese, Motsheanong, Phupjane, +% Phupu, Phato, Leotse, Mphalane, Pudungwana, Tshitwe +mon "";/ "";/ - "";/ + "";/ "";/ "";/ "";/ "";/ - "";/ - "";/ + "";/ + "";/ "";/ - "";/ + "";/ "" - + % Abreviated date and time representation to be referenced by the "%c" field descriptor - d_t_fmt "/ " @@ -120,23 +132,23 @@ d_t_fmt "" % "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). - + % Time representation to be referenced by the "%X" field descriptor - t_fmt "" % "%T" (24-hour clock time in format HH:MM:SS) - + % Define representation of ante meridiem and post meridiem strings - am_pm "";"" % The "" mean 'default to "AM" and "PM". - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" t_fmt_ampm "" % The "" means that this format is not supported. - + % Date representation not described in ISO/IEC 14652. Comes out as - % "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output date_fmt "/ @@ -151,7 +163,7 @@ date_fmt "", % "Clan names" - + % FIXME - define all the following name_* % General salutation for any sex % name_gen "" % Salutation for unmarried females - "" % name_miss "" - + % Salutation for males - "" % name_mr "" @@ -211,13 +223,13 @@ END LC_NAME LC_ADDRESS % Country name in Sotho - "Afrika Borwa" country_name "" - + % Abbreviated country postal name - "ZA" country_post "" - + % FIXME define the following correctly % country_isbn "" - + % Language name in Sotho - "Sesotho" lang_name "" @@ -231,7 +243,7 @@ country_car "" % "st", "sot" lang_ab "" lang_term "" - + % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) postal_fmt "/ @@ -271,4 +283,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/sv_FI glibc-2.5/localedata/locales/sv_FI --- glibc-2.4/localedata/locales/sv_FI 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/sv_FI 2006-07-30 22:19:43.000000000 +0000 @@ -47,7 +47,7 @@ category "sv_FI:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "sv_SE" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/sv_FI@euro glibc-2.5/localedata/locales/sv_FI@euro --- glibc-2.4/localedata/locales/sv_FI@euro 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/sv_FI@euro 2006-07-30 22:19:43.000000000 +0000 @@ -39,7 +39,7 @@ category "sv_FI@euro:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "sv_FI" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/sv_SE glibc-2.5/localedata/locales/sv_SE --- glibc-2.4/localedata/locales/sv_SE 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/sv_SE 2006-07-30 22:19:43.000000000 +0000 @@ -109,6 +109,10 @@ END LC_COLLATE LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MONETARY diff -uprN glibc-2.4/localedata/locales/ta_IN glibc-2.5/localedata/locales/ta_IN --- glibc-2.4/localedata/locales/ta_IN 2005-10-15 01:24:22.000000000 +0000 +++ glibc-2.5/localedata/locales/ta_IN 2006-07-30 22:19:43.000000000 +0000 @@ -36,6 +36,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/te_IN glibc-2.5/localedata/locales/te_IN --- glibc-2.4/localedata/locales/te_IN 2005-10-15 01:26:01.000000000 +0000 +++ glibc-2.5/localedata/locales/te_IN 2006-07-30 22:19:43.000000000 +0000 @@ -35,6 +35,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -186,14 +190,13 @@ LC_ADDRESS % This is the ISO_IEC TR14652 Locale definition for the LC_ADDRESS category % generated by IBM Basic CountryPack Transformer. -% postal_fmt "%n%N%a%N%d%N%f%N%r%t%e%N%h%t%b%N%s%t%l%N%T%t%z%N%S%N%c" -postal_fmt "/ -/ +% postal_fmt "%a%N%d%N%f%N%r%t%e%N%h%t%b%N%s%t%N%T%t%z%N%S%N%c" +postal_fmt "/ / / / / -/ +/ / / " diff -uprN glibc-2.4/localedata/locales/tg_TJ glibc-2.5/localedata/locales/tg_TJ --- glibc-2.4/localedata/locales/tg_TJ 2005-09-24 18:53:39.000000000 +0000 +++ glibc-2.5/localedata/locales/tg_TJ 2006-07-30 22:19:43.000000000 +0000 @@ -2,7 +2,7 @@ comment_char % escape_char / % % Tajik Language Locale for Tajikistan -% Source: +% Source: % Contact: Pablo Saratxaga, Roger Kovacs % Email: , % Language: tg @@ -50,6 +50,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -126,7 +130,7 @@ noexpr "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" mon_thousands_sep "" @@ -227,4 +231,3 @@ LC_TELEPHONE % FIXME copy "en_DK" END LC_TELEPHONE - diff -uprN glibc-2.4/localedata/locales/th_TH glibc-2.5/localedata/locales/th_TH --- glibc-2.4/localedata/locales/th_TH 2004-10-31 23:42:27.000000000 +0000 +++ glibc-2.5/localedata/locales/th_TH 2006-07-30 22:19:43.000000000 +0000 @@ -73,6 +73,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ti_ET glibc-2.5/localedata/locales/ti_ET --- glibc-2.4/localedata/locales/ti_ET 2003-12-06 07:40:37.000000000 +0000 +++ glibc-2.5/localedata/locales/ti_ET 2006-07-30 22:19:43.000000000 +0000 @@ -859,6 +859,8 @@ translit_start + +include "translit_combining";"" translit_end % END LC_CTYPE diff -uprN glibc-2.4/localedata/locales/tn_ZA glibc-2.5/localedata/locales/tn_ZA --- glibc-2.4/localedata/locales/tn_ZA 2005-10-13 16:19:55.000000000 +0000 +++ glibc-2.5/localedata/locales/tn_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -12,7 +12,7 @@ comment_char % % Art and Culture's: Multilingual Mathematics Dictionary % 0.3 (2005-06-21): % 2005-06-21 Dwayne Bailey -% - Corrected short month names to correspond to long +% - Corrected short month names to correspond to long % month names (missed in 2004-02-27 corrections) % 0.2 (2004-11-08): % 2004-11-08 Dwayne Bailey @@ -60,6 +60,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -87,7 +91,7 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: % - laTshipi, Mosupologo, Labobedi, Laboraro, Labone, Labotlhano, Lamatlhatso day "";/ @@ -97,8 +101,8 @@ day "";/ "";/ "" - -% abmon - The abbreviations for the months + +% abmon - The abbreviations for the months % - Fer, Tlh, Mop, Mor, Mot, See, Phu, Pha, Lwe, Dip, Ngw, Sed abmon "";"";/ "";"";/ @@ -106,8 +110,8 @@ abmon "";"";"";/ "";"";/ "";"" - -% mon - The full names of the months - + +% mon - The full names of the months - % - Ferikgong, Tlhakole, Mopitlwe, Moranang, Motsheganong, Seetebosigo % Phukwi, Phatwe, Lwetse, Diphalane, Ngwanatsele, Sedimonthole mon "";/ @@ -133,23 +137,23 @@ d_t_fmt "" % "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). - + % Time representation to be referenced by the "%X" field descriptor - t_fmt "" % "%T" (24-hour clock time in format HH:MM:SS) - + % Define representation of ante meridiem and post meridiem strings - am_pm "";"" % The "" mean 'default to "AM" and "PM". - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" t_fmt_ampm "" % The "" means that this format is not supported. - + % Date representation not described in ISO/IEC 14652. Comes out as - % "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output date_fmt "/ @@ -164,7 +168,7 @@ date_fmt "", % "Clan names" - + % FIXME - define all the following name_* % General salutation for any sex % name_gen "" % Salutation for unmarried females - "" % name_miss "" - + % Salutation for males - "" % name_mr "" @@ -225,10 +229,10 @@ LC_ADDRESS % Country name in Tswana - "Aforika Borwa" country_name "/ " - + % Abbreviated country postal name - "ZA" country_post "" - + % UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic % http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf % "ZA" @@ -236,7 +240,7 @@ country_car "" % FIXME define the following correctly % country_isbn "" - + % Language name in Tswana - "Setswana" lang_name "" @@ -245,7 +249,7 @@ lang_name "< % "tn", "tsn" lang_ab "" lang_term "" - + % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) postal_fmt "/ @@ -285,4 +289,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/tr_CY glibc-2.5/localedata/locales/tr_CY --- glibc-2.4/localedata/locales/tr_CY 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/locales/tr_CY 2006-05-02 16:34:01.000000000 +0000 @@ -0,0 +1,114 @@ +comment_char % +escape_char / +% +% Turkish Language Locale for Cyprus +% Language: tr +% Territory: CY +% Revision: 4.4 +% Application: general +% Users: general +% Charset: ISO-8859-9 +% Distribution and use is free, also +% for commercial purposes. + +% Adapted from tr_TR by Recai OktaÅŸ , 2004 + +LC_IDENTIFICATION +title "Turkish language locale for Cyprus" +source "Free Software Foundation, Inc." +address "59 Temple Place - Suite 330, Boston, MA 02111-1307, USA" +contact "" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Turkish" +territory "Cyprus" +revision "1.0" +date "2004-10-23" +audience "" +application "" +abbreviation "" +% +category "tr_CY:2000";LC_IDENTIFICATION +category "tr_CY:2000";LC_CTYPE +category "tr_CY:2000";LC_COLLATE +category "tr_CY:2000";LC_TIME +category "tr_CY:2000";LC_NUMERIC +category "tr_CY:2000";LC_MONETARY +category "tr_CY:2000";LC_MESSAGES +category "tr_CY:2000";LC_PAPER +category "tr_CY:2000";LC_NAME +category "tr_CY:2000";LC_ADDRESS +category "tr_CY:2000";LC_TELEPHONE +category "tr_CY:2000";LC_MEASUREMENT + +END LC_IDENTIFICATION + +LC_COLLATE +copy "tr_TR" +END LC_COLLATE + +LC_CTYPE +copy "tr_TR" +END LC_CTYPE + +LC_MESSAGES +copy "tr_TR" +END LC_MESSAGES + +LC_MONETARY +copy "tr_TR" +END LC_MONETARY + +LC_NUMERIC +copy "tr_TR" +END LC_NUMERIC + +LC_TIME +copy "tr_TR" +END LC_TIME + +LC_PAPER +copy "tr_TR" +END LC_PAPER + +LC_TELEPHONE +copy "tr_TR" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "tr_TR" +END LC_MEASUREMENT + +LC_NAME +copy "tr_TR" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +% Northern Cyprus +country_name "/ +" +% TR +country_post "" +% TR +country_car "" +country_isbn 975 +country_num 792 +% TR +country_ab2 "" +% TUR +country_ab3 "" +% Turkish +lang_name "" +% tr +lang_term "" +% tr +lang_lib "" +%tr +lang_ab "" +END LC_ADDRESS diff -uprN glibc-2.4/localedata/locales/tr_TR glibc-2.5/localedata/locales/tr_TR --- glibc-2.4/localedata/locales/tr_TR 2004-10-31 23:42:28.000000000 +0000 +++ glibc-2.5/localedata/locales/tr_TR 2006-07-30 22:19:43.000000000 +0000 @@ -3465,6 +3465,9 @@ class "combining_level3"; / % END modified i18n LC_CTYPE +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_MESSAGES diff -uprN glibc-2.4/localedata/locales/ts_ZA glibc-2.5/localedata/locales/ts_ZA --- glibc-2.4/localedata/locales/ts_ZA 2005-10-12 15:13:36.000000000 +0000 +++ glibc-2.5/localedata/locales/ts_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -55,6 +55,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -82,7 +86,7 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: % - Sonto, Musumbhunuku, Ravumbirhi, Ravunharhu, Ravumune, Ravuntlhanu, Mugqivela day "";/ @@ -92,9 +96,9 @@ day "";/ "";/ "" - - -% abmon - The abbreviations for the months + + +% abmon - The abbreviations for the months % - Sun, Yan, Kul, Dzi, Mud, Kho, Maw, Mha, Ndz, Nhl, Huk, N'w abmon "";"";/ "";"";/ @@ -102,8 +106,8 @@ abmon "";"";"";/ "";"";/ "";"" - -% mon - The full names of the months - + +% mon - The full names of the months - % - Sunguti, Nyenyenyani, Nyenyankulu, Dzivamisoko, Mudyaxihi, Khotavuxika % Mawuwani, Mhawuri, Ndzhati, Nhlangula, Hukuri, N'wendzamhala mon "";/ @@ -128,23 +132,23 @@ d_t_fmt "" % "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). - + % Time representation to be referenced by the "%X" field descriptor - t_fmt "" % "%T" (24-hour clock time in format HH:MM:SS) - + % Define representation of ante meridiem and post meridiem strings - am_pm "";"" % The "" mean 'default to "AM" and "PM". - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" t_fmt_ampm "" % The "" means that this format is not supported. - + % Date representation not described in ISO/IEC 14652. Comes out as - % "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output date_fmt "/ @@ -159,7 +163,7 @@ date_fmt "", % "Clan names" - + % FIXME - define all the following name_* % General salutation for any sex % name_gen "" % Salutation for unmarried females - "" % name_miss "" - + % Salutation for males - "" % name_mr "" @@ -219,10 +223,10 @@ END LC_NAME LC_ADDRESS % Country name in Tsonga - "Afrika Dzonga" country_name "" - + % Abbreviated country postal name - "ZA" country_post "" - + % UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic % http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf % "ZA" @@ -230,7 +234,7 @@ country_car "" % FIXME define the following correctly % country_isbn "" - + % Language name in Tsonga - "Xitsonga" lang_name "" @@ -239,7 +243,7 @@ lang_name "< % "ts", "tso" lang_ab "" lang_term "" - + % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) postal_fmt "/ @@ -279,4 +283,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/tt_RU glibc-2.5/localedata/locales/tt_RU --- glibc-2.4/localedata/locales/tt_RU 2003-12-06 07:37:15.000000000 +0000 +++ glibc-2.5/localedata/locales/tt_RU 2006-07-30 22:19:43.000000000 +0000 @@ -52,6 +52,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -227,7 +231,7 @@ noexpr "" +int_curr_symbol "" currency_symbol "" mon_decimal_point "" mon_thousands_sep "" diff -uprN glibc-2.4/localedata/locales/uk_UA glibc-2.5/localedata/locales/uk_UA --- glibc-2.4/localedata/locales/uk_UA 2004-10-31 23:42:28.000000000 +0000 +++ glibc-2.5/localedata/locales/uk_UA 2006-07-30 22:19:43.000000000 +0000 @@ -46,6 +46,10 @@ END LC_IDENTIFICATION LC_CTYPE copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/ve_ZA glibc-2.5/localedata/locales/ve_ZA --- glibc-2.4/localedata/locales/ve_ZA 2005-10-13 16:17:40.000000000 +0000 +++ glibc-2.5/localedata/locales/ve_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -58,6 +58,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -85,7 +89,7 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: % - Swondaha, Musumbuluwo, L^avhuvhili, L^avhuraru, L^avhun^a, L^avhut^anu, Mugivhela day "";/ @@ -95,8 +99,8 @@ day "";/ "";/ "" - -% abmon - The abbreviations for the months + +% abmon - The abbreviations for the months % - Pha, Luh, Fam, Lam, Shu, Lwi, Lwa, Ngu, Khu, Tsh, L^ar, Nye abmon "";"";/ "";"";/ @@ -104,8 +108,8 @@ abmon "";"";"";/ "";"";/ "";"" - -% mon - The full names of the months - + +% mon - The full names of the months - % - Phando, Luhuhi, T^hafamuhwe, Lambamai, Shundunthule, Fulwi % Fulwana, T^hangule, Khubvumedzi, Tshimedzi, L^ara, Nyendavhusiku mon "";/ @@ -120,7 +124,7 @@ mon "";/ "";/ "" - + % Abreviated date and time representation to be referenced by the "%c" field descriptor - d_t_fmt "" % @@ -130,23 +134,23 @@ d_t_fmt "" % "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). - + % Time representation to be referenced by the "%X" field descriptor - t_fmt "" % "%T" (24-hour clock time in format HH:MM:SS) - + % Define representation of ante meridiem and post meridiem strings - am_pm "";"" % The "" mean 'default to "AM" and "PM". - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" t_fmt_ampm "" % The "" means that this format is not supported. - + % Date representation not described in ISO/IEC 14652. Comes out as - % "%a %b %e %H:%M:%S %Z %Y" which is default "date" command output date_fmt "/ @@ -161,7 +165,7 @@ date_fmt "", % "Clan names" - + % FIXME - define all the following name_* % General salutation for any sex % name_gen "" % Salutation for unmarried females - "" % name_miss "" - + % Salutation for males - "" % name_mr "" @@ -222,10 +226,10 @@ LC_ADDRESS % Country name in Venda - "Afurika Tshipembe" country_name "/ " - + % Abbreviated country postal name - "ZA" country_post "" - + % UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic % http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf % "ZA" @@ -233,7 +237,7 @@ country_car "" % FIXME define the following correctly % country_isbn "" - + % Language name in Venda - "Tshivend^a" lang_name "" @@ -245,7 +249,7 @@ lang_term "" % FIXME there seems to be an error with the following but am unable to % determine what as it works correctly in other locale files % lang_lib "" - + % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) postal_fmt "/ @@ -285,4 +289,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/vi_VN glibc-2.5/localedata/locales/vi_VN --- glibc-2.4/localedata/locales/vi_VN 2005-10-14 23:18:00.000000000 +0000 +++ glibc-2.5/localedata/locales/vi_VN 2006-07-30 22:19:43.000000000 +0000 @@ -50,6 +50,8 @@ LC_CTYPE copy "i18n" translit_start +include "translit_combining";"" + % dong sign -> d// -> dd "";"" @@ -233,8 +235,8 @@ mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" -int_frac_digits 4 -frac_digits 4 +int_frac_digits 0 +frac_digits 0 p_cs_precedes 0 p_sep_by_space 0 n_cs_precedes 1 @@ -264,19 +266,19 @@ day "";/ "";/ "" -abmon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ "";/ "";/ "" -mon "";/ +mon "";/ "";/ "";/ "";/ @@ -286,12 +288,12 @@ mon "";/ "";/ "";/ - "";/ - "" -d_t_fmt "" + "";/ + "" +d_t_fmt "" d_fmt "" t_fmt "" -am_pm "";"" +am_pm "";"" t_fmt_ampm "" date_fmt "" END LC_TIME @@ -315,7 +317,7 @@ LC_NAME % LC_NAME category. % name_fmt "/ -" +" name_gen "" name_mr "" name_mrs "" @@ -352,4 +354,3 @@ END LC_TELEPHONE LC_MEASUREMENT measurement 1 END LC_MEASUREMENT - diff -uprN glibc-2.4/localedata/locales/xh_ZA glibc-2.5/localedata/locales/xh_ZA --- glibc-2.4/localedata/locales/xh_ZA 2005-09-24 15:51:59.000000000 +0000 +++ glibc-2.5/localedata/locales/xh_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -1,7 +1,15 @@ escape_char / comment_char % +% Charset: UTF-8 + % ChangeLog +% 0.3 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Added 'Charset: UTF-8' information +% - Update contact information +% - Allign spellings of month and weekday names with Dept. of +% Art and Culture's: Multilingual Mathematics Dictionary % 0.2 (2004-11-02): % 2004-11-01 Dwayne Bailey % - Change all contact information @@ -24,12 +32,12 @@ source "Zuza Software Foundation (Tr address "PO Box 28364, Sunnyside, 0132, South Africa" contact "Dwayne Bailey" email "dwayne@translate.org.za" -tel "+27 12 343 8389" -fax "+27 12 343 0389" +tel "+27 12 460 1095" +fax "+27 12 460 1095" language "Xhosa" territory "South Africa" -revision "0.2" -date "2004-11-02" +revision "0.3" +date "2005-10-13" % category "xh_ZA:2003";LC_IDENTIFICATION category "xh_ZA:2003";LC_CTYPE @@ -49,6 +57,10 @@ END LC_IDENTIFICATION LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -77,39 +89,39 @@ abday "";/ "" % % The full names of the week days: -% - Cawe, Mvulo, Lwesibini, Lwesithathu, Lwesine, Lwesihlanu, Mgqibelo -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -% -% The abbreviations for the months -% - Jan, Feb, Mat, Epr, Mey, Jun, Jul, Aga, Sep, Okt, Nov, Dis -abmon "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"" -% -% The full names of the months - -% - Janyuwari, Februwari, Matshi, Epreli, Meyi, Juni, Julayi, Agasti, Septemba, -% Okthoba, Novemba, Disemba -mon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" +% - iCawa, uMvulo, lwesiBini, lwesiThathu, ulweSine, lwesiHlanu, uMgqibelo +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% The abbreviations for the months +% - Mqu, Mdu, Kwi, Tsh, Can, Sil, Kha, Thu, Msi, Dwa, Nka, Mng +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +% +% The full names of the months - +% - eyoMqungu, eyoMdumba, eyoKwindla, uTshazimpuzi, uCanzibe, eyeSilimela +% eyeKhala, eyeThupa, eyoMsintsi, eyeDwarha, eyeNkanga, eyoMnga +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" % % Abreviated date and time representation to be referenced by the "%c" field descriptor - d_t_fmt "" @@ -137,8 +149,8 @@ am_pm "";"" % The "" means that this format is not supported. t_fmt_ampm "" % -% Date representation not described in ISO/IEC 14652. -% Comes out as - "%a %b %-e %H:%M:%S %Z %Y" +% Date representation not described in ISO/IEC 14652. +% Comes out as - "%a %b %-e %H:%M:%S %Z %Y" date_fmt "/ / " @@ -263,4 +275,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/locales/zh_CN glibc-2.5/localedata/locales/zh_CN --- glibc-2.4/localedata/locales/zh_CN 2005-09-25 17:57:21.000000000 +0000 +++ glibc-2.5/localedata/locales/zh_CN 2006-07-30 22:19:43.000000000 +0000 @@ -49,6 +49,10 @@ LC_CTYPE copy "i18n" +translit_start +include "translit_combining";"" +translit_end + class "hanzi"; / % ..;/ ..;/ diff -uprN glibc-2.4/localedata/locales/zh_HK glibc-2.5/localedata/locales/zh_HK --- glibc-2.4/localedata/locales/zh_HK 2004-10-31 23:42:28.000000000 +0000 +++ glibc-2.5/localedata/locales/zh_HK 2006-07-30 22:19:43.000000000 +0000 @@ -32,7 +32,7 @@ category "zh_HK:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "zh_CN" END LC_CTYPE LC_COLLATE diff -uprN glibc-2.4/localedata/locales/zh_SG glibc-2.5/localedata/locales/zh_SG --- glibc-2.4/localedata/locales/zh_SG 2004-10-31 23:42:28.000000000 +0000 +++ glibc-2.5/localedata/locales/zh_SG 2006-07-30 22:19:43.000000000 +0000 @@ -32,7 +32,7 @@ category "zh_SG:2000";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE -copy "i18n" +copy "zh_CN" END LC_CTYPE LC_COLLATE @@ -46,7 +46,7 @@ END LC_COLLATE LC_MONETARY % This is the POSIX Locale definition the LC_MONETARY category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale defintion file +% These are generated based on XML base Locale defintion file % for IBM Class for Unicode. % int_curr_symbol "" @@ -81,7 +81,7 @@ END LC_NUMERIC LC_TIME % This is the POSIX Locale definition for the LC_TIME category % generated by IBM Basic CountryPack Transformer. -% These are generated based on XML base Locale difintion file +% These are generated based on XML base Locale difintion file % for IBM Class for Unicode. % % Abbreviated weekday names (%a) @@ -112,22 +112,22 @@ mon "";"";"";/ "";"" % -% Equivalent of AM PM +% Equivalent of AM PM am_pm "";"" % -% Appropriate date and time representation +% Appropriate date and time representation % %Y\u5e74%m\u6708%d\u65e5 %H\u65f6%M\u5206%S\u79d2 %Z d_t_fmt "" % -% Appropriate date representation +% Appropriate date representation % %Y\u5e74%m\u6708%d\u65e5 d_fmt "" % -% Appropriate time representation +% Appropriate time representation % %H\u65f6%M\u5206%S\u79d2 %Z t_fmt "" % -% Appropriate 12 h time representation (%r) +% Appropriate 12 h time representation (%r) t_fmt_ampm "" % END LC_TIME @@ -142,14 +142,14 @@ LC_MESSAGES % ^[yY] yesexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % yesexpr "" % % ^[nN] noexpr "" -% Syntax on Unicode Regular Expression Guidelines TR#18 +% Syntax on Unicode Regular Expression Guidelines TR#18 % noexpr "" % @@ -174,8 +174,8 @@ END LC_PAPER LC_NAME % This is the ISO_IEC TR14652 Locale definition for the LC_NAME category % generated by IBM Basic CountryPack Transformer. -% -% +% +% name_fmt "" name_gen "" name_mr "" diff -uprN glibc-2.4/localedata/locales/zu_ZA glibc-2.5/localedata/locales/zu_ZA --- glibc-2.4/localedata/locales/zu_ZA 2005-09-24 15:28:27.000000000 +0000 +++ glibc-2.5/localedata/locales/zu_ZA 2006-07-30 22:19:43.000000000 +0000 @@ -1,7 +1,15 @@ escape_char / comment_char % +% Charset: UTF-8 + % ChangeLog +% 0.3 (2005-10-13): +% 2005-10-12 Dwayne Bailey +% - Added 'Charset: UTF-8' information +% - Update contact information +% - Allign spellings of month and weekday names with Dept. of +% Art and Culture's: Multilingual Mathematics Dictionary % 0.2 (2004-10-28): % 2004-10-28 Dwayne Bailey % - Added lang_lib @@ -27,12 +35,12 @@ source "Zuza Software Foundation (Tr address "Box 28364, Sunnyside, 0132, South Africa" contact "Dwayne Bailey" email "dwayne@translate.org.za" -tel "+27 12 343 0389" -fax "+27 12 448 0389" +tel "+27 12 460 1095" +fax "+27 12 460 1095" language "Zulu" territory "South Africa" -revision "0.2" -date "2004-10-28" +revision "0.3" +date "2005-10-13" % category "zu_ZA:2003";LC_IDENTIFICATION category "zu_ZA:2003";LC_CTYPE @@ -53,6 +61,10 @@ LC_CTYPE % Use the characters described in the charmap file "i18n.tgz" % copy "i18n" + +translit_start +include "translit_combining";"" +translit_end END LC_CTYPE LC_COLLATE @@ -80,42 +92,42 @@ abday "";/ "";/ "";/ "" - + % day - The full names of the week days: -% - Sonto, Msombuluko, Lwesibili, Lwesithathu, Lwesine, Lwesihlanu, Mgqibelo -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" - -% abmon - The abbreviations for the months -% - Jan, Feb, Mas, Apr, Mey, Jun, Jul, Aga, Sep, Okt, Nov, Dis -abmon "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"" - -% mon - The full names of the months - -% - Januwari, Februwari, Mashi, Apreli, Meyi, Juni, Julayi, Agasti, Septemba, -% Okthoba, Novemba, Disemba -mon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" - +% - iSonto, uMsombuluko, uLwesibili, uLwesithathu, uLwesine, uLwesihlanu, uMgqibelo +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% abmon - The abbreviations for the months +% - Mas, Ola, Nda, Mba, Aba, Ang, Ntu, Ncw, Man, Mfu, Lwe, Zib +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" + +% mon - The full names of the months - +% - uMasingana, uNhlolanja, uNdasa, uMbasa, uNhlaba, uNhlangulana +% uNtulikazi, uNcwaba, uMandulo, uMfumfu, uLwezi, uZibandlela +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + % Abreviated date and time representation to be referenced by the "%c" field descriptor - d_t_fmt "" % @@ -129,22 +141,22 @@ d_t_fmt "" - + % Time representation to be referenced by the "%X" field descriptor - % "%T" (24-hour clock time in format HH:MM:SS) t_fmt "" - + % Define representation of ante meridiem and post meridiem strings - % The ""s mean default to "AM" and "PM". am_pm "";"" - + % Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" % field descriptor - % The "" means that this format is not supported. t_fmt_ampm "" % Date representation not described in ISO/IEC 14652. Comes out as - -% "%a %b %e %H:%M:%S %Z %Y" +% "%a %b %e %H:%M:%S %Z %Y" date_fmt "/ / " @@ -271,4 +283,3 @@ country_ab2 "" country_ab3 "" END LC_ADDRESS - diff -uprN glibc-2.4/localedata/Makefile glibc-2.5/localedata/Makefile --- glibc-2.4/localedata/Makefile 2005-09-25 17:01:12.000000000 +0000 +++ glibc-2.5/localedata/Makefile 2006-04-26 05:14:03.000000000 +0000 @@ -92,7 +92,8 @@ locale_test_suite := tst_iswalnum tst_is tst_wctype tst_wcwidth tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \ - tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale + tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \ + tst-strfmon1 ifeq (yes,$(build-shared)) ifneq (no,$(PERL)) tests: $(objpfx)mtrace-tst-leaks @@ -282,6 +283,7 @@ tst-digits-ENV = $(TEST_MBWC_ENV) tst-mbswcs6-ENV = $(TEST_MBWC_ENV) tst-xlocale1-ENV = $(TEST_MBWC_ENV) tst-xlocale2-ENV = $(TEST_MBWC_ENV) +tst-strfmon1-ENV = $(TEST_MBWC_ENV) tst-setlocale-ENV = LOCPATH=$(common-objpfx)localedata LC_ALL=ja_JP.EUC-JP diff -uprN glibc-2.4/localedata/SUPPORTED glibc-2.5/localedata/SUPPORTED --- glibc-2.4/localedata/SUPPORTED 2005-11-05 16:25:49.000000000 +0000 +++ glibc-2.5/localedata/SUPPORTED 2006-09-29 18:29:11.000000000 +0000 @@ -47,6 +47,7 @@ ar_TN/ISO-8859-6 \ ar_YE.UTF-8/UTF-8 \ ar_YE/ISO-8859-6 \ az_AZ.UTF-8/UTF-8 \ +as_IN.UTF-8/UTF-8 \ be_BY.UTF-8/UTF-8 \ be_BY/CP1251 \ be_BY@latin/UTF-8 \ @@ -60,11 +61,18 @@ br_FR@euro/ISO-8859-15 \ bs_BA.UTF-8/UTF-8 \ bs_BA/ISO-8859-2 \ byn_ER/UTF-8 \ +ca_AD.UTF-8/UTF-8 \ +ca_AD/ISO-8859-15 \ ca_ES.UTF-8/UTF-8 \ ca_ES/ISO-8859-1 \ ca_ES@euro/ISO-8859-15 \ +ca_FR.UTF-8/UTF-8 \ +ca_FR/ISO-8859-15 \ +ca_IT.UTF-8/UTF-8 \ +ca_IT/ISO-8859-15 \ cs_CZ.UTF-8/UTF-8 \ cs_CZ/ISO-8859-2 \ +csb_PL/UTF-8 \ cy_GB.UTF-8/UTF-8 \ cy_GB/ISO-8859-14 \ da_DK.UTF-8/UTF-8 \ @@ -86,6 +94,8 @@ de_LU@euro/ISO-8859-15 \ dz_BT/UTF-8 \ el_GR.UTF-8/UTF-8 \ el_GR/ISO-8859-7 \ +el_CY.UTF-8/UTF-8 \ +el_CY/ISO-8859-7 \ en_AU.UTF-8/UTF-8 \ en_AU/ISO-8859-1 \ en_BW.UTF-8/UTF-8 \ @@ -180,6 +190,7 @@ fr_FR@euro/ISO-8859-15 \ fr_LU.UTF-8/UTF-8 \ fr_LU/ISO-8859-1 \ fr_LU@euro/ISO-8859-15 \ +fy_NL/UTF-8 \ ga_IE.UTF-8/UTF-8 \ ga_IE/ISO-8859-1 \ ga_IE@euro/ISO-8859-15 \ @@ -204,6 +215,8 @@ hsb_DE/ISO-8859-2 \ hsb_DE.UTF-8/UTF-8 \ hu_HU.UTF-8/UTF-8 \ hu_HU/ISO-8859-2 \ +hy_AM/UTF-8 \ +hy_AM.ARMSCII-8/ARMSCII-8 \ id_ID.UTF-8/UTF-8 \ id_ID/ISO-8859-1 \ is_IS.UTF-8/UTF-8 \ @@ -263,13 +276,16 @@ nl_NL/ISO-8859-1 \ nl_NL@euro/ISO-8859-15 \ nn_NO.UTF-8/UTF-8 \ nn_NO/ISO-8859-1 \ +nr_ZA/UTF-8 \ nso_ZA/UTF-8 \ oc_FR.UTF-8/UTF-8 \ oc_FR/ISO-8859-1 \ om_ET/UTF-8 \ om_KE.UTF-8/UTF-8 \ om_KE/ISO-8859-1 \ +or_IN/UTF-8 \ pa_IN/UTF-8 \ +pa_PK/UTF-8 \ pl_PL.UTF-8/UTF-8 \ pl_PL/ISO-8859-2 \ pt_BR.UTF-8/UTF-8 \ @@ -303,6 +319,7 @@ sq_AL.UTF-8/UTF-8 \ sq_AL/ISO-8859-1 \ sr_CS.UTF-8/UTF-8 \ sr_CS/ISO-8859-5 \ +sr_ME/UTF-8 \ ss_ZA/UTF-8 \ st_ZA.UTF-8/UTF-8 \ st_ZA/ISO-8859-1 \ @@ -323,6 +340,8 @@ tig_ER/UTF-8 \ tl_PH.UTF-8/UTF-8 \ tl_PH/ISO-8859-1 \ tn_ZA/UTF-8 \ +tr_CY.UTF-8/UTF-8 \ +tr_CY/ISO-8859-9 \ tr_TR.UTF-8/UTF-8 \ tr_TR/ISO-8859-9 \ ts_ZA/UTF-8 \ diff -uprN glibc-2.4/localedata/tst-strfmon1.c glibc-2.5/localedata/tst-strfmon1.c --- glibc-2.4/localedata/tst-strfmon1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/localedata/tst-strfmon1.c 2006-04-26 05:13:06.000000000 +0000 @@ -0,0 +1,42 @@ +#include +#include +#include +#include + +static const struct +{ + const char *locale; + const char *expected; +} tests[] = + { + { "de_DE.ISO-8859-1", "|-12,34 EUR|-12,34|" }, + { "da_DK.ISO-8859-1", "|kr -12,34|-12,34|" }, + { "zh_TW.EUC-TW", "|-NT$12.34|-12.34|" }, + { "sv_SE.ISO-8859-1", "|-12,34 kr|-12,34|" } + }; +#define ntests (sizeof (tests) / sizeof (tests[0])) + + +static int +do_test (void) +{ + int res = 0; + for (int i = 0; i < ntests; ++i) + { + char buf[500]; + if (setlocale (LC_ALL, tests[i].locale) == NULL) + { + printf ("failed to set locale %s\n", tests[i].locale); + res = 1; + continue; + } + strfmon (buf, sizeof (buf), "|%n|%!n|", -12.34, -12.34); + int fail = strcmp (buf, tests[i].expected) != 0; + printf ("%s%s\n", buf, fail ? " *** FAIL ***" : ""); + res |= fail; + } + return res; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/login/utmpname.c glibc-2.5/login/utmpname.c --- glibc-2.4/login/utmpname.c 2002-03-13 05:09:36.000000000 +0000 +++ glibc-2.5/login/utmpname.c 2006-08-14 03:58:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis , 1997. @@ -50,8 +50,7 @@ __utmpname (const char *file) { if (strcmp (file, default_file_name) == 0) { - if (__libc_utmp_file_name != default_file_name) - free ((char *) __libc_utmp_file_name); + free ((char *) __libc_utmp_file_name); __libc_utmp_file_name = default_file_name; } diff -uprN glibc-2.4/mach/Machrules glibc-2.5/mach/Machrules --- glibc-2.4/mach/Machrules 2006-02-01 22:44:28.000000000 +0000 +++ glibc-2.5/mach/Machrules 2006-04-04 00:22:05.000000000 +0000 @@ -138,10 +138,11 @@ $(patsubst %,$(objpfx)%.udeps,$(user-int # We must use $(CFLAGS) to get -O flags that affect #if's in header files. $(include-%.defs) | \ $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \ - sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\ - $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \ + sed -e 's,- *:,$(.udeps-targets):,' \ $(sed-remove-objpfx) > $@.new mv -f $@.new $@ +.udeps-targets = $@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h) \ + $(@:.udeps=_server.c) $(@:.udeps=_server.h) endif # Look for the server stub files where they will be written. diff -uprN glibc-2.4/Makeconfig glibc-2.5/Makeconfig --- glibc-2.4/Makeconfig 2006-03-01 10:35:47.000000000 +0000 +++ glibc-2.5/Makeconfig 2006-07-10 21:42:27.000000000 +0000 @@ -413,11 +413,20 @@ LDFLAGS.so += $(relro-LDFLAGS) LDFLAGS-rtld += $(relro-LDFLAGS) endif +ifeq (yes,$(have-hash-style)) +# For the time being we unconditionally use 'both'. At some time we +# should declare statically linked code as 'out of luck' and compile +# with --hash-style=gnu only. +hashstyle-LDFLAGS = -Wl,--hash-style=both +LDFLAGS.so += $(hashstyle-LDFLAGS) +LDFLAGS-rtld += $(hashstyle-LDFLAGS) +endif + # Command for linking programs with the C library. ifndef +link +link = $(CC) -nostdlib -nostartfiles -o $@ \ $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(combreloc-LDFLAGS) $(relro-LDFLAGS) \ + $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ $(addprefix $(csu-objpfx),$(start-installed-name)) \ $(+preinit) $(+prector) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ @@ -783,8 +792,7 @@ ifeq (yes, $(build-shared)) # (but no commands). %.v.i: $(common-objpfx)config.h sed '/^[ ]*#/d;s/^[ ]*%/#/' $(filter-out FORCE %.h,$^) \ - | $(CC) -E -undef $(CPPFLAGS) \ - -DASSEMBLER -x assembler-with-cpp - \ + | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \ > $@T mv -f $@T $@ %.v: %.v.i diff -uprN glibc-2.4/Makerules glibc-2.5/Makerules --- glibc-2.4/Makerules 2006-03-01 04:20:13.000000000 +0000 +++ glibc-2.5/Makerules 2006-09-05 02:02:13.000000000 +0000 @@ -487,7 +487,13 @@ $(common-objpfx)shlib.lds: $(common-objp -Wl,--verbose 2>&1 | \ sed > $@T \ -e '/^=========/,/^=========/!d;/^=========/d' \ - -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + $(if $(filter yes,$(have-hash-style)), \ + -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \ + -e '/DATA_SEGMENT_ALIGN/{H;g}' \ + , \ + -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + ) \ -e 's/^.*\*(\.dynbss).*$$/& \ PROVIDE(__start___libc_freeres_ptrs = .); \ *(__libc_freeres_ptrs) \ @@ -688,6 +694,7 @@ endif +depfiles := $(sources:.c=.d) \ $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \ + $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \ $(addsuffix .d,$(tests) $(xtests) $(test-srcs)) ifeq ($(build-programs),yes) +depfiles += $(addsuffix .d,$(others) $(sysdep-others)) @@ -1369,8 +1376,8 @@ common-mostlyclean: $(test-srcs)) \ $(addsuffix -bp.out,$(tests) $(xtests) \ $(test-srcs))) - -rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \ - $(install-lib.so) \ + -rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \ + $(install-lib) $(install-lib.so) \ $(install-lib.so:%.so=%_pic.a)) -rm -f core -rm -f $(objpfx)rtld-*.os diff -uprN glibc-2.4/malloc/arena.c glibc-2.5/malloc/arena.c --- glibc-2.4/malloc/arena.c 2006-03-06 06:18:35.000000000 +0000 +++ glibc-2.5/malloc/arena.c 2006-09-07 16:04:22.000000000 +0000 @@ -24,7 +24,11 @@ #define HEAP_MIN_SIZE (32*1024) #ifndef HEAP_MAX_SIZE -#define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */ +# ifdef DEFAULT_MMAP_THRESHOLD_MAX +# define HEAP_MAX_SIZE (2 * DEFAULT_MMAP_THRESHOLD_MAX) +# else +# define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */ +# endif #endif /* HEAP_MIN_SIZE and HEAP_MAX_SIZE limit the size of mmap()ed heaps @@ -551,8 +555,8 @@ ptmalloc_init (void) } s = getenv("MALLOC_CHECK_"); #endif - if(s) { - if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0')); + if(s && s[0]) { + mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0')); if (check_action != 0) __malloc_check_init(); } @@ -708,7 +712,7 @@ grow_heap(h, diff) heap_info *h; long di if(diff >= 0) { diff = (diff + page_mask) & ~page_mask; new_size = (long)h->size + diff; - if(new_size > HEAP_MAX_SIZE) + if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE) return -1; if(mprotect((char *)h + h->size, diff, PROT_READ|PROT_WRITE) != 0) return -2; diff -uprN glibc-2.4/malloc/Makefile glibc-2.5/malloc/Makefile --- glibc-2.4/malloc/Makefile 2005-09-27 05:42:25.000000000 +0000 +++ glibc-2.5/malloc/Makefile 2006-05-19 16:42:00.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005 +# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005, 2006 # Free Software Foundation, Inc. # This file is part of the GNU C Library. @@ -79,6 +79,7 @@ endif ifneq ($(cross-compiling),yes) # If the gd library is available we build the `memusagestat' program. ifneq ($(LIBGD),no) +others: $(objpfx)memusage install-bin = memusagestat install-bin-script += memusage generated += memusagestat memusage @@ -126,6 +127,8 @@ tst-mcheck-ENV = MALLOC_CHECK_=3 # Uncomment this for test releases. For public releases it is too expensive. #CPPFLAGS-malloc.o += -DMALLOC_DEBUG=1 +sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') + $(objpfx)mtrace: mtrace.pl rm -f $@.new sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \ @@ -135,7 +138,7 @@ $(objpfx)mtrace: mtrace.pl $(objpfx)memusage: memusage.sh rm -f $@.new sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \ - -e 's|@SLIBDIR@|$(slibdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \ + -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \ && rm -f $@ && mv $@.new $@ && chmod +x $@ diff -uprN glibc-2.4/malloc/malloc.c glibc-2.5/malloc/malloc.c --- glibc-2.4/malloc/malloc.c 2006-03-06 07:18:59.000000000 +0000 +++ glibc-2.5/malloc/malloc.c 2006-09-07 16:06:02.000000000 +0000 @@ -259,6 +259,7 @@ #ifdef _LIBC #include +#include #endif #ifdef __cplusplus @@ -1415,6 +1416,27 @@ int __posix_memalign(void **, size_ #endif /* + MMAP_THRESHOLD_MAX and _MIN are the bounds on the dynamically + adjusted MMAP_THRESHOLD. +*/ + +#ifndef DEFAULT_MMAP_THRESHOLD_MIN +#define DEFAULT_MMAP_THRESHOLD_MIN (128 * 1024) +#endif + +#ifndef DEFAULT_MMAP_THRESHOLD_MAX + /* For 32-bit platforms we cannot increase the maximum mmap + threshold much because it is also the minimum value for the + maximum heap size and its alignment. Going above 512k (i.e., 1M + for new heaps) wastes too much address space. */ +# if __WORDSIZE == 32 +# define DEFAULT_MMAP_THRESHOLD_MAX (512 * 1024) +# else +# define DEFAULT_MMAP_THRESHOLD_MAX (4 * 1024 * 1024 * sizeof(long)) +# endif +#endif + +/* M_MMAP_THRESHOLD is the request size threshold for using mmap() to service a request. Requests of at least this size that cannot be allocated using already-existing space will be serviced via mmap. @@ -1453,12 +1475,63 @@ int __posix_memalign(void **, size_ "large" chunks, but the value of "large" varies across systems. The default is an empirically derived value that works well in most systems. + + + Update in 2006: + The above was written in 2001. Since then the world has changed a lot. + Memory got bigger. Applications got bigger. The virtual address space + layout in 32 bit linux changed. + + In the new situation, brk() and mmap space is shared and there are no + artificial limits on brk size imposed by the kernel. What is more, + applications have started using transient allocations larger than the + 128Kb as was imagined in 2001. + + The price for mmap is also high now; each time glibc mmaps from the + kernel, the kernel is forced to zero out the memory it gives to the + application. Zeroing memory is expensive and eats a lot of cache and + memory bandwidth. This has nothing to do with the efficiency of the + virtual memory system, by doing mmap the kernel just has no choice but + to zero. + + In 2001, the kernel had a maximum size for brk() which was about 800 + megabytes on 32 bit x86, at that point brk() would hit the first + mmaped shared libaries and couldn't expand anymore. With current 2.6 + kernels, the VA space layout is different and brk() and mmap + both can span the entire heap at will. + + Rather than using a static threshold for the brk/mmap tradeoff, + we are now using a simple dynamic one. The goal is still to avoid + fragmentation. The old goals we kept are + 1) try to get the long lived large allocations to use mmap() + 2) really large allocations should always use mmap() + and we're adding now: + 3) transient allocations should use brk() to avoid forcing the kernel + having to zero memory over and over again + + The implementation works with a sliding threshold, which is by default + limited to go between 128Kb and 32Mb (64Mb for 64 bitmachines) and starts + out at 128Kb as per the 2001 default. + + This allows us to satisfy requirement 1) under the assumption that long + lived allocations are made early in the process' lifespan, before it has + started doing dynamic allocations of the same size (which will + increase the threshold). + + The upperbound on the threshold satisfies requirement 2) + + The threshold goes up in value when the application frees memory that was + allocated with the mmap allocator. The idea is that once the application + starts freeing memory of a certain size, it's highly probable that this is + a size the application uses for transient allocations. This estimator + is there to satisfy the new third requirement. + */ #define M_MMAP_THRESHOLD -3 #ifndef DEFAULT_MMAP_THRESHOLD -#define DEFAULT_MMAP_THRESHOLD (128 * 1024) +#define DEFAULT_MMAP_THRESHOLD DEFAULT_MMAP_THRESHOLD_MIN #endif /* @@ -1988,7 +2061,9 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+- typedef struct malloc_chunk* mbinptr; /* addressing -- note that bin_at(0) does not exist */ -#define bin_at(m, i) ((mbinptr)((char*)&((m)->bins[(i)<<1]) - (SIZE_SZ<<1))) +#define bin_at(m, i) \ + (mbinptr) (((char *) &((m)->bins[((i) - 1) * 2])) \ + - offsetof (struct malloc_chunk, fd)) /* analog of ++bin */ #define next_bin(b) ((mbinptr)((char*)(b) + (sizeof(mchunkptr)<<1))) @@ -2228,7 +2303,7 @@ struct malloc_state { mchunkptr last_remainder; /* Normal bins packed as described above */ - mchunkptr bins[NBINS * 2]; + mchunkptr bins[NBINS * 2 - 2]; /* Bitmap of bins */ unsigned int binmap[BINMAPSIZE]; @@ -2251,6 +2326,10 @@ struct malloc_par { int n_mmaps; int n_mmaps_max; int max_n_mmaps; + /* the mmap_threshold is dynamic, until the user sets + it manually, at which point we need to disable any + dynamic behavior. */ + int no_dyn_threshold; /* Cache malloc_getpagesize */ unsigned int pagesize; @@ -2783,6 +2862,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNA unsigned long sum; /* for updating stats */ size_t pagemask = mp_.pagesize - 1; + bool tried_mmap = false; #if HAVE_MMAP @@ -2799,12 +2879,14 @@ static Void_t* sYSMALLOc(nb, av) INTERNA char* mm; /* return value from mmap call*/ + try_mmap: /* Round up size to nearest page. For mmapped chunks, the overhead is one SIZE_SZ unit larger than for normal chunks, because there is no following chunk whose prev_size field could be used. */ size = (nb + SIZE_SZ + MALLOC_ALIGN_MASK + pagemask) & ~pagemask; + tried_mmap = true; /* Don't try if size wraps around 0 */ if ((unsigned long)(size) > (unsigned long)(nb)) { @@ -2888,7 +2970,8 @@ static Void_t* sYSMALLOc(nb, av) INTERNA /* First try to extend the current heap. */ old_heap = heap_for_ptr(old_top); old_heap_size = old_heap->size; - if (grow_heap(old_heap, MINSIZE + nb - old_size) == 0) { + if ((long) (MINSIZE + nb - old_size) > 0 + && grow_heap(old_heap, MINSIZE + nb - old_size) == 0) { av->system_mem += old_heap->size - old_heap_size; arena_mem += old_heap->size - old_heap_size; #if 0 @@ -2928,6 +3011,9 @@ static Void_t* sYSMALLOc(nb, av) INTERNA set_foot(old_top, (old_size + 2*SIZE_SZ)); } } + else if (!tried_mmap) + /* We can at least try to use to mmap memory. */ + goto try_mmap; } else { /* av == main_arena */ @@ -3428,6 +3514,14 @@ public_fREe(Void_t* mem) #if HAVE_MMAP if (chunk_is_mmapped(p)) /* release mmapped memory. */ { + /* see if the dynamic brk/mmap threshold needs adjusting */ + if (!mp_.no_dyn_threshold + && p->size > mp_.mmap_threshold + && p->size <= DEFAULT_MMAP_THRESHOLD_MAX) + { + mp_.mmap_threshold = chunksize (p); + mp_.trim_threshold = 2 * mp_.mmap_threshold; + } munmap_chunk(p); return; } @@ -3532,6 +3626,29 @@ public_rEALLOc(Void_t* oldmem, size_t by (void)mutex_unlock(&ar_ptr->mutex); assert(!newp || chunk_is_mmapped(mem2chunk(newp)) || ar_ptr == arena_for_chunk(mem2chunk(newp))); + + if (newp == NULL) + { + /* Try harder to allocate memory in other arenas. */ + newp = public_mALLOc(bytes); + if (newp != NULL) + { + MALLOC_COPY (newp, oldmem, oldsize - 2 * SIZE_SZ); +#if THREAD_STATS + if(!mutex_trylock(&ar_ptr->mutex)) + ++(ar_ptr->stat_lock_direct); + else { + (void)mutex_lock(&ar_ptr->mutex); + ++(ar_ptr->stat_lock_wait); + } +#else + (void)mutex_lock(&ar_ptr->mutex); +#endif + _int_free(ar_ptr, oldmem); + (void)mutex_unlock(&ar_ptr->mutex); + } + } + return newp; } #ifdef libc_hidden_def @@ -3979,6 +4096,8 @@ _int_malloc(mstate av, size_t bytes) for(;;) { + int iters = 0; + bool any_larger = false; while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) { bck = victim->bk; if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0) @@ -4074,6 +4193,12 @@ _int_malloc(mstate av, size_t bytes) victim->fd = fwd; fwd->bk = victim; bck->fd = victim; + + if (size >= nb + MINSIZE) + any_larger = true; +#define MAX_ITERS 10000 + if (++iters >= MAX_ITERS) + break; } /* @@ -4106,8 +4231,14 @@ _int_malloc(mstate av, size_t bytes) /* Split */ else { remainder = chunk_at_offset(victim, nb); - unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder; - remainder->bk = remainder->fd = unsorted_chunks(av); + /* We cannot assume the unsorted list is empty and therefore + have to perform a complete insert here. */ + bck = unsorted_chunks(av); + fwd = bck->fd; + remainder->bk = bck; + remainder->fd = fwd; + bck->fd = remainder; + fwd->bk = remainder; set_head(victim, nb | PREV_INUSE | (av != &main_arena ? NON_MAIN_ARENA : 0)); set_head(remainder, remainder_size | PREV_INUSE); @@ -4192,8 +4323,15 @@ _int_malloc(mstate av, size_t bytes) else { remainder = chunk_at_offset(victim, nb); - unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder; - remainder->bk = remainder->fd = unsorted_chunks(av); + /* We cannot assume the unsorted list is empty and therefore + have to perform a complete insert here. */ + bck = unsorted_chunks(av); + fwd = bck->fd; + remainder->bk = bck; + remainder->fd = fwd; + bck->fd = remainder; + fwd->bk = remainder; + /* advertise as last remainder */ if (in_smallbin_range(nb)) av->last_remainder = remainder; @@ -5418,10 +5556,12 @@ int mALLOPt(param_number, value) int par case M_TRIM_THRESHOLD: mp_.trim_threshold = value; + mp_.no_dyn_threshold = 1; break; case M_TOP_PAD: mp_.top_pad = value; + mp_.no_dyn_threshold = 1; break; case M_MMAP_THRESHOLD: @@ -5432,6 +5572,7 @@ int mALLOPt(param_number, value) int par else #endif mp_.mmap_threshold = value; + mp_.no_dyn_threshold = 1; break; case M_MMAP_MAX: @@ -5441,6 +5582,7 @@ int mALLOPt(param_number, value) int par else #endif mp_.n_mmaps_max = value; + mp_.no_dyn_threshold = 1; break; case M_CHECK_ACTION: diff -uprN glibc-2.4/malloc/memusage.sh glibc-2.5/malloc/memusage.sh --- glibc-2.4/malloc/memusage.sh 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/malloc/memusage.sh 2006-05-19 16:47:26.000000000 +0000 @@ -18,8 +18,8 @@ # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. -memusageso=@SLIBDIR@/libmemusage.so -memusagestat=@BINDIR@/memusagestat +memusageso='@SLIBDIR@/libmemusage.so' +memusagestat='@BINDIR@/memusagestat' TEXTDOMAIN=libc # Print usage message. diff -uprN glibc-2.4/malloc/memusagestat.c glibc-2.5/malloc/memusagestat.c --- glibc-2.4/malloc/memusagestat.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/malloc/memusagestat.c 2006-08-09 22:20:47.000000000 +0000 @@ -1,5 +1,5 @@ /* Generate graphic from memory profiling data. - Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -277,16 +277,16 @@ main (int argc, char *argv[]) gdImageString (im_out, gdFontSmall, 38, ysize - 14, (unsigned char *) "0", blue); - snprintf(buf, sizeof (buf), heap_format, 0); + snprintf (buf, sizeof (buf), heap_format, 0); gdImageString (im_out, gdFontSmall, maxsize_heap < 1024 ? 32 : 26, - ysize - 26, buf, red); - snprintf(buf, sizeof (buf), stack_format, 0); + ysize - 26, (unsigned char *) buf, red); + snprintf (buf, sizeof (buf), stack_format, 0); gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26, - buf, green); + (unsigned char *) buf, green); if (string != NULL) gdImageString (im_out, gdFontLarge, (xsize - strlen (string) * 8) / 2, - 2, (char *) string, green); + 2, (unsigned char *) string, green); gdImageStringUp (im_out, gdFontSmall, 1, ysize / 2 - 10, (unsigned char *) "allocated", red); @@ -299,9 +299,11 @@ main (int argc, char *argv[]) (unsigned char *) "stack", green); snprintf (buf, sizeof (buf), heap_format, maxsize_heap / heap_scale); - gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, 14, buf, red); + gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, 14, + (unsigned char *) buf, red); snprintf (buf, sizeof (buf), stack_format, maxsize_stack / stack_scale); - gdImageString (im_out, gdFontSmall, xsize - 37, 14, buf, green); + gdImageString (im_out, gdFontSmall, xsize - 37, 14, + (unsigned char *) buf, green); for (line = 1; line <= 3; ++line) { @@ -312,7 +314,7 @@ main (int argc, char *argv[]) snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line / heap_scale); gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, - ysize - 26 - cnt, buf, red); + ysize - 26 - cnt, (unsigned char *) buf, red); cnt2 = ((ysize - 40) * (maxsize_stack / 4 * line / stack_scale)) / (maxsize_stack / stack_scale); @@ -322,11 +324,12 @@ main (int argc, char *argv[]) snprintf (buf, sizeof (buf), stack_format, maxsize_stack / 4 * line / stack_scale); gdImageString (im_out, gdFontSmall, xsize - 37, ysize - 26 - cnt2, - buf, green); + (unsigned char *) buf, green); } snprintf (buf, sizeof (buf), "%llu", (unsigned long long) total); - gdImageString (im_out, gdFontSmall, xsize - 50, ysize - 14, buf, blue); + gdImageString (im_out, gdFontSmall, xsize - 50, ysize - 14, + (unsigned char *) buf, blue); if (!time_based) { diff -uprN glibc-2.4/malloc/tst-malloc.c glibc-2.5/malloc/tst-malloc.c --- glibc-2.4/malloc/tst-malloc.c 2001-07-06 04:55:35.000000000 +0000 +++ glibc-2.5/malloc/tst-malloc.c 2006-08-24 17:30:10.000000000 +0000 @@ -33,7 +33,7 @@ merror (const char *msg) int main (void) { - void *p; + void *p, *q; int save; errno = 0; @@ -64,5 +64,15 @@ main (void) if (p != NULL) merror ("realloc (p, 0) failed."); + p = malloc (513 * 1024); + if (p == NULL) + merror ("malloc (513K) failed."); + + q = malloc (-512 * 1024); + if (q != NULL) + merror ("malloc (-512K) succeeded."); + + free (p); + return errors != 0; } diff -uprN glibc-2.4/manual/string.texi glibc-2.5/manual/string.texi --- glibc-2.4/manual/string.texi 2005-04-11 20:21:55.000000000 +0000 +++ glibc-2.5/manual/string.texi 2006-09-12 11:17:54.000000000 +0000 @@ -2534,7 +2534,7 @@ The @code{argz_append} function appends @comment argz.h @comment GNU -@deftypefun {error_t} argz_delete (char **@var{argz}, size_t *@var{argz_len}, char *@var{entry}) +@deftypefun {void} argz_delete (char **@var{argz}, size_t *@var{argz_len}, char *@var{entry}) If @var{entry} points to the beginning of one of the elements in the argz vector @code{*@var{argz}}, the @code{argz_delete} function will remove this entry and reallocate @code{*@var{argz}}, modifying diff -uprN glibc-2.4/math/complex.h glibc-2.5/math/complex.h --- glibc-2.4/math/complex.h 2006-01-14 12:09:22.000000000 +0000 +++ glibc-2.5/math/complex.h 2006-05-15 14:41:04.000000000 +0000 @@ -89,7 +89,7 @@ __BEGIN_DECLS # ifdef __LDBL_COMPAT # undef __MATHDECL_1 # define __MATHDECL_1(type, function, args) \ - extern type __REDIRECT(__MATH_PRECNAME(function), args, function) __THROW + extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function) # endif # ifndef _Mlong_double_ diff -uprN glibc-2.4/math/gen-libm-test.pl glibc-2.5/math/gen-libm-test.pl --- glibc-2.4/math/gen-libm-test.pl 2001-07-06 04:55:35.000000000 +0000 +++ glibc-2.5/math/gen-libm-test.pl 2006-08-13 08:19:54.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright (C) 1999 Free Software Foundation, Inc. +# Copyright (C) 1999, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Andreas Jaeger , 1999. @@ -234,7 +234,7 @@ sub special_functions { # Parse the arguments to TEST_x_y sub parse_args { - my ($file, $descr, $args) = @_; + my ($file, $descr, $fct, $args) = @_; my (@args, $str, $descr_args, $descr_res, @descr); my ($current_arg, $cline, $i); my ($pre, $post, @special); @@ -248,7 +248,7 @@ sub parse_args { @args = split /,\s*/, $args; - $call = "$args[0] ("; + $call = "$fct ("; # Generate first the string that's shown to the user $current_arg = 1; @@ -423,7 +423,7 @@ sub parse_args { sub generate_testfile { my ($input, $output) = @_; my ($lasttext); - my (@args, $i, $str); + my (@args, $i, $str, $thisfct); open INPUT, $input or die ("Can't open $input: $!"); open OUTPUT, ">$output" or die ("Can't open $output: $!"); @@ -436,11 +436,12 @@ sub generate_testfile { my ($descr, $args); chop; ($descr, $args) = ($_ =~ /TEST_(\w+)\s*\((.*)\)/); - &parse_args (\*OUTPUT, $descr, $args); + &parse_args (\*OUTPUT, $descr, $thisfct, $args); next; } # START (function) if (/START/) { + ($thisfct) = ($_ =~ /START\s*\((.*)\)/); print OUTPUT " init_max_error ();\n"; next; } @@ -557,9 +558,11 @@ sub parse_ulps { sub clean_up_number { my ($number) = @_; - # Remove trailing zeros - $number =~ s/0+$//; - $number =~ s/\.$//; + # Remove trailing zeros after the decimal point + if ($number =~ /\./) { + $number =~ s/0+$//; + $number =~ s/\.$//; + } return $number; } diff -uprN glibc-2.4/math/libm-test.inc glibc-2.5/math/libm-test.inc --- glibc-2.4/math/libm-test.inc 2006-01-28 00:35:55.000000000 +0000 +++ glibc-2.5/math/libm-test.inc 2006-09-20 19:36:26.000000000 +0000 @@ -1628,8 +1628,12 @@ ceil_test (void) TEST_f_f (ceil, M_PIl, 4.0); TEST_f_f (ceil, -M_PIl, -3.0); + TEST_f_f (ceil, 0.1, 1.0); TEST_f_f (ceil, 0.25, 1.0); + TEST_f_f (ceil, 0.625, 1.0); + TEST_f_f (ceil, -0.1, minus_zero); TEST_f_f (ceil, -0.25, minus_zero); + TEST_f_f (ceil, -0.625, minus_zero); #ifdef TEST_LDOUBLE /* The result can only be represented in long double. */ @@ -1645,6 +1649,15 @@ ceil_test (void) TEST_f_f (ceil, -4503599627370496.75L, -4503599627370496.0L); TEST_f_f (ceil, -4503599627370497.5L, -4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (ceil, 4503599627370494.5000000000001L, 4503599627370495.0L); + TEST_f_f (ceil, 4503599627370495.5000000000001L, 4503599627370496.0L); + TEST_f_f (ceil, 4503599627370496.5000000000001L, 4503599627370497.0L); + TEST_f_f (ceil, -4503599627370494.5000000000001L, -4503599627370494.0L); + TEST_f_f (ceil, -4503599627370495.5000000000001L, -4503599627370495.0L); + TEST_f_f (ceil, -4503599627370496.5000000000001L, -4503599627370496.0L); +# endif + TEST_f_f (ceil, 9007199254740991.5L, 9007199254740992.0L); TEST_f_f (ceil, 9007199254740992.25L, 9007199254740993.0L); TEST_f_f (ceil, 9007199254740992.5L, 9007199254740993.0L); @@ -1657,6 +1670,22 @@ ceil_test (void) TEST_f_f (ceil, -9007199254740992.75L, -9007199254740992.0L); TEST_f_f (ceil, -9007199254740993.5L, -9007199254740993.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (ceil, 9007199254740991.0000000000001L, 9007199254740992.0L); + TEST_f_f (ceil, 9007199254740992.0000000000001L, 9007199254740993.0L); + TEST_f_f (ceil, 9007199254740993.0000000000001L, 9007199254740994.0L); + TEST_f_f (ceil, 9007199254740991.5000000000001L, 9007199254740992.0L); + TEST_f_f (ceil, 9007199254740992.5000000000001L, 9007199254740993.0L); + TEST_f_f (ceil, 9007199254740993.5000000000001L, 9007199254740994.0L); + + TEST_f_f (ceil, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (ceil, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (ceil, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (ceil, -9007199254740991.5000000000001L, -9007199254740991.0L); + TEST_f_f (ceil, -9007199254740992.5000000000001L, -9007199254740992.0L); + TEST_f_f (ceil, -9007199254740993.5000000000001L, -9007199254740993.0L); +# endif + TEST_f_f (ceil, 72057594037927935.5L, 72057594037927936.0L); TEST_f_f (ceil, 72057594037927936.25L, 72057594037927937.0L); TEST_f_f (ceil, 72057594037927936.5L, 72057594037927937.0L); @@ -2628,9 +2657,12 @@ floor_test (void) TEST_f_f (floor, M_PIl, 3.0); TEST_f_f (floor, -M_PIl, -4.0); + TEST_f_f (floor, 0.1, 0.0); TEST_f_f (floor, 0.25, 0.0); + TEST_f_f (floor, 0.625, 0.0); + TEST_f_f (floor, -0.1, -1.0); TEST_f_f (floor, -0.25, -1.0); - + TEST_f_f (floor, -0.625, -1.0); #ifdef TEST_LDOUBLE /* The result can only be represented in long double. */ @@ -2639,12 +2671,22 @@ floor_test (void) TEST_f_f (floor, 4503599627370496.5L, 4503599627370496.0L); TEST_f_f (floor, 4503599627370496.75L, 4503599627370496.0L); TEST_f_f (floor, 4503599627370497.5L, 4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (floor, 4503599627370494.5000000000001L, 4503599627370494.0L); + TEST_f_f (floor, 4503599627370495.5000000000001L, 4503599627370495.0L); + TEST_f_f (floor, 4503599627370496.5000000000001L, 4503599627370496.0L); +# endif TEST_f_f (floor, -4503599627370495.5L, -4503599627370496.0L); TEST_f_f (floor, -4503599627370496.25L, -4503599627370497.0L); TEST_f_f (floor, -4503599627370496.5L, -4503599627370497.0L); TEST_f_f (floor, -4503599627370496.75L, -4503599627370497.0L); TEST_f_f (floor, -4503599627370497.5L, -4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (floor, -4503599627370494.5000000000001L, -4503599627370495.0L); + TEST_f_f (floor, -4503599627370495.5000000000001L, -4503599627370496.0L); + TEST_f_f (floor, -4503599627370496.5000000000001L, -4503599627370497.0L); +# endif TEST_f_f (floor, 9007199254740991.5L, 9007199254740991.0L); TEST_f_f (floor, 9007199254740992.25L, 9007199254740992.0L); @@ -2652,12 +2694,30 @@ floor_test (void) TEST_f_f (floor, 9007199254740992.75L, 9007199254740992.0L); TEST_f_f (floor, 9007199254740993.5L, 9007199254740993.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (floor, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (floor, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (floor, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (floor, 9007199254740991.5000000000001L, 9007199254740991.0L); + TEST_f_f (floor, 9007199254740992.5000000000001L, 9007199254740992.0L); + TEST_f_f (floor, 9007199254740993.5000000000001L, 9007199254740993.0L); +# endif + TEST_f_f (floor, -9007199254740991.5L, -9007199254740992.0L); TEST_f_f (floor, -9007199254740992.25L, -9007199254740993.0L); TEST_f_f (floor, -9007199254740992.5L, -9007199254740993.0L); TEST_f_f (floor, -9007199254740992.75L, -9007199254740993.0L); TEST_f_f (floor, -9007199254740993.5L, -9007199254740994.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (floor, -9007199254740991.0000000000001L, -9007199254740992.0L); + TEST_f_f (floor, -9007199254740992.0000000000001L, -9007199254740993.0L); + TEST_f_f (floor, -9007199254740993.0000000000001L, -9007199254740994.0L); + TEST_f_f (floor, -9007199254740991.5000000000001L, -9007199254740992.0L); + TEST_f_f (floor, -9007199254740992.5000000000001L, -9007199254740993.0L); + TEST_f_f (floor, -9007199254740993.5000000000001L, -9007199254740994.0L); +# endif + TEST_f_f (floor, 72057594037927935.5L, 72057594037927935.0L); TEST_f_f (floor, 72057594037927936.25L, 72057594037927936.0L); TEST_f_f (floor, 72057594037927936.5L, 72057594037927936.0L); @@ -3213,6 +3273,166 @@ lrint_test (void) static void +lrint_test_tonearest (void) +{ + int save_round_mode; + START (lrint_tonearest); + + save_round_mode = fegetround (); + + if (!fesetround (FE_TONEAREST)) + { + TEST_f_l (lrint, 0.0, 0); + TEST_f_l (lrint, minus_zero, 0); + TEST_f_l (lrint, 0.2L, 0); + TEST_f_l (lrint, -0.2L, 0); + TEST_f_l (lrint, 0.5L, 0); + TEST_f_l (lrint, -0.5L, 0); + TEST_f_l (lrint, 0.8L, 1); + TEST_f_l (lrint, -0.8L, -1); + + TEST_f_l (lrint, 1.4L, 1); + TEST_f_l (lrint, -1.4L, -1); + + TEST_f_l (lrint, 8388600.3L, 8388600); + TEST_f_l (lrint, -8388600.3L, -8388600); + + TEST_f_l (lrint, 1071930.0008, 1071930); +#ifndef TEST_FLOAT + TEST_f_l (lrint, 1073741824.01, 1073741824); +# if LONG_MAX > 281474976710656 + TEST_f_l (lrint, 281474976710656.025, 281474976710656); +# endif +#endif + } + + fesetround (save_round_mode); + + END (lrint_tonearest); +} + + +static void +lrint_test_towardzero (void) +{ + int save_round_mode; + START (lrint_towardzero); + + save_round_mode = fegetround (); + + if (!fesetround (FE_TOWARDZERO)) + { + TEST_f_l (lrint, 0.0, 0); + TEST_f_l (lrint, minus_zero, 0); + TEST_f_l (lrint, 0.2L, 0); + TEST_f_l (lrint, -0.2L, 0); + TEST_f_l (lrint, 0.5L, 0); + TEST_f_l (lrint, -0.5L, 0); + TEST_f_l (lrint, 0.8L, 0); + TEST_f_l (lrint, -0.8L, 0); + + TEST_f_l (lrint, 1.4L, 1); + TEST_f_l (lrint, -1.4L, -1); + + TEST_f_l (lrint, 8388600.3L, 8388600); + TEST_f_l (lrint, -8388600.3L, -8388600); + + TEST_f_l (lrint, 1071930.0008, 1071930); +#ifndef TEST_FLOAT + TEST_f_l (lrint, 1073741824.01, 1073741824); +# if LONG_MAX > 281474976710656 + TEST_f_l (lrint, 281474976710656.025, 281474976710656); +# endif +#endif + } + + fesetround (save_round_mode); + + END (lrint_towardzero); +} + + +static void +lrint_test_downward (void) +{ + int save_round_mode; + START (lrint_downward); + + save_round_mode = fegetround (); + + if (!fesetround (FE_DOWNWARD)) + { + TEST_f_l (lrint, 0.0, 0); + TEST_f_l (lrint, minus_zero, 0); + TEST_f_l (lrint, 0.2L, 0); + TEST_f_l (lrint, -0.2L, -1); + TEST_f_l (lrint, 0.5L, 0); + TEST_f_l (lrint, -0.5L, -1); + TEST_f_l (lrint, 0.8L, 0); + TEST_f_l (lrint, -0.8L, -1); + + TEST_f_l (lrint, 1.4L, 1); + TEST_f_l (lrint, -1.4L, -2); + + TEST_f_l (lrint, 8388600.3L, 8388600); + TEST_f_l (lrint, -8388600.3L, -8388601); + + TEST_f_l (lrint, 1071930.0008, 1071930); +#ifndef TEST_FLOAT + TEST_f_l (lrint, 1073741824.01, 1073741824); +# if LONG_MAX > 281474976710656 + TEST_f_l (lrint, 281474976710656.025, 281474976710656); +# endif +#endif + } + + fesetround (save_round_mode); + + END (lrint_downward); +} + + +static void +lrint_test_upward (void) +{ + int save_round_mode; + START (lrint_upward); + + save_round_mode = fegetround (); + + if (!fesetround (FE_UPWARD)) + { + TEST_f_l (lrint, 0.0, 0); + TEST_f_l (lrint, minus_zero, 0); + TEST_f_l (lrint, 0.2L, 1); + TEST_f_l (lrint, -0.2L, 0); + TEST_f_l (lrint, 0.5L, 1); + TEST_f_l (lrint, -0.5L, 0); + TEST_f_l (lrint, 0.8L, 1); + TEST_f_l (lrint, -0.8L, 0); + + TEST_f_l (lrint, 1.4L, 2); + TEST_f_l (lrint, -1.4L, -1); + + TEST_f_l (lrint, 8388600.3L, 8388601); + TEST_f_l (lrint, -8388600.3L, -8388600); + +#ifndef TEST_FLOAT + TEST_f_l (lrint, 1071930.0008, 1071931); + TEST_f_l (lrint, 1073741824.01, 1073741825); +# if LONG_MAX > 281474976710656 && defined (TEST_LDOUBLE) + TEST_f_l (lrint, 281474976710656.025, 281474976710656); +# endif +#endif + } + + fesetround (save_round_mode); + + END (lrint_upward); +} + + +static void llrint_test (void) { /* XXX this test is incomplete. We need to have a way to specifiy @@ -3271,6 +3491,22 @@ llrint_test (void) TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL); TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL); +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL); + + TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL); +#endif + TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL); TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL); TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL); @@ -3283,6 +3519,22 @@ llrint_test (void) TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL); TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL); +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL); + + TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL); +#endif + TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL); TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL); TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL); @@ -3294,11 +3546,570 @@ llrint_test (void) TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL); TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL); TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L); + TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL); + TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL); +# endif #endif END (llrint); } +static void +llrint_test_tonearest (void) +{ + int save_round_mode; + START (llrint_tonearest); + + save_round_mode = fegetround (); + + if (!fesetround (FE_TONEAREST)) + { + TEST_f_L (llrint, 0.0, 0); + TEST_f_L (llrint, minus_zero, 0); + TEST_f_L (llrint, 0.2L, 0); + TEST_f_L (llrint, -0.2L, 0); + + TEST_f_L (llrint, 1.4L, 1); + TEST_f_L (llrint, -1.4L, -1); + + TEST_f_L (llrint, 8388600.3L, 8388600); + TEST_f_L (llrint, -8388600.3L, -8388600); + + TEST_f_l (llrint, 1071930.0008, 1071930); + + /* Test boundary conditions. */ + /* 0x1FFFFF */ + TEST_f_L (llrint, 2097151.0,2097151LL); + /* 0x800000 */ + TEST_f_L (llrint, 8388608.0, 8388608LL); + /* 0x1000000 */ + TEST_f_L (llrint, 16777216.0, 16777216LL); + /* 0x20000000000 */ + TEST_f_L (llrint, 2199023255552.0, 2199023255552LL); + /* 0x40000000000 */ + TEST_f_L (llrint, 4398046511104.0, 4398046511104LL); + /* 0x1000000000000 */ + TEST_f_L (llrint, 281474976710656.0, 281474976710656LL); + /* 0x10000000000000 */ + TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL); + /* 0x10000080000000 */ + TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL); + /* 0x20000000000000 */ + TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL); + /* 0x80000000000000 */ + TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL); + /* 0x100000000000000 */ + TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL); +#ifdef TEST_LDOUBLE + /* The input can only be represented in long double. */ + TEST_f_L (llrint, 4503599627370495.5L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.75L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370497.5L, 4503599627370498LL); + + TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL); + + TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL); +#endif + + TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.75L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.5L, 9007199254740994LL); + + TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL); + + TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL); +#endif + + TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.75L, 72057594037927937LL); + TEST_f_L (llrint, 72057594037927937.5L, 72057594037927938LL); + + TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL); + TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L); + TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL); + TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL); +# endif +#endif + } + + fesetround (save_round_mode); + + END (llrint_tonearest); +} + +static void +llrint_test_towardzero (void) +{ + int save_round_mode; + START (llrint_towardzero); + + save_round_mode = fegetround (); + + if (!fesetround (FE_TOWARDZERO)) + { + TEST_f_L (llrint, 0.0, 0); + TEST_f_L (llrint, minus_zero, 0); + TEST_f_L (llrint, 0.2L, 0); + TEST_f_L (llrint, -0.2L, 0); + + TEST_f_L (llrint, 1.4L, 1); + TEST_f_L (llrint, -1.4L, -1); + + TEST_f_L (llrint, 8388600.3L, 8388600); + TEST_f_L (llrint, -8388600.3L, -8388600); + + TEST_f_l (llrint, 1071930.0008, 1071930); + + /* Test boundary conditions. */ + /* 0x1FFFFF */ + TEST_f_L (llrint, 2097151.0,2097151LL); + /* 0x800000 */ + TEST_f_L (llrint, 8388608.0, 8388608LL); + /* 0x1000000 */ + TEST_f_L (llrint, 16777216.0, 16777216LL); + /* 0x20000000000 */ + TEST_f_L (llrint, 2199023255552.0, 2199023255552LL); + /* 0x40000000000 */ + TEST_f_L (llrint, 4398046511104.0, 4398046511104LL); + /* 0x1000000000000 */ + TEST_f_L (llrint, 281474976710656.0, 281474976710656LL); + /* 0x10000000000000 */ + TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL); + /* 0x10000080000000 */ + TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL); + /* 0x20000000000000 */ + TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL); + /* 0x80000000000000 */ + TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL); + /* 0x100000000000000 */ + TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL); +#ifdef TEST_LDOUBLE + /* The input can only be represented in long double. */ + TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.75L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.5L, 4503599627370497LL); + + TEST_f_L (llrint, -4503599627370495.5L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.75L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.5L, -4503599627370497LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370494LL); + TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370496LL); + + TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370494LL); + TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370496LL); +#endif + + TEST_f_L (llrint, 9007199254740991.5L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.75L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.5L, 9007199254740993LL); + + TEST_f_L (llrint, -9007199254740991.5L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.75L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.5L, -9007199254740993LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740993LL); + + TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740993LL); +#endif + + TEST_f_L (llrint, 72057594037927935.5L, 72057594037927935LL); + TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.75L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927937.5L, 72057594037927937LL); + + TEST_f_L (llrint, -72057594037927935.5L, -72057594037927935LL); + TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.75L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927937.5L, -72057594037927937LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL); + TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775805LL); + TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L); + TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL); +# endif +#endif + } + + fesetround (save_round_mode); + + END (llrint_towardzero); +} + +static void +llrint_test_downward (void) +{ + int save_round_mode; + START (llrint_downward); + + save_round_mode = fegetround (); + + if (!fesetround (FE_DOWNWARD)) + { + TEST_f_L (llrint, 0.0, 0); + TEST_f_L (llrint, minus_zero, 0); + TEST_f_L (llrint, 0.2L, 0); + TEST_f_L (llrint, -0.2L, -1); + + TEST_f_L (llrint, 1.4L, 1); + TEST_f_L (llrint, -1.4L, -2); + + TEST_f_L (llrint, 8388600.3L, 8388600); + TEST_f_L (llrint, -8388600.3L, -8388601); + + TEST_f_l (llrint, 1071930.0008, 1071930); + + /* Test boundary conditions. */ + /* 0x1FFFFF */ + TEST_f_L (llrint, 2097151.0,2097151LL); + /* 0x800000 */ + TEST_f_L (llrint, 8388608.0, 8388608LL); + /* 0x1000000 */ + TEST_f_L (llrint, 16777216.0, 16777216LL); + /* 0x20000000000 */ + TEST_f_L (llrint, 2199023255552.0, 2199023255552LL); + /* 0x40000000000 */ + TEST_f_L (llrint, 4398046511104.0, 4398046511104LL); + /* 0x1000000000000 */ + TEST_f_L (llrint, 281474976710656.0, 281474976710656LL); + /* 0x10000000000000 */ + TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL); + /* 0x10000080000000 */ + TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL); + /* 0x20000000000000 */ + TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL); + /* 0x80000000000000 */ + TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL); + /* 0x100000000000000 */ + TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL); +#ifdef TEST_LDOUBLE + /* The input can only be represented in long double. */ + TEST_f_L (llrint, 4503599627370495.5L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.25L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.75L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.5L, 4503599627370497LL); + + TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370494LL); + TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370496LL); + + TEST_f_L (llrint, -4503599627370495.5L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.25L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370496.5L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370496.75L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370497.5L, -4503599627370498LL); + + TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370498LL); + TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370497LL); + + TEST_f_L (llrint, 9007199254740991.5L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.25L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.75L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.5L, 9007199254740993LL); + + TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740991LL); + TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740993LL); + + TEST_f_L (llrint, -9007199254740991.5L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.25L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740992.5L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740992.75L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.5L, -9007199254740994LL); + + TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740994LL); + TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740994LL); + + TEST_f_L (llrint, 72057594037927935.5L, 72057594037927935LL); + TEST_f_L (llrint, 72057594037927936.25L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.5L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.75L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927937.5L, 72057594037927937LL); + + TEST_f_L (llrint, -72057594037927935.5L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.25L, -72057594037927937LL); + TEST_f_L (llrint, -72057594037927936.5L, -72057594037927937LL); + TEST_f_L (llrint, -72057594037927936.75L, -72057594037927937LL); + TEST_f_L (llrint, -72057594037927937.5L, -72057594037927938LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775805LL); + TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775807LL); + TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775806L); + TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775807LL); + TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775807LL); + TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL); +# endif +#endif + } + + fesetround (save_round_mode); + + END (llrint_downward); +} + +static void +llrint_test_upward (void) +{ + int save_round_mode; + START (llrint_upward); + + save_round_mode = fegetround (); + + if (!fesetround (FE_UPWARD)) + { + TEST_f_L (llrint, 0.0, 0); + TEST_f_L (llrint, minus_zero, 0); + TEST_f_L (llrint, 0.2L, 1); + TEST_f_L (llrint, -0.2L, 0); + + TEST_f_L (llrint, 1.4L, 2); + TEST_f_L (llrint, -1.4L, -1); + + TEST_f_L (llrint, 8388600.3L, 8388601); + TEST_f_L (llrint, -8388600.3L, -8388600); +#ifndef TEST_FLOAT + TEST_f_l (llrint, 1071930.0008, 1071931); +#endif + /* Test boundary conditions. */ + /* 0x1FFFFF */ + TEST_f_L (llrint, 2097151.0,2097151LL); + /* 0x800000 */ + TEST_f_L (llrint, 8388608.0, 8388608LL); + /* 0x1000000 */ + TEST_f_L (llrint, 16777216.0, 16777216LL); + /* 0x20000000000 */ + TEST_f_L (llrint, 2199023255552.0, 2199023255552LL); + /* 0x40000000000 */ + TEST_f_L (llrint, 4398046511104.0, 4398046511104LL); + /* 0x1000000000000 */ + TEST_f_L (llrint, 281474976710656.0, 281474976710656LL); + /* 0x10000000000000 */ + TEST_f_L (llrint, 4503599627370496.0, 4503599627370496LL); + /* 0x10000080000000 */ + TEST_f_L (llrint, 4503601774854144.0, 4503601774854144LL); + /* 0x20000000000000 */ + TEST_f_L (llrint, 9007199254740992.0, 9007199254740992LL); + /* 0x80000000000000 */ + TEST_f_L (llrint, 36028797018963968.0, 36028797018963968LL); + /* 0x100000000000000 */ + TEST_f_L (llrint, 72057594037927936.0, 72057594037927936LL); +#ifdef TEST_LDOUBLE + /* The input can only be represented in long double. */ + TEST_f_L (llrint, 4503599627370495.5L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.25L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370496.5L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370496.75L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370497.5L, 4503599627370498LL); + + TEST_f_L (llrint, 4503599627370495.4999999999999L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.4999999999999L, 4503599627370497LL); + TEST_f_L (llrint, 4503599627370497.4999999999999L, 4503599627370498LL); + TEST_f_L (llrint, 4503599627370494.5000000000001L, 4503599627370495LL); + TEST_f_L (llrint, 4503599627370495.5000000000001L, 4503599627370496LL); + TEST_f_L (llrint, 4503599627370496.5000000000001L, 4503599627370497LL); + + TEST_f_L (llrint, -4503599627370495.5L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.25L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.5L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370496.75L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.5L, -4503599627370497LL); + + TEST_f_L (llrint, -4503599627370495.4999999999999L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.4999999999999L, -4503599627370496LL); + TEST_f_L (llrint, -4503599627370497.4999999999999L, -4503599627370497LL); + TEST_f_L (llrint, -4503599627370494.5000000000001L, -4503599627370494LL); + TEST_f_L (llrint, -4503599627370495.5000000000001L, -4503599627370495LL); + TEST_f_L (llrint, -4503599627370496.5000000000001L, -4503599627370496LL); + + TEST_f_L (llrint, 9007199254740991.5L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.25L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740992.5L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740992.75L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.5L, 9007199254740994LL); + + TEST_f_L (llrint, 9007199254740991.4999999999999L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.4999999999999L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.4999999999999L, 9007199254740994LL); + TEST_f_L (llrint, 9007199254740991.5000000000001L, 9007199254740992LL); + TEST_f_L (llrint, 9007199254740992.5000000000001L, 9007199254740993LL); + TEST_f_L (llrint, 9007199254740993.5000000000001L, 9007199254740994LL); + + TEST_f_L (llrint, -9007199254740991.5L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.25L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.5L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740992.75L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.5L, -9007199254740993LL); + + TEST_f_L (llrint, -9007199254740991.4999999999999L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.4999999999999L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.4999999999999L, -9007199254740993LL); + TEST_f_L (llrint, -9007199254740991.5000000000001L, -9007199254740991LL); + TEST_f_L (llrint, -9007199254740992.5000000000001L, -9007199254740992LL); + TEST_f_L (llrint, -9007199254740993.5000000000001L, -9007199254740993LL); + + TEST_f_L (llrint, 72057594037927935.5L, 72057594037927936LL); + TEST_f_L (llrint, 72057594037927936.25L, 72057594037927937LL); + TEST_f_L (llrint, 72057594037927936.5L, 72057594037927937LL); + TEST_f_L (llrint, 72057594037927936.75L, 72057594037927937LL); + TEST_f_L (llrint, 72057594037927937.5L, 72057594037927938LL); + + TEST_f_L (llrint, -72057594037927935.5L, -72057594037927935LL); + TEST_f_L (llrint, -72057594037927936.25L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.5L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927936.75L, -72057594037927936LL); + TEST_f_L (llrint, -72057594037927937.5L, -72057594037927937LL); + +# if LDBL_MANT_DIG > 100 + TEST_f_L (llrint, 9223372036854775805.5L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775805.5L, -9223372036854775805LL); + TEST_f_L (llrint, 9223372036854775806.0L, 9223372036854775806LL); + TEST_f_L (llrint, -9223372036854775806.0L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.25L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775806.25L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.5L, 9223372036854775807L); + TEST_f_L (llrint, -9223372036854775806.5L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775806.75L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775806.75L, -9223372036854775806LL); + TEST_f_L (llrint, 9223372036854775807.0L, 9223372036854775807LL); + TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL); +# endif +#endif + } + + fesetround (save_round_mode); + + END (llrint_upward); +} + static void log_test (void) @@ -3537,6 +4348,22 @@ llround_test (void) TEST_f_L (llround, 4503599627370496.75L, 4503599627370497LL); TEST_f_L (llround, 4503599627370497.5L, 4503599627370498LL); +# if LDBL_MANT_DIG > 100 + TEST_f_L (llround, 4503599627370495.4999999999999L, 4503599627370495LL); + TEST_f_L (llround, 4503599627370496.4999999999999L, 4503599627370496LL); + TEST_f_L (llround, 4503599627370497.4999999999999L, 4503599627370497LL); + TEST_f_L (llround, 4503599627370494.5000000000001L, 4503599627370495LL); + TEST_f_L (llround, 4503599627370495.5000000000001L, 4503599627370496LL); + TEST_f_L (llround, 4503599627370496.5000000000001L, 4503599627370497LL); + + TEST_f_L (llround, -4503599627370495.4999999999999L, -4503599627370495LL); + TEST_f_L (llround, -4503599627370496.4999999999999L, -4503599627370496LL); + TEST_f_L (llround, -4503599627370497.4999999999999L, -4503599627370497LL); + TEST_f_L (llround, -4503599627370494.5000000000001L, -4503599627370495LL); + TEST_f_L (llround, -4503599627370495.5000000000001L, -4503599627370496LL); + TEST_f_L (llround, -4503599627370496.5000000000001L, -4503599627370497LL); +# endif + TEST_f_L (llround, -4503599627370495.5L, -4503599627370496LL); TEST_f_L (llround, -4503599627370496.25L, -4503599627370496LL); TEST_f_L (llround, -4503599627370496.5L, -4503599627370497LL); @@ -3549,6 +4376,22 @@ llround_test (void) TEST_f_L (llround, 9007199254740992.75L, 9007199254740993LL); TEST_f_L (llround, 9007199254740993.5L, 9007199254740994LL); +# if LDBL_MANT_DIG > 100 + TEST_f_L (llround, 9007199254740991.4999999999999L, 9007199254740991LL); + TEST_f_L (llround, 9007199254740992.4999999999999L, 9007199254740992LL); + TEST_f_L (llround, 9007199254740993.4999999999999L, 9007199254740993LL); + TEST_f_L (llround, 9007199254740991.5000000000001L, 9007199254740992LL); + TEST_f_L (llround, 9007199254740992.5000000000001L, 9007199254740993LL); + TEST_f_L (llround, 9007199254740993.5000000000001L, 9007199254740994LL); + + TEST_f_L (llround, -9007199254740991.4999999999999L, -9007199254740991LL); + TEST_f_L (llround, -9007199254740992.4999999999999L, -9007199254740992LL); + TEST_f_L (llround, -9007199254740993.4999999999999L, -9007199254740993LL); + TEST_f_L (llround, -9007199254740991.5000000000001L, -9007199254740992LL); + TEST_f_L (llround, -9007199254740992.5000000000001L, -9007199254740993LL); + TEST_f_L (llround, -9007199254740993.5000000000001L, -9007199254740994LL); +# endif + TEST_f_L (llround, -9007199254740991.5L, -9007199254740992LL); TEST_f_L (llround, -9007199254740992.25L, -9007199254740992LL); TEST_f_L (llround, -9007199254740992.5L, -9007199254740993LL); @@ -3971,6 +4814,12 @@ rint_test (void) TEST_f_f (rint, -2.5, -2.0); TEST_f_f (rint, -3.5, -4.0); TEST_f_f (rint, -4.5, -4.0); + TEST_f_f (rint, 0.1, 0.0); + TEST_f_f (rint, 0.25, 0.0); + TEST_f_f (rint, 0.625, 1.0); + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -1.0); #ifdef TEST_LDOUBLE /* The result can only be represented in long double. */ TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); @@ -3979,12 +4828,38 @@ rint_test (void) TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L); TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L); +# endif + TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L); TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L); TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L); TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L); TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L); + + TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L); + + TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L); +# endif + TEST_f_f (rint, 9007199254740991.5L, 9007199254740992.0L); TEST_f_f (rint, 9007199254740992.25L, 9007199254740992.0L); TEST_f_f (rint, 9007199254740992.5L, 9007199254740992.0L); @@ -4025,23 +4900,66 @@ rint_test_tonearest (void) int save_round_mode; START (rint_tonearest); - save_round_mode = fegetround(); + save_round_mode = fegetround (); if (!fesetround (FE_TONEAREST)) - { - TEST_f_f (rint, 2.0, 2.0); - TEST_f_f (rint, 1.5, 2.0); - TEST_f_f (rint, 1.0, 1.0); - TEST_f_f (rint, 0.5, 0.0); - TEST_f_f (rint, 0.0, 0.0); - TEST_f_f (rint, minus_zero, minus_zero); - TEST_f_f (rint, -0.5, -0.0); - TEST_f_f (rint, -1.0, -1.0); - TEST_f_f (rint, -1.5, -2.0); - TEST_f_f (rint, -2.0, -2.0); - } + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 2.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -2.0); + TEST_f_f (rint, -2.0, -2.0); + TEST_f_f (rint, 0.1, 0.0); + TEST_f_f (rint, 0.25, 0.0); + TEST_f_f (rint, 0.625, 1.0); + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -1.0); +#ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L); + TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L); +# endif + TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L); + TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L); + + TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L); + + TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L); +# endif +#endif + } - fesetround(save_round_mode); + fesetround (save_round_mode); END (rint_tonearest); } @@ -4052,23 +4970,66 @@ rint_test_towardzero (void) int save_round_mode; START (rint_towardzero); - save_round_mode = fegetround(); + save_round_mode = fegetround (); if (!fesetround (FE_TOWARDZERO)) - { - TEST_f_f (rint, 2.0, 2.0); - TEST_f_f (rint, 1.5, 1.0); - TEST_f_f (rint, 1.0, 1.0); - TEST_f_f (rint, 0.5, 0.0); - TEST_f_f (rint, 0.0, 0.0); - TEST_f_f (rint, minus_zero, minus_zero); - TEST_f_f (rint, -0.5, -0.0); - TEST_f_f (rint, -1.0, -1.0); - TEST_f_f (rint, -1.5, -1.0); - TEST_f_f (rint, -2.0, -2.0); - } + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 1.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -1.0); + TEST_f_f (rint, -2.0, -2.0); + TEST_f_f (rint, 0.1, 0.0); + TEST_f_f (rint, 0.25, 0.0); + TEST_f_f (rint, 0.625, 0.0); + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -0.0); +#ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370494.0L); + TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370496.0L); +# endif + TEST_f_f (rint, -4503599627370495.5L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.75L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370497.5L, -4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370494.0L); + TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370496.0L); + + TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740993.0L); + + TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L); +# endif +#endif + } - fesetround(save_round_mode); + fesetround (save_round_mode); END (rint_towardzero); } @@ -4079,23 +5040,66 @@ rint_test_downward (void) int save_round_mode; START (rint_downward); - save_round_mode = fegetround(); + save_round_mode = fegetround (); if (!fesetround (FE_DOWNWARD)) - { - TEST_f_f (rint, 2.0, 2.0); - TEST_f_f (rint, 1.5, 1.0); - TEST_f_f (rint, 1.0, 1.0); - TEST_f_f (rint, 0.5, 0.0); - TEST_f_f (rint, 0.0, 0.0); - TEST_f_f (rint, minus_zero, minus_zero); - TEST_f_f (rint, -0.5, -1.0); - TEST_f_f (rint, -1.0, -1.0); - TEST_f_f (rint, -1.5, -2.0); - TEST_f_f (rint, -2.0, -2.0); - } + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 1.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -1.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -2.0); + TEST_f_f (rint, -2.0, -2.0); + TEST_f_f (rint, 0.1, 0.0); + TEST_f_f (rint, 0.25, 0.0); + TEST_f_f (rint, 0.625, 0.0); + TEST_f_f (rint, -0.1, -1.0); + TEST_f_f (rint, -0.25, -1.0); + TEST_f_f (rint, -0.625, -1.0); +#ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370496.25L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.75L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370497.5L, 4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370494.0L); + TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370496.0L); +# endif + TEST_f_f (rint, -4503599627370495.5L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.25L, -4503599627370497.0L); + TEST_f_f (rint, -4503599627370496.5L, -4503599627370497.0L); + TEST_f_f (rint, -4503599627370496.75L, -4503599627370497.0L); + TEST_f_f (rint, -4503599627370497.5L, -4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370497.0L); + + TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740991.0L); + TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740993.0L); + + TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740994.0L); + TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L); +# endif +#endif + } - fesetround(save_round_mode); + fesetround (save_round_mode); END (rint_downward); } @@ -4106,23 +5110,66 @@ rint_test_upward (void) int save_round_mode; START (rint_upward); - save_round_mode = fegetround(); + save_round_mode = fegetround (); if (!fesetround (FE_UPWARD)) - { - TEST_f_f (rint, 2.0, 2.0); - TEST_f_f (rint, 1.5, 2.0); - TEST_f_f (rint, 1.0, 1.0); - TEST_f_f (rint, 0.5, 1.0); - TEST_f_f (rint, 0.0, 0.0); - TEST_f_f (rint, minus_zero, minus_zero); - TEST_f_f (rint, -0.5, -0.0); - TEST_f_f (rint, -1.0, -1.0); - TEST_f_f (rint, -1.5, -1.0); - TEST_f_f (rint, -2.0, -2.0); - } + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 2.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 1.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -1.0); + TEST_f_f (rint, -2.0, -2.0); + TEST_f_f (rint, 0.1, 1.0); + TEST_f_f (rint, 0.25, 1.0); + TEST_f_f (rint, 0.625, 1.0); + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -0.0); +#ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.25L, 4503599627370497.0L); + TEST_f_f (rint, 4503599627370496.5L, 4503599627370497.0L); + TEST_f_f (rint, 4503599627370496.75L, 4503599627370497.0L); + TEST_f_f (rint, 4503599627370497.5L, 4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, 4503599627370494.5000000000001L, 4503599627370495.0L); + TEST_f_f (rint, 4503599627370495.5000000000001L, 4503599627370496.0L); + TEST_f_f (rint, 4503599627370496.5000000000001L, 4503599627370497.0L); +# endif + TEST_f_f (rint, -4503599627370495.5L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370496.25L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.5L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370496.75L, -4503599627370496.0L); + TEST_f_f (rint, -4503599627370497.5L, -4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (rint, -4503599627370494.5000000000001L, -4503599627370494.0L); + TEST_f_f (rint, -4503599627370495.5000000000001L, -4503599627370495.0L); + TEST_f_f (rint, -4503599627370496.5000000000001L, -4503599627370496.0L); + + TEST_f_f (rint, 9007199254740991.0000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740992.0000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740993.0000000000001L, 9007199254740994.0L); + TEST_f_f (rint, 9007199254740991.5000000000001L, 9007199254740992.0L); + TEST_f_f (rint, 9007199254740992.5000000000001L, 9007199254740993.0L); + TEST_f_f (rint, 9007199254740993.5000000000001L, 9007199254740994.0L); + + TEST_f_f (rint, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (rint, -9007199254740991.5000000000001L, -9007199254740991.0L); + TEST_f_f (rint, -9007199254740992.5000000000001L, -9007199254740992.0L); + TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L); +# endif +#endif + } - fesetround(save_round_mode); + fesetround (save_round_mode); END (rint_upward); } @@ -4142,6 +5189,12 @@ round_test (void) TEST_f_f (round, -0.8L, -1.0); TEST_f_f (round, 1.5, 2.0); TEST_f_f (round, -1.5, -2.0); + TEST_f_f (round, 0.1, 0.0); + TEST_f_f (round, 0.25, 0.0); + TEST_f_f (round, 0.625, 1.0); + TEST_f_f (round, -0.1, -0.0); + TEST_f_f (round, -0.25, -0.0); + TEST_f_f (round, -0.625, -1.0); TEST_f_f (round, 2097152.5, 2097153); TEST_f_f (round, -2097152.5, -2097153); @@ -4149,15 +5202,25 @@ round_test (void) /* The result can only be represented in long double. */ TEST_f_f (round, 4503599627370495.5L, 4503599627370496.0L); TEST_f_f (round, 4503599627370496.25L, 4503599627370496.0L); - TEST_f_f (round, 4503599627370496.5L, 4503599627370497.0L); + TEST_f_f (round, 4503599627370496.5L, 4503599627370497.0L); TEST_f_f (round, 4503599627370496.75L, 4503599627370497.0L); - TEST_f_f (round, 4503599627370497.5L, 4503599627370498.0L); + TEST_f_f (round, 4503599627370497.5L, 4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (round, 4503599627370494.5000000000001L, 4503599627370495.0L); + TEST_f_f (round, 4503599627370495.5000000000001L, 4503599627370496.0L); + TEST_f_f (round, 4503599627370496.5000000000001L, 4503599627370497.0L); +# endif - TEST_f_f (round, -4503599627370495.5L, -4503599627370496.0L); - TEST_f_f (round, -4503599627370496.25L, -4503599627370496.0L); + TEST_f_f (round, -4503599627370495.5L, -4503599627370496.0L); + TEST_f_f (round, -4503599627370496.25L, -4503599627370496.0L); TEST_f_f (round, -4503599627370496.5L, -4503599627370497.0L); - TEST_f_f (round, -4503599627370496.75L, -4503599627370497.0L); + TEST_f_f (round, -4503599627370496.75L, -4503599627370497.0L); TEST_f_f (round, -4503599627370497.5L, -4503599627370498.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (round, -4503599627370494.5000000000001L, -4503599627370495.0L); + TEST_f_f (round, -4503599627370495.5000000000001L, -4503599627370496.0L); + TEST_f_f (round, -4503599627370496.5000000000001L, -4503599627370497.0L); +# endif TEST_f_f (round, 9007199254740991.5L, 9007199254740992.0L); TEST_f_f (round, 9007199254740992.25L, 9007199254740992.0L); @@ -4171,6 +5234,22 @@ round_test (void) TEST_f_f (round, -9007199254740992.75L, -9007199254740993.0L); TEST_f_f (round, -9007199254740993.5L, -9007199254740994.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (round, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (round, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (round, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (round, 9007199254740991.5000000000001L, 9007199254740992.0L); + TEST_f_f (round, 9007199254740992.5000000000001L, 9007199254740993.0L); + TEST_f_f (round, 9007199254740993.5000000000001L, 9007199254740994.0L); + + TEST_f_f (round, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (round, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (round, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (round, -9007199254740991.5000000000001L, -9007199254740992.0L); + TEST_f_f (round, -9007199254740992.5000000000001L, -9007199254740993.0L); + TEST_f_f (round, -9007199254740993.5000000000001L, -9007199254740994.0L); +# endif + TEST_f_f (round, 72057594037927935.5L, 72057594037927936.0L); TEST_f_f (round, 72057594037927936.25L, 72057594037927936.0L); TEST_f_f (round, 72057594037927936.5L, 72057594037927937.0L); @@ -4541,7 +5620,11 @@ trunc_test (void) TEST_f_f (trunc, 0, 0); TEST_f_f (trunc, minus_zero, minus_zero); + TEST_f_f (trunc, 0.1, 0); + TEST_f_f (trunc, 0.25, 0); TEST_f_f (trunc, 0.625, 0); + TEST_f_f (trunc, -0.1, minus_zero); + TEST_f_f (trunc, -0.25, minus_zero); TEST_f_f (trunc, -0.625, minus_zero); TEST_f_f (trunc, 1, 1); TEST_f_f (trunc, -1, -1); @@ -4565,24 +5648,54 @@ trunc_test (void) TEST_f_f (trunc, 4503599627370496.75L, 4503599627370496.0L); TEST_f_f (trunc, 4503599627370497.5L, 4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (trunc, 4503599627370494.5000000000001L, 4503599627370494.0L); + TEST_f_f (trunc, 4503599627370495.5000000000001L, 4503599627370495.0L); + TEST_f_f (trunc, 4503599627370496.5000000000001L, 4503599627370496.0L); +# endif + TEST_f_f (trunc, -4503599627370495.5L, -4503599627370495.0L); TEST_f_f (trunc, -4503599627370496.25L, -4503599627370496.0L); TEST_f_f (trunc, -4503599627370496.5L, -4503599627370496.0L); TEST_f_f (trunc, -4503599627370496.75L, -4503599627370496.0L); TEST_f_f (trunc, -4503599627370497.5L, -4503599627370497.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (trunc, -4503599627370494.5000000000001L, -4503599627370494.0L); + TEST_f_f (trunc, -4503599627370495.5000000000001L, -4503599627370495.0L); + TEST_f_f (trunc, -4503599627370496.5000000000001L, -4503599627370496.0L); +# endif + TEST_f_f (trunc, 9007199254740991.5L, 9007199254740991.0L); TEST_f_f (trunc, 9007199254740992.25L, 9007199254740992.0L); TEST_f_f (trunc, 9007199254740992.5L, 9007199254740992.0L); TEST_f_f (trunc, 9007199254740992.75L, 9007199254740992.0L); TEST_f_f (trunc, 9007199254740993.5L, 9007199254740993.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (trunc, 9007199254740991.0000000000001L, 9007199254740991.0L); + TEST_f_f (trunc, 9007199254740992.0000000000001L, 9007199254740992.0L); + TEST_f_f (trunc, 9007199254740993.0000000000001L, 9007199254740993.0L); + TEST_f_f (trunc, 9007199254740991.5000000000001L, 9007199254740991.0L); + TEST_f_f (trunc, 9007199254740992.5000000000001L, 9007199254740992.0L); + TEST_f_f (trunc, 9007199254740993.5000000000001L, 9007199254740993.0L); +# endif + TEST_f_f (trunc, -9007199254740991.5L, -9007199254740991.0L); TEST_f_f (trunc, -9007199254740992.25L, -9007199254740992.0L); TEST_f_f (trunc, -9007199254740992.5L, -9007199254740992.0L); TEST_f_f (trunc, -9007199254740992.75L, -9007199254740992.0L); TEST_f_f (trunc, -9007199254740993.5L, -9007199254740993.0L); +# if LDBL_MANT_DIG > 100 + TEST_f_f (trunc, -9007199254740991.0000000000001L, -9007199254740991.0L); + TEST_f_f (trunc, -9007199254740992.0000000000001L, -9007199254740992.0L); + TEST_f_f (trunc, -9007199254740993.0000000000001L, -9007199254740993.0L); + TEST_f_f (trunc, -9007199254740991.5000000000001L, -9007199254740991.0L); + TEST_f_f (trunc, -9007199254740992.5000000000001L, -9007199254740992.0L); + TEST_f_f (trunc, -9007199254740993.5000000000001L, -9007199254740993.0L); +# endif + TEST_f_f (trunc, 72057594037927935.5L, 72057594037927935.0L); TEST_f_f (trunc, 72057594037927936.25L, 72057594037927936.0L); TEST_f_f (trunc, 72057594037927936.5L, 72057594037927936.0L); @@ -4599,7 +5712,7 @@ trunc_test (void) TEST_f_f (trunc, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L); TEST_f_f (trunc, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L); TEST_f_f (trunc, 10141204801825835211973625643008.75L, 10141204801825835211973625643008.0L); - TEST_f_f (trunc, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L); + TEST_f_f (trunc, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L); #endif END (trunc); @@ -4984,7 +6097,15 @@ main (int argc, char **argv) rint_test_downward (); rint_test_upward (); lrint_test (); + lrint_test_tonearest (); + lrint_test_towardzero (); + lrint_test_downward (); + lrint_test_upward (); llrint_test (); + llrint_test_tonearest (); + llrint_test_towardzero (); + llrint_test_downward (); + llrint_test_upward (); round_test (); lround_test (); llround_test (); diff -uprN glibc-2.4/math/s_cacosh.c glibc-2.5/math/s_cacosh.c --- glibc-2.4/math/s_cacosh.c 2006-01-15 17:51:31.000000000 +0000 +++ glibc-2.5/math/s_cacosh.c 2006-08-03 20:35:41.000000000 +0000 @@ -80,6 +80,10 @@ __cacosh (__complex__ double x) __imag__ y += __imag__ x; res = __clog (y); + + /* We have to use the positive branch. */ + if (__real__ res < 0.0) + res = -res; } return res; diff -uprN glibc-2.4/math/s_cacoshf.c glibc-2.5/math/s_cacoshf.c --- glibc-2.4/math/s_cacoshf.c 2006-01-15 17:51:31.000000000 +0000 +++ glibc-2.5/math/s_cacoshf.c 2006-08-03 20:35:41.000000000 +0000 @@ -95,6 +95,10 @@ __cacoshf (__complex__ float x) + ro); __imag__ res = __ieee754_atan2f (__imag__ x + b, __real__ x + a); #endif + + /* We have to use the positive branch. */ + if (__real__ res < 0.0) + res = -res; } return res; diff -uprN glibc-2.4/math/s_cacoshl.c glibc-2.5/math/s_cacoshl.c --- glibc-2.4/math/s_cacoshl.c 2006-01-15 17:51:31.000000000 +0000 +++ glibc-2.5/math/s_cacoshl.c 2006-08-03 20:35:41.000000000 +0000 @@ -80,6 +80,10 @@ __cacoshl (__complex__ long double x) __imag__ y += __imag__ x; res = __clogl (y); + + /* We have to use the positive branch. */ + if (__real__ res < 0.0) + res = -res; } return res; diff -uprN glibc-2.4/misc/error.c glibc-2.5/misc/error.c --- glibc-2.4/misc/error.c 2005-07-28 21:42:37.000000000 +0000 +++ glibc-2.5/misc/error.c 2006-08-21 20:03:06.000000000 +0000 @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,35 +23,19 @@ # include #endif +#include #include -#include +#include +#include + #ifdef _LIBC +# include # include # include # include # define mbsrtowcs __mbsrtowcs #endif -#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC -# if __STDC__ -# include -# define VA_START(args, lastarg) va_start(args, lastarg) -# else -# include -# define VA_START(args, lastarg) va_start(args) -# endif -#else -# define va_alist a1, a2, a3, a4, a5, a6, a7, a8 -# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; -#endif - -#if STDC_HEADERS || _LIBC -# include -# include -#else -void exit (); -#endif - #include "error.h" #ifndef _ @@ -61,11 +45,7 @@ void exit (); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ -void (*error_print_progname) ( -#if __STDC__ - 0 - void -#endif - ); +void (*error_print_progname) (void); /* This variable is incremented each time `error' is called. */ unsigned int error_message_count; @@ -111,27 +91,6 @@ extern char *program_name; # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# else -# if HAVE_STRERROR -# ifndef HAVE_DECL_STRERROR -"this configure-time declaration test was not run" -# endif -# if !HAVE_DECL_STRERROR -char *strerror (); -# endif -# else -static char * -private_strerror (int errnum) -{ - extern char *sys_errlist[]; - extern int sys_nerr; - - if (errnum > 0 && errnum <= sys_nerr) - return _(sys_errlist[errnum]); - return _("Unknown system error"); -} -# define strerror private_strerror -# endif /* HAVE_STRERROR */ # endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ @@ -166,15 +125,13 @@ print_errno_message (int errnum) #endif } -#ifdef VA_START static void error_tail (int status, int errnum, const char *message, va_list args) { -# if HAVE_VPRINTF || _LIBC -# if _LIBC +#if _LIBC if (_IO_fwide (stderr, 0) > 0) { -# define ALLOCA_LIMIT 2000 +# define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; @@ -224,7 +181,10 @@ error_tail (int status, int errnum, cons { /* The string cannot be converted. */ if (use_malloc) - free (wmessage); + { + free (wmessage); + use_malloc = false; + } wmessage = (wchar_t *) L"???"; } @@ -234,47 +194,32 @@ error_tail (int status, int errnum, cons free (wmessage); } else -# endif +#endif vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif va_end (args); ++error_message_count; if (errnum) print_errno_message (errnum); -# if _LIBC +#if _LIBC __fxprintf (NULL, "\n"); -# else +#else putc ('\n', stderr); -# endif +#endif fflush (stderr); if (status) exit (status); } -#endif /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ -/* VARARGS */ void -#if defined VA_START && __STDC__ error (int status, int errnum, const char *message, ...) -#else -error (status, errnum, message, va_alist) - int status; - int errnum; - char *message; - va_dcl -#endif { -#ifdef VA_START va_list args; -#endif #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread @@ -299,20 +244,8 @@ error (status, errnum, message, va_alist #endif } -#ifdef VA_START - VA_START (args, message); + va_start (args, message); error_tail (status, errnum, message, args); -#else - fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); - - ++error_message_count; - if (errnum) - print_errno_message (errnum); - putc ('\n', stderr); - fflush (stderr); - if (status) - exit (status); -#endif #ifdef _LIBC _IO_funlockfile (stderr); @@ -327,22 +260,10 @@ error (status, errnum, message, va_alist int error_one_per_line; void -#if defined VA_START && __STDC__ error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) -#else -error_at_line (status, errnum, file_name, line_number, message, va_alist) - int status; - int errnum; - const char *file_name; - unsigned int line_number; - char *message; - va_dcl -#endif { -#ifdef VA_START va_list args; -#endif if (error_one_per_line) { @@ -382,29 +303,16 @@ error_at_line (status, errnum, file_name #endif } - if (file_name != NULL) - { #if _LIBC - __fxprintf (NULL, "%s:%d: ", file_name, line_number); + __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); #else - fprintf (stderr, "%s:%d: ", file_name, line_number); + fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); #endif - } -#ifdef VA_START - VA_START (args, message); + va_start (args, message); error_tail (status, errnum, message, args); -#else - fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); - - ++error_message_count; - if (errnum) - print_errno_message (errnum); - putc ('\n', stderr); - fflush (stderr); - if (status) - exit (status); -#endif #ifdef _LIBC _IO_funlockfile (stderr); diff -uprN glibc-2.4/misc/error.h glibc-2.5/misc/error.h --- glibc-2.4/misc/error.h 2003-08-30 08:29:46.000000000 +0000 +++ glibc-2.5/misc/error.h 2006-08-21 20:03:06.000000000 +0000 @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,8 +37,6 @@ extern "C" { #endif -#if defined __STDC__ && __STDC__ - /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ @@ -55,12 +53,6 @@ extern void error_at_line (int __status, function without parameters instead. */ extern void (*error_print_progname) (void); -#else -void error (); -void error_at_line (); -extern void (*error_print_progname) (); -#endif - /* This variable is incremented each time `error' is called. */ extern unsigned int error_message_count; diff -uprN glibc-2.4/misc/getusershell.c glibc-2.5/misc/getusershell.c --- glibc-2.4/misc/getusershell.c 2005-12-20 18:15:10.000000000 +0000 +++ glibc-2.5/misc/getusershell.c 2006-05-15 18:56:36.000000000 +0000 @@ -46,7 +46,15 @@ static char sccsid[] = "@(#)getusershell * /etc/shells. */ +/* NB: we do not initialize okshells here. The initialization needs + relocations. These interfaces are used so rarely that this is not + justified. Instead explicitly initialize the array when it is + used. */ +#if 0 static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL }; +#else +static const char *okshells[3]; +#endif static char **curshell, **shells, *strings; static char **initshells (void) __THROW; @@ -97,21 +105,22 @@ initshells() free(strings); strings = NULL; if ((fp = fopen(_PATH_SHELLS, "rc")) == NULL) - return (char **) okshells; + goto init_okshells_noclose; if (fstat64(fileno(fp), &statb) == -1) { + init_okshells: (void)fclose(fp); + init_okshells_noclose: + okshells[0] = _PATH_BSHELL; + okshells[1] = _PATH_CSHELL; return (char **) okshells; } - if ((strings = malloc((u_int)statb.st_size + 1)) == NULL) { - (void)fclose(fp); - return (char **) okshells; - } + if ((strings = malloc((u_int)statb.st_size + 1)) == NULL) + goto init_okshells; shells = calloc((unsigned)statb.st_size / 3, sizeof (char *)); if (shells == NULL) { - (void)fclose(fp); free(strings); strings = NULL; - return (char **) okshells; + goto init_okshells; } sp = shells; cp = strings; diff -uprN glibc-2.4/misc/insremque.c glibc-2.5/misc/insremque.c --- glibc-2.4/misc/insremque.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/misc/insremque.c 2006-06-17 16:59:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,12 +24,20 @@ void insque (void *elem, void *prev) { - struct qelem *next = ((struct qelem *) prev)->q_forw; - ((struct qelem *) prev)->q_forw = (struct qelem *) elem; - if (next != NULL) - next->q_back = (struct qelem *) elem; - ((struct qelem *) elem)->q_forw = next; - ((struct qelem *) elem)->q_back = (struct qelem *) prev; + if (prev == NULL) + { + ((struct qelem *) elem)->q_forw = NULL; + ((struct qelem *) elem)->q_back = NULL; + } + else + { + struct qelem *next = ((struct qelem *) prev)->q_forw; + ((struct qelem *) prev)->q_forw = (struct qelem *) elem; + if (next != NULL) + next->q_back = (struct qelem *) elem; + ((struct qelem *) elem)->q_forw = next; + ((struct qelem *) elem)->q_back = (struct qelem *) prev; + } } /* Unlink ELEM from the doubly-linked list that it is in. */ diff -uprN glibc-2.4/misc/Makefile glibc-2.5/misc/Makefile --- glibc-2.4/misc/Makefile 2006-02-23 22:50:16.000000000 +0000 +++ glibc-2.5/misc/Makefile 2006-06-17 17:00:58.000000000 +0000 @@ -78,7 +78,7 @@ endif gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ - tst-error1 tst-pselect + tst-error1 tst-pselect tst-insremque ifeq (no,$(cross-compiling)) tests: $(objpfx)tst-error1-mem endif diff -uprN glibc-2.4/misc/sys/mman.h glibc-2.5/misc/sys/mman.h --- glibc-2.4/misc/sys/mman.h 2005-10-14 13:39:09.000000000 +0000 +++ glibc-2.5/misc/sys/mman.h 2006-09-09 16:20:58.000000000 +0000 @@ -116,14 +116,6 @@ extern int mlockall (int __flags) __THRO extern int munlockall (void) __THROW; #ifdef __USE_MISC -/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length - NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address - may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function - takes another paramter which is a fixed address at which the block - resides after a successful call. */ -extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, - int __flags, ...) __THROW; - /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant @@ -131,6 +123,16 @@ extern void *mremap (void *__addr, size_ it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __THROW; +#endif + +#ifdef __USE_GNU +/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length + NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address + may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function + takes another paramter which is a fixed address at which the block + resides after a successful call. */ +extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, + int __flags, ...) __THROW; /* Remap arbitrary pages of a shared backing store within an existing VMA. */ diff -uprN glibc-2.4/misc/sys/queue.h glibc-2.5/misc/sys/queue.h --- glibc-2.4/misc/sys/queue.h 1999-06-08 21:03:17.000000000 +0000 +++ glibc-2.5/misc/sys/queue.h 2006-05-10 14:53:51.000000000 +0000 @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -26,29 +26,46 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)queue.h 8.3 (Berkeley) 12/13/93 + * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ -#ifndef _SYS_QUEUE_H -#define _SYS_QUEUE_H 1 +#ifndef _SYS_QUEUE_H_ +#define _SYS_QUEUE_H_ /* - * This file defines three types of data structures: lists, tail queues, - * and circular queues. + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list after - * an existing element or at the head of the list. A list may only be - * traversed in the forward direction. + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list after - * an existing element, at the head of the list, or at the end of the - * list. A tail queue may only be traversed in the forward direction. + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly @@ -64,12 +81,15 @@ /* * List definitions. */ -#define LIST_HEAD(name, type) \ +#define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } -#define LIST_ENTRY(type) \ +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ @@ -78,73 +98,307 @@ struct { \ /* * List functions. */ -#define LIST_INIT(head) { \ +#define LIST_INIT(head) do { \ (head)->lh_first = NULL; \ -} +} while (/*CONSTCOND*/0) -#define LIST_INSERT_AFTER(listelm, elm, field) { \ +#define LIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ -} +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ +} while (/*CONSTCOND*/0) -#define LIST_INSERT_HEAD(head, elm, field) { \ +#define LIST_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ -} +} while (/*CONSTCOND*/0) -#define LIST_REMOVE(elm, field) { \ +#define LIST_REMOVE(elm, field) do { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); \ + (var); \ + (var) = ((var)->field.le_next)) + +/* + * List access methods. + */ +#define LIST_EMPTY(head) ((head)->lh_first == NULL) +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ +struct name { \ + struct type *slh_first; /* first element */ \ +} + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ +struct { \ + struct type *sle_next; /* next element */ \ +} + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) do { \ + (head)->slh_first = NULL; \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_HEAD(head, elm, field) do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE_HEAD(head, field) do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE(head, elm, type, field) do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + struct type *curelm = (head)->slh_first; \ + while(curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = \ + curelm->field.sle_next->field.sle_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + +/* + * Singly-linked List access methods. + */ +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ +struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ +} + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ +struct { \ + struct type *stqe_next; /* next element */ \ +} + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE_HEAD(head, field) do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE(head, elm, type, field) do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); \ + (var); \ + (var) = ((var)->field.stqe_next)) + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ +struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ +} + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ +struct { \ + struct type *sqe_next; /* next element */ \ } /* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = \ + curelm->field.sqe_next->field.sqe_next) == NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); \ + (var); \ + (var) = ((var)->field.sqe_next)) + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + + +/* * Tail queue definitions. */ -#define TAILQ_HEAD(name, type) \ +#define _TAILQ_HEAD(name, type, qual) \ struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ } +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).tqh_first } -#define TAILQ_ENTRY(type) \ +#define _TAILQ_ENTRY(type, qual) \ struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */\ } +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) /* * Tail queue functions. */ -#define TAILQ_INIT(head) { \ +#define TAILQ_INIT(head) do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ -} +} while (/*CONSTCOND*/0) -#define TAILQ_INSERT_HEAD(head, elm, field) { \ +#define TAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ + (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ -} +} while (/*CONSTCOND*/0) -#define TAILQ_INSERT_TAIL(head, elm, field) { \ +#define TAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ -} +} while (/*CONSTCOND*/0) -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ @@ -152,27 +406,60 @@ struct { \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -} +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) -#define TAILQ_REMOVE(head, elm, field) { \ +#define TAILQ_REMOVE(head, elm, field) do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ -} +} while (/*CONSTCOND*/0) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); \ + (var); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + +/* + * Tail queue access methods. + */ +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) + +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + /* * Circular queue definitions. */ -#define CIRCLEQ_HEAD(name, type) \ +#define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } -#define CIRCLEQ_ENTRY(type) \ +#define CIRCLEQ_HEAD_INITIALIZER(head) \ + { (void *)&head, (void *)&head } + +#define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ @@ -181,12 +468,12 @@ struct { \ /* * Circular queue functions. */ -#define CIRCLEQ_INIT(head) { \ +#define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = (void *)(head); \ (head)->cqh_last = (void *)(head); \ -} +} while (/*CONSTCOND*/0) -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == (void *)(head)) \ @@ -194,9 +481,9 @@ struct { \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ -} +} while (/*CONSTCOND*/0) -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == (void *)(head)) \ @@ -204,9 +491,9 @@ struct { \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ -} +} while (/*CONSTCOND*/0) -#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ +#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = (void *)(head); \ if ((head)->cqh_last == (void *)(head)) \ @@ -214,9 +501,9 @@ struct { \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ -} +} while (/*CONSTCOND*/0) -#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ +#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.cqe_next = (void *)(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == (void *)(head)) \ @@ -224,9 +511,9 @@ struct { \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ -} +} while (/*CONSTCOND*/0) -#define CIRCLEQ_REMOVE(head, elm, field) { \ +#define CIRCLEQ_REMOVE(head, elm, field) do { \ if ((elm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ @@ -237,5 +524,34 @@ struct { \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ -} +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->cqh_first); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_next)) + +#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ + for ((var) = ((head)->cqh_last); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_prev)) + +/* + * Circular queue access methods. + */ +#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) +#define CIRCLEQ_FIRST(head) ((head)->cqh_first) +#define CIRCLEQ_LAST(head) ((head)->cqh_last) +#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) +#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) + +#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ + (((elm)->field.cqe_next == (void *)(head)) \ + ? ((head)->cqh_first) \ + : (elm->field.cqe_next)) +#define CIRCLEQ_LOOP_PREV(head, elm, field) \ + (((elm)->field.cqe_prev == (void *)(head)) \ + ? ((head)->cqh_last) \ + : (elm->field.cqe_prev)) + #endif /* sys/queue.h */ diff -uprN glibc-2.4/misc/tsearch.c glibc-2.5/misc/tsearch.c --- glibc-2.4/misc/tsearch.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/misc/tsearch.c 2006-05-02 00:48:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bernd Schmidt , 1997. @@ -285,11 +285,12 @@ __tsearch (const void *key, void **vroot q->key = key; /* initialize new node */ q->red = 1; q->left = q->right = NULL; + + if (nextp != rootp) + /* There may be two red edges in a row now, which we must avoid by + rotating the tree. */ + maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1); } - if (nextp != rootp) - /* There may be two red edges in a row now, which we must avoid by - rotating the tree. */ - maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1); return q; } @@ -446,7 +447,7 @@ __tdelete (const void *key, void **vroot /* Q is R's brother, P is R's parent. The subtree with root R has one black edge less than the subtree with root Q. */ q = p->right; - if (q != NULL && q->red) + if (q->red) { /* If Q is red, we know that P is black. We rotate P left so that Q becomes the top node in the tree, with P below @@ -534,7 +535,7 @@ __tdelete (const void *key, void **vroot { /* Comments: see above. */ q = p->left; - if (q != NULL && q->red) + if (q->red) { q->red = 0; p->red = 1; diff -uprN glibc-2.4/misc/tst-insremque.c glibc-2.5/misc/tst-insremque.c --- glibc-2.4/misc/tst-insremque.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/misc/tst-insremque.c 2006-06-17 17:00:08.000000000 +0000 @@ -0,0 +1,61 @@ +#include +#include +#include + +#define CHECK(cond) \ + do \ + if (! (cond)) \ + { \ + printf ("Condition " #cond " not true on line %d\n", __LINE__); \ + ret = 1; \ + } \ + while (0) + +static int +do_test (void) +{ + struct qelem elements[4]; + int ret = 0; + + /* Linear list. */ + memset (elements, 0xff, sizeof (elements)); + insque (&elements[0], NULL); + remque (&elements[0]); + insque (&elements[0], NULL); + insque (&elements[2], &elements[0]); + insque (&elements[1], &elements[0]); + insque (&elements[3], &elements[2]); + remque (&elements[2]); + insque (&elements[2], &elements[0]); + CHECK (elements[0].q_back == NULL); + CHECK (elements[0].q_forw == &elements[2]); + CHECK (elements[1].q_back == &elements[2]); + CHECK (elements[1].q_forw == &elements[3]); + CHECK (elements[2].q_back == &elements[0]); + CHECK (elements[2].q_forw == &elements[1]); + CHECK (elements[3].q_back == &elements[1]); + CHECK (elements[3].q_forw == NULL); + + /* Circular list. */ + memset (elements, 0xff, sizeof (elements)); + elements[0].q_back = &elements[0]; + elements[0].q_forw = &elements[0]; + insque (&elements[2], &elements[0]); + insque (&elements[1], &elements[0]); + insque (&elements[3], &elements[2]); + remque (&elements[2]); + insque (&elements[2], &elements[0]); + CHECK (elements[0].q_back == &elements[3]); + CHECK (elements[0].q_forw == &elements[2]); + CHECK (elements[1].q_back == &elements[2]); + CHECK (elements[1].q_forw == &elements[3]); + CHECK (elements[2].q_back == &elements[0]); + CHECK (elements[2].q_forw == &elements[1]); + CHECK (elements[3].q_back == &elements[1]); + CHECK (elements[3].q_forw == &elements[0]); + + return ret; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/NEWS glibc-2.5/NEWS --- glibc-2.4/NEWS 2006-03-01 09:54:52.000000000 +0000 +++ glibc-2.5/NEWS 2006-09-29 18:39:06.000000000 +0000 @@ -1,10 +1,47 @@ -GNU C Library NEWS -- history of user-visible changes. 2006-03-01 +GNU C Library NEWS -- history of user-visible changes. 2006-09-29 Copyright (C) 1992-2002,2003,2004,2005,2006 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU C library bug reports via using `glibc' in the "product" field. +Version 2.5 + +* For Linux, the sorting of addresses returned by getaddrinfo now also + handles rules 3, 4, and 7 from RFC 3484. I.e., all rules are handled. + Implemented by Ulrich Drepper. + +* Allow system admin to configure getaddrinfo with the /etc/gai.conf file. + Implemented by Ulrich Drepper. + +* New Linux interfaces: splice, tee, sync_file_range, vmsplice. + +* New iconv module for MIK. Contributed by Alexander Shopov. + +* For sites with broken group and/or passwd database, the auto-propagate + option of nscd can prevent creating ID lookup entries from the results + of a name lookup and vice versa. This usually is no problem but some + site might have problems with the default behavior. + Implemented by Ulrich Drepper. + +* Iterating over entire database in NIS can be slow. With the + SETENT_BATCH_READ option in /etc/default/nss a system admin can decide + to trade time for memory. The entire database will be read at once. + Implemented by Ulrich Drepper. + +* The interfaces introduced in RFC 3542 have been implemented by + Ulrich Drepper. + +* Support for the new ELF hash table format was added by Ulrich Drepper. + +* Support for priority inheritance mutexes added by Jakub Jelinek and + Ulrich Drepper. + +* Support for priority protected mutexes added by Jakub Jelinek. + +* New locales: nr_ZA, pa_PK, ca_AD, ca_FR, ca_IT, el_CY, tr_CY, as_IN, + or_IN, csb_PL, fy_NL, sr_ME. + Version 2.4 * More overflow detection functions. diff -uprN glibc-2.4/nis/libnsl.h glibc-2.5/nis/libnsl.h --- glibc-2.4/nis/libnsl.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nis/libnsl.h 2006-05-20 20:17:22.000000000 +0000 @@ -0,0 +1,40 @@ +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#define NSS_FLAG_NETID_AUTHORITATIVE 1 +#define NSS_FLAG_SERVICES_AUTHORITATIVE 2 +#define NSS_FLAG_SETENT_BATCH_READ 4 + + +/* Get current set of default flags. */ +extern int _nsl_default_nss (void); + +/* Set up everything for a call to __do_niscall3. */ +extern nis_error __prepare_niscall (const_nis_name name, directory_obj **dirp, + dir_binding *bptrp, unsigned int flags); +libnsl_hidden_proto (__prepare_niscall) + +extern struct ib_request *__create_ib_request (const_nis_name name, + unsigned int flags); +libnsl_hidden_proto (__create_ib_request) + +extern nis_error __follow_path (char **tablepath, char **tableptr, + struct ib_request *ibreq, dir_binding *bptr); +libnsl_hidden_proto (__follow_path) diff -uprN glibc-2.4/nis/Makefile glibc-2.5/nis/Makefile --- glibc-2.4/nis/Makefile 2004-09-08 15:26:01.000000000 +0000 +++ glibc-2.5/nis/Makefile 2006-04-14 05:45:49.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1996, 1997, 1998, 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 1996,1997,1998,2001,2004,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -54,7 +54,7 @@ libnsl-routines = yp_xdr ypclnt ypupdate nis_print_group_entry nis_domain_of nis_domain_of_r\ nis_modify nis_remove nis_add nis_defaults\ nis_findserv nis_callback nis_clone_dir nis_clone_obj\ - nis_clone_res + nis_clone_res nss-default libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) diff -uprN glibc-2.4/nis/nis_addmember.c glibc-2.5/nis/nis_addmember.c --- glibc-2.4/nis/nis_addmember.c 2004-10-25 03:15:59.000000000 +0000 +++ glibc-2.5/nis/nis_addmember.c 2006-05-25 17:15:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -28,13 +28,12 @@ nis_addmember (const_nis_name member, co { size_t grouplen = strlen (group); char buf[grouplen + 14 + NIS_MAXNAMELEN]; - char leafbuf[grouplen + 2]; char domainbuf[grouplen + 2]; nis_result *res, *res2; nis_error status; char *cp, *cp2; - cp = stpcpy (buf, nis_leaf_of_r (group, leafbuf, sizeof (leafbuf) - 1)); + cp = rawmemchr (nis_leaf_of_r (group, buf, sizeof (buf) - 1), '\0'); cp = stpcpy (cp, ".groups_dir"); cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1); if (cp2 != NULL && cp2[0] != '\0') @@ -42,30 +41,35 @@ nis_addmember (const_nis_name member, co *cp++ = '.'; stpcpy (cp, cp2); } - res = nis_lookup (buf, FOLLOW_LINKS|EXPAND_NAME); + res = nis_lookup (buf, FOLLOW_LINKS | EXPAND_NAME); if (NIS_RES_STATUS (res) != NIS_SUCCESS) { status = NIS_RES_STATUS (res); nis_freeresult (res); return status; } - if ((NIS_RES_NUMOBJ (res) != 1) || - (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ)) + if (NIS_RES_NUMOBJ (res) != 1 + || __type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ) { nis_freeresult (res); return NIS_INVALIDOBJ; } - NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val + u_int gr_members_len + = NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len; + + nis_name *new_gr_members_val = realloc (NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val, - (NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len + 1) - * sizeof (char *)); - if (NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val == NULL) + (gr_members_len + 1) * sizeof (nis_name)); + if (new_gr_members_val == NULL) goto nomem_out; - NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val[NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_len] = strdup (member); - if (NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val[NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_len] == NULL) + + NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val + = new_gr_members_val; + + new_gr_members_val[gr_members_len] = strdup (member); + if (new_gr_members_val[gr_members_len] == NULL) { - free (NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val); nomem_out: nis_freeresult (res); return NIS_NOMEMORY; diff -uprN glibc-2.4/nis/nis_callback.c glibc-2.5/nis/nis_callback.c --- glibc-2.4/nis/nis_callback.c 2005-02-17 01:15:45.000000000 +0000 +++ glibc-2.5/nis/nis_callback.c 2006-05-25 15:51:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -197,22 +197,18 @@ internal_nis_do_callback (struct dir_bin struct nis_cb *cb) { struct timeval TIMEOUT = {25, 0}; - bool_t cb_is_running = FALSE; + bool_t cb_is_running; data = cb; for (;;) { - struct pollfd *my_pollfd; + struct pollfd my_pollfd[svc_max_pollfd]; int i; if (svc_max_pollfd == 0 && svc_pollfd == NULL) return NIS_CBERROR; - my_pollfd = malloc (sizeof (struct pollfd) * svc_max_pollfd); - if (__builtin_expect (my_pollfd == NULL, 0)) - return NIS_NOMEMORY; - for (i = 0; i < svc_max_pollfd; ++i) { my_pollfd[i].fd = svc_pollfd[i].fd; @@ -220,20 +216,17 @@ internal_nis_do_callback (struct dir_bin my_pollfd[i].revents = 0; } - switch (i = __poll (my_pollfd, svc_max_pollfd, 25*1000)) + switch (i = TEMP_FAILURE_RETRY (__poll (my_pollfd, svc_max_pollfd, + 25*1000))) { case -1: - free (my_pollfd); - if (errno == EINTR) - continue; return NIS_CBERROR; case 0: - free (my_pollfd); /* See if callback 'thread' in the server is still alive. */ - memset ((char *) &cb_is_running, 0, sizeof (cb_is_running)); + cb_is_running = FALSE; if (clnt_call (bptr->clnt, NIS_CALLBACK, (xdrproc_t) xdr_netobj, (caddr_t) cookie, (xdrproc_t) xdr_bool, - (caddr_t) & cb_is_running, TIMEOUT) != RPC_SUCCESS) + (caddr_t) &cb_is_running, TIMEOUT) != RPC_SUCCESS) cb_is_running = FALSE; if (cb_is_running == FALSE) @@ -244,7 +237,6 @@ internal_nis_do_callback (struct dir_bin break; default: svc_getreq_poll (my_pollfd, i); - free (my_pollfd); if (data->nomore) return data->result; } @@ -275,15 +267,14 @@ __nis_create_callback (int (*callback) ( int sock = RPC_ANYSOCK; struct sockaddr_in sin; socklen_t len = sizeof (struct sockaddr_in); - char addr[NIS_MAXNAMELEN + 1]; unsigned short port; + int nomsg = 0; - cb = (struct nis_cb *) calloc (1, sizeof (struct nis_cb)); + cb = (struct nis_cb *) calloc (1, + sizeof (struct nis_cb) + sizeof (nis_server)); if (__builtin_expect (cb == NULL, 0)) goto failed; - cb->serv = (nis_server *) calloc (1, sizeof (nis_server)); - if (__builtin_expect (cb->serv == NULL, 0)) - goto failed; + cb->serv = (nis_server *) (cb + 1); cb->serv->name = strdup (nis_local_principal ()); if (__builtin_expect (cb->serv->name == NULL, 0)) goto failed; @@ -326,15 +317,20 @@ __nis_create_callback (int (*callback) ( cb->serv->ep.ep_val[0].proto = strdup ((flags & USE_DGRAM) ? "udp" : "tcp"); if (__builtin_expect (cb->serv->ep.ep_val[0].proto == NULL, 0)) goto failed; - cb->xprt = (flags & USE_DGRAM) ? svcudp_bufcreate (sock, 100, 8192) : - svctcp_create (sock, 100, 8192); + cb->xprt = ((flags & USE_DGRAM) + ? svcudp_bufcreate (sock, 100, 8192) + : svctcp_create (sock, 100, 8192)); + if (cb->xprt == NULL) + { + nomsg = 1; + goto failed; + } cb->sock = cb->xprt->xp_sock; if (!svc_register (cb->xprt, CB_PROG, CB_VERS, cb_prog_1, 0)) { xprt_unregister (cb->xprt); svc_destroy (cb->xprt); xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); - free (cb->serv); free (cb); syslog (LOG_ERR, "NIS+: failed to register callback dispatcher"); return NULL; @@ -345,30 +341,30 @@ __nis_create_callback (int (*callback) ( xprt_unregister (cb->xprt); svc_destroy (cb->xprt); xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); - free (cb->serv); free (cb); syslog (LOG_ERR, "NIS+: failed to read local socket info"); return NULL; } port = ntohs (sin.sin_port); get_myaddress (&sin); - snprintf (addr, sizeof (addr), "%s.%d.%d", inet_ntoa (sin.sin_addr), - (port & 0xFF00) >> 8, port & 0x00FF); - cb->serv->ep.ep_val[0].uaddr = strdup (addr); + + if (asprintf (&cb->serv->ep.ep_val[0].uaddr, "%s.%d.%d", + inet_ntoa (sin.sin_addr), (port & 0xFF00) >> 8, port & 0x00FF) + < 0) + goto failed; return cb; failed: if (cb) { - if (cb->serv) - { - xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); - free (cb->serv); - } + if (cb->xprt) + svc_destroy (cb->xprt); + xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); free (cb); } - syslog (LOG_ERR, "NIS+: out of memory allocating callback"); + if (!nomsg) + syslog (LOG_ERR, "NIS+: out of memory allocating callback"); return NULL; } @@ -379,7 +375,6 @@ __nis_destroy_callback (struct nis_cb *c svc_destroy (cb->xprt); close (cb->sock); xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); - free (cb->serv); free (cb); return NIS_SUCCESS; diff -uprN glibc-2.4/nis/nis_call.c glibc-2.5/nis/nis_call.c --- glibc-2.4/nis/nis_call.c 2005-12-09 06:47:59.000000000 +0000 +++ glibc-2.5/nis/nis_call.c 2006-08-07 17:39:39.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2001,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -30,6 +30,7 @@ #include "nis_xdr.h" #include "nis_intern.h" +#include static const struct timeval RPCTIMEOUT = {10, 0}; static const struct timeval UDPTIMEOUT = {5, 0}; @@ -37,12 +38,12 @@ static const struct timeval UDPTIMEOUT = extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol); -unsigned long +unsigned long int inetstr2int (const char *str) { size_t j = 0; for (size_t i = 0; str[i] != '\0'; ++i) - if (str[i] == '.' && ++j == 4) + if (str[i] == '.' && __builtin_expect (++j == 4, 0)) { char buffer[i + 1]; buffer[i] = '\0'; @@ -67,8 +68,6 @@ libnsl_hidden_def (__nisbind_destroy) nis_error __nisbind_next (dir_binding *bind) { - u_int j; - if (bind->clnt != NULL) { if (bind->use_auth) @@ -80,7 +79,7 @@ __nisbind_next (dir_binding *bind) if (bind->trys >= bind->server_len) return NIS_FAIL; - for (j = bind->current_ep + 1; + for (u_int j = bind->current_ep + 1; j < bind->server_val[bind->server_used].ep.ep_len; ++j) if (strcmp (bind->server_val[bind->server_used].ep.ep_val[j].family, "inet") == 0) @@ -95,7 +94,7 @@ __nisbind_next (dir_binding *bind) if (bind->server_used >= bind->server_len) bind->server_used = 0; - for (j = 0; j < bind->server_val[bind->server_used].ep.ep_len; ++j) + for (u_int j = 0; j < bind->server_val[bind->server_used].ep.ep_len; ++j) if (strcmp (bind->server_val[bind->server_used].ep.ep_val[j].family, "inet") == 0) if (bind->server_val[bind->server_used].ep.ep_val[j].proto[0] == '-') @@ -124,7 +123,7 @@ __nisbind_connect (dir_binding *dbp) dbp->addr.sin_addr.s_addr = inetstr2int (serv->ep.ep_val[dbp->current_ep].uaddr); - if (dbp->addr.sin_addr.s_addr == 0) + if (dbp->addr.sin_addr.s_addr == INADDR_NONE) return NIS_FAIL; /* Check, if the host is online and rpc.nisd is running. Much faster @@ -256,6 +255,7 @@ __do_niscall3 (dir_binding *dbp, u_long || ((nis_result *)resp)->status == NIS_NOSUCHNAME || ((nis_result *)resp)->status == NIS_NOT_ME) { + next_server: if (__nisbind_next (dbp) == NIS_SUCCESS) { while (__nisbind_connect (dbp) != NIS_SUCCESS) @@ -273,38 +273,14 @@ __do_niscall3 (dir_binding *dbp, u_long if (((fd_result *)resp)->status == NIS_SYSTEMERROR || ((fd_result *)resp)->status == NIS_NOSUCHNAME || ((fd_result *)resp)->status == NIS_NOT_ME) - { - if (__nisbind_next (dbp) == NIS_SUCCESS) - { - while (__nisbind_connect (dbp) != NIS_SUCCESS) - { - if (__nisbind_next (dbp) != NIS_SUCCESS) - return NIS_SUCCESS; - } - } - else - break; /* No more servers to search in */ - goto again; - } + goto next_server; break; case NIS_DUMPLOG: /* log_result */ case NIS_DUMP: if (((log_result *)resp)->lr_status == NIS_SYSTEMERROR || ((log_result *)resp)->lr_status == NIS_NOSUCHNAME || ((log_result *)resp)->lr_status == NIS_NOT_ME) - { - if (__nisbind_next (dbp) == NIS_SUCCESS) - { - while (__nisbind_connect (dbp) != NIS_SUCCESS) - { - if (__nisbind_next (dbp) != NIS_SUCCESS) - return NIS_SUCCESS; - } - } - else - break; /* No more servers to search in */ - goto again; - } + goto next_server; break; default: break; @@ -316,6 +292,8 @@ __do_niscall3 (dir_binding *dbp, u_long return retcode; } +libnsl_hidden_def (__do_niscall3) + nis_error __do_niscall2 (const nis_server *server, u_int server_len, u_long prog, @@ -360,7 +338,7 @@ rec_dirsearch (const_nis_name name, dire case HIGHER_NAME: { /* We need data from a parent domain */ directory_obj *obj; - char ndomain [strlen (name) + 3]; + char ndomain[strlen (dir->do_name) + 3]; nis_domain_of_r (dir->do_name, ndomain, sizeof (ndomain)); @@ -368,6 +346,12 @@ rec_dirsearch (const_nis_name name, dire domain ! (Now I understand why a root server must be a replica of the parent domain) */ fd_res = __nis_finddirectory (dir, ndomain); + if (fd_res == NULL) + { + nis_free_directory (dir); + *status = NIS_NOMEMORY; + return NULL; + } *status = fd_res->status; if (fd_res->status != NIS_SUCCESS) { @@ -375,27 +359,25 @@ rec_dirsearch (const_nis_name name, dire __free_fdresult (fd_res); return dir; } + nis_free_directory (dir); obj = calloc (1, sizeof (directory_obj)); + if (obj == NULL) + { + __free_fdresult (fd_res); + *status = NIS_NOMEMORY; + return NULL; + } xdrmem_create (&xdrs, fd_res->dir_data.dir_data_val, fd_res->dir_data.dir_data_len, XDR_DECODE); _xdr_directory_obj (&xdrs, obj); xdr_destroy (&xdrs); __free_fdresult (fd_res); - if (obj != NULL) - { - /* We have found a NIS+ server serving ndomain, now - let us search for "name" */ - nis_free_directory (dir); - return rec_dirsearch (name, obj, status); - } - else - { - /* Ups, very bad. Are we already the root server ? */ - nis_free_directory (dir); - return NULL; - } + + /* We have found a NIS+ server serving ndomain, now + let us search for "name" */ + return rec_dirsearch (name, obj, status); } - break; + break; case LOWER_NAME: { directory_obj *obj; @@ -404,7 +386,6 @@ rec_dirsearch (const_nis_name name, dire char domain[namelen + 3]; char ndomain[namelen + 3]; char *cp; - u_int run = 0; strcpy (domain, name); @@ -418,21 +399,20 @@ rec_dirsearch (const_nis_name name, dire nis_leaf_of_r (domain, leaf, sizeof (leaf)); nis_domain_of_r (domain, ndomain, sizeof (ndomain)); strcpy (domain, ndomain); - ++run; } while (nis_dir_cmp (domain, dir->do_name) != SAME_NAME); - if (run == 1) - { - /* We have found the directory above. Use it. */ - return dir; - } - - cp = strchr (leaf, '\0'); + cp = rawmemchr (leaf, '\0'); *cp++ = '.'; strcpy (cp, domain); fd_res = __nis_finddirectory (dir, leaf); + if (fd_res == NULL) + { + nis_free_directory (dir); + *status = NIS_NOMEMORY; + return NULL; + } *status = fd_res->status; if (fd_res->status != NIS_SUCCESS) { @@ -440,21 +420,24 @@ rec_dirsearch (const_nis_name name, dire __free_fdresult (fd_res); return dir; } - obj = calloc(1, sizeof(directory_obj)); - xdrmem_create(&xdrs, fd_res->dir_data.dir_data_val, - fd_res->dir_data.dir_data_len, XDR_DECODE); - _xdr_directory_obj(&xdrs, obj); - xdr_destroy(&xdrs); - __free_fdresult (fd_res); - if (obj != NULL) + nis_free_directory (dir); + obj = calloc (1, sizeof(directory_obj)); + if (obj == NULL) { - /* We have found a NIS+ server serving ndomain, now - let us search for "name" */ - nis_free_directory (dir); - return rec_dirsearch (name, obj, status); + __free_fdresult (fd_res); + *status = NIS_NOMEMORY; + return NULL; } + xdrmem_create (&xdrs, fd_res->dir_data.dir_data_val, + fd_res->dir_data.dir_data_len, XDR_DECODE); + _xdr_directory_obj (&xdrs, obj); + xdr_destroy (&xdrs); + __free_fdresult (fd_res); + /* We have found a NIS+ server serving ndomain, now + let us search for "name" */ + return rec_dirsearch (name, obj, status); } - break; + break; case BAD_NAME: nis_free_directory (dir); *status = NIS_BADNAME; @@ -468,29 +451,44 @@ rec_dirsearch (const_nis_name name, dire /* We try to query the current server for the searched object, maybe he know about it ? */ static directory_obj * -first_shoot (const_nis_name name, directory_obj *dir) +first_shoot (const_nis_name name, int search_parent_first, directory_obj *dir) { directory_obj *obj = NULL; fd_result *fd_res; XDR xdrs; char domain[strlen (name) + 3]; +#if 0 if (nis_dir_cmp (name, dir->do_name) == SAME_NAME) return dir; +#endif - nis_domain_of_r (name, domain, sizeof (domain)); + const char *search_name = name; + if (search_parent_first) + { + nis_domain_of_r (name, domain, sizeof (domain)); + search_name = domain; + } - if (nis_dir_cmp (domain, dir->do_name) == SAME_NAME) + if (nis_dir_cmp (search_name, dir->do_name) == SAME_NAME) return dir; - fd_res = __nis_finddirectory (dir, domain); + fd_res = __nis_finddirectory (dir, search_name); + if (fd_res == NULL) + return NULL; if (fd_res->status == NIS_SUCCESS && (obj = calloc (1, sizeof (directory_obj))) != NULL) { - xdrmem_create(&xdrs, fd_res->dir_data.dir_data_val, - fd_res->dir_data.dir_data_len, XDR_DECODE); + xdrmem_create (&xdrs, fd_res->dir_data.dir_data_val, + fd_res->dir_data.dir_data_len, XDR_DECODE); _xdr_directory_obj (&xdrs, obj); xdr_destroy (&xdrs); + + if (strcmp (dir->do_name, obj->do_name) != 0) + { + nis_free_directory (obj); + obj = NULL; + } } __free_fdresult (fd_res); @@ -502,7 +500,8 @@ first_shoot (const_nis_name name, direct } nis_error -__nisfind_server (const_nis_name name, directory_obj **dir) +__nisfind_server (const_nis_name name, int search_parent_first, + directory_obj **dir) { if (name == NULL) return NIS_BADNAME; @@ -513,74 +512,95 @@ __nisfind_server (const_nis_name name, d dir = __nis_cache_search (name, flags, &cinfo); #endif + nis_error result = NIS_SUCCESS; if (*dir == NULL) { nis_error status; directory_obj *obj; *dir = readColdStartFile (); - if (*dir == NULL) /* No /var/nis/NIS_COLD_START->no NIS+ installed */ + if (*dir == NULL) + /* No /var/nis/NIS_COLD_START->no NIS+ installed. */ return NIS_UNAVAIL; /* Try at first, if servers in "dir" know our object */ - obj = first_shoot (name, *dir); + obj = first_shoot (name, search_parent_first, *dir); if (obj == NULL) { - *dir = rec_dirsearch (name, *dir, &status); - if (*dir == NULL) - return status; + obj = rec_dirsearch (name, *dir, &status); + if (obj == NULL) + result = status; } - else - *dir = obj; + + *dir = obj; } - return NIS_SUCCESS; + return result; } + nis_error -__do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs, - caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags, - nis_cb *cb) +__prepare_niscall (const_nis_name name, directory_obj **dirp, + dir_binding *bptrp, unsigned int flags) { - nis_error retcode; - dir_binding bptr; - directory_obj *dir = NULL; + nis_error retcode = __nisfind_server (name, 1, dirp); + if (__builtin_expect (retcode != NIS_SUCCESS, 0)) + return retcode; + nis_server *server; u_int server_len; - int saved_errno = errno; - - retcode = __nisfind_server (name, &dir); - if (retcode != NIS_SUCCESS) - return retcode; if (flags & MASTER_ONLY) { - server = dir->do_servers.do_servers_val; + server = (*dirp)->do_servers.do_servers_val; server_len = 1; } else { - server = dir->do_servers.do_servers_val; - server_len = dir->do_servers.do_servers_len; + server = (*dirp)->do_servers.do_servers_val; + server_len = (*dirp)->do_servers.do_servers_len; } - retcode = __nisbind_create (&bptr, server, server_len, flags); + retcode = __nisbind_create (bptrp, server, server_len, flags); + if (retcode == NIS_SUCCESS) + { + do + if (__nisbind_connect (bptrp) == NIS_SUCCESS) + return NIS_SUCCESS; + while (__nisbind_next (bptrp) == NIS_SUCCESS); + + __nisbind_destroy (bptrp); + memset (bptrp, '\0', sizeof (*bptrp)); + + retcode = NIS_NAMEUNREACHABLE; + } + + nis_free_directory (*dirp); + *dirp = NULL; + + return retcode; +} +libnsl_hidden_def (__prepare_niscall) + + +nis_error +__do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs, + caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags, + nis_cb *cb) +{ + dir_binding bptr; + directory_obj *dir = NULL; + int saved_errno = errno; + + nis_error retcode = __prepare_niscall (name, &dir, &bptr, flags); if (retcode == NIS_SUCCESS) { - while (__nisbind_connect (&bptr) != NIS_SUCCESS) - { - if (__nisbind_next (&bptr) != NIS_SUCCESS) - { - nis_free_directory (dir); - return NIS_NAMEUNREACHABLE; - } - } retcode = __do_niscall3 (&bptr, prog, xargs, req, xres, resp, flags, cb); __nisbind_destroy (&bptr); - } - nis_free_directory (dir); + nis_free_directory (dir); + } __set_errno (saved_errno); diff -uprN glibc-2.4/nis/nis_checkpoint.c glibc-2.5/nis/nis_checkpoint.c --- glibc-2.4/nis/nis_checkpoint.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_checkpoint.c 2006-04-06 21:23:46.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -24,7 +24,7 @@ #include "nis_intern.h" nis_result * -nis_checkpoint(const_nis_name dirname) +nis_checkpoint (const_nis_name dirname) { nis_result *res; @@ -48,7 +48,6 @@ nis_checkpoint(const_nis_name dirname) if (__type_of (NIS_RES_OBJECT (res2)) != NIS_DIRECTORY_OBJ) { nis_freeresult (res2); - nis_freeresult (res); NIS_RES_STATUS (res) = NIS_INVALIDOBJ; return res; } diff -uprN glibc-2.4/nis/nis_clone_dir.c glibc-2.5/nis/nis_clone_dir.c --- glibc-2.4/nis/nis_clone_dir.c 2005-02-17 01:17:24.000000000 +0000 +++ glibc-2.5/nis/nis_clone_dir.c 2006-04-07 03:53:09.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -29,15 +29,24 @@ nis_clone_directory (const directory_obj char *addr; unsigned int size; XDR xdrs; - directory_obj *res; if (src == NULL) - return (NULL); + return NULL; size = xdr_sizeof ((xdrproc_t)_xdr_directory_obj, (char *)src); if ((addr = calloc(1, size)) == NULL) return NULL; + xdrmem_create(&xdrs, addr, size, XDR_ENCODE); + if (!_xdr_directory_obj (&xdrs, (directory_obj *)src)) + { + xdr_destroy (&xdrs); + free (addr); + return NULL; + } + xdr_destroy (&xdrs); + + directory_obj *res; if (dest == NULL) { if ((res = calloc (1, sizeof (directory_obj))) == NULL) @@ -49,18 +58,12 @@ nis_clone_directory (const directory_obj else res = dest; - xdrmem_create(&xdrs, addr, size, XDR_ENCODE); - if (!_xdr_directory_obj (&xdrs, (directory_obj *)src)) - { - xdr_destroy (&xdrs); - free (addr); - return NULL; - } - xdr_destroy (&xdrs); xdrmem_create (&xdrs, addr, size, XDR_DECODE); if (!_xdr_directory_obj (&xdrs, res)) { xdr_destroy (&xdrs); + if (res != dest) + free (res); free (addr); return NULL; } diff -uprN glibc-2.4/nis/nis_clone_res.c glibc-2.5/nis/nis_clone_res.c --- glibc-2.4/nis/nis_clone_res.c 2005-02-17 01:17:24.000000000 +0000 +++ glibc-2.5/nis/nis_clone_res.c 2006-04-07 03:51:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -29,7 +29,6 @@ nis_clone_result (const nis_result *src, char *addr; unsigned int size; XDR xdrs; - nis_result *res; if (src == NULL) return (NULL); @@ -38,6 +37,16 @@ nis_clone_result (const nis_result *src, if ((addr = calloc(1, size)) == NULL) return NULL; + xdrmem_create (&xdrs, addr, size, XDR_ENCODE); + if (!_xdr_nis_result (&xdrs, (nis_result *)src)) + { + xdr_destroy (&xdrs); + free (addr); + return NULL; + } + xdr_destroy (&xdrs); + + nis_result *res; if (dest == NULL) { if ((res = calloc (1, sizeof (nis_result))) == NULL) @@ -49,18 +58,12 @@ nis_clone_result (const nis_result *src, else res = dest; - xdrmem_create(&xdrs, addr, size, XDR_ENCODE); - if (!_xdr_nis_result (&xdrs, (nis_result *)src)) - { - xdr_destroy (&xdrs); - free (addr); - return NULL; - } - xdr_destroy (&xdrs); - xdrmem_create(&xdrs, addr, size, XDR_DECODE); - if (!_xdr_nis_result(&xdrs, res)) + xdrmem_create (&xdrs, addr, size, XDR_DECODE); + if (!_xdr_nis_result (&xdrs, res)) { xdr_destroy (&xdrs); + if (res != dest) + free (res); free (addr); return NULL; } diff -uprN glibc-2.4/nis/nis_creategroup.c glibc-2.5/nis/nis_creategroup.c --- glibc-2.4/nis/nis_creategroup.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_creategroup.c 2006-05-10 03:06:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -46,18 +46,24 @@ nis_creategroup (const_nis_name group, u else return NIS_BADNAME; - obj = malloc (sizeof (nis_object)); + obj = calloc (1, sizeof (nis_object)); if (__builtin_expect (obj == NULL, 0)) return NIS_NOMEMORY; obj->zo_oid.ctime = obj->zo_oid.mtime = time (NULL); obj->zo_name = strdup (leafbuf); - obj->zo_owner = strdup (__nis_default_owner (NULL)); - obj->zo_group = strdup (__nis_default_group (NULL)); + obj->zo_owner = __nis_default_owner (NULL); + obj->zo_group = __nis_default_group (NULL); obj->zo_domain = strdup (domainbuf); if (obj->zo_name == NULL || obj->zo_owner == NULL || obj->zo_group == NULL || obj->zo_domain == NULL) - return NIS_NOMEMORY; + { + free (obj->zo_group); + free (obj->zo_owner); + free (obj->zo_name); + free (obj); + return NIS_NOMEMORY; + } obj->zo_access = __nis_default_access (NULL, 0); obj->zo_ttl = 60 * 60; obj->zo_data.zo_type = NIS_GROUP_OBJ; @@ -66,11 +72,11 @@ nis_creategroup (const_nis_name group, u obj->zo_data.objdata_u.gr_data.gr_members.gr_members_val = NULL; res = nis_add (buf, obj); + nis_free_object (obj); if (res == NULL) return NIS_NOMEMORY; status = NIS_RES_STATUS (res); nis_freeresult (res); - nis_free_object (obj); return status; } diff -uprN glibc-2.4/nis/nis_defaults.c glibc-2.5/nis/nis_defaults.c --- glibc-2.4/nis/nis_defaults.c 2004-10-24 20:28:28.000000000 +0000 +++ glibc-2.5/nis/nis_defaults.c 2006-05-10 02:54:46.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include @@ -30,45 +31,36 @@ ** Some functions for parsing the -D param and NIS_DEFAULTS Environ */ static nis_name -searchgroup (char *str) +searchXYX (char *str, const char *what) { - char *cptr; - int i; + assert (strlen (what) == 6); + assert (strncmp (str, what, 6) == 0); + str += 6; /* Points to the begin of the parameters. */ + + int i = 0; + while (str[i] != '\0' && str[i] != ':') + ++i; + if (i == 0) /* only "=" ? */ + return strdup (""); - cptr = strstr (str, "group="); - if (cptr == NULL) - return NULL; + return strndup (str, i); +} - cptr += 6; /* points to the begin of the group string */ - i = 0; - while (cptr[i] != '\0' && cptr[i] != ':') - i++; - if (i == 0) /* only "group=" ? */ - return (nis_name) ""; - return strndup (cptr, i); +static nis_name +searchgroup (char *str) +{ + return searchXYX (str, "group="); } + static nis_name searchowner (char *str) { - char *cptr; - int i; - - cptr = strstr (str, "owner="); - if (cptr == NULL) - return NULL; - - cptr += 6; /* points to the begin of the owner string */ - i = 0; - while (cptr[i] != '\0' && cptr[i] != ':') - i++; - if (i == 0) /* only "owner=" ? */ - return strdup (""); - - return strndup (cptr, i); + return searchXYX (str, "owner="); } + static uint32_t searchttl (char *str) { @@ -358,86 +350,61 @@ searchaccess (char *str, unsigned int ac return result; } + nis_name __nis_default_owner (char *defaults) { - char default_owner[NIS_MAXNAMELEN + 1]; - char *cptr, *dptr; + char *default_owner = NULL; - strcpy (default_owner, nis_local_principal ()); + char *cptr = defaults; + if (cptr == NULL) + cptr = getenv ("NIS_DEFAULTS"); - if (defaults != NULL) + if (cptr != NULL) { - dptr = strstr (defaults, "owner="); + char *dptr = strstr (cptr, "owner="); if (dptr != NULL) { - char *p = searchowner (defaults); - if (strlen (p) <= NIS_MAXNAMELEN) - strcpy (default_owner, p); + char *p = searchowner (dptr); + if (p == NULL) + return NULL; + default_owner = strdupa (p); free (p); } } - else - { - cptr = getenv ("NIS_DEFAULTS"); - if (cptr != NULL) - { - dptr = strstr (cptr, "owner="); - if (dptr != NULL) - { - char *p = searchowner (cptr); - if (strlen (p) <= NIS_MAXNAMELEN) - strcpy (default_owner, p); - free (p); - } - } - } - return strdup (default_owner); + return strdup (default_owner ?: nis_local_principal ()); } libnsl_hidden_def (__nis_default_owner) + nis_name __nis_default_group (char *defaults) { - char default_group[NIS_MAXNAMELEN + 1]; - char *cptr, *dptr; + char *default_group = NULL; - strcpy (default_group, nis_local_group ()); + char *cptr = defaults; + if (cptr == NULL) + cptr = getenv ("NIS_DEFAULTS"); - if (defaults != NULL) + if (cptr != NULL) { - dptr = strstr (defaults, "group="); + char *dptr = strstr (cptr, "group="); if (dptr != NULL) { - char *p = searchgroup (defaults); - - if (strlen (p) <= NIS_MAXNAMELEN) - strcpy (default_group, p); + char *p = searchgroup (dptr); + if (p == NULL) + return NULL; + default_group = strdupa (p); free (p); } } - else - { - cptr = getenv ("NIS_DEFAULTS"); - if (cptr != NULL) - { - dptr = strstr (cptr, "group="); - if (dptr != NULL) - { - char *p = searchgroup (cptr); - - if (strlen (p) <= NIS_MAXNAMELEN) - strcpy (default_group, p); - free (p); - } - } - } - return strdup (default_group); + return strdup (default_group ?: nis_local_group ()); } libnsl_hidden_def (__nis_default_group) + uint32_t __nis_default_ttl (char *defaults) { diff -uprN glibc-2.4/nis/nis_domain_of_r.c glibc-2.5/nis/nis_domain_of_r.c --- glibc-2.4/nis/nis_domain_of_r.c 2004-12-15 17:40:54.000000000 +0000 +++ glibc-2.5/nis/nis_domain_of_r.c 2006-05-24 04:06:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -29,6 +29,7 @@ nis_domain_of_r (const_nis_name name, ch if (buffer == NULL) { + erange: __set_errno (ERANGE); return NULL; } @@ -44,7 +45,11 @@ nis_domain_of_r (const_nis_name name, ch cptr_len = strlen (cptr); if (cptr_len == 0) - return strcpy (buffer, "."); + { + if (buflen < 2) + goto erange; + return strcpy (buffer, "."); + } if (__builtin_expect (cptr_len >= buflen, 0)) { diff -uprN glibc-2.4/nis/nis_error.c glibc-2.5/nis/nis_error.c --- glibc-2.4/nis/nis_error.c 2005-12-03 22:15:00.000000000 +0000 +++ glibc-2.5/nis/nis_error.c 2006-05-11 20:28:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997,1998,1999,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -24,65 +24,41 @@ #include -static const char *nis_errlist[] = -{ - N_("Success"), - N_("Probable success"), - N_("Not found"), - N_("Probably not found"), - N_("Cache expired"), - N_("NIS+ servers unreachable"), - N_("Unknown object"), - N_("Server busy, try again"), - N_("Generic system error"), - N_("First/next chain broken"), - N_("Permission denied"), - N_("Not owner"), - N_("Name not served by this server"), - N_("Server out of memory"), - N_("Object with same name exists"), - N_("Not master server for this domain"), - N_("Invalid object for operation"), - N_("Malformed name, or illegal name"), - N_("Unable to create callback"), - N_("Results sent to callback proc"), - N_("Not found, no such name"), - N_("Name/entry isn't unique"), - N_("Modification failed"), - N_("Database for table does not exist"), - N_("Entry/table type mismatch"), - N_("Link points to illegal name"), - N_("Partial success"), - N_("Too many attributes"), - N_("Error in RPC subsystem"), - N_("Missing or malformed attribute"), - N_("Named object is not searchable"), - N_("Error while talking to callback proc"), - N_("Non NIS+ namespace encountered"), - N_("Illegal object type for operation"), - N_("Passed object is not the same object on server"), - N_("Modify operation failed"), - N_("Query illegal for named table"), - N_("Attempt to remove a non-empty table"), - N_("Error in accessing NIS+ cold start file. Is NIS+ installed?"), - N_("Full resync required for directory"), - N_("NIS+ operation failed"), - N_("NIS+ service is unavailable or not installed"), - N_("Yes, 42 is the meaning of life"), - N_("Unable to authenticate NIS+ server"), - N_("Unable to authenticate NIS+ client"), - N_("No file space on server"), - N_("Unable to create process on server"), - N_("Master server busy, full dump rescheduled.") -}; +#define MF(line) MF1 (line) +#define MF1(line) str##line +static const union msgstr_t +{ + struct + { +#define S(s) char MF(__LINE__)[sizeof (s)]; +#include "nis_error.h" +#undef S + }; + char str[0]; +} msgstr = + { + { +#define S(s) s, +#include "nis_error.h" +#undef S + } + }; + +static const unsigned short int msgidx[] = + { +#define S(s) offsetof (union msgstr_t, MF (__LINE__)), +#include "nis_error.h" +#undef S + }; + const char * nis_sperrno (const nis_error status) { - if (status >= (sizeof (nis_errlist) / sizeof (nis_errlist[0]))) + if (status >= sizeof (msgidx) / sizeof (msgidx[0])) return "???"; else - return gettext (nis_errlist[status]); + return gettext (msgstr.str + msgidx[status]); } libnsl_hidden_def (nis_sperrno) @@ -105,7 +81,7 @@ nis_sperror_r (const nis_error status, c if (snprintf (buffer, buflen, "%s: %s", label, nis_sperrno (status)) >= buflen) { - errno = ERANGE; + __set_errno (ERANGE); return NULL; } diff -uprN glibc-2.4/nis/nis_error.h glibc-2.5/nis/nis_error.h --- glibc-2.4/nis/nis_error.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nis/nis_error.h 2006-05-11 20:27:42.000000000 +0000 @@ -0,0 +1,48 @@ +S(N_("Success")) +S(N_("Probable success")) +S(N_("Not found")) +S(N_("Probably not found")) +S(N_("Cache expired")) +S(N_("NIS+ servers unreachable")) +S(N_("Unknown object")) +S(N_("Server busy, try again")) +S(N_("Generic system error")) +S(N_("First/next chain broken")) +S(N_("Permission denied")) +S(N_("Not owner")) +S(N_("Name not served by this server")) +S(N_("Server out of memory")) +S(N_("Object with same name exists")) +S(N_("Not master server for this domain")) +S(N_("Invalid object for operation")) +S(N_("Malformed name, or illegal name")) +S(N_("Unable to create callback")) +S(N_("Results sent to callback proc")) +S(N_("Not found, no such name")) +S(N_("Name/entry isn't unique")) +S(N_("Modification failed")) +S(N_("Database for table does not exist")) +S(N_("Entry/table type mismatch")) +S(N_("Link points to illegal name")) +S(N_("Partial success")) +S(N_("Too many attributes")) +S(N_("Error in RPC subsystem")) +S(N_("Missing or malformed attribute")) +S(N_("Named object is not searchable")) +S(N_("Error while talking to callback proc")) +S(N_("Non NIS+ namespace encountered")) +S(N_("Illegal object type for operation")) +S(N_("Passed object is not the same object on server")) +S(N_("Modify operation failed")) +S(N_("Query illegal for named table")) +S(N_("Attempt to remove a non-empty table")) +S(N_("Error in accessing NIS+ cold start file. Is NIS+ installed?")) +S(N_("Full resync required for directory")) +S(N_("NIS+ operation failed")) +S(N_("NIS+ service is unavailable or not installed")) +S(N_("Yes, 42 is the meaning of life")) +S(N_("Unable to authenticate NIS+ server")) +S(N_("Unable to authenticate NIS+ client")) +S(N_("No file space on server")) +S(N_("Unable to create process on server")) +S(N_("Master server busy, full dump rescheduled.")) diff -uprN glibc-2.4/nis/nis_getservlist.c glibc-2.5/nis/nis_getservlist.c --- glibc-2.4/nis/nis_getservlist.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_getservlist.c 2006-04-08 19:24:07.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -40,7 +40,10 @@ nis_getservlist (const_nis_name dir) malloc (sizeof (nis_server *) * (NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_len + 1)); if (__builtin_expect (serv == NULL, 0)) - return NULL; + { + nis_freeresult (res); + return NULL; + } for (i = 0; i < NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_len; ++i) @@ -49,13 +52,41 @@ nis_getservlist (const_nis_name dir) &NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_val[i]; serv[i] = calloc (1, sizeof (nis_server)); if (__builtin_expect (serv[i] == NULL, 0)) - return NULL; + { + free_all: + while (i-- > 0) + { + free (serv[i]->pkey.n_bytes); + if (serv[i]->ep.ep_val != NULL) + { + unsigned long int j; + for (j = 0; j < serv[i]->ep.ep_len; ++j) + { + free (serv[i]->ep.ep_val[j].proto); + free (serv[i]->ep.ep_val[j].family); + free (serv[i]->ep.ep_val[j].uaddr); + } + free (serv[i]->ep.ep_val); + } + free (serv[i]->name); + free (serv[i]); + } + + free (serv); + + nis_freeresult (res); + + return NULL; + } if (server->name != NULL) { serv[i]->name = strdup (server->name); if (__builtin_expect (serv[i]->name == NULL, 0)) - return NULL; + { + ++i; + goto free_all; + } } serv[i]->ep.ep_len = server->ep.ep_len; @@ -66,7 +97,10 @@ nis_getservlist (const_nis_name dir) serv[i]->ep.ep_val = malloc (server->ep.ep_len * sizeof (endpoint)); if (__builtin_expect (serv[i]->ep.ep_val == NULL, 0)) - return NULL; + { + ++i; + goto free_all; + } for (j = 0; j < serv[i]->ep.ep_len; ++j) { @@ -87,20 +121,20 @@ nis_getservlist (const_nis_name dir) serv[i]->ep.ep_val[j].proto = NULL; } } - else - serv[i]->ep.ep_val = NULL; + serv[i]->key_type = server->key_type; serv[i]->pkey.n_len = server->pkey.n_len; if (server->pkey.n_len > 0) { serv[i]->pkey.n_bytes = malloc (server->pkey.n_len); if (__builtin_expect (serv[i]->pkey.n_bytes == NULL, 0)) - return NULL; + { + ++i; + goto free_all; + } memcpy (serv[i]->pkey.n_bytes, server->pkey.n_bytes, server->pkey.n_len); } - else - serv[i]->pkey.n_bytes = NULL; } serv[i] = NULL; } @@ -111,8 +145,7 @@ nis_getservlist (const_nis_name dir) serv[0] = NULL; } - if (res != NULL) - nis_freeresult (res); + nis_freeresult (res); return serv; } diff -uprN glibc-2.4/nis/nis_intern.h glibc-2.5/nis/nis_intern.h --- glibc-2.4/nis/nis_intern.h 2001-12-13 03:38:06.000000000 +0000 +++ glibc-2.5/nis/nis_intern.h 2006-05-20 20:18:03.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (c) 1997,1998,1999,2000,2001,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -66,6 +66,7 @@ extern nis_error __do_niscall3 (dir_bind xdrproc_t xargs, caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags, nis_cb *cb); +libnsl_hidden_proto (__do_niscall3) extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol); diff -uprN glibc-2.4/nis/nis_ismember.c glibc-2.5/nis/nis_ismember.c --- glibc-2.4/nis/nis_ismember.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_ismember.c 2006-04-08 20:12:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -47,8 +47,7 @@ internal_ismember (const_nis_name princi res = nis_lookup (buf, EXPAND_NAME|FOLLOW_LINKS); if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) { - if (res) - nis_freeresult (res); + nis_freeresult (res); return 0; } diff -uprN glibc-2.4/nis/nis_local_names.c glibc-2.5/nis/nis_local_names.c --- glibc-2.4/nis/nis_local_names.c 2004-10-24 20:28:28.000000000 +0000 +++ glibc-2.5/nis/nis_local_names.c 2006-04-07 06:52:01.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -63,7 +63,7 @@ nis_local_directory (void) __nisdomainname[0] = '\0'; else { - char *cp = strchr (__nisdomainname, '\0'); + char *cp = rawmemchr (__nisdomainname, '\0'); /* Missing trailing dot? */ if (cp[-1] != '.') @@ -154,7 +154,7 @@ nis_local_host (void) __nishostname[0] = '\0'; else { - char *cp = strchr (__nishostname, '\0'); + char *cp = rawmemchr (__nishostname, '\0'); int len = cp - __nishostname; /* Hostname already fully qualified? */ diff -uprN glibc-2.4/nis/nis_lookup.c glibc-2.5/nis/nis_lookup.c --- glibc-2.4/nis/nis_lookup.c 2005-12-08 20:19:11.000000000 +0000 +++ glibc-2.5/nis/nis_lookup.c 2006-08-07 16:02:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997-1999, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -21,6 +21,8 @@ #include #include "nis_xdr.h" #include "nis_intern.h" +#include + nis_result * nis_lookup (const_nis_name name, const unsigned int flags) @@ -61,36 +63,18 @@ nis_lookup (const_nis_name name, const u req.ns_object.ns_object_len = 0; req.ns_object.ns_object_val = NULL; - status = __nisfind_server (req.ns_name, &dir); - if (status != NIS_SUCCESS) + status = __prepare_niscall (req.ns_name, &dir, &bptr, flags); + if (__builtin_expect (status != NIS_SUCCESS, 0)) { NIS_RES_STATUS (res) = status; - return res; - } - - status = __nisbind_create (&bptr, dir->do_servers.do_servers_val, - dir->do_servers.do_servers_len, flags); - if (status != NIS_SUCCESS) - { - NIS_RES_STATUS (res) = status; - nis_free_directory (dir); - return res; - } - - while (__nisbind_connect (&bptr) != NIS_SUCCESS) - { - if (__nisbind_next (&bptr) != NIS_SUCCESS) - { - nis_free_directory (dir); - NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; - return res; - } + goto out; } do { static const struct timeval RPCTIMEOUT = {10, 0}; enum clnt_stat result; + char ndomain[strlen (req.ns_name) + 1]; again: result = clnt_call (bptr.clnt, NIS_LOOKUP, @@ -106,11 +90,9 @@ nis_lookup (const_nis_name name, const u if (NIS_RES_STATUS (res) == NIS_SUCCESS) { - if (__type_of(NIS_RES_OBJECT (res)) == NIS_LINK_OBJ + if (__type_of (NIS_RES_OBJECT (res)) == NIS_LINK_OBJ && (flags & FOLLOW_LINKS)) /* We are following links */ { - if (count_links) - free (req.ns_name); /* if we hit the link limit, bail */ if (count_links > NIS_MAXLINKS) { @@ -119,17 +101,15 @@ nis_lookup (const_nis_name name, const u } ++count_links; req.ns_name = - strdup (NIS_RES_OBJECT (res)->LI_data.li_name); - if (req.ns_name == NULL) - return NULL; - - nis_freeresult (res); - res = calloc (1, sizeof (nis_result)); - if (res == NULL) - { - __nisbind_destroy (&bptr); - return NULL; - } + strdupa (NIS_RES_OBJECT (res)->LI_data.li_name); + + /* The following is a non-obvious optimization. A + nis_freeresult call would call xdr_free as the + following code. But it also would unnecessarily + free the result structure. We avoid this here + along with the necessary tests. */ + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) res); + memset (res, '\0', sizeof (*res)); link_first_try = 1; /* Try at first the old binding */ goto again; @@ -144,10 +124,12 @@ nis_lookup (const_nis_name name, const u { __nisbind_destroy (&bptr); nis_free_directory (dir); + /* Otherwise __nisfind_server will not do anything. */ + dir = NULL; - if (__nisfind_server (req.ns_name, &dir) + if (__nisfind_server (req.ns_name, 1, &dir) != NIS_SUCCESS) - return res; + goto out; if (__nisbind_create (&bptr, dir->do_servers.do_servers_val, @@ -155,19 +137,41 @@ nis_lookup (const_nis_name name, const u flags) != NIS_SUCCESS) { nis_free_directory (dir); - return res; + goto out; } } else if (__nisbind_next (&bptr) != NIS_SUCCESS) - break; /* No more servers to search */ + { + /* No more servers to search. Try parent. */ + nis_domain_of_r (req.ns_name, ndomain, + sizeof (ndomain)); + req.ns_name = strdupa (ndomain); + if (strcmp (ndomain, ".") == 0) + { + NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; + goto out; + } + + __nisbind_destroy (&bptr); + nis_free_directory (dir); + dir = NULL; + status = __prepare_niscall (req.ns_name, &dir, + &bptr, flags); + if (__builtin_expect (status != NIS_SUCCESS, 0)) + { + NIS_RES_STATUS (res) = status; + goto out; + } + goto again; + } while (__nisbind_connect (&bptr) != NIS_SUCCESS) { if (__nisbind_next (&bptr) != NIS_SUCCESS) { nis_free_directory (dir); - return res; + goto out; } } goto again; @@ -184,7 +188,7 @@ nis_lookup (const_nis_name name, const u if (status != NIS_SUCCESS) { NIS_RES_STATUS (res) = status; - return res; + goto out; } switch (NIS_RES_STATUS (res)) @@ -216,6 +220,7 @@ nis_lookup (const_nis_name name, const u } } + out: if (names != namebuf) nis_freenames (names); diff -uprN glibc-2.4/nis/nis_ping.c glibc-2.5/nis/nis_ping.c --- glibc-2.4/nis/nis_ping.c 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_ping.c 2006-04-08 20:11:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -39,8 +39,7 @@ nis_ping (const_nis_name dirname, unsign res = nis_lookup (dirname, MASTER_ONLY); if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) { - if (res) - nis_freeresult (res); + nis_freeresult (res); return; } obj = res->objects.objects_val; @@ -51,8 +50,7 @@ nis_ping (const_nis_name dirname, unsign /* Check if obj is really a diryectory object */ if (__type_of (obj) != NIS_DIRECTORY_OBJ) { - if (res != NULL) - nis_freeresult (res); + nis_freeresult (res); return; } @@ -68,6 +66,5 @@ nis_ping (const_nis_name dirname, unsign NIS_PING, (xdrproc_t) _xdr_ping_args, (caddr_t) &args, (xdrproc_t) xdr_void, (caddr_t) NULL, 0, NULL); - if (res) - nis_freeresult (res); + nis_freeresult (res); } diff -uprN glibc-2.4/nis/nisplus-parser.h glibc-2.5/nis/nisplus-parser.h --- glibc-2.4/nis/nisplus-parser.h 2004-10-24 21:22:48.000000000 +0000 +++ glibc-2.5/nis/nisplus-parser.h 2006-05-20 19:17:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -24,15 +24,13 @@ #include #include -extern int _nss_nisplus_parse_pwent (nis_result *, struct passwd *, - char *, size_t, int *); -extern int _nss_nisplus_parse_grent (nis_result *, u_long, struct group *, - char *, size_t, int *); -extern int _nss_nisplus_parse_spent (nis_result *, struct spwd *, - char *, size_t, int *); - -libnss_nisplus_hidden_proto (_nss_nisplus_parse_pwent) -libnss_nisplus_hidden_proto (_nss_nisplus_parse_grent) -libnss_nisplus_hidden_proto (_nss_nisplus_parse_spent) +extern int _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw, + char *buffer, size_t buflen, int *errnop); + +extern int _nss_nisplus_parse_grent (nis_result *result, struct group *gr, + char *buffer, size_t buflen, int *errnop); + +extern int _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, + char *buffer, size_t buflen, int *errnop); #endif diff -uprN glibc-2.4/nis/nis_print_group_entry.c glibc-2.5/nis/nis_print_group_entry.c --- glibc-2.4/nis/nis_print_group_entry.c 2004-03-25 03:51:53.000000000 +0000 +++ glibc-2.5/nis/nis_print_group_entry.c 2006-04-07 00:39:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2000, 2004 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -45,12 +45,16 @@ nis_print_group_entry (const_nis_name gr } res = nis_lookup (buf, FOLLOW_LINKS | EXPAND_NAME); - if (NIS_RES_STATUS(res) != NIS_SUCCESS) + if (res == NULL) return; - if ((NIS_RES_NUMOBJ (res) != 1) || - (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ)) - return; + if (NIS_RES_STATUS (res) != NIS_SUCCESS + || NIS_RES_NUMOBJ (res) != 1 + || __type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ) + { + nis_freeresult (res); + return; + } char *mem_exp[NIS_RES_NUMOBJ (res)]; char *mem_imp[NIS_RES_NUMOBJ (res)]; diff -uprN glibc-2.4/nis/nis_removemember.c glibc-2.5/nis/nis_removemember.c --- glibc-2.4/nis/nis_removemember.c 2005-04-29 09:18:00.000000000 +0000 +++ glibc-2.5/nis/nis_removemember.c 2006-05-25 18:30:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997,1998,1999,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -28,15 +28,12 @@ nis_removemember (const_nis_name member, { size_t grouplen = strlen (group); char buf[grouplen + 14 + NIS_MAXNAMELEN]; - char leafbuf[grouplen + 2]; char domainbuf[grouplen + 2]; - nis_name *newmem; nis_result *res, *res2; nis_error status; char *cp, *cp2; - unsigned long int i, j, k; - cp = stpcpy (buf, nis_leaf_of_r (group, leafbuf, sizeof (leafbuf) - 1)); + cp = rawmemchr (nis_leaf_of_r (group, buf, sizeof (buf) - 1), '\0'); cp = stpcpy (cp, ".groups_dir"); cp2 = nis_domain_of_r (group, domainbuf, sizeof (domainbuf) - 1); if (cp2 != NULL && cp2[0] != '\0') @@ -44,64 +41,41 @@ nis_removemember (const_nis_name member, cp = stpcpy (cp, "."); stpcpy (cp, cp2); } - res = nis_lookup (buf, FOLLOW_LINKS|EXPAND_NAME); - if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) + res = nis_lookup (buf, FOLLOW_LINKS | EXPAND_NAME); + if (res == NULL) + return NIS_NOMEMORY; + if (NIS_RES_STATUS (res) != NIS_SUCCESS) { - if (res) - { - status = NIS_RES_STATUS (res); - nis_freeresult (res); - } - else - return NIS_NOMEMORY; + status = NIS_RES_STATUS (res); + nis_freeresult (res); return status; } - if ((res->objects.objects_len != 1) || - (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ)) + if (NIS_RES_NUMOBJ (res) != 1 + || __type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ) { nis_freeresult (res); return NIS_INVALIDOBJ; } - newmem = - calloc (NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len, - sizeof (char *)); - if (newmem == NULL) - return NIS_NOMEMORY; - - k = NIS_RES_OBJECT (res)[0].GR_data.gr_members.gr_members_len; - j = 0; - for (i = 0; i < NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len; - ++i) - { - if (strcmp (NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_val[i], - member) != 0) - { - newmem[j] = NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_val[i]; - ++j; - } - else - { - free (NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_val[i]); - --k; - } - } - free (NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val); - assert (k <= NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len); - /* This realloc() call always decreases the size. This cannot - fail. We still have the test but do not recover memory - (i.e., we overwrite the input pointer). */ - nis_name *newp = realloc (newmem, k * sizeof (char*)); - if (newp == NULL) - { - free (newmem); - return NIS_NOMEMORY; - } - newmem = newp; - - NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_val = newmem; - NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_len = k; + nis_name *gr_members_val + = NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_val; + u_int gr_members_len + = NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len; + + u_int j = 0; + for (u_int i = 0; i < gr_members_len; ++i) + if (strcmp (gr_members_val[i], member) != 0) + gr_members_val[j++] = gr_members_val[i]; + else + free (gr_members_val[i]); + + /* There is no need to reallocate the gr_members_val array. We + just adjust the size to match the number of strings still in + it. Yes, xdr_array will use mem_free with a size parameter + but this is mapped to a simple free call which determines the + size of the block by itself. */ + NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_len = j; cp = stpcpy (buf, NIS_RES_OBJECT (res)->zo_name); *cp++ = '.'; diff -uprN glibc-2.4/nis/nis_subr.c glibc-2.5/nis/nis_subr.c --- glibc-2.4/nis/nis_subr.c 2005-08-16 15:59:46.000000000 +0000 +++ glibc-2.5/nis/nis_subr.c 2006-06-16 22:30:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1999, 2000, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997,1999,2000,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -107,25 +107,23 @@ count_dots (const_nis_name str) nis_name * nis_getnames (const_nis_name name) { - nis_name *getnames = NULL; - char local_domain[NIS_MAXNAMELEN + 1]; + const char *local_domain = nis_local_directory (); + size_t local_domain_len = strlen (local_domain); + size_t name_len = strlen (name); char *path; - char *cp; - int count; int pos = 0; - int have_point; char *saveptr; + int have_point; + const char *cp; + const char *cp2; - strncpy (local_domain, nis_local_directory (), NIS_MAXNAMELEN); - local_domain[NIS_MAXNAMELEN] = '\0'; - - count = 1; - getnames = malloc ((count + 1) * sizeof (char *)); + int count = 2; + nis_name *getnames = malloc ((count + 1) * sizeof (char *)); if (__builtin_expect (getnames == NULL, 0)) return NULL; /* Do we have a fully qualified NIS+ name ? If yes, give it back */ - if (name[strlen (name) - 1] == '.') + if (name[name_len - 1] == '.') { if ((getnames[0] = strdup (name)) == NULL) { @@ -141,6 +139,44 @@ nis_getnames (const_nis_name name) return getnames; } + /* If the passed NAME is shared a suffix (the latter of course with + a final dot) with each other we pass back NAME with a final + dot. */ + if (local_domain_len > 2) + { + have_point = 0; + cp = &local_domain[local_domain_len - 2]; + cp2 = &name[name_len - 1]; + + while (*cp == *cp2) + { + if (*cp == '.') + have_point = 1; + --cp; + --cp2; + if (cp < local_domain) + { + have_point = cp2 < name || *cp2 == '.'; + break; + } + if (cp2 < name) + { + have_point = *cp == '.'; + break; + } + } + + if (have_point) + { + getnames[0] = malloc (name_len + 2); + if (getnames[0] == NULL) + goto free_null; + + strcpy (stpcpy (getnames[0], name), "."); + ++pos; + } + } + /* Get the search path, where we have to search "name" */ path = getenv ("NIS_PATH"); if (path == NULL) @@ -148,17 +184,17 @@ nis_getnames (const_nis_name name) else path = strdupa (path); - have_point = (strchr (name, '.') != NULL); + have_point = strchr (name, '.') != NULL; cp = __strtok_r (path, ":", &saveptr); while (cp) { if (strcmp (cp, "$") == 0) { - char *cptr = local_domain; + const char *cptr = local_domain; char *tmp; - while ((have_point && *cptr != '\0') || (count_dots (cptr) >= 2)) + while (*cptr != '\0' && count_dots (cptr) >= 2) { if (pos >= count) { @@ -169,8 +205,7 @@ nis_getnames (const_nis_name name) goto free_null; getnames = newp; } - tmp = malloc (strlen (cptr) + strlen (local_domain) + - strlen (name) + 2); + tmp = malloc (strlen (cptr) + local_domain_len + name_len + 2); if (__builtin_expect (tmp == NULL, 0)) goto free_null; @@ -200,7 +235,7 @@ nis_getnames (const_nis_name name) { char *p; - tmp = malloc (cplen + strlen (local_domain) + strlen (name) + 2); + tmp = malloc (cplen + local_domain_len + name_len + 2); if (__builtin_expect (tmp == NULL, 0)) goto free_null; @@ -216,7 +251,7 @@ nis_getnames (const_nis_name name) { char *p; - tmp = malloc (cplen + strlen (name) + 2); + tmp = malloc (cplen + name_len + 2); if (__builtin_expect (tmp == NULL, 0)) goto free_null; diff -uprN glibc-2.4/nis/nis_table.c glibc-2.5/nis/nis_table.c --- glibc-2.4/nis/nis_table.c 2005-12-08 04:11:05.000000000 +0000 +++ glibc-2.5/nis/nis_table.c 2006-08-07 16:01:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997,1998,1999,2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (c) 1997-1999,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -17,14 +17,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include "nis_xdr.h" #include "nis_intern.h" +#include "libnsl.h" -static struct ib_request * +struct ib_request * __create_ib_request (const_nis_name name, unsigned int flags) { struct ib_request *ibreq = calloc (1, sizeof (struct ib_request)); @@ -41,7 +43,15 @@ __create_ib_request (const_nis_name name /* Not of "[key=value,key=value,...],foo.." format? */ if (cptr[0] != '[') - return (ibreq->ibr_name = strdup (cptr)) == NULL ? NULL : ibreq; + { + ibreq->ibr_name = strdup (cptr); + if (ibreq->ibr_name == NULL) + { + free (ibreq); + return NULL; + } + return ibreq; + } /* "[key=value,...],foo" format */ ibreq->ibr_name = strchr (cptr, ']'); @@ -83,13 +93,13 @@ __create_ib_request (const_nis_name name if (cptr != NULL) *cptr++ = '\0'; - if (!val) + if (__builtin_expect (val == NULL, 0)) { nis_free_request (ibreq); return NULL; } *val++ = '\0'; - if ((search_len + 1) >= size) + if (search_len + 1 >= size) { size += 1; nis_attr *newp = realloc (search_val, size * sizeof (nis_attr)); @@ -98,7 +108,7 @@ __create_ib_request (const_nis_name name search_val = newp; } search_val[search_len].zattr_ndx = strdup (key); - if ((search_val[search_len].zattr_ndx) == NULL) + if (search_val[search_len].zattr_ndx == NULL) goto free_null; search_val[search_len].zattr_val.zattr_val_len = strlen (val) + 1; @@ -117,11 +127,12 @@ __create_ib_request (const_nis_name name return ibreq; } +libnsl_hidden_def (__create_ib_request) static const struct timeval RPCTIMEOUT = {10, 0}; static char * -__get_tablepath (char *name, dir_binding *bptr) +get_tablepath (char *name, dir_binding *bptr) { enum clnt_stat result; nis_result res; @@ -144,8 +155,45 @@ __get_tablepath (char *name, dir_binding else cptr = ""; - return strdup (cptr); + char *str = strdup (cptr); + + if (result == RPC_SUCCESS) + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) &res); + + return str; +} + + +nis_error +__follow_path (char **tablepath, char **tableptr, struct ib_request *ibreq, + dir_binding *bptr) +{ + if (*tablepath == NULL) + { + *tablepath = get_tablepath (ibreq->ibr_name, bptr); + if (*tablepath == NULL) + return NIS_NOMEMORY; + + *tableptr = *tablepath; + } + if (*tableptr == NULL) + return NIS_NOTFOUND; + + char *newname = strsep (tableptr, ":"); + if (newname[0] == '\0') + return NIS_NOTFOUND; + + newname = strdup (newname); + if (newname == NULL) + return NIS_NOMEMORY; + + free (ibreq->ibr_name); + ibreq->ibr_name = newname; + + return NIS_SUCCESS; } +libnsl_hidden_def (__follow_path) + nis_result * nis_list (const_nis_name name, unsigned int flags, @@ -154,7 +202,7 @@ nis_list (const_nis_name name, unsigned const void *userdata), const void *userdata) { - nis_result *res = calloc (1, sizeof (nis_result)); + nis_result *res = malloc (sizeof (nis_result)); ib_request *ibreq; int status; enum clnt_stat clnt_status; @@ -173,14 +221,18 @@ nis_list (const_nis_name name, unsigned if (name == NULL) { - NIS_RES_STATUS (res) = NIS_BADNAME; + status = NIS_BADNAME; + err_out: + memset (res, '\0', sizeof (nis_result)); + NIS_RES_STATUS (res) = status; return res; } - if ((ibreq = __create_ib_request (name, flags)) == NULL) + ibreq = __create_ib_request (name, flags); + if (ibreq == NULL) { - NIS_RES_STATUS (res) = NIS_BADNAME; - return res; + status = NIS_BADNAME; + goto err_out; } if ((flags & EXPAND_NAME) @@ -192,16 +244,16 @@ nis_list (const_nis_name name, unsigned if (names == NULL) { nis_free_request (ibreq); - NIS_RES_STATUS (res) = NIS_BADNAME; - return res; + status = NIS_BADNAME; + goto err_out; } ibreq->ibr_name = strdup (names[name_nr]); if (ibreq->ibr_name == NULL) { nis_freenames (names); nis_free_request (ibreq); - NIS_RES_STATUS (res) = NIS_NOMEMORY; - return res; + status = NIS_NOMEMORY; + goto err_out; } } else @@ -219,7 +271,8 @@ nis_list (const_nis_name name, unsigned memset (res, '\0', sizeof (nis_result)); - status = __nisfind_server (ibreq->ibr_name, &dir); + status = __nisfind_server (ibreq->ibr_name, + ibreq->ibr_srch.ibr_srch_val != NULL, &dir); if (status != NIS_SUCCESS) { NIS_RES_STATUS (res) = status; @@ -228,14 +281,14 @@ nis_list (const_nis_name name, unsigned status = __nisbind_create (&bptr, dir->do_servers.do_servers_val, dir->do_servers.do_servers_len, flags); - if (status != NIS_SUCCESS) + if (__builtin_expect (status != NIS_SUCCESS, 0)) { NIS_RES_STATUS (res) = status; goto fail2; } while (__nisbind_connect (&bptr) != NIS_SUCCESS) - if (__nisbind_next (&bptr) != NIS_SUCCESS) + if (__builtin_expect (__nisbind_next (&bptr) != NIS_SUCCESS, 0)) { NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; goto fail; @@ -243,6 +296,7 @@ nis_list (const_nis_name name, unsigned if (callback != NULL) { + assert (cb == NULL); cb = __nis_create_callback (callback, userdata, flags); ibreq->ibr_cbhost.ibr_cbhost_len = 1; ibreq->ibr_cbhost.ibr_cbhost_val = cb->serv; @@ -254,7 +308,7 @@ nis_list (const_nis_name name, unsigned (xdrproc_t) _xdr_nis_result, (caddr_t) res, RPCTIMEOUT); - if (clnt_status != RPC_SUCCESS) + if (__builtin_expect (clnt_status != RPC_SUCCESS, 0)) NIS_RES_STATUS (res) = NIS_RPCERROR; else switch (NIS_RES_STATUS (res)) @@ -268,7 +322,7 @@ nis_list (const_nis_name name, unsigned free (ibreq->ibr_name); ibreq->ibr_name = NULL; /* If we hit the link limit, bail. */ - if (count_links > NIS_MAXLINKS) + if (__builtin_expect (count_links > NIS_MAXLINKS, 0)) { NIS_RES_STATUS (res) = NIS_LINKNAMEERROR; ++done; @@ -310,69 +364,30 @@ nis_list (const_nis_name name, unsigned following code. But it also would unnecessarily free the result structure. We avoid this here along with the necessary tests. */ -#if 1 xdr_free ((xdrproc_t) _xdr_nis_result, (char *)res); memset (res, '\0', sizeof (*res)); -#else - nis_freeresult (res); - res = calloc (1, sizeof (nis_result)); - if (res == NULL) - goto fail; -#endif first_try = 1; /* Try at first the old binding */ goto again; } else if ((flags & FOLLOW_PATH) && NIS_RES_STATUS (res) == NIS_PARTIAL) { - if (tablepath == NULL) + clnt_status = __follow_path (&tablepath, &tableptr, ibreq, + &bptr); + if (clnt_status != NIS_SUCCESS) { - tablepath = __get_tablepath (ibreq->ibr_name, &bptr); - tableptr = tablepath; - } - if (tableptr == NULL) - { - ++done; - break; - } - free (ibreq->ibr_name); - ibreq->ibr_name = strsep (&tableptr, ":"); - if (ibreq->ibr_name == NULL || ibreq->ibr_name[0] == '\0') - { - ibreq->ibr_name = strdup (""); - if (ibreq->ibr_name == NULL) - { - NIS_RES_STATUS (res) = NIS_NOMEMORY; - goto fail; - } + NIS_RES_STATUS (res) = clnt_status; ++done; } else { - ibreq->ibr_name = strdup (ibreq->ibr_name); /* The following is a non-obvious optimization. A nis_freeresult call would call xdr_free as the following code. But it also would unnecessarily free the result structure. We avoid this here along with the necessary tests. */ -#if 1 - xdr_free ((xdrproc_t) _xdr_nis_result, (char *)res); + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) res); memset (res, '\0', sizeof (*res)); - if (ibreq->ibr_name == NULL) - { - NIS_RES_STATUS (res) = NIS_NOMEMORY; - goto fail; - } -#else - nis_freeresult (res); - res = calloc (1, sizeof (nis_result)); - if (res == NULL || ibreq->ibr_name == NULL) - { - free (res); - res = NULL; - goto fail; - } -#endif first_try = 1; goto again; } @@ -390,30 +405,10 @@ nis_list (const_nis_name name, unsigned ++done; else { - if (tablepath == NULL) - { - tablepath = __get_tablepath (ibreq->ibr_name, &bptr); - tableptr = tablepath; - } - if (tableptr == NULL) - { - ++done; - break; - } - free (ibreq->ibr_name); - ibreq->ibr_name = strsep (&tableptr, ":"); - if (ibreq->ibr_name == NULL || ibreq->ibr_name[0] == '\0') - { - ibreq->ibr_name = strdup (""); - ++done; - } - else - ibreq->ibr_name = strdup (ibreq->ibr_name); - if (ibreq->ibr_name == NULL) - { - NIS_RES_STATUS (res) = NIS_NOMEMORY; - goto fail; - } + NIS_RES_STATUS (res) + = __follow_path (&tablepath, &tableptr, ibreq, &bptr); + if (NIS_RES_STATUS (res) != NIS_SUCCESS) + ++done; } } break; @@ -446,7 +441,7 @@ nis_list (const_nis_name name, unsigned /* Try the next domainname if we don't follow a link. */ free (ibreq->ibr_name); ibreq->ibr_name = NULL; - if (count_links) + if (__builtin_expect (count_links, 0)) { NIS_RES_STATUS (res) = NIS_LINKNAMEERROR; ++done; @@ -497,15 +492,7 @@ libnsl_hidden_def (nis_list) nis_result * nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags) { - nis_object obj; - nis_result *res; - nis_error status; - ib_request *ibreq; - size_t namelen = strlen (name); - char buf1[namelen + 20]; - char buf4[namelen + 20]; - - res = calloc (1, sizeof (nis_result)); + nis_result *res = calloc (1, sizeof (nis_result)); if (res == NULL) return NULL; @@ -515,14 +502,20 @@ nis_add_entry (const_nis_name name, cons return res; } - if ((ibreq = __create_ib_request (name, flags)) == NULL) + ib_request *ibreq = __create_ib_request (name, flags); + if (ibreq == NULL) { NIS_RES_STATUS (res) = NIS_BADNAME; return res; } + nis_object obj; memcpy (&obj, obj2, sizeof (nis_object)); + size_t namelen = strlen (name); + char buf1[namelen + 20]; + char buf4[namelen + 20]; + if (obj.zo_name == NULL || strlen (obj.zo_name) == 0) obj.zo_name = nis_leaf_of_r (name, buf1, sizeof (buf1)); @@ -543,11 +536,12 @@ nis_add_entry (const_nis_name name, cons } ibreq->ibr_obj.ibr_obj_len = 1; - if ((status = __do_niscall (ibreq->ibr_name, NIS_IBADD, - (xdrproc_t) _xdr_ib_request, - (caddr_t) ibreq, - (xdrproc_t) _xdr_nis_result, - (caddr_t) res, 0, NULL)) != NIS_SUCCESS) + nis_error status = __do_niscall (ibreq->ibr_name, NIS_IBADD, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, + (xdrproc_t) _xdr_nis_result, + (caddr_t) res, 0, NULL); + if (__builtin_expect (status != NIS_SUCCESS, 0)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -571,7 +565,8 @@ nis_modify_entry (const_nis_name name, c if (res == NULL) return NULL; - if (( ibreq =__create_ib_request (name, flags)) == NULL) + ibreq = __create_ib_request (name, flags); + if (ibreq == NULL) { NIS_RES_STATUS (res) = NIS_BADNAME; return res; @@ -599,10 +594,11 @@ nis_modify_entry (const_nis_name name, c } ibreq->ibr_obj.ibr_obj_len = 1; - if ((status = __do_niscall (ibreq->ibr_name, NIS_IBMODIFY, - (xdrproc_t) _xdr_ib_request, - (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, - (caddr_t) res, 0, NULL)) != NIS_SUCCESS) + status = __do_niscall (ibreq->ibr_name, NIS_IBMODIFY, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, + (caddr_t) res, 0, NULL); + if (__builtin_expect (status != NIS_SUCCESS, 0)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -628,7 +624,8 @@ nis_remove_entry (const_nis_name name, c return res; } - if ((ibreq =__create_ib_request (name, flags)) == NULL) + ibreq = __create_ib_request (name, flags); + if (ibreq == NULL) { NIS_RES_STATUS (res) = NIS_BADNAME; return res; @@ -686,7 +683,7 @@ nis_first_entry (const_nis_name name) (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (status != NIS_SUCCESS) + if (__builtin_expect (status != NIS_SUCCESS, 0)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -729,7 +726,7 @@ nis_next_entry (const_nis_name name, con (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (status != NIS_SUCCESS) + if (__builtin_expect (status != NIS_SUCCESS, 0)) NIS_RES_STATUS (res) = status; if (cookie != NULL) diff -uprN glibc-2.4/nis/nis_xdr.c glibc-2.5/nis/nis_xdr.c --- glibc-2.4/nis/nis_xdr.c 2005-08-16 16:01:06.000000000 +0000 +++ glibc-2.5/nis/nis_xdr.c 2006-08-08 00:39:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -35,10 +35,16 @@ xdr_nis_attr (XDR *xdrs, nis_attr *objp) return res; } +static __always_inline bool_t +xdr_nis_name (XDR *xdrs, nis_name *objp) +{ + return xdr_string (xdrs, objp, ~0); +} + bool_t _xdr_nis_name (XDR *xdrs, nis_name *objp) { - return xdr_string (xdrs, objp, ~0); + return xdr_nis_name (xdrs, objp); } static __always_inline bool_t @@ -78,7 +84,7 @@ xdr_endpoint (XDR *xdrs, endpoint *objp) bool_t _xdr_nis_server (XDR *xdrs, nis_server *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->name); + bool_t res = xdr_nis_name (xdrs, &objp->name); if (__builtin_expect (res, TRUE)) { res = xdr_array (xdrs, (char **) &objp->ep.ep_val, &objp->ep.ep_len, @@ -96,7 +102,7 @@ _xdr_nis_server (XDR *xdrs, nis_server * bool_t _xdr_directory_obj (XDR *xdrs, directory_obj *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->do_name); + bool_t res = xdr_nis_name (xdrs, &objp->do_name); if (__builtin_expect (res, TRUE)) { res = xdr_nstype (xdrs, &objp->do_type); @@ -161,7 +167,7 @@ xdr_link_obj (XDR *xdrs, link_obj *objp) &objp->li_attrs.li_attrs_len, ~0, sizeof (nis_attr), (xdrproc_t) xdr_nis_attr); if (__builtin_expect (res, TRUE)) - res = _xdr_nis_name (xdrs, &objp->li_name); + res = xdr_nis_name (xdrs, &objp->li_name); } return res; } @@ -245,16 +251,16 @@ _xdr_nis_object (XDR *xdrs, nis_object * bool_t res = xdr_nis_oid (xdrs, &objp->zo_oid); if (__builtin_expect (res, TRUE)) { - res = _xdr_nis_name (xdrs, &objp->zo_name); + res = xdr_nis_name (xdrs, &objp->zo_name); if (__builtin_expect (res, TRUE)) { - res = _xdr_nis_name (xdrs, &objp->zo_owner); + res = xdr_nis_name (xdrs, &objp->zo_owner); if (__builtin_expect (res, TRUE)) { - res = _xdr_nis_name (xdrs, &objp->zo_group); + res = xdr_nis_name (xdrs, &objp->zo_group); if (__builtin_expect (res, TRUE)) { - res = _xdr_nis_name (xdrs, &objp->zo_domain); + res = xdr_nis_name (xdrs, &objp->zo_domain); if (__builtin_expect (res, TRUE)) { res = xdr_u_int (xdrs, &objp->zo_access); @@ -272,16 +278,22 @@ _xdr_nis_object (XDR *xdrs, nis_object * return res; } +static __always_inline bool_t +xdr_nis_error (XDR *xdrs, nis_error *objp) +{ + return xdr_enum (xdrs, (enum_t *) objp); +} + bool_t _xdr_nis_error (XDR *xdrs, nis_error *objp) { - return xdr_enum (xdrs, (enum_t *) objp); + return xdr_nis_error (xdrs, objp); } bool_t _xdr_nis_result (XDR *xdrs, nis_result *objp) { - bool_t res = _xdr_nis_error (xdrs, &objp->status); + bool_t res = xdr_nis_error (xdrs, &objp->status); if (__builtin_expect (res, TRUE)) { res = xdr_array (xdrs, (char **) &objp->objects.objects_val, @@ -308,11 +320,12 @@ _xdr_nis_result (XDR *xdrs, nis_result * } return res; } +libnsl_hidden_def (_xdr_nis_result) bool_t _xdr_ns_request (XDR *xdrs, ns_request *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->ns_name); + bool_t res = xdr_nis_name (xdrs, &objp->ns_name); if (__builtin_expect (res, TRUE)) res = xdr_array (xdrs, (char **) &objp->ns_object.ns_object_val, &objp->ns_object.ns_object_len, 1, @@ -323,7 +336,7 @@ _xdr_ns_request (XDR *xdrs, ns_request * bool_t _xdr_ib_request (XDR *xdrs, ib_request *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->ibr_name); + bool_t res = xdr_nis_name (xdrs, &objp->ibr_name); if (__builtin_expect (res, TRUE)) { res = xdr_array (xdrs, (char **) &objp->ibr_srch.ibr_srch_val, @@ -357,11 +370,12 @@ _xdr_ib_request (XDR *xdrs, ib_request * } return res; } +libnsl_hidden_def (_xdr_ib_request) bool_t _xdr_ping_args (XDR *xdrs, ping_args *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->dir); + bool_t res = xdr_nis_name (xdrs, &objp->dir); if (__builtin_expect (res, TRUE)) res = xdr_uint32_t (xdrs, &objp->stamp); return res; @@ -370,7 +384,7 @@ _xdr_ping_args (XDR *xdrs, ping_args *ob bool_t _xdr_cp_result (XDR *xdrs, cp_result *objp) { - bool_t res = _xdr_nis_error (xdrs, &objp->cp_status); + bool_t res = xdr_nis_error (xdrs, &objp->cp_status); if (__builtin_expect (res, TRUE)) { res = xdr_uint32_t (xdrs, &objp->cp_zticks); @@ -400,19 +414,19 @@ _xdr_nis_taglist (XDR *xdrs, nis_taglist bool_t _xdr_fd_args (XDR *xdrs, fd_args *objp) { - bool_t res = _xdr_nis_name (xdrs, &objp->dir_name); + bool_t res = xdr_nis_name (xdrs, &objp->dir_name); if (__builtin_expect (res, TRUE)) - res = _xdr_nis_name (xdrs, &objp->requester); + res = xdr_nis_name (xdrs, &objp->requester); return res; } bool_t _xdr_fd_result (XDR *xdrs, fd_result *objp) { - bool_t res = _xdr_nis_error (xdrs, &objp->status); + bool_t res = xdr_nis_error (xdrs, &objp->status); if (__builtin_expect (res, TRUE)) { - res = _xdr_nis_name (xdrs, &objp->source); + res = xdr_nis_name (xdrs, &objp->source); if (__builtin_expect (res, TRUE)) { res = xdr_bytes (xdrs, (char **) &objp->dir_data.dir_data_val, @@ -433,6 +447,7 @@ xdr_obj_p (XDR *xdrs, obj_p *objp) return xdr_pointer (xdrs, (char **)objp, sizeof (nis_object), (xdrproc_t)_xdr_nis_object); } +libnsl_hidden_def (xdr_obj_p) bool_t xdr_cback_data (XDR *xdrs, cback_data *objp) @@ -441,3 +456,4 @@ xdr_cback_data (XDR *xdrs, cback_data *o &objp->entries.entries_len, ~0, sizeof (obj_p), (xdrproc_t) xdr_obj_p); } +libnsl_hidden_def (xdr_cback_data) diff -uprN glibc-2.4/nis/nis_xdr.h glibc-2.5/nis/nis_xdr.h --- glibc-2.4/nis/nis_xdr.h 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nis_xdr.h 2006-05-20 19:16:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -22,24 +22,23 @@ #include -__BEGIN_DECLS +extern bool_t _xdr_nis_attr (XDR *, nis_attr*) attribute_hidden; +extern bool_t _xdr_nis_name (XDR *, nis_name*) attribute_hidden; +extern bool_t _xdr_nis_server (XDR *, nis_server*) attribute_hidden; +extern bool_t _xdr_directory_obj (XDR *, directory_obj*) attribute_hidden; +extern bool_t _xdr_nis_object (XDR *, nis_object*) attribute_hidden; +extern bool_t _xdr_nis_error (XDR *, nis_error*) attribute_hidden; +extern bool_t _xdr_ns_request (XDR *, ns_request*) attribute_hidden; +extern bool_t _xdr_ping_args (XDR *, ping_args*) attribute_hidden; +extern bool_t _xdr_cp_result (XDR *, cp_result*) attribute_hidden; +extern bool_t _xdr_nis_tag (XDR *, nis_tag*) attribute_hidden; +extern bool_t _xdr_nis_taglist (XDR *, nis_taglist*) attribute_hidden; +extern bool_t _xdr_fd_args (XDR *, fd_args*) attribute_hidden; +extern bool_t _xdr_fd_result (XDR *, fd_result*) attribute_hidden; -extern bool_t _xdr_nis_attr (XDR *, nis_attr*); -extern bool_t _xdr_nis_name (XDR *, nis_name*); -extern bool_t _xdr_nis_server (XDR *, nis_server*); -extern bool_t _xdr_directory_obj (XDR *, directory_obj*); -extern bool_t _xdr_nis_object (XDR *, nis_object*); -extern bool_t _xdr_nis_error (XDR *, nis_error*); -extern bool_t _xdr_nis_result (XDR *, nis_result*); -extern bool_t _xdr_ns_request (XDR *, ns_request*); extern bool_t _xdr_ib_request (XDR *, ib_request*); -extern bool_t _xdr_ping_args (XDR *, ping_args*); -extern bool_t _xdr_cp_result (XDR *, cp_result*); -extern bool_t _xdr_nis_tag (XDR *, nis_tag*); -extern bool_t _xdr_nis_taglist (XDR *, nis_taglist*); -extern bool_t _xdr_fd_args (XDR *, fd_args*); -extern bool_t _xdr_fd_result (XDR *, fd_result*); - -__END_DECLS +libnsl_hidden_proto (_xdr_ib_request) +extern bool_t _xdr_nis_result (XDR *, nis_result*); +libnsl_hidden_proto (_xdr_nis_result) #endif diff -uprN glibc-2.4/nis/nss glibc-2.5/nis/nss --- glibc-2.4/nis/nss 2004-04-02 09:14:48.000000000 +0000 +++ glibc-2.5/nis/nss 2006-04-28 21:02:23.000000000 +0000 @@ -1,7 +1,7 @@ # /etc/default/nss # This file can theoretically contain a bunch of customization variables -# for Name Service Switch in the GNU C library. For now there are only two -# variables: +# for Name Service Switch in the GNU C library. For now there are only +# three variables: # # NETID_AUTHORITATIVE # If set to TRUE, the initgroups() function will accept the information @@ -18,3 +18,11 @@ # primary service names and service aliases. The system administrator # has to make sure it is correctly generated. #SERVICES_AUTHORITATIVE=TRUE +# +# SETENT_BATCH_READ +# If set to TRUE, various setXXent() functions will read the entire +# database at once and then hand out the requests one by one from +# memory with every getXXent() call. Otherwise each getXXent() call +# might result into a network communication with the server to get +# the next entry. +#SETENT_BATCH_READ=TRUE diff -uprN glibc-2.4/nis/nss_compat/compat-grp.c glibc-2.5/nis/nss_compat/compat-grp.c --- glibc-2.4/nis/nss_compat/compat-grp.c 2005-07-06 21:04:53.000000000 +0000 +++ glibc-2.5/nis/nss_compat/compat-grp.c 2006-07-31 23:33:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999,2001-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001-2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -59,12 +59,13 @@ struct blacklist_t struct ent_t { bool_t files; + enum nss_status setent_status; FILE *stream; struct blacklist_t blacklist; }; typedef struct ent_t ent_t; -static ent_t ext_ent = {TRUE, NULL, {NULL, 0, 0}}; +static ent_t ext_ent = { TRUE, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0 }}; /* Protect global state against multiple changers. */ __libc_lock_define_initialized (static, lock) @@ -89,7 +90,7 @@ init_nss_interface (void) } static enum nss_status -internal_setgrent (ent_t *ent, int stayopen) +internal_setgrent (ent_t *ent, int stayopen, int needent) { enum nss_status status = NSS_STATUS_SUCCESS; @@ -137,8 +138,8 @@ internal_setgrent (ent_t *ent, int stayo else rewind (ent->stream); - if (status == NSS_STATUS_SUCCESS && nss_setgrent) - return nss_setgrent (stayopen); + if (needent && status == NSS_STATUS_SUCCESS && nss_setgrent) + ent->setent_status = nss_setgrent (stayopen); return status; } @@ -154,7 +155,7 @@ _nss_compat_setgrent (int stayopen) if (ni == NULL) init_nss_interface (); - result = internal_setgrent (&ext_ent, stayopen); + result = internal_setgrent (&ext_ent, stayopen, 1); __libc_lock_unlock (lock); @@ -208,6 +209,10 @@ getgrent_next_nss (struct group *result, if (!nss_getgrent_r) return NSS_STATUS_UNAVAIL; + /* If the setgrent call failed, say so. */ + if (ent->setent_status != NSS_STATUS_SUCCESS) + return ent->setent_status; + do { enum nss_status status; @@ -359,7 +364,7 @@ _nss_compat_getgrent_r (struct group *gr init_nss_interface (); if (ext_ent.stream == NULL) - result = internal_setgrent (&ext_ent, 1); + result = internal_setgrent (&ext_ent, 1, 1); if (result == NSS_STATUS_SUCCESS) { @@ -481,7 +486,7 @@ enum nss_status _nss_compat_getgrnam_r (const char *name, struct group *grp, char *buffer, size_t buflen, int *errnop) { - ent_t ent = {TRUE, NULL, {NULL, 0, 0}}; + ent_t ent = { TRUE, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0 }}; enum nss_status result; if (name[0] == '-' || name[0] == '+') @@ -494,7 +499,7 @@ _nss_compat_getgrnam_r (const char *name __libc_lock_unlock (lock); - result = internal_setgrent (&ent, 0); + result = internal_setgrent (&ent, 0, 0); if (result == NSS_STATUS_SUCCESS) result = internal_getgrnam_r (name, grp, &ent, buffer, buflen, errnop); @@ -609,7 +614,7 @@ enum nss_status _nss_compat_getgrgid_r (gid_t gid, struct group *grp, char *buffer, size_t buflen, int *errnop) { - ent_t ent = {TRUE, NULL, {NULL, 0, 0}}; + ent_t ent = { TRUE, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0 }}; enum nss_status result; __libc_lock_lock (lock); @@ -619,7 +624,7 @@ _nss_compat_getgrgid_r (gid_t gid, struc __libc_lock_unlock (lock); - result = internal_setgrent (&ent, 0); + result = internal_setgrent (&ent, 0, 0); if (result == NSS_STATUS_SUCCESS) result = internal_getgrgid_r (gid, grp, &ent, buffer, buflen, errnop); diff -uprN glibc-2.4/nis/nss_compat/compat-initgroups.c glibc-2.5/nis/nss_compat/compat-initgroups.c --- glibc-2.4/nis/nss_compat/compat-initgroups.c 2004-09-12 20:38:05.000000000 +0000 +++ glibc-2.5/nis/nss_compat/compat-initgroups.c 2006-05-18 14:51:45.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -36,7 +36,6 @@ static service_user *ni; static enum nss_status (*nss_initgroups_dyn) (const char *, gid_t, long int *, long int *, gid_t **, long int, int *); -static enum nss_status (*nss_setgrent) (int stayopen); static enum nss_status (*nss_getgrnam_r) (const char *name, struct group * grp, char *buffer, size_t buflen, int *errnop); @@ -45,7 +44,6 @@ static enum nss_status (*nss_getgrgid_r) int *errnop); static enum nss_status (*nss_getgrent_r) (struct group * grp, char *buffer, size_t buflen, int *errnop); -static enum nss_status (*nss_endgrent) (void); /* Protect global state against multiple changers. */ __libc_lock_define_initialized (static, lock) @@ -92,11 +90,9 @@ init_nss_interface (void) && __nss_database_lookup ("group_compat", NULL, "nis", &ni) >= 0) { nss_initgroups_dyn = __nss_lookup_function (ni, "initgroups_dyn"); - nss_setgrent = __nss_lookup_function (ni, "setgrent"); nss_getgrnam_r = __nss_lookup_function (ni, "getgrnam_r"); nss_getgrgid_r = __nss_lookup_function (ni, "getgrgid_r"); nss_getgrent_r = __nss_lookup_function (ni, "getgrent_r"); - nss_endgrent = __nss_lookup_function (ni, "endgrent"); } __libc_lock_unlock (lock); diff -uprN glibc-2.4/nis/nss_compat/compat-pwd.c glibc-2.5/nis/nss_compat/compat-pwd.c --- glibc-2.4/nis/nss_compat/compat-pwd.c 2005-07-06 21:03:32.000000000 +0000 +++ glibc-2.5/nis/nss_compat/compat-pwd.c 2006-07-31 23:33:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999,2001-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001-2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -62,9 +62,10 @@ struct blacklist_t struct ent_t { - bool_t netgroup; - bool_t first; - bool_t files; + bool netgroup; + bool first; + bool files; + enum nss_status setent_status; FILE *stream; struct blacklist_t blacklist; struct passwd pwd; @@ -72,8 +73,9 @@ struct ent_t }; typedef struct ent_t ent_t; -static ent_t ext_ent = {0, 0, TRUE, NULL, {NULL, 0, 0}, - {NULL, NULL, 0, 0, NULL, NULL, NULL}}; +static ent_t ext_ent = { false, false, true, NSS_STATUS_SUCCESS, NULL, + { NULL, 0, 0 }, + { NULL, NULL, 0, 0, NULL, NULL, NULL }}; /* Protect global state against multiple changers. */ __libc_lock_define_initialized (static, lock) @@ -202,12 +204,13 @@ copy_pwd_changes (struct passwd *dest, s } static enum nss_status -internal_setpwent (ent_t *ent, int stayopen) +internal_setpwent (ent_t *ent, int stayopen, int needent) { enum nss_status status = NSS_STATUS_SUCCESS; - ent->first = ent->netgroup = FALSE; - ent->files = TRUE; + ent->first = ent->netgroup = false; + ent->files = true; + ent->setent_status = NSS_STATUS_SUCCESS; /* If something was left over free it. */ if (ent->netgroup) @@ -257,8 +260,8 @@ internal_setpwent (ent_t *ent, int stayo give_pwd_free (&ent->pwd); - if (status == NSS_STATUS_SUCCESS && nss_setpwent) - return nss_setpwent (stayopen); + if (needent && status == NSS_STATUS_SUCCESS && nss_setpwent) + ent->setent_status = nss_setpwent (stayopen); return status; } @@ -274,7 +277,7 @@ _nss_compat_setpwent (int stayopen) if (ni == NULL) init_nss_interface (); - result = internal_setpwent (&ext_ent, stayopen); + result = internal_setpwent (&ext_ent, stayopen, 1); __libc_lock_unlock (lock); @@ -297,7 +300,7 @@ internal_endpwent (ent_t *ent) if (ent->netgroup) __internal_endnetgrent (&ent->netgrdata); - ent->first = ent->netgroup = FALSE; + ent->first = ent->netgroup = false; if (ent->blacklist.data != NULL) { @@ -344,17 +347,17 @@ getpwent_next_nss_netgr (const char *nam if (yp_get_default_domain (&curdomain) != YPERR_SUCCESS) { - ent->netgroup = FALSE; - ent->first = FALSE; + ent->netgroup = false; + ent->first = false; give_pwd_free (&ent->pwd); return NSS_STATUS_UNAVAIL; } - if (ent->first == TRUE) + if (ent->first == true) { memset (&ent->netgrdata, 0, sizeof (struct __netgrent)); __internal_setnetgrent (group, &ent->netgrdata); - ent->first = FALSE; + ent->first = false; } while (1) @@ -423,6 +426,10 @@ getpwent_next_nss (struct passwd *result if (!nss_getpwent_r) return NSS_STATUS_UNAVAIL; + /* If the setpwent call failed, say so. */ + if (ent->setent_status != NSS_STATUS_SUCCESS) + return ent->setent_status; + p2len = pwd_need_buflen (&ent->pwd); if (p2len > buflen) { @@ -433,7 +440,7 @@ getpwent_next_nss (struct passwd *result buflen -= p2len; if (ent->first) - ent->first = FALSE; + ent->first = false; do { @@ -566,8 +573,8 @@ getpwent_next_file (struct passwd *resul { enum nss_status status; - ent->netgroup = TRUE; - ent->first = TRUE; + ent->netgroup = true; + ent->first = true; copy_pwd_changes (&ent->pwd, result, NULL, 0); status = getpwent_next_nss_netgr (NULL, result, ent, @@ -622,8 +629,8 @@ getpwent_next_file (struct passwd *resul /* +:... */ if (result->pw_name[0] == '+' && result->pw_name[1] == '\0') { - ent->files = FALSE; - ent->first = TRUE; + ent->files = false; + ent->first = true; copy_pwd_changes (&ent->pwd, result, NULL, 0); return getpwent_next_nss (result, ent, buffer, buflen, errnop); @@ -671,7 +678,7 @@ _nss_compat_getpwent_r (struct passwd *p init_nss_interface (); if (ext_ent.stream == NULL) - result = internal_setpwent (&ext_ent, 1); + result = internal_setpwent (&ext_ent, 1, 1); if (result == NSS_STATUS_SUCCESS) result = internal_getpwent_r (pwd, &ext_ent, buffer, buflen, errnop); @@ -823,8 +830,8 @@ _nss_compat_getpwnam_r (const char *name char *buffer, size_t buflen, int *errnop) { enum nss_status result; - ent_t ent = {0, 0, TRUE, NULL, {NULL, 0, 0}, - {NULL, NULL, 0, 0, NULL, NULL, NULL}}; + ent_t ent = { false, false, true, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0 }, + { NULL, NULL, 0, 0, NULL, NULL, NULL }}; if (name[0] == '-' || name[0] == '+') return NSS_STATUS_NOTFOUND; @@ -836,7 +843,7 @@ _nss_compat_getpwnam_r (const char *name __libc_lock_unlock (lock); - result = internal_setpwent (&ent, 0); + result = internal_setpwent (&ent, 0, 0); if (result == NSS_STATUS_SUCCESS) result = internal_getpwnam_r (name, pwd, &ent, buffer, buflen, errnop); @@ -1065,8 +1072,8 @@ _nss_compat_getpwuid_r (uid_t uid, struc char *buffer, size_t buflen, int *errnop) { enum nss_status result; - ent_t ent = {0, 0, TRUE, NULL, {NULL, 0, 0}, - {NULL, NULL, 0, 0, NULL, NULL, NULL}}; + ent_t ent = { false, false, true, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0 }, + { NULL, NULL, 0, 0, NULL, NULL, NULL }}; __libc_lock_lock (lock); @@ -1075,7 +1082,7 @@ _nss_compat_getpwuid_r (uid_t uid, struc __libc_lock_unlock (lock); - result = internal_setpwent (&ent, 0); + result = internal_setpwent (&ent, 0, 0); if (result == NSS_STATUS_SUCCESS) result = internal_getpwuid_r (uid, pwd, &ent, buffer, buflen, errnop); @@ -1132,7 +1139,7 @@ blacklist_store_name (const char *name, return; } -/* returns TRUE if ent->blacklist contains name, else FALSE */ +/* Returns TRUE if ent->blacklist contains name, else FALSE. */ static bool_t in_blacklist (const char *name, int namelen, ent_t *ent) { diff -uprN glibc-2.4/nis/nss_compat/compat-spwd.c glibc-2.5/nis/nss_compat/compat-spwd.c --- glibc-2.4/nis/nss_compat/compat-spwd.c 2005-07-06 21:02:30.000000000 +0000 +++ glibc-2.5/nis/nss_compat/compat-spwd.c 2006-07-31 23:33:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999,2001-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001-2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -59,9 +59,10 @@ struct blacklist_t struct ent_t { - bool_t netgroup; - bool_t files; - bool_t first; + bool netgroup; + bool files; + bool first; + enum nss_status setent_status; FILE *stream; struct blacklist_t blacklist; struct spwd pwd; @@ -69,8 +70,9 @@ struct ent_t }; typedef struct ent_t ent_t; -static ent_t ext_ent = {0, TRUE, 0, NULL, {NULL, 0, 0}, - {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}}; +static ent_t ext_ent = { false, true, false, NSS_STATUS_SUCCESS, NULL, + { NULL, 0, 0}, + { NULL, NULL, 0, 0, 0, 0, 0, 0, 0}}; /* Protect global state against multiple changers. */ __libc_lock_define_initialized (static, lock) @@ -161,7 +163,7 @@ internal_setspent (ent_t *ent, int stayo enum nss_status status = NSS_STATUS_SUCCESS; ent->first = ent->netgroup = 0; - ent->files = TRUE; + ent->files = true; /* If something was left over free it. */ if (ent->netgroup) @@ -212,7 +214,7 @@ internal_setspent (ent_t *ent, int stayo give_spwd_free (&ent->pwd); if (status == NSS_STATUS_SUCCESS && nss_setspent) - return nss_setspent (stayopen); + ent->setent_status = nss_setspent (stayopen); return status; } @@ -251,8 +253,8 @@ internal_endspent (ent_t *ent) if (ent->netgroup) __internal_endnetgrent (&ent->netgrdata); - ent->first = ent->netgroup = FALSE; - ent->files = TRUE; + ent->first = ent->netgroup = false; + ent->files = true; if (ent->blacklist.data != NULL) { @@ -294,19 +296,23 @@ getspent_next_nss_netgr (const char *nam if (!nss_getspnam_r) return NSS_STATUS_UNAVAIL; + /* If the setpwent call failed, say so. */ + if (ent->setent_status != NSS_STATUS_SUCCESS) + return ent->setent_status; + if (yp_get_default_domain (&curdomain) != YPERR_SUCCESS) { - ent->netgroup = FALSE; - ent->first = FALSE; + ent->netgroup = false; + ent->first = false; give_spwd_free (&ent->pwd); return NSS_STATUS_UNAVAIL; } - if (ent->first == TRUE) + if (ent->first == true) { memset (&ent->netgrdata, 0, sizeof (struct __netgrent)); __internal_setnetgrent (group, &ent->netgrdata); - ent->first = FALSE; + ent->first = false; } while (1) @@ -321,7 +327,7 @@ getspent_next_nss_netgr (const char *nam if (status != 1) { __internal_endnetgrent (&ent->netgrdata); - ent->netgroup = FALSE; + ent->netgroup = false; give_spwd_free (&ent->pwd); return NSS_STATUS_RETURN; } @@ -396,6 +402,7 @@ getspent_next_nss (struct spwd *result, return NSS_STATUS_SUCCESS; } + /* This function handle the +user entrys in /etc/shadow */ static enum nss_status getspnam_plususer (const char *name, struct spwd *result, ent_t *ent, @@ -436,6 +443,7 @@ getspnam_plususer (const char *name, str return NSS_STATUS_SUCCESS; } + static enum nss_status getspent_next_file (struct spwd *result, ent_t *ent, char *buffer, size_t buflen, int *errnop) @@ -516,8 +524,8 @@ getspent_next_file (struct spwd *result, { int status; - ent->netgroup = TRUE; - ent->first = TRUE; + ent->netgroup = true; + ent->first = true; copy_spwd_changes (&ent->pwd, result, NULL, 0); status = getspent_next_nss_netgr (NULL, result, ent, @@ -573,8 +581,8 @@ getspent_next_file (struct spwd *result, /* +:... */ if (result->sp_namp[0] == '+' && result->sp_namp[1] == '\0') { - ent->files = FALSE; - ent->first = TRUE; + ent->files = false; + ent->first = true; copy_spwd_changes (&ent->pwd, result, NULL, 0); return getspent_next_nss (result, ent, buffer, buflen, errnop); @@ -609,6 +617,7 @@ internal_getspent_r (struct spwd *pw, en return getspent_next_nss (pw, ent, buffer, buflen, errnop); } + enum nss_status _nss_compat_getspent_r (struct spwd *pwd, char *buffer, size_t buflen, int *errnop) @@ -632,6 +641,7 @@ _nss_compat_getspent_r (struct spwd *pwd return result; } + /* Searches in /etc/passwd and the NIS/NIS+ map for a special user */ static enum nss_status internal_getspnam_r (const char *name, struct spwd *result, ent_t *ent, @@ -774,13 +784,14 @@ internal_getspnam_r (const char *name, s return NSS_STATUS_SUCCESS; } + enum nss_status _nss_compat_getspnam_r (const char *name, struct spwd *pwd, char *buffer, size_t buflen, int *errnop) { enum nss_status result; - ent_t ent = {0, TRUE, 0, NULL, {NULL, 0, 0}, - {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}}; + ent_t ent = { false, true, false, NSS_STATUS_SUCCESS, NULL, { NULL, 0, 0}, + { NULL, NULL, 0, 0, 0, 0, 0, 0, 0}}; if (name[0] == '-' || name[0] == '+') return NSS_STATUS_NOTFOUND; @@ -802,6 +813,7 @@ _nss_compat_getspnam_r (const char *name return result; } + /* Support routines for remembering -@netgroup and -user entries. The names are stored in a single string with `|' as separator. */ static void @@ -848,6 +860,7 @@ blacklist_store_name (const char *name, return; } + /* Returns TRUE if ent->blacklist contains name, else FALSE. */ static bool_t in_blacklist (const char *name, int namelen, ent_t *ent) @@ -856,7 +869,7 @@ in_blacklist (const char *name, int name char *cp; if (ent->blacklist.data == NULL) - return FALSE; + return false; buf[0] = '|'; cp = stpcpy (&buf[1], name); diff -uprN glibc-2.4/nis/nss-default.c glibc-2.5/nis/nss-default.c --- glibc-2.4/nis/nss-default.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nis/nss-default.c 2006-04-28 21:03:17.000000000 +0000 @@ -0,0 +1,124 @@ +/* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include + +#include + + +/* Path of the file. */ +static const char default_nss[] = "/etc/default/nss"; + +/* Flags once read from the file. */ +static int default_nss_flags; + +/* Code to make sure we call 'init' once. */ +__libc_once_define (static, once); + +/* Table of the recognized variables. */ +static const struct +{ + char name[23]; + unsigned int len; + int flag; +} vars[] = + { +#define STRNLEN(s) s, sizeof (s) - 1 + { STRNLEN ("NETID_AUTHORITATIVE"), NSS_FLAG_NETID_AUTHORITATIVE }, + { STRNLEN ("SERVICES_AUTHORITATIVE"), NSS_FLAG_SERVICES_AUTHORITATIVE }, + { STRNLEN ("SETENT_BATCH_READ"), NSS_FLAG_SETENT_BATCH_READ } + }; +#define nvars (sizeof (vars) / sizeof (vars[0])) + + +static void +init (void) +{ + FILE *fp = fopen (default_nss, "rc"); + if (fp != NULL) + { + char *line = NULL; + size_t linelen = 0; + + __fsetlocking (fp, FSETLOCKING_BYCALLER); + + while (!feof_unlocked (fp)) + { + ssize_t n = getline (&line, &linelen, fp); + if (n <= 0) + break; + + /* Recognize only + + = TRUE + + with arbitrary white spaces. */ + char *cp = line; + while (isspace (*cp)) + ++cp; + + /* Recognize comment lines. */ + if (*cp == '#') + continue; + + int idx; + for (idx = 0; idx < nvars; ++idx) + if (strncmp (cp, vars[idx].name, vars[idx].len) == 0) + break; + if (idx == nvars) + continue; + + cp += vars[idx].len; + while (isspace (*cp)) + ++cp; + if (*cp++ != '=') + continue; + while (isspace (*cp)) + ++cp; + + if (strncmp (cp, "TRUE", 4) != 0) + continue; + cp += 4; + + while (isspace (*cp)) + ++cp; + + if (*cp == '\0') + default_nss_flags |= vars[idx].flag; + } + + free (line); + + fclose (fp); + } +} + + +int +_nsl_default_nss (void) +{ + /* If we have not yet read the file yet do it now. */ + __libc_once (once, init); + + return default_nss_flags; +} diff -uprN glibc-2.4/nis/nss_nis/nis-alias.c glibc-2.5/nis/nss_nis/nis-alias.c --- glibc-2.4/nis/nss_nis/nis-alias.c 2003-03-16 03:36:21.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-alias.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -125,52 +125,53 @@ internal_nis_getaliasent_r (struct alias size_t buflen, int *errnop) { char *domain; - char *result; - int len; - char *outkey; - int keylen; - char *p; - int parse_res; - if (yp_get_default_domain (&domain)) + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; alias->alias_local = 0; /* Get the next entry until we found a correct one. */ + int parse_res; do { - enum nss_status retval; + char *result; + int len; + char *outkey; + int keylen; + int yperr; if (new_start) - retval = yperr2nss (yp_first (domain, "mail.aliases", - &outkey, &keylen, &result, &len)); + yperr = yp_first (domain, "mail.aliases", &outkey, &keylen, &result, + &len); else - retval = yperr2nss ( yp_next (domain, "mail.aliases", oldkey, - oldkeylen, &outkey, &keylen, - &result, &len)); - if (retval != NSS_STATUS_SUCCESS) + yperr = yp_next (domain, "mail.aliases", oldkey, oldkeylen, &outkey, + &keylen, &result, &len); + + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_nis_parse_aliasent (outkey, p, alias, buffer, buflen, - errnop); - if (parse_res == -1) + parse_res = _nss_nis_parse_aliasent (outkey, p, alias, buffer, + buflen, errnop); + if (__builtin_expect (parse_res == -1, 0)) { free (outkey); *errnop = ERANGE; @@ -206,56 +207,55 @@ enum nss_status _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias, char *buffer, size_t buflen, int *errnop) { - enum nss_status retval; - int parse_res; - char *domain; - char *result; - int len; - char *p; - size_t namlen = strlen (name); - char name2[namlen + 1]; - size_t i; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + size_t namlen = strlen (name); + char name2[namlen + 1]; + + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* Convert name to lowercase. */ + size_t i; for (i = 0; i < namlen; ++i) name2[i] = _tolower (name[i]); name2[i] = '\0'; - retval = yperr2nss (yp_match (domain, "mail.aliases", name2, namlen, - &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "mail.aliases", name2, namlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); alias->alias_local = 0; - parse_res = _nss_nis_parse_aliasent (name, p, alias, buffer, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_nis_parse_aliasent (name, p, alias, buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-ethers.c glibc-2.5/nis/nss_nis/nis-ethers.c --- glibc-2.4/nis/nss_nis/nis-ethers.c 2004-04-02 15:09:32.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-ethers.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -182,45 +182,46 @@ enum nss_status _nss_nis_gethostton_r (const char *name, struct etherent *eth, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - retval = yperr2nss (yp_match (domain, "ethers.byname", name, - strlen (name), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "ethers.byname", name, strlen (name), &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_etherent (p, eth, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; @@ -234,54 +235,54 @@ enum nss_status _nss_nis_getntohost_r (const struct ether_addr *addr, struct etherent *eth, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, nlen, parse_res; - char buf[33]; - if (addr == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - nlen = sprintf (buf, "%x:%x:%x:%x:%x:%x", - (int) addr->ether_addr_octet[0], - (int) addr->ether_addr_octet[1], - (int) addr->ether_addr_octet[2], - (int) addr->ether_addr_octet[3], - (int) addr->ether_addr_octet[4], - (int) addr->ether_addr_octet[5]); - - retval = yperr2nss (yp_match (domain, "ethers.byaddr", buf, - nlen, &result, &len)); + char buf[33]; + int nlen = snprintf (buf, sizeof (buf), "%x:%x:%x:%x:%x:%x", + (int) addr->ether_addr_octet[0], + (int) addr->ether_addr_octet[1], + (int) addr->ether_addr_octet[2], + (int) addr->ether_addr_octet[3], + (int) addr->ether_addr_octet[4], + (int) addr->ether_addr_octet[5]); + + char *result; + int len; + int yperr = yp_match (domain, "ethers.byaddr", buf, nlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_etherent (p, eth, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-grp.c glibc-2.5/nis/nss_nis/nis-grp.c --- glibc-2.4/nis/nss_nis/nis-grp.c 2004-03-29 20:02:41.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-grp.c 2006-05-01 22:22:09.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2001-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2001-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -17,20 +17,17 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -/* The following is an ugly trick to avoid a prototype declaration for - _nss_nis_endgrent. */ -#define _nss_nis_endgrent _nss_nis_endgrent_XXX -#include -#undef _nss_nis_endgrent #include #include +#include +#include #include #include #include #include #include "nss-nis.h" +#include /* Get the declaration of the parser function. */ #define ENTNAME grent @@ -44,12 +41,12 @@ __libc_lock_define_initialized (static, static bool_t new_start = 1; static char *oldkey; static int oldkeylen; +static intern_t intern; -enum nss_status -_nss_nis_setgrent (int stayopen) -{ - __libc_lock_lock (lock); +static void +internal_nis_endgrent (void) +{ new_start = 1; if (oldkey != NULL) { @@ -58,72 +55,186 @@ _nss_nis_setgrent (int stayopen) oldkeylen = 0; } + struct response_t *curr = intern.next; + + while (curr != NULL) + { + struct response_t *last = curr; + curr = curr->next; + free (last); + } + + intern.next = intern.start = NULL; +} + + +enum nss_status +_nss_nis_endgrent (void) +{ + __libc_lock_lock (lock); + + internal_nis_endgrent (); + __libc_lock_unlock (lock); return NSS_STATUS_SUCCESS; } -/* Make _nss_nis_endgrent an alias of _nss_nis_setgrent. We do this - even though the prototypes don't match. The argument of setgrent - is not used so this makes no difference. */ -strong_alias (_nss_nis_setgrent, _nss_nis_endgrent) + + +enum nss_status +internal_nis_setgrent (void) +{ + /* We have to read all the data now. */ + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) + return NSS_STATUS_UNAVAIL; + + struct ypall_callback ypcb; + + ypcb.foreach = _nis_saveit; + ypcb.data = (char *) &intern; + enum nss_status status = yperr2nss (yp_all (domain, "group.byname", &ypcb)); + + + /* Mark the last buffer as full. */ + if (intern.next != NULL) + intern.next->size = intern.offset; + + intern.next = intern.start; + intern.offset = 0; + + return status; +} + + +enum nss_status +_nss_nis_setgrent (int stayopen) +{ + enum nss_status result = NSS_STATUS_SUCCESS; + + __libc_lock_lock (lock); + + internal_nis_endgrent (); + + if (_nsl_default_nss () & NSS_FLAG_SETENT_BATCH_READ) + result = internal_nis_setgrent (); + + __libc_lock_unlock (lock); + + return result; +} + static enum nss_status internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - char *domain, *result, *outkey; - int len, keylen, parse_res; + /* If we read the entire database at setpwent time we just iterate + over the data we have in memory. */ + bool batch_read = intern.start != NULL; - if (yp_get_default_domain (&domain)) + char *domain = NULL; + if (!batch_read && __builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* Get the next entry until we found a correct one. */ + int parse_res; do { - enum nss_status retval; - char *p; + char *result; + char *outkey; + int len; + int keylen; + + if (batch_read) + { + struct response_t *bucket; + + handle_batch_read: + bucket = intern.next; + + if (__builtin_expect (intern.offset >= bucket->size, 0)) + { + if (bucket->next == NULL) + return NSS_STATUS_NOTFOUND; + + /* We look at all the content in the current bucket. Go on + to the next. */ + bucket = intern.next = bucket->next; + intern.offset = 0; + } + + for (result = &bucket->mem[intern.offset]; isspace (*result); + ++result) + ++intern.offset; - if (new_start) - retval = yperr2nss (yp_first (domain, "group.byname", - &outkey, &keylen, &result, &len)); + len = strlen (result); + } else - retval = yperr2nss ( yp_next (domain, "group.byname", - oldkey, oldkeylen, - &outkey, &keylen, &result, &len)); + { + int yperr; - if (retval != NSS_STATUS_SUCCESS) - { - if (retval == NSS_STATUS_TRYAGAIN) - *errnop = errno; - return retval; - } + if (new_start) + { + /* Maybe we should read the database in one piece. */ + if ((_nsl_default_nss () & NSS_FLAG_SETENT_BATCH_READ) + && internal_nis_setgrent () == NSS_STATUS_SUCCESS + && intern.start != NULL) + { + batch_read = true; + goto handle_batch_read; + } + + yperr = yp_first (domain, "group.byname", &outkey, &keylen, + &result, &len); + } + else + yperr = yp_next (domain, "group.byname", oldkey, oldkeylen, + &outkey, &keylen, &result, &len); + + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) + { + enum nss_status retval = yperr2nss (yperr); + + if (retval == NSS_STATUS_TRYAGAIN) + *errnop = errno; + return retval; + } + } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; - free (result); + if (!batch_read) + free (result); - parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop); - if (parse_res == -1) + parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res == -1, 0)) { - free (outkey); + if (!batch_read) + free (outkey); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - free (oldkey); - oldkey = outkey; - oldkeylen = keylen; - new_start = 0; + if (batch_read) + intern.offset += len + 1; + else + { + free (oldkey); + oldkey = outkey; + oldkeylen = keylen; + new_start = 0; + } } while (parse_res < 1); @@ -149,45 +260,46 @@ enum nss_status _nss_nis_getgrnam_r (const char *name, struct group *grp, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - retval = yperr2nss (yp_match (domain, "group.byname", name, - strlen (name), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "group.byname", name, strlen (name), &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; @@ -201,42 +313,42 @@ enum nss_status _nss_nis_getgrgid_r (gid_t gid, struct group *grp, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, nlen, parse_res; - char buf[32]; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - nlen = sprintf (buf, "%lu", (unsigned long int) gid); + char buf[32]; + int nlen = sprintf (buf, "%lu", (unsigned long int) gid); - retval = yperr2nss (yp_match (domain, "group.bygid", buf, - nlen, &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "group.bygid", buf, nlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-hosts.c glibc-2.5/nis/nss_nis/nis-hosts.c --- glibc-2.4/nis/nss_nis/nis-hosts.c 2003-03-16 03:36:21.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-hosts.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -131,17 +131,11 @@ internal_nis_gethostent_r (struct hosten int af, int flags) { char *domain; - char *result; - int len, parse_res; - char *outkey; - int keylen; - struct parser_data *data = (void *) buffer; - size_t linebuflen = buffer + buflen - data->linebuffer; - - if (yp_get_default_domain (&domain)) + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - if (buflen < sizeof *data + 1) + struct parser_data *data = (void *) buffer; + if (__builtin_expect (buflen < sizeof *data + 1, 0)) { *errnop = ERANGE; *h_errnop = NETDB_INTERNAL; @@ -149,21 +143,26 @@ internal_nis_gethostent_r (struct hosten } /* Get the next entry until we found a correct one. */ + const size_t linebuflen = buffer + buflen - data->linebuffer; + int parse_res; do { - enum nss_status retval; - char *p; - + char *result; + int len; + char *outkey; + int keylen; + int yperr; if (new_start) - retval = yperr2nss (yp_first (domain, "hosts.byname", - &outkey, &keylen, &result, &len)); + yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result, + &len); else - retval = yperr2nss ( yp_next (domain, "hosts.byname", - oldkey, oldkeylen, - &outkey, &keylen, &result, &len)); + yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey, + &keylen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + switch (retval) { case NSS_STATUS_TRYAGAIN: @@ -180,7 +179,7 @@ internal_nis_gethostent_r (struct hosten return retval; } - if ((size_t) (len + 1) > linebuflen) + if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0)) { free (result); *h_errnop = NETDB_INTERNAL; @@ -188,14 +187,14 @@ internal_nis_gethostent_r (struct hosten return NSS_STATUS_TRYAGAIN; } - p = strncpy (data->linebuffer, result, len); + char *p = strncpy (data->linebuffer, result, len); data->linebuffer[len] = '\0'; while (isspace (*p)) ++p; free (result); parse_res = parse_line (p, host, data, buflen, errnop, af, flags); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) { free (outkey); *h_errnop = NETDB_INTERNAL; @@ -235,11 +234,7 @@ internal_gethostbyname2_r (const char *n char *buffer, size_t buflen, int *errnop, int *h_errnop, int flags) { - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; struct parser_data *data = (void *) buffer; - size_t linebuflen = buffer + buflen - data->linebuffer; if (name == NULL) { @@ -247,6 +242,7 @@ internal_gethostbyname2_r (const char *n return NSS_STATUS_UNAVAIL; } + char *domain; if (yp_get_default_domain (&domain)) return NSS_STATUS_UNAVAIL; @@ -256,24 +252,24 @@ internal_gethostbyname2_r (const char *n *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - else - { - /* Convert name to lowercase. */ - size_t namlen = strlen (name); - char name2[namlen + 1]; - size_t i; - - for (i = 0; i < namlen; ++i) - name2[i] = tolower (name[i]); - name2[i] = '\0'; - retval = yperr2nss (yp_match (domain, "hosts.byname", name2, - namlen, &result, &len)); + /* Convert name to lowercase. */ + size_t namlen = strlen (name); + char name2[namlen + 1]; + size_t i; + + for (i = 0; i < namlen; ++i) + name2[i] = tolower (name[i]); + name2[i] = '\0'; - } + char *result; + int len; + int yperr = yp_match (domain, "hosts.byname", name2, namlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) { *h_errnop = TRY_AGAIN; @@ -284,7 +280,8 @@ internal_gethostbyname2_r (const char *n return retval; } - if ((size_t) (len + 1) > linebuflen) + const size_t linebuflen = buffer + buflen - data->linebuffer; + if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0)) { free (result); *h_errnop = NETDB_INTERNAL; @@ -292,15 +289,15 @@ internal_gethostbyname2_r (const char *n return NSS_STATUS_TRYAGAIN; } - p = strncpy (data->linebuffer, result, len); + char *p = strncpy (data->linebuffer, result, len); data->linebuffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = parse_line (p, host, data, buflen, errnop, af, flags); + int parse_res = parse_line (p, host, data, buflen, errnop, af, flags); - if (parse_res < 1 || host->h_addrtype != af) + if (__builtin_expect (parse_res < 1 || host->h_addrtype != af, 0)) { if (parse_res == -1) { @@ -351,42 +348,42 @@ _nss_nis_gethostbyaddr_r (const void *ad struct hostent *host, char *buffer, size_t buflen, int *errnop, int *h_errnop) { - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; - char *buf; - struct parser_data *data = (void *) buffer; - size_t linebuflen = buffer + buflen - data->linebuffer; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - if (buflen < sizeof *data + 1) + struct parser_data *data = (void *) buffer; + if (__builtin_expect (buflen < sizeof *data + 1, 0)) { *errnop = ERANGE; *h_errnop = NETDB_INTERNAL; return NSS_STATUS_TRYAGAIN; } - buf = inet_ntoa (*(const struct in_addr *) addr); + char *buf = inet_ntoa (*(const struct in_addr *) addr); - retval = yperr2nss (yp_match (domain, "hosts.byaddr", buf, - strlen (buf), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "hosts.byaddr", buf, strlen (buf), &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) { *h_errnop = TRY_AGAIN; *errnop = errno; } - if (retval == NSS_STATUS_NOTFOUND) + else if (retval == NSS_STATUS_NOTFOUND) *h_errnop = HOST_NOT_FOUND; return retval; } - if ((size_t) (len + 1) > linebuflen) + const size_t linebuflen = buffer + buflen - data->linebuffer; + if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0)) { free (result); *errnop = ERANGE; @@ -394,15 +391,16 @@ _nss_nis_gethostbyaddr_r (const void *ad return NSS_STATUS_TRYAGAIN; } - p = strncpy (data->linebuffer, result, len); + char *p = strncpy (data->linebuffer, result, len); data->linebuffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = parse_line (p, host, data, buflen, errnop, af, - ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0)); - if (parse_res < 1) + int parse_res = parse_line (p, host, data, buflen, errnop, af, + ((_res.options & RES_USE_INET6) + ? AI_V4MAPPED : 0)); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) { diff -uprN glibc-2.4/nis/nss_nis/nis-initgroups.c glibc-2.5/nis/nss_nis/nis-initgroups.c --- glibc-2.4/nis/nss_nis/nis-initgroups.c 2004-04-02 15:09:32.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-initgroups.c 2006-04-29 01:12:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2000,2002,2003,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -30,6 +30,7 @@ #include #include "nss-nis.h" +#include /* Get the declaration of the parser function. */ #define ENTNAME grent @@ -37,47 +38,6 @@ #define EXTERN_PARSER #include -struct response_t -{ - struct response_t *next; - char val[0]; -}; - -struct intern_t -{ - struct response_t *start; - struct response_t *next; -}; -typedef struct intern_t intern_t; - -static int -saveit (int instatus, char *inkey, int inkeylen, char *inval, - int invallen, char *indata) -{ - intern_t *intern = (intern_t *) indata; - - if (instatus != YP_TRUE) - return 1; - - if (inkey && inkeylen > 0 && inval && invallen > 0) - { - struct response_t *newp = malloc (sizeof (struct response_t) - + invallen + 1); - if (newp == NULL) - return 1; /* We have no error code for out of memory */ - - if (intern->start == NULL) - intern->start = newp; - else - intern->next->next = newp; - intern->next = newp; - - newp->next = NULL; - *((char *) mempcpy (newp->val, inval, invallen)) = '\0'; - } - - return 0; -} static enum nss_status internal_setgrent (char *domainname, intern_t *intern) @@ -85,41 +45,72 @@ internal_setgrent (char *domainname, int struct ypall_callback ypcb; enum nss_status status; - intern->start = NULL; - - ypcb.foreach = saveit; + ypcb.foreach = _nis_saveit; ypcb.data = (char *) intern; status = yperr2nss (yp_all (domainname, "group.byname", &ypcb)); + + /* Mark the last buffer as full. */ + if (intern->next != NULL) + intern->next->size = intern->offset; + intern->next = intern->start; + intern->offset = 0; return status; } + static enum nss_status internal_getgrent_r (struct group *grp, char *buffer, size_t buflen, int *errnop, intern_t *intern) { - struct parser_data *data = (void *) buffer; - int parse_res; - char *p; - if (intern->start == NULL) return NSS_STATUS_NOTFOUND; /* Get the next entry until we found a correct one. */ + int parse_res; do { - if (intern->next == NULL) - return NSS_STATUS_NOTFOUND; + struct response_t *bucket = intern->next; + + if (__builtin_expect (intern->offset >= bucket->size, 0)) + { + if (bucket->next == NULL) + return NSS_STATUS_NOTFOUND; + + /* We look at all the content in the current bucket. Go on + to the next. */ + bucket = intern->next = bucket->next; + intern->offset = 0; + } - p = strncpy (buffer, intern->next->val, buflen); - while (isspace (*p)) - ++p; + char *p; + for (p = &bucket->mem[intern->offset]; isspace (*p); ++p) + ++intern->offset; - parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop); - if (parse_res == -1) + size_t len = strlen (p) + 1; + if (__builtin_expect (len > buflen, 0)) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + + /* We unfortunately have to copy the data in the user-provided + buffer because that buffer might be around for a very long + time and the servent structure must remain valid. If we would + rely on the BUCKET memory the next 'setservent' or 'endservent' + call would destroy it. + + The important thing is that it is a single NUL-terminated + string. This is what the parsing routine expects. */ + p = memcpy (buffer, &bucket->mem[intern->offset], len); + + parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res == -1, 0)) return NSS_STATUS_TRYAGAIN; - intern->next = intern->next->next; + + intern->offset += len; } while (!parse_res); @@ -166,13 +157,12 @@ initgroups_netid (uid_t uid, gid_t group ssize_t keylen = snprintf (key, sizeof (key), "unix.%lu@%s", (unsigned long int) uid, domainname); - enum nss_status retval; char *result; int reslen; - retval = yperr2nss (yp_match (domainname, "netid.byname", key, keylen, - &result, &reslen)); - if (retval != NSS_STATUS_SUCCESS) - return retval; + int yperr = yp_match (domainname, "netid.byname", key, keylen, &result, + &reslen); + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) + return yperr2nss (yperr); /* Parse the result: following the colon is a comma separated list of group IDs. */ @@ -207,7 +197,6 @@ initgroups_netid (uid_t uid, gid_t group if (*start == *size) { /* Need a bigger buffer. */ - gid_t *newgroups; long int newsize; if (limit > 0 && *size == limit) @@ -219,7 +208,7 @@ initgroups_netid (uid_t uid, gid_t group else newsize = MIN (limit, 2 * *size); - newgroups = realloc (groups, newsize * sizeof (*groups)); + gid_t *newgroups = realloc (groups, newsize * sizeof (*groups)); if (newgroups == NULL) goto errout; *groupsp = groups = newgroups; @@ -247,7 +236,7 @@ _nss_nis_initgroups_dyn (const char *use return NSS_STATUS_UNAVAIL; /* Check whether we are supposed to use the netid.byname map. */ - if (_nis_default_nss () & NSS_FLAG_NETID_AUTHORITATIVE) + if (_nsl_default_nss () & NSS_FLAG_NETID_AUTHORITATIVE) { /* We need the user ID. */ uid_t uid; @@ -262,7 +251,7 @@ _nss_nis_initgroups_dyn (const char *use size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX); char *tmpbuf; enum nss_status status; - intern_t intern = { NULL, NULL }; + intern_t intern = { NULL, NULL, 0 }; gid_t *groups = *groupsp; status = internal_setgrent (domainname, &intern); diff -uprN glibc-2.4/nis/nss_nis/nis-netgrp.c glibc-2.5/nis/nss_nis/nis-netgrp.c --- glibc-2.4/nis/nss_nis/nis-netgrp.c 2005-09-10 03:19:20.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-netgrp.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004,2005 +/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -47,24 +47,25 @@ internal_nis_endnetgrent (struct __netgr netgrp->cursor = NULL; } + enum nss_status _nss_nis_setnetgrent (const char *group, struct __netgrent *netgrp) { - char *domain; int len; enum nss_status status; status = NSS_STATUS_SUCCESS; - if (group == NULL || group[0] == '\0') + if (__builtin_expect (group == NULL || group[0] == '\0', 0)) return NSS_STATUS_UNAVAIL; - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; status = yperr2nss (yp_match (domain, "netgroup", group, strlen (group), &netgrp->data, &len)); - if (status == NSS_STATUS_SUCCESS) + if (__builtin_expect (status == NSS_STATUS_SUCCESS, 1)) { /* Our implementation of yp_match already allocates a buffer which is one byte larger than the value in LEN specifies @@ -90,6 +91,7 @@ _nss_nis_endnetgrent (struct __netgrent return NSS_STATUS_SUCCESS; } + enum nss_status _nss_nis_getnetgrent_r (struct __netgrent *result, char *buffer, size_t buflen, int *errnop) diff -uprN glibc-2.4/nis/nss_nis/nis-network.c glibc-2.5/nis/nss_nis/nis-network.c --- glibc-2.4/nis/nss_nis/nis-network.c 2003-03-16 03:36:21.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-network.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -73,28 +73,32 @@ internal_nis_getnetent_r (struct netent int *errnop, int *herrnop) { struct parser_data *data = (void *) buffer; - char *domain, *result, *outkey; - int len, keylen, parse_res; - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* Get the next entry until we found a correct one. */ + int parse_res; do { - enum nss_status retval; - char *p; + char *result; + char *outkey; + int len; + int keylen; + int yperr; if (new_start) - retval = yperr2nss (yp_first (domain, "networks.byname", - &outkey, &keylen, &result, &len)); + yperr = yp_first (domain, "networks.byname", &outkey, &keylen, &result, + &len); else - retval = yperr2nss ( yp_next (domain, "networks.byname", - oldkey, oldkeylen, - &outkey, &keylen, &result, &len)); + yperr = yp_next (domain, "networks.byname", oldkey, oldkeylen, &outkey, + &keylen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) { *herrnop = NETDB_INTERNAL; @@ -103,7 +107,7 @@ internal_nis_getnetent_r (struct netent return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; @@ -111,14 +115,14 @@ internal_nis_getnetent_r (struct netent return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) { free (outkey); *herrnop = NETDB_INTERNAL; @@ -155,11 +159,6 @@ enum nss_status _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer, size_t buflen, int *errnop, int *herrnop) { - enum nss_status retval; - struct parser_data *data = (void *) buffer; - char *domain, *result, *p; - int len, parse_res; - if (name == NULL) { *errnop = EINVAL; @@ -167,33 +166,36 @@ _nss_nis_getnetbyname_r (const char *nam return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; + struct parser_data *data = (void *) buffer; if (buflen < sizeof *data + 1) { *herrnop = NETDB_INTERNAL; *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - else - { - /* Convert name to lowercase. */ - size_t namlen = strlen (name); - char name2[namlen + 1]; - size_t i; - - for (i = 0; i < namlen; ++i) - name2[i] = _tolower (name[i]); - name2[i] = '\0'; - retval = yperr2nss (yp_match (domain, "networks.byname", name2, - namlen, &result, &len)); - } + /* Convert name to lowercase. */ + size_t namlen = strlen (name); + char name2[namlen + 1]; + size_t i; + + for (i = 0; i < namlen; ++i) + name2[i] = _tolower (name[i]); + name2[i] = '\0'; + char *result; + int len; + int yperr = yp_match (domain, "networks.byname", name2, namlen, &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) { *errnop = errno; @@ -202,7 +204,7 @@ _nss_nis_getnetbyname_r (const char *nam return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; @@ -210,15 +212,15 @@ _nss_nis_getnetbyname_r (const char *nam return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop); + int parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) { *herrnop = NETDB_INTERNAL; if (parse_res == -1) @@ -235,32 +237,26 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, char *buffer, size_t buflen, int *errnop, int *herrnop) { - struct parser_data *data = (void *) buffer; char *domain; - char *result; - int len; - char buf[256]; - int blen; - struct in_addr in; - char *p; - - if (yp_get_default_domain (&domain)) + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - in = inet_makeaddr (addr, 0); - strcpy (buf, inet_ntoa (in)); - blen = strlen (buf); + struct in_addr in = inet_makeaddr (addr, 0); + char *buf = inet_ntoa (in); + size_t blen = strlen (buf); while (1) { - enum nss_status retval; - int parse_res; + char *result; + int len; - retval = yperr2nss (yp_match (domain, "networks.byaddr", buf, - strlen (buf), &result, &len)); + int yperr = yp_match (domain, "networks.byaddr", buf, blen, &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_NOTFOUND) { if (buf[blen - 2] == '.' && buf[blen - 1] == '0') @@ -282,7 +278,7 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, } } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; @@ -290,15 +286,16 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop); + int parse_res = _nss_files_parse_netent (p, net, (void *) buffer, + buflen, errnop); - if (parse_res < 1) + if (__builtin_expect (parse_res < 1, 0)) { *herrnop = NETDB_INTERNAL; if (parse_res == -1) diff -uprN glibc-2.4/nis/nss_nis/nis-proto.c glibc-2.5/nis/nss_nis/nis-proto.c --- glibc-2.4/nis/nss_nis/nis-proto.c 2004-04-02 15:09:32.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-proto.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1998, 2000-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998, 2000-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -179,45 +179,46 @@ enum nss_status _nss_nis_getprotobyname_r (const char *name, struct protoent *proto, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - retval = yperr2nss (yp_match (domain, "protocols.byname", name, - strlen (name), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "protocols.byname", name, strlen (name), + &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_protoent (p, proto, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; @@ -231,42 +232,43 @@ enum nss_status _nss_nis_getprotobynumber_r (int number, struct protoent *proto, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, nlen, parse_res; - char buf[32]; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - nlen = sprintf (buf, "%d", number); + char buf[32]; + int nlen = snprintf (buf, sizeof (buf), "%d", number); - retval = yperr2nss (yp_match (domain, "protocols.bynumber", buf, - nlen, &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "protocols.bynumber", buf, nlen, &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_protoent (p, proto, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-publickey.c glibc-2.5/nis/nss_nis/nis-publickey.c --- glibc-2.4/nis/nss_nis/nis-publickey.c 2005-10-28 22:38:59.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-publickey.c 2006-04-09 02:08:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999,2001,2002,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999,2001,2002,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -36,10 +36,6 @@ extern int xdecrypt (char *, char *); enum nss_status _nss_nis_getpublickey (const char *netname, char *pkey, int *errnop) { - enum nss_status retval; - char *domain, *result; - int len; - pkey[0] = 0; if (netname == NULL) @@ -48,19 +44,23 @@ _nss_nis_getpublickey (const char *netna return NSS_STATUS_UNAVAIL; } - domain = strchr (netname, '@'); - if (!domain) + char *domain = strchr (netname, '@'); + if (domain == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } ++domain; - retval = yperr2nss (yp_match (domain, "publickey.byname", netname, - strlen (netname), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "publickey.byname", netname, strlen (netname), + &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; @@ -73,6 +73,7 @@ _nss_nis_getpublickey (const char *netna *p = 0; strncpy (pkey, result, HEXKEYBYTES + 1); pkey[HEXKEYBYTES] = '\0'; + free (result); } return NSS_STATUS_SUCCESS; } @@ -81,11 +82,6 @@ enum nss_status _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd, int *errnop) { - enum nss_status retval; - char buf[2 * (HEXKEYBYTES + 1)]; - char *domain, *result; - int len; - skey[0] = 0; if (netname == NULL || passwd == NULL) @@ -94,19 +90,23 @@ _nss_nis_getsecretkey (const char *netna return NSS_STATUS_UNAVAIL; } - domain = strchr (netname, '@'); - if (!domain) + char *domain = strchr (netname, '@'); + if (domain == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } ++domain; - retval = yperr2nss (yp_match (domain, "publickey.byname", netname, - strlen (netname), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "publickey.byname", netname, strlen (netname), + &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; @@ -115,20 +115,22 @@ _nss_nis_getsecretkey (const char *netna if (result != NULL) { char *p = strchr (result, ':'); - if (p == NULL) - return NSS_STATUS_SUCCESS; - - ++p; - strncpy (buf, p, 2 * (HEXKEYBYTES + 1)); - buf[2 * HEXKEYBYTES + 1] = '\0'; - if (!xdecrypt (buf, passwd)) - return NSS_STATUS_SUCCESS; + if (p != NULL) + { + char buf[2 * (HEXKEYBYTES + 1)]; - if (memcmp (buf, &(buf[HEXKEYBYTES]), KEYCHECKSUMSIZE) != 0) - return NSS_STATUS_SUCCESS; + ++p; + strncpy (buf, p, 2 * (HEXKEYBYTES + 1)); + buf[2 * HEXKEYBYTES + 1] = '\0'; + if (xdecrypt (buf, passwd) + && memcmp (buf, &(buf[HEXKEYBYTES]), KEYCHECKSUMSIZE) == 0) + { + buf[HEXKEYBYTES] = '\0'; + strcpy (skey, buf); + } + } - buf[HEXKEYBYTES] = '\0'; - strcpy (skey, buf); + free (result); } return NSS_STATUS_SUCCESS; } @@ -194,13 +196,8 @@ enum nss_status _nss_nis_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, gid_t *gidp, int *gidlenp, gid_t *gidlist, int *errnop) { - char *domain; - int yperr; - char *lookup; - int len; - - domain = strchr (netname, '@'); - if (!domain) + char *domain = strchr (netname, '@'); + if (domain == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; @@ -208,9 +205,10 @@ _nss_nis_netname2user (char netname[MAXN /* Point past the '@' character */ ++domain; - lookup = NULL; - yperr = yp_match (domain, "netid.byname", netname, strlen (netname), - &lookup, &len); + char *lookup = NULL; + int len; + int yperr = yp_match (domain, "netid.byname", netname, strlen (netname), + &lookup, &len); switch (yperr) { case YPERR_SUCCESS: @@ -223,17 +221,15 @@ _nss_nis_netname2user (char netname[MAXN return NSS_STATUS_UNAVAIL; } - if (lookup) - { - enum nss_status err; - - lookup[len] = '\0'; - err = parse_netid_str (lookup, uidp, gidp, gidlenp, gidlist); - free (lookup); - return err; - } - else + if (lookup == NULL) return NSS_STATUS_NOTFOUND; - return NSS_STATUS_SUCCESS; + + lookup[len] = '\0'; + + enum nss_status err = parse_netid_str (lookup, uidp, gidp, gidlenp, gidlist); + + free (lookup); + + return err; } diff -uprN glibc-2.4/nis/nss_nis/nis-pwd.c glibc-2.5/nis/nss_nis/nis-pwd.c --- glibc-2.4/nis/nss_nis/nis-pwd.c 2003-01-19 19:09:10.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-pwd.c 2006-05-01 22:31:15.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1998, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -17,20 +17,18 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -/* The following is an ugly trick to avoid a prototype declaration for - _nss_nis_endpwent. */ -#define _nss_nis_endpwent _nss_nis_endpwent_XXX -#include -#undef _nss_nis_endpwent +#include #include #include +#include +#include #include #include #include #include #include "nss-nis.h" +#include /* Get the declaration of the parser function. */ #define ENTNAME pwent @@ -44,12 +42,72 @@ __libc_lock_define_initialized (static, static bool_t new_start = 1; static char *oldkey; static int oldkeylen; +static intern_t intern; -enum nss_status -_nss_nis_setpwent (int stayopen) + +int +_nis_saveit (int instatus, char *inkey, int inkeylen, char *inval, + int invallen, char *indata) { - __libc_lock_lock (lock); + intern_t *intern = (intern_t *) indata; + + if (instatus != YP_TRUE) + return 1; + + if (inkey && inkeylen > 0 && inval && invallen > 0) + { + struct response_t *bucket = intern->next; + if (__builtin_expect (bucket == NULL, 0)) + { +#define MINSIZE 4096 - 4 * sizeof (void *) + const size_t minsize = MAX (MINSIZE, 2 * (invallen + 1)); + bucket = malloc (sizeof (struct response_t) + minsize); + if (bucket == NULL) + /* We have no error code for out of memory. */ + return 1; + + bucket->next = NULL; + bucket->size = minsize; + intern->start = intern->next = bucket; + intern->offset = 0; + } + else if (__builtin_expect (invallen + 1 > bucket->size - intern->offset, + 0)) + { + /* We need a new (larger) buffer. */ + const size_t newsize = 2 * MAX (bucket->size, invallen + 1); + struct response_t *newp = malloc (sizeof (struct response_t) + + newsize); + if (newp == NULL) + /* We have no error code for out of memory. */ + return 1; + + /* Mark the old bucket as full. */ + bucket->size = intern->offset; + + newp->next = NULL; + newp->size = newsize; + bucket = intern->next = bucket->next = newp; + intern->offset = 0; + } + + char *p = mempcpy (&bucket->mem[intern->offset], inval, invallen); + if (__builtin_expect (p[-1] != '\0', 0)) + { + *p = '\0'; + ++invallen; + } + intern->offset += invallen; + } + + return 0; +} + + +static void +internal_nis_endpwent (void) +{ new_start = 1; if (oldkey != NULL) { @@ -58,52 +116,159 @@ _nss_nis_setpwent (int stayopen) oldkeylen = 0; } + struct response_t *curr = intern.next; + + while (curr != NULL) + { + struct response_t *last = curr; + curr = curr->next; + free (last); + } + + intern.next = intern.start = NULL; +} + + +enum nss_status +_nss_nis_endpwent (void) +{ + __libc_lock_lock (lock); + + internal_nis_endpwent (); + __libc_lock_unlock (lock); return NSS_STATUS_SUCCESS; } -/* Make _nss_nis_endpwent an alias of _nss_nis_setpwent. We do this - even though the prototypes don't match. The argument of setpwent - is not used so this makes no difference. */ -strong_alias (_nss_nis_setpwent, _nss_nis_endpwent) + + +enum nss_status +internal_nis_setpwent (void) +{ + /* We have to read all the data now. */ + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) + return NSS_STATUS_UNAVAIL; + + struct ypall_callback ypcb; + + ypcb.foreach = _nis_saveit; + ypcb.data = (char *) &intern; + enum nss_status status = yperr2nss (yp_all (domain, "passwd.byname", &ypcb)); + + + /* Mark the last buffer as full. */ + if (intern.next != NULL) + intern.next->size = intern.offset; + + intern.next = intern.start; + intern.offset = 0; + + return status; +} + + +enum nss_status +_nss_nis_setpwent (int stayopen) +{ + enum nss_status result = NSS_STATUS_SUCCESS; + + __libc_lock_lock (lock); + + internal_nis_endpwent (); + + if (_nsl_default_nss () & NSS_FLAG_SETENT_BATCH_READ) + result = internal_nis_setpwent (); + + __libc_lock_unlock (lock); + + return result; +} + static enum nss_status internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - char *domain; - int parse_res; + /* If we read the entire database at setpwent time we just iterate + over the data we have in memory. */ + bool batch_read = intern.start != NULL; - if (yp_get_default_domain (&domain)) + char *domain = NULL; + if (!batch_read && __builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* Get the next entry until we found a correct one. */ + int parse_res; do { - enum nss_status retval; - char *result, *outkey, *result2, *p; - int len, keylen, len2; - size_t namelen; + char *result; + char *outkey; + int len; + int keylen; - if (new_start) - retval = yperr2nss (yp_first (domain, "passwd.byname", - &outkey, &keylen, &result, &len)); + if (batch_read) + { + struct response_t *bucket; + + handle_batch_read: + bucket = intern.next; + + if (__builtin_expect (intern.offset >= bucket->size, 0)) + { + if (bucket->next == NULL) + return NSS_STATUS_NOTFOUND; + + /* We look at all the content in the current bucket. Go on + to the next. */ + bucket = intern.next = bucket->next; + intern.offset = 0; + } + + for (result = &bucket->mem[intern.offset]; isspace (*result); + ++result) + ++intern.offset; + + len = strlen (result); + } else - retval = yperr2nss ( yp_next (domain, "passwd.byname", - oldkey, oldkeylen, - &outkey, &keylen, &result, &len)); - - if (retval != NSS_STATUS_SUCCESS) - { - if (retval == NSS_STATUS_TRYAGAIN) - *errnop = errno; - return retval; - } + { + int yperr; + + if (new_start) + { + /* Maybe we should read the database in one piece. */ + if ((_nsl_default_nss () & NSS_FLAG_SETENT_BATCH_READ) + && internal_nis_setpwent () == NSS_STATUS_SUCCESS + && intern.start != NULL) + { + batch_read = true; + goto handle_batch_read; + } + + yperr = yp_first (domain, "passwd.byname", &outkey, &keylen, + &result, &len); + } + else + yperr = yp_next (domain, "passwd.byname", oldkey, oldkeylen, + &outkey, &keylen, &result, &len); + + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) + { + enum nss_status retval = yperr2nss (yperr); + + if (retval == NSS_STATUS_TRYAGAIN) + *errnop = errno; + return retval; + } + } /* Check for adjunct style secret passwords. They can be recognized by a password starting with "##". */ - p = strchr (result, ':'); + char *p = strchr (result, ':'); + size_t namelen; + char *result2; + int len2; if (p != NULL /* This better should be true in all cases. */ && p[1] == '#' && p[2] == '#' && (namelen = p - result, @@ -128,7 +293,8 @@ internal_nis_getpwent_r (struct passwd * } restlen = len - (p - result); - if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen) + if (__builtin_expect ((size_t) (namelen + (endp - encrypted) + + restlen + 2) > buflen, 0)) { free (result2); free (result); @@ -136,10 +302,10 @@ internal_nis_getpwent_r (struct passwd * return NSS_STATUS_TRYAGAIN; } - __mempcpy (__mempcpy (__mempcpy (__mempcpy (buffer, result, namelen), - ":", 1), - encrypted, endp - encrypted), - p, restlen + 1); + mempcpy (mempcpy (mempcpy (mempcpy (buffer, result, namelen), + ":", 1), + encrypted, endp - encrypted), + p, restlen + 1); p = buffer; free (result2); @@ -147,33 +313,41 @@ internal_nis_getpwent_r (struct passwd * else { non_adjunct: - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); - buffer[len] = '\0'; + p = buffer; + *((char *) mempcpy (buffer, result, len)) = '\0'; } while (isspace (*p)) ++p; - free (result); + if (!batch_read) + free (result); - parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop); - if (parse_res == -1) + parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res == -1, 0)) { - free (outkey); + if (!batch_read) + free (outkey); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - free (oldkey); - oldkey = outkey; - oldkeylen = keylen; - new_start = 0; + if (batch_read) + intern.offset += len + 1; + else + { + free (oldkey); + oldkey = outkey; + oldkeylen = keylen; + new_start = 0; + } } while (parse_res < 1); @@ -199,28 +373,26 @@ enum nss_status _nss_nis_getpwnam_r (const char *name, struct passwd *pwd, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *result2, *p; - int len, len2, parse_res; - size_t namelen; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - namelen = strlen (name); + size_t namelen = strlen (name); - retval = yperr2nss (yp_match (domain, "passwd.byname", name, - namelen, &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "passwd.byname", name, namelen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; @@ -228,7 +400,9 @@ _nss_nis_getpwnam_r (const char *name, s /* Check for adjunct style secret passwords. They can be recognized by a password starting with "##". */ - p = strchr (result, ':'); + char *result2; + int len2; + char *p = strchr (result, ':'); if (p != NULL /* This better should be true in all cases. */ && p[1] == '#' && p[2] == '#' && yp_match (domain, "passwd.adjunct.byname", name, namelen, @@ -238,7 +412,6 @@ _nss_nis_getpwnam_r (const char *name, s therein into original result. */ char *encrypted = strchr (result2, ':'); char *endp; - size_t restlen; if (encrypted == NULL || (endp = strchr (++encrypted, ':')) == NULL @@ -251,8 +424,9 @@ _nss_nis_getpwnam_r (const char *name, s goto non_adjunct; } - restlen = len - (p - result); - if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen) + size_t restlen = len - (p - result); + if (__builtin_expect ((size_t) (namelen + (endp - encrypted) + + restlen + 2) > buflen, 0)) { free (result2); free (result); @@ -271,7 +445,7 @@ _nss_nis_getpwnam_r (const char *name, s else { non_adjunct: - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; @@ -286,8 +460,9 @@ _nss_nis_getpwnam_r (const char *name, s ++p; free (result); - parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; @@ -302,23 +477,21 @@ enum nss_status _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p, *result2; - int len, nlen, parse_res, len2; - char buf[32]; - size_t namelen; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - nlen = sprintf (buf, "%lu", (unsigned long int) uid); + char buf[32]; + int nlen = snprintf (buf, sizeof (buf), "%lu", (unsigned long int) uid); - retval = yperr2nss (yp_match (domain, "passwd.byuid", buf, - nlen, &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "passwd.byuid", buf, nlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; @@ -326,7 +499,10 @@ _nss_nis_getpwuid_r (uid_t uid, struct p /* Check for adjunct style secret passwords. They can be recognized by a password starting with "##". */ - p = strchr (result, ':'); + char *result2; + int len2; + size_t namelen; + char *p = strchr (result, ':'); if (p != NULL /* This better should be true in all cases. */ && p[1] == '#' && p[2] == '#' && (namelen = p - result, @@ -351,7 +527,8 @@ _nss_nis_getpwuid_r (uid_t uid, struct p } restlen = len - (p - result); - if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen) + if (__builtin_expect ((size_t) (namelen + (endp - encrypted) + + restlen + 2) > buflen, 0)) { free (result2); free (result); @@ -370,7 +547,7 @@ _nss_nis_getpwuid_r (uid_t uid, struct p else { non_adjunct: - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; @@ -385,8 +562,9 @@ _nss_nis_getpwuid_r (uid_t uid, struct p ++p; free (result); - parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-rpc.c glibc-2.5/nis/nss_nis/nis-rpc.c --- glibc-2.4/nis/nss_nis/nis-rpc.c 2004-04-02 15:09:32.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-rpc.c 2006-08-19 18:35:44.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1996-1998,2000,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998,2000,2002,2003,2004,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -35,59 +36,22 @@ __libc_lock_define_initialized (static, lock) -struct response_t -{ - struct response_t *next; - char val[0]; -}; - -struct intern_t -{ - struct response_t *start; - struct response_t *next; -}; -typedef struct intern_t intern_t; - -static intern_t intern = {NULL, NULL}; - -static int -saveit (int instatus, char *inkey, int inkeylen, char *inval, - int invallen, char *indata) -{ - intern_t *intern = (intern_t *)indata; - - if (instatus != YP_TRUE) - return 1; - - if (inkey && inkeylen > 0 && inval && invallen > 0) - { - struct response_t *newp = malloc (sizeof (struct response_t) - + invallen + 1); - if (newp == NULL) - return 1; /* We have no error code for out of memory */ - - if (intern->start == NULL) - intern->start = newp; - else - intern->next->next = newp; - intern->next = newp; - - newp->next = NULL; - *((char *) mempcpy (newp->val, inval, invallen)) = '\0'; - } +static intern_t intern; - return 0; -} static void internal_nis_endrpcent (intern_t *intern) { - while (intern->start != NULL) + struct response_t *curr = intern->next; + + while (curr != NULL) { - intern->next = intern->start; - intern->start = intern->start->next; - free (intern->next); + struct response_t *last = curr; + curr = curr->next; + free (last); } + + intern->next = intern->start = NULL; } static enum nss_status @@ -102,10 +66,16 @@ internal_nis_setrpcent (intern_t *intern internal_nis_endrpcent (intern); - ypcb.foreach = saveit; - ypcb.data = (char *)intern; - status = yperr2nss (yp_all(domainname, "rpc.bynumber", &ypcb)); + ypcb.foreach = _nis_saveit; + ypcb.data = (char *) intern; + status = yperr2nss (yp_all (domainname, "rpc.bynumber", &ypcb)); + + /* Mark the last buffer as full. */ + if (intern->next != NULL) + intern->next->size = intern->offset; + intern->next = intern->start; + intern->offset = 0; return status; } @@ -138,29 +108,60 @@ _nss_nis_endrpcent (void) static enum nss_status internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen, - int *errnop, intern_t *data) + int *errnop, intern_t *intern) { struct parser_data *pdata = (void *) buffer; int parse_res; char *p; - if (data->start == NULL) - internal_nis_setrpcent (data); + if (intern->start == NULL) + internal_nis_setrpcent (intern); + + if (intern->next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; /* Get the next entry until we found a correct one. */ do { - if (data->next == NULL) - return NSS_STATUS_NOTFOUND; + struct response_t *bucket = intern->next; - p = strncpy (buffer, data->next->val, buflen); - while (isspace (*p)) - ++p; + if (__builtin_expect (intern->offset >= bucket->size, 0)) + { + if (bucket->next == NULL) + return NSS_STATUS_NOTFOUND; + + /* We look at all the content in the current bucket. Go on + to the next. */ + bucket = intern->next = bucket->next; + intern->offset = 0; + } + + for (p = &bucket->mem[intern->offset]; isspace (*p); ++p) + ++intern->offset; + + size_t len = strlen (p) + 1; + if (__builtin_expect (len > buflen, 0)) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + + /* We unfortunately have to copy the data in the user-provided + buffer because that buffer might be around for a very long + time and the servent structure must remain valid. If we would + rely on the BUCKET memory the next 'setservent' or 'endservent' + call would destroy it. + + The important thing is that it is a single NUL-terminated + string. This is what the parsing routine expects. */ + p = memcpy (buffer, &bucket->mem[intern->offset], len); parse_res = _nss_files_parse_rpcent (p, rpc, pdata, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) return NSS_STATUS_TRYAGAIN; - data->next = data->next->next; + + intern->offset += len; } while (!parse_res); @@ -186,21 +187,18 @@ enum nss_status _nss_nis_getrpcbyname_r (const char *name, struct rpcent *rpc, char *buffer, size_t buflen, int *errnop) { - intern_t data = {NULL, NULL}; - enum nss_status status; - int found; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - status = internal_nis_setrpcent (&data); - if (status != NSS_STATUS_SUCCESS) + intern_t data = { NULL, NULL, 0 }; + enum nss_status status = internal_nis_setrpcent (&data); + if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0)) return status; - found = 0; + int found = 0; while (!found && ((status = internal_nis_getrpcent_r (rpc, buffer, buflen, errnop, &data)) == NSS_STATUS_SUCCESS)) @@ -226,53 +224,52 @@ _nss_nis_getrpcbyname_r (const char *nam internal_nis_endrpcent (&data); - if (!found && status == NSS_STATUS_SUCCESS) + if (__builtin_expect (!found && status == NSS_STATUS_SUCCESS, 0)) return NSS_STATUS_NOTFOUND; - else - return status; + + return status; } enum nss_status _nss_nis_getrpcbynumber_r (int number, struct rpcent *rpc, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, nlen, parse_res; - char buf[32]; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - nlen = sprintf (buf, "%d", number); + char buf[32]; + int nlen = snprintf (buf, sizeof (buf), "%d", number); - retval = yperr2nss (yp_match (domain, "rpc.bynumber", buf, - nlen, &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "rpc.bynumber", buf, nlen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_rpcent (p, rpc, data, buflen, errnop); - - if (parse_res < 1) + int parse_res = _nss_files_parse_rpcent (p, rpc, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss_nis/nis-service.c glibc-2.5/nis/nss_nis/nis-service.c --- glibc-2.4/nis/nss_nis/nis-service.c 2004-04-02 15:09:32.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-service.c 2006-08-19 18:36:25.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -27,6 +27,7 @@ #include #include "nss-nis.h" +#include /* Get the declaration of the parser function. */ @@ -36,20 +37,7 @@ __libc_lock_define_initialized (static, lock) -struct response_t -{ - struct response_t *next; - char val[0]; -}; - -struct intern_t -{ - struct response_t *start; - struct response_t *next; -}; -typedef struct intern_t intern_t; - -static intern_t intern = { NULL, NULL }; +static intern_t intern; struct search_t { @@ -64,63 +52,31 @@ struct search_t }; static int -saveit (int instatus, char *inkey, int inkeylen, char *inval, - int invallen, char *indata) -{ - intern_t *intern = (intern_t *) indata; - - if (instatus != YP_TRUE) - return 1; - - if (inkey && inkeylen > 0 && inval && invallen > 0) - { - struct response_t *newp = malloc (sizeof (struct response_t) - + invallen + 1); - if (newp == NULL) - return 1; /* We have no error code for out of memory */ - - if (intern->start == NULL) - intern->start = newp; - else - intern->next->next = newp; - intern->next = newp; - - newp->next = NULL; - *((char *) mempcpy (newp->val, inval, invallen)) = '\0'; - } - - return 0; -} - -static int dosearch (int instatus, char *inkey, int inkeylen, char *inval, int invallen, char *indata) { struct search_t *req = (struct search_t *) indata; - if (instatus != YP_TRUE) + if (__builtin_expect (instatus != YP_TRUE, 0)) return 1; if (inkey && inkeylen > 0 && inval && invallen > 0) { - struct parser_data *pdata = (void *) req->buffer; - int parse_res; - char *p; - - if ((size_t) (invallen + 1) > req->buflen) + if (__builtin_expect ((size_t) (invallen + 1) > req->buflen, 0)) { *req->errnop = ERANGE; req->status = NSS_STATUS_TRYAGAIN; return 1; } - p = strncpy (req->buffer, inval, invallen); + char *p = strncpy (req->buffer, inval, invallen); req->buffer[invallen] = '\0'; while (isspace (*p)) ++p; - parse_res = _nss_files_parse_servent (p, req->serv, pdata, req->buflen, - req->errnop); + int parse_res = _nss_files_parse_servent (p, req->serv, + (void *) req->buffer, + req->buflen, req->errnop); if (parse_res == -1) { req->status = NSS_STATUS_TRYAGAIN; @@ -154,35 +110,35 @@ dosearch (int instatus, char *inkey, int return 0; } -static enum nss_status -internal_nis_endservent (intern_t * intern) +static void +internal_nis_endservent (void) { - while (intern->start != NULL) + struct response_t *curr = intern.next; + + while (curr != NULL) { - intern->next = intern->start; - intern->start = intern->start->next; - free (intern->next); + struct response_t *last = curr; + curr = curr->next; + free (last); } - return NSS_STATUS_SUCCESS; + intern.next = intern.start = NULL; } enum nss_status _nss_nis_endservent (void) { - enum nss_status status; - __libc_lock_lock (lock); - status = internal_nis_endservent (&intern); + internal_nis_endservent (); __libc_lock_unlock (lock); - return status; + return NSS_STATUS_SUCCESS; } static enum nss_status -internal_nis_setservent (intern_t *intern) +internal_nis_setservent (void) { char *domainname; struct ypall_callback ypcb; @@ -191,12 +147,18 @@ internal_nis_setservent (intern_t *inter if (yp_get_default_domain (&domainname)) return NSS_STATUS_UNAVAIL; - (void) internal_nis_endservent (intern); + internal_nis_endservent (); - ypcb.foreach = saveit; - ypcb.data = (char *) intern; + ypcb.foreach = _nis_saveit; + ypcb.data = (char *) &intern; status = yperr2nss (yp_all (domainname, "services.byname", &ypcb)); - intern->next = intern->start; + + /* Mark the last buffer as full. */ + if (intern.next != NULL) + intern.next->size = intern.offset; + + intern.next = intern.start; + intern.offset = 0; return status; } @@ -208,7 +170,7 @@ _nss_nis_setservent (int stayopen) __libc_lock_lock (lock); - status = internal_nis_setservent (&intern); + status = internal_nis_setservent (); __libc_lock_unlock (lock); @@ -217,29 +179,60 @@ _nss_nis_setservent (int stayopen) static enum nss_status internal_nis_getservent_r (struct servent *serv, char *buffer, - size_t buflen, int *errnop, intern_t *data) + size_t buflen, int *errnop) { struct parser_data *pdata = (void *) buffer; int parse_res; char *p; - if (data->start == NULL) - internal_nis_setservent (data); + if (intern.start == NULL) + internal_nis_setservent (); + + if (intern.next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; - /* Get the next entry until we found a correct one. */ + /* Get the next entry until we found a correct one. */ do { - if (data->next == NULL) - return NSS_STATUS_NOTFOUND; + struct response_t *bucket = intern.next; - p = strncpy (buffer, data->next->val, buflen); - while (isspace (*p)) - ++p; + if (__builtin_expect (intern.offset >= bucket->size, 0)) + { + if (bucket->next == NULL) + return NSS_STATUS_NOTFOUND; + + /* We look at all the content in the current bucket. Go on + to the next. */ + bucket = intern.next = bucket->next; + intern.offset = 0; + } + + for (p = &bucket->mem[intern.offset]; isspace (*p); ++p) + ++intern.offset; + + size_t len = strlen (p) + 1; + if (__builtin_expect (len > buflen, 0)) + { + *errnop = ERANGE; + return NSS_STATUS_TRYAGAIN; + } + + /* We unfortunately have to copy the data in the user-provided + buffer because that buffer might be around for a very long + time and the servent structure must remain valid. If we would + rely on the BUCKET memory the next 'setservent' or 'endservent' + call would destroy it. + + The important thing is that it is a single NUL-terminated + string. This is what the parsing routine expects. */ + p = memcpy (buffer, &bucket->mem[intern.offset], len); parse_res = _nss_files_parse_servent (p, serv, pdata, buflen, errnop); - if (parse_res == -1) + if (__builtin_expect (parse_res == -1, 0)) return NSS_STATUS_TRYAGAIN; - data->next = data->next->next; + + intern.offset += len; } while (!parse_res); @@ -254,7 +247,7 @@ _nss_nis_getservent_r (struct servent *s __libc_lock_lock (lock); - status = internal_nis_getservent_r (serv, buffer, buflen, errnop, &intern); + status = internal_nis_getservent_r (serv, buffer, buflen, errnop); __libc_lock_unlock (lock); @@ -266,60 +259,55 @@ _nss_nis_getservbyname_r (const char *na struct servent *serv, char *buffer, size_t buflen, int *errnop) { - enum nss_status status; - char *domain; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* If the protocol is given, we could try if our NIS server knows about services.byservicename map. If yes, we only need one query. */ - char key[strlen (name) + (protocol ? strlen (protocol) : 0) + 2]; - char *cp, *result; - size_t keylen, len; - int int_len; + size_t keylen = strlen (name) + 1 + (protocol ? strlen (protocol) : 0); + char key[keylen + 1]; /* key is: "name/proto" */ - cp = stpcpy (key, name); - if (protocol) + char *cp = stpcpy (key, name); + if (protocol != NULL) { *cp++ = '/'; strcpy (cp, protocol); } - keylen = strlen (key); - status = yperr2nss (yp_match (domain, "services.byservicename", key, - keylen, &result, &int_len)); - len = int_len; + + char *result; + int int_len; + int status = yp_match (domain, "services.byservicename", key, + keylen, &result, &int_len); + size_t len = int_len; /* If we found the key, it's ok and parse the result. If not, fall through and parse the complete table. */ - if (status == NSS_STATUS_SUCCESS) + if (__builtin_expect (status == YPERR_SUCCESS, 1)) { - struct parser_data *pdata = (void *) buffer; - int parse_res; - char *p; - - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_servent (p, serv, pdata, - buflen, errnop); - if (parse_res < 0) + + int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer, + buflen, errnop); + if (__builtin_expect (parse_res < 0, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; @@ -331,8 +319,8 @@ _nss_nis_getservbyname_r (const char *na } /* Check if it is safe to rely on services.byservicename. */ - if (_nis_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE) - return status; + if (_nsl_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE) + return yperr2nss (status); struct ypall_callback ypcb; struct search_t req; @@ -347,10 +335,10 @@ _nss_nis_getservbyname_r (const char *na req.buflen = buflen; req.errnop = errnop; req.status = NSS_STATUS_NOTFOUND; - status = yperr2nss (yp_all (domain, "services.byname", &ypcb)); + status = yp_all (domain, "services.byname", &ypcb); - if (status != NSS_STATUS_SUCCESS) - return status; + if (__builtin_expect (status != YPERR_SUCCESS, 0)) + return yperr2nss (status); return req.status; } @@ -360,10 +348,8 @@ _nss_nis_getservbyport_r (int port, cons struct servent *serv, char *buffer, size_t buflen, int *errnop) { - enum nss_status status; char *domain; - - if (yp_get_default_domain (&domain)) + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* If the protocol is given, we only need one query. @@ -372,48 +358,44 @@ _nss_nis_getservbyport_r (int port, cons const char *proto = protocol != NULL ? protocol : "tcp"; do { + /* key is: "port/proto" */ char key[sizeof (int) * 3 + strlen (proto) + 2]; + size_t keylen = snprintf (key, sizeof (key), "%d/%s", ntohs (port), + proto); + char *result; - size_t keylen, len; int int_len; - - /* key is: "port/proto" */ - keylen = snprintf (key, sizeof (key), "%d/%s", ntohs (port), proto); - status = yperr2nss (yp_match (domain, "services.byname", key, - keylen, &result, &int_len)); - len = int_len; + int status = yp_match (domain, "services.byname", key, keylen, &result, + &int_len); + size_t len = int_len; /* If we found the key, it's ok and parse the result. If not, fall through and parse the complete table. */ - if (status == NSS_STATUS_SUCCESS) + if (__builtin_expect (status == YPERR_SUCCESS, 1)) { - struct parser_data *pdata = (void *) buffer; - int parse_res; - char *p; - - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_servent (p, serv, pdata, - buflen, errnop); - if (parse_res < 0) + int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer, + buflen, errnop); + if (__builtin_expect (parse_res < 0, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; else return NSS_STATUS_NOTFOUND; } - else - return NSS_STATUS_SUCCESS; + + return NSS_STATUS_SUCCESS; } } while (protocol == NULL && (proto[0] == 't' ? (proto = "udp") : NULL)); @@ -434,10 +416,10 @@ _nss_nis_getservbyport_r (int port, cons req.buflen = buflen; req.errnop = errnop; req.status = NSS_STATUS_NOTFOUND; - status = yperr2nss (yp_all (domain, "services.byname", &ypcb)); + int status = yp_all (domain, "services.byname", &ypcb); - if (status != NSS_STATUS_SUCCESS) - return status; + if (__builtin_expect (status != YPERR_SUCCESS, 0)) + return yperr2nss (status); return req.status; } diff -uprN glibc-2.4/nis/nss_nis/nis-spwd.c glibc-2.5/nis/nss_nis/nis-spwd.c --- glibc-2.4/nis/nss_nis/nis-spwd.c 2003-01-19 19:20:34.000000000 +0000 +++ glibc-2.5/nis/nss_nis/nis-spwd.c 2006-04-29 01:09:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1998, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -68,49 +68,52 @@ static enum nss_status internal_nis_getspent_r (struct spwd *sp, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - char *domain, *result, *outkey; - int len, keylen, parse_res; - - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; /* Get the next entry until we found a correct one. */ + int parse_res; do { - enum nss_status retval; - char *p; + char *result; + char *outkey; + int len; + int keylen; + int yperr; if (new_start) - retval = yperr2nss (yp_first (domain, "shadow.byname", - &outkey, &keylen, &result, &len)); + yperr = yp_first (domain, "shadow.byname", &outkey, &keylen, &result, + &len); else - retval = yperr2nss ( yp_next (domain, "shadow.byname", - oldkey, oldkeylen, - &outkey, &keylen, &result, &len)); + yperr = yp_next (domain, "shadow.byname", oldkey, oldkeylen, &outkey, + &keylen, &result, &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop); - if (parse_res == -1) + parse_res = _nss_files_parse_spent (p, sp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res == -1, 0)) { free (outkey); *errnop = ERANGE; @@ -146,45 +149,46 @@ enum nss_status _nss_nis_getspnam_r (const char *name, struct spwd *sp, char *buffer, size_t buflen, int *errnop) { - struct parser_data *data = (void *) buffer; - enum nss_status retval; - char *domain, *result, *p; - int len, parse_res; - if (name == NULL) { *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } - if (yp_get_default_domain (&domain)) + char *domain; + if (__builtin_expect (yp_get_default_domain (&domain), 0)) return NSS_STATUS_UNAVAIL; - retval = yperr2nss (yp_match (domain, "shadow.byname", name, - strlen (name), &result, &len)); + char *result; + int len; + int yperr = yp_match (domain, "shadow.byname", name, strlen (name), &result, + &len); - if (retval != NSS_STATUS_SUCCESS) + if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) { + enum nss_status retval = yperr2nss (yperr); + if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } - if ((size_t) (len + 1) > buflen) + if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) { free (result); *errnop = ERANGE; return NSS_STATUS_TRYAGAIN; } - p = strncpy (buffer, result, len); + char *p = strncpy (buffer, result, len); buffer[len] = '\0'; while (isspace (*p)) ++p; free (result); - parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop); - if (parse_res < 1) + int parse_res = _nss_files_parse_spent (p, sp, (void *) buffer, buflen, + errnop); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) return NSS_STATUS_TRYAGAIN; diff -uprN glibc-2.4/nis/nss-nis.c glibc-2.5/nis/nss-nis.c --- glibc-2.4/nis/nss-nis.c 2004-04-20 18:52:12.000000000 +0000 +++ glibc-2.5/nis/nss-nis.c 2006-04-14 05:48:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,13 +16,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#include -#include -#include -#include -#include - #include "nss-nis.h" #include "nsswitch.h" @@ -50,81 +43,3 @@ const enum nss_status __yperr2nss_tab[] }; const unsigned int __yperr2nss_count = (sizeof (__yperr2nss_tab) / sizeof (__yperr2nss_tab[0])); - -int _nis_default_nss_flags; - -static const char default_nss[] = "/etc/default/nss"; - -int -_nis_check_default_nss (void) -{ - FILE *fp = fopen (default_nss, "rc"); - int flags = NSS_FLAG_SET; - if (fp != NULL) - { - char *line = NULL; - size_t linelen = 0; - - __fsetlocking (fp, FSETLOCKING_BYCALLER); - - while (!feof_unlocked (fp)) - { - ssize_t n = getline (&line, &linelen, fp); - if (n <= 0) - break; - - /* There currently are only two variables we expect, so - simplify the parsing. Recognize only - - NETID_AUTHORITATIVE = TRUE - SERVICES_AUTHORITATIVE = TRUE - - with arbitrary white spaces. */ - char *cp = line; - while (isspace (*cp)) - ++cp; - - /* Recognize comment lines. */ - if (*cp == '#') - continue; - - static const char netid_authoritative[] = "NETID_AUTHORITATIVE"; - static const char services_authoritative[] - = "SERVICES_AUTHORITATIVE"; - size_t flag_len; - if (strncmp (cp, netid_authoritative, - flag_len = sizeof (netid_authoritative) - 1) != 0 - && strncmp (cp, services_authoritative, - flag_len = sizeof (services_authoritative) - 1) - != 0) - continue; - - cp += flag_len; - while (isspace (*cp)) - ++cp; - if (*cp++ != '=') - continue; - while (isspace (*cp)) - ++cp; - - if (strncmp (cp, "TRUE", 4) != 0) - continue; - cp += 4; - - while (isspace (*cp)) - ++cp; - - if (*cp == '\0') - flags |= flag_len == sizeof (netid_authoritative) - 1 - ? NSS_FLAG_NETID_AUTHORITATIVE - : NSS_FLAG_SERVICES_AUTHORITATIVE; - } - - free (line); - - fclose (fp); - } - - _nis_default_nss_flags = flags; - return flags; -} diff -uprN glibc-2.4/nis/nss-nis.h glibc-2.5/nis/nss-nis.h --- glibc-2.4/nis/nss-nis.h 2004-04-02 09:15:04.000000000 +0000 +++ glibc-2.5/nis/nss-nis.h 2006-05-10 17:26:09.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,8 +25,8 @@ /* Convert YP error number to NSS error number. */ -extern const enum nss_status __yperr2nss_tab[]; -extern const unsigned int __yperr2nss_count; +extern const enum nss_status __yperr2nss_tab[] attribute_hidden; +extern const unsigned int __yperr2nss_count attribute_hidden; static inline enum nss_status yperr2nss (int errval) @@ -36,16 +36,24 @@ yperr2nss (int errval) return __yperr2nss_tab[(unsigned int) errval]; } -#define NSS_FLAG_SET 1 -#define NSS_FLAG_NETID_AUTHORITATIVE 2 -#define NSS_FLAG_SERVICES_AUTHORITATIVE 4 -extern int _nis_default_nss_flags attribute_hidden; -extern int _nis_check_default_nss (void) attribute_hidden; -extern inline __attribute__((always_inline)) int -_nis_default_nss (void) +struct response_t { - return _nis_default_nss_flags ?: _nis_check_default_nss (); -} + struct response_t *next; + size_t size; + char mem[0]; +}; + +typedef struct intern_t +{ + struct response_t *start; + struct response_t *next; + size_t offset; +} intern_t; + + +extern int _nis_saveit (int instatus, char *inkey, int inkeylen, char *inval, + int invallen, char *indata) attribute_hidden; + #endif /* nis/nss-nis.h */ diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-alias.c glibc-2.5/nis/nss_nisplus/nisplus-alias.c --- glibc-2.4/nis/nss_nisplus/nisplus-alias.c 2005-12-03 17:01:45.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-alias.c 2006-04-14 20:38:29.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -35,11 +36,11 @@ static u_long next_entry; static nis_name tablename_val; static size_t tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) static enum nss_status _nss_create_tablename (int *errnop) @@ -51,7 +52,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "mail_aliases.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -78,16 +79,12 @@ _nss_nisplus_parse_aliasent (nis_result return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of (&result->objects.objects_val[entry]) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val[entry].EN_data.en_type, + || __type_of (&NIS_RES_OBJECT (result)[entry]) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)[entry].EN_data.en_type, "mail_aliases") != 0 - || result->objects.objects_val[entry].EN_data.en_cols.en_cols_len < 2) + || NIS_RES_OBJECT (result)[entry].EN_data.en_cols.en_cols_len < 2) return 0; - char *first_unused = buffer + NISENTRYLEN (0, 1, result) + 1; - size_t room_left = (buflen - (buflen % __alignof__ (char *)) - - NISENTRYLEN (0, 1, result) - 2); - if (NISENTRYLEN (entry, 1, result) >= buflen) { /* The line is too long for our buffer. */ @@ -100,13 +97,15 @@ _nss_nisplus_parse_aliasent (nis_result NISENTRYLEN (entry, 1, result)); *cp = '\0'; - if (NISENTRYLEN(entry, 0, result) >= room_left) - goto no_more_room; + char *first_unused = cp + 1; + size_t room_left = buflen - (first_unused - buffer); alias->alias_local = 0; alias->alias_members_len = 0; - *first_unused = '\0'; - ++first_unused; + + if (NISENTRYLEN (entry, 0, result) >= room_left) + goto no_more_room; + cp = __stpncpy (first_unused, NISENTRYVAL (entry, 0, result), NISENTRYLEN (entry, 0, result)); *cp = '\0'; @@ -117,11 +116,20 @@ _nss_nisplus_parse_aliasent (nis_result if (cp != NULL) *cp = '\0'; - first_unused += strlen (alias->alias_name) +1; + size_t len = strlen (alias->alias_name) + 1; + first_unused += len; + room_left -= len; + /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust) + goto no_more_room; + first_unused += adjust; + room_left -= adjust; + alias->alias_members = (char **) first_unused; char *line = buffer; @@ -145,8 +153,10 @@ _nss_nisplus_parse_aliasent (nis_result if (line != alias->alias_members[alias->alias_members_len]) { *line++ = '\0'; - alias->alias_members_len++; + ++alias->alias_members_len; } + else if (*line == ',') + ++line; } return alias->alias_members_len == 0 ? 0 : 1; @@ -303,10 +313,18 @@ _nss_nisplus_getaliasbyname_r (const cha } if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0)) - return niserr2nss (result->status); + { + enum nss_status status = niserr2nss (result->status); + nis_freeresult (result); + return status; + } parse_res = _nss_nisplus_parse_aliasent (result, 0, alias, buffer, buflen, errnop); + + /* We do not need the lookup result anymore. */ + nis_freeresult (result); + if (__builtin_expect (parse_res < 1, 0)) { __set_errno (olderr); diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-ethers.c glibc-2.5/nis/nss_nisplus/nisplus-ethers.c --- glibc-2.4/nis/nss_nisplus/nisplus-ethers.c 2005-12-03 21:45:55.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-ethers.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -38,11 +38,11 @@ static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].zo_data.objdata_u.en_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].zo_data.objdata_u.en_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len) static int _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether, @@ -55,7 +55,7 @@ _nss_nisplus_parse_etherent (nis_result return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || result->objects.objects_len != 1 + || NIS_RES_NUMOBJ (result) != 1 || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "ethers_tbl") != 0 @@ -63,13 +63,15 @@ _nss_nisplus_parse_etherent (nis_result return 0; /* Generate the ether entry format and use the normal parser */ - if (NISENTRYLEN (0, 0, result) +1 > room_left) + if (NISENTRYLEN (0, 0, result) + 1 > room_left) { *errnop = ERANGE; return -1; } - strncpy (p, NISENTRYVAL (0, 0, result), NISENTRYLEN (0, 0, result)); - room_left -= (NISENTRYLEN (0, 0, result) +1); + char *cp = __stpncpy (p, NISENTRYVAL (0, 0, result), + NISENTRYLEN (0, 0, result)); + *cp = '\0'; + room_left -= NISENTRYLEN (0, 0, result) + 1; ether->e_name = p; struct ether_addr *ea = ether_aton (NISENTRYVAL (0, 1, result)); @@ -94,7 +96,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "ethers.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -174,6 +176,11 @@ internal_nisplus_getetherent_r (struct e { saved_result = NULL; result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } @@ -181,6 +188,11 @@ internal_nisplus_getetherent_r (struct e { saved_result = result; result = nis_next_entry (tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_result); @@ -261,17 +273,18 @@ _nss_nisplus_gethostton_r (const char *n int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, buflen, errnop); + + /* We do not need the lookup result anymore. */ + nis_freeresult (result); + if (__builtin_expect (parse_res < 1, 0)) { __set_errno (olderr); if (parse_res == -1) - { - nis_freeresult (result); - return NSS_STATUS_TRYAGAIN; - } - else - return NSS_STATUS_NOTFOUND; + return NSS_STATUS_TRYAGAIN; + + return NSS_STATUS_NOTFOUND; } return NSS_STATUS_SUCCESS; @@ -326,13 +339,14 @@ _nss_nisplus_getntohost_r (const struct int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer, buflen, errnop); + + /* We do not need the lookup result anymore. */ + nis_freeresult (result); + if (__builtin_expect (parse_res < 1, 0)) { if (parse_res == -1) - { - nis_freeresult (result); - return NSS_STATUS_TRYAGAIN; - } + return NSS_STATUS_TRYAGAIN; return NSS_STATUS_NOTFOUND; } diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-grp.c glibc-2.5/nis/nss_nisplus/nisplus-grp.c --- glibc-2.4/nis/nss_nisplus/nisplus-grp.c 2005-12-03 05:04:16.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-grp.c 2006-05-20 19:20:19.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -28,12 +29,23 @@ #include "nss-nisplus.h" #include "nisplus-parser.h" +#include +#include +#include __libc_lock_define_initialized (static, lock); -static nis_result *result; -static unsigned long next_entry; +/* Connection information. */ +static ib_request *ibreq; +static directory_obj *dir; +static dir_binding bptr; +static char *tablepath; +static char *tableptr; +/* Cursor. */ +static netobj cursor; + + static nis_name tablename_val; static size_t tablename_len; @@ -47,7 +59,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "group.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -65,43 +77,57 @@ _nss_create_tablename (int *errnop) return NSS_STATUS_SUCCESS; } -static enum nss_status -internal_setgrent (void) + +static void +internal_endgrent (void) { - enum nss_status status; + __nisbind_destroy (&bptr); + memset (&bptr, '\0', sizeof (bptr)); - if (result != NULL) - { - nis_freeresult (result); - result = NULL; - } - next_entry = 0; + nis_free_directory (dir); + dir = NULL; + + nis_free_request (ibreq); + ibreq = NULL; + + xdr_free ((xdrproc_t) xdr_netobj, (char *) &cursor); + memset (&cursor, '\0', sizeof (cursor)); + + free (tablepath); + tableptr = tablepath = NULL; +} + + +static enum nss_status +internal_setgrent (int *errnop) +{ + enum nss_status status = NSS_STATUS_SUCCESS; if (tablename_val == NULL) - { - int err; - if (_nss_create_tablename (&err) != NSS_STATUS_SUCCESS) - return NSS_STATUS_UNAVAIL; - } + status = _nss_create_tablename (errnop); - result = nis_list (tablename_val, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL); - if (result == NULL) + if (status == NSS_STATUS_SUCCESS) { - status = NSS_STATUS_TRYAGAIN; - __set_errno (ENOMEM); - } - else - { - status = niserr2nss (result->status); - if (status != NSS_STATUS_SUCCESS) + ibreq = __create_ib_request (tablename_val, 0); + if (ibreq == NULL) { - nis_freeresult (result); - result = NULL; + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } + + nis_error retcode = __prepare_niscall (tablename_val, &dir, &bptr, 0); + if (retcode != NIS_SUCCESS) + { + nis_free_request (ibreq); + ibreq = NULL; + status = niserr2nss (retcode); } } + return status; } + enum nss_status _nss_nisplus_setgrent (int stayopen) { @@ -109,60 +135,133 @@ _nss_nisplus_setgrent (int stayopen) __libc_lock_lock (lock); - status = internal_setgrent (); + internal_endgrent (); + + // XXX We need to be able to set errno. Pass in new parameter. + int err; + status = internal_setgrent (&err); __libc_lock_unlock (lock); return status; } + enum nss_status _nss_nisplus_endgrent (void) { __libc_lock_lock (lock); - if (result != NULL) - { - nis_freeresult (result); - result = NULL; - } + internal_endgrent (); __libc_lock_unlock (lock); return NSS_STATUS_SUCCESS; } + static enum nss_status internal_nisplus_getgrent_r (struct group *gr, char *buffer, size_t buflen, int *errnop) { - int parse_res; - - if (result == NULL) - { - enum nss_status status; - - status = internal_setgrent (); - if (result == NULL || status != NSS_STATUS_SUCCESS) - return status; - } + int parse_res = -1; + enum nss_status retval = NSS_STATUS_SUCCESS; /* Get the next entry until we found a correct one. */ do { - if (next_entry >= result->objects.objects_len) - return NSS_STATUS_NOTFOUND; + nis_error status; + nis_result result; + memset (&result, '\0', sizeof (result)); + + if (cursor.n_bytes == NULL) + { + if (ibreq == NULL) + { + retval = internal_setgrent (errnop); + if (retval != NSS_STATUS_SUCCESS) + return retval; + } + + status = __do_niscall3 (&bptr, NIS_IBFIRST, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, + (xdrproc_t) _xdr_nis_result, + (caddr_t) &result, + 0, NULL); + } + else + { + ibreq->ibr_cookie.n_bytes = cursor.n_bytes; + ibreq->ibr_cookie.n_len = cursor.n_len; + + status = __do_niscall3 (&bptr, NIS_IBNEXT, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, + (xdrproc_t) _xdr_nis_result, + (caddr_t) &result, + 0, NULL); - parse_res = _nss_nisplus_parse_grent (result, next_entry, gr, + ibreq->ibr_cookie.n_bytes = NULL; + ibreq->ibr_cookie.n_len = 0; + } + + if (status != NIS_SUCCESS) + return niserr2nss (status); + + if (NIS_RES_STATUS (&result) == NIS_NOTFOUND) + { + /* No more entries on this server. This means we have to go + to the next server on the path. */ + status = __follow_path (&tablepath, &tableptr, ibreq, &bptr); + if (status != NIS_SUCCESS) + return niserr2nss (status); + + directory_obj *newdir = NULL; + dir_binding newbptr; + status = __prepare_niscall (ibreq->ibr_name, &newdir, &newbptr, 0); + if (status != NIS_SUCCESS) + return niserr2nss (status); + + nis_free_directory (dir); + dir = newdir; + __nisbind_destroy (&bptr); + bptr = newbptr; + + xdr_free ((xdrproc_t) xdr_netobj, (char *) &result.cookie); + result.cookie.n_bytes = NULL; + result.cookie.n_len = 0; + parse_res = 0; + goto next; + } + else if (NIS_RES_STATUS (&result) != NIS_SUCCESS) + return niserr2nss (NIS_RES_STATUS (&result)); + + parse_res = _nss_nisplus_parse_grent (&result, gr, buffer, buflen, errnop); - if (parse_res == -1) - return NSS_STATUS_TRYAGAIN; + if (__builtin_expect (parse_res == -1, 0)) + { + *errnop = ERANGE; + retval = NSS_STATUS_TRYAGAIN; + goto freeres; + } - ++next_entry; + next: + /* Free the old cursor. */ + xdr_free ((xdrproc_t) xdr_netobj, (char *) &cursor); + /* Remember the new one. */ + cursor.n_bytes = result.cookie.n_bytes; + cursor.n_len = result.cookie.n_len; + /* Free the result structure. NB: we do not remove the cookie. */ + result.cookie.n_bytes = NULL; + result.cookie.n_len = 0; + freeres: + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) &result); + memset (&result, '\0', sizeof (result)); } while (!parse_res); - return NSS_STATUS_SUCCESS; + return retval; } enum nss_status @@ -226,7 +325,7 @@ _nss_nisplus_getgrnam_r (const char *nam return status; } - parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, errnop); + parse_res = _nss_nisplus_parse_grent (result, gr, buffer, buflen, errnop); nis_freeresult (result); if (__builtin_expect (parse_res < 1, 0)) { @@ -287,7 +386,7 @@ _nss_nisplus_getgrgid_r (const gid_t gid return status; } - parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen, errnop); + parse_res = _nss_nisplus_parse_grent (result, gr, buffer, buflen, errnop); nis_freeresult (result); if (__builtin_expect (parse_res < 1, 0)) diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-hosts.c glibc-2.5/nis/nss_nisplus/nisplus-hosts.c --- glibc-2.4/nis/nss_nisplus/nisplus-hosts.c 2005-12-03 17:47:33.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-hosts.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997-2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -36,15 +36,16 @@ static nis_result *result; static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) /* Get implementation for some internal functions. */ #include + static int _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host, char *buffer, size_t buflen, int *errnop, @@ -53,27 +54,26 @@ _nss_nisplus_parse_hostent (nis_result * unsigned int i; char *first_unused = buffer; size_t room_left = buflen; - char *data, *p, *line; if (result == NULL) return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) || - __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ || - strcmp(result->objects.objects_val[0].EN_data.en_type, - "hosts_tbl") != 0 || - result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 4) + __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ || + strcmp(NIS_RES_OBJECT (result)[0].EN_data.en_type, "hosts_tbl") != 0 || + NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 4) return 0; - if (room_left < NISENTRYLEN (0, 2, result) + 1) + char *data = first_unused; + + if (room_left < (af == AF_INET6 || (flags & AI_V4MAPPED) != 0 + ? IN6ADDRSZ : INADDRSZ)) { no_more_room: *errnop = ERANGE; return -1; } - data = first_unused; - /* Parse address. */ if (af == AF_INET && inet_pton (af, NISENTRYVAL (0, 2, result), data) > 0) { @@ -99,51 +99,53 @@ _nss_nisplus_parse_hostent (nis_result * /* Illegal address: ignore line. */ return 0; - first_unused+=host->h_length; - room_left-=host->h_length; + first_unused += host->h_length; + room_left -= host->h_length; if (NISENTRYLEN (0, 0, result) + 1 > room_left) goto no_more_room; - p = __stpncpy (first_unused, NISENTRYVAL (0, 0, result), - NISENTRYLEN (0, 0, result)); - *p = '\0'; - room_left -= (NISENTRYLEN (0, 0, result) + 1); host->h_name = first_unused; - first_unused += NISENTRYLEN (0, 0, result) +1; - p = first_unused; - - line = p; - for (i = 0; i < result->objects.objects_len; ++i) + first_unused = __stpncpy (first_unused, NISENTRYVAL (0, 0, result), + NISENTRYLEN (0, 0, result)); + *first_unused++ = '\0'; + room_left -= NISENTRYLEN (0, 0, result) + 1; + + /* XXX Rewrite at some point to allocate the array first and then + copy the strings. It wasteful to first concatenate the strings + to just split them again later. */ + char *line = first_unused; + for (i = 0; i < NIS_RES_NUMOBJ (result); ++i) { if (strcmp (NISENTRYVAL (i, 1, result), host->h_name) != 0) { if (NISENTRYLEN (i, 1, result) + 2 > room_left) goto no_more_room; - *p++ = ' '; - p = __stpncpy (p, NISENTRYVAL (i, 1, result), - NISENTRYLEN (i, 1, result)); - *p = '\0'; - room_left -= (NISENTRYLEN (i, 1, result) + 1); + *first_unused++ = ' '; + first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result), + NISENTRYLEN (i, 1, result)); + *first_unused = '\0'; + room_left -= NISENTRYLEN (i, 1, result) + 1; } } - *p++ = '\0'; - first_unused = p; + *first_unused++ = '\0'; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - host->h_addr_list = (char **) first_unused; - if (room_left < 2 * sizeof (char *)) + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust + 3 * sizeof (char *)) goto no_more_room; + first_unused += adjust; + room_left -= adjust; + host->h_addr_list = (char **) first_unused; - room_left -= (2 * sizeof (char *)); + room_left -= 3 * sizeof (char *); host->h_addr_list[0] = data; host->h_addr_list[1] = NULL; host->h_aliases = &host->h_addr_list[2]; - host->h_aliases[0] = NULL; i = 0; while (*line != '\0') @@ -159,23 +161,21 @@ _nss_nisplus_parse_hostent (nis_result * goto no_more_room; room_left -= sizeof (char *); - host->h_aliases[i] = line; + host->h_aliases[i++] = line; while (*line != '\0' && *line != ' ') ++line; if (*line == ' ') - { - *line = '\0'; - ++line; - ++i; - } - else - host->h_aliases[i+1] = NULL; + *line++ = '\0'; } + + host->h_aliases[i] = NULL; + return 1; } + static enum nss_status _nss_create_tablename (int *errnop) { @@ -186,7 +186,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "hosts.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -265,6 +265,11 @@ internal_nisplus_gethostent_r (struct ho } result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { enum nss_status retval = niserr2nss (result->status); @@ -279,11 +284,13 @@ internal_nisplus_gethostent_r (struct ho } else { - nis_result *res2; - saved_res = result; - res2 = nis_next_entry(tablename_val, &result->cookie); - result = res2; + result = nis_next_entry (tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { enum nss_status retval= niserr2nss (result->status); diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-netgrp.c glibc-2.5/nis/nss_nisplus/nisplus-netgrp.c --- glibc-2.4/nis/nss_nisplus/nisplus-netgrp.c 2005-12-03 22:11:34.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-netgrp.c 2006-04-24 04:22:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -27,11 +27,11 @@ #include "nss-nisplus.h" -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) enum nss_status _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-network.c glibc-2.5/nis/nss_nisplus/nisplus-network.c --- glibc-2.4/nis/nss_nisplus/nisplus-network.c 2005-12-03 22:35:12.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-network.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -36,11 +36,11 @@ static nis_result *result; static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) static int @@ -54,10 +54,10 @@ _nss_nisplus_parse_netent (nis_result *r return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val[0].EN_data.en_type, + || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)[0].EN_data.en_type, "networks_tbl") != 0 - || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 3) + || NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 3) return 0; if (NISENTRYLEN (0, 0, result) >= room_left) @@ -72,39 +72,45 @@ _nss_nisplus_parse_netent (nis_result *r NISENTRYLEN (0, 0, result)); first_unused[NISENTRYLEN (0, 0, result)] = '\0'; network->n_name = first_unused; - room_left -= (strlen (first_unused) +1); - first_unused += strlen (first_unused) +1; + size_t len = strlen (first_unused) + 1; + room_left -= len; + first_unused += len; + network->n_addrtype = 0; network->n_net = inet_network (NISENTRYVAL (0, 2, result)); - char *p = first_unused; - char *line = p; - for (unsigned int i = 0; i < result->objects.objects_len; ++i) + /* XXX Rewrite at some point to allocate the array first and then + copy the strings. It wasteful to first concatenate the strings + to just split them again later. */ + char *line = first_unused; + for (unsigned int i = 0; i < NIS_RES_NUMOBJ (result); ++i) { if (strcmp (NISENTRYVAL (i, 1, result), network->n_name) != 0) { if (NISENTRYLEN (i, 1, result) + 2 > room_left) goto no_more_room; - *p++ = ' '; - p = __stpncpy (p, NISENTRYVAL (i, 1, result), - NISENTRYLEN (i, 1, result)); - *p = '\0'; + *first_unused++ = ' '; + first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result), + NISENTRYLEN (i, 1, result)); room_left -= (NISENTRYLEN (i, 1, result) + 1); } } - *p++ = '\0'; - first_unused = p; + *first_unused++ = '\0'; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - network->n_aliases = (char **) first_unused; - if (room_left < 2 * sizeof (char *)) + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust + sizeof (char *)) goto no_more_room; - room_left -= (2 * sizeof (char *)); - network->n_aliases[0] = NULL; + first_unused += adjust; + room_left -= adjust; + network->n_aliases = (char **) first_unused; + + /* For the terminating NULL pointer. */ + room_left -= sizeof (char *); unsigned int i = 0; while (*line != '\0') @@ -120,24 +126,20 @@ _nss_nisplus_parse_netent (nis_result *r goto no_more_room; room_left -= sizeof (char *); - network->n_aliases[i] = line; + network->n_aliases[i++] = line; while (*line != '\0' && *line != ' ') ++line; if (*line == ' ') - { - *line = '\0'; - ++line; - ++i; - } - else - network->n_aliases[i + 1] = NULL; + *line++ = '\0'; } + network->n_aliases[i] = NULL; return 1; } + static enum nss_status _nss_create_tablename (int *errnop) { @@ -148,7 +150,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "networks.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -230,6 +232,11 @@ internal_nisplus_getnetent_r (struct net } result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { int retval = niserr2nss (result->status); @@ -247,9 +254,13 @@ internal_nisplus_getnetent_r (struct net } else { - nis_result *res = nis_next_entry (tablename_val, &result->cookie); saved_res = result; - result = res; + result = nis_next_entry (tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { int retval = niserr2nss (result->status); @@ -443,6 +454,7 @@ _nss_nisplus_getnetbyaddr_r (uint32_t ad removed (one by one) */ buf2[b2len - 2] = '\0'; b2len -= 2; + nis_freeresult (result); continue; } diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-parser.c glibc-2.5/nis/nss_nisplus/nisplus-parser.c --- glibc-2.4/nis/nss_nisplus/nisplus-parser.c 2004-10-24 21:23:20.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-parser.c 2006-05-20 19:17:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -25,33 +25,36 @@ #include "nisplus-parser.h" -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) + +#define NISOBJVAL(col, obj) \ + ((obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) + +#define NISOBJLEN(col, obj) \ + ((obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) int _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw, char *buffer, size_t buflen, int *errnop) { + if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) + || NIS_RES_NUMOBJ (result) != 1 + || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "passwd_tbl") != 0 + || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 7) + return 0; + + nis_object *obj = NIS_RES_OBJECT (result); char *first_unused = buffer; size_t room_left = buflen; size_t len; - if (result == NULL) - return 0; - - if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || result->objects.objects_len != 1 - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "passwd_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 7) - return 0; - - if (NISENTRYLEN (0, 0, result) >= room_left) + if (NISOBJLEN (0, obj) >= room_left) { /* The line is too long for our buffer. */ no_more_room: @@ -59,111 +62,109 @@ _nss_nisplus_parse_pwent (nis_result *re return -1; } - strncpy (first_unused, NISENTRYVAL (0, 0, result), - NISENTRYLEN (0, 0, result)); - first_unused[NISENTRYLEN (0, 0, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (0, obj), NISOBJLEN (0, obj)); + first_unused[NISOBJLEN (0, obj)] = '\0'; len = strlen (first_unused); if (len == 0) /* No name ? Should never happen, database is corrupt */ return 0; pw->pw_name = first_unused; - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN (0, 1, result) >= room_left) + if (NISOBJLEN (1, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 1, result), - NISENTRYLEN (0, 1, result)); - first_unused[NISENTRYLEN (0, 1, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (1, obj), NISOBJLEN (1, obj)); + first_unused[NISOBJLEN (1, obj)] = '\0'; pw->pw_passwd = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN(0, 2, result) >= room_left) - goto no_more_room; + char *numstr = NISOBJVAL (2, obj); + len = NISOBJLEN (2, obj); + if (len == 0 && numstr[len - 1] != '\0') + { + if (len >= room_left) + goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 2, result), - NISENTRYLEN (0, 2, result)); - first_unused[NISENTRYLEN (0, 2, result)] = '\0'; - len = strlen (first_unused); - if (len == 0) /* If we don't have a uid, it's an invalid shadow entry */ + strncpy (first_unused, numstr, len); + first_unused[len] = '\0'; + numstr = first_unused; + } + if (numstr[0] == '\0') + /* If we don't have a uid, it's an invalid shadow entry. */ return 0; - pw->pw_uid = strtoul (first_unused, NULL, 10); - room_left -= (len + 1); - first_unused += (len + 1); + pw->pw_uid = strtoul (numstr, NULL, 10); - if (NISENTRYLEN (0, 3, result) >= room_left) - goto no_more_room; + numstr = NISOBJVAL (3, obj); + len = NISOBJLEN (3, obj); + if (len == 0 && numstr[len - 1] != '\0') + { + if (len >= room_left) + goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 3, result), - NISENTRYLEN (0, 3, result)); - first_unused[NISENTRYLEN (0, 3, result)] = '\0'; - len = strlen (first_unused); - if (len == 0) /* If we don't have a gid, it's an invalid shadow entry */ + strncpy (first_unused, numstr, len); + first_unused[len] = '\0'; + numstr = first_unused; + } + if (numstr[0] == '\0') + /* If we don't have a gid, it's an invalid shadow entry. */ return 0; - pw->pw_gid = strtoul (first_unused, NULL, 10); - room_left -= (len + 1); - first_unused += (len + 1); + pw->pw_gid = strtoul (numstr, NULL, 10); - if (NISENTRYLEN(0, 4, result) >= room_left) + if (NISOBJLEN(4, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 4, result), - NISENTRYLEN (0, 4, result)); - first_unused[NISENTRYLEN (0, 4, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (4, obj), NISOBJLEN (4, obj)); + first_unused[NISOBJLEN (4, obj)] = '\0'; pw->pw_gecos = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN (0, 5, result) >= room_left) + if (NISOBJLEN (5, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 5, result), - NISENTRYLEN (0, 5, result)); - first_unused[NISENTRYLEN (0, 5, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (5, obj), NISOBJLEN (5, obj)); + first_unused[NISOBJLEN (5, obj)] = '\0'; pw->pw_dir = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN (0, 6, result) >= room_left) + if (NISOBJLEN (6, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (0, 6, result), - NISENTRYLEN (0, 6, result)); - first_unused[NISENTRYLEN (0, 6, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (6, obj), NISOBJLEN (6, obj)); + first_unused[NISOBJLEN (6, obj)] = '\0'; pw->pw_shell = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; return 1; } -libnss_nisplus_hidden_def (_nss_nisplus_parse_pwent) + int -_nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr, +_nss_nisplus_parse_grent (nis_result *result, struct group *gr, char *buffer, size_t buflen, int *errnop) { + if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) + || __type_of(NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)[0].EN_data.en_type, "group_tbl") != 0 + || NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 4) + return 0; + + nis_object *obj = NIS_RES_OBJECT (result); char *first_unused = buffer; size_t room_left = buflen; char *line; int count; size_t len; - if (result == NULL) - return 0; - - if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of(result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val[entry].EN_data.en_type, - "group_tbl") != 0 - || result->objects.objects_val[entry].EN_data.en_cols.en_cols_len < 4) - return 0; - - if (NISENTRYLEN (entry, 0, result) >= room_left) + if (NISOBJLEN (0, obj) >= room_left) { /* The line is too long for our buffer. */ no_more_room: @@ -171,54 +172,59 @@ _nss_nisplus_parse_grent (nis_result *re return -1; } - strncpy (first_unused, NISENTRYVAL (entry, 0, result), - NISENTRYLEN (entry, 0, result)); - first_unused[NISENTRYLEN (entry, 0, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (0, obj), NISOBJLEN (0, obj)); + first_unused[NISOBJLEN (0, obj)] = '\0'; len = strlen (first_unused); if (len == 0) /* group table is corrupt */ return 0; gr->gr_name = first_unused; - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN (entry, 1, result) >= room_left) + if (NISOBJLEN (1, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (entry, 1, result), - NISENTRYLEN (entry, 1, result)); - first_unused[NISENTRYLEN (entry, 1, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (1, obj), NISOBJLEN (1, obj)); + first_unused[NISOBJLEN (1, obj)] = '\0'; gr->gr_passwd = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; - if (NISENTRYLEN (entry, 2, result) >= room_left) - goto no_more_room; + char *numstr = NISOBJVAL (2, obj); + len = NISOBJLEN (2, obj); + if (len == 0 || numstr[len - 1] != '\0') + { + if (len >= room_left) + goto no_more_room; - strncpy (first_unused, NISENTRYVAL (entry, 2, result), - NISENTRYLEN (entry, 2, result)); - first_unused[NISENTRYLEN (entry, 2, result)] = '\0'; - len = strlen (first_unused); - if (len == 0) /* We should always have an gid */ + strncpy (first_unused, numstr, len); + first_unused[len] = '\0'; + numstr = first_unused; + } + if (numstr[0] == '\0') + /* We should always have a gid. */ return 0; - gr->gr_gid = strtoul (first_unused, NULL, 10); - room_left -= (strlen (first_unused) + 1); - first_unused += strlen (first_unused) + 1; + gr->gr_gid = strtoul (numstr, NULL, 10); - if (NISENTRYLEN (entry, 3, result) >= room_left) + if (NISOBJLEN (3, obj) >= room_left) goto no_more_room; - strncpy (first_unused, NISENTRYVAL (entry, 3, result), - NISENTRYLEN (entry, 3, result)); - first_unused[NISENTRYLEN (entry, 3, result)] = '\0'; + strncpy (first_unused, NISOBJVAL (3, obj), NISOBJLEN (3, obj)); + first_unused[NISOBJLEN (3, obj)] = '\0'; line = first_unused; len = strlen (line); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust) + goto no_more_room; + first_unused += adjust; + room_left -= adjust; gr->gr_mem = (char **) first_unused; count = 0; @@ -243,12 +249,10 @@ _nss_nisplus_parse_grent (nis_result *re { int is = isspace (*line); - *line = '\0'; + *line++ = '\0'; if (is) while (*line != '\0' && (*line == ',' || isspace (*line))) ++line; - else - ++line; } } if (room_left < sizeof (char *)) @@ -258,7 +262,7 @@ _nss_nisplus_parse_grent (nis_result *re return 1; } -libnss_nisplus_hidden_def (_nss_nisplus_parse_grent) + int _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, @@ -272,11 +276,10 @@ _nss_nisplus_parse_spent (nis_result *re return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || result->objects.objects_len != 1 - || __type_of(result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "passwd_tbl") != 0 - || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 8) + || NIS_RES_NUMOBJ (result) != 1 + || __type_of(NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "passwd_tbl") != 0 + || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 8) return 0; if (NISENTRYLEN (0, 0, result) >= room_left) @@ -294,8 +297,8 @@ _nss_nisplus_parse_spent (nis_result *re if (len == 0) return 0; sp->sp_namp = first_unused; - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; if (NISENTRYLEN (0, 1, result) >= room_left) goto no_more_room; @@ -305,8 +308,8 @@ _nss_nisplus_parse_spent (nis_result *re first_unused[NISENTRYLEN (0, 1, result)] = '\0'; sp->sp_pwdp = first_unused; len = strlen (first_unused); - room_left -= (len + 1); - first_unused += (len + 1); + room_left -= len + 1; + first_unused += len + 1; sp->sp_lstchg = sp->sp_min = sp->sp_max = sp->sp_warn = sp->sp_inact = sp->sp_expire = -1; @@ -314,10 +317,8 @@ _nss_nisplus_parse_spent (nis_result *re if (NISENTRYLEN (0, 7, result) > 0) { - char *line, *cp; - - line = NISENTRYVAL (0, 7, result); - cp = strchr (line, ':'); + char *line = NISENTRYVAL (0, 7, result); + char *cp = strchr (line, ':'); if (cp == NULL) return 1; *cp++ = '\0'; @@ -373,4 +374,3 @@ _nss_nisplus_parse_spent (nis_result *re return 1; } -libnss_nisplus_hidden_def (_nss_nisplus_parse_spent) diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-proto.c glibc-2.5/nis/nss_nisplus/nisplus-proto.c --- glibc-2.4/nis/nss_nisplus/nisplus-proto.c 2005-12-03 19:33:09.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-proto.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -34,20 +35,20 @@ static nis_result *result; static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) + +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) static int -_nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto, +_nss_nisplus_parse_protoent (nis_result *result, struct protoent *proto, char *buffer, size_t buflen, int *errnop) { char *first_unused = buffer; size_t room_left = buflen; unsigned int i; - char *p, *line; if (result == NULL) return 0; @@ -70,41 +71,44 @@ _nss_nisplus_parse_protoent (nis_result NISENTRYLEN (0, 0, result)); first_unused[NISENTRYLEN (0, 0, result)] = '\0'; proto->p_name = first_unused; - room_left -= (strlen (first_unused) +1); - first_unused += strlen (first_unused) +1; + size_t len = strlen (first_unused) + 1; + room_left -= len; + first_unused += len; - if (NISENTRYLEN (0, 2, result) + 1 > room_left) - goto no_more_room; proto->p_proto = atoi (NISENTRYVAL (0, 2, result)); - p = first_unused; - line = p; - for (i = 0; i < result->objects.objects_len; ++i) + /* XXX Rewrite at some point to allocate the array first and then + copy the strings. It wasteful to first concatenate the strings + to just split them again later. */ + char *line = first_unused; + for (i = 0; i < NIS_RES_NUMOBJ (result); ++i) { if (strcmp (NISENTRYVAL (i, 1, result), proto->p_name) != 0) { if (NISENTRYLEN (i, 1, result) + 2 > room_left) goto no_more_room; - *p++ = ' '; - p = __stpncpy (p, NISENTRYVAL (i, 1, result), - NISENTRYLEN (i, 1, result)); - *p = '\0'; - room_left -= (NISENTRYLEN (i, 1, result) + 1); + *first_unused++ = ' '; + first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result), + NISENTRYLEN (i, 1, result)); + room_left -= NISENTRYLEN (i, 1, result) + 1; } } - *p++ = '\0'; - first_unused = p; + *first_unused++ = '\0'; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - proto->p_aliases = (char **) first_unused; - if (room_left < sizeof (char *)) + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust + sizeof (char *)) goto no_more_room; + first_unused += adjust; + room_left -= adjust; + proto->p_aliases = (char **) first_unused; + + /* For the terminating NULL pointer. */ room_left -= sizeof (char *); - proto->p_aliases[0] = NULL; i = 0; while (*line != '\0') @@ -119,20 +123,15 @@ _nss_nisplus_parse_protoent (nis_result goto no_more_room; room_left -= sizeof (char *); - proto->p_aliases[i] = line; + proto->p_aliases[i++] = line; while (*line != '\0' && *line != ' ') ++line; if (*line == ' ') - { - *line = '\0'; - ++line; - ++i; - } - else - proto->p_aliases[i+1] = NULL; + *line++ = '\0'; } + proto->p_aliases[i] = NULL; return 1; } @@ -147,7 +146,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "protocols.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -228,6 +227,11 @@ internal_nisplus_getprotoent_r (struct p } result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } @@ -235,7 +239,11 @@ internal_nisplus_getprotoent_r (struct p { saved_res = result; result = nis_next_entry (tablename_val, &result->cookie); - + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-publickey.c glibc-2.5/nis/nss_nisplus/nisplus-publickey.c --- glibc-2.4/nis/nss_nisplus/nisplus-publickey.c 2005-12-03 22:08:17.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-publickey.c 2006-04-30 15:35:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1997,1999,2001,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -91,20 +91,20 @@ _nss_nisplus_getpublickey (const char *n return retval; } - if (res->objects.objects_len > 1) + if (NIS_RES_NUMOBJ (res) > 1) { /* * More than one principal with same uid? * something wrong with cred table. Should be unique * Warn user and continue. */ - printf (_("DES entry for netname %s not unique\n"), netname); + syslog (LOG_ERR, _("DES entry for netname %s not unique\n"), netname); nis_freeresult (res); return NSS_STATUS_SUCCESS; } - len = ENTRY_LEN (res->objects.objects_val, 3); - memcpy (pkey, ENTRY_VAL (res->objects.objects_val,3), len); + len = ENTRY_LEN (NIS_RES_OBJECT (res), 3); + memcpy (pkey, ENTRY_VAL (NIS_RES_OBJECT (res),3), len); pkey[len] = 0; cptr = strchr (pkey, ':'); if (cptr) @@ -114,6 +114,7 @@ _nss_nisplus_getpublickey (const char *n return NSS_STATUS_SUCCESS; } + enum nss_status _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd, int *errnop) @@ -172,20 +173,20 @@ _nss_nisplus_getsecretkey (const char *n return retval; } - if (res->objects.objects_len > 1) + if (NIS_RES_NUMOBJ (res) > 1) { /* * More than one principal with same uid? * something wrong with cred table. Should be unique * Warn user and continue. */ - printf (_("DES entry for netname %s not unique\n"), netname); + syslog (LOG_ERR, _("DES entry for netname %s not unique\n"), netname); nis_freeresult (res); return NSS_STATUS_SUCCESS; } - len = ENTRY_LEN (res->objects.objects_val, 4); - memcpy (buf, ENTRY_VAL (res->objects.objects_val,4), len); + len = ENTRY_LEN (NIS_RES_OBJECT (res), 4); + memcpy (buf, ENTRY_VAL (NIS_RES_OBJECT (res), 4), len); buf[len] = '\0'; cptr = strchr (buf, ':'); if (cptr) @@ -204,6 +205,7 @@ _nss_nisplus_getsecretkey (const char *n return NSS_STATUS_SUCCESS; } + /* Parse information from the passed string. The format of the string passed is gid,grp,grp, ... */ static enum nss_status @@ -224,8 +226,12 @@ parse_grp_str (const char *s, gid_t *gid gidlen = 0; /* After strtoul() ep should point to the marker ',', which means - here starts a new value. */ - while (ep != NULL && *ep == ',') + here starts a new value. + + The Sun man pages show that GIDLIST should contain at least NGRPS + elements. Limiting the number written by this value is the best + we can do. */ + while (ep != NULL && *ep == ',' && gidlen < NGRPS) { ep++; s = ep; @@ -305,7 +311,7 @@ _nss_nisplus_netname2user (char netname[ return NSS_STATUS_UNAVAIL; } - if (res->objects.objects_len > 1) + if (NIS_RES_NUMOBJ (res) > 1) /* * A netname belonging to more than one principal? * Something wrong with cred table. should be unique. @@ -315,8 +321,8 @@ _nss_nisplus_netname2user (char netname[ _("netname2user: DES entry for %s in directory %s not unique"), netname, domain); - len = ENTRY_LEN (res->objects.objects_val, 0); - strncpy (principal, ENTRY_VAL (res->objects.objects_val, 0), len); + len = ENTRY_LEN (NIS_RES_OBJECT (res), 0); + strncpy (principal, ENTRY_VAL (NIS_RES_OBJECT (res), 0), len); principal[len] = '\0'; nis_freeresult (res); @@ -328,7 +334,7 @@ _nss_nisplus_netname2user (char netname[ * LOCAL entry in **local** cred table. */ domain = nis_local_directory (); - if ((strlen (principal) + strlen (domain) + 45) > (size_t) NIS_MAXNAMELEN) + if (strlen (principal) + strlen (domain) + 45 > (size_t) NIS_MAXNAMELEN) { syslog (LOG_ERR, _("netname2user: principal name `%s' too long"), principal); @@ -379,7 +385,7 @@ _nss_nisplus_netname2user (char netname[ return NSS_STATUS_UNAVAIL; } - if (res->objects.objects_len > 1) + if (NIS_RES_NUMOBJ (res) > 1) /* * A principal can have more than one LOCAL entry? * Something wrong with cred table. @@ -389,15 +395,16 @@ _nss_nisplus_netname2user (char netname[ _("netname2user: LOCAL entry for %s in directory %s not unique"), netname, domain); /* Fetch the uid */ - *uidp = strtoul (ENTRY_VAL (res->objects.objects_val, 2), NULL, 10); + *uidp = strtoul (ENTRY_VAL (NIS_RES_OBJECT (res), 2), NULL, 10); if (*uidp == 0) { syslog (LOG_ERR, _("netname2user: should not have uid 0")); + nis_freeresult (res); return NSS_STATUS_NOTFOUND; } - parse_grp_str (ENTRY_VAL (res->objects.objects_val, 3), + parse_grp_str (ENTRY_VAL (NIS_RES_OBJECT (res), 3), gidp, gidlenp, gidlist, errnop); nis_freeresult (res); diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-pwd.c glibc-2.5/nis/nss_nisplus/nisplus-pwd.c --- glibc-2.4/nis/nss_nisplus/nisplus-pwd.c 2005-12-03 20:39:34.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-pwd.c 2006-05-20 19:20:19.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1999,2001,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -27,10 +28,23 @@ #include "nss-nisplus.h" #include "nisplus-parser.h" +#include +#include +#include + __libc_lock_define_initialized (static, lock) -static nis_result *result; +/* Connection information. */ +static ib_request *ibreq; +static directory_obj *dir; +static dir_binding bptr; +static char *tablepath; +static char *tableptr; +/* Cursor. */ +static netobj cursor; + + nis_name pwd_tablename_val attribute_hidden; size_t pwd_tablename_len attribute_hidden; @@ -44,7 +58,7 @@ _nss_pwd_create_tablename (int *errnop) static const char prefix[] = "passwd.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (pwd_tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -68,99 +82,192 @@ _nss_pwd_create_tablename (int *errnop) } -enum nss_status -_nss_nisplus_setpwent (int stayopen) +static void +internal_nisplus_endpwent (void) { - enum nss_status status = NSS_STATUS_SUCCESS; + __nisbind_destroy (&bptr); + memset (&bptr, '\0', sizeof (bptr)); - __libc_lock_lock (lock); + nis_free_directory (dir); + dir = NULL; + + nis_free_request (ibreq); + ibreq = NULL; + + xdr_free ((xdrproc_t) xdr_netobj, (char *) &cursor); + memset (&cursor, '\0', sizeof (cursor)); + + free (tablepath); + tableptr = tablepath = NULL; +} - if (result != NULL) - { - nis_freeresult (result); - result = NULL; - } + +static enum nss_status +internal_nisplus_setpwent (int *errnop) +{ + enum nss_status status = NSS_STATUS_SUCCESS; if (pwd_tablename_val == NULL) + status = _nss_pwd_create_tablename (errnop); + + if (status == NSS_STATUS_SUCCESS) { - int err; - status = _nss_pwd_create_tablename (&err); + ibreq = __create_ib_request (pwd_tablename_val, 0); + if (ibreq == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } + + nis_error retcode = __prepare_niscall (pwd_tablename_val, &dir, + &bptr, 0); + if (retcode != NIS_SUCCESS) + { + nis_free_request (ibreq); + ibreq = NULL; + status = niserr2nss (retcode); + } } + return status; +} + + +enum nss_status +_nss_nisplus_setpwent (int stayopen) +{ + enum nss_status status; + + __libc_lock_lock (lock); + + internal_nisplus_endpwent (); + + // XXX We need to be able to set errno. Pass in new parameter. + int err; + status = internal_nisplus_setpwent (&err); + __libc_lock_unlock (lock); return status; } + enum nss_status _nss_nisplus_endpwent (void) { __libc_lock_lock (lock); - if (result != NULL) - { - nis_freeresult (result); - result = NULL; - } + internal_nisplus_endpwent (); __libc_lock_unlock (lock); return NSS_STATUS_SUCCESS; } + static enum nss_status internal_nisplus_getpwent_r (struct passwd *pw, char *buffer, size_t buflen, int *errnop) { - int parse_res; + int parse_res = -1; + enum nss_status retval = NSS_STATUS_SUCCESS; /* Get the next entry until we found a correct one. */ do { - nis_result *saved_res; + nis_error status; + nis_result result; + memset (&result, '\0', sizeof (result)); - if (result == NULL) + if (cursor.n_bytes == NULL) { - saved_res = NULL; - if (pwd_tablename_val == NULL) + if (ibreq == NULL) { - enum nss_status status = _nss_pwd_create_tablename (errnop); - - if (status != NSS_STATUS_SUCCESS) - return status; + retval = internal_nisplus_setpwent (errnop); + if (retval != NSS_STATUS_SUCCESS) + return retval; } - result = nis_first_entry (pwd_tablename_val); - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - return niserr2nss (result->status); + status = __do_niscall3 (&bptr, NIS_IBFIRST, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, + (xdrproc_t) _xdr_nis_result, + (caddr_t) &result, + 0, NULL); } else { - saved_res = result; - result = nis_next_entry (pwd_tablename_val, &result->cookie); - if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) - { - nis_freeresult (saved_res); - return niserr2nss (result->status); - } + ibreq->ibr_cookie.n_bytes = cursor.n_bytes; + ibreq->ibr_cookie.n_len = cursor.n_len; + + status = __do_niscall3 (&bptr, NIS_IBNEXT, + (xdrproc_t) _xdr_ib_request, + (caddr_t) ibreq, + (xdrproc_t) _xdr_nis_result, + (caddr_t) &result, + 0, NULL); + + ibreq->ibr_cookie.n_bytes = NULL; + ibreq->ibr_cookie.n_len = 0; } - parse_res = _nss_nisplus_parse_pwent (result, pw, buffer, + if (status != NIS_SUCCESS) + return niserr2nss (status); + + if (NIS_RES_STATUS (&result) == NIS_NOTFOUND) + { + /* No more entries on this server. This means we have to go + to the next server on the path. */ + status = __follow_path (&tablepath, &tableptr, ibreq, &bptr); + if (status != NIS_SUCCESS) + return niserr2nss (status); + + directory_obj *newdir = NULL; + dir_binding newbptr; + status = __prepare_niscall (ibreq->ibr_name, &newdir, &newbptr, 0); + if (status != NIS_SUCCESS) + return niserr2nss (status); + + nis_free_directory (dir); + dir = newdir; + __nisbind_destroy (&bptr); + bptr = newbptr; + + xdr_free ((xdrproc_t) xdr_netobj, (char *) &result.cookie); + result.cookie.n_bytes = NULL; + result.cookie.n_len = 0; + parse_res = 0; + goto next; + } + else if (NIS_RES_STATUS (&result) != NIS_SUCCESS) + return niserr2nss (NIS_RES_STATUS (&result)); + + parse_res = _nss_nisplus_parse_pwent (&result, pw, buffer, buflen, errnop); + if (__builtin_expect (parse_res == -1, 0)) { - nis_freeresult (result); - result = saved_res; *errnop = ERANGE; - return NSS_STATUS_TRYAGAIN; + retval = NSS_STATUS_TRYAGAIN; + goto freeres; } - if (saved_res) - nis_freeresult (saved_res); + next: + /* Free the old cursor. */ + xdr_free ((xdrproc_t) xdr_netobj, (char *) &cursor); + /* Remember the new one. */ + cursor.n_bytes = result.cookie.n_bytes; + cursor.n_len = result.cookie.n_len; + /* Free the result structure. NB: we do not remove the cookie. */ + result.cookie.n_bytes = NULL; + result.cookie.n_len = 0; + freeres: + xdr_free ((xdrproc_t) _xdr_nis_result, (char *) &result); + memset (&result, '\0', sizeof (result)); } while (!parse_res); - return NSS_STATUS_SUCCESS; + return retval; } enum nss_status diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-rpc.c glibc-2.5/nis/nss_nisplus/nisplus-rpc.c --- glibc-2.4/nis/nss_nisplus/nisplus-rpc.c 2005-12-03 19:54:38.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-rpc.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -34,11 +35,12 @@ static nis_result *result; static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) + +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) static int _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc, @@ -47,17 +49,16 @@ _nss_nisplus_parse_rpcent (nis_result *r char *first_unused = buffer; size_t room_left = buflen; unsigned int i; - char *p, *line; + char *line; if (result == NULL) return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val[0].EN_data.en_type, - "rpc_tbl") != 0 - || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 3) + || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)[0].EN_data.en_type, "rpc_tbl") != 0 + || NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 3) return 0; if (NISENTRYLEN (0, 0, result) >= room_left) @@ -70,37 +71,43 @@ _nss_nisplus_parse_rpcent (nis_result *r NISENTRYLEN (0, 0, result)); first_unused[NISENTRYLEN (0, 0, result)] = '\0'; rpc->r_name = first_unused; - room_left -= (strlen (first_unused) + 1); - first_unused += strlen (first_unused) + 1; + size_t len = strlen (first_unused) + 1; + room_left -= len; + first_unused += len; + rpc->r_number = atoi (NISENTRYVAL (0, 2, result)); - p = first_unused; - line = p; - for (i = 0; i < result->objects.objects_len; ++i) + /* XXX Rewrite at some point to allocate the array first and then + copy the strings. It wasteful to first concatenate the strings + to just split them again later. */ + line = first_unused; + for (i = 0; i < NIS_RES_NUMOBJ (result); ++i) { if (strcmp (NISENTRYVAL (i, 1, result), rpc->r_name) != 0) { if (NISENTRYLEN (i, 1, result) + 2 > room_left) goto no_more_room; - *p++ = ' '; - p = __stpncpy (p, NISENTRYVAL (i, 1, result), - NISENTRYLEN (i, 1, result)); - *p = '\0'; - room_left -= (NISENTRYLEN (i, 1, result) + 1); + *first_unused++ = ' '; + first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result), + NISENTRYLEN (i, 1, result)); + room_left -= NISENTRYLEN (i, 1, result) + 1; } } - ++p; - first_unused = p; + *first_unused++ = '\0'; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - rpc->r_aliases = (char **) first_unused; - if (room_left < sizeof (char *)) + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust + sizeof (char *)) goto no_more_room; + first_unused += adjust; + room_left -= adjust; + rpc->r_aliases = (char **) first_unused; + + /* For the terminating NULL pointer. */ room_left -= sizeof (char *); - rpc->r_aliases[0] = NULL; i = 0; while (*line != '\0') @@ -116,24 +123,20 @@ _nss_nisplus_parse_rpcent (nis_result *r goto no_more_room; room_left -= sizeof (char *); - rpc->r_aliases[i] = line; + rpc->r_aliases[i++] = line; while (*line != '\0' && *line != ' ') ++line; if (*line == ' ') - { - *line = '\0'; - ++line; - ++i; - } - else - rpc->r_aliases[i+1] = NULL; + *line++ = '\0'; } + rpc->r_aliases[i] = NULL; return 1; } + static enum nss_status _nss_create_tablename (int *errnop) { @@ -144,7 +147,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "rpc.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -226,6 +229,11 @@ internal_nisplus_getrpcent_r (struct rpc } result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } @@ -233,6 +241,11 @@ internal_nisplus_getrpcent_r (struct rpc { saved_res = result; result = nis_next_entry (tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-service.c glibc-2.5/nis/nss_nisplus/nisplus-service.c --- glibc-2.4/nis/nss_nisplus/nisplus-service.c 2005-12-03 20:11:34.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-service.c 2006-04-30 05:44:23.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -34,11 +35,12 @@ static nis_result *result; static nis_name tablename_val; static u_long tablename_len; -#define NISENTRYVAL(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val) +#define NISENTRYVAL(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val) + +#define NISENTRYLEN(idx, col, res) \ + (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) -#define NISENTRYLEN(idx,col,res) \ - ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len) static int _nss_nisplus_parse_servent (nis_result *result, struct servent *serv, @@ -51,10 +53,9 @@ _nss_nisplus_parse_servent (nis_result * return 0; if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, - "services_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4) + || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "services_tbl") != 0 + || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 4) return 0; if (NISENTRYLEN (0, 0, result) >= room_left) @@ -67,8 +68,9 @@ _nss_nisplus_parse_servent (nis_result * NISENTRYLEN (0, 0, result)); first_unused[NISENTRYLEN (0, 0, result)] = '\0'; serv->s_name = first_unused; - room_left -= (strlen (first_unused) +1); - first_unused += strlen (first_unused) +1; + size_t len = strlen (first_unused) + 1; + room_left -= len; + first_unused += len; if (NISENTRYLEN (0, 2, result) >= room_left) goto no_more_room; @@ -76,38 +78,43 @@ _nss_nisplus_parse_servent (nis_result * NISENTRYLEN (0, 2, result)); first_unused[NISENTRYLEN (0, 2, result)] = '\0'; serv->s_proto = first_unused; - room_left -= strlen (first_unused) + 1; - first_unused += strlen (first_unused) + 1; + len = strlen (first_unused) + 1; + room_left -= len; + first_unused += len; serv->s_port = htons (atoi (NISENTRYVAL (0, 3, result))); - char *p = first_unused; - char *line = p; - for (unsigned int i = 0; i < result->objects.objects_len; ++i) + /* XXX Rewrite at some point to allocate the array first and then + copy the strings. It wasteful to first concatenate the strings + to just split them again later. */ + char *line = first_unused; + for (unsigned int i = 0; i < NIS_RES_NUMOBJ (result); ++i) { if (strcmp (NISENTRYVAL (i, 1, result), serv->s_name) != 0) { if (NISENTRYLEN (i, 1, result) + 2 > room_left) goto no_more_room; - *p++ = ' '; - p = __stpncpy (p, NISENTRYVAL (i, 1, result), - NISENTRYLEN (i, 1, result)); - *p = '\0'; - room_left -= (NISENTRYLEN (i, 1, result) + 1); + *first_unused++ = ' '; + first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result), + NISENTRYLEN (i, 1, result)); + room_left -= NISENTRYLEN (i, 1, result) + 1; } } - *p++ = '\0'; - first_unused = p; + *first_unused++ = '\0'; /* Adjust the pointer so it is aligned for storing pointers. */ - first_unused += __alignof__ (char *) - 1; - first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *)); - serv->s_aliases = (char **) first_unused; - if (room_left < sizeof (char *)) + size_t adjust = ((__alignof__ (char *) + - (first_unused - (char *) 0) % __alignof__ (char *)) + % __alignof__ (char *)); + if (room_left < adjust + sizeof (char *)) goto no_more_room; + first_unused += adjust; + room_left -= adjust; + serv->s_aliases = (char **) first_unused; + + /* For the terminating NULL pointer. */ room_left -= (sizeof (char *)); - serv->s_aliases[0] = NULL; unsigned int i = 0; while (*line != '\0') @@ -123,24 +130,20 @@ _nss_nisplus_parse_servent (nis_result * goto no_more_room; room_left -= sizeof (char *); - serv->s_aliases[i] = line; + serv->s_aliases[i++] = line; while (*line != '\0' && *line != ' ') ++line; if (*line == ' ') - { - *line = '\0'; - ++line; - ++i; - } - else - serv->s_aliases[i+1] = NULL; + *line++ = '\0'; } + serv->s_aliases[i] = NULL; return 1; } + static enum nss_status _nss_create_tablename (int *errnop) { @@ -151,7 +154,7 @@ _nss_create_tablename (int *errnop) static const char prefix[] = "services.org_dir."; char *p = malloc (sizeof (prefix) + local_dir_len); - if (tablename_val == NULL) + if (p == NULL) { *errnop = errno; return NSS_STATUS_TRYAGAIN; @@ -231,6 +234,11 @@ internal_nisplus_getservent_r (struct se } result = nis_first_entry (tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } @@ -238,6 +246,11 @@ internal_nisplus_getservent_r (struct se { saved_res = result; result = nis_next_entry (tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); @@ -319,10 +332,10 @@ _nss_nisplus_getservbyname_r (const char database is correct, we should find it in the first case, too */ if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) - || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ - || strcmp (result->objects.objects_val->EN_data.en_type, + || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ + || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "services_tbl") != 0 - || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4) + || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 4) snprintf (buf, sizeof (buf), "[cname=%s,proto=%s],%s", name, protocol, tablename_val); else diff -uprN glibc-2.4/nis/nss_nisplus/nisplus-spwd.c glibc-2.5/nis/nss_nisplus/nisplus-spwd.c --- glibc-2.4/nis/nss_nisplus/nisplus-spwd.c 2005-12-03 20:38:57.000000000 +0000 +++ glibc-2.5/nis/nss_nisplus/nisplus-spwd.c 2006-04-30 05:44:23.000000000 +0000 @@ -99,6 +99,11 @@ internal_nisplus_getspent_r (struct spwd } result = nis_first_entry (pwd_tablename_val); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) return niserr2nss (result->status); } @@ -106,6 +111,11 @@ internal_nisplus_getspent_r (struct spwd { saved_res = result; result = nis_next_entry (pwd_tablename_val, &result->cookie); + if (result == NULL) + { + *errnop = errno; + return NSS_STATUS_TRYAGAIN; + } if (niserr2nss (result->status) != NSS_STATUS_SUCCESS) { nis_freeresult (saved_res); diff -uprN glibc-2.4/nis/nss-nisplus.h glibc-2.5/nis/nss-nisplus.h --- glibc-2.4/nis/nss-nisplus.h 2001-07-06 04:55:36.000000000 +0000 +++ glibc-2.5/nis/nss-nisplus.h 2006-05-10 17:24:35.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -26,8 +26,8 @@ /* Convert NIS+ error number to NSS error number. */ -extern const enum nss_status __niserr2nss_tab[]; -extern const unsigned int __niserr2nss_count; +extern const enum nss_status __niserr2nss_tab[] attribute_hidden; +extern const unsigned int __niserr2nss_count attribute_hidden; static inline enum nss_status niserr2nss (int errval) diff -uprN glibc-2.4/nis/rpcsvc/nislib.h glibc-2.5/nis/rpcsvc/nislib.h --- glibc-2.4/nis/rpcsvc/nislib.h 2001-07-06 04:55:37.000000000 +0000 +++ glibc-2.5/nis/rpcsvc/nislib.h 2006-08-07 16:01:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -276,7 +276,8 @@ extern nis_error __nisbind_create (dir_b extern nis_error __nisbind_connect (dir_binding *) __THROW; extern nis_error __nisbind_next (dir_binding *) __THROW; extern void __nisbind_destroy (dir_binding *) __THROW; -extern nis_error __nisfind_server (const_nis_name, directory_obj **) __THROW; +extern nis_error __nisfind_server (const_nis_name, int, directory_obj **) + __THROW; #endif diff -uprN glibc-2.4/nis/Versions glibc-2.5/nis/Versions --- glibc-2.4/nis/Versions 2002-02-01 23:11:22.000000000 +0000 +++ glibc-2.5/nis/Versions 2006-05-20 19:21:52.000000000 +0000 @@ -57,6 +57,10 @@ libnsl { GLIBC_2.2 { xdr_ypall; } + GLIBC_PRIVATE { + _nsl_default_nss; __prepare_niscall; __follow_path; __do_niscall3; + __create_ib_request; _xdr_ib_request; _xdr_nis_result; + } } libnss_compat { @@ -117,8 +121,7 @@ libnss_nisplus { _nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r; _nss_nisplus_getservent_r; _nss_nisplus_getspent_r; _nss_nisplus_getspnam_r; _nss_nisplus_netname2user; - _nss_nisplus_parse_grent; _nss_nisplus_parse_pwent; - _nss_nisplus_parse_spent; _nss_nisplus_setaliasent; + _nss_nisplus_setaliasent; _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent; _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent; _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent; diff -uprN glibc-2.4/nis/ypclnt.c glibc-2.5/nis/ypclnt.c --- glibc-2.4/nis/ypclnt.c 2006-02-22 10:02:50.000000000 +0000 +++ glibc-2.5/nis/ypclnt.c 2006-04-28 16:59:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 +/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -686,10 +686,10 @@ __xdr_ypresp_all (XDR *xdrs, struct ypre if we don't modify the length. So add an extra NUL character to avoid trouble with broken code. */ objp->status = YP_TRUE; - memcpy (key, resp.ypresp_all_u.val.key.keydat_val, keylen); - key[keylen] = '\0'; - memcpy (val, resp.ypresp_all_u.val.val.valdat_val, vallen); - val[vallen] = '\0'; + *((char *) __mempcpy (key, resp.ypresp_all_u.val.key.keydat_val, + keylen)) = '\0'; + *((char *) __mempcpy (val, resp.ypresp_all_u.val.val.valdat_val, + vallen)) = '\0'; xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp); if ((*objp->foreach) (objp->status, key, keylen, val, vallen, objp->data)) @@ -700,7 +700,7 @@ __xdr_ypresp_all (XDR *xdrs, struct ypre objp->status = resp.ypresp_all_u.val.stat; xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp); /* Sun says we don't need to make this call, but must return - immediatly. Since Solaris makes this call, we will call + immediately. Since Solaris makes this call, we will call the callback function, too. */ (*objp->foreach) (objp->status, NULL, 0, NULL, 0, objp->data); return TRUE; @@ -955,16 +955,22 @@ yp_update (char *domain, char *map, unsi args.update_args.datum.yp_buf_len = datalen; args.update_args.datum.yp_buf_val = data; - if ((r = yp_master (domain, map, &master)) != 0) + if ((r = yp_master (domain, map, &master)) != YPERR_SUCCESS) return r; if (!host2netname (servername, master, domain)) { fputs (_("yp_update: cannot convert host to netname\n"), stderr); + free (master); return YPERR_YPERR; } - if ((clnt = clnt_create (master, YPU_PROG, YPU_VERS, "tcp")) == NULL) + clnt = clnt_create (master, YPU_PROG, YPU_VERS, "tcp"); + + /* We do not need the string anymore. */ + free (master); + + if (clnt == NULL) { clnt_pcreateerror ("yp_update: clnt_create"); return YPERR_RPC; diff -uprN glibc-2.4/nis/ypupdate_xdr.c glibc-2.5/nis/ypupdate_xdr.c --- glibc-2.4/nis/ypupdate_xdr.c 2004-10-24 20:28:28.000000000 +0000 +++ glibc-2.5/nis/ypupdate_xdr.c 2006-05-12 02:36:19.000000000 +0000 @@ -50,6 +50,7 @@ xdr_ypupdate_args (XDR *xdrs, ypupdate_a return FALSE; return xdr_yp_buf (xdrs, &objp->datum); } +libnsl_hidden_def (xdr_ypupdate_args) bool_t xdr_ypdelete_args (XDR *xdrs, ypdelete_args *objp) @@ -58,3 +59,4 @@ xdr_ypdelete_args (XDR *xdrs, ypdelete_a return FALSE; return xdr_yp_buf (xdrs, &objp->key); } +libnsl_hidden_def (xdr_ypdelete_args) diff -uprN glibc-2.4/nis/yp_xdr.c glibc-2.5/nis/yp_xdr.c --- glibc-2.4/nis/yp_xdr.c 2004-10-24 20:28:28.000000000 +0000 +++ glibc-2.5/nis/yp_xdr.c 2006-05-12 02:45:10.000000000 +0000 @@ -103,6 +103,7 @@ xdr_ypreq_key (XDR *xdrs, ypreq_key *obj return FALSE; return xdr_keydat (xdrs, &objp->key); } +libnsl_hidden_def (xdr_ypreq_key) bool_t xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey *objp) @@ -111,6 +112,7 @@ xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey return FALSE; return xdr_mapname (xdrs, &objp->map); } +libnsl_hidden_def (xdr_ypreq_nokey) bool_t xdr_ypreq_xfr (XDR *xdrs, ypreq_xfr *objp) @@ -131,6 +133,7 @@ xdr_ypresp_val (XDR *xdrs, ypresp_val *o return FALSE; return xdr_valdat (xdrs, &objp->val); } +libnsl_hidden_def (xdr_ypresp_val) bool_t xdr_ypresp_key_val (XDR *xdrs, ypresp_key_val *objp) @@ -150,6 +153,7 @@ xdr_ypresp_master (XDR *xdrs, ypresp_mas return FALSE; return xdr_peername (xdrs, &objp->peer); } +libnsl_hidden_def (xdr_ypresp_master) bool_t xdr_ypresp_order (XDR *xdrs, ypresp_order *objp) @@ -158,6 +162,7 @@ xdr_ypresp_order (XDR *xdrs, ypresp_orde return FALSE; return xdr_u_int (xdrs, &objp->ordernum); } +libnsl_hidden_def (xdr_ypresp_order) bool_t xdr_ypresp_all (XDR *xdrs, ypresp_all *objp) @@ -193,6 +198,7 @@ xdr_ypmaplist (XDR *xdrs, ypmaplist *obj return xdr_pointer (xdrs, (char **) &objp->next, sizeof (ypmaplist), (xdrproc_t) xdr_ypmaplist); } +libnsl_hidden_def (xdr_ypmaplist) bool_t xdr_ypresp_maplist (XDR *xdrs, ypresp_maplist *objp) @@ -202,6 +208,7 @@ xdr_ypresp_maplist (XDR *xdrs, ypresp_ma return xdr_pointer (xdrs, (char **) &objp->maps, sizeof (ypmaplist), (xdrproc_t) xdr_ypmaplist); } +libnsl_hidden_def (xdr_ypresp_maplist) bool_t xdr_yppush_status (XDR *xdrs, yppush_status *objp) @@ -248,6 +255,7 @@ xdr_ypbind_resp (XDR *xdrs, ypbind_resp } return FALSE; } +libnsl_hidden_def (xdr_ypbind_resp) bool_t xdr_ypbind_setdom (XDR *xdrs, ypbind_setdom *objp) diff -uprN glibc-2.4/nptl/allocatestack.c glibc-2.5/nptl/allocatestack.c --- glibc-2.4/nptl/allocatestack.c 2006-02-13 01:20:39.000000000 +0000 +++ glibc-2.5/nptl/allocatestack.c 2006-08-23 17:39:47.000000000 +0000 @@ -211,6 +211,45 @@ get_cached_stack (size_t *sizep, void ** } +/* Free stacks until cache size is lower than LIMIT. */ +static void +free_stacks (size_t limit) +{ + /* We reduce the size of the cache. Remove the last entries until + the size is below the limit. */ + list_t *entry; + list_t *prev; + + /* Search from the end of the list. */ + list_for_each_prev_safe (entry, prev, &stack_cache) + { + struct pthread *curr; + + curr = list_entry (entry, struct pthread, list); + if (FREE_P (curr)) + { + /* Unlink the block. */ + list_del (entry); + + /* Account for the freed memory. */ + stack_cache_actsize -= curr->stackblock_size; + + /* Free the memory associated with the ELF TLS. */ + _dl_deallocate_tls (TLS_TPADJ (curr), false); + + /* Remove this block. This should never fail. If it does + something is really wrong. */ + if (munmap (curr->stackblock, curr->stackblock_size) != 0) + abort (); + + /* Maybe we have freed enough. */ + if (stack_cache_actsize <= limit) + break; + } + } +} + + /* Add a stack frame which is not used anymore to the stack. Must be called with the cache lock held. */ static inline void @@ -224,40 +263,15 @@ queue_stack (struct pthread *stack) stack_cache_actsize += stack->stackblock_size; if (__builtin_expect (stack_cache_actsize > stack_cache_maxsize, 0)) - { - /* We reduce the size of the cache. Remove the last entries - until the size is below the limit. */ - list_t *entry; - list_t *prev; - - /* Search from the end of the list. */ - list_for_each_prev_safe (entry, prev, &stack_cache) - { - struct pthread *curr; - - curr = list_entry (entry, struct pthread, list); - if (FREE_P (curr)) - { - /* Unlink the block. */ - list_del (entry); - - /* Account for the freed memory. */ - stack_cache_actsize -= curr->stackblock_size; + free_stacks (stack_cache_maxsize); +} - /* Free the memory associated with the ELF TLS. */ - _dl_deallocate_tls (TLS_TPADJ (curr), false); - /* Remove this block. This should never fail. If it - does something is really wrong. */ - if (munmap (curr->stackblock, curr->stackblock_size) != 0) - abort (); - - /* Maybe we have freed enough. */ - if (stack_cache_actsize <= stack_cache_maxsize) - break; - } - } - } +/* This function is called indirectly from the freeres code in libc. */ +void +__free_stack_cache (void) +{ + free_stacks (0); } @@ -365,12 +379,6 @@ allocate_stack (const struct pthread_att /* The process ID is also the same as that of the caller. */ pd->pid = THREAD_GETMEM (THREAD_SELF, pid); - /* List of robust mutexes. */ -#ifdef __PTHREAD_MUTEX_HAVE_PREV - pd->robust_list.__prev = &pd->robust_list; -#endif - pd->robust_list.__next = &pd->robust_list; - /* Allocate the DTV for this thread. */ if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL) { @@ -505,12 +513,6 @@ allocate_stack (const struct pthread_att /* The process ID is also the same as that of the caller. */ pd->pid = THREAD_GETMEM (THREAD_SELF, pid); - /* List of robust mutexes. */ -#ifdef __PTHREAD_MUTEX_HAVE_PREV - pd->robust_list.__prev = &pd->robust_list; -#endif - pd->robust_list.__next = &pd->robust_list; - /* Allocate the DTV for this thread. */ if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL) { @@ -634,6 +636,18 @@ allocate_stack (const struct pthread_att stillborn thread could be canceled while the lock is taken. */ pd->lock = LLL_LOCK_INITIALIZER; + /* The robust mutex lists also need to be initialized + unconditionally because the cleanup for the previous stack owner + might have happened in the kernel. */ + pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) + - offsetof (pthread_mutex_t, + __data.__list.__next)); + pd->robust_head.list_op_pending = NULL; +#ifdef __PTHREAD_MUTEX_HAVE_PREV + pd->robust_prev = &pd->robust_head; +#endif + pd->robust_head.list = &pd->robust_head; + /* We place the thread descriptor at the end of the stack. */ *pdp = pd; @@ -742,9 +756,7 @@ __reclaim_stacks (void) list_t *runp; list_for_each (runp, &stack_used) { - struct pthread *curp; - - curp = list_entry (runp, struct pthread, list); + struct pthread *curp = list_entry (runp, struct pthread, list); if (curp != self) { /* This marks the stack as free. */ @@ -758,6 +770,13 @@ __reclaim_stacks (void) } } + /* Reset the PIDs in any cached stacks. */ + list_for_each (runp, &stack_cache) + { + struct pthread *curp = list_entry (runp, struct pthread, list); + curp->pid = self->pid; + } + /* Add the stack of all running threads to the cache. */ list_splice (&stack_used, &stack_cache); diff -uprN glibc-2.4/nptl/ChangeLog glibc-2.5/nptl/ChangeLog --- glibc-2.4/nptl/ChangeLog 2006-03-06 01:41:08.000000000 +0000 +++ glibc-2.5/nptl/ChangeLog 2006-09-24 17:14:11.000000000 +0000 @@ -1,3 +1,428 @@ +2006-09-24 Ulrich Drepper + + [BZ #3251] + * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning. + Patch by Petr Baudis. + +2006-09-18 Jakub Jelinek + + * tst-kill4.c (do_test): Explicitly set tf thread's stack size. + + * tst-cancel2.c (tf): Loop as long as something was written. + +2006-09-12 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI + mutexes wake all mutexes. + * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment + WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. + * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. + +2006-09-12 Ulrich Drepper + + * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use + to guarantee the thread is always canceled. + +2006-09-08 Jakub Jelinek + + * tst-cond22.c: Include pthread.h instead of pthreadP.h. + Include stdlib.h. + * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only + increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. + +2006-09-08 Ulrich Drepper + + [BZ #3123] + * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't + increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. + * Makefile (tests): Add tst-cond22. + * tst-cond22.c: New file. + +2006-09-05 Ulrich Drepper + + [BZ #3124] + * descr.h (struct pthread): Add parent_cancelhandling. + * sysdeps/pthread/createthread.c (create_thread): Pass parent + cancelhandling value to child. + * pthread_create.c (start_thread): If parent thread was canceled + reset the SIGCANCEL mask. + * Makefile (tests): Add tst-cancel25. + * tst-cancel25.c: New file. + +2006-09-05 Jakub Jelinek + Ulrich Drepper + + * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement + counterp if it is already zero. + * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise.. + +2006-03-04 Jakub Jelinek + Roland McGrath + + * sysdeps/unix/sysv/linux/i386/lowlevellock.h + (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, + LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define. + (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, + lll_robust_mutex_cond_lock, lll_mutex_timedlock, + lll_robust_mutex_timedlock, lll_mutex_unlock, + lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. + Add _L_*_ symbols around the subsection. + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info. + * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise. + +2006-03-03 Jakub Jelinek + Roland McGrath + + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h + (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, + LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define. + (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, + lll_robust_mutex_cond_lock, lll_mutex_timedlock, + lll_robust_mutex_timedlock, lll_mutex_unlock, + lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. + Add _L_*_ symbols around the subsection. + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info. + * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise. + +2006-08-31 Ulrich Drepper + + * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last + change because it can disturb too much existing code. If real hard + reader preference is needed we'll introduce another type. + * sysdeps/pthread/pthread_rwlock_timedwrlock.c + (pthread_rwlock_timedwrlock): Likewise. + * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): + Likewise. + +2006-08-30 Ulrich Drepper + + * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect + reader preference. + * sysdeps/pthread/pthread_rwlock_timedwrlock.c + (pthread_rwlock_timedwrlock): Likewise. + * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): + Likewise. + +2006-08-25 Jakub Jelinek + + * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread): + Only define ifdef SHARED. + +2006-08-23 Ulrich Drepper + + * allocatestack.c (queue_stack): Move freeing of surplus stacks to... + (free_stacks): ...here. + (__free_stack_cache): New function. + * pthreadP.h: Declare __free_stack_cache. + * sysdeps/pthread/pthread-functions.h (pthread_functions): Add + ptr_freeres. + * init.c (pthread_functions): Initialize ptr_freeres. + * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread): + New freeres function. + +2006-07-30 Joseph S. Myers + + [BZ #3018] + * Makefile (extra-objs): Add modules to extra-test-objs instead. + +2006-08-20 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define + _XOPEN_REALTIME_THREADS. + +2006-08-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use + HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than + HAVE_CLOCK_GETTIME_VSYSCALL. + (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here. + +2006-08-14 Jakub Jelinek + + * sysdeps/unix/sysv/linux/bits/posix_opt.h + (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L. + * descr.h (struct priority_protection_data): New type. + (struct pthread): Add tpp field. + * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP, + PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP, + PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values. + * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust + TPP mutexes. + * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes. + * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise. + * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise. + * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise. + * tpp.c: New file. + * pthread_setschedparam.c (__pthread_setschedparam): Handle priority + boosted by TPP. + * pthread_setschedprio.c (pthread_setschedprio): Likewise. + * pthread_mutexattr_getprioceiling.c + (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is + in the SCHED_FIFO priority range. + * pthread_mutexattr_setprioceiling.c + (pthread_mutexattr_setprioceiling): Fix prioceiling validation. + * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail + if mutex is not TPP. Ceiling is now in __data.__lock. + * pthread_mutex_setprioceiling.c: Include stdbool.h. + (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling + is now in __data.__lock. Add locking. + * pthread_create.c (__free_tcb): Free pd->tpp structure. + * Makefile (libpthread-routines): Add tpp. + (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10. + * tst-tpp.h: New file. + * tst-mutexpp1.c: New file. + * tst-mutexpp6.c: New file. + * tst-mutexpp10.c: New file. + * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined. + * tst-mutex6.c (TEST_FUNCTION): Likewise. + +2006-08-12 Ulrich Drepper + + [BZ #2843] + * pthread_join.c (pthread_join): Account for self being canceled + when checking for deadlocks. + * tst-join5.c: Cleanups. Allow to be used in tst-join6. + (tf1): Don't print anything after pthread_join returns, this would be + another cancellation point. + (tf2): Likewise. + * tst-join6.c: New file. + * Makefile (tests): Add tst-join6. + +2006-08-03 Ulrich Drepper + + [BZ #2892] + * pthread_setspecific.c (__pthread_setspecific): Check + out-of-range index before checking for unused key. + + * sysdeps/pthread/gai_misc.h: New file. + +2006-08-01 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific + file. Don't use sysctl. + * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can + overwrite the file if this is likely not true. + +2006-07-31 Daniel Jacobowitz + + * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks. + * Makefile (tests): Add tst-getpid3. + * tst-getpid3.c: New file. + +2006-07-30 Roland McGrath + + * Makefile (libpthread-routines): Add ptw-sigsuspend. + + * sysdeps/unix/sysv/linux/i386/not-cancel.h + (pause_not_cancel): New macro. + (nanosleep_not_cancel): New macro. + (sigsuspend_not_cancel): New macro. + * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use + nanosleep_not_cancel macro from . + * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel + macro from . + +2006-07-28 Ulrich Drepper + Jakub Jelinek + + * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0 + notification of PI mutex. Add ENQUEUE_MUTEX_PI. + * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types. + * pthread_mutex_setprioceilining.c: Adjust for mutex type name change. + * pthread_mutex_init.c: Add support for priority inheritance mutex. + * pthread_mutex_lock.c: Likewise. + * pthread_mutex_timedlock.c: Likewise. + * pthread_mutex_trylock.c: Likewise. + * pthread_mutex_unlock.c: Likewise. + * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake + all mutexes. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise. + * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file. + * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add + pthread-pi-defines.sym. + * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI, + FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI. + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. + * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define + _POSIX_THREAD_PRIO_INHERIT to 200112L. + * tst-mutex1.c: Adjust to allow use in PI mutex test. + * tst-mutex2.c: Likewise. + * tst-mutex3.c: Likewise. + * tst-mutex4.c: Likewise. + * tst-mutex5.c: Likewise. + * tst-mutex6.c: Likewise. + * tst-mutex7.c: Likewise. + * tst-mutex7a.c: Likewise. + * tst-mutex8.c: Likewise. + * tst-mutex9.c: Likewise. + * tst-robust1.c: Likewise. + * tst-robust7.c: Likewise. + * tst-robust8.c: Likewise. + * tst-mutexpi1.c: New file. + * tst-mutexpi2.c: New file. + * tst-mutexpi3.c: New file. + * tst-mutexpi4.c: New file. + * tst-mutexpi5.c: New file. + * tst-mutexpi6.c: New file. + * tst-mutexpi7.c: New file. + * tst-mutexpi7a.c: New file. + * tst-mutexpi8.c: New file. + * tst-mutexpi9.c: New file. + * tst-robust1.c: New file. + * tst-robust2.c: New file. + * tst-robust3.c: New file. + * tst-robust4.c: New file. + * tst-robust5.c: New file. + * tst-robust6.c: New file. + * tst-robust7.c: New file. + * tst-robust8.c: New file. + * Makefile (tests): Add the new tests. + + * pthread_create.c (start_thread): Add some casts to avoid warnings. + * pthread_mutex_destroy.c: Remove unneeded label. + +2006-07-01 Ulrich Drepper + + * pthread_mutex_init.c (__pthread_mutex_init): Move some + computations to compile time. + +2006-06-04 Ulrich Drepper + + * sysdeps/pthread/pthread.h: Add pthread_equal inline version. + +2006-05-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden. + +2006-05-11 Ulrich Drepper + + * pthread_key_create.c (__pthread_key_create): Do away with + __pthread_keys_lock. + + * sysdeps/unix/sysv/linux/pthread_setaffinity.c + (__kernel_cpumask_size): Mark as hidden. + * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise. + + * sem_open.c (__sem_mappings_lock): Mark as hidden. + * semaphoreP.h (__sem_mappings_lock): Likewise. + +2006-05-10 Ulrich Drepper + + * pthread_atfork.c: Mark __dso_handle as hidden. + +2006-05-09 Ulrich Drepper + + [BZ #2644] + * sysdeps/pthread/unwind-forcedunwind.c: Different solution for + the reload problem. Change the one path in pthread_cancel_init + which causes the problem. Force gcc to reload. Simplify callers. + * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c + (_Unwind_GetBSP): Undo last patch. + +2006-05-07 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the + function pointer is reloaded after pthread_cancel_init calls. + + [BZ #2644] + * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions + pointers are reloaded after pthread_cancel_init calls. + +2006-05-01 Ulrich Drepper + + * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with + __always_inline. + +2006-04-27 Ulrich Drepper + + * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): + Allocate new object which is passed to timer_sigev_thread so that + the timer can be deleted before the new thread is scheduled. + +2006-04-26 Roland McGrath + + * sysdeps/x86_64/tls.h: Include inside [! __ASSEMBLER__]. + +2006-04-08 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion + suffix for conditional jumps. + * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise. + + * init.c (sigcancel_handler): Compare with correct PID even if the + thread is in the middle of a fork call. + (sighandler_setxid): Likewise. + Reported by Suzuki K P . + +2006-04-07 Jakub Jelinek + + * pthreadP.h (FUTEX_TID_MASK): Sync with kernel. + +2006-04-06 Ulrich Drepper + + * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit + fails [Coverity CID 105]. + +2006-04-05 Ulrich Drepper + + * sysdeps/pthread/pthread.h: Add nonnull attributes. + +2006-04-03 Steven Munroe + + [BZ #2505] + * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]: + Define __lll_rel_instr using lwsync. + +2006-03-27 Ulrich Drepper + + * allocatestack.c (allocate_stack): Always initialize robust_head. + * descr.h: Define struct robust_list_head. + (struct pthread): Use robust_list_head in robust mutex list definition. + Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX. + * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define. + (__pthread_initialize_minimal_internal): Register robust_list with + the kernel. + * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names. + Declare __set_robust_list_avail. + * pthread_create.c (start_thread): Register robust_list of new thread. + [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up + waiters. + * pthread_mutex_destroy.c: For robust mutexes don't look at the + number of users, it's unreliable. + * pthread_mutex_init.c: Allow use of pshared robust mutexes if + set_robust_list syscall is available. + * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename. + * pthread_mutex_lock.c: Simplify robust mutex code a bit. + Set robust_head.list_op_pending before trying to lock a robust mutex. + * pthread_mutex_timedlock.c: Likewise. + * pthread_mutex_trylock.c: Likewise. + * pthread_mutex_unlock.c: Likewise for unlocking. + * Makefile (tests): Add tst-robust8. + * tst-robust8.c: New file. + +2006-03-08 Andreas Schwab + + * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h + (DL_SYSINFO_IMPLEMENTATION): Add missing newline. + 2006-03-05 Roland McGrath * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes diff -uprN glibc-2.4/nptl/descr.h glibc-2.5/nptl/descr.h --- glibc-2.4/nptl/descr.h 2006-02-24 07:28:57.000000000 +0000 +++ glibc-2.5/nptl/descr.h 2006-09-24 17:10:55.000000000 +0000 @@ -102,6 +102,23 @@ struct xid_command }; +/* Data structure used by the kernel to find robust futexes. */ +struct robust_list_head +{ + void *list; + long int futex_offset; + void *list_op_pending; +}; + + +/* Data strcture used to handle thread priority protection. */ +struct priority_protection_data +{ + int priomax; + unsigned int priomap[]; +}; + + /* Thread descriptor data structure. */ struct pthread { @@ -136,47 +153,79 @@ struct pthread /* List of robust mutexes the thread is holding. */ #ifdef __PTHREAD_MUTEX_HAVE_PREV - __pthread_list_t robust_list; + void *robust_prev; + struct robust_list_head robust_head; + + /* The list above is strange. It is basically a double linked list + but the pointer to the next/previous element of the list points + in the middle of the object, the __next element. Whenever + casting to __pthread_list_t we need to adjust the pointer + first. */ +# define QUEUE_PTR_ADJUST (offsetof (__pthread_list_t, __next)) -# define ENQUEUE_MUTEX(mutex) \ +# define ENQUEUE_MUTEX_BOTH(mutex, val) \ do { \ - __pthread_list_t *next = THREAD_GETMEM (THREAD_SELF, robust_list.__next); \ - next->__prev = &mutex->__data.__list; \ - mutex->__data.__list.__next = next; \ - mutex->__data.__list.__prev = &THREAD_SELF->robust_list; \ - THREAD_SETMEM (THREAD_SELF, robust_list.__next, &mutex->__data.__list); \ + __pthread_list_t *next = (__pthread_list_t *) \ + ((((uintptr_t) THREAD_GETMEM (THREAD_SELF, robust_head.list)) & ~1ul) \ + - QUEUE_PTR_ADJUST); \ + next->__prev = (void *) &mutex->__data.__list.__next; \ + mutex->__data.__list.__next = THREAD_GETMEM (THREAD_SELF, \ + robust_head.list); \ + mutex->__data.__list.__prev = (void *) &THREAD_SELF->robust_head; \ + THREAD_SETMEM (THREAD_SELF, robust_head.list, \ + (void *) (((uintptr_t) &mutex->__data.__list.__next) \ + | val)); \ } while (0) # define DEQUEUE_MUTEX(mutex) \ do { \ - mutex->__data.__list.__next->__prev = mutex->__data.__list.__prev; \ - mutex->__data.__list.__prev->__next = mutex->__data.__list.__next; \ + __pthread_list_t *next = (__pthread_list_t *) \ + ((char *) (((uintptr_t) mutex->__data.__list.__next) & ~1ul) \ + - QUEUE_PTR_ADJUST); \ + next->__prev = mutex->__data.__list.__prev; \ + __pthread_list_t *prev = (__pthread_list_t *) \ + ((char *) (((uintptr_t) mutex->__data.__list.__prev) & ~1ul) \ + - QUEUE_PTR_ADJUST); \ + prev->__next = mutex->__data.__list.__next; \ mutex->__data.__list.__prev = NULL; \ mutex->__data.__list.__next = NULL; \ } while (0) #else - __pthread_slist_t robust_list; + union + { + __pthread_slist_t robust_list; + struct robust_list_head robust_head; + }; -# define ENQUEUE_MUTEX(mutex) \ +# define ENQUEUE_MUTEX_BOTH(mutex, val) \ do { \ mutex->__data.__list.__next \ = THREAD_GETMEM (THREAD_SELF, robust_list.__next); \ - THREAD_SETMEM (THREAD_SELF, robust_list.__next, &mutex->__data.__list); \ + THREAD_SETMEM (THREAD_SELF, robust_list.__next, \ + (void *) (((uintptr_t) &mutex->__data.__list) | val)); \ } while (0) # define DEQUEUE_MUTEX(mutex) \ do { \ - __pthread_slist_t *runp = THREAD_GETMEM (THREAD_SELF, robust_list.__next);\ + __pthread_slist_t *runp = (__pthread_slist_t *) \ + (((uintptr_t) THREAD_GETMEM (THREAD_SELF, robust_list.__next)) & ~1ul); \ if (runp == &mutex->__data.__list) \ THREAD_SETMEM (THREAD_SELF, robust_list.__next, runp->__next); \ else \ { \ - while (runp->__next != &mutex->__data.__list) \ - runp = runp->__next; \ + __pthread_slist_t *next = (__pthread_slist_t *) \ + (((uintptr_t) runp->__next) & ~1ul); \ + while (next != &mutex->__data.__list) \ + { \ + runp = next; \ + next = (__pthread_slist_t *) (((uintptr_t) runp->__next) & ~1ul); \ + } \ \ - runp->__next = runp->__next->__next; \ + runp->__next = next->__next; \ mutex->__data.__list.__next = NULL; \ } \ } while (0) #endif +#define ENQUEUE_MUTEX(mutex) ENQUEUE_MUTEX_BOTH (mutex, 0) +#define ENQUEUE_MUTEX_PI(mutex) ENQUEUE_MUTEX_BOTH (mutex, 1) /* List of cleanup buffers. */ struct _pthread_cleanup_buffer *cleanup; @@ -247,6 +296,10 @@ struct pthread /* True if thread must stop at startup time. */ bool stopped_start; + /* The parent's cancel handling at the time of the pthread_create + call. This might be needed to undo the effects of a cancellation. */ + int parent_cancelhandling; + /* Lock to synchronize access to the descriptor. */ lll_lock_t lock; @@ -302,6 +355,9 @@ struct pthread /* This is what the user specified and what we will report. */ size_t reported_guardsize; + /* Thread Priority Protection data. */ + struct priority_protection_data *tpp; + /* Resolver state. */ struct __res_state res; diff -uprN glibc-2.4/nptl/init.c glibc-2.5/nptl/init.c --- glibc-2.4/nptl/init.c 2006-02-13 01:22:36.000000000 +0000 +++ glibc-2.5/nptl/init.c 2006-08-23 17:41:31.000000000 +0000 @@ -60,6 +60,15 @@ size_t __static_tls_size; size_t __static_tls_align_m1; +#ifndef __ASSUME_SET_ROBUST_LIST +/* Negative if we do not have the system call and we can use it. */ +int __set_robust_list_avail; +# define set_robust_list_not_avail() \ + __set_robust_list_avail = -1 +#else +# define set_robust_list_not_avail() do { } while (0) +#endif + /* Version of the library, used in libthread_db to detect mismatches. */ static const char nptl_version[] __attribute_used__ = VERSION; @@ -127,7 +136,9 @@ static const struct pthread_functions pt .ptr_nthreads = &__nptl_nthreads, .ptr___pthread_unwind = &__pthread_unwind, .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd, - .ptr__nptl_setxid = __nptl_setxid + .ptr__nptl_setxid = __nptl_setxid, + /* For now only the stack cache needs to be freed. */ + .ptr_freeres = __free_stack_cache }; # define ptr_pthread_functions &pthread_functions #else @@ -139,6 +150,14 @@ static const struct pthread_functions pt static void sigcancel_handler (int sig, siginfo_t *si, void *ctx) { +#ifdef __ASSUME_CORRECT_SI_PID + /* Determine the process ID. It might be negative if the thread is + in the middle of a fork() call. */ + pid_t pid = THREAD_GETMEM (THREAD_SELF, pid); + if (__builtin_expect (pid < 0, 0)) + pid = -pid; +#endif + /* Safety check. It would be possible to call this function for other signals and send a signal from another process. This is not correct and might even be a security problem. Try to catch as @@ -147,7 +166,7 @@ sigcancel_handler (int sig, siginfo_t *s #ifdef __ASSUME_CORRECT_SI_PID /* Kernels before 2.5.75 stored the thread ID and not the process ID in si_pid so we skip this test. */ - || si->si_pid != THREAD_GETMEM (THREAD_SELF, pid) + || si->si_pid != pid #endif || si->si_code != SI_TKILL) return; @@ -192,6 +211,14 @@ struct xid_command *__xidcmd attribute_h static void sighandler_setxid (int sig, siginfo_t *si, void *ctx) { +#ifdef __ASSUME_CORRECT_SI_PID + /* Determine the process ID. It might be negative if the thread is + in the middle of a fork() call. */ + pid_t pid = THREAD_GETMEM (THREAD_SELF, pid); + if (__builtin_expect (pid < 0, 0)) + pid = -pid; +#endif + /* Safety check. It would be possible to call this function for other signals and send a signal from another process. This is not correct and might even be a security problem. Try to catch as @@ -200,7 +227,7 @@ sighandler_setxid (int sig, siginfo_t *s #ifdef __ASSUME_CORRECT_SI_PID /* Kernels before 2.5.75 stored the thread ID and not the process ID in si_pid so we skip this test. */ - || si->si_pid != THREAD_GETMEM (THREAD_SELF, pid) + || si->si_pid != pid #endif || si->si_code != SI_TKILL) return; @@ -247,10 +274,6 @@ __pthread_initialize_minimal_internal (v struct pthread *pd = THREAD_SELF; INTERNAL_SYSCALL_DECL (err); pd->pid = pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid); -#ifdef __PTHREAD_MUTEX_HAVE_PREV - pd->robust_list.__prev = &pd->robust_list; -#endif - pd->robust_list.__next = &pd->robust_list; THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]); THREAD_SETMEM (pd, user_stack, true); if (LLL_LOCK_INITIALIZER != 0) @@ -259,6 +282,21 @@ __pthread_initialize_minimal_internal (v THREAD_SETMEM (pd, cpuclock_offset, GL(dl_cpuclock_offset)); #endif + /* Initialize the robust mutex data. */ +#ifdef __PTHREAD_MUTEX_HAVE_PREV + pd->robust_prev = &pd->robust_head; +#endif + pd->robust_head.list = &pd->robust_head; +#ifdef __NR_set_robust_list + pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) + - offsetof (pthread_mutex_t, + __data.__list.__next)); + int res = INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head, + sizeof (struct robust_list_head)); + if (INTERNAL_SYSCALL_ERROR_P (res, err)) +#endif + set_robust_list_not_avail (); + /* Set initial thread's stack block from 0 up to __libc_stack_end. It will be bigger than it actually is, but for unwind.c/pt-longjmp.c purposes this is good enough. */ diff -uprN glibc-2.4/nptl/Makefile glibc-2.5/nptl/Makefile --- glibc-2.4/nptl/Makefile 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/Makefile 2006-09-08 10:40:49.000000000 +0000 @@ -108,7 +108,7 @@ libpthread-routines = init vars events v ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \ ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \ ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \ - ptw-sigwait \ + ptw-sigwait ptw-sigsuspend \ pt-raise pt-system \ flockfile ftrylockfile funlockfile \ sigaction \ @@ -122,7 +122,7 @@ libpthread-routines = init vars events v pthread_mutexattr_getprotocol \ pthread_mutexattr_setprotocol \ pthread_mutexattr_getprioceiling \ - pthread_mutexattr_setprioceiling \ + pthread_mutexattr_setprioceiling tpp \ pthread_mutex_getprioceiling pthread_mutex_setprioceiling # pthread_setuid pthread_seteuid pthread_setreuid \ # pthread_setresuid \ @@ -200,13 +200,18 @@ tests = tst-typesizes \ tst-attr1 tst-attr2 tst-attr3 \ tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex5 tst-mutex6 \ tst-mutex7 tst-mutex8 tst-mutex9 tst-mutex5a tst-mutex7a \ + tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ + tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ + tst-mutexpi9 \ tst-spin1 tst-spin2 tst-spin3 \ tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ - tst-cond20 tst-cond21 \ + tst-cond20 tst-cond21 tst-cond22 \ tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ - tst-robust6 tst-robust7 \ + tst-robust6 tst-robust7 tst-robust8 \ + tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 \ + tst-robustpi5 tst-robustpi6 tst-robustpi7 tst-robustpi8 \ tst-rwlock1 tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 \ tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 \ tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \ @@ -219,7 +224,7 @@ tests = tst-typesizes \ tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \ tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ tst-raise1 \ - tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 \ + tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-join6 \ tst-detach1 \ tst-eintr1 tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 \ tst-tsd1 tst-tsd2 tst-tsd3 tst-tsd4 tst-tsd5 \ @@ -230,7 +235,7 @@ tests = tst-typesizes \ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ - tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 \ + tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \ tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \ tst-flock1 tst-flock2 \ tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \ @@ -251,9 +256,9 @@ tests = tst-typesizes \ tst-backtrace1 \ tst-oddstacklimit \ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ - tst-getpid1 tst-getpid2 \ + tst-getpid1 tst-getpid2 tst-getpid3 \ tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99) -xtests = tst-setuid1 tst-setuid1-static +xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 # Files which must not be linked with libpthread. tests-nolibpthread = tst-unload @@ -292,7 +297,7 @@ modules-names = tst-atfork2mod tst-tls3m tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \ tst-tls5modd tst-tls5mode tst-tls5modf \ tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod -extra-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o +extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o test-extras += $(modules-names) test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) diff -uprN glibc-2.4/nptl/pthread_atfork.c glibc-2.5/nptl/pthread_atfork.c --- glibc-2.4/nptl/pthread_atfork.c 2004-08-16 05:17:32.000000000 +0000 +++ glibc-2.5/nptl/pthread_atfork.c 2006-05-10 22:15:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -38,7 +38,8 @@ #include /* This is defined by newer gcc version unique for each module. */ -extern void *__dso_handle __attribute__ ((__weak__)); +extern void *__dso_handle __attribute__ ((__weak__, + __visibility__ ("hidden"))); /* Hide the symbol so that no definition but the one locally in the diff -uprN glibc-2.4/nptl/pthread_create.c glibc-2.5/nptl/pthread_create.c --- glibc-2.4/nptl/pthread_create.c 2006-02-15 16:53:15.000000000 +0000 +++ glibc-2.5/nptl/pthread_create.c 2006-09-05 17:12:15.000000000 +0000 @@ -206,6 +206,15 @@ __free_tcb (struct pthread *pd) running thread is gone. */ abort (); + /* Free TPP data. */ + if (__builtin_expect (pd->tpp != NULL, 0)) + { + struct priority_protection_data *tpp = pd->tpp; + + pd->tpp = NULL; + free (tpp); + } + /* Queue the stack memory block for reuse and exit the process. The kernel will signal via writing to the address returned by QUEUE-STACK when the stack is available. */ @@ -229,6 +238,32 @@ start_thread (void *arg) /* Initialize resolver state pointer. */ __resp = &pd->res; +#ifdef __NR_set_robust_list +# ifndef __ASSUME_SET_ROBUST_LIST + if (__set_robust_list_avail >= 0) +# endif + { + INTERNAL_SYSCALL_DECL (err); + /* This call should never fail because the initial call in init.c + succeeded. */ + INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head, + sizeof (struct robust_list_head)); + } +#endif + + /* If the parent was running cancellation handlers while creating + the thread the new thread inherited the signal mask. Reset the + cancellation signal mask. */ + if (__builtin_expect (pd->parent_cancelhandling & CANCELING_BITMASK, 0)) + { + INTERNAL_SYSCALL_DECL (err); + sigset_t mask; + __sigemptyset (&mask); + __sigaddset (&mask, SIGCANCEL); + (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &mask, + NULL, _NSIG / 8); + } + /* This is where the try/finally block should be created. For compilers without that support we do use setjmp. */ struct pthread_unwind_buf unwind_buf; @@ -310,35 +345,36 @@ start_thread (void *arg) the breakpoint reports TD_THR_RUN state rather than TD_THR_ZOMBIE. */ atomic_bit_set (&pd->cancelhandling, EXITING_BIT); +#ifndef __ASSUME_SET_ROBUST_LIST /* If this thread has any robust mutexes locked, handle them now. */ -#if __WORDSIZE == 64 - __pthread_list_t *robust = pd->robust_list.__next; -#else +# if __WORDSIZE == 64 + void *robust = pd->robust_head.list; +# else __pthread_slist_t *robust = pd->robust_list.__next; -#endif - if (__builtin_expect (robust != &pd->robust_list, 0)) +# endif + /* We let the kernel do the notification if it is able to do so. + If we have to do it here there for sure are no PI mutexes involved + since the kernel support for them is even more recent. */ + if (__set_robust_list_avail < 0 + && __builtin_expect (robust != (void *) &pd->robust_head, 0)) { do { struct __pthread_mutex_s *this = (struct __pthread_mutex_s *) - ((char *) robust - offsetof (struct __pthread_mutex_s, __list)); - robust = robust->__next; + ((char *) robust - offsetof (struct __pthread_mutex_s, + __list.__next)); + robust = *((void **) robust); - this->__list.__next = NULL; -#ifdef __PTHREAD_MUTEX_HAVE_PREV +# ifdef __PTHREAD_MUTEX_HAVE_PREV this->__list.__prev = NULL; -#endif +# endif + this->__list.__next = NULL; lll_robust_mutex_dead (this->__lock); } - while (robust != &pd->robust_list); - - /* Clean up so that the thread descriptor can be reused. */ - pd->robust_list.__next = &pd->robust_list; -#ifdef __PTHREAD_MUTEX_HAVE_PREV - pd->robust_list.__prev = &pd->robust_list; -#endif + while (robust != (void *) &pd->robust_head); } +#endif /* If the thread is detached free the TCB. */ if (IS_DETACHED (pd)) diff -uprN glibc-2.4/nptl/pthread_getattr_np.c glibc-2.5/nptl/pthread_getattr_np.c --- glibc-2.4/nptl/pthread_getattr_np.c 2004-04-16 23:49:09.000000000 +0000 +++ glibc-2.5/nptl/pthread_getattr_np.c 2006-04-07 04:26:42.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -83,51 +83,55 @@ pthread_getattr_np (thread_id, attr) if (fp == NULL) ret = errno; /* We need the limit of the stack in any case. */ - else if (getrlimit (RLIMIT_STACK, &rl) != 0) - ret = errno; else { - /* We need no locking. */ - __fsetlocking (fp, FSETLOCKING_BYCALLER); - - /* Until we found an entry (which should always be the case) - mark the result as a failure. */ - ret = ENOENT; - - char *line = NULL; - size_t linelen = 0; - uintptr_t last_to = 0; - - while (! feof_unlocked (fp)) + if (getrlimit (RLIMIT_STACK, &rl) != 0) + ret = errno; + else { - if (__getdelim (&line, &linelen, '\n', fp) <= 0) - break; + /* We need no locking. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); - uintptr_t from; - uintptr_t to; - if (sscanf (line, "%" SCNxPTR "-%" SCNxPTR, &from, &to) != 2) - continue; - if (from <= (uintptr_t) __libc_stack_end - && (uintptr_t) __libc_stack_end < to) + /* Until we found an entry (which should always be the case) + mark the result as a failure. */ + ret = ENOENT; + + char *line = NULL; + size_t linelen = 0; + uintptr_t last_to = 0; + + while (! feof_unlocked (fp)) { - /* Found the entry. Now we have the info we need. */ - iattr->stacksize = rl.rlim_cur; - iattr->stackaddr = (void *) to; - - /* The limit might be too high. */ - if ((size_t) iattr->stacksize - > (size_t) iattr->stackaddr - last_to) - iattr->stacksize = (size_t) iattr->stackaddr - last_to; - - /* We succeed and no need to look further. */ - ret = 0; - break; + if (__getdelim (&line, &linelen, '\n', fp) <= 0) + break; + + uintptr_t from; + uintptr_t to; + if (sscanf (line, "%" SCNxPTR "-%" SCNxPTR, &from, &to) != 2) + continue; + if (from <= (uintptr_t) __libc_stack_end + && (uintptr_t) __libc_stack_end < to) + { + /* Found the entry. Now we have the info we need. */ + iattr->stacksize = rl.rlim_cur; + iattr->stackaddr = (void *) to; + + /* The limit might be too high. */ + if ((size_t) iattr->stacksize + > (size_t) iattr->stackaddr - last_to) + iattr->stacksize = (size_t) iattr->stackaddr - last_to; + + /* We succeed and no need to look further. */ + ret = 0; + break; + } + last_to = to; } - last_to = to; + + free (line); } fclose (fp); - free (line); } } diff -uprN glibc-2.4/nptl/pthread_join.c glibc-2.5/nptl/pthread_join.c --- glibc-2.4/nptl/pthread_join.c 2005-12-21 22:17:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_join.c 2006-08-13 01:54:37.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -27,7 +27,11 @@ static void cleanup (void *arg) { - *(void **) arg = NULL; + /* If we already changed the waiter ID, reset it. The call cannot + fail for any reason but the thread not having done that yet so + there is no reason for a loop. */ + atomic_compare_and_exchange_bool_acq ((struct pthread **) arg, NULL, + THREAD_SELF); } @@ -36,7 +40,6 @@ pthread_join (threadid, thread_return) pthread_t threadid; void **thread_return; { - struct pthread *self; struct pthread *pd = (struct pthread *) threadid; /* Make sure the descriptor is valid. */ @@ -49,12 +52,23 @@ pthread_join (threadid, thread_return) /* We cannot wait for the thread. */ return EINVAL; - self = THREAD_SELF; - if (pd == self - || (self->joinid == pd - && (pd->cancelhandling - & (CANCELING_BITMASK | CANCELED_BITMASK | EXITING_BITMASK - | TERMINATED_BITMASK)) == 0)) + struct pthread *self = THREAD_SELF; + int result = 0; + + /* During the wait we change to asynchronous cancellation. If we + are canceled the thread we are waiting for must be marked as + un-wait-ed for again. */ + pthread_cleanup_push (cleanup, &pd->joinid); + + /* Switch to asynchronous cancellation. */ + int oldtype = CANCEL_ASYNC (); + + if ((pd == self + || (self->joinid == pd + && (pd->cancelhandling + & (CANCELING_BITMASK | CANCELED_BITMASK | EXITING_BITMASK + | TERMINATED_BITMASK)) == 0)) + && !CANCEL_ENABLED_AND_CANCELED (self->cancelhandling)) /* This is a deadlock situation. The threads are waiting for each other to finish. Note that this is a "may" error. To be 100% sure we catch this error we would have to lock the data @@ -62,28 +76,17 @@ pthread_join (threadid, thread_return) two threads are really caught in this situation they will deadlock. It is the programmer's problem to figure this out. */ - return EDEADLK; - + result = EDEADLK; /* Wait for the thread to finish. If it is already locked something is wrong. There can only be one waiter. */ - if (__builtin_expect (atomic_compare_and_exchange_bool_acq (&pd->joinid, - self, - NULL), 0)) + else if (__builtin_expect (atomic_compare_and_exchange_bool_acq (&pd->joinid, + self, + NULL), 0)) /* There is already somebody waiting for the thread. */ - return EINVAL; - - - /* During the wait we change to asynchronous cancellation. If we - are cancelled the thread we are waiting for must be marked as - un-wait-ed for again. */ - pthread_cleanup_push (cleanup, &pd->joinid); - - /* Switch to asynchronous cancellation. */ - int oldtype = CANCEL_ASYNC (); - - - /* Wait for the child. */ - lll_wait_tid (pd->tid); + result = EINVAL; + else + /* Wait for the child. */ + lll_wait_tid (pd->tid); /* Restore cancellation mode. */ @@ -93,16 +96,19 @@ pthread_join (threadid, thread_return) pthread_cleanup_pop (0); - /* We mark the thread as terminated and as joined. */ - pd->tid = -1; + if (__builtin_expect (result == 0, 1)) + { + /* We mark the thread as terminated and as joined. */ + pd->tid = -1; - /* Store the return value if the caller is interested. */ - if (thread_return != NULL) - *thread_return = pd->result; + /* Store the return value if the caller is interested. */ + if (thread_return != NULL) + *thread_return = pd->result; - /* Free the TCB. */ - __free_tcb (pd); + /* Free the TCB. */ + __free_tcb (pd); + } - return 0; + return result; } diff -uprN glibc-2.4/nptl/pthread_key_create.c glibc-2.5/nptl/pthread_key_create.c --- glibc-2.4/nptl/pthread_key_create.c 2003-09-09 07:00:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_key_create.c 2006-05-11 17:48:07.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -19,45 +19,36 @@ #include #include "pthreadP.h" +#include -/* Internal mutex for __pthread_keys table handling. */ -lll_lock_t __pthread_keys_lock = LLL_LOCK_INITIALIZER; - int __pthread_key_create (key, destr) pthread_key_t *key; void (*destr) (void *); { - int result = EAGAIN; - size_t cnt; - - lll_lock (__pthread_keys_lock); - /* Find a slot in __pthread_kyes which is unused. */ - for (cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) - if (KEY_UNUSED (__pthread_keys[cnt].seq) - && KEY_USABLE (__pthread_keys[cnt].seq)) - { - /* We found an unused slot. */ - ++__pthread_keys[cnt].seq; - - /* Remember the destructor. */ - __pthread_keys[cnt].destr = destr; - - /* Return the key to the caller. */ - *key = cnt; - - /* The call succeeded. */ - result = 0; - - /* We found a key and can stop now. */ - break; - } - - lll_unlock (__pthread_keys_lock); + for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) + { + uintptr_t seq = __pthread_keys[cnt].seq; + + if (KEY_UNUSED (seq) && KEY_USABLE (seq) + /* We found an unused slot. Try to allocate it. */ + && ! atomic_compare_and_exchange_bool_acq (&__pthread_keys[cnt].seq, + seq + 1, seq)) + { + /* Remember the destructor. */ + __pthread_keys[cnt].destr = destr; + + /* Return the key to the caller. */ + *key = cnt; + + /* The call succeeded. */ + return 0; + } + } - return result; + return EAGAIN; } strong_alias (__pthread_key_create, pthread_key_create) strong_alias (__pthread_key_create, __pthread_key_create_internal) diff -uprN glibc-2.4/nptl/pthread_mutexattr_getprioceiling.c glibc-2.5/nptl/pthread_mutexattr_getprioceiling.c --- glibc-2.4/nptl/pthread_mutexattr_getprioceiling.c 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutexattr_getprioceiling.c 2006-08-14 23:03:59.000000000 +0000 @@ -27,11 +27,22 @@ pthread_mutexattr_getprioceiling (attr, int *prioceiling; { const struct pthread_mutexattr *iattr; + int ceiling; iattr = (const struct pthread_mutexattr *) attr; - *prioceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) - >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT); + ceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) + >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT); + + if (! ceiling) + { + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + if (ceiling < __sched_fifo_min_prio) + ceiling = __sched_fifo_min_prio; + } + + *prioceiling = ceiling; return 0; } diff -uprN glibc-2.4/nptl/pthread_mutexattr_setprioceiling.c glibc-2.5/nptl/pthread_mutexattr_setprioceiling.c --- glibc-2.4/nptl/pthread_mutexattr_setprioceiling.c 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutexattr_setprioceiling.c 2006-08-14 23:04:32.000000000 +0000 @@ -27,7 +27,15 @@ pthread_mutexattr_setprioceiling (attr, pthread_mutexattr_t *attr; int prioceiling; { - if (prioceiling < 0 || __builtin_expect (prioceiling > 255, 0)) + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + + if (__builtin_expect (prioceiling < __sched_fifo_min_prio, 0) + || __builtin_expect (prioceiling > __sched_fifo_max_prio, 0) + || __builtin_expect ((prioceiling + & (PTHREAD_MUTEXATTR_PRIO_CEILING_MASK + >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)) + != prioceiling, 0)) return EINVAL; struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr; diff -uprN glibc-2.4/nptl/pthread_mutex_consistent.c glibc-2.5/nptl/pthread_mutex_consistent.c --- glibc-2.4/nptl/pthread_mutex_consistent.c 2006-02-15 16:54:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_consistent.c 2006-03-28 04:18:45.000000000 +0000 @@ -26,7 +26,7 @@ pthread_mutex_consistent_np (mutex) pthread_mutex_t *mutex; { /* Test whether this is a robust mutex with a dead owner. */ - if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_PRIVATE_NP) == 0 + if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 || mutex->__data.__owner != PTHREAD_MUTEX_INCONSISTENT) return EINVAL; diff -uprN glibc-2.4/nptl/pthread_mutex_destroy.c glibc-2.5/nptl/pthread_mutex_destroy.c --- glibc-2.4/nptl/pthread_mutex_destroy.c 2006-02-15 16:55:10.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_destroy.c 2006-07-29 04:21:27.000000000 +0000 @@ -25,18 +25,11 @@ int __pthread_mutex_destroy (mutex) pthread_mutex_t *mutex; { - if (mutex->__data.__nusers != 0) - { - if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_PRIVATE_NP) != 0 - && (mutex->__data.__lock & FUTEX_OWNER_DIED) != 0 - && mutex->__data.__nusers == 1) - goto dead_robust_mutex; - - return EBUSY; - } + if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 + && mutex->__data.__nusers != 0) + return EBUSY; /* Set to an invalid value. */ - dead_robust_mutex: mutex->__data.__kind = -1; return 0; diff -uprN glibc-2.4/nptl/pthread_mutex_getprioceiling.c glibc-2.5/nptl/pthread_mutex_getprioceiling.c --- glibc-2.4/nptl/pthread_mutex_getprioceiling.c 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_getprioceiling.c 2006-08-14 23:05:08.000000000 +0000 @@ -18,6 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include @@ -26,7 +27,11 @@ pthread_mutex_getprioceiling (mutex, pri const pthread_mutex_t *mutex; int *prioceiling; { - *prioceiling = (mutex->__data.__kind & PTHREAD_MUTEX_PRIO_CEILING_MASK) + if (__builtin_expect ((mutex->__data.__kind + & PTHREAD_MUTEX_PRIO_PROTECT_NP) == 0, 0)) + return EINVAL; + + *prioceiling = (mutex->__data.__lock & PTHREAD_MUTEX_PRIO_CEILING_MASK) >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; return 0; diff -uprN glibc-2.4/nptl/pthread_mutex_init.c glibc-2.5/nptl/pthread_mutex_init.c --- glibc-2.4/nptl/pthread_mutex_init.c 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_init.c 2006-08-14 23:00:38.000000000 +0000 @@ -22,7 +22,6 @@ #include #include "pthreadP.h" - static const struct pthread_mutexattr default_attr = { /* Default is a normal mutex, not shared between processes. */ @@ -30,6 +29,11 @@ static const struct pthread_mutexattr de }; +#ifndef __ASSUME_FUTEX_LOCK_PI +static int tpi_supported; +#endif + + int __pthread_mutex_init (mutex, mutexattr) pthread_mutex_t *mutex; @@ -42,41 +46,76 @@ __pthread_mutex_init (mutex, mutexattr) imutexattr = (const struct pthread_mutexattr *) mutexattr ?: &default_attr; /* Sanity checks. */ - // XXX For now we cannot implement robust mutexes if they are shared. - if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0 - && (imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_PSHARED) != 0) - return ENOTSUP; - // XXX For now we don't support priority inherited or priority protected - // XXX mutexes. - if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK) - != (PTHREAD_PRIO_NONE << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT)) - return ENOTSUP; + switch (__builtin_expect (imutexattr->mutexkind + & PTHREAD_MUTEXATTR_PROTOCOL_MASK, + PTHREAD_PRIO_NONE + << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT)) + { + case PTHREAD_PRIO_NONE << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: + break; + + case PTHREAD_PRIO_INHERIT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: +#ifndef __ASSUME_FUTEX_LOCK_PI + if (__builtin_expect (tpi_supported == 0, 0)) + { + int lock = 0; + INTERNAL_SYSCALL_DECL (err); + int ret = INTERNAL_SYSCALL (futex, err, 4, &lock, FUTEX_UNLOCK_PI, + 0, 0); + assert (INTERNAL_SYSCALL_ERROR_P (ret, err)); + tpi_supported = INTERNAL_SYSCALL_ERRNO (ret, err) == ENOSYS ? -1 : 1; + } + if (__builtin_expect (tpi_supported < 0, 0)) + return ENOTSUP; +#endif + break; + + default: + /* XXX: For now we don't support robust priority protected mutexes. */ + if (imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) + return ENOTSUP; + break; + } /* Clear the whole variable. */ memset (mutex, '\0', __SIZEOF_PTHREAD_MUTEX_T); /* Copy the values from the attribute. */ mutex->__data.__kind = imutexattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS; + if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0) - mutex->__data.__kind |= PTHREAD_MUTEX_ROBUST_PRIVATE_NP; - switch ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK) - >> PTHREAD_MUTEXATTR_PROTOCOL_SHIFT) { - case PTHREAD_PRIO_INHERIT: - mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP; +#ifndef __ASSUME_SET_ROBUST_LIST + if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_PSHARED) != 0 + && __set_robust_list_avail < 0) + return ENOTSUP; +#endif + + mutex->__data.__kind |= PTHREAD_MUTEX_ROBUST_NORMAL_NP; + } + + switch (imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK) + { + case PTHREAD_PRIO_INHERIT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: + mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_INHERIT_NP; break; - case PTHREAD_PRIO_PROTECT: - mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP; - if (PTHREAD_MUTEX_PRIO_CEILING_MASK - == PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) - mutex->__data.__kind |= (imutexattr->mutexkind - & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK); - else - mutex->__data.__kind |= ((imutexattr->mutexkind - & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) - >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT) - << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + + case PTHREAD_PRIO_PROTECT << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT: + mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_PROTECT_NP; + + int ceiling = (imutexattr->mutexkind + & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) + >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT; + if (! ceiling) + { + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + if (ceiling < __sched_fifo_min_prio) + ceiling = __sched_fifo_min_prio; + } + mutex->__data.__lock = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; break; + default: break; } diff -uprN glibc-2.4/nptl/pthread_mutex_lock.c glibc-2.5/nptl/pthread_mutex_lock.c --- glibc-2.4/nptl/pthread_mutex_lock.c 2006-02-15 16:56:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_lock.c 2006-08-14 23:01:26.000000000 +0000 @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include "pthreadP.h" #include @@ -108,25 +110,33 @@ __pthread_mutex_lock (mutex) assert (mutex->__data.__owner == 0); break; - case PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP: + case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + &mutex->__data.__list.__next); + oldval = mutex->__data.__lock; do { + again: if ((oldval & FUTEX_OWNER_DIED) != 0) { /* The previous owner died. Try locking the mutex. */ - int newval; - while ((newval - = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, - id, oldval)) - != oldval) + int newval = id; +#ifdef NO_INCR + newval |= FUTEX_WAITERS; +#endif + + newval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + newval, oldval); + + if (newval != oldval) { - if ((newval & FUTEX_OWNER_DIED) == 0) - goto normal; oldval = newval; + goto again; } /* We got the mutex. */ @@ -135,6 +145,7 @@ __pthread_mutex_lock (mutex) mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); /* Note that we deliberately exit here. If we fall through to the end of the function __nusers would be @@ -149,18 +160,23 @@ __pthread_mutex_lock (mutex) return EOWNERDEAD; } - normal: /* Check whether we already hold the mutex. */ - if (__builtin_expect ((mutex->__data.__lock & FUTEX_TID_MASK) - == id, 0)) + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) { if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP) - return EDEADLK; + == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + return EDEADLK; + } if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP) + == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + /* Just bump the counter. */ if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) /* Overflow of the counter. */ @@ -180,6 +196,7 @@ __pthread_mutex_lock (mutex) /* This mutex is now not recoverable. */ mutex->__data.__count = 0; lll_mutex_unlock (mutex->__data.__lock); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); return ENOTRECOVERABLE; } } @@ -187,6 +204,219 @@ __pthread_mutex_lock (mutex) mutex->__data.__count = 1; ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + break; + + case PTHREAD_MUTEX_PI_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_NORMAL_NP: + case PTHREAD_MUTEX_PI_ADAPTIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; + + if (robust) + /* Note: robust PI futexes are signaled by setting bit 0. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + (void *) (((uintptr_t) &mutex->__data.__list.__next) + | 1)); + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return EDEADLK; + } + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + int newval = id; +#ifdef NO_INCR + newval |= FUTEX_WAITERS; +#endif + oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + newval, 0); + + if (oldval != 0) + { + /* The mutex is locked. The kernel will now take care of + everything. */ + INTERNAL_SYSCALL_DECL (__err); + int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_LOCK_PI, 1, 0); + + if (INTERNAL_SYSCALL_ERROR_P (e, __err) + && (INTERNAL_SYSCALL_ERRNO (e, __err) == ESRCH + || INTERNAL_SYSCALL_ERRNO (e, __err) == EDEADLK)) + { + assert (INTERNAL_SYSCALL_ERRNO (e, __err) != EDEADLK + || (kind != PTHREAD_MUTEX_ERRORCHECK_NP + && kind != PTHREAD_MUTEX_RECURSIVE_NP)); + /* ESRCH can happen only for non-robust PI mutexes where + the owner of the lock died. */ + assert (INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH || !robust); + + /* Delay the thread indefinitely. */ + while (1) + pause_not_cancel (); + } + + oldval = mutex->__data.__lock; + + assert (robust || (oldval & FUTEX_OWNER_DIED) == 0); + } + + if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0)) + { + atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); + + /* We got the mutex. */ + mutex->__data.__count = 1; + /* But it is inconsistent unless marked otherwise. */ + mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; + + ENQUEUE_MUTEX_PI (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Note that we deliberately exit here. If we fall + through to the end of the function __nusers would be + incremented which is not correct because the old owner + has to be discounted. If we are not supposed to + increment __nusers we actually have to decrement it here. */ +#ifdef NO_INCR + --mutex->__data.__nusers; +#endif + + return EOWNERDEAD; + } + + if (robust + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) + { + /* This mutex is now not recoverable. */ + mutex->__data.__count = 0; + + INTERNAL_SYSCALL_DECL (__err); + INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_UNLOCK_PI, 0, 0); + + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return ENOTRECOVERABLE; + } + + mutex->__data.__count = 1; + if (robust) + { + ENQUEUE_MUTEX_PI (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + } + } + break; + + case PTHREAD_MUTEX_PP_RECURSIVE_NP: + case PTHREAD_MUTEX_PP_ERRORCHECK_NP: + case PTHREAD_MUTEX_PP_NORMAL_NP: + case PTHREAD_MUTEX_PP_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (mutex->__data.__owner == id) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + return EDEADLK; + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + int oldprio = -1, ceilval; + do + { + int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) + >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + + if (__pthread_current_priority () > ceiling) + { + if (oldprio != -1) + __pthread_tpp_change_priority (oldprio, -1); + return EINVAL; + } + + retval = __pthread_tpp_change_priority (oldprio, ceiling); + if (retval) + return retval; + + ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + oldprio = ceiling; + + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, +#ifdef NO_INCR + ceilval | 2, +#else + ceilval | 1, +#endif + ceilval); + + if (oldval == ceilval) + break; + + do + { + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, + ceilval | 1); + + if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) + break; + + if (oldval != ceilval) + lll_futex_wait (&mutex->__data.__lock, ceilval | 2); + } + while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, ceilval) + != ceilval); + } + while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); + + assert (mutex->__data.__owner == 0); + mutex->__data.__count = 1; + } break; default: diff -uprN glibc-2.4/nptl/pthread_mutex_setprioceiling.c glibc-2.5/nptl/pthread_mutex_setprioceiling.c --- glibc-2.4/nptl/pthread_mutex_setprioceiling.c 2006-02-28 09:36:05.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_setprioceiling.c 2006-08-14 23:05:35.000000000 +0000 @@ -18,6 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include @@ -30,26 +31,86 @@ pthread_mutex_setprioceiling (mutex, pri { /* The low bits of __kind aren't ever changed after pthread_mutex_init, so we don't need a lock yet. */ - if ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP) == 0) + if ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_PROTECT_NP) == 0) return EINVAL; - if (prioceiling < 0 || __builtin_expect (prioceiling > 255, 0)) + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + + if (__builtin_expect (prioceiling < __sched_fifo_min_prio, 0) + || __builtin_expect (prioceiling > __sched_fifo_max_prio, 0) + || __builtin_expect ((prioceiling + & (PTHREAD_MUTEXATTR_PRIO_CEILING_MASK + >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)) + != prioceiling, 0)) return EINVAL; - /* XXX This needs to lock with TID, but shouldn't obey priority protect - protocol. */ - /* lll_xxx_mutex_lock (mutex->__data.__lock); */ + /* Check whether we already hold the mutex. */ + bool locked = false; + if (mutex->__data.__owner == THREAD_GETMEM (THREAD_SELF, tid)) + { + if (mutex->__data.__kind == PTHREAD_MUTEX_PP_ERRORCHECK_NP) + return EDEADLK; + + if (mutex->__data.__kind == PTHREAD_MUTEX_PP_RECURSIVE_NP) + locked = true; + } + + int oldval = mutex->__data.__lock; + if (! locked) + do + { + /* Need to lock the mutex, but without obeying the priority + protect protocol. */ + int ceilval = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK); + + oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 1, ceilval); + if (oldval == ceilval) + break; + + do + { + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, + ceilval | 1); + + if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) + break; + + if (oldval != ceilval) + lll_futex_wait (&mutex->__data.__lock, ceilval | 2); + } + while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, ceilval) + != ceilval); + + if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) + continue; + } + while (0); + + int oldprio = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) + >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + if (locked) + { + int ret = __pthread_tpp_change_priority (oldprio, prioceiling); + if (ret) + return ret; + } if (old_ceiling != NULL) - *old_ceiling = (mutex->__data.__kind & PTHREAD_MUTEX_PRIO_CEILING_MASK) - >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + *old_ceiling = oldprio; - int newkind = (mutex->__data.__kind & ~PTHREAD_MUTEX_PRIO_CEILING_MASK); - mutex->__data.__kind = newkind + int newlock = 0; + if (locked) + newlock = (mutex->__data.__lock & ~PTHREAD_MUTEX_PRIO_CEILING_MASK); + mutex->__data.__lock = newlock | (prioceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT); + atomic_full_barrier (); - /* XXX This needs to unlock the above special kind of lock. */ - /* lll_xxx_mutex_unlock (mutex->__data.__lock); */ + lll_futex_wake (&mutex->__data.__lock, INT_MAX); return 0; } diff -uprN glibc-2.4/nptl/pthread_mutex_timedlock.c glibc-2.5/nptl/pthread_mutex_timedlock.c --- glibc-2.4/nptl/pthread_mutex_timedlock.c 2006-02-15 16:56:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_timedlock.c 2006-08-14 23:01:26.000000000 +0000 @@ -19,8 +19,10 @@ #include #include +#include #include "pthreadP.h" #include +#include int @@ -35,7 +37,7 @@ pthread_mutex_timedlock (mutex, abstime) /* We must not check ABSTIME here. If the thread does not block abstime must not be checked for a valid value. */ - switch (mutex->__data.__kind) + switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP)) { /* Recursive mutex. */ case PTHREAD_MUTEX_RECURSIVE_NP: @@ -65,7 +67,7 @@ pthread_mutex_timedlock (mutex, abstime) /* Error checking mutex. */ case PTHREAD_MUTEX_ERRORCHECK_NP: /* Check whether we already hold the mutex. */ - if (mutex->__data.__owner == id) + if (__builtin_expect (mutex->__data.__owner == id, 0)) return EDEADLK; /* FALLTHROUGH */ @@ -103,25 +105,27 @@ pthread_mutex_timedlock (mutex, abstime) } break; - case PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP: + case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + &mutex->__data.__list.__next); + oldval = mutex->__data.__lock; do { + again: if ((oldval & FUTEX_OWNER_DIED) != 0) { /* The previous owner died. Try locking the mutex. */ - int newval; - while ((newval - = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, - id, oldval)) - != oldval) + int newval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + id, oldval); + if (newval != oldval) { - if ((newval & FUTEX_OWNER_DIED) == 0) - goto normal; oldval = newval; + goto again; } /* We got the mutex. */ @@ -130,26 +134,32 @@ pthread_mutex_timedlock (mutex, abstime) mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); - /* Note that we deliberately exist here. If we fall + /* Note that we deliberately exit here. If we fall through to the end of the function __nusers would be incremented which is not correct because the old owner has to be discounted. */ return EOWNERDEAD; } - normal: /* Check whether we already hold the mutex. */ - if (__builtin_expect ((mutex->__data.__lock & FUTEX_TID_MASK) - == id, 0)) + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) { if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP) - return EDEADLK; + == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + return EDEADLK; + } if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP) + == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + /* Just bump the counter. */ if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) /* Overflow of the counter. */ @@ -170,6 +180,7 @@ pthread_mutex_timedlock (mutex, abstime) /* This mutex is now not recoverable. */ mutex->__data.__count = 0; lll_mutex_unlock (mutex->__data.__lock); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); return ENOTRECOVERABLE; } @@ -182,6 +193,264 @@ pthread_mutex_timedlock (mutex, abstime) mutex->__data.__count = 1; ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + break; + + case PTHREAD_MUTEX_PI_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_NORMAL_NP: + case PTHREAD_MUTEX_PI_ADAPTIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; + + if (robust) + /* Note: robust PI futexes are signaled by setting bit 0. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + (void *) (((uintptr_t) &mutex->__data.__list.__next) + | 1)); + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return EDEADLK; + } + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + id, 0); + + if (oldval != 0) + { + /* The mutex is locked. The kernel will now take care of + everything. The timeout value must be a relative value. + Convert it. */ + INTERNAL_SYSCALL_DECL (__err); + + int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_LOCK_PI, 1, abstime); + if (INTERNAL_SYSCALL_ERROR_P (e, __err)) + { + if (INTERNAL_SYSCALL_ERRNO (e, __err) == ETIMEDOUT) + return ETIMEDOUT; + + if (INTERNAL_SYSCALL_ERRNO (e, __err) == ESRCH + || INTERNAL_SYSCALL_ERRNO (e, __err) == EDEADLK) + { + assert (INTERNAL_SYSCALL_ERRNO (e, __err) != EDEADLK + || (kind != PTHREAD_MUTEX_ERRORCHECK_NP + && kind != PTHREAD_MUTEX_RECURSIVE_NP)); + /* ESRCH can happen only for non-robust PI mutexes where + the owner of the lock died. */ + assert (INTERNAL_SYSCALL_ERRNO (e, __err) != ESRCH + || !robust); + + /* Delay the thread until the timeout is reached. + Then return ETIMEDOUT. */ + struct timespec reltime; + struct timespec now; + + INTERNAL_SYSCALL (clock_gettime, __err, 2, CLOCK_REALTIME, + &now); + reltime.tv_sec = abstime->tv_sec - now.tv_sec; + reltime.tv_nsec = abstime->tv_nsec - now.tv_nsec; + if (reltime.tv_nsec < 0) + { + reltime.tv_nsec += 1000000000; + --reltime.tv_sec; + } + if (reltime.tv_sec >= 0) + while (nanosleep_not_cancel (&reltime, &reltime) != 0) + continue; + + return ETIMEDOUT; + } + + return INTERNAL_SYSCALL_ERRNO (e, __err); + } + + oldval = mutex->__data.__lock; + + assert (robust || (oldval & FUTEX_OWNER_DIED) == 0); + } + + if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0)) + { + atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); + + /* We got the mutex. */ + mutex->__data.__count = 1; + /* But it is inconsistent unless marked otherwise. */ + mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; + + ENQUEUE_MUTEX_PI (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Note that we deliberately exit here. If we fall + through to the end of the function __nusers would be + incremented which is not correct because the old owner + has to be discounted. */ + return EOWNERDEAD; + } + + if (robust + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) + { + /* This mutex is now not recoverable. */ + mutex->__data.__count = 0; + + INTERNAL_SYSCALL_DECL (__err); + INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_UNLOCK_PI, 0, 0); + + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return ENOTRECOVERABLE; + } + + mutex->__data.__count = 1; + if (robust) + { + ENQUEUE_MUTEX_PI (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + } + } + break; + + case PTHREAD_MUTEX_PP_RECURSIVE_NP: + case PTHREAD_MUTEX_PP_ERRORCHECK_NP: + case PTHREAD_MUTEX_PP_NORMAL_NP: + case PTHREAD_MUTEX_PP_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (mutex->__data.__owner == id) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + return EDEADLK; + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + int oldprio = -1, ceilval; + do + { + int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) + >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + + if (__pthread_current_priority () > ceiling) + { + result = EINVAL; + failpp: + if (oldprio != -1) + __pthread_tpp_change_priority (oldprio, -1); + return result; + } + + result = __pthread_tpp_change_priority (oldprio, ceiling); + if (result) + return result; + + ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + oldprio = ceiling; + + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 1, ceilval); + + if (oldval == ceilval) + break; + + do + { + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, + ceilval | 1); + + if ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval) + break; + + if (oldval != ceilval) + { + /* Reject invalid timeouts. */ + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) + { + result = EINVAL; + goto failpp; + } + + struct timeval tv; + struct timespec rt; + + /* Get the current time. */ + (void) __gettimeofday (&tv, NULL); + + /* Compute relative timeout. */ + rt.tv_sec = abstime->tv_sec - tv.tv_sec; + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000; + if (rt.tv_nsec < 0) + { + rt.tv_nsec += 1000000000; + --rt.tv_sec; + } + + /* Already timed out? */ + if (rt.tv_sec < 0) + { + result = ETIMEDOUT; + goto failpp; + } + + lll_futex_timed_wait (&mutex->__data.__lock, + ceilval | 2, &rt); + } + } + while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 2, ceilval) + != ceilval); + } + while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); + + assert (mutex->__data.__owner == 0); + mutex->__data.__count = 1; + } break; default: diff -uprN glibc-2.4/nptl/pthread_mutex_trylock.c glibc-2.5/nptl/pthread_mutex_trylock.c --- glibc-2.4/nptl/pthread_mutex_trylock.c 2006-02-15 16:56:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_trylock.c 2006-08-14 23:01:26.000000000 +0000 @@ -77,25 +77,28 @@ __pthread_mutex_trylock (mutex) return 0; - case PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP: + case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + &mutex->__data.__list.__next); + oldval = mutex->__data.__lock; do { + again: if ((oldval & FUTEX_OWNER_DIED) != 0) { /* The previous owner died. Try locking the mutex. */ - int newval; - while ((newval - = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, - id, oldval)) - != oldval) + int newval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + id, oldval); + + if (newval != oldval) { - if ((newval & FUTEX_OWNER_DIED) == 0) - goto normal; oldval = newval; + goto again; } /* We got the mutex. */ @@ -104,6 +107,7 @@ __pthread_mutex_trylock (mutex) mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); /* Note that we deliberately exist here. If we fall through to the end of the function __nusers would be @@ -112,18 +116,23 @@ __pthread_mutex_trylock (mutex) return EOWNERDEAD; } - normal: /* Check whether we already hold the mutex. */ - if (__builtin_expect ((mutex->__data.__lock & FUTEX_TID_MASK) - == id, 0)) + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) { if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP) - return EDEADLK; + == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + return EDEADLK; + } if (mutex->__data.__kind - == PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP) + == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + /* Just bump the counter. */ if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) /* Overflow of the counter. */ @@ -137,9 +146,12 @@ __pthread_mutex_trylock (mutex) oldval = lll_robust_mutex_trylock (mutex->__data.__lock, id); if (oldval != 0 && (oldval & FUTEX_OWNER_DIED) == 0) - return EBUSY; + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; + } - robust: if (__builtin_expect (mutex->__data.__owner == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) { @@ -147,12 +159,14 @@ __pthread_mutex_trylock (mutex) mutex->__data.__count = 0; if (oldval == id) lll_mutex_unlock (mutex->__data.__lock); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); return ENOTRECOVERABLE; } } while ((oldval & FUTEX_OWNER_DIED) != 0); ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); mutex->__data.__owner = id; ++mutex->__data.__nusers; @@ -160,6 +174,202 @@ __pthread_mutex_trylock (mutex) return 0; + case PTHREAD_MUTEX_PI_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_NORMAL_NP: + case PTHREAD_MUTEX_PI_ADAPTIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP; + + if (robust) + /* Note: robust PI futexes are signaled by setting bit 0. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + (void *) (((uintptr_t) &mutex->__data.__list.__next) + | 1)); + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (__builtin_expect ((oldval & FUTEX_TID_MASK) == id, 0)) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return EDEADLK; + } + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + id, 0); + + if (oldval != 0) + { + if ((oldval & FUTEX_OWNER_DIED) == 0) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; + } + + assert (robust); + + /* The mutex owner died. The kernel will now take care of + everything. */ + INTERNAL_SYSCALL_DECL (__err); + int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_TRYLOCK_PI, 0, 0); + + if (INTERNAL_SYSCALL_ERROR_P (e, __err) + && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK) + { + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; + } + + oldval = mutex->__data.__lock; + } + + if (__builtin_expect (oldval & FUTEX_OWNER_DIED, 0)) + { + atomic_and (&mutex->__data.__lock, ~FUTEX_OWNER_DIED); + + /* We got the mutex. */ + mutex->__data.__count = 1; + /* But it is inconsistent unless marked otherwise. */ + mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; + + ENQUEUE_MUTEX (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Note that we deliberately exit here. If we fall + through to the end of the function __nusers would be + incremented which is not correct because the old owner + has to be discounted. */ + return EOWNERDEAD; + } + + if (robust + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_NOTRECOVERABLE, 0)) + { + /* This mutex is now not recoverable. */ + mutex->__data.__count = 0; + + INTERNAL_SYSCALL_DECL (__err); + INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock, + FUTEX_UNLOCK_PI, 0, 0); + + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return ENOTRECOVERABLE; + } + + if (robust) + { + ENQUEUE_MUTEX_PI (mutex); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + } + + mutex->__data.__owner = id; + ++mutex->__data.__nusers; + mutex->__data.__count = 1; + + return 0; + } + + case PTHREAD_MUTEX_PP_RECURSIVE_NP: + case PTHREAD_MUTEX_PP_ERRORCHECK_NP: + case PTHREAD_MUTEX_PP_NORMAL_NP: + case PTHREAD_MUTEX_PP_ADAPTIVE_NP: + { + int kind = mutex->__data.__kind & PTHREAD_MUTEX_KIND_MASK_NP; + + oldval = mutex->__data.__lock; + + /* Check whether we already hold the mutex. */ + if (mutex->__data.__owner == id) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + return EDEADLK; + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { + /* Just bump the counter. */ + if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) + /* Overflow of the counter. */ + return EAGAIN; + + ++mutex->__data.__count; + + return 0; + } + } + + int oldprio = -1, ceilval; + do + { + int ceiling = (oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) + >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + + if (__pthread_current_priority () > ceiling) + { + if (oldprio != -1) + __pthread_tpp_change_priority (oldprio, -1); + return EINVAL; + } + + int retval = __pthread_tpp_change_priority (oldprio, ceiling); + if (retval) + return retval; + + ceilval = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + oldprio = ceiling; + + oldval + = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, + ceilval | 1, ceilval); + + if (oldval == ceilval) + break; + } + while ((oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK) != ceilval); + + if (oldval != ceilval) + { + __pthread_tpp_change_priority (oldprio, -1); + break; + } + + assert (mutex->__data.__owner == 0); + /* Record the ownership. */ + mutex->__data.__owner = id; + ++mutex->__data.__nusers; + mutex->__data.__count = 1; + + return 0; + } + break; + default: /* Correct code cannot set any other type. */ return EINVAL; diff -uprN glibc-2.4/nptl/pthread_mutex_unlock.c glibc-2.5/nptl/pthread_mutex_unlock.c --- glibc-2.4/nptl/pthread_mutex_unlock.c 2006-02-15 16:56:21.000000000 +0000 +++ glibc-2.5/nptl/pthread_mutex_unlock.c 2006-08-14 23:01:26.000000000 +0000 @@ -63,10 +63,12 @@ __pthread_mutex_unlock_usercnt (mutex, d lll_mutex_unlock (mutex->__data.__lock); break; - case PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP: + case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: /* Recursive mutex. */ if ((mutex->__data.__lock & FUTEX_TID_MASK) - == THREAD_GETMEM (THREAD_SELF, tid)) + == THREAD_GETMEM (THREAD_SELF, tid) + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_INCONSISTENT, 0)) { if (--mutex->__data.__count != 0) /* We still hold the mutex. */ @@ -84,9 +86,9 @@ __pthread_mutex_unlock_usercnt (mutex, d goto robust; - case PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_NP: - case PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP: + case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: if ((mutex->__data.__lock & FUTEX_TID_MASK) != THREAD_GETMEM (THREAD_SELF, tid) || ! lll_mutex_islocked (mutex->__data.__lock)) @@ -102,6 +104,8 @@ __pthread_mutex_unlock_usercnt (mutex, d robust: /* Remove mutex from the list. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + &mutex->__data.__list.__next); DEQUEUE_MUTEX (mutex); mutex->__data.__owner = newowner; @@ -111,8 +115,136 @@ __pthread_mutex_unlock_usercnt (mutex, d /* Unlock. */ lll_robust_mutex_unlock (mutex->__data.__lock); + + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + break; + + case PTHREAD_MUTEX_PI_RECURSIVE_NP: + /* Recursive mutex. */ + if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) + return EPERM; + + if (--mutex->__data.__count != 0) + /* We still hold the mutex. */ + return 0; + goto continue_pi; + + case PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP: + /* Recursive mutex. */ + if ((mutex->__data.__lock & FUTEX_TID_MASK) + == THREAD_GETMEM (THREAD_SELF, tid) + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_INCONSISTENT, 0)) + { + if (--mutex->__data.__count != 0) + /* We still hold the mutex. */ + return ENOTRECOVERABLE; + + goto pi_notrecoverable; + } + + if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) + return EPERM; + + if (--mutex->__data.__count != 0) + /* We still hold the mutex. */ + return 0; + + goto continue_pi; + + case PTHREAD_MUTEX_PI_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_NORMAL_NP: + case PTHREAD_MUTEX_PI_ADAPTIVE_NP: + case PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP: + case PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP: + case PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP: + if ((mutex->__data.__lock & FUTEX_TID_MASK) + != THREAD_GETMEM (THREAD_SELF, tid) + || ! lll_mutex_islocked (mutex->__data.__lock)) + return EPERM; + + /* If the previous owner died and the caller did not succeed in + making the state consistent, mark the mutex as unrecoverable + and make all waiters. */ + if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) != 0 + && __builtin_expect (mutex->__data.__owner + == PTHREAD_MUTEX_INCONSISTENT, 0)) + pi_notrecoverable: + newowner = PTHREAD_MUTEX_NOTRECOVERABLE; + + continue_pi: + if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) != 0) + { + /* Remove mutex from the list. + Note: robust PI futexes are signaled by setting bit 0. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + (void *) (((uintptr_t) &mutex->__data.__list.__next) + | 1)); + DEQUEUE_MUTEX (mutex); + } + + mutex->__data.__owner = newowner; + if (decr) + /* One less user. */ + --mutex->__data.__nusers; + + /* Unlock. */ + if ((mutex->__data.__lock & FUTEX_WAITERS) != 0 + || atomic_compare_and_exchange_bool_acq (&mutex->__data.__lock, 0, + THREAD_GETMEM (THREAD_SELF, + tid))) + { + INTERNAL_SYSCALL_DECL (__err); + INTERNAL_SYSCALL (futex, __err, 2, &mutex->__data.__lock, + FUTEX_UNLOCK_PI); + } + + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); break; + case PTHREAD_MUTEX_PP_RECURSIVE_NP: + /* Recursive mutex. */ + if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)) + return EPERM; + + if (--mutex->__data.__count != 0) + /* We still hold the mutex. */ + return 0; + goto pp; + + case PTHREAD_MUTEX_PP_ERRORCHECK_NP: + /* Error checking mutex. */ + if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid) + || (mutex->__data.__lock & ~ PTHREAD_MUTEX_PRIO_CEILING_MASK) == 0) + return EPERM; + /* FALLTHROUGH */ + + case PTHREAD_MUTEX_PP_NORMAL_NP: + case PTHREAD_MUTEX_PP_ADAPTIVE_NP: + /* Always reset the owner field. */ + pp: + mutex->__data.__owner = 0; + + if (decr) + /* One less user. */ + --mutex->__data.__nusers; + + /* Unlock. */ + int newval, oldval; + do + { + oldval = mutex->__data.__lock; + newval = oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK; + } + while (atomic_compare_and_exchange_bool_acq (&mutex->__data.__lock, + newval, oldval)); + + if ((oldval & ~PTHREAD_MUTEX_PRIO_CEILING_MASK) > 1) + lll_futex_wake (&mutex->__data.__lock, 1); + + int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT; + return __pthread_tpp_change_priority (oldprio, -1); + default: /* Correct code cannot set any other type. */ return EINVAL; diff -uprN glibc-2.4/nptl/pthreadP.h glibc-2.5/nptl/pthreadP.h --- glibc-2.4/nptl/pthreadP.h 2006-02-28 09:36:06.000000000 +0000 +++ glibc-2.5/nptl/pthreadP.h 2006-08-23 17:42:52.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include /* Atomic operations on TLS memory. */ @@ -60,25 +61,56 @@ /* Internal mutex type value. */ enum { - PTHREAD_MUTEX_ROBUST_PRIVATE_NP = 16, - PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP - = PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP - = PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP - = PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_ADAPTIVE_NP, - PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP = 32, - PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP = 64 + PTHREAD_MUTEX_KIND_MASK_NP = 3, + PTHREAD_MUTEX_ROBUST_NORMAL_NP = 16, + PTHREAD_MUTEX_ROBUST_RECURSIVE_NP + = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP + = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP + = PTHREAD_MUTEX_ROBUST_NORMAL_NP | PTHREAD_MUTEX_ADAPTIVE_NP, + PTHREAD_MUTEX_PRIO_INHERIT_NP = 32, + PTHREAD_MUTEX_PI_NORMAL_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_NORMAL, + PTHREAD_MUTEX_PI_RECURSIVE_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_PI_ERRORCHECK_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_PI_ADAPTIVE_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ADAPTIVE_NP, + PTHREAD_MUTEX_PI_ROBUST_NORMAL_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP, + PTHREAD_MUTEX_PI_ROBUST_RECURSIVE_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_RECURSIVE_NP, + PTHREAD_MUTEX_PI_ROBUST_ERRORCHECK_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP, + PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP + = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP, + PTHREAD_MUTEX_PRIO_PROTECT_NP = 64, + PTHREAD_MUTEX_PP_NORMAL_NP + = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_NORMAL, + PTHREAD_MUTEX_PP_RECURSIVE_NP + = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_PP_ERRORCHECK_NP + = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_PP_ADAPTIVE_NP + = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ADAPTIVE_NP }; -#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT 16 -#define PTHREAD_MUTEX_PRIO_CEILING_MASK 0x00ff0000 + +/* Ceiling in __data.__lock. __data.__lock is signed, so don't + use the MSB bit in there, but in the mask also include that bit, + so that the compiler can optimize & PTHREAD_MUTEX_PRIO_CEILING_MASK + masking if the value is then shifted down by + PTHREAD_MUTEX_PRIO_CEILING_SHIFT. */ +#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT 19 +#define PTHREAD_MUTEX_PRIO_CEILING_MASK 0xfff80000 /* Flags in mutex attr. */ #define PTHREAD_MUTEXATTR_PROTOCOL_SHIFT 28 #define PTHREAD_MUTEXATTR_PROTOCOL_MASK 0x30000000 -#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT 16 -#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK 0x00ff0000 +#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT 12 +#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK 0x00fff000 #define PTHREAD_MUTEXATTR_FLAG_ROBUST 0x40000000 #define PTHREAD_MUTEXATTR_FLAG_PSHARED 0x80000000 #define PTHREAD_MUTEXATTR_FLAG_BITS \ @@ -89,7 +121,7 @@ enum /* Bits used in robust mutex implementation. */ #define FUTEX_WAITERS 0x80000000 #define FUTEX_OWNER_DIED 0x40000000 -#define FUTEX_TID_MASK 0x1fffffff +#define FUTEX_TID_MASK 0x3fffffff /* Internal variables. */ @@ -128,6 +160,19 @@ hidden_proto (__pthread_keys) /* Number of threads running. */ extern unsigned int __nptl_nthreads attribute_hidden; +#ifndef __ASSUME_SET_ROBUST_LIST +/* Negative if we do not have the system call and we can use it. */ +extern int __set_robust_list_avail attribute_hidden; +#endif + +/* Thread Priority Protection. */ +extern int __sched_fifo_min_prio attribute_hidden; +extern int __sched_fifo_max_prio attribute_hidden; +extern void __init_sched_fifo_prio (void) attribute_hidden; +extern int __pthread_tpp_change_priority (int prev_prio, int new_prio) + attribute_hidden; +extern int __pthread_current_priority (void) attribute_hidden; + /* The library can run in debugging mode where it performs a lot more tests. */ extern int __pthread_debug attribute_hidden; @@ -498,10 +543,23 @@ extern void __nptl_deallocate_tsd (void) extern int __nptl_setxid (struct xid_command *cmdp) attribute_hidden; +extern void __free_stack_cache (void) attribute_hidden; + #ifdef SHARED # define PTHREAD_STATIC_FN_REQUIRE(name) #else # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif + +#ifndef __NR_set_robust_list +/* XXX For the time being... Once we can rely on the kernel headers + having the definition remove these lines. */ +# if defined __i386__ +# define __NR_set_robust_list 311 +# elif defined __x86_64__ +# define __NR_set_robust_list 273 +# endif +#endif + #endif /* pthreadP.h */ diff -uprN glibc-2.4/nptl/pthread_setschedparam.c glibc-2.5/nptl/pthread_setschedparam.c --- glibc-2.4/nptl/pthread_setschedparam.c 2004-02-27 08:06:13.000000000 +0000 +++ glibc-2.5/nptl/pthread_setschedparam.c 2006-08-14 23:03:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -45,6 +45,19 @@ __pthread_setschedparam (threadid, polic lll_lock (pd->lock); + struct sched_param p; + const struct sched_param *orig_param = param; + + /* If the thread should have higher priority because of some + PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ + if (__builtin_expect (pd->tpp != NULL, 0) + && pd->tpp->priomax > param->sched_priority) + { + p = *param; + p.sched_priority = pd->tpp->priomax; + param = &p; + } + /* Try to set the scheduler information. */ if (__builtin_expect (__sched_setscheduler (pd->tid, policy, param) == -1, 0)) @@ -54,7 +67,7 @@ __pthread_setschedparam (threadid, polic /* We succeeded changing the kernel information. Reflect this change in the thread descriptor. */ pd->schedpolicy = policy; - memcpy (&pd->schedparam, param, sizeof (struct sched_param)); + memcpy (&pd->schedparam, orig_param, sizeof (struct sched_param)); pd->flags |= ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET; } diff -uprN glibc-2.4/nptl/pthread_setschedprio.c glibc-2.5/nptl/pthread_setschedprio.c --- glibc-2.4/nptl/pthread_setschedprio.c 2004-11-24 22:52:48.000000000 +0000 +++ glibc-2.5/nptl/pthread_setschedprio.c 2006-08-14 23:03:23.000000000 +0000 @@ -47,6 +47,11 @@ pthread_setschedprio (threadid, prio) lll_lock (pd->lock); + /* If the thread should have higher priority because of some + PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ + if (__builtin_expect (pd->tpp != NULL, 0) && pd->tpp->priomax > prio) + param.sched_priority = pd->tpp->priomax; + /* Try to set the scheduler information. */ if (__builtin_expect (sched_setparam (pd->tid, ¶m) == -1, 0)) result = errno; @@ -54,6 +59,7 @@ pthread_setschedprio (threadid, prio) { /* We succeeded changing the kernel information. Reflect this change in the thread descriptor. */ + param.sched_priority = prio; memcpy (&pd->schedparam, ¶m, sizeof (struct sched_param)); pd->flags |= ATTR_FLAG_SCHED_SET; } diff -uprN glibc-2.4/nptl/pthread_setspecific.c glibc-2.5/nptl/pthread_setspecific.c --- glibc-2.4/nptl/pthread_setspecific.c 2003-04-02 03:41:41.000000000 +0000 +++ glibc-2.5/nptl/pthread_setspecific.c 2006-08-03 09:34:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -52,8 +52,8 @@ __pthread_setspecific (key, value) } else { - if (KEY_UNUSED ((seq = __pthread_keys[key].seq)) - || key >= PTHREAD_KEYS_MAX) + if (key >= PTHREAD_KEYS_MAX + || KEY_UNUSED ((seq = __pthread_keys[key].seq))) /* Not valid. */ return EINVAL; diff -uprN glibc-2.4/nptl/semaphoreP.h glibc-2.5/nptl/semaphoreP.h --- glibc-2.4/nptl/semaphoreP.h 2003-05-17 20:50:37.000000000 +0000 +++ glibc-2.5/nptl/semaphoreP.h 2006-05-11 17:08:37.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -48,7 +48,7 @@ extern pthread_once_t __namedsem_once at extern void *__sem_mappings attribute_hidden; /* Lock to protect the search tree. */ -extern lll_lock_t __sem_mappings_lock; +extern lll_lock_t __sem_mappings_lock attribute_hidden; /* Initializer for mountpoint. */ diff -uprN glibc-2.4/nptl/sem_open.c glibc-2.5/nptl/sem_open.c --- glibc-2.4/nptl/sem_open.c 2003-05-31 19:57:50.000000000 +0000 +++ glibc-2.5/nptl/sem_open.c 2006-05-11 17:09:43.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -147,7 +147,7 @@ __sem_search (const void *a, const void void *__sem_mappings attribute_hidden; /* Lock to protect the search tree. */ -lll_lock_t __sem_mappings_lock = LLL_LOCK_INITIALIZER; +lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; /* Search for existing mapping and if possible add the one provided. */ diff -uprN glibc-2.4/nptl/sysdeps/pthread/aio_misc.h glibc-2.5/nptl/sysdeps/pthread/aio_misc.h --- glibc-2.4/nptl/sysdeps/pthread/aio_misc.h 2006-01-08 01:51:18.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/aio_misc.h 2006-09-05 15:22:18.000000000 +0000 @@ -29,7 +29,7 @@ #define AIO_MISC_NOTIFY(waitlist) \ do { \ - if (--*waitlist->counterp == 0) \ + if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ lll_futex_wake (waitlist->counterp, 1); \ } while (0) diff -uprN glibc-2.4/nptl/sysdeps/pthread/allocalim.h glibc-2.5/nptl/sysdeps/pthread/allocalim.h --- glibc-2.4/nptl/sysdeps/pthread/allocalim.h 2005-02-26 01:33:57.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/allocalim.h 2006-05-02 06:16:07.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine whether block of given size can be allocated on the stack or not. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,8 @@ #include -extern inline int +extern int +__always_inline __libc_use_alloca (size_t size) { return (__builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) diff -uprN glibc-2.4/nptl/sysdeps/pthread/createthread.c glibc-2.5/nptl/sysdeps/pthread/createthread.c --- glibc-2.4/nptl/sysdeps/pthread/createthread.c 2004-11-20 07:12:45.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/createthread.c 2006-09-05 17:13:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -242,6 +242,7 @@ create_thread (struct pthread *pd, const || (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0)) stopped = true; pd->stopped_start = stopped; + pd->parent_cancelhandling = THREAD_GETMEM (THREAD_SELF, cancelhandling); /* Actually create the thread. */ int res = do_clone (pd, attr, clone_flags, start_thread, diff -uprN glibc-2.4/nptl/sysdeps/pthread/gai_misc.h glibc-2.5/nptl/sysdeps/pthread/gai_misc.h --- glibc-2.4/nptl/sysdeps/pthread/gai_misc.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/gai_misc.h 2006-09-05 15:23:12.000000000 +0000 @@ -0,0 +1,119 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* We define a special synchronization primitive for AIO. POSIX + conditional variables would be ideal but the pthread_cond_*wait + operations do not return on EINTR. This is a requirement for + correct aio_suspend and lio_listio implementations. */ + +#include +#include +#include +#include + +#define DONT_NEED_GAI_MISC_COND 1 + +#define GAI_MISC_NOTIFY(waitlist) \ + do { \ + if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \ + lll_futex_wake (waitlist->counterp, 1); \ + } while (0) + +#define GAI_MISC_WAIT(result, futex, timeout, cancel) \ + do { \ + volatile int *futexaddr = &futex; \ + int oldval = futex; \ + \ + if (oldval != 0) \ + { \ + pthread_mutex_unlock (&__gai_requests_mutex); \ + \ + int oldtype; \ + if (cancel) \ + oldtype = LIBC_CANCEL_ASYNC (); \ + \ + int status; \ + do \ + { \ + status = lll_futex_timed_wait (futexaddr, oldval, timeout); \ + if (status != -EWOULDBLOCK) \ + break; \ + \ + oldval = *futexaddr; \ + } \ + while (oldval != 0); \ + \ + if (cancel) \ + LIBC_CANCEL_RESET (oldtype); \ + \ + if (status == -EINTR) \ + result = EINTR; \ + else if (status == -ETIMEDOUT) \ + result = EAGAIN; \ + else \ + assert (status == 0 || status == -EWOULDBLOCK); \ + \ + pthread_mutex_lock (&__gai_requests_mutex); \ + } \ + } while (0) + + +#define gai_start_notify_thread __gai_start_notify_thread +#define gai_create_helper_thread __gai_create_helper_thread + +extern inline void +__gai_start_notify_thread (void) +{ + sigset_t ss; + sigemptyset (&ss); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8); +} + +extern inline int +__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), + void *arg) +{ + pthread_attr_t attr; + + /* Make sure the thread is created detached. */ + pthread_attr_init (&attr); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + + /* The helper thread needs only very little resources. */ + (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN); + + /* Block all signals in the helper thread. To do this thoroughly we + temporarily have to block all signals here. */ + sigset_t ss; + sigset_t oss; + sigfillset (&ss); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8); + + int ret = pthread_create (threadp, &attr, tf, arg); + + /* Restore the signal mask. */ + INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &oss, NULL, + _NSIG / 8); + + (void) pthread_attr_destroy (&attr); + return ret; +} + +#include_next diff -uprN glibc-2.4/nptl/sysdeps/pthread/pthread_cond_broadcast.c glibc-2.5/nptl/sysdeps/pthread/pthread_cond_broadcast.c --- glibc-2.4/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2004-06-03 15:55:33.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2006-07-29 04:31:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -55,6 +55,12 @@ __pthread_cond_broadcast (cond) /* Wake everybody. */ pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex; + + /* XXX: Kernel so far doesn't support requeue to PI futex. */ + if (__builtin_expect (mut->__data.__kind & PTHREAD_MUTEX_PRIO_INHERIT_NP, + 0)) + goto wake_all; + /* lll_futex_requeue returns 0 for success and non-zero for errors. */ if (__builtin_expect (lll_futex_requeue (&cond->__data.__futex, 1, diff -uprN glibc-2.4/nptl/sysdeps/pthread/pthread_cond_wait.c glibc-2.5/nptl/sysdeps/pthread/pthread_cond_wait.c --- glibc-2.4/nptl/sysdeps/pthread/pthread_cond_wait.c 2004-09-02 18:49:34.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/pthread_cond_wait.c 2006-09-09 11:21:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -50,10 +50,16 @@ __condvar_cleanup (void *arg) if (cbuffer->bc_seq == cbuffer->cond->__data.__broadcast_seq) { /* This thread is not waiting anymore. Adjust the sequence counters - appropriately. */ - ++cbuffer->cond->__data.__wakeup_seq; + appropriately. We do not increment WAKEUP_SEQ if this would + bump it over the value of TOTAL_SEQ. This can happen if a thread + was woken and then canceled. */ + if (cbuffer->cond->__data.__wakeup_seq + < cbuffer->cond->__data.__total_seq) + { + ++cbuffer->cond->__data.__wakeup_seq; + ++cbuffer->cond->__data.__futex; + } ++cbuffer->cond->__data.__woken_seq; - ++cbuffer->cond->__data.__futex; } cbuffer->cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS; diff -uprN glibc-2.4/nptl/sysdeps/pthread/pthread-functions.h glibc-2.5/nptl/sysdeps/pthread/pthread-functions.h --- glibc-2.4/nptl/sysdeps/pthread/pthread-functions.h 2005-02-17 01:17:37.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/pthread-functions.h 2006-08-23 17:43:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -95,6 +95,7 @@ struct pthread_functions __attribute ((noreturn)) __cleanup_fct_attribute; void (*ptr__nptl_deallocate_tsd) (void); int (*ptr__nptl_setxid) (struct xid_command *); + void (*ptr_freeres) (void); }; /* Variable in libc.so. */ diff -uprN glibc-2.4/nptl/sysdeps/pthread/pthread.h glibc-2.5/nptl/sysdeps/pthread/pthread.h --- glibc-2.4/nptl/sysdeps/pthread/pthread.h 2006-02-28 09:36:06.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/pthread.h 2006-06-04 23:59:07.000000000 +0000 @@ -221,7 +221,7 @@ __BEGIN_DECLS extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), - void *__restrict __arg) __THROW; + void *__restrict __arg) __THROW __nonnull ((1, 3)); /* Terminate calling thread. @@ -271,71 +271,78 @@ extern int pthread_equal (pthread_t __th /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ -extern int pthread_attr_init (pthread_attr_t *__attr) __THROW; +extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Destroy thread attribute *ATTR. */ -extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW; +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __THROW __nonnull ((1)); /* Get detach state attribute. */ extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, - int *__detachstate) __THROW; + int *__detachstate) + __THROW __nonnull ((1, 2)); /* Set detach state attribute. */ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, - int __detachstate) __THROW; + int __detachstate) + __THROW __nonnull ((1)); /* Get the size of the guard area created for stack overflow protection. */ extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, - size_t *__guardsize) __THROW; + size_t *__guardsize) + __THROW __nonnull ((1, 2)); /* Set the size of the guard area created for stack overflow protection. */ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, - size_t __guardsize) __THROW; + size_t __guardsize) + __THROW __nonnull ((1)); /* Return in *PARAM the scheduling parameters of *ATTR. */ extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) - __THROW; + __THROW __nonnull ((1, 2)); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict - __param) __THROW; + __param) __THROW __nonnull ((1, 2)); /* Return in *POLICY the scheduling policy of *ATTR. */ extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) - __THROW; + __THROW __nonnull ((1, 2)); /* Set scheduling policy in *ATTR according to POLICY. */ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) - __THROW; + __THROW __nonnull ((1)); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) - __THROW; + __THROW __nonnull ((1, 2)); /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, - int __inherit) __THROW; + int __inherit) + __THROW __nonnull ((1)); /* Return in *SCOPE the scheduling contention scope of *ATTR. */ extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, - int *__restrict __scope) __THROW; + int *__restrict __scope) + __THROW __nonnull ((1, 2)); /* Set scheduling contention scope in *ATTR according to SCOPE. */ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) - __THROW; + __THROW __nonnull ((1)); /* Return the previously set address for the stack. */ extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) - __THROW __attribute_deprecated__; + __THROW __nonnull ((1, 2)) __attribute_deprecated__; /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either @@ -343,30 +350,32 @@ extern int pthread_attr_getstackaddr (__ minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) - __THROW __attribute_deprecated__; + __THROW __nonnull ((1)) __attribute_deprecated__; /* Return the currently used minimal stack size. */ extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) - __THROW; + __THROW __nonnull ((1, 2)); /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, - size_t __stacksize) __THROW; + size_t __stacksize) + __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Return the previously set address for the stack. */ extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, - size_t *__restrict __stacksize) __THROW; + size_t *__restrict __stacksize) + __THROW __nonnull ((1, 2, 3)); /* The following two interfaces are intended to replace the last two. They require setting the address as well as the size since only setting the address will make the implementation on some architectures impossible. */ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, - size_t __stacksize) __THROW; + size_t __stacksize) __THROW __nonnull ((1)); #endif #ifdef __USE_GNU @@ -374,19 +383,22 @@ extern int pthread_attr_setstack (pthrea the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, - __const cpu_set_t *__cpuset) __THROW; + __const cpu_set_t *__cpuset) + __THROW __nonnull ((1, 3)); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, size_t __cpusetsize, - cpu_set_t *__cpuset) __THROW; + cpu_set_t *__cpuset) + __THROW __nonnull ((1, 3)); /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on unitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ -extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __THROW __nonnull ((2)); #endif @@ -396,13 +408,13 @@ extern int pthread_getattr_np (pthread_t and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) - __THROW; + __THROW __nonnull ((3)); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) - __THROW; + __THROW __nonnull ((2, 3)); /* Set the scheduling priority for TARGET_THREAD. */ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) @@ -428,11 +440,13 @@ extern int pthread_yield (void) __THROW; /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, - __const cpu_set_t *__cpuset) __THROW; + __const cpu_set_t *__cpuset) + __THROW __nonnull ((3)); /* Get bit set in CPUSET representing the processors TH can run on. */ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, - cpu_set_t *__cpuset) __THROW; + cpu_set_t *__cpuset) + __THROW __nonnull ((3)); #endif @@ -446,7 +460,7 @@ extern int pthread_getaffinity_np (pthre The initialization functions might throw exception which is why this function is not marked with __THROW. */ extern int pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); + void (*__init_routine) (void)) __nonnull ((1, 2)); /* Functions for handling cancellation. @@ -700,26 +714,30 @@ extern int __sigsetjmp (struct __jmp_buf /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) - __THROW; + __THROW __nonnull ((1)); /* Destroy a mutex. */ -extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); /* Try locking a mutex. */ -extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) __THROW; +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); /* Lock a mutex. */ -extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict - __abstime) __THROW; + __abstime) __THROW __nonnull ((1, 2)); #endif /* Unlock a mutex. */ -extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); #ifdef __USE_UNIX98 @@ -727,20 +745,21 @@ extern int pthread_mutex_unlock (pthread extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) - __THROW; + __THROW __nonnull ((1, 2)); /* Set the priority ceiling of MUTEX to PRIOCEILING, return old priority ceiling value in *OLD_CEILING. */ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) - __THROW; + __THROW __nonnull ((1, 3)); #endif #ifdef __USE_GNU /* Declare the state protected by MUTEX as consistent. */ -extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __THROW __nonnull ((1)); #endif @@ -748,60 +767,70 @@ extern int pthread_mutex_consistent_np ( /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_TIMED_NP). */ -extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __THROW __nonnull ((1)); /* Destroy mutex attribute object ATTR. */ -extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __THROW __nonnull ((1)); /* Get the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, - int *__restrict __pshared) __THROW; + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, - int __pshared) __THROW; + int __pshared) + __THROW __nonnull ((1)); #ifdef __USE_UNIX98 /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict - __attr, int *__restrict __kind) __THROW; + __attr, int *__restrict __kind) + __THROW __nonnull ((1, 2)); /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) - __THROW; + __THROW __nonnull ((1)); /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * __restrict __attr, - int *__restrict __protocol) __THROW; + int *__restrict __protocol) + __THROW __nonnull ((1, 2)); /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, - int __protocol) __THROW; + int __protocol) + __THROW __nonnull ((1)); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) - __THROW; + __THROW __nonnull ((1, 2)); /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, - int __prioceiling) __THROW; + int __prioceiling) + __THROW __nonnull ((1)); #endif #ifdef __USE_GNU /* Get the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, - int *__robustness) __THROW; + int *__robustness) + __THROW __nonnull ((1, 2)); /* Set the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, - int __robustness) __THROW; + int __robustness) + __THROW __nonnull ((1)); #endif @@ -812,66 +841,77 @@ extern int pthread_mutexattr_setrobust_n the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict - __attr) __THROW; + __attr) __THROW __nonnull ((1)); /* Destroy read-write lock RWLOCK. */ -extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); /* Acquire read lock for RWLOCK. */ -extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); /* Try to acquire read lock for RWLOCK. */ -extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict - __abstime) __THROW; + __abstime) __THROW __nonnull ((1, 2)); # endif /* Acquire write lock for RWLOCK. */ -extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); /* Try to acquire write lock for RWLOCK. */ -extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict - __abstime) __THROW; + __abstime) __THROW __nonnull ((1, 2)); # endif /* Unlock RWLOCK. */ -extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW; +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __THROW __nonnull ((1)); /* Functions for handling read-write lock attributes. */ /* Initialize attribute object ATTR with default values. */ -extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW; +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __THROW __nonnull ((1)); /* Destroy attribute object ATTR. */ -extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __THROW __nonnull ((1)); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, - int *__restrict __pshared) __THROW; + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); /* Set process-shared attribute of ATTR to PSHARED. */ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, - int __pshared) __THROW; + int __pshared) + __THROW __nonnull ((1)); /* Return current setting of reader/writer preference. */ extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * __restrict __attr, - int *__restrict __pref) __THROW; + int *__restrict __pref) + __THROW __nonnull ((1, 2)); /* Set reader/write preference. */ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, - int __pref) __THROW; + int __pref) __THROW __nonnull ((1)); #endif @@ -881,16 +921,19 @@ extern int pthread_rwlockattr_setkind_np the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict - __cond_attr) __THROW; + __cond_attr) __THROW __nonnull ((1)); /* Destroy condition variable COND. */ -extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW; +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __THROW __nonnull ((1)); /* Wake up one thread waiting for condition variable COND. */ -extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW; +extern int pthread_cond_signal (pthread_cond_t *__cond) + __THROW __nonnull ((1)); /* Wake up all threads waiting for condition variables COND. */ -extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW; +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __THROW __nonnull ((1)); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. @@ -898,7 +941,8 @@ extern int pthread_cond_broadcast (pthre This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, - pthread_mutex_t *__restrict __mutex); + pthread_mutex_t *__restrict __mutex) + __nonnull ((1, 2)); /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an @@ -910,36 +954,39 @@ extern int pthread_cond_wait (pthread_co extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict - __abstime); + __abstime) __nonnull ((1, 2, 3)); /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ -extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW; +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __THROW __nonnull ((1)); /* Destroy condition variable attribute ATTR. */ -extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __THROW __nonnull ((1)); /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, - int *__restrict __pshared) __THROW; + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, - int __pshared) __THROW; + int __pshared) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the clock selected for the conditon variable attribute ATTR. */ extern int pthread_condattr_getclock (__const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) - __THROW; + __THROW __nonnull ((1, 2)); /* Set the clock selected for the conditon variable attribute ATTR. */ extern int pthread_condattr_setclock (pthread_condattr_t *__attr, - __clockid_t __clock_id) __THROW; - + __clockid_t __clock_id) + __THROW __nonnull ((1)); #endif @@ -949,19 +996,23 @@ extern int pthread_condattr_setclock (pt /* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can be shared between different processes. */ extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) - __THROW; + __THROW __nonnull ((1)); /* Destroy the spinlock LOCK. */ -extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW; +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); /* Wait until spinlock LOCK is retrieved. */ -extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROW; +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); /* Try to lock spinlock LOCK. */ -extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROW; +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); /* Release spinlock LOCK. */ -extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW; +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __THROW __nonnull ((1)); /* Functions to handle barriers. */ @@ -970,29 +1021,36 @@ extern int pthread_spin_unlock (pthread_ opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict - __attr, unsigned int __count) __THROW; + __attr, unsigned int __count) + __THROW __nonnull ((1)); /* Destroy a previously dynamically initialized barrier BARRIER. */ -extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW; +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __THROW __nonnull ((1)); /* Wait on barrier BARRIER. */ -extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW; +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __THROW __nonnull ((1)); /* Initialize barrier attribute ATTR. */ -extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW; +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __THROW __nonnull ((1)); /* Destroy previously dynamically initialized barrier attribute ATTR. */ -extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW; +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __THROW __nonnull ((1)); /* Get the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, - int *__restrict __pshared) __THROW; + int *__restrict __pshared) + __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, - int __pshared) __THROW; + int __pshared) + __THROW __nonnull ((1)); #endif @@ -1005,7 +1063,8 @@ extern int pthread_barrierattr_setpshare DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ extern int pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)) __THROW; + void (*__destr_function) (void *)) + __THROW __nonnull ((1)); /* Destroy KEY. */ extern int pthread_key_delete (pthread_key_t __key) __THROW; @@ -1015,13 +1074,14 @@ extern void *pthread_getspecific (pthrea /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW; + __const void *__pointer) __THROW ; #ifdef __USE_XOPEN2K /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, - __clockid_t *__clock_id) __THROW; + __clockid_t *__clock_id) + __THROW __nonnull ((2)); #endif @@ -1040,6 +1100,16 @@ extern int pthread_atfork (void (*__prep void (*__parent) (void), void (*__child) (void)) __THROW; + +#ifdef __USE_EXTERN_INLINES +/* Optimizations. */ +extern __inline int +__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) +{ + return __thread1 == __thread2; +} +#endif + __END_DECLS #endif /* pthread.h */ diff -uprN glibc-2.4/nptl/sysdeps/pthread/unwind-forcedunwind.c glibc-2.5/nptl/sysdeps/pthread/unwind-forcedunwind.c --- glibc-2.4/nptl/sysdeps/pthread/unwind-forcedunwind.c 2005-11-16 23:31:28.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/pthread/unwind-forcedunwind.c 2006-05-09 15:20:39.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -31,13 +31,18 @@ static _Unwind_Reason_Code (*libgcc_s_fo static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); void +__attribute_noinline__ pthread_cancel_init (void) { void *resume, *personality, *forcedunwind, *getcfa; void *handle; if (__builtin_expect (libgcc_s_getcfa != NULL, 1)) - return; + { + /* Force gcc to reload all values. */ + asm volatile ("" ::: "memory"); + return; + } handle = __libc_dlopen ("libgcc_s.so.1"); @@ -68,6 +73,7 @@ _Unwind_Resume (struct _Unwind_Exception { if (__builtin_expect (libgcc_s_resume == NULL, 0)) pthread_cancel_init (); + libgcc_s_resume (exc); } @@ -79,6 +85,7 @@ __gcc_personality_v0 (int version, _Unwi { if (__builtin_expect (libgcc_s_personality == NULL, 0)) pthread_cancel_init (); + return libgcc_s_personality (version, actions, exception_class, ue_header, context); } @@ -89,6 +96,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exc { if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) pthread_cancel_init (); + return libgcc_s_forcedunwind (exc, stop, stop_argument); } @@ -97,5 +105,6 @@ _Unwind_GetCFA (struct _Unwind_Context * { if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) pthread_cancel_init (); + return libgcc_s_getcfa (context); } diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-02-17 18:44:32.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 05:06:07.000000000 +0000 @@ -33,6 +33,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2005-02-26 01:33:55.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2006-08-20 19:33:32.000000000 +0000 @@ -1,5 +1,5 @@ /* Define POSIX options for Linux. - Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -60,6 +60,9 @@ /* X/Open realtime support is available. */ #define _XOPEN_REALTIME 1 +/* X/Open thread realtime support is available. */ +#define _XOPEN_REALTIME_THREADS 1 + /* XPG4.2 shared memory is supported. */ #define _XOPEN_SHM 1 @@ -79,6 +82,13 @@ /* We support user-defined stacks. */ #define _POSIX_THREAD_ATTR_STACKADDR 200112L +/* We support priority inheritence. */ +#define _POSIX_THREAD_PRIO_INHERIT 200112L + +/* We support priority protection, though only for non-robust + mutexes. */ +#define _POSIX_THREAD_PRIO_PROTECT 200112L + /* We support POSIX.1b semaphores. */ #define _POSIX_SEMAPHORES 200112L @@ -171,8 +181,4 @@ /* Typed memory objects are not available. */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 -/* No support for priority inheritance or protection so far. */ -#define _POSIX_THREAD_PRIO_INHERIT -1 -#define _POSIX_THREAD_PRIO_PROTECT -1 - #endif /* posix_opt.h */ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/fork.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/fork.h 2003-06-14 08:49:52.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 20:19:43.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -41,7 +41,7 @@ struct fork_handler }; /* The single linked list of all currently registered for handlers. */ -extern struct fork_handler *__fork_handlers; +extern struct fork_handler *__fork_handlers attribute_hidden; /* Function to call to unregister fork handlers. */ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2003-03-10 22:10:06.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2006-04-09 02:42:29.000000000 +0000 @@ -22,7 +22,7 @@ #ifndef UP # define LOCK \ cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \ - je,pt 0f; \ + je 0f; \ lock; \ 0: #endif diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2004-10-01 10:30:44.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2006-09-05 14:46:43.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -41,9 +41,16 @@ .hidden __lll_mutex_lock_wait .align 16 __lll_mutex_lock_wait: + cfi_startproc pushl %edx + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) + cfi_offset(%edx, -8) + cfi_offset(%ebx, -12) + cfi_offset(%esi, -16) movl $2, %edx movl %ecx, %ebx @@ -60,12 +67,19 @@ __lll_mutex_lock_wait: xchgl %eax, (%ebx) /* NB: lock is implied */ testl %eax, %eax - jnz,pn 1b + jnz 1b popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) ret + cfi_endproc .size __lll_mutex_lock_wait,.-__lll_mutex_lock_wait @@ -75,17 +89,27 @@ __lll_mutex_lock_wait: .hidden __lll_mutex_timedlock_wait .align 16 __lll_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpl $1000000000, 4(%edx) jae 3f pushl %edi + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ebp + cfi_adjust_cfa_offset(4) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Stack frame for the timespec and timeval structs. */ subl $8, %esp + cfi_adjust_cfa_offset(8) movl %ecx, %ebp movl %edx, %edi @@ -140,12 +164,29 @@ __lll_mutex_timedlock_wait: jnz 7f 6: addl $8, %esp + cfi_adjust_cfa_offset(-8) popl %ebp + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebp) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %edi + cfi_adjust_cfa_offset(-4) + cfi_restore(%edi) ret +3: movl $EINVAL, %eax + ret + + cfi_adjust_cfa_offset(24) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Check whether the time expired. */ 7: cmpl $-ETIMEDOUT, %ecx je 5f @@ -157,11 +198,9 @@ __lll_mutex_timedlock_wait: jz 6b jmp 1b -3: movl $EINVAL, %eax - ret - 5: movl $ETIMEDOUT, %eax jmp 6b + cfi_endproc .size __lll_mutex_timedlock_wait,.-__lll_mutex_timedlock_wait #endif @@ -200,9 +239,16 @@ lll_unlock_wake_cb: .hidden __lll_mutex_unlock_wake .align 16 __lll_mutex_unlock_wake: + cfi_startproc pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ecx + cfi_adjust_cfa_offset(4) pushl %edx + cfi_adjust_cfa_offset(4) + cfi_offset(%ebx, -8) + cfi_offset(%ecx, -12) + cfi_offset(%edx, -16) movl %eax, %ebx movl $0, (%eax) @@ -212,9 +258,16 @@ __lll_mutex_unlock_wake: ENTER_KERNEL popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) popl %ecx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ecx) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) ret + cfi_endproc .size __lll_mutex_unlock_wake,.-__lll_mutex_unlock_wake diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2006-03-02 00:25:56.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2006-09-05 14:46:43.000000000 +0000 @@ -44,9 +44,16 @@ .hidden __lll_robust_mutex_lock_wait .align 16 __lll_robust_mutex_lock_wait: + cfi_startproc pushl %edx + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) + cfi_offset(%edx, -8) + cfi_offset(%ebx, -12) + cfi_offset(%esi, -16) movl %ecx, %ebx xorl %esi, %esi /* No timeout. */ @@ -81,9 +88,16 @@ __lll_robust_mutex_lock_wait: /* NB: %eax == 0 */ 3: popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) ret + cfi_endproc .size __lll_robust_mutex_lock_wait,.-__lll_robust_mutex_lock_wait @@ -92,17 +106,27 @@ __lll_robust_mutex_lock_wait: .hidden __lll_robust_mutex_timedlock_wait .align 16 __lll_robust_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpl $1000000000, 4(%edx) jae 3f pushl %edi + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ebp + cfi_adjust_cfa_offset(4) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Stack frame for the timespec and timeval structs. */ subl $12, %esp + cfi_adjust_cfa_offset(12) movl %ecx, %ebp movl %edx, %edi @@ -170,19 +194,34 @@ __lll_robust_mutex_timedlock_wait: jnz 7f 6: addl $12, %esp + cfi_adjust_cfa_offset(-12) popl %ebp + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebp) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %edi + cfi_adjust_cfa_offset(-4) + cfi_restore(%edi) ret +3: movl $EINVAL, %eax + ret + + cfi_adjust_cfa_offset(28) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Check whether the time expired. */ 7: cmpl $-ETIMEDOUT, %ecx jne 1b 8: movl $ETIMEDOUT, %eax jmp 6b - -3: movl $EINVAL, %eax - ret + cfi_endproc .size __lll_robust_mutex_timedlock_wait,.-__lll_robust_mutex_timedlock_wait diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S 2004-02-19 02:45:55.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S 2006-04-09 02:42:29.000000000 +0000 @@ -82,7 +82,7 @@ pthread_barrier_wait: #else cmpl %edx, CURR_EVENT(%ebx) #endif - je,pn 8b + je 8b /* Increment LEFT. If this brings the count back to the initial count unlock the object. */ @@ -92,7 +92,7 @@ pthread_barrier_wait: xaddl %edx, LEFT(%ebx) subl $1, %ecx cmpl %ecx, %edx - jne,pt 10f + jne 10f /* Release the mutex. We cannot release the lock before waking the waiting threads since otherwise a new thread might @@ -131,7 +131,7 @@ pthread_barrier_wait: xaddl %edx, LEFT(%ebx) subl $1, %ecx cmpl %ecx, %edx - jne,pt 5f + jne 5f /* Release the mutex. We cannot release the lock before waking the waiting threads since otherwise a new thread might diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2004-06-03 15:59:13.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2006-07-29 04:31:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef UP # define LOCK @@ -94,6 +95,10 @@ __pthread_cond_broadcast: 8: cmpl $-1, %edi je 9f + /* XXX: The kernel so far doesn't support requeue to PI futex. */ + testl $PI_BIT, MUTEX_KIND(%edi) + jne 9f + /* Wake up all threads. */ movl $FUTEX_CMP_REQUEUE, %ecx movl $SYS_futex, %eax diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2004-09-02 18:53:10.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2006-09-09 11:21:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -406,12 +406,22 @@ __condvar_tw_cleanup: cmpl 20(%esp), %eax jne 3f - addl $1, wakeup_seq(%ebx) - adcl $0, wakeup_seq+4(%ebx) + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + movl total_seq(%ebx), %eax + movl total_seq+4(%ebx), %edi + cmpl wakeup_seq+4(%ebx), %edi + jb 6f + ja 7f + cmpl wakeup_seq(%ebx), %eax + jbe 7f +6: addl $1, wakeup_seq(%ebx) + adcl $0, wakeup_seq+4(%ebx) addl $1, cond_futex(%ebx) - addl $1, woken_seq(%ebx) +7: addl $1, woken_seq(%ebx) adcl $0, woken_seq+4(%ebx) 3: subl $(1 << clock_bits), cond_nwaiters(%ebx) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2004-09-02 18:52:38.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2006-09-09 11:21:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -297,12 +297,22 @@ __condvar_w_cleanup: cmpl 12(%esp), %eax jne 3f - addl $1, wakeup_seq(%ebx) - adcl $0, wakeup_seq+4(%ebx) + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + movl total_seq(%ebx), %eax + movl total_seq+4(%ebx), %edi + cmpl wakeup_seq+4(%ebx), %edi + jb 6f + ja 7f + cmpl wakeup_seq(%ebx), %eax + jbe 7f +6: addl $1, wakeup_seq(%ebx) + adcl $0, wakeup_seq+4(%ebx) addl $1, cond_futex(%ebx) - addl $1, woken_seq(%ebx) +7: addl $1, woken_seq(%ebx) adcl $0, woken_seq+4(%ebx) 3: subl $(1 << clock_bits), cond_nwaiters(%ebx) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2005-01-26 19:57:25.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2006-04-09 02:42:29.000000000 +0000 @@ -49,12 +49,12 @@ sem_timedwait: movl (%ecx), %eax 2: testl %eax, %eax - je,pn 1f + je 1f leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ecx) - jne,pn 2b + jne 2b xorl %eax, %eax ret @@ -117,7 +117,7 @@ sem_timedwait: call __pthread_disable_asynccancel testl %esi, %esi - je,pt 9f + je 9f cmpl $-EWOULDBLOCK, %esi jne 3f @@ -128,7 +128,7 @@ sem_timedwait: leal -1(%eax), %ecx LOCK cmpxchgl %ecx, (%ebx) - jne,pn 8b + jne 8b addl $12, %esp cfi_adjust_cfa_offset(-12) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2005-01-26 19:57:25.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2006-04-09 02:42:29.000000000 +0000 @@ -42,7 +42,7 @@ __new_sem_trywait: leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ecx) - jne,pn 2b + jne 2b xorl %eax, %eax ret diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2005-12-22 17:58:29.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2006-04-09 02:42:29.000000000 +0000 @@ -62,7 +62,7 @@ __new_sem_wait: leal -1(%eax), %edx LOCK cmpxchgl %edx, (%ebx) - jne,pn 2b + jne 2b xorl %eax, %eax movl 4(%esp), %esi diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-02-17 08:05:32.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 14:44:25.000000000 +0000 @@ -35,6 +35,9 @@ #define SYS_futex 240 #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ @@ -65,6 +68,82 @@ #define BUSY_WAIT_NOP asm ("rep; nop") +#define LLL_STUB_UNWIND_INFO_START \ + ".section .eh_frame,\"a\",@progbits\n" \ +"5:\t" ".long 7f-6f # Length of Common Information Entry\n" \ +"6:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ + ".byte 0x1 # CIE Version\n\t" \ + ".ascii \"zR\\0\" # CIE Augmentation\n\t" \ + ".uleb128 0x1 # CIE Code Alignment Factor\n\t" \ + ".sleb128 -4 # CIE Data Alignment Factor\n\t" \ + ".byte 0x8 # CIE RA Column\n\t" \ + ".uleb128 0x1 # Augmentation size\n\t" \ + ".byte 0x1b # FDE Encoding (pcrel sdata4)\n\t" \ + ".byte 0xc # DW_CFA_def_cfa\n\t" \ + ".uleb128 0x4\n\t" \ + ".uleb128 0x0\n\t" \ + ".align 4\n" \ +"7:\t" ".long 17f-8f # FDE Length\n" \ +"8:\t" ".long 8b-5b # FDE CIE offset\n\t" \ + ".long 1b-. # FDE initial location\n\t" \ + ".long 4b-1b # FDE address range\n\t" \ + ".uleb128 0x0 # Augmentation size\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 10f-9f\n" \ +"9:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-1b\n" +#define LLL_STUB_UNWIND_INFO_END \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 12f-11f\n" \ +"11:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-2b\n" \ +"12:\t" ".byte 0x40 + (3b-2b-1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 16f-13f\n" \ +"13:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 15f-14f\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"14:\t" ".4byte 3b-.\n\t" \ + ".byte 0x1c # DW_OP_minus\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"15:\t" ".4byte 18f-.\n\t" \ + ".byte 0x22 # DW_OP_plus\n" \ +"16:\t" ".align 4\n" \ +"17:\t" ".previous\n" + +/* Unwind info for + 1: lea ..., ... + 2: call ... + 3: jmp 18f + 4: + snippet. */ +#define LLL_STUB_UNWIND_INFO_3 \ +LLL_STUB_UNWIND_INFO_START \ +"10:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + +/* Unwind info for + 1: lea ..., ... + 0: movl ..., ... + 2: call ... + 3: jmp 18f + 4: + snippet. */ +#define LLL_STUB_UNWIND_INFO_4 \ +LLL_STUB_UNWIND_INFO_START \ +"10:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 20f-19f\n" \ +"19:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-0b\n" \ +"20:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + + #define lll_futex_wait(futex, val) \ ({ \ int __status; \ @@ -165,13 +244,14 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + "_L_mutex_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (1), "m" (futex) \ : "memory"); }) @@ -180,16 +260,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_lock(futex, id) \ ({ int result, ignore; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_lock_%=\n\t" \ + "jnz _L_robust_mutex_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_robust_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + ".type _L_robust_mutex_lock_%=,@function\n" \ + "_L_robust_mutex_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_robust_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (result), "=c" (ignore), "=m" (futex) \ : "0" (0), "1" (id), "m" (futex) \ : "memory"); \ @@ -204,13 +285,14 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_cond_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_cond_lock_%=,@function\n" \ - "_L_mutex_cond_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_cond_lock_%=,.-_L_mutex_cond_lock_%=\n" \ + "_L_mutex_cond_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_cond_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (2), "m" (futex) \ : "memory"); }) @@ -219,16 +301,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_cond_lock(futex, id) \ ({ int result, ignore; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_cond_lock_%=\n\t" \ + "jnz _L_robust_mutex_cond_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_cond_lock_%=,@function\n" \ - "_L_mutex_cond_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_robust_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_cond_lock_%=,.-_L_mutex_cond_lock_%=\n"\ + ".type _L_robust_mutex_cond_lock_%=,@function\n" \ + "_L_robust_mutex_cond_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_robust_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_cond_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (result), "=c" (ignore), "=m" (futex) \ : "0" (0), "1" (id | FUTEX_WAITERS), "m" (futex) \ : "memory"); \ @@ -241,14 +324,15 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_timedlock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_timedlock_%=,@function\n" \ - "_L_mutex_timedlock_%=:\n\t" \ - "leal %3, %%ecx\n\t" \ - "movl %7, %%edx\n\t" \ - "call __lll_mutex_timedlock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_timedlock_%=,.-_L_mutex_timedlock_%=\n"\ + "_L_mutex_timedlock_%=:\n" \ + "1:\tleal %3, %%ecx\n" \ + "0:\tmovl %7, %%edx\n" \ + "2:\tcall __lll_mutex_timedlock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_timedlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_4 \ + "18:" \ : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex) \ : "0" (0), "1" (1), "m" (futex), "m" (timeout) \ @@ -259,17 +343,18 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_timedlock(futex, timeout, id) \ ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %3\n\t" \ - "jnz _L_mutex_timedlock_%=\n\t" \ + "jnz _L_robust_mutex_timedlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_timedlock_%=,@function\n" \ - "_L_mutex_timedlock_%=:\n\t" \ - "leal %3, %%ecx\n\t" \ - "movl %7, %%edx\n\t" \ - "call __lll_robust_mutex_timedlock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_timedlock_%=,.-_L_mutex_timedlock_%=\n"\ + ".type _L_robust_mutex_timedlock_%=,@function\n" \ + "_L_robust_mutex_timedlock_%=:\n" \ + "1:\tleal %3, %%ecx\n" \ + "0:\tmovl %7, %%edx\n" \ + "2:\tcall __lll_robust_mutex_timedlock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_timedlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_4 \ + "18:" \ : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex) \ : "0" (0), "1" (id), "m" (futex), "m" (timeout) \ @@ -283,13 +368,14 @@ extern int __lll_mutex_unlock_wake (int "jne _L_mutex_unlock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + "_L_mutex_unlock_%=:\n" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_unlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "m" (futex) \ : "memory"); }) @@ -298,16 +384,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_unlock(futex) \ (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "andl %2, %0\n\t" \ - "jne _L_mutex_unlock_%=\n\t" \ + "jne _L_robust_mutex_unlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + ".type _L_robust_mutex_unlock_%=,@function\n" \ + "_L_robust_mutex_unlock_%=:\n\t" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_unlock_%=, 4b-1b\n\t"\ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "i" (FUTEX_WAITERS), "m" (futex) \ : "memory"); }) @@ -384,7 +471,7 @@ extern int lll_unlock_wake_cb (int *__fu # define lll_trylock(futex) \ ({ unsigned char ret; \ __asm __volatile ("cmpl $0, %%gs:%P5\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ "0:\tcmpxchgl %2, %1; setne %0" \ : "=a" (ret), "=m" (futex) \ @@ -398,19 +485,20 @@ extern int lll_unlock_wake_cb (int *__fu # define lll_lock(futex) \ (void) ({ int ignore1, ignore2; \ __asm __volatile ("cmpl $0, %%gs:%P6\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ "0:\tcmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_lock_%=\n\t" \ + "jnz _L_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + ".type _L_lock_%=,@function\n" \ + "_L_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (1), "m" (futex), \ "i" (offsetof (tcbhead_t, multiple_threads)) \ @@ -420,19 +508,20 @@ extern int lll_unlock_wake_cb (int *__fu # define lll_unlock(futex) \ (void) ({ int ignore; \ __asm __volatile ("cmpl $0, %%gs:%P3\n\t" \ - "je,pt 0f\n\t" \ + "je 0f\n\t" \ "lock\n" \ - "0:\tsubl $1,%0\n\t" \ - "jne _L_mutex_unlock_%=\n\t" \ + "0:\tsubl $1,%0\n\t" \ + "jne _L_unlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + ".type _L_unlock_%=,@function\n" \ + "_L_unlock_%=:\n" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n\t" \ + "4:\t.size _L_unlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "m" (futex), \ "i" (offsetof (tcbhead_t, multiple_threads)) \ @@ -459,7 +548,7 @@ extern int lll_unlock_wake_cb (int *__fu "1:\tmovl %1, %%eax\n\t" \ LLL_ENTER_KERNEL \ "cmpl $0, (%%ebx)\n\t" \ - "jne,pn 1b\n\t" \ + "jne 1b\n\t" \ LLL_EBX_LOAD \ : "=&a" (__ignore) \ : "i" (SYS_futex), LLL_EBX_REG (&tid), "S" (0), \ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h 2006-02-12 21:39:26.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h 2006-07-31 05:58:27.000000000 +0000 @@ -91,3 +91,15 @@ extern int __openat64_nocancel (int fd, # define waitpid_not_cancel(pid, stat_loc, options) \ INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL) #endif + +/* Uncancelable pause. */ +#define pause_not_cancel() \ + __pause_nocancel () + +/* Uncancelable nanosleep. */ +#define nanosleep_not_cancel(requested_time, remaining) \ + __nanosleep_nocancel (requested_time, remaining) + +/* Uncancelable sigsuspend. */ +#define sigsuspend_not_cancel(set) \ + __sigsuspend_nocancel (set) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/smp.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/smp.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/i386/smp.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2006-08-01 18:33:14.000000000 +0000 @@ -0,0 +1,56 @@ +/* Determine whether the host has multiple processors. Linux version. + Copyright (C) 1996, 2002, 2004, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include + +/* Test whether the machine has more than one processor. This is not the + best test but good enough. More complicated tests would require `malloc' + which is not available at that time. */ +static inline int +is_smp_system (void) +{ + union + { + struct utsname uts; + char buf[512]; + } u; + char *cp; + + /* Try reading the number using `sysctl' first. */ + if (uname (&u.uts) == 0) + cp = u.uts.version; + else + { + /* This was not successful. Now try reading the /proc filesystem. */ + int fd = open_not_cancel_2 ("/proc/sys/kernel/version", O_RDONLY); + if (__builtin_expect (fd, 0) == -1 + || read_not_cancel (fd, u.buf, sizeof (u.buf)) <= 0) + /* This also didn't work. We give up and say it's a UP machine. */ + u.buf[0] = '\0'; + + close_not_cancel_no_status (fd); + cp = u.buf; + } + + return strstr (cp, "SMP") != NULL; +} diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h 2004-02-20 20:11:34.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h 2006-03-08 19:54:19.000000000 +0000 @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -57,7 +57,7 @@ extern int _dl_sysinfo_break attribute_h ".body\n\t" \ "break 0x100000;\n\t" \ "br.ret.sptk.many b6;\n\t" \ - ".endp _dl_sysinfo_break" \ + ".endp _dl_sysinfo_break\n\t" \ ".previous"); #endif diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-02-17 18:44:33.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 05:06:07.000000000 +0000 @@ -33,6 +33,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Delay in spinlock loop. */ #define BUSY_WAIT_NOP asm ("hint @pause") diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c 2003-09-04 05:42:57.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c 2006-05-09 15:14:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -34,5 +34,6 @@ _Unwind_GetBSP (struct _Unwind_Context * { if (__builtin_expect (libgcc_s_getbsp == NULL, 0)) pthread_cancel_init (); + return libgcc_s_getbsp (context); } diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2005-12-21 22:17:21.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2006-08-25 13:27:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -57,3 +57,11 @@ __libc_pthread_init (ptr, reclaim, funct return &__libc_multiple_threads; #endif } + +#ifdef SHARED +libc_freeres_fn (freeres_libptread) +{ + if (__libc_pthread_functions.ptr_freeres != NULL) + __libc_pthread_functions.ptr_freeres (); +} +#endif diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/Makefile glibc-2.5/nptl/sysdeps/unix/sysv/linux/Makefile --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/Makefile 2006-02-15 16:58:04.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/Makefile 2006-07-29 04:33:52.000000000 +0000 @@ -25,7 +25,7 @@ libpthread-sysdep_routines += pt-fork pt gen-as-const-headers += lowlevelcond.sym lowlevelrwlock.sym \ lowlevelbarrier.sym unwindbuf.sym \ - lowlevelrobustlock.sym + lowlevelrobustlock.sym pthread-pi-defines.sym endif ifeq ($(subdir),posix) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-02-17 18:44:33.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 05:06:07.000000000 +0000 @@ -35,6 +35,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) @@ -110,7 +113,21 @@ # define __lll_rel_instr "" #else # define __lll_acq_instr "isync" -# define __lll_rel_instr "sync" +# ifdef _ARCH_PWR4 +/* + * Newer powerpc64 processors support the new "light weight" sync (lwsync) + * So if the build is using -mcpu=[power4,power5,power5+,970] we can + * safely use lwsync. + */ +# define __lll_rel_instr "lwsync" +# else +/* + * Older powerpc32 processors don't support the new "light weight" + * sync (lwsync). So the only safe option is to use normal sync + * for all powerpc32 applications. + */ +# define __lll_rel_instr "sync" +# endif #endif /* Set *futex to ID if it is 0, atomically. Returns the old value */ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2004-03-29 22:03:28.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2006-05-11 17:13:17.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -27,7 +27,7 @@ /* Defined in pthread_setaffinity.c. */ -extern size_t __kernel_cpumask_size; +extern size_t __kernel_cpumask_size attribute_hidden; extern int __determine_cpumask_size (pid_t tid); diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym 2006-07-29 04:33:20.000000000 +0000 @@ -0,0 +1,6 @@ +#include + +-- These PI macros are used by assembly code. + +MUTEX_KIND offsetof (pthread_mutex_t, __data.__kind) +PI_BIT PTHREAD_MUTEX_PRIO_INHERIT_NP diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2004-03-29 22:01:09.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2006-05-11 17:13:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -25,7 +25,7 @@ #include -size_t __kernel_cpumask_size; +size_t __kernel_cpumask_size attribute_hidden; /* Determine the current affinity. As a side affect we learn diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-02-17 18:44:33.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 05:06:07.000000000 +0000 @@ -32,6 +32,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-02-17 15:36:57.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 05:06:06.000000000 +0000 @@ -26,6 +26,9 @@ #define SYS_futex 240 #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2004-06-17 23:55:20.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2006-09-17 06:00:51.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include #include #include +#include #include "lowlevel-atomic.h" #define SYS_futex 240 @@ -98,6 +99,11 @@ __pthread_cond_broadcast: bt/s 9f add #cond_futex, r4 + /* XXX: The kernel so far doesn't support requeue to PI futex. */ + mov.l @(MUTEX_KIND,r9), r0 + tst #PI_BIT, r0 + bf 9f + /* Wake up all threads. */ mov #FUTEX_CMP_REQUEUE, r5 mov #1, r6 diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2004-10-25 19:06:13.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2006-09-17 06:01:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -521,6 +521,21 @@ __condvar_tw_cleanup: mov #1, r2 mov #0, r3 + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + mov.l @(total_seq+4,r8), r0 + mov.l @(wakeup_seq+4,r8), r1 + cmp/hi r1, r0 + bt/s 6f + cmp/hi r0, r1 + bt 7f + mov.l @(total_seq,r8), r0 + mov.l @(wakeup_seq,r8), r1 + cmp/hs r0, r1 + bt 7f + +6: clrt mov.l @(wakeup_seq,r8),r0 mov.l @(wakeup_seq+4,r8),r1 @@ -532,6 +547,7 @@ __condvar_tw_cleanup: add r2, r0 mov.l r0,@(cond_futex,r8) +7: clrt mov.l @(woken_seq,r8),r0 mov.l @(woken_seq+4,r8),r1 diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2004-09-10 21:18:06.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2006-09-17 06:01:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -385,6 +385,21 @@ __condvar_w_cleanup: mov #1, r2 mov #0, r3 + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + mov.l @(total_seq+4,r8), r0 + mov.l @(wakeup_seq+4,r8), r1 + cmp/hi r1, r0 + bt/s 6f + cmp/hi r0, r1 + bt 7f + mov.l @(total_seq,r8), r0 + mov.l @(wakeup_seq,r8), r1 + cmp/hs r0, r1 + bt 7f + +6: clrt mov.l @(wakeup_seq,r8),r0 mov.l @(wakeup_seq+4,r8),r1 @@ -396,6 +411,7 @@ __condvar_w_cleanup: add r2, r0 mov.l r0,@(cond_futex,r8) +7: clrt mov.l @(woken_seq,r8),r0 mov.l @(woken_seq+4,r8),r1 diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/smp.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/smp.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/smp.h 2004-11-03 20:31:12.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/smp.h 2006-08-02 04:43:48.000000000 +0000 @@ -1,5 +1,5 @@ /* Determine whether the host has multiple processors. Linux version. - Copyright (C) 1996, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1996, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,36 +17,12 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include -#include - /* Test whether the machine has more than one processor. This is not the best test but good enough. More complicated tests would require `malloc' which is not available at that time. */ static inline int is_smp_system (void) { - static const int sysctl_args[] = { CTL_KERN, KERN_VERSION }; - char buf[512]; - size_t reslen = sizeof (buf); - - /* Try reading the number using `sysctl' first. */ - if (__sysctl ((int *) sysctl_args, - sizeof (sysctl_args) / sizeof (sysctl_args[0]), - buf, &reslen, NULL, 0) < 0) - { - /* This was not successful. Now try reading the /proc filesystem. */ - int fd = open_not_cancel_2 ("/proc/sys/kernel/version", O_RDONLY); - if (__builtin_expect (fd, 0) == -1 - || (reslen = read_not_cancel (fd, buf, sizeof (buf))) <= 0) - /* This also didn't work. We give up and say it's a UP machine. */ - buf[0] = '\0'; - - close_not_cancel_no_status (fd); - } - - return strstr (buf, "SMP") != NULL; + /* Assume all machines are SMP and/or CMT and/or SMT. */ + return 1; } diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-03-01 20:05:42.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 05:06:06.000000000 +0000 @@ -32,6 +32,9 @@ #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 #define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1) +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ #define LLL_MUTEX_LOCK_INITIALIZER (0) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/timer_routines.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/timer_routines.c --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2005-08-24 01:10:40.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2006-04-27 18:11:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -27,6 +27,13 @@ #include "kernel-posix-timers.h" +struct thread_start_data +{ + void (*thrfunc) (sigval_t); + sigval_t sival; +}; + + #ifdef __NR_timer_create /* Helper thread to call the user-provided function. */ static void * @@ -40,10 +47,16 @@ timer_sigev_thread (void *arg) INTERNAL_SYSCALL_DECL (err); INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8); - struct timer *tk = (struct timer *) arg; + struct thread_start_data *td = (struct thread_start_data *) arg; + + void (*thrfunc) (sigval_t) = td->thrfunc; + sigval_t sival = td->sival; + + /* The TD object was allocated in timer_helper_thread. */ + free (td); /* Call the user-provided function. */ - tk->thrfunc (tk->sival); + thrfunc (sival); return NULL; } @@ -82,10 +95,19 @@ timer_helper_thread (void *arg) if (si.si_code == SI_TIMER) { struct timer *tk = (struct timer *) si.si_ptr; + struct thread_start_data *td = malloc (sizeof (*td)); - /* That the signal we are waiting for. */ - pthread_t th; - (void) pthread_create (&th, &tk->attr, timer_sigev_thread, tk); + /* There is not much we can do if the allocation fails. */ + if (td != NULL) + { + /* That is the signal we are waiting for. */ + td->thrfunc = tk->thrfunc; + td->sival = tk->sival; + + pthread_t th; + (void) pthread_create (&th, &tk->attr, timer_sigev_thread, + td); + } } else if (si.si_code == SI_TKILL) /* The thread is canceled. */ diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-02-17 08:06:14.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 14:45:34.000000000 +0000 @@ -35,6 +35,9 @@ #define SYS_futex 202 #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 +#define FUTEX_LOCK_PI 6 +#define FUTEX_UNLOCK_PI 7 +#define FUTEX_TRYLOCK_PI 8 /* Initializer for compatibility lock. */ @@ -46,6 +49,104 @@ #define BUSY_WAIT_NOP asm ("rep; nop") +#define LLL_STUB_UNWIND_INFO_START \ + ".section .eh_frame,\"a\",@progbits\n" \ +"7:\t" ".long 9f-8f # Length of Common Information Entry\n" \ +"8:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ + ".byte 0x1 # CIE Version\n\t" \ + ".ascii \"zR\\0\" # CIE Augmentation\n\t" \ + ".uleb128 0x1 # CIE Code Alignment Factor\n\t" \ + ".sleb128 -8 # CIE Data Alignment Factor\n\t" \ + ".byte 0x10 # CIE RA Column\n\t" \ + ".uleb128 0x1 # Augmentation size\n\t" \ + ".byte 0x1b # FDE Encoding (pcrel sdata4)\n\t" \ + ".byte 0x12 # DW_CFA_def_cfa_sf\n\t" \ + ".uleb128 0x7\n\t" \ + ".sleb128 16\n\t" \ + ".align 8\n" \ +"9:\t" ".long 23f-10f # FDE Length\n" \ +"10:\t" ".long 10b-7b # FDE CIE offset\n\t" \ + ".long 1b-. # FDE initial location\n\t" \ + ".long 6b-1b # FDE address range\n\t" \ + ".uleb128 0x0 # Augmentation size\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 12f-11f\n" \ +"11:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-1b\n" +#define LLL_STUB_UNWIND_INFO_END \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 14f-13f\n" \ +"13:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-2b\n" \ +"14:\t" ".byte 0x40 + (3b-2b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x0e # DW_CFA_def_cfa_offset\n\t" \ + ".uleb128 0\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 16f-15f\n" \ +"15:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-3b\n" \ +"16:\t" ".byte 0x40 + (4b-3b-1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x0e # DW_CFA_def_cfa_offset\n\t" \ + ".uleb128 128\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 20f-17f\n" \ +"17:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 19f-18f\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"18:\t" ".4byte 4b-.\n\t" \ + ".byte 0x1c # DW_OP_minus\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"19:\t" ".4byte 24f-.\n\t" \ + ".byte 0x22 # DW_OP_plus\n" \ +"20:\t" ".byte 0x40 + (5b-4b+1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x13 # DW_CFA_def_cfa_offset_sf\n\t" \ + ".sleb128 16\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 22f-21f\n" \ +"21:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-5b\n" \ +"22:\t" ".align 8\n" \ +"23:\t" ".previous\n" + +/* Unwind info for + 1: leaq ..., %rdi + 2: subq $128, %rsp + 3: callq ... + 4: addq $128, %rsp + 5: jmp 24f + 6: + snippet. */ +#define LLL_STUB_UNWIND_INFO_5 \ +LLL_STUB_UNWIND_INFO_START \ +"12:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + +/* Unwind info for + 1: leaq ..., %rdi + 0: movq ..., %rdx + 2: subq $128, %rsp + 3: callq ... + 4: addq $128, %rsp + 5: jmp 24f + 6: + snippet. */ +#define LLL_STUB_UNWIND_INFO_6 \ +LLL_STUB_UNWIND_INFO_START \ +"12:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 26f-25f\n" \ +"25:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-0b\n" \ +"26:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + + #define lll_futex_wait(futex, val) \ ({ \ int __status; \ @@ -135,14 +236,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_lock_%=, @function\n" \ + "_L_mutex_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (1), "m" (futex), "3" (0) \ @@ -150,17 +255,21 @@ extern int __lll_mutex_unlock_wait (int #define lll_robust_mutex_lock(futex, id) \ - ({ int result, ignore1, ignore2; \ + ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_lock_%=, @function\n" \ + "_L_robust_mutex_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex), \ "=a" (result) \ : "0" (id), "m" (futex), "3" (0) \ @@ -172,14 +281,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_cond_lock_%=, @function\n" \ + "_L_mutex_cond_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_cond_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (2), "m" (futex), "3" (0) \ @@ -190,14 +303,18 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_cond_lock_%=, @function\n" \ + "_L_robust_mutex_cond_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_cond_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex), \ "=a" (result) \ : "0" (id | FUTEX_WAITERS), "m" (futex), "3" (0) \ @@ -209,15 +326,19 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %4\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %4, %%rdi\n\t" \ - "movq %8, %%rdx\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_timedlock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_timedlock_%=, @function\n" \ + "_L_mutex_timedlock_%=:\n" \ + "1:\tleaq %4, %%rdi\n" \ + "0:\tmovq %8, %%rdx\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_timedlock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_timedlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_6 \ + "24:" \ : "=a" (result), "=&D" (ignore1), "=S" (ignore2), \ "=&d" (ignore3), "=m" (futex) \ : "0" (0), "2" (1), "m" (futex), "m" (timeout) \ @@ -229,15 +350,19 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %4\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %4, %%rdi\n\t" \ - "movq %8, %%rdx\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_timedlock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_timedlock_%=, @function\n" \ + "_L_robust_mutex_timedlock_%=:\n" \ + "1:\tleaq %4, %%rdi\n" \ + "0:\tmovq %8, %%rdx\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_timedlock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_timedlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_6 \ + "24:" \ : "=a" (result), "=&D" (ignore1), "=S" (ignore2), \ "=&d" (ignore3), "=m" (futex) \ : "0" (0), "2" (id), "m" (futex), "m" (timeout) \ @@ -249,14 +374,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "decl %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_unlock_%=, @function\n" \ + "_L_mutex_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_unlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) @@ -266,14 +395,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "andl %2, %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_unlock_%=, @function\n" \ + "_L_robust_mutex_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_unlock_%=, 6b-1b\n\t"\ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "i" (FUTEX_WAITERS), "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) @@ -348,17 +481,21 @@ extern int lll_unlock_wake_cb (int *__fu "je 0f\n\t" \ "lock; cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - "jmp 2f\n" \ + "jmp 24f\n" \ "0:\tcmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_lock_%=, @function\n" \ + "_L_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (1), "m" (futex), "3" (0) \ @@ -371,17 +508,21 @@ extern int lll_unlock_wake_cb (int *__fu "je 0f\n\t" \ "lock; decl %0\n\t" \ "jne 1f\n\t" \ - "jmp 2f\n" \ + "jmp 24f\n" \ "0:\tdecl %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_unlock_%=, @function\n" \ + "_L_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_unlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2005-03-31 10:00:15.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2006-09-05 14:46:43.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -43,9 +43,13 @@ .hidden __lll_mutex_lock_wait .align 16 __lll_mutex_lock_wait: + cfi_startproc pushq %r10 + cfi_adjust_cfa_offset(8) pushq %rdx - + cfi_adjust_cfa_offset(8) + cfi_offset(%r10, -16) + cfi_offset(%rdx, -24) xorq %r10, %r10 /* No timeout. */ movl $2, %edx #if FUTEX_WAIT == 0 @@ -67,8 +71,13 @@ __lll_mutex_lock_wait: jnz 1b popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %r10 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r10) retq + cfi_endproc .size __lll_mutex_lock_wait,.-__lll_mutex_lock_wait @@ -78,18 +87,30 @@ __lll_mutex_lock_wait: .hidden __lll_mutex_timedlock_wait .align 16 __lll_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpq $1000000000, 8(%rdx) jae 3f pushq %r8 + cfi_adjust_cfa_offset(8) pushq %r9 + cfi_adjust_cfa_offset(8) pushq %r12 + cfi_adjust_cfa_offset(8) pushq %r13 + cfi_adjust_cfa_offset(8) pushq %r14 + cfi_adjust_cfa_offset(8) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) + cfi_offset(%r14, -48) /* Stack frame for the timespec and timeval structs. */ subq $16, %rsp + cfi_adjust_cfa_offset(16) movq %rdi, %r12 movq %rdx, %r13 @@ -147,13 +168,33 @@ __lll_mutex_timedlock_wait: jnz 7f 6: addq $16, %rsp + cfi_adjust_cfa_offset(-16) popq %r14 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r14) popq %r13 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r13) popq %r12 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r12) popq %r9 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r9) popq %r8 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r8) + retq + +3: movl $EINVAL, %eax retq + cfi_adjust_cfa_offset(56) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) + cfi_offset(%r14, -48) /* Check whether the time expired. */ 7: cmpq $-ETIMEDOUT, %rcx je 5f @@ -165,11 +206,9 @@ __lll_mutex_timedlock_wait: jz 6b jmp 1b -3: movl $EINVAL, %eax - retq - 5: movl $ETIMEDOUT, %eax jmp 6b + cfi_endproc .size __lll_mutex_timedlock_wait,.-__lll_mutex_timedlock_wait #endif @@ -199,8 +238,13 @@ lll_unlock_wake_cb: .hidden __lll_mutex_unlock_wake .align 16 __lll_mutex_unlock_wake: + cfi_startproc pushq %rsi + cfi_adjust_cfa_offset(8) pushq %rdx + cfi_adjust_cfa_offset(8) + cfi_offset(%rsi, -16) + cfi_offset(%rdx, -24) movl $0, (%rdi) movl $FUTEX_WAKE, %esi @@ -209,8 +253,13 @@ __lll_mutex_unlock_wake: syscall popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %rsi + cfi_adjust_cfa_offset(-8) + cfi_restore(%rsi) retq + cfi_endproc .size __lll_mutex_unlock_wake,.-__lll_mutex_unlock_wake diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2006-03-02 00:26:55.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2006-09-05 14:46:43.000000000 +0000 @@ -46,8 +46,13 @@ .hidden __lll_robust_mutex_lock_wait .align 16 __lll_robust_mutex_lock_wait: + cfi_startproc pushq %r10 + cfi_adjust_cfa_offset(8) pushq %rdx + cfi_adjust_cfa_offset(8) + cfi_offset(%r10, -16) + cfi_offset(%rdx, -24) xorq %r10, %r10 /* No timeout. */ #if FUTEX_WAIT == 0 @@ -85,8 +90,13 @@ __lll_robust_mutex_lock_wait: /* NB: %rax == 0 */ 3: popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %r10 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r10) retq + cfi_endproc .size __lll_robust_mutex_lock_wait,.-__lll_robust_mutex_lock_wait @@ -95,17 +105,27 @@ __lll_robust_mutex_lock_wait: .hidden __lll_robust_mutex_timedlock_wait .align 16 __lll_robust_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpq $1000000000, 8(%rdx) jae 3f pushq %r8 + cfi_adjust_cfa_offset(8) pushq %r9 + cfi_adjust_cfa_offset(8) pushq %r12 + cfi_adjust_cfa_offset(8) pushq %r13 + cfi_adjust_cfa_offset(8) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) /* Stack frame for the timespec and timeval structs. */ subq $24, %rsp + cfi_adjust_cfa_offset(24) movq %rdi, %r12 movq %rdx, %r13 @@ -176,19 +196,34 @@ __lll_robust_mutex_timedlock_wait: jnz 7f 6: addq $24, %rsp + cfi_adjust_cfa_offset(-24) popq %r13 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r13) popq %r12 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r12) popq %r9 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r9) popq %r8 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r8) retq +3: movl $EINVAL, %eax + retq + + cfi_adjust_cfa_offset(56) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) /* Check whether the time expired. */ 7: cmpq $-ETIMEDOUT, %rcx jne 1b 8: movl $ETIMEDOUT, %eax jmp 6b - -3: movl $EINVAL, %eax - retq + cfi_endproc .size __lll_robust_mutex_timedlock_wait,.-__lll_robust_mutex_timedlock_wait diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2005-03-31 10:00:15.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2006-07-29 04:31:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef UP # define LOCK @@ -80,6 +81,10 @@ __pthread_cond_broadcast: 8: cmpq $-1, %r8 je 9f + /* XXX: The kernel so far doesn't support requeue to PI futex. */ + testl $PI_BIT, MUTEX_KIND(%r8) + jne 9f + /* Wake up all threads. */ movl $FUTEX_CMP_REQUEUE, %esi movl $SYS_futex, %eax diff -uprN glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S --- glibc-2.4/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2005-03-31 10:00:15.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2006-09-09 11:21:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -67,9 +67,15 @@ __condvar_cleanup: cmpl 4(%r8), %edx jne 3f + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + movq total_seq(%rdi), %rax + cmpq wakeup_seq(%rdi), %rax + jbe 6f incq wakeup_seq(%rdi) - incq woken_seq(%rdi) incl cond_futex(%rdi) +6: incq woken_seq(%rdi) 3: subl $(1 << clock_bits), cond_nwaiters(%rdi) diff -uprN glibc-2.4/nptl/sysdeps/x86_64/tls.h glibc-2.5/nptl/sysdeps/x86_64/tls.h --- glibc-2.4/nptl/sysdeps/x86_64/tls.h 2005-12-18 06:57:32.000000000 +0000 +++ glibc-2.5/nptl/sysdeps/x86_64/tls.h 2006-04-27 01:25:34.000000000 +0000 @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/x86_64 version. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,8 +20,8 @@ #ifndef _TLS_H #define _TLS_H 1 -#include /* For ARCH_SET_FS. */ #ifndef __ASSEMBLER__ +# include /* For ARCH_SET_FS. */ # include # include # include diff -uprN glibc-2.4/nptl/tpp.c glibc-2.5/nptl/tpp.c --- glibc-2.4/nptl/tpp.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tpp.c 2006-08-14 23:02:29.000000000 +0000 @@ -0,0 +1,172 @@ +/* Thread Priority Protect helpers. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include + + +int __sched_fifo_min_prio = -1; +int __sched_fifo_max_prio = -1; + +void +__init_sched_fifo_prio (void) +{ + __sched_fifo_max_prio = sched_get_priority_max (SCHED_FIFO); + atomic_write_barrier (); + __sched_fifo_min_prio = sched_get_priority_min (SCHED_FIFO); +} + +int +__pthread_tpp_change_priority (int previous_prio, int new_prio) +{ + struct pthread *self = THREAD_SELF; + struct priority_protection_data *tpp = THREAD_GETMEM (self, tpp); + + if (tpp == NULL) + { + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + + size_t size = sizeof *tpp; + size += (__sched_fifo_max_prio - __sched_fifo_min_prio + 1) + * sizeof (tpp->priomap[0]); + tpp = calloc (size, 1); + if (tpp == NULL) + return ENOMEM; + tpp->priomax = __sched_fifo_min_prio - 1; + THREAD_SETMEM (self, tpp, tpp); + } + + assert (new_prio == -1 + || (new_prio >= __sched_fifo_min_prio + && new_prio <= __sched_fifo_max_prio)); + assert (previous_prio == -1 + || (previous_prio >= __sched_fifo_min_prio + && previous_prio <= __sched_fifo_max_prio)); + + int priomax = tpp->priomax; + int newpriomax = priomax; + if (new_prio != -1) + { + if (tpp->priomap[new_prio - __sched_fifo_min_prio] + 1 == 0) + return EAGAIN; + ++tpp->priomap[new_prio - __sched_fifo_min_prio]; + if (new_prio > priomax) + newpriomax = new_prio; + } + + if (previous_prio != -1) + { + if (--tpp->priomap[previous_prio - __sched_fifo_min_prio] == 0 + && priomax == previous_prio + && previous_prio > new_prio) + { + int i; + for (i = previous_prio - 1; i >= __sched_fifo_min_prio; --i) + if (tpp->priomap[i - __sched_fifo_min_prio]) + break; + newpriomax = i; + } + } + + if (priomax == newpriomax) + return 0; + + lll_lock (self->lock); + + tpp->priomax = newpriomax; + + int result = 0; + + if ((self->flags & ATTR_FLAG_SCHED_SET) == 0) + { + if (__sched_getparam (self->tid, &self->schedparam) != 0) + result = errno; + else + self->flags |= ATTR_FLAG_SCHED_SET; + } + + if ((self->flags & ATTR_FLAG_POLICY_SET) == 0) + { + self->schedpolicy = __sched_getscheduler (self->tid); + if (self->schedpolicy == -1) + result = errno; + else + self->flags |= ATTR_FLAG_POLICY_SET; + } + + if (result == 0) + { + struct sched_param sp = self->schedparam; + if (sp.sched_priority < newpriomax || sp.sched_priority < priomax) + { + if (sp.sched_priority < newpriomax) + sp.sched_priority = newpriomax; + + if (__sched_setscheduler (self->tid, self->schedpolicy, &sp) < 0) + result = errno; + } + } + + lll_unlock (self->lock); + + return result; +} + +int +__pthread_current_priority (void) +{ + struct pthread *self = THREAD_SELF; + if ((self->flags & (ATTR_FLAG_POLICY_SET | ATTR_FLAG_SCHED_SET)) + == (ATTR_FLAG_POLICY_SET | ATTR_FLAG_SCHED_SET)) + return self->schedparam.sched_priority; + + int result = 0; + + lll_lock (self->lock); + + if ((self->flags & ATTR_FLAG_SCHED_SET) == 0) + { + if (__sched_getparam (self->tid, &self->schedparam) != 0) + result = -1; + else + self->flags |= ATTR_FLAG_SCHED_SET; + } + + if ((self->flags & ATTR_FLAG_POLICY_SET) == 0) + { + self->schedpolicy = __sched_getscheduler (self->tid); + if (self->schedpolicy == -1) + result = -1; + else + self->flags |= ATTR_FLAG_POLICY_SET; + } + + if (result != -1) + result = self->schedparam.sched_priority; + + lll_unlock (self->lock); + + return result; +} diff -uprN glibc-2.4/nptl/tst-cancel25.c glibc-2.5/nptl/tst-cancel25.c --- glibc-2.4/nptl/tst-cancel25.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-cancel25.c 2006-09-05 17:11:13.000000000 +0000 @@ -0,0 +1,171 @@ +#include +#include +#include +#include + + +static pthread_barrier_t b; +static pthread_t th2; + + +static void * +tf2 (void *arg) +{ + sigset_t mask; + if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0) + { + puts ("pthread_sigmask failed"); + exit (1); + } + if (sigismember (&mask, SIGCANCEL)) + { + puts ("SIGCANCEL blocked in new thread"); + exit (1); + } + + /* Sync with the main thread so that we do not test anything else. */ + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("barrier_wait failed"); + exit (1); + } + + while (1) + { + /* Just a cancelable call. */ + struct timespec ts = { 10000, 0 }; + nanosleep (&ts, 0); + } + + return NULL; +} + + +static void +unwhand (void *arg) +{ + if (pthread_create (&th2, NULL, tf2, NULL) != 0) + { + puts ("unwhand: create failed"); + exit (1); + } +} + + +static void * +tf (void *arg) +{ + pthread_cleanup_push (unwhand, NULL); + + /* Sync with the main thread so that we do not test anything else. */ + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("barrier_wait failed"); + exit (1); + } + + while (1) + { + /* Just a cancelable call. */ + struct timespec ts = { 10000, 0 }; + nanosleep (&ts, 0); + } + + pthread_cleanup_pop (0); + + return NULL; +} + + +static int +do_test (void) +{ + if (pthread_barrier_init (&b, NULL, 2) != 0) + { + puts ("barrier_init failed"); + return 1; + } + + pthread_t th1; + if (pthread_create (&th1, NULL, tf, NULL) != 0) + { + puts ("create failed"); + return 1; + } + + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("barrier_wait failed"); + return 1; + } + + /* Make sure tf1 enters nanosleep. */ + struct timespec ts = { 0, 500000000 }; + while (nanosleep (&ts, &ts) != 0) + ; + + if (pthread_cancel (th1) != 0) + { + puts ("1st cancel failed"); + return 1; + } + + void *res; + if (pthread_join (th1, &res) != 0) + { + puts ("1st join failed"); + return 1; + } + if (res != PTHREAD_CANCELED) + { + puts ("1st thread not canceled"); + return 1; + } + + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("barrier_wait failed"); + return 1; + } + + /* Make sure tf2 enters nanosleep. */ + ts.tv_sec = 0; + ts.tv_nsec = 500000000; + while (nanosleep (&ts, &ts) != 0) + ; + + puts ("calling pthread_cancel the second time"); + if (pthread_cancel (th2) != 0) + { + puts ("2nd cancel failed"); + return 1; + } + + puts ("calling pthread_join the second time"); + if (pthread_join (th2, &res) != 0) + { + puts ("2nd join failed"); + return 1; + } + if (res != PTHREAD_CANCELED) + { + puts ("2nd thread not canceled"); + return 1; + } + + if (pthread_barrier_destroy (&b) != 0) + { + puts ("barrier_destroy failed"); + return 0; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#define TIMEOUT 4 +#include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-cancel2.c glibc-2.5/nptl/tst-cancel2.c --- glibc-2.4/nptl/tst-cancel2.c 2002-11-26 22:49:53.000000000 +0000 +++ glibc-2.5/nptl/tst-cancel2.c 2006-09-18 13:41:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -33,11 +33,7 @@ tf (void *arg) write blocks. */ char buf[100000]; - if (write (fd[1], buf, sizeof (buf)) == sizeof (buf)) - { - puts ("write succeeded"); - return (void *) 1l; - } + while (write (fd[1], buf, sizeof (buf)) > 0); return (void *) 42l; } diff -uprN glibc-2.4/nptl/tst-cond22.c glibc-2.5/nptl/tst-cond22.c --- glibc-2.4/nptl/tst-cond22.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-cond22.c 2006-09-12 12:24:28.000000000 +0000 @@ -0,0 +1,160 @@ +#include +#include +#include + + +static pthread_barrier_t b; +static pthread_cond_t c = PTHREAD_COND_INITIALIZER; +static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; + + +static void +cl (void *arg) +{ + pthread_mutex_unlock (&m); +} + + +static void * +tf (void *arg) +{ + if (pthread_mutex_lock (&m) != 0) + { + printf ("%s: mutex_lock failed\n", __func__); + exit (1); + } + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __func__); + exit (1); + } + pthread_cleanup_push (cl, NULL); + /* We have to loop here because the cancellation might come after + the cond_wait call left the cancelable area and is then waiting + on the mutex. In this case the beginning of the second cond_wait + call will cause the cancellation to happen. */ + do + if (pthread_cond_wait (&c, &m) != 0) + { + printf ("%s: cond_wait failed\n", __func__); + exit (1); + } + while (arg == NULL); + pthread_cleanup_pop (0); + if (pthread_mutex_unlock (&m) != 0) + { + printf ("%s: mutex_unlock failed\n", __func__); + exit (1); + } + return NULL; +} + + +static int +do_test (void) +{ + int status = 0; + + if (pthread_barrier_init (&b, NULL, 2) != 0) + { + puts ("barrier_init failed"); + return 1; + } + + pthread_t th; + if (pthread_create (&th, NULL, tf, NULL) != 0) + { + puts ("1st create failed"); + return 1; + } + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("1st barrier_wait failed"); + return 1; + } + if (pthread_mutex_lock (&m) != 0) + { + puts ("1st mutex_lock failed"); + return 1; + } + if (pthread_cond_signal (&c) != 0) + { + puts ("1st cond_signal failed"); + return 1; + } + if (pthread_cancel (th) != 0) + { + puts ("cancel failed"); + return 1; + } + if (pthread_mutex_unlock (&m) != 0) + { + puts ("1st mutex_unlock failed"); + return 1; + } + void *res; + if (pthread_join (th, &res) != 0) + { + puts ("1st join failed"); + return 1; + } + if (res != PTHREAD_CANCELED) + { + puts ("first thread not canceled"); + status = 1; + } + + printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n", + c.__data.__lock, c.__data.__futex, c.__data.__total_seq, + c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex, + c.__data.__nwaiters, c.__data.__broadcast_seq); + + if (pthread_create (&th, NULL, tf, (void *) 1l) != 0) + { + puts ("2nd create failed"); + return 1; + } + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("2nd barrier_wait failed"); + return 1; + } + if (pthread_mutex_lock (&m) != 0) + { + puts ("2nd mutex_lock failed"); + return 1; + } + if (pthread_cond_signal (&c) != 0) + { + puts ("2nd cond_signal failed"); + return 1; + } + if (pthread_mutex_unlock (&m) != 0) + { + puts ("2nd mutex_unlock failed"); + return 1; + } + if (pthread_join (th, &res) != 0) + { + puts ("2nd join failed"); + return 1; + } + if (res != NULL) + { + puts ("2nd thread canceled"); + status = 1; + } + + printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n", + c.__data.__lock, c.__data.__futex, c.__data.__total_seq, + c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex, + c.__data.__nwaiters, c.__data.__broadcast_seq); + + return status; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-getpid3.c glibc-2.5/nptl/tst-getpid3.c --- glibc-2.4/nptl/tst-getpid3.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-getpid3.c 2006-08-01 06:04:02.000000000 +0000 @@ -0,0 +1,114 @@ +#include +#include +#include +#include +#include +#include +#include + + +static pid_t pid; + +static void * +pid_thread (void *arg) +{ + if (pid != getpid ()) + { + printf ("pid wrong in thread: should be %d, is %d\n", + (int) pid, (int) getpid ()); + return (void *) 1L; + } + + return NULL; +} + +static int +do_test (void) +{ + pid = getpid (); + + pthread_t thr; + int ret = pthread_create (&thr, NULL, pid_thread, NULL); + if (ret) + { + printf ("pthread_create failed: %d\n", ret); + return 1; + } + + void *thr_ret; + ret = pthread_join (thr, &thr_ret); + if (ret) + { + printf ("pthread_create failed: %d\n", ret); + return 1; + } + else if (thr_ret) + { + printf ("thread getpid failed\n"); + return 1; + } + + pid_t child = fork (); + if (child == -1) + { + printf ("fork failed: %m\n"); + return 1; + } + else if (child == 0) + { + if (pid == getpid ()) + { + puts ("pid did not change after fork"); + exit (1); + } + + pid = getpid (); + ret = pthread_create (&thr, NULL, pid_thread, NULL); + if (ret) + { + printf ("pthread_create failed: %d\n", ret); + return 1; + } + + ret = pthread_join (thr, &thr_ret); + if (ret) + { + printf ("pthread_create failed: %d\n", ret); + return 1; + } + else if (thr_ret) + { + printf ("thread getpid failed\n"); + return 1; + } + + return 0; + } + + int status; + if (TEMP_FAILURE_RETRY (waitpid (child, &status, 0)) != child) + { + puts ("waitpid failed"); + kill (child, SIGKILL); + return 1; + } + + if (!WIFEXITED (status)) + { + if (WIFSIGNALED (status)) + printf ("died from signal %s\n", strsignal (WTERMSIG (status))); + else + puts ("did not terminate correctly"); + return 1; + } + if (WEXITSTATUS (status) != 0) + { + printf ("exit code %d\n", WEXITSTATUS (status)); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-join5.c glibc-2.5/nptl/tst-join5.c --- glibc-2.4/nptl/tst-join5.c 2003-03-23 10:01:40.000000000 +0000 +++ glibc-2.5/nptl/tst-join5.c 2006-08-13 01:52:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -21,120 +21,187 @@ #include #include #include +#include +#include +#include + + +#define wait_code() \ + do { \ + struct timespec ts = { .tv_sec = 0, .tv_nsec = 200000000 }; \ + while (syscall (__NR_nanosleep, &ts, &ts) < 0) \ + /* nothing */; \ + } while (0) + + +#ifdef WAIT_IN_CHILD +static pthread_barrier_t b; +#endif static void * tf1 (void *arg) { - pthread_join ((pthread_t) arg, NULL); +#ifdef WAIT_IN_CHILD + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __func__); + exit (1); + } + + wait_code (); +#endif - puts ("1st join returned"); + pthread_join ((pthread_t) arg, NULL); - return (void *) 1l; + exit (42); } static void * tf2 (void *arg) { - pthread_join ((pthread_t) arg, NULL); +#ifdef WAIT_IN_CHILD + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __func__); + exit (1); + } - puts ("2nd join returned"); + wait_code (); +#endif + pthread_join ((pthread_t) arg, NULL); - return (void *) 1l; + exit (43); } static int do_test (void) { +#ifdef WAIT_IN_CHILD + if (pthread_barrier_init (&b, NULL, 2) != 0) + { + puts ("barrier_init failed"); + return 1; + } +#endif + pthread_t th; int err = pthread_join (pthread_self (), NULL); if (err == 0) { puts ("1st circular join succeeded"); - exit (1); + return 1; } if (err != EDEADLK) { printf ("1st circular join %d, not EDEADLK\n", err); - exit (1); + return 1; } if (pthread_create (&th, NULL, tf1, (void *) pthread_self ()) != 0) { puts ("1st create failed"); - exit (1); + return 1; } +#ifndef WAIT_IN_CHILD + wait_code (); +#endif + if (pthread_cancel (th) != 0) { puts ("cannot cancel 1st thread"); - exit (1); + return 1; } +#ifdef WAIT_IN_CHILD + int e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __func__); + return 1; + } +#endif + void *r; err = pthread_join (th, &r); if (err != 0) { printf ("cannot join 1st thread: %d\n", err); - exit (1); + return 1; } if (r != PTHREAD_CANCELED) { puts ("1st thread not canceled"); - exit (1); + return 1; } err = pthread_join (pthread_self (), NULL); if (err == 0) { puts ("2nd circular join succeeded"); - exit (1); + return 1; } if (err != EDEADLK) { printf ("2nd circular join %d, not EDEADLK\n", err); - exit (1); + return 1; } if (pthread_create (&th, NULL, tf2, (void *) pthread_self ()) != 0) { puts ("2nd create failed"); - exit (1); + return 1; } +#ifndef WAIT_IN_CHILD + wait_code (); +#endif + if (pthread_cancel (th) != 0) { puts ("cannot cancel 2nd thread"); - exit (1); + return 1; } +#ifdef WAIT_IN_CHILD + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __func__); + return 1; + } +#endif + if (pthread_join (th, &r) != 0) { puts ("cannot join 2nd thread"); - exit (1); + return 1; } if (r != PTHREAD_CANCELED) { puts ("2nd thread not canceled"); - exit (1); + return 1; } err = pthread_join (pthread_self (), NULL); if (err == 0) { - puts ("2nd circular join succeeded"); - exit (1); + puts ("3rd circular join succeeded"); + return 1; } if (err != EDEADLK) { - printf ("2nd circular join %d, not EDEADLK\n", err); - exit (1); + printf ("3rd circular join %d, not EDEADLK\n", err); + return 1; } - exit (0); + return 0; } #define TEST_FUNCTION do_test () diff -uprN glibc-2.4/nptl/tst-join6.c glibc-2.5/nptl/tst-join6.c --- glibc-2.4/nptl/tst-join6.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-join6.c 2006-08-13 01:51:08.000000000 +0000 @@ -0,0 +1,2 @@ +#define WAIT_IN_CHILD 1 +#include "tst-join5.c" diff -uprN glibc-2.4/nptl/tst-kill4.c glibc-2.5/nptl/tst-kill4.c --- glibc-2.4/nptl/tst-kill4.c 2003-02-21 20:27:54.000000000 +0000 +++ glibc-2.5/nptl/tst-kill4.c 2006-09-18 13:40:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -35,13 +35,30 @@ tf (void *a) int do_test (void) { + pthread_attr_t at; + if (pthread_attr_init (&at) != 0) + { + puts ("attr_create failed"); + exit (1); + } + + /* Limit thread stack size, because if it is too large, pthread_join + will free it immediately rather than put it into stack cache. */ + if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0) + { + puts ("setstacksize failed"); + exit (1); + } + pthread_t th; - if (pthread_create (&th, NULL, tf, NULL) != 0) + if (pthread_create (&th, &at, tf, NULL) != 0) { puts ("create failed"); exit (1); } + pthread_attr_destroy (&at); + if (pthread_join (th, NULL) != 0) { puts ("join failed"); diff -uprN glibc-2.4/nptl/tst-mutex1.c glibc-2.5/nptl/tst-mutex1.c --- glibc-2.4/nptl/tst-mutex1.c 2002-11-26 22:49:18.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex1.c 2006-08-14 23:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -19,6 +19,12 @@ #include #include +#include + + +#ifndef ATTR +# define ATTR NULL +#endif static int @@ -26,12 +32,24 @@ do_test (void) { pthread_mutex_t m; - if (pthread_mutex_init (&m, NULL) != 0) + int e = pthread_mutex_init (&m, ATTR); + if (ATTR != NULL && e == ENOTSUP) + { + puts ("cannot support selected type of mutexes"); + return 0; + } + else if (e != 0) { puts ("mutex_init failed"); return 1; } + if (ATTR != NULL && pthread_mutexattr_destroy (ATTR) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + if (pthread_mutex_lock (&m) != 0) { puts ("mutex_lock failed"); @@ -53,5 +71,7 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () +#ifndef TEST_FUNCTION +# define TEST_FUNCTION do_test () +#endif #include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-mutex2.c glibc-2.5/nptl/tst-mutex2.c --- glibc-2.4/nptl/tst-mutex2.c 2003-03-17 02:48:28.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex2.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -105,115 +105,134 @@ do_test (void) if (pthread_mutexattr_init (&a) != 0) { puts ("mutexattr_init failed"); - exit (1); + return 1; } if (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_ERRORCHECK) != 0) { puts ("mutexattr_settype failed"); - exit (1); + return 1; } - if (pthread_mutex_init (&m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + e = pthread_mutex_init (&m, &a); + if (e != 0) + { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif puts ("mutex_init failed"); - exit (1); + return 1; } if (pthread_barrier_init (&b, NULL, 2) != 0) { puts ("barrier_init failed"); - exit (1); + return 1; } - if ((e = pthread_mutex_unlock (&m)) == 0) + e = pthread_mutex_unlock (&m); + if (e == 0) { puts ("1st mutex_unlock succeeded"); - exit (1); + return 1; } else if (e != EPERM) { puts ("1st mutex_unlock error != EPERM"); - exit (1); + return 1; } if (pthread_mutex_lock (&m) != 0) { puts ("mutex_lock failed"); - exit (1); + return 1; } - if ((e = pthread_mutex_lock (&m)) == 0) + e = pthread_mutex_lock (&m); + if (e == 0) { puts ("2nd mutex_lock succeeded"); - exit (1); + return 1; } else if (e != EDEADLK) { puts ("2nd mutex_lock error != EDEADLK"); - exit (1); + return 1; } pthread_t th; if (pthread_create (&th, NULL, tf, NULL) != 0) { puts ("create failed"); - exit (1); + return 1; } e = pthread_barrier_wait (&b); if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) { puts ("1st barrier_wait failed"); - exit (1); + return 1; } if (pthread_mutex_unlock (&m) != 0) { puts ("2nd mutex_unlock failed"); - exit (1); + return 1; } - if ((e = pthread_mutex_unlock (&m)) == 0) + e = pthread_mutex_unlock (&m); + if (e == 0) { puts ("3rd mutex_unlock succeeded"); - exit (1); + return 1; } else if (e != EPERM) { puts ("3rd mutex_unlock error != EPERM"); - exit (1); + return 1; } e = pthread_barrier_wait (&b); if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) { puts ("2nd barrier_wait failed"); - exit (1); + return 1; } if (pthread_join (th, NULL) != 0) { puts ("join failed"); - exit (1); + return 1; } if (pthread_mutex_destroy (&m) != 0) { puts ("mutex_destroy failed"); - exit (1); + return 1; } if (pthread_barrier_destroy (&b) != 0) { puts ("barrier_destroy failed"); - exit (1); + return 1; } if (pthread_mutexattr_destroy (&a) != 0) { puts ("mutexattr_destroy failed"); - exit (1); + return 1; } return 0; diff -uprN glibc-2.4/nptl/tst-mutex3.c glibc-2.5/nptl/tst-mutex3.c --- glibc-2.4/nptl/tst-mutex3.c 2003-02-15 19:21:53.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex3.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -113,8 +113,25 @@ do_test (void) return 1; } - if (pthread_mutex_init (&m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + int e; + e = pthread_mutex_init (&m, &a); + if (e != 0) + { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif puts ("mutex_init failed"); return 1; } @@ -162,7 +179,7 @@ do_test (void) return 1; } - int e = pthread_barrier_wait (&b); + e = pthread_barrier_wait (&b); if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) { puts ("barrier_wait failed"); diff -uprN glibc-2.4/nptl/tst-mutex4.c glibc-2.5/nptl/tst-mutex4.c --- glibc-2.4/nptl/tst-mutex4.c 2004-10-04 20:50:53.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex4.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -42,6 +42,8 @@ do_test (void) char *p; int err; int s; + pthread_barrier_t *b; + pthread_barrierattr_t ba; fd = mkstemp (tmpfname); if (fd == -1) @@ -70,9 +72,12 @@ do_test (void) return 1; } - m = (pthread_mutex_t *) (((uintptr_t) mem + __alignof (pthread_mutex_t)) + m = (pthread_mutex_t *) (((uintptr_t) mem + __alignof (pthread_mutex_t) - 1) & ~(__alignof (pthread_mutex_t) - 1)); - p = (char *) (m + 1); + b = (pthread_barrier_t *) (((uintptr_t) (m + 1) + + __alignof (pthread_barrier_t) - 1) + & ~(__alignof (pthread_barrier_t) - 1)); + p = (char *) (b + 1); if (pthread_mutexattr_init (&a) != 0) { @@ -110,8 +115,23 @@ do_test (void) return 1; } - if (pthread_mutex_init (m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + if ((err = pthread_mutex_init (m, &a)) != 0) + { +#ifdef ENABLE_PI + if (err == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif puts ("mutex_init failed"); return 1; } @@ -128,6 +148,30 @@ do_test (void) return 1; } + if (pthread_barrierattr_init (&ba) != 0) + { + puts ("barrierattr_init failed"); + return 1; + } + + if (pthread_barrierattr_setpshared (&ba, PTHREAD_PROCESS_SHARED) != 0) + { + puts ("barrierattr_setpshared failed"); + return 1; + } + + if (pthread_barrier_init (b, &ba, 2) != 0) + { + puts ("barrier_init failed"); + return 1; + } + + if (pthread_barrierattr_destroy (&ba) != 0) + { + puts ("barrierattr_destroy failed"); + return 1; + } + err = pthread_mutex_trylock (m); if (err == 0) { @@ -142,6 +186,12 @@ do_test (void) *p = 0; + if (pthread_mutex_unlock (m) != 0) + { + puts ("parent: 1st mutex_unlock failed"); + return 1; + } + puts ("going to fork now"); pid = fork (); if (pid == -1) @@ -151,7 +201,19 @@ do_test (void) } else if (pid == 0) { - /* Play some lock ping-pong. It's our turn to unlock first. */ + if (pthread_mutex_lock (m) != 0) + { + puts ("child: mutex_lock failed"); + return 1; + } + + int e = pthread_barrier_wait (b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("child: barrier_wait failed"); + return 1; + } + if ((*p)++ != 0) { puts ("child: *p != 0"); @@ -160,7 +222,7 @@ do_test (void) if (pthread_mutex_unlock (m) != 0) { - puts ("child: 1st mutex_unlock failed"); + puts ("child: mutex_unlock failed"); return 1; } @@ -168,6 +230,13 @@ do_test (void) } else { + int e = pthread_barrier_wait (b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("parent: barrier_wait failed"); + return 1; + } + if (pthread_mutex_lock (m) != 0) { puts ("parent: 2nd mutex_lock failed"); @@ -180,6 +249,24 @@ do_test (void) return 1; } + if (pthread_mutex_unlock (m) != 0) + { + puts ("parent: 2nd mutex_unlock failed"); + return 1; + } + + if (pthread_mutex_destroy (m) != 0) + { + puts ("mutex_destroy failed"); + return 1; + } + + if (pthread_barrier_destroy (b) != 0) + { + puts ("barrier_destroy failed"); + return 1; + } + puts ("parent done"); } diff -uprN glibc-2.4/nptl/tst-mutex5.c glibc-2.5/nptl/tst-mutex5.c --- glibc-2.4/nptl/tst-mutex5.c 2004-03-24 06:22:12.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex5.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -52,8 +52,24 @@ do_test (void) return 1; } - if (pthread_mutex_init (&m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + err = pthread_mutex_init (&m, &a); + if (err != 0) + { +#ifdef ENABLE_PI + if (err == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif puts ("mutex_init failed"); return 1; } diff -uprN glibc-2.4/nptl/tst-mutex6.c glibc-2.5/nptl/tst-mutex6.c --- glibc-2.4/nptl/tst-mutex6.c 2002-11-26 22:49:38.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex6.c 2006-08-14 23:09:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -21,6 +21,12 @@ #include #include #include +#include + + +#ifndef ATTR +# define ATTR NULL +#endif static int @@ -28,12 +34,24 @@ do_test (void) { pthread_mutex_t m; - if (pthread_mutex_init (&m, NULL) != 0) + int e = pthread_mutex_init (&m, ATTR); + if (ATTR != NULL && e == ENOTSUP) + { + puts ("cannot support selected type of mutexes"); + e = pthread_mutex_init (&m, NULL); + } + if (e != 0) { puts ("mutex_init failed"); return 1; } + if (ATTR != NULL && pthread_mutexattr_destroy (ATTR) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + if (pthread_mutex_lock (&m) != 0) { puts ("1st mutex_lock failed"); @@ -51,5 +69,7 @@ do_test (void) } #define EXPECTED_SIGNAL SIGALRM -#define TEST_FUNCTION do_test () +#ifndef TEST_FUNCTION +# define TEST_FUNCTION do_test () +#endif #include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-mutex7a.c glibc-2.5/nptl/tst-mutex7a.c --- glibc-2.4/nptl/tst-mutex7a.c 2004-03-24 06:22:38.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex7a.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,2 +1,2 @@ -#define INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP +#define TYPE PTHREAD_MUTEX_ADAPTIVE_NP #include "tst-mutex7.c" diff -uprN glibc-2.4/nptl/tst-mutex7.c glibc-2.5/nptl/tst-mutex7.c --- glibc-2.4/nptl/tst-mutex7.c 2004-03-24 06:22:12.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex7.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -17,17 +17,19 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include +#include #include -#ifndef INIT -# define INIT PTHREAD_MUTEX_INITIALIZER +#ifndef TYPE +# define TYPE PTHREAD_MUTEX_DEFAULT #endif -static pthread_mutex_t lock = INIT; +static pthread_mutex_t lock; #define ROUNDS 1000 @@ -65,6 +67,48 @@ tf (void *arg) static int do_test (void) { + pthread_mutexattr_t a; + + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + exit (1); + } + + if (pthread_mutexattr_settype (&a, TYPE) != 0) + { + puts ("mutexattr_settype failed"); + exit (1); + } + +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + int e = pthread_mutex_init (&lock, &a); + if (e != 0) + { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif + puts ("mutex_init failed"); + return 1; + } + + if (pthread_mutexattr_destroy (&a) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + pthread_attr_t at; pthread_t th[N]; int cnt; diff -uprN glibc-2.4/nptl/tst-mutex9.c glibc-2.5/nptl/tst-mutex9.c --- glibc-2.4/nptl/tst-mutex9.c 2004-10-04 20:50:53.000000000 +0000 +++ glibc-2.5/nptl/tst-mutex9.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -88,8 +88,24 @@ do_test (void) return 1; } - if (pthread_mutex_init (m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + int e; + if ((e = pthread_mutex_init (m, &a)) != 0) + { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif puts ("mutex_init failed"); return 1; } @@ -138,7 +154,7 @@ do_test (void) ts.tv_nsec -= 1000000000; } - int e = pthread_mutex_timedlock (m, &ts); + e = pthread_mutex_timedlock (m, &ts); if (e == 0) { puts ("child: mutex_timedlock succeeded"); diff -uprN glibc-2.4/nptl/tst-mutexpi1.c glibc-2.5/nptl/tst-mutexpi1.c --- glibc-2.4/nptl/tst-mutexpi1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi1.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,27 @@ +#include +#include +#include + + +static pthread_mutexattr_t a; + +static void +prepare (void) +{ + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + exit (1); + } + + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("mutexattr_setprotocol failed"); + exit (1); + } +} +#define PREPARE(argc, argv) prepare () + + +#define ATTR &a +#include "tst-mutex1.c" diff -uprN glibc-2.4/nptl/tst-mutexpi2.c glibc-2.5/nptl/tst-mutexpi2.c --- glibc-2.4/nptl/tst-mutexpi2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi2.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex2.c" diff -uprN glibc-2.4/nptl/tst-mutexpi3.c glibc-2.5/nptl/tst-mutexpi3.c --- glibc-2.4/nptl/tst-mutexpi3.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi3.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex3.c" diff -uprN glibc-2.4/nptl/tst-mutexpi4.c glibc-2.5/nptl/tst-mutexpi4.c --- glibc-2.4/nptl/tst-mutexpi4.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi4.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex4.c" diff -uprN glibc-2.4/nptl/tst-mutexpi5a.c glibc-2.5/nptl/tst-mutexpi5a.c --- glibc-2.4/nptl/tst-mutexpi5a.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi5a.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex5a.c" diff -uprN glibc-2.4/nptl/tst-mutexpi5.c glibc-2.5/nptl/tst-mutexpi5.c --- glibc-2.4/nptl/tst-mutexpi5.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi5.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex5.c" diff -uprN glibc-2.4/nptl/tst-mutexpi6.c glibc-2.5/nptl/tst-mutexpi6.c --- glibc-2.4/nptl/tst-mutexpi6.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi6.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,27 @@ +#include +#include +#include + + +static pthread_mutexattr_t a; + +static void +prepare (void) +{ + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + exit (1); + } + + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("mutexattr_setprotocol failed"); + exit (1); + } +} +#define PREPARE(argc, argv) prepare () + + +#define ATTR &a +#include "tst-mutex6.c" diff -uprN glibc-2.4/nptl/tst-mutexpi7a.c glibc-2.5/nptl/tst-mutexpi7a.c --- glibc-2.4/nptl/tst-mutexpi7a.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi7a.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex7a.c" diff -uprN glibc-2.4/nptl/tst-mutexpi7.c glibc-2.5/nptl/tst-mutexpi7.c --- glibc-2.4/nptl/tst-mutexpi7.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi7.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex7.c" diff -uprN glibc-2.4/nptl/tst-mutexpi8.c glibc-2.5/nptl/tst-mutexpi8.c --- glibc-2.4/nptl/tst-mutexpi8.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi8.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex8.c" diff -uprN glibc-2.4/nptl/tst-mutexpi9.c glibc-2.5/nptl/tst-mutexpi9.c --- glibc-2.4/nptl/tst-mutexpi9.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpi9.c 2006-07-29 04:28:40.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-mutex9.c" diff -uprN glibc-2.4/nptl/tst-mutexpp10.c glibc-2.5/nptl/tst-mutexpp10.c --- glibc-2.4/nptl/tst-mutexpp10.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpp10.c 2006-08-14 23:08:49.000000000 +0000 @@ -0,0 +1,334 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tst-tpp.h" + +static int +do_test (void) +{ + int ret = 0; + + init_tpp_test (); + + pthread_mutexattr_t ma; + if (pthread_mutexattr_init (&ma)) + { + puts ("mutexattr_init failed"); + return 1; + } + if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_PROTECT)) + { + puts ("mutexattr_setprotocol failed"); + return 1; + } + + int prioceiling; + if (pthread_mutexattr_getprioceiling (&ma, &prioceiling)) + { + puts ("mutexattr_getprioceiling failed"); + return 1; + } + + if (prioceiling < fifo_min || prioceiling > fifo_max) + { + printf ("prioceiling %d not in %d..%d range\n", + prioceiling, fifo_min, fifo_max); + return 1; + } + + if (fifo_max < INT_MAX + && pthread_mutexattr_setprioceiling (&ma, fifo_max + 1) != EINVAL) + { + printf ("mutexattr_setprioceiling %d did not fail with EINVAL\n", + fifo_max + 1); + return 1; + } + + if (fifo_min > 0 + && pthread_mutexattr_setprioceiling (&ma, fifo_min - 1) != EINVAL) + { + printf ("mutexattr_setprioceiling %d did not fail with EINVAL\n", + fifo_min - 1); + return 1; + } + + if (pthread_mutexattr_setprioceiling (&ma, fifo_min)) + { + puts ("mutexattr_setprioceiling failed"); + return 1; + } + + if (pthread_mutexattr_setprioceiling (&ma, fifo_max)) + { + puts ("mutexattr_setprioceiling failed"); + return 1; + } + + if (pthread_mutexattr_setprioceiling (&ma, 6)) + { + puts ("mutexattr_setprioceiling failed"); + return 1; + } + + if (pthread_mutexattr_getprioceiling (&ma, &prioceiling)) + { + puts ("mutexattr_getprioceiling failed"); + return 1; + } + + if (prioceiling != 6) + { + printf ("mutexattr_getprioceiling returned %d != 6\n", + prioceiling); + return 1; + } + + pthread_mutex_t m1, m2, m3; + int e = pthread_mutex_init (&m1, &ma); + if (e == ENOTSUP) + { + puts ("cannot support selected type of mutexes"); + return 0; + } + else if (e != 0) + { + puts ("mutex_init failed"); + return 1; + } + + if (pthread_mutexattr_setprioceiling (&ma, 8)) + { + puts ("mutexattr_setprioceiling failed"); + return 1; + } + + if (pthread_mutex_init (&m2, &ma)) + { + puts ("mutex_init failed"); + return 1; + } + + if (pthread_mutexattr_setprioceiling (&ma, 5)) + { + puts ("mutexattr_setprioceiling failed"); + return 1; + } + + if (pthread_mutex_init (&m3, &ma)) + { + puts ("mutex_init failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 4); + + if (pthread_mutex_lock (&m1) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 6); + + if (pthread_mutex_trylock (&m2) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 8); + + if (pthread_mutex_lock (&m3) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 8); + + if (pthread_mutex_unlock (&m2) != 0) + { + puts ("mutex_unlock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 6); + + if (pthread_mutex_unlock (&m1) != 0) + { + puts ("mutex_unlock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 5); + + if (pthread_mutex_lock (&m2) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 8); + + if (pthread_mutex_unlock (&m2) != 0) + { + puts ("mutex_unlock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 5); + + if (pthread_mutex_getprioceiling (&m1, &prioceiling)) + { + puts ("mutex_getprioceiling m1 failed"); + return 1; + } + else if (prioceiling != 6) + { + printf ("unexpected m1 prioceiling %d != 6\n", prioceiling); + return 1; + } + + if (pthread_mutex_getprioceiling (&m2, &prioceiling)) + { + puts ("mutex_getprioceiling m2 failed"); + return 1; + } + else if (prioceiling != 8) + { + printf ("unexpected m2 prioceiling %d != 8\n", prioceiling); + return 1; + } + + if (pthread_mutex_getprioceiling (&m3, &prioceiling)) + { + puts ("mutex_getprioceiling m3 failed"); + return 1; + } + else if (prioceiling != 5) + { + printf ("unexpected m3 prioceiling %d != 5\n", prioceiling); + return 1; + } + + if (pthread_mutex_setprioceiling (&m1, 7, &prioceiling)) + { + printf ("mutex_setprioceiling failed"); + return 1; + } + else if (prioceiling != 6) + { + printf ("unexpected m1 old prioceiling %d != 6\n", prioceiling); + return 1; + } + + if (pthread_mutex_getprioceiling (&m1, &prioceiling)) + { + puts ("mutex_getprioceiling m1 failed"); + return 1; + } + else if (prioceiling != 7) + { + printf ("unexpected m1 prioceiling %d != 7\n", prioceiling); + return 1; + } + + CHECK_TPP_PRIORITY (4, 5); + + if (pthread_mutex_unlock (&m3) != 0) + { + puts ("mutex_unlock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 4); + + if (pthread_mutex_trylock (&m1) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (4, 7); + + struct sched_param sp; + memset (&sp, 0, sizeof (sp)); + sp.sched_priority = 8; + if (pthread_setschedparam (pthread_self (), SCHED_FIFO, &sp)) + { + puts ("cannot set scheduling params"); + return 1; + } + + CHECK_TPP_PRIORITY (8, 8); + + if (pthread_mutex_unlock (&m1) != 0) + { + puts ("mutex_unlock failed"); + return 1; + } + + CHECK_TPP_PRIORITY (8, 8); + + if (pthread_mutex_lock (&m3) != EINVAL) + { + puts ("pthread_mutex_lock didn't fail with EINVAL"); + return 1; + } + + CHECK_TPP_PRIORITY (8, 8); + + if (pthread_mutex_destroy (&m1) != 0) + { + puts ("mutex_destroy failed"); + return 1; + } + + if (pthread_mutex_destroy (&m2) != 0) + { + puts ("mutex_destroy failed"); + return 1; + } + + if (pthread_mutex_destroy (&m3) != 0) + { + puts ("mutex_destroy failed"); + return 1; + } + + if (pthread_mutexattr_destroy (&ma) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + + return ret; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/nptl/tst-mutexpp1.c glibc-2.5/nptl/tst-mutexpp1.c --- glibc-2.4/nptl/tst-mutexpp1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpp1.c 2006-08-14 23:08:49.000000000 +0000 @@ -0,0 +1,45 @@ +#include +#include +#include + +#include "tst-tpp.h" + +static pthread_mutexattr_t a; + +static void +prepare (void) +{ + init_tpp_test (); + + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + exit (1); + } + + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_PROTECT) != 0) + { + puts ("mutexattr_setprotocol failed"); + exit (1); + } + + if (pthread_mutexattr_setprioceiling (&a, 6) != 0) + { + puts ("mutexattr_setprioceiling failed"); + exit (1); + } +} +#define PREPARE(argc, argv) prepare () + +static int do_test (void); + +static int +do_test_wrapper (void) +{ + init_tpp_test (); + return do_test (); +} +#define TEST_FUNCTION do_test_wrapper () + +#define ATTR &a +#include "tst-mutex1.c" diff -uprN glibc-2.4/nptl/tst-mutexpp6.c glibc-2.5/nptl/tst-mutexpp6.c --- glibc-2.4/nptl/tst-mutexpp6.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-mutexpp6.c 2006-08-14 23:08:49.000000000 +0000 @@ -0,0 +1,45 @@ +#include +#include +#include + +#include "tst-tpp.h" + +static pthread_mutexattr_t a; + +static void +prepare (void) +{ + init_tpp_test (); + + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + exit (1); + } + + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_PROTECT) != 0) + { + puts ("mutexattr_setprotocol failed"); + exit (1); + } + + if (pthread_mutexattr_setprioceiling (&a, 6) != 0) + { + puts ("mutexattr_setprioceiling failed"); + exit (1); + } +} +#define PREPARE(argc, argv) prepare () + +static int do_test (void); + +static int +do_test_wrapper (void) +{ + init_tpp_test (); + return do_test (); +} +#define TEST_FUNCTION do_test_wrapper () + +#define ATTR &a +#include "tst-mutex6.c" diff -uprN glibc-2.4/nptl/tst-robust1.c glibc-2.5/nptl/tst-robust1.c --- glibc-2.4/nptl/tst-robust1.c 2006-02-18 08:40:59.000000000 +0000 +++ glibc-2.5/nptl/tst-robust1.c 2006-07-29 04:27:22.000000000 +0000 @@ -97,6 +97,30 @@ do_test (void) puts ("mutexattr_setrobust failed"); return 1; } + +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } + else + { + int e = pthread_mutex_init (&m1, &a); + if (e == ENOTSUP) + { + puts ("PI robust mutexes not supported"); + return 0; + } + else if (e != 0) + { + puts ("mutex_init m1 failed"); + return 1; + } + pthread_mutex_destroy (&m1); + } +#endif + #ifndef NOT_CONSISTENT if (pthread_mutex_init (&m1, &a) != 0) { @@ -236,14 +260,14 @@ do_test (void) e = pthread_mutex_unlock (&m1); if (e != 0) { - printf ("%ld: mutex_unlock m1 failed\n", round); + printf ("%ld: mutex_unlock m1 failed with %d\n", round, e); return 1; } e = pthread_mutex_unlock (&m2); if (e != 0) { - printf ("%ld: mutex_unlock m2 failed\n", round); + printf ("%ld: mutex_unlock m2 failed with %d\n", round, e); return 1; } diff -uprN glibc-2.4/nptl/tst-robust7.c glibc-2.5/nptl/tst-robust7.c --- glibc-2.4/nptl/tst-robust7.c 2005-12-27 19:42:21.000000000 +0000 +++ glibc-2.5/nptl/tst-robust7.c 2006-07-29 04:27:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2005. @@ -95,8 +95,25 @@ do_test (void) return 1; } - if (pthread_mutex_init (&m, &a) != 0) +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0) { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + int e; + e = pthread_mutex_init (&m, &a); + if (e != 0) + { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI robust mutexes not supported"); + return 0; + } +#endif puts ("mutex_init failed"); return 1; } @@ -123,7 +140,7 @@ do_test (void) return 1; } - int e = pthread_barrier_wait (&b); + e = pthread_barrier_wait (&b); if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) { printf ("parent: barrier_wait failed in round %ld\n", n + 1); @@ -164,7 +181,7 @@ do_test (void) } } - int e = pthread_mutex_lock (&m); + e = pthread_mutex_lock (&m); if (e == 0) { puts ("parent: 2nd mutex_lock succeeded"); diff -uprN glibc-2.4/nptl/tst-robust8.c glibc-2.5/nptl/tst-robust8.c --- glibc-2.4/nptl/tst-robust8.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robust8.c 2006-07-29 04:27:22.000000000 +0000 @@ -0,0 +1,275 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + +static void prepare (void); +#define PREPARE(argc, argv) prepare () +static int do_test (void); +#define TEST_FUNCTION do_test () +#define TIMEOUT 5 +#include "../test-skeleton.c" + + +static int fd; +#define N 100 + +static void +prepare (void) +{ + fd = create_temp_file ("tst-robust8", NULL); + if (fd == -1) + exit (1); +} + + +#define THESIGNAL SIGKILL +#define ROUNDS 5 +#define THREADS 9 + + +static const struct timespec before = { 0, 0 }; + + +static pthread_mutex_t *map; + + +static void * +tf (void *arg) +{ + long int nr = (long int) arg; + int fct = nr % 3; + + uint8_t state[N]; + memset (state, '\0', sizeof (state)); + + while (1) + { + int r = random () % N; + if (state[r] == 0) + { + int e; + + switch (fct) + { + case 0: + e = pthread_mutex_lock (&map[r]); + if (e != 0) + { + printf ("mutex_lock of %d in thread %ld failed with %d\n", + r, nr, e); + exit (1); + } + state[r] = 1; + break; + case 1: + e = pthread_mutex_timedlock (&map[r], &before); + if (e != 0 && e != ETIMEDOUT) + { + printf ("\ +mutex_timedlock of %d in thread %ld failed with %d\n", + r, nr, e); + exit (1); + } + break; + default: + e = pthread_mutex_trylock (&map[r]); + if (e != 0 && e != EBUSY) + { + printf ("mutex_trylock of %d in thread %ld failed with %d\n", + r, nr, e); + exit (1); + } + break; + } + + if (e == EOWNERDEAD) + pthread_mutex_consistent_np (&map[r]); + + if (e == 0 || e == EOWNERDEAD) + state[r] = 1; + } + else + { + int e = pthread_mutex_unlock (&map[r]); + if (e != 0) + { + printf ("mutex_unlock of %d in thread %ld failed with %d\n", + r, nr, e); + exit (1); + } + + state[r] = 0; + } + } +} + + +static void +child (int round) +{ + for (int thread = 1; thread <= THREADS; ++thread) + { + pthread_t th; + if (pthread_create (&th, NULL, tf, (void *) (long int) thread) != 0) + { + printf ("cannot create thread %d in round %d\n", thread, round); + exit (1); + } + } + + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = 1000000000 / ROUNDS; + while (nanosleep (&ts, &ts) != 0) + /* nothing */; + + /* Time to die. */ + kill (getpid (), THESIGNAL); + + /* We better never get here. */ + abort (); +} + + +static int +do_test (void) +{ + if (ftruncate (fd, N * sizeof (pthread_mutex_t)) != 0) + { + puts ("cannot size new file"); + return 1; + } + + map = mmap (NULL, N * sizeof (pthread_mutex_t), PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); + if (map == MAP_FAILED) + { + puts ("mapping failed"); + return 1; + } + + pthread_mutexattr_t ma; + if (pthread_mutexattr_init (&ma) != 0) + { + puts ("mutexattr_init failed"); + return 0; + } + if (pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0) + { + puts ("mutexattr_setrobust failed"); + return 1; + } + if (pthread_mutexattr_setpshared (&ma, PTHREAD_PROCESS_SHARED) != 0) + { + puts ("mutexattr_setpshared failed"); + return 1; + } +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0) + { + puts ("pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif + + for (int round = 1; round <= ROUNDS; ++round) + { + for (int n = 0; n < N; ++n) + { + int e = pthread_mutex_init (&map[n], &ma); + if (e == ENOTSUP) + { +#ifdef ENABLE_PI + puts ("cannot support pshared robust PI mutexes"); +#else + puts ("cannot support pshared robust mutexes"); +#endif + return 0; + } + if (e != 0) + { + printf ("mutex_init %d in round %d failed\n", n + 1, round); + return 1; + } + } + + pid_t p = fork (); + if (p == -1) + { + printf ("fork in round %d failed\n", round); + return 1; + } + if (p == 0) + child (round); + + int status; + if (TEMP_FAILURE_RETRY (waitpid (p, &status, 0)) != p) + { + printf ("waitpid in round %d failed\n", round); + return 1; + } + if (!WIFSIGNALED (status)) + { + printf ("child did not die of a signal in round %d\n", round); + return 1; + } + if (WTERMSIG (status) != THESIGNAL) + { + printf ("child did not die of signal %d in round %d\n", + THESIGNAL, round); + return 1; + } + + for (int n = 0; n < N; ++n) + { + int e = pthread_mutex_lock (&map[n]); + if (e != 0 && e != EOWNERDEAD) + { + printf ("mutex_lock %d failed in round %d\n", n + 1, round); + return 1; + } + } + + for (int n = 0; n < N; ++n) + if (pthread_mutex_unlock (&map[n]) != 0) + { + printf ("mutex_unlock %d failed in round %d\n", n + 1, round); + return 1; + } + + for (int n = 0; n < N; ++n) + { + int e = pthread_mutex_destroy (&map[n]); + if (e != 0) + { + printf ("mutex_destroy %d in round %d failed with %d\n", + n + 1, round, e); + printf("nusers = %d\n", (int) map[n].__data.__nusers); + return 1; + } + } + } + + if (pthread_mutexattr_destroy (&ma) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + + if (munmap (map, N * sizeof (pthread_mutex_t)) != 0) + { + puts ("munmap failed"); + return 1; + } + + return 0; +} diff -uprN glibc-2.4/nptl/tst-robustpi1.c glibc-2.5/nptl/tst-robustpi1.c --- glibc-2.4/nptl/tst-robustpi1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi1.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust1.c" diff -uprN glibc-2.4/nptl/tst-robustpi2.c glibc-2.5/nptl/tst-robustpi2.c --- glibc-2.4/nptl/tst-robustpi2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi2.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust2.c" diff -uprN glibc-2.4/nptl/tst-robustpi3.c glibc-2.5/nptl/tst-robustpi3.c --- glibc-2.4/nptl/tst-robustpi3.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi3.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust3.c" diff -uprN glibc-2.4/nptl/tst-robustpi4.c glibc-2.5/nptl/tst-robustpi4.c --- glibc-2.4/nptl/tst-robustpi4.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi4.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust4.c" diff -uprN glibc-2.4/nptl/tst-robustpi5.c glibc-2.5/nptl/tst-robustpi5.c --- glibc-2.4/nptl/tst-robustpi5.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi5.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust5.c" diff -uprN glibc-2.4/nptl/tst-robustpi6.c glibc-2.5/nptl/tst-robustpi6.c --- glibc-2.4/nptl/tst-robustpi6.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi6.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust6.c" diff -uprN glibc-2.4/nptl/tst-robustpi7.c glibc-2.5/nptl/tst-robustpi7.c --- glibc-2.4/nptl/tst-robustpi7.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi7.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust7.c" diff -uprN glibc-2.4/nptl/tst-robustpi8.c glibc-2.5/nptl/tst-robustpi8.c --- glibc-2.4/nptl/tst-robustpi8.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-robustpi8.c 2006-07-29 04:30:04.000000000 +0000 @@ -0,0 +1,2 @@ +#define ENABLE_PI 1 +#include "tst-robust8.c" diff -uprN glibc-2.4/nptl/tst-tpp.h glibc-2.5/nptl/tst-tpp.h --- glibc-2.4/nptl/tst-tpp.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/nptl/tst-tpp.h 2006-08-14 23:07:27.000000000 +0000 @@ -0,0 +1,94 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* This test is Linux specific. */ +#define CHECK_TPP_PRIORITY(normal, boosted) \ + do \ + { \ + pid_t tid = syscall (__NR_gettid); \ + \ + struct sched_param cep_sp; \ + int cep_policy; \ + if (pthread_getschedparam (pthread_self (), &cep_policy, \ + &cep_sp) != 0) \ + { \ + puts ("getschedparam failed"); \ + ret = 1; \ + } \ + else if (cep_sp.sched_priority != (normal)) \ + { \ + printf ("unexpected priority %d != %d\n", \ + cep_sp.sched_priority, (normal)); \ + } \ + if (syscall (__NR_sched_getparam, tid, &cep_sp) == 0 \ + && cep_sp.sched_priority != (boosted)) \ + { \ + printf ("unexpected boosted priority %d != %d\n", \ + cep_sp.sched_priority, (boosted)); \ + ret = 1; \ + } \ + } \ + while (0) + +int fifo_min, fifo_max; + +void +init_tpp_test (void) +{ + fifo_min = sched_get_priority_min (SCHED_FIFO); + if (fifo_min < 0) + { + printf ("couldn't get min priority for SCHED_FIFO: %m\n"); + exit (1); + } + + fifo_max = sched_get_priority_max (SCHED_FIFO); + if (fifo_max < 0) + { + printf ("couldn't get max priority for SCHED_FIFO: %m\n"); + exit (1); + } + + if (fifo_min > 4 || fifo_max < 10) + { + printf ("%d..%d SCHED_FIFO priority interval not suitable for this test\n", + fifo_min, fifo_max); + exit (0); + } + + struct sched_param sp; + memset (&sp, 0, sizeof (sp)); + sp.sched_priority = 4; + int e = pthread_setschedparam (pthread_self (), SCHED_FIFO, &sp); + if (e != 0) + { + errno = e; + printf ("cannot set scheduling params: %m\n"); + exit (0); + } +} diff -uprN glibc-2.4/nscd/cache.c glibc-2.5/nscd/cache.c --- glibc-2.4/nscd/cache.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/nscd/cache.c 2006-05-30 17:30:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2003-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -190,13 +190,34 @@ cache_add (int type, const void *key, si free the data structures since some hash table entries share the same data. */ void -prune_cache (struct database_dyn *table, time_t now) +prune_cache (struct database_dyn *table, time_t now, int fd) { size_t cnt = table->head->module; /* If this table is not actually used don't do anything. */ if (cnt == 0) - return; + { + if (fd != -1) + { + /* Reply to the INVALIDATE initiator. */ + int32_t resp = 0; + writeall (fd, &resp, sizeof (resp)); + } + return; + } + + /* This function can be called from the cleanup thread but also in + response to an invalidate command. Make sure only one thread is + running. When not serving INVALIDATE request, no need for the + second to wait around. */ + if (fd == -1) + { + if (pthread_mutex_trylock (&table->prunelock) != 0) + /* The work is already being done. */ + return; + } + else + pthread_mutex_lock (&table->prunelock); /* If we check for the modification of the underlying file we invalidate the entries also in this case. */ @@ -367,6 +388,14 @@ prune_cache (struct database_dyn *table, } while (cnt > 0); + if (fd != -1) + { + /* Reply to the INVALIDATE initiator that the cache has been + invalidated. */ + int32_t resp = 0; + writeall (fd, &resp, sizeof (resp)); + } + if (first <= last) { struct hashentry *head = NULL; @@ -455,4 +484,6 @@ prune_cache (struct database_dyn *table, /* Run garbage collection if any entry has been removed or replaced. */ if (any) gc (table); + + pthread_mutex_unlock (&table->prunelock); } diff -uprN glibc-2.4/nscd/connections.c glibc-2.5/nscd/connections.c --- glibc-2.4/nscd/connections.c 2006-01-03 21:26:28.000000000 +0000 +++ glibc-2.5/nscd/connections.c 2006-09-21 03:57:30.000000000 +0000 @@ -100,9 +100,11 @@ struct database_dyn dbs[lastdb] = { [pwddb] = { .lock = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, + .prunelock = PTHREAD_MUTEX_INITIALIZER, .enabled = 0, .check_file = 1, .persistent = 0, + .propagate = 1, .shared = 0, .max_db_size = DEFAULT_MAX_DB_SIZE, .filename = "/etc/passwd", @@ -116,9 +118,11 @@ struct database_dyn dbs[lastdb] = }, [grpdb] = { .lock = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, + .prunelock = PTHREAD_MUTEX_INITIALIZER, .enabled = 0, .check_file = 1, .persistent = 0, + .propagate = 1, .shared = 0, .max_db_size = DEFAULT_MAX_DB_SIZE, .filename = "/etc/group", @@ -132,9 +136,11 @@ struct database_dyn dbs[lastdb] = }, [hstdb] = { .lock = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, + .prunelock = PTHREAD_MUTEX_INITIALIZER, .enabled = 0, .check_file = 1, .persistent = 0, + .propagate = 0, /* Not used. */ .shared = 0, .max_db_size = DEFAULT_MAX_DB_SIZE, .filename = "/etc/hosts", @@ -719,7 +725,7 @@ cannot set socket to close on exec: %s; dbs[cnt].head = xmalloc (sizeof (struct database_pers_head) + (dbs[cnt].suggested_module * sizeof (ref_t))); - memset (dbs[cnt].head, '\0', sizeof (dbs[cnt].head)); + memset (dbs[cnt].head, '\0', sizeof (struct database_pers_head)); assert (~ENDREF == 0); memset (dbs[cnt].head->array, '\xff', dbs[cnt].suggested_module * sizeof (ref_t)); @@ -810,9 +816,10 @@ close_sockets (void) static void -invalidate_cache (char *key) +invalidate_cache (char *key, int fd) { dbtype number; + int32_t resp; if (strcmp (key, "passwd") == 0) number = pwddb; @@ -826,10 +833,19 @@ invalidate_cache (char *key) res_init (); } else - return; + { + resp = EINVAL; + writeall (fd, &resp, sizeof (resp)); + return; + } if (dbs[number].enabled) - prune_cache (&dbs[number], LONG_MAX); + prune_cache (&dbs[number], LONG_MAX, fd); + else + { + resp = 0; + writeall (fd, &resp, sizeof (resp)); + } } @@ -1063,7 +1079,7 @@ cannot handle old request version %d; cu { char buf[256]; - dbg_log (_("error getting callers id: %s"), + dbg_log (_("error getting caller's id: %s"), strerror_r (errno, buf, sizeof (buf))); break; } @@ -1086,7 +1102,7 @@ cannot handle old request version %d; cu else if (uid == 0) { if (req->type == INVALIDATE) - invalidate_cache (key); + invalidate_cache (key, fd); else termination_handler (0); } @@ -1173,7 +1189,7 @@ cannot open /proc/self/cmdline: %s; disa /* Second, change back to the old user if we changed it. */ if (server_user != NULL) { - if (setuid (old_uid) != 0) + if (setresuid (old_uid, old_uid, old_uid) != 0) { dbg_log (_("\ cannot change to old UID: %s; disabling paranoia mode"), @@ -1183,7 +1199,7 @@ cannot change to old UID: %s; disabling return; } - if (setgid (old_gid) != 0) + if (setresgid (old_gid, old_gid, old_gid) != 0) { dbg_log (_("\ cannot change to old GID: %s; disabling paranoia mode"), @@ -1432,7 +1448,7 @@ handle_request: request received (Versio /* The pthread_cond_timedwait() call timed out. It is time to clean up the cache. */ assert (my_number < lastdb); - prune_cache (&dbs[my_number], time (NULL)); + prune_cache (&dbs[my_number], time (NULL), -1); if (clock_gettime (timeout_clock, &prune_ts) == -1) /* Should never happen. */ @@ -1556,18 +1572,24 @@ main_loop_poll (void) /* We have a new incoming connection. Accept the connection. */ int fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL)); - /* use the descriptor if we have not reached the limit. */ - if (fd >= 0 && firstfree < nconns) + /* Use the descriptor if we have not reached the limit. */ + if (fd >= 0) { - conns[firstfree].fd = fd; - conns[firstfree].events = POLLRDNORM; - starttime[firstfree] = now; - if (firstfree >= nused) - nused = firstfree + 1; - - do - ++firstfree; - while (firstfree < nused && conns[firstfree].fd != -1); + if (firstfree < nconns) + { + conns[firstfree].fd = fd; + conns[firstfree].events = POLLRDNORM; + starttime[firstfree] = now; + if (firstfree >= nused) + nused = firstfree + 1; + + do + ++firstfree; + while (firstfree < nused && conns[firstfree].fd != -1); + } + else + /* We cannot use the connection so close it. */ + close (fd); } --n; @@ -1853,23 +1875,42 @@ begin_drop_privileges (void) static void finish_drop_privileges (void) { +#if defined HAVE_LIBAUDIT && defined HAVE_LIBCAP + /* We need to preserve the capabilities to connect to the audit daemon. */ + cap_t new_caps = preserve_capabilities (); +#endif + if (setgroups (server_ngroups, server_groups) == -1) { dbg_log (_("Failed to run nscd as user '%s'"), server_user); error (EXIT_FAILURE, errno, _("setgroups failed")); } - if (setgid (server_gid) == -1) + int res; + if (paranoia) + res = setresgid (server_gid, server_gid, old_gid); + else + res = setgid (server_gid); + if (res == -1) { dbg_log (_("Failed to run nscd as user '%s'"), server_user); perror ("setgid"); exit (4); } - if (setuid (server_uid) == -1) + if (paranoia) + res = setresuid (server_uid, server_uid, old_uid); + else + res = setuid (server_uid); + if (res == -1) { dbg_log (_("Failed to run nscd as user '%s'"), server_user); perror ("setuid"); exit (4); } + +#if defined HAVE_LIBAUDIT && defined HAVE_LIBCAP + /* Remove the temporary capabilities. */ + install_real_capabilities (new_caps); +#endif } diff -uprN glibc-2.4/nscd/gai.c glibc-2.5/nscd/gai.c --- glibc-2.4/nscd/gai.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/nscd/gai.c 2006-05-04 16:00:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -25,6 +25,7 @@ #define __bind bind #define __sendto sendto #define __strchrnul strchrnul +#define __getline getline #include diff -uprN glibc-2.4/nscd/grpcache.c glibc-2.5/nscd/grpcache.c --- glibc-2.4/nscd/grpcache.c 2006-01-06 19:12:48.000000000 +0000 +++ glibc-2.5/nscd/grpcache.c 2006-04-26 17:25:07.000000000 +0000 @@ -342,10 +342,10 @@ cache_addgr (struct database_dyn *db, in marked with FIRST first. Otherwise we end up with dangling "pointers" in case a latter hash entry cannot be added. */ - bool first = req->type == GETGRBYNAME; + bool first = true; /* If the request was by GID, add that entry first. */ - if (req->type != GETGRBYNAME) + if (req->type == GETGRBYGID) { if (cache_add (GETGRBYGID, cp, key_offset, &dataset->head, true, db, owner) < 0) @@ -355,12 +355,14 @@ cache_addgr (struct database_dyn *db, in dataset->head.usable = false; goto out; } + + first = false; } /* If the key is different from the name add a separate entry. */ else if (strcmp (key_copy, gr_name) != 0) { if (cache_add (GETGRBYNAME, key_copy, key_len + 1, - &dataset->head, first, db, owner) < 0) + &dataset->head, true, db, owner) < 0) { /* Could not allocate memory. Make sure the data gets discarded. */ @@ -372,11 +374,13 @@ cache_addgr (struct database_dyn *db, in } /* We have to add the value for both, byname and byuid. */ - if (__builtin_expect (cache_add (GETGRBYNAME, gr_name, gr_name_len, - &dataset->head, first, db, owner) - == 0, 1)) + if ((req->type == GETGRBYNAME || db->propagate) + && __builtin_expect (cache_add (GETGRBYNAME, gr_name, + gr_name_len, + &dataset->head, first, db, owner) + == 0, 1)) { - if (req->type == GETGRBYNAME) + if (req->type == GETGRBYNAME && db->propagate) (void) cache_add (GETGRBYGID, cp, key_offset, &dataset->head, req->type != GETGRBYNAME, db, owner); } diff -uprN glibc-2.4/nscd/initgrcache.c glibc-2.5/nscd/initgrcache.c --- glibc-2.4/nscd/initgrcache.c 2006-01-06 19:12:48.000000000 +0000 +++ glibc-2.5/nscd/initgrcache.c 2006-09-05 14:35:00.000000000 +0000 @@ -107,6 +107,7 @@ addinitgroupsX (struct database_dyn *db, long int start = 0; bool all_tryagain = true; + bool any_success = false; /* This is temporary memory, we need not (ad must not) call mempool_alloc. */ @@ -158,6 +159,8 @@ addinitgroupsX (struct database_dyn *db, if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN) __libc_fatal ("illegal status in internal_getgrouplist"); + any_success |= status == NSS_STATUS_SUCCESS; + if (status != NSS_STATUS_SUCCESS && nss_next_action (nip, status) == NSS_ACTION_RETURN) break; @@ -171,7 +174,7 @@ addinitgroupsX (struct database_dyn *db, ssize_t total; ssize_t written; out: - if (start == 0) + if (!any_success) { /* Nothing found. Create a negative result record. */ written = total = sizeof (notfound); diff -uprN glibc-2.4/nscd/Makefile glibc-2.5/nscd/Makefile --- glibc-2.4/nscd/Makefile 2005-12-16 04:06:11.000000000 +0000 +++ glibc-2.5/nscd/Makefile 2006-04-26 16:24:22.000000000 +0000 @@ -1,4 +1,5 @@ -# Copyright (C) 1998,2000,2002,2003,2004,2005 Free Software Foundation, Inc. +# Copyright (C) 1998,2000,2002,2003,2004,2005,2006 +# Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -54,13 +55,13 @@ all-nscd-modules := $(nscd-modules) seli ifeq (yes,$(have-selinux)) ifeq (yes,$(have-libaudit)) libaudit = -laudit +ifeq (yes,$(have-libcap)) +libcap = -lcap endif - -nscd-modules += selinux -selinux-LIBS := -lselinux $(libaudit) endif -LDLIBS-nscd = $(selinux-LIBS) +nscd-modules += selinux +selinux-LIBS := -lselinux $(libaudit) $(libcap) # The configure.in check for libselinux and its headers did not use # $SYSINCLUDES. The directory specified by --with-headers usually @@ -69,6 +70,9 @@ LDLIBS-nscd = $(selinux-LIBS) # system headers will be ok for this file. $(objpfx)nscd_stat.o: sysincludes = # nothing $(objpfx)selinux.o: sysincludes = # nothing +endif + +LDLIBS-nscd = $(selinux-LIBS) distribute := nscd.h nscd-client.h dbg_log.h \ $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \ diff -uprN glibc-2.4/nscd/nscd.c glibc-2.5/nscd/nscd.c --- glibc-2.4/nscd/nscd.c 2006-01-01 19:15:56.000000000 +0000 +++ glibc-2.5/nscd/nscd.c 2006-05-30 17:29:36.000000000 +0000 @@ -332,9 +332,6 @@ parse_opt (int key, char *arg, struct ar exit (EXIT_FAILURE); request_header req; - ssize_t nbytes; - struct iovec iov[2]; - if (strcmp (arg, "passwd") == 0) req.key_len = sizeof "passwd"; else if (strcmp (arg, "group") == 0) @@ -347,17 +344,38 @@ parse_opt (int key, char *arg, struct ar req.version = NSCD_VERSION; req.type = INVALIDATE; + struct iovec iov[2]; iov[0].iov_base = &req; iov[0].iov_len = sizeof (req); iov[1].iov_base = arg; iov[1].iov_len = req.key_len; - nbytes = TEMP_FAILURE_RETRY (writev (sock, iov, 2)); + ssize_t nbytes = TEMP_FAILURE_RETRY (writev (sock, iov, 2)); + + if (nbytes != iov[0].iov_len + iov[1].iov_len) + { + int err = errno; + close (sock); + error (EXIT_FAILURE, err, _("write incomplete")); + } + + /* Wait for ack. Older nscd just closed the socket when + prune_cache finished, silently ignore that. */ + int32_t resp = 0; + nbytes = TEMP_FAILURE_RETRY (read (sock, &resp, sizeof (resp))); + if (nbytes != 0 && nbytes != sizeof (resp)) + { + int err = errno; + close (sock); + error (EXIT_FAILURE, err, _("cannot read invalidate ACK")); + } close (sock); - exit (nbytes != iov[0].iov_len + iov[1].iov_len - ? EXIT_FAILURE : EXIT_SUCCESS); + if (resp != 0) + error (EXIT_FAILURE, resp, _("invalidation failed")); + + exit (0); } case 't': @@ -487,10 +505,10 @@ write_pid (const char *file) return -1; fprintf (fp, "%d\n", getpid ()); - if (fflush (fp) || ferror (fp)) - return -1; + + int result = fflush (fp) || ferror (fp) ? -1 : 0; fclose (fp); - return 0; + return result; } diff -uprN glibc-2.4/nscd/nscd-client.h glibc-2.5/nscd/nscd-client.h --- glibc-2.4/nscd/nscd-client.h 2005-11-22 19:03:50.000000000 +0000 +++ glibc-2.5/nscd/nscd-client.h 2006-04-25 23:48:55.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005 +/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -277,7 +277,7 @@ extern int __nscd_open_socket (const cha /* Get reference of mapping. */ extern struct mapped_database *__nscd_get_map_ref (request_type type, const char *name, - struct locked_map_ptr *mapptr, + volatile struct locked_map_ptr *mapptr, int *gc_cyclep); /* Unmap database. */ diff -uprN glibc-2.4/nscd/nscd.conf glibc-2.5/nscd/nscd.conf --- glibc-2.4/nscd/nscd.conf 2005-08-23 23:17:32.000000000 +0000 +++ glibc-2.5/nscd/nscd.conf 2006-04-27 14:46:36.000000000 +0000 @@ -23,7 +23,8 @@ # check-files # persistent # shared -# max-db-szie +# max-db-size +# auto-propagate # # Currently supported cache names (services): passwd, group, hosts # @@ -47,6 +48,7 @@ persistent passwd yes shared passwd yes max-db-size passwd 33554432 + auto-propagate passwd yes enable-cache group yes positive-time-to-live group 3600 @@ -56,6 +58,7 @@ persistent group yes shared group yes max-db-size group 33554432 + auto-propagate group yes enable-cache hosts yes positive-time-to-live hosts 3600 diff -uprN glibc-2.4/nscd/nscd_conf.c glibc-2.5/nscd/nscd_conf.c --- glibc-2.4/nscd/nscd_conf.c 2005-12-07 05:47:27.000000000 +0000 +++ glibc-2.5/nscd/nscd_conf.c 2006-04-26 17:26:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1998,2000,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -256,6 +256,17 @@ nscd_parse_file (const char *fname, stru else error (0, 0, _("Must specify value for restart-interval option")); } + else if (strcmp (entry, "auto-propagate") == 0) + { + int idx = find_db (arg1); + if (idx >= 0) + { + if (strcmp (arg2, "no") == 0) + dbs[idx].propagate = 0; + else if (strcmp (arg2, "yes") == 0) + dbs[idx].propagate = 1; + } + } else error (0, 0, _("Unknown option: %s %s %s"), entry, arg1, arg2); } diff -uprN glibc-2.4/nscd/nscd_getai.c glibc-2.5/nscd/nscd_getai.c --- glibc-2.4/nscd/nscd_getai.c 2005-02-22 22:47:45.000000000 +0000 +++ glibc-2.5/nscd/nscd_getai.c 2006-05-15 20:31:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -34,7 +34,7 @@ extern int __nss_not_use_nscd_hosts; /* We use the mapping from nscd_gethst. */ -libc_locked_map_ptr (extern, __hst_map_handle); +libc_locked_map_ptr (extern, __hst_map_handle) attribute_hidden; int diff -uprN glibc-2.4/nscd/nscd_getgr_r.c glibc-2.5/nscd/nscd_getgr_r.c --- glibc-2.4/nscd/nscd_getgr_r.c 2005-02-22 22:47:45.000000000 +0000 +++ glibc-2.5/nscd/nscd_getgr_r.c 2006-05-15 20:39:34.000000000 +0000 @@ -1,5 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1998-2000, 2002-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -67,7 +66,7 @@ __nscd_getgrgid_r (gid_t gid, struct gro } -libc_locked_map_ptr (,__gr_map_handle); +libc_locked_map_ptr (,__gr_map_handle) attribute_hidden; /* Note that we only free the structure if necessary. The memory mapping is not removed since it is not visible to the malloc handling. */ diff -uprN glibc-2.4/nscd/nscd_gethst_r.c glibc-2.5/nscd/nscd_gethst_r.c --- glibc-2.4/nscd/nscd_gethst_r.c 2005-11-19 17:09:03.000000000 +0000 +++ glibc-2.5/nscd/nscd_gethst_r.c 2006-05-15 20:30:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -87,7 +87,7 @@ __nscd_gethostbyaddr_r (const void *addr } -libc_locked_map_ptr (, __hst_map_handle); +libc_locked_map_ptr (, __hst_map_handle) attribute_hidden; /* Note that we only free the structure if necessary. The memory mapping is not removed since it is not visible to the malloc handling. */ diff -uprN glibc-2.4/nscd/nscd.h glibc-2.5/nscd/nscd.h --- glibc-2.4/nscd/nscd.h 2005-12-30 16:51:19.000000000 +0000 +++ glibc-2.5/nscd/nscd.h 2006-05-30 17:28:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2001, 2003, 2004, 2005 +/* Copyright (c) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -58,16 +58,18 @@ typedef enum struct database_dyn { pthread_rwlock_t lock; + pthread_mutex_t prunelock; int enabled; int check_file; int persistent; int shared; - size_t max_db_size; - const char *filename; + int propagate; + const char filename[12]; const char *db_filename; time_t file_mtime; size_t suggested_module; + size_t max_db_size; unsigned long int postimeout; /* In seconds. */ unsigned long int negtimeout; /* In seconds. */ @@ -183,7 +185,7 @@ extern struct datahead *cache_search (re extern int cache_add (int type, const void *key, size_t len, struct datahead *packet, bool first, struct database_dyn *table, uid_t owner); -extern void prune_cache (struct database_dyn *table, time_t now); +extern void prune_cache (struct database_dyn *table, time_t now, int fd); /* pwdcache.c */ extern void addpwbyname (struct database_dyn *db, int fd, request_header *req, diff -uprN glibc-2.4/nscd/nscd_helper.c glibc-2.5/nscd/nscd_helper.c --- glibc-2.4/nscd/nscd_helper.c 2006-03-01 05:39:03.000000000 +0000 +++ glibc-2.5/nscd/nscd_helper.c 2006-04-25 23:47:53.000000000 +0000 @@ -176,35 +176,40 @@ get_mapping (request_type type, const ch struct mapped_database *result = NO_MAPPING; #ifdef SCM_RIGHTS const size_t keylen = strlen (key) + 1; - char resdata[keylen]; int saved_errno = errno; int mapfd = -1; /* Send the request. */ - struct iovec iov[2]; - request_header req; + struct + { + request_header req; + char key[keylen]; + } reqdata; int sock = open_socket (); if (sock < 0) goto out; - req.version = NSCD_VERSION; - req.type = type; - req.key_len = keylen; - - iov[0].iov_base = &req; - iov[0].iov_len = sizeof (req); - iov[1].iov_base = (void *) key; - iov[1].iov_len = keylen; + reqdata.req.version = NSCD_VERSION; + reqdata.req.type = type; + reqdata.req.key_len = keylen; + memcpy (reqdata.key, key, keylen); - if (__builtin_expect (TEMP_FAILURE_RETRY (__writev (sock, iov, 2)) - != iov[0].iov_len + iov[1].iov_len, 0)) +# ifndef MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +# endif + if (__builtin_expect (TEMP_FAILURE_RETRY (__send (sock, &reqdata, + sizeof (reqdata), + MSG_NOSIGNAL)) + != sizeof (reqdata), 0)) /* We cannot even write the request. */ goto out_close2; /* Room for the data sent along with the file descriptor. We expect the key name back. */ +# define resdata reqdata.key + struct iovec iov[1]; iov[0].iov_base = resdata; iov[0].iov_len = keylen; @@ -231,11 +236,7 @@ get_mapping (request_type type, const ch if (wait_on_socket (sock) <= 0) goto out_close2; -# ifndef MSG_NOSIGNAL -# define MSG_NOSIGNAL 0 -# endif - if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, - MSG_NOSIGNAL)) + if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen, 0)) goto out_close2; @@ -315,17 +316,18 @@ get_mapping (request_type type, const ch struct mapped_database * __nscd_get_map_ref (request_type type, const char *name, - struct locked_map_ptr *mapptr, int *gc_cyclep) + volatile struct locked_map_ptr *mapptr, int *gc_cyclep) { struct mapped_database *cur = mapptr->mapped; if (cur == NO_MAPPING) return cur; int cnt = 0; - while (atomic_compare_and_exchange_val_acq (&mapptr->lock, 1, 0) != 0) + while (__builtin_expect (atomic_compare_and_exchange_val_acq (&mapptr->lock, + 1, 0) != 0, 0)) { // XXX Best number of rounds? - if (++cnt > 5) + if (__builtin_expect (++cnt > 5, 0)) return NO_MAPPING; atomic_delay (); @@ -339,7 +341,8 @@ __nscd_get_map_ref (request_type type, c if (cur == NULL || (cur->head->nscd_certainly_running == 0 && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))) - cur = get_mapping (type, name, &mapptr->mapped); + cur = get_mapping (type, name, + (struct mapped_database **) &mapptr->mapped); if (__builtin_expect (cur != NO_MAPPING, 1)) { diff -uprN glibc-2.4/nscd/nscd_initgroups.c glibc-2.5/nscd/nscd_initgroups.c --- glibc-2.4/nscd/nscd_initgroups.c 2005-02-22 22:55:21.000000000 +0000 +++ glibc-2.5/nscd/nscd_initgroups.c 2006-09-29 17:05:21.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -30,7 +30,7 @@ /* We use the same mapping as in nscd_getgr. */ -libc_locked_map_ptr (extern, __gr_map_handle); +libc_locked_map_ptr (extern, __gr_map_handle) attribute_hidden; int @@ -91,7 +91,7 @@ __nscd_getgrouplist (const char *user, g doesn't use memcpy but instead copies each array element one by one. */ assert (sizeof (int32_t) == sizeof (gid_t)); - assert (initgr_resp->ngrps > 0); + assert (initgr_resp->ngrps >= 0); /* Make sure we have enough room. We always count GROUP in even though we might not end up adding it. */ diff -uprN glibc-2.4/nscd/pwdcache.c glibc-2.5/nscd/pwdcache.c --- glibc-2.4/nscd/pwdcache.c 2006-01-06 19:12:48.000000000 +0000 +++ glibc-2.5/nscd/pwdcache.c 2006-04-26 17:27:51.000000000 +0000 @@ -338,10 +338,10 @@ cache_addpw (struct database_dyn *db, in marked with FIRST first. Otherwise we end up with dangling "pointers" in case a latter hash entry cannot be added. */ - bool first = req->type == GETPWBYNAME; + bool first = true; /* If the request was by UID, add that entry first. */ - if (req->type != GETPWBYNAME) + if (req->type == GETPWBYUID) { if (cache_add (GETPWBYUID, cp, key_offset, &dataset->head, true, db, owner) < 0) @@ -351,12 +351,14 @@ cache_addpw (struct database_dyn *db, in dataset->head.usable = false; goto out; } + + first = false; } /* If the key is different from the name add a separate entry. */ else if (strcmp (key_copy, dataset->strdata) != 0) { if (cache_add (GETPWBYNAME, key_copy, key_len + 1, - &dataset->head, first, db, owner) < 0) + &dataset->head, true, db, owner) < 0) { /* Could not allocate memory. Make sure the data gets discarded. */ @@ -368,11 +370,12 @@ cache_addpw (struct database_dyn *db, in } /* We have to add the value for both, byname and byuid. */ - if (__builtin_expect (cache_add (GETPWBYNAME, dataset->strdata, - pw_name_len, &dataset->head, first, - db, owner) == 0, 1)) + if ((req->type == GETPWBYNAME || db->propagate) + && __builtin_expect (cache_add (GETPWBYNAME, dataset->strdata, + pw_name_len, &dataset->head, + first, db, owner) == 0, 1)) { - if (req->type == GETPWBYNAME) + if (req->type == GETPWBYNAME && db->propagate) (void) cache_add (GETPWBYUID, cp, key_offset, &dataset->head, req->type != GETPWBYNAME, db, owner); } diff -uprN glibc-2.4/nscd/selinux.c glibc-2.5/nscd/selinux.c --- glibc-2.4/nscd/selinux.c 2006-02-22 07:30:04.000000000 +0000 +++ glibc-2.5/nscd/selinux.c 2006-04-26 16:26:50.000000000 +0000 @@ -28,12 +28,13 @@ #include #include #include +#include #include #include #include #include #ifdef HAVE_LIBAUDIT -#include +# include #endif #include "dbg_log.h" @@ -149,6 +150,90 @@ audit_init (void) && errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT) dbg_log (_("Failed opening connection to the audit subsystem: %m")); } + + +# ifdef HAVE_LIBCAP +static const cap_value_t new_cap_list[] = + { CAP_AUDIT_WRITE }; +# define nnew_cap_list (sizeof (new_cap_list) / sizeof (new_cap_list[0])) +static const cap_value_t tmp_cap_list[] = + { CAP_AUDIT_WRITE, CAP_SETUID, CAP_SETGID }; +# define ntmp_cap_list (sizeof (tmp_cap_list) / sizeof (tmp_cap_list[0])) + +cap_t +preserve_capabilities (void) +{ + if (getuid () != 0) + /* Not root, then we cannot preserve anything. */ + return NULL; + + if (prctl (PR_SET_KEEPCAPS, 1) == -1) + { + dbg_log (_("Failed to set keep-capabilities")); + error (EXIT_FAILURE, errno, _("prctl(KEEPCAPS) failed")); + /* NOTREACHED */ + } + + cap_t tmp_caps = cap_init (); + cap_t new_caps; + if (tmp_caps != NULL) + new_caps = cap_init (); + + if (tmp_caps == NULL || new_caps == NULL) + { + if (tmp_caps != NULL) + free_caps (tmp_caps); + + dbg_log (_("Failed to initialize drop of capabilities")); + error (EXIT_FAILURE, 0, _("cap_init failed")); + } + + /* There is no reason why these should not work. */ + cap_set_flag (new_caps, CAP_PERMITTED, nnew_cap_list, new_cap_list, CAP_SET); + cap_set_flag (new_caps, CAP_EFFECTIVE, nnew_cap_list, new_cap_list, CAP_SET); + + cap_set_flag (tmp_caps, CAP_PERMITTED, ntmp_cap_list, tmp_cap_list, CAP_SET); + cap_set_flag (tmp_caps, CAP_EFFECTIVE, ntmp_cap_list, tmp_cap_list, CAP_SET); + + int res = cap_set_proc (tmp_caps); + + cap_free (tmp_caps); + + if (__builtin_expect (res != 0, 0)) + { + cap_free (new_caps); + dbg_log (_("Failed to drop capabilities\n")); + error (EXIT_FAILURE, 0, _("cap_set_proc failed")); + } + + return new_caps; +} + +void +install_real_capabilities (cap_t new_caps) +{ + /* If we have no capabilities there is nothing to do here. */ + if (new_caps == NULL) + return; + + if (cap_set_proc (new_caps)) + { + cap_free (new_caps); + dbg_log (_("Failed to drop capabilities")); + error (EXIT_FAILURE, 0, _("cap_set_proc failed")); + /* NOTREACHED */ + } + + cap_free (new_caps); + + if (prctl (PR_SET_KEEPCAPS, 0) == -1) + { + dbg_log (_("Failed to unset keep-capabilities")); + error (EXIT_FAILURE, errno, _("prctl(KEEPCAPS) failed")); + /* NOTREACHED */ + } +} +# endif /* HAVE_LIBCAP */ #endif /* HAVE_LIBAUDIT */ /* Determine if we are running on an SELinux kernel. Set selinux_enabled diff -uprN glibc-2.4/nscd/selinux.h glibc-2.5/nscd/selinux.h --- glibc-2.4/nscd/selinux.h 2004-09-16 23:59:44.000000000 +0000 +++ glibc-2.5/nscd/selinux.h 2006-04-26 16:27:39.000000000 +0000 @@ -1,5 +1,5 @@ /* Header for nscd SELinux access controls. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -22,6 +22,9 @@ #define _SELINUX_H 1 #include "nscd.h" +#ifdef HAVE_LIBCAP +# include +#endif #ifdef HAVE_SELINUX /* Global variable to tell if the kernel has SELinux support. */ @@ -42,6 +45,13 @@ extern int nscd_request_avc_has_perm (in extern void nscd_avc_cache_stats (struct avc_cache_stats *cstats); /* Display statistics on AVC usage. */ extern void nscd_avc_print_stats (struct avc_cache_stats *cstats); + +# ifdef HAVE_LIBCAP +/* Preserve capabilities to connect to connnect to the audit daemon. */ +extern cap_t preserve_capabilities (void); +/* Install final capabilities. */ +extern void install_real_capabilities (cap_t new_caps); +# endif #else # define selinux_enabled 0 # define nscd_avc_init() (void) 0 diff -uprN glibc-2.4/nss/nss_files/files-key.c glibc-2.5/nss/nss_files/files-key.c --- glibc-2.4/nss/nss_files/files-key.c 2001-07-06 04:55:38.000000000 +0000 +++ glibc-2.5/nss/nss_files/files-key.c 2006-04-07 04:19:55.000000000 +0000 @@ -1,5 +1,5 @@ /* Public key file parser in nss_files module. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -78,6 +78,7 @@ search (const char *netname, char *resul p = __strtok_r (NULL, ":\n", &save_ptr); if (p == NULL) /* malformed line? */ continue; + fclose (stream); strcpy (result, p); return NSS_STATUS_SUCCESS; } diff -uprN glibc-2.4/nss/nsswitch.c glibc-2.5/nss/nsswitch.c --- glibc-2.4/nss/nsswitch.c 2005-12-20 18:41:01.000000000 +0000 +++ glibc-2.5/nss/nsswitch.c 2006-05-09 22:46:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005 +/* Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -70,6 +70,7 @@ static const struct #include "databases.def" #undef DEFINE_DATABASE }; +#define ndatabases (sizeof (databases) / sizeof (databases[0])) __libc_lock_define_initialized (static, lock) @@ -211,7 +212,7 @@ __nss_configure_lookup (const char *dbna service_user *new_db; size_t cnt; - for (cnt = 0; cnt < sizeof databases; ++cnt) + for (cnt = 0; cnt < ndatabases; ++cnt) { int cmp = strcmp (dbname, databases[cnt].name); if (cmp == 0) @@ -223,7 +224,7 @@ __nss_configure_lookup (const char *dbna } } - if (cnt == sizeof databases) + if (cnt == ndatabases) { __set_errno (EINVAL); return -1; diff -uprN glibc-2.4/po/be.po glibc-2.5/po/be.po --- glibc-2.4/po/be.po 2003-10-30 02:12:58.000000000 +0000 +++ glibc-2.5/po/be.po 2006-09-21 04:16:47.000000000 +0000 @@ -260,7 +260,7 @@ msgstr "немагчыма Ð°Ð´Ñ‡Ñ‹Ð½Ñ–Ñ #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "" #: iconv/iconv_prog.c:246 @@ -352,7 +352,7 @@ msgid "Prefix used for all file accesses msgstr "" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: iconv/iconvconfig.c:405 @@ -727,7 +727,7 @@ msgstr "" #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1620,7 +1620,7 @@ msgid "no or value g msgstr "" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3028,7 +3028,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Памылка запіÑу Ñтандартнага вываду" #: timezone/zic.c:365 @@ -5047,7 +5047,7 @@ msgstr "немагчыма запіÑÐ°Ñ #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/ca.po glibc-2.5/po/ca.po --- glibc-2.4/po/ca.po 2004-08-12 15:03:13.000000000 +0000 +++ glibc-2.5/po/ca.po 2006-09-21 04:16:47.000000000 +0000 @@ -268,7 +268,7 @@ msgstr "no s'ha pogut obrir el fitxer d' #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "no es suporta la conversió de «%s» ni a «%s»" #: iconv/iconv_prog.c:248 @@ -373,7 +373,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix a usar en tots els accessos a fitxer." #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "no s'ha generat el fitxer d'eixida perquè s'han produït avisos" #: iconv/iconvconfig.c:405 @@ -760,7 +760,7 @@ msgstr "%s: un rang simbòlic amb eÅ€lip #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "«%s» i «%.*s» no són noms vàlids de rangs simbòlics" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1695,7 +1695,7 @@ msgstr "no s'ha especificat un valor or value g msgstr "ingen - eller -værdi givet" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan ikke gemme ny repertoiretabel" #: locale/programs/repertoire.c:343 @@ -3051,7 +3051,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: brug er %s [ -v ] [ -c grænse ] zonenavn ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fejl ved skrivning til standard ud" #: timezone/zic.c:365 @@ -5073,7 +5073,7 @@ msgstr "kan ikke udskrive resultat: '%s' #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "fejl ved forespørgsel på opkaldets id: %s" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/de.po glibc-2.5/po/de.po --- glibc-2.4/po/de.po 2004-12-14 02:40:46.000000000 +0000 +++ glibc-2.5/po/de.po 2006-09-21 04:16:47.000000000 +0000 @@ -304,7 +304,7 @@ msgstr "Kann die Ausgabedatei nicht öff #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "Konvertierung von »%s« nach »%s« wird nicht unterstützt" #: iconv/iconv_prog.c:248 @@ -406,7 +406,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix für jeden Dateizugriff" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Es wurde keine Ausgabedatei erzeugt, weil Warnungen ausgegeben wurden" #: iconv/iconvconfig.c:405 @@ -787,7 +787,7 @@ msgstr "%s: Das Symbol für Auslassungen #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "»%s« und »%.*s« sind ungültige Namen für eine symbolischen Zeichenbereich" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1716,7 +1716,7 @@ msgid "no or value g msgstr "Kein oder Wert angegeben" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Kann die neue »repertoire«-Map »%s« nicht speichern" #: locale/programs/repertoire.c:343 @@ -3149,7 +3149,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: Syntax: %s [ --version ] [ -v ] [ -c cutoff ] Zonenname ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fehler beim Schreiben zur Standardausgabe" #: timezone/zic.c:361 @@ -5208,7 +5208,7 @@ msgstr "Das Ergebnis kann nicht geschrie #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "Fehler beim Feststellen der Identität des Aufrufers: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/el.po glibc-2.5/po/el.po --- glibc-2.4/po/el.po 2001-05-22 23:27:05.000000000 +0000 +++ glibc-2.5/po/el.po 2006-09-21 04:16:47.000000000 +0000 @@ -3801,7 +3801,7 @@ msgstr "Ï ïñéóìüò `%1$s' äåí ôåëåéþíåé ì #: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 #, fuzzy, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "Ôá <%s> êáé <%s> åßíáé ìç áðïäåêôÜ ïíüìáôá ãéá üñéï" #: elf/sprof.c:762 @@ -4118,7 +4118,7 @@ msgstr "áäýíáôç ç áíÜãíùóç äåäïìÝíùí óôá #: locale/programs/repertoire.c:331 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "áäõíáìßá áíÜãíùóçò ðßíáêá ñåðåñôïñßïõ `%s'" #: elf/dl-load.c:776 @@ -4329,7 +4329,7 @@ msgstr "êùäéêïðïßçóç ãéá ôï áñ÷éêü êåßìå #: nscd/connections.c:361 nscd/connections.c:453 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "óöÜëìá óôç ëÞøç ôçò ôáõôüôçôáò áõôïý ðïõ êÜëåóå: %s" #: locale/programs/ld-collate.c:3013 @@ -4771,7 +4771,7 @@ msgid "no output digits defined and none msgstr "" #: locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "äåí ðáñÜ÷èçêå áñ÷åßï åîüäïõ åðåéäÞ åêäüèçêáí ðñïåéäïðïéÞóåéò" #: locale/programs/charmap.c:488 locale/programs/charmap.c:668 locale/programs/charmap.c:764 @@ -5587,7 +5587,7 @@ msgstr "yp_update: áäõíáìßá ëÞøçò äéåýèõ #~ msgid "while writing database file" #~ msgstr "êáôÜ ôçí åããñáöÞ áñ÷åßïõ âÜóåùò äåäïìÝíùí" -#~ msgid "%s: Error writing standard output " +#~ msgid "%s: Error writing to standard output " #~ msgstr "%s: ÓöÜëìá êáôÜ ôçí åããñáöÞ óôçí êáíïíéêÞ Ýîïäï " #~ msgid "Cputime limit exceeded" diff -uprN glibc-2.4/po/en_GB.po glibc-2.5/po/en_GB.po --- glibc-2.4/po/en_GB.po 2000-07-03 20:42:06.000000000 +0000 +++ glibc-2.5/po/en_GB.po 2006-09-21 04:16:47.000000000 +0000 @@ -3768,7 +3768,7 @@ msgstr "" #: locale/programs/ld-collate.c:1184 locale/programs/ld-ctype.c:1263 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: elf/sprof.c:763 @@ -3988,7 +3988,7 @@ msgid "cannot read statistics data" msgstr "" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: nscd/cache.c:150 nscd/connections.c:151 @@ -4188,7 +4188,7 @@ msgstr "" #: nscd/connections.c:360 nscd/connections.c:451 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: locale/programs/ld-collate.c:2787 @@ -4600,7 +4600,7 @@ msgid "" msgstr "" #: locale/programs/localedef.c:229 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: locale/programs/charmap.c:438 locale/programs/charmap.c:589 diff -uprN glibc-2.4/po/es.po glibc-2.5/po/es.po --- glibc-2.4/po/es.po 2004-12-28 19:35:22.000000000 +0000 +++ glibc-2.5/po/es.po 2006-09-21 04:16:47.000000000 +0000 @@ -302,7 +302,7 @@ msgstr "no se puede abrir el fichero de #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "no se admite la conversión de `%s' a `%s'" #: iconv/iconv_prog.c:248 @@ -411,7 +411,7 @@ msgid "Prefix used for all file accesses msgstr "Prefijo utilizado para todos los accesos a ficheros" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "no se ha producido ningún fichero de salida debido a la existencia de avisos" #: iconv/iconvconfig.c:405 @@ -798,7 +798,7 @@ msgstr "%s: el rango simbólico de la eli #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' y `%.*s' no son nombres válidos para el rango simbólico" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1748,7 +1748,7 @@ msgstr "no se ha dado ningún valor \"%s\" ei ole tuettu" #: iconv/iconv_prog.c:246 @@ -376,7 +376,7 @@ msgid "Prefix used for all file accesses msgstr "Jokaisen tiedoston käsittelyssä käytettävä etuliite" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "tulostiedostoa ei tuotettu varoituksen takia" #: iconv/iconvconfig.c:405 @@ -751,7 +751,7 @@ msgstr "%s: symbolisen välin sanankatkai #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "\"%s\" ja \"%.*s\" eivät ole kelvollisia nimiä symboliselle välille" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1652,7 +1652,7 @@ msgid "no or value g msgstr "ei - tai -arvoa annettu" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "uutta valikoimakarttaa ei voi turvata" #: locale/programs/repertoire.c:343 @@ -3065,7 +3065,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: käyttö: %s [ -v ] [ -c katkaisu ] vyöhykenimi ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Virhe kirjoitettaessa vakiotulosteeseen" #: timezone/zic.c:365 @@ -5086,7 +5086,7 @@ msgstr "tulosta ei voi kirjoittaa: %s" #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "virhe kutsujan tunnisteen hakemisessa: %s" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/fr.po glibc-2.5/po/fr.po --- glibc-2.4/po/fr.po 2004-08-05 17:51:01.000000000 +0000 +++ glibc-2.5/po/fr.po 2006-09-21 04:16:48.000000000 +0000 @@ -260,7 +260,7 @@ msgstr "Ne peut ouvrir le fichier de sor #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "conversions de « %s » et de , vers « %s » ne sont pas supportées" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "Préfixe utilisé pour tous les accès fichiers" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Aucun fichier de sortie généré en raison d'un avertissement déjà émis" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: plage de l'ellipse symboliqu #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "« %s » et « %.*s » sont des noms invalides pour un intervalle symbolique." #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1664,7 +1664,7 @@ msgid "no or value g msgstr "Aucune valeur ou fournie" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Ne peut sauvegarder la nouvelle table des répertoires" #: locale/programs/repertoire.c:343 @@ -3087,7 +3087,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: usage est %s [ --version ] [ -v ] [ -c seuil ] nom_du_fuseau_horaire ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "ERREUR d'écriture sur la sortie standard" #: timezone/zic.c:361 @@ -5131,7 +5131,7 @@ msgstr "Ne peut écrire les résultats: « #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "erreur lors de la recherche de l'identificateur de l'appelant: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/gl.po glibc-2.5/po/gl.po --- glibc-2.4/po/gl.po 2003-03-03 19:35:16.000000000 +0000 +++ glibc-2.5/po/gl.po 2006-09-21 04:16:48.000000000 +0000 @@ -259,7 +259,7 @@ msgstr "non se pode abri-lo ficheiro de #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "as conversións de `%s' e a `%s' non están soportadas" #: iconv/iconv_prog.c:246 @@ -360,7 +360,7 @@ msgid "Prefix used for all file accesses msgstr "Prefixo a empregar para tódolos accesos a ficheiro" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "non se producíu un ficheiro de saída porque se deron avisos" #: iconv/iconvconfig.c:405 @@ -735,7 +735,7 @@ msgstr "%s: os puntos suspensivos do ran #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' e `%.*s' non son nomes válidos para o rango simbólico" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1636,7 +1636,7 @@ msgid "no or value g msgstr "non se deu un valor ou " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "non se pode grava-lo novo mapa de repertorios" #: locale/programs/repertoire.c:343 @@ -3049,7 +3049,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: úsase %s [ -v ] [ -c corte ] nomezona ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Erro ao escribir na saída estándar" #: timezone/zic.c:365 @@ -5070,7 +5070,7 @@ msgstr "non se pode escribi-lo resultado #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "erro ao obte-lo identificador do chamante: %s" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/hr.po glibc-2.5/po/hr.po --- glibc-2.4/po/hr.po 2002-06-20 22:37:34.000000000 +0000 +++ glibc-2.5/po/hr.po 2006-09-21 04:16:48.000000000 +0000 @@ -1870,7 +1870,7 @@ msgid "Error while talking to callback p msgstr "" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "" #: inet/ruserpass.c:184 @@ -3828,7 +3828,7 @@ msgstr "`%1$s' definicija ne zavrÅ¡ava s #: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: elf/sprof.c:762 @@ -4117,7 +4117,7 @@ msgid "cannot read statistics data" msgstr "ne moogu proÄitati statistike" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: elf/dl-load.c:784 @@ -4339,7 +4339,7 @@ msgstr "enkoding izvornog teksta" #: nscd/connections.c:366 nscd/connections.c:460 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "greÅ¡ka pri dohvatu broja pozivatelja: %s" #: locale/programs/ld-collate.c:3032 @@ -4777,7 +4777,7 @@ msgid "no output digits defined and none msgstr "" #: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: locale/programs/charmap.c:493 locale/programs/charmap.c:673 locale/programs/charmap.c:769 locale/programs/repertoire.c:231 diff -uprN glibc-2.4/po/hu.po glibc-2.5/po/hu.po --- glibc-2.4/po/hu.po 2002-09-16 17:33:32.000000000 +0000 +++ glibc-2.5/po/hu.po 2006-09-21 04:16:48.000000000 +0000 @@ -1968,7 +1968,7 @@ msgid "Error while talking to callback p msgstr "Hiba amíg kommunikáltam a visszahívó folyamattal" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Hiba az alapértelmezett kimenetre írás során" #: inet/ruserpass.c:184 @@ -4025,7 +4025,7 @@ msgstr "a `%1$s' meghatározás nem végzõd #: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "a `%s' és a `%.*s' nem érvényesek a szimbolikus tartományban" #: elf/sprof.c:762 @@ -4318,7 +4318,7 @@ msgid "cannot read statistics data" msgstr "nem lehet olvasni a statisztikai adatokat" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nem biztonságos új repertoár" #: elf/dl-load.c:784 @@ -4540,7 +4540,7 @@ msgstr "az eredeti szöveg kódolása" #: nscd/connections.c:366 nscd/connections.c:460 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "hiba a hívó azonosítás során: %s" #: locale/programs/ld-collate.c:3032 @@ -4984,7 +4984,7 @@ msgid "no output digits defined and none msgstr "nincs kimeneti szám meghatározva és nincs szabványos név a karakterkészletben" #: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nem jött létre kimeneti fájl, mert figyelmeztetést kaptam" #: locale/programs/charmap.c:493 locale/programs/charmap.c:673 diff -uprN glibc-2.4/po/ja.po glibc-2.5/po/ja.po --- glibc-2.4/po/ja.po 2004-12-17 19:18:16.000000000 +0000 +++ glibc-2.5/po/ja.po 2006-09-21 04:16:48.000000000 +0000 @@ -259,7 +259,7 @@ msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'¤«¤é¤ÎÊÑ´¹¤È`%s'¤Ø¤ÎÊÑ´¹¤Ï¤É¤Á¤é¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "Á´¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹¤Ë¥×¥ì¥Õ¥£¥Ã¥¯¥¹¤ò»ÈÍѤ·¤Þ¤¹" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "·Ù¹ð¤¬½Ð¤µ¤ì¤¿¤¿¤á¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤµ¤ì¤Þ¤»¤ó¤Ç¤·¤¿" #: iconv/iconvconfig.c:405 @@ -737,7 +737,7 @@ msgstr "%s: ¥·¥ó¥Ü¥ëÈϰϾÊάµ­¹æ¤Ï`order #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ¤È `%.*s' ¤Ï¥·¥ó¥Ü¥ë¤ÎÈϰϤȤ·¤ÆÉÔÀµ¤Ê̾Á°¤Ç¤¹" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1654,7 +1654,7 @@ msgid "no or value g msgstr " ¤Þ¤¿¤Ï Ãͤ¬Í¿¤¨¤é¤ì¤Þ¤»¤ó¤Ç¤·¤¿" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "¿·¤·¤¤¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×¤Ï°ÂÁ´¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" #: locale/programs/repertoire.c:343 @@ -3075,7 +3075,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: »ÈÍÑË¡ %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "¥¨¥é¡¼¤òɸ½à½ÐÎϤ˽ñ¤­½Ð¤·Ãæ" #: timezone/zic.c:361 @@ -5112,7 +5112,7 @@ msgstr "·ë²Ì¤ò½ñ¤­¹þ¤á¤Þ¤»¤ó: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "¸Æ¤Ó½Ð¤·ID¤Î¼èÆÀ¤Ç¥¨¥é¡¼: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/ko.po glibc-2.5/po/ko.po --- glibc-2.4/po/ko.po 2004-08-06 00:51:02.000000000 +0000 +++ glibc-2.5/po/ko.po 2006-09-21 04:16:48.000000000 +0000 @@ -260,7 +260,7 @@ msgstr "Ãâ·Â ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'¿¡¼­ º¯È¯ ¹× `%s'·ÎÀÇ º¯È¯Àº Áö¿øÇÏÁö ¾Ê½À´Ï´Ù" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "¸ðµç ÆÄÀÏ Á¢±Ù¿¡ »ç¿ëÇÏ´Â Á¢µÎ¾î" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "°æ°í°¡ Á¦±âµÇ¾ú±â ¶§¹®¿¡ Ãâ·Â ÆÄÀÏÀÌ ¸¸µé¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù" #: iconv/iconvconfig.c:405 @@ -739,7 +739,7 @@ msgstr "%s: ±âÈ£ ¹üÀ§ ¸»ÁÙÀÓÇ¥´Â `order_ #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s'°ú(¿Í) `%.*s'Àº(´Â) ±âÈ£ ¹üÀ§·Î »ç¿ë°¡´ÉÇÑ À̸§ÀÌ ¾Æ´Õ´Ï´Ù" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1667,7 +1667,7 @@ msgstr " ȤÀº °ªÀÌ ÁÖ # ¹ø¿ª: safe°¡ µ¿»ç·Î ¹¹Áö??? #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "»õ·Î¿î ·¹ÆÄÅ丮 Áöµµ ÆÄÀÏÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù" #: locale/programs/repertoire.c:343 @@ -3096,7 +3096,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: »ç¿ë¹ýÀº %s [ --version ] [ -v ] [ -c Àý´Ü ] Áö¿ª¸í ... ÀÔ´Ï´Ù\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Ç¥ÁØ Ãâ·Â¿¡ ¾²´Â µ¥ ¿À·ù" #: timezone/zic.c:361 @@ -5131,7 +5131,7 @@ msgstr "°á°ú¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "È£ÃâÀÚÀÇ ID¸¦ ¾ò´Âµ¥ ¿À·ù: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/libc.pot glibc-2.5/po/libc.pot --- glibc-2.4/po/libc.pot 2006-02-22 10:02:54.000000000 +0000 +++ glibc-2.5/po/libc.pot 2006-09-29 18:41:58.000000000 +0000 @@ -5,8 +5,8 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: libc 2.3.90\n" -"POT-Creation-Date: 2006-02-22 02:00-0800\n" +"Project-Id-Version: libc 2.5\n" +"POT-Creation-Date: 2006-09-29 11:38-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -14,45 +14,45 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: argp/argp-help.c:226 +#: argp/argp-help.c:227 #, c-format msgid "%.*s: ARGP_HELP_FMT parameter requires a value" msgstr "" -#: argp/argp-help.c:235 +#: argp/argp-help.c:237 #, c-format msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "" -#: argp/argp-help.c:247 +#: argp/argp-help.c:250 #, c-format msgid "Garbage in ARGP_HELP_FMT: %s" msgstr "" -#: argp/argp-help.c:1211 +#: argp/argp-help.c:1214 msgid "" "Mandatory or optional arguments to long options are also mandatory or " "optional for any corresponding short options." msgstr "" -#: argp/argp-help.c:1598 +#: argp/argp-help.c:1600 msgid "Usage:" msgstr "" -#: argp/argp-help.c:1602 +#: argp/argp-help.c:1604 msgid " or: " msgstr "" -#: argp/argp-help.c:1614 +#: argp/argp-help.c:1616 msgid " [OPTION...]" msgstr "" -#: argp/argp-help.c:1641 +#: argp/argp-help.c:1643 #, c-format msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "" -#: argp/argp-help.c:1669 +#: argp/argp-help.c:1671 #, c-format msgid "Report bugs to %s.\n" msgstr "" @@ -131,7 +131,7 @@ msgstr "" #: catgets/gencat.c:231 debug/pcprofiledump.c:199 iconv/iconv_prog.c:410 #: iconv/iconvconfig.c:379 locale/programs/localedef.c:370 -#: login/programs/pt_chown.c:88 malloc/memusagestat.c:522 nss/makedb.c:231 +#: login/programs/pt_chown.c:88 malloc/memusagestat.c:525 nss/makedb.c:231 msgid "" "For bug reporting instructions, please see:\n" ".\n" @@ -141,8 +141,8 @@ msgstr "" #: elf/ldd.bash.in:39 elf/sprof.c:355 iconv/iconv_prog.c:425 #: iconv/iconvconfig.c:394 locale/programs/locale.c:274 #: locale/programs/localedef.c:386 login/programs/pt_chown.c:59 -#: malloc/memusage.sh:71 nscd/nscd.c:383 nss/getent.c:83 nss/makedb.c:245 -#: posix/getconf.c:1006 +#: malloc/memusage.sh:71 nscd/nscd.c:401 nss/getent.c:83 nss/makedb.c:245 +#: posix/getconf.c:1007 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -152,8 +152,8 @@ msgstr "" #: catgets/gencat.c:250 debug/xtrace.sh:68 elf/ldconfig.c:290 elf/sprof.c:361 #: iconv/iconv_prog.c:430 iconv/iconvconfig.c:399 locale/programs/locale.c:279 -#: locale/programs/localedef.c:391 malloc/memusage.sh:75 nscd/nscd.c:388 -#: nss/getent.c:88 nss/makedb.c:250 posix/getconf.c:1011 +#: locale/programs/localedef.c:391 malloc/memusage.sh:75 nscd/nscd.c:406 +#: nss/getent.c:88 nss/makedb.c:250 posix/getconf.c:1012 #, c-format msgid "Written by %s.\n" msgstr "" @@ -219,7 +219,7 @@ msgstr "" msgid "cannot open output file `%s'" msgstr "" -#: catgets/gencat.c:1194 locale/programs/linereader.c:565 +#: catgets/gencat.c:1194 locale/programs/linereader.c:559 msgid "invalid escape sequence" msgstr "" @@ -318,66 +318,70 @@ msgstr "" msgid "`$program' is no executable\\n" msgstr "" -#: dlfcn/dlinfo.c:63 +#: dlfcn/dlinfo.c:67 msgid "RTLD_SELF used in code not dynamically loaded" msgstr "" -#: dlfcn/dlinfo.c:72 +#: dlfcn/dlinfo.c:76 msgid "unsupported dlinfo request" msgstr "" -#: dlfcn/dlmopen.c:63 +#: dlfcn/dlmopen.c:64 msgid "invalid namespace" msgstr "" +#: dlfcn/dlmopen.c:69 +msgid "invalid mode" +msgstr "" + #: dlfcn/dlopen.c:64 msgid "invalid mode parameter" msgstr "" -#: elf/cache.c:68 +#: elf/cache.c:67 msgid "unknown" msgstr "" -#: elf/cache.c:111 +#: elf/cache.c:110 msgid "Unknown OS" msgstr "" -#: elf/cache.c:116 +#: elf/cache.c:115 #, c-format msgid ", OS ABI: %s %d.%d.%d" msgstr "" -#: elf/cache.c:142 elf/ldconfig.c:1218 +#: elf/cache.c:141 elf/ldconfig.c:1231 #, c-format msgid "Can't open cache file %s\n" msgstr "" -#: elf/cache.c:154 +#: elf/cache.c:153 #, c-format msgid "mmap of cache file failed.\n" msgstr "" -#: elf/cache.c:158 elf/cache.c:168 +#: elf/cache.c:157 elf/cache.c:167 #, c-format msgid "File is not a cache file.\n" msgstr "" -#: elf/cache.c:201 elf/cache.c:211 +#: elf/cache.c:200 elf/cache.c:210 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "" -#: elf/cache.c:410 +#: elf/cache.c:409 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "" -#: elf/cache.c:417 +#: elf/cache.c:416 #, c-format msgid "Can't create temporary cache file %s" msgstr "" -#: elf/cache.c:425 elf/cache.c:434 elf/cache.c:438 +#: elf/cache.c:424 elf/cache.c:434 elf/cache.c:438 #, c-format msgid "Writing of cache data failed" msgstr "" @@ -401,7 +405,7 @@ msgstr "" msgid "shared object not open" msgstr "" -#: elf/dl-deps.c:112 elf/dl-open.c:228 +#: elf/dl-deps.c:112 msgid "DST not allowed in SUID/SGID programs" msgstr "" @@ -448,163 +452,163 @@ msgstr "" msgid "internal error: symidx out of range of fptr table" msgstr "" -#: elf/dl-load.c:365 +#: elf/dl-load.c:372 msgid "cannot allocate name record" msgstr "" -#: elf/dl-load.c:467 elf/dl-load.c:546 elf/dl-load.c:666 elf/dl-load.c:761 +#: elf/dl-load.c:474 elf/dl-load.c:553 elf/dl-load.c:673 elf/dl-load.c:786 msgid "cannot create cache for search path" msgstr "" -#: elf/dl-load.c:569 +#: elf/dl-load.c:576 msgid "cannot create RUNPATH/RPATH copy" msgstr "" -#: elf/dl-load.c:652 +#: elf/dl-load.c:659 msgid "cannot create search path array" msgstr "" -#: elf/dl-load.c:838 +#: elf/dl-load.c:870 msgid "cannot stat shared object" msgstr "" -#: elf/dl-load.c:913 +#: elf/dl-load.c:940 msgid "cannot open zero fill device" msgstr "" -#: elf/dl-load.c:958 elf/dl-load.c:2170 +#: elf/dl-load.c:985 elf/dl-load.c:2215 msgid "cannot create shared object descriptor" msgstr "" -#: elf/dl-load.c:977 elf/dl-load.c:1636 elf/dl-load.c:1722 +#: elf/dl-load.c:1004 elf/dl-load.c:1663 elf/dl-load.c:1755 msgid "cannot read file data" msgstr "" -#: elf/dl-load.c:1021 +#: elf/dl-load.c:1048 msgid "ELF load command alignment not page-aligned" msgstr "" -#: elf/dl-load.c:1028 +#: elf/dl-load.c:1055 msgid "ELF load command address/offset not properly aligned" msgstr "" -#: elf/dl-load.c:1112 +#: elf/dl-load.c:1139 msgid "cannot allocate TLS data structures for initial thread" msgstr "" -#: elf/dl-load.c:1136 +#: elf/dl-load.c:1163 msgid "cannot handle TLS data" msgstr "" -#: elf/dl-load.c:1155 +#: elf/dl-load.c:1182 msgid "object file has no loadable segments" msgstr "" -#: elf/dl-load.c:1191 +#: elf/dl-load.c:1218 msgid "failed to map segment from shared object" msgstr "" -#: elf/dl-load.c:1215 +#: elf/dl-load.c:1242 msgid "cannot dynamically load executable" msgstr "" -#: elf/dl-load.c:1276 +#: elf/dl-load.c:1303 msgid "cannot change memory protections" msgstr "" -#: elf/dl-load.c:1295 +#: elf/dl-load.c:1322 msgid "cannot map zero-fill pages" msgstr "" -#: elf/dl-load.c:1309 +#: elf/dl-load.c:1336 msgid "object file has no dynamic section" msgstr "" -#: elf/dl-load.c:1332 +#: elf/dl-load.c:1359 msgid "shared object cannot be dlopen()ed" msgstr "" -#: elf/dl-load.c:1345 +#: elf/dl-load.c:1372 msgid "cannot allocate memory for program header" msgstr "" -#: elf/dl-load.c:1362 elf/dl-open.c:174 +#: elf/dl-load.c:1389 elf/dl-open.c:174 msgid "invalid caller" msgstr "" -#: elf/dl-load.c:1401 +#: elf/dl-load.c:1428 msgid "cannot enable executable stack as shared object requires" msgstr "" -#: elf/dl-load.c:1416 +#: elf/dl-load.c:1443 msgid "cannot close file descriptor" msgstr "" -#: elf/dl-load.c:1458 +#: elf/dl-load.c:1485 msgid "cannot create searchlist" msgstr "" -#: elf/dl-load.c:1636 +#: elf/dl-load.c:1663 msgid "file too short" msgstr "" -#: elf/dl-load.c:1659 +#: elf/dl-load.c:1692 msgid "invalid ELF header" msgstr "" -#: elf/dl-load.c:1671 +#: elf/dl-load.c:1704 msgid "ELF file data encoding not big-endian" msgstr "" -#: elf/dl-load.c:1673 +#: elf/dl-load.c:1706 msgid "ELF file data encoding not little-endian" msgstr "" -#: elf/dl-load.c:1677 +#: elf/dl-load.c:1710 msgid "ELF file version ident does not match current one" msgstr "" -#: elf/dl-load.c:1681 +#: elf/dl-load.c:1714 msgid "ELF file OS ABI invalid" msgstr "" -#: elf/dl-load.c:1683 +#: elf/dl-load.c:1716 msgid "ELF file ABI version invalid" msgstr "" -#: elf/dl-load.c:1686 +#: elf/dl-load.c:1719 msgid "internal error" msgstr "" -#: elf/dl-load.c:1693 +#: elf/dl-load.c:1726 msgid "ELF file version does not match current one" msgstr "" -#: elf/dl-load.c:1701 +#: elf/dl-load.c:1734 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "" -#: elf/dl-load.c:1707 +#: elf/dl-load.c:1740 msgid "ELF file's phentsize not the expected size" msgstr "" -#: elf/dl-load.c:2185 +#: elf/dl-load.c:2231 msgid "wrong ELF class: ELFCLASS64" msgstr "" -#: elf/dl-load.c:2186 +#: elf/dl-load.c:2232 msgid "wrong ELF class: ELFCLASS32" msgstr "" -#: elf/dl-load.c:2189 +#: elf/dl-load.c:2235 msgid "cannot open shared object file" msgstr "" -#: elf/dl-lookup.c:249 +#: elf/dl-lookup.c:261 msgid "relocation error" msgstr "" -#: elf/dl-lookup.c:277 +#: elf/dl-lookup.c:289 msgid "symbol lookup error" msgstr "" @@ -612,27 +616,27 @@ msgstr "" msgid "cannot extend global scope" msgstr "" -#: elf/dl-open.c:244 +#: elf/dl-open.c:237 msgid "empty dynamic string token substitution" msgstr "" -#: elf/dl-open.c:410 elf/dl-open.c:421 +#: elf/dl-open.c:406 elf/dl-open.c:417 elf/dl-open.c:425 msgid "cannot create scope list" msgstr "" -#: elf/dl-open.c:465 +#: elf/dl-open.c:470 msgid "TLS generation counter wrapped! Please report this." msgstr "" -#: elf/dl-open.c:503 +#: elf/dl-open.c:508 msgid "invalid mode for dlopen()" msgstr "" -#: elf/dl-open.c:520 +#: elf/dl-open.c:525 msgid "no more namespaces available for dlmopen()" msgstr "" -#: elf/dl-open.c:533 +#: elf/dl-open.c:538 msgid "invalid target namespace in dlmopen()" msgstr "" @@ -670,7 +674,7 @@ msgstr "" msgid "cannot create capability list" msgstr "" -#: elf/dl-tls.c:785 +#: elf/dl-tls.c:829 msgid "cannot create TLS data structures" msgstr "" @@ -807,94 +811,94 @@ msgstr "" msgid "Can't open directory %s" msgstr "" -#: elf/ldconfig.c:722 elf/ldconfig.c:769 +#: elf/ldconfig.c:735 elf/ldconfig.c:782 #, c-format msgid "Cannot lstat %s" msgstr "" -#: elf/ldconfig.c:734 +#: elf/ldconfig.c:747 #, c-format msgid "Cannot stat %s" msgstr "" -#: elf/ldconfig.c:791 elf/readlib.c:90 +#: elf/ldconfig.c:804 elf/readlib.c:90 #, c-format msgid "Input file %s not found.\n" msgstr "" -#: elf/ldconfig.c:842 +#: elf/ldconfig.c:855 #, c-format msgid "libc5 library %s in wrong directory" msgstr "" -#: elf/ldconfig.c:845 +#: elf/ldconfig.c:858 #, c-format msgid "libc6 library %s in wrong directory" msgstr "" -#: elf/ldconfig.c:848 +#: elf/ldconfig.c:861 #, c-format msgid "libc4 library %s in wrong directory" msgstr "" -#: elf/ldconfig.c:875 +#: elf/ldconfig.c:888 #, c-format msgid "" "libraries %s and %s in directory %s have same soname but different type." msgstr "" -#: elf/ldconfig.c:982 +#: elf/ldconfig.c:995 #, c-format msgid "Can't open configuration file %s" msgstr "" -#: elf/ldconfig.c:1046 +#: elf/ldconfig.c:1059 #, c-format msgid "%s:%u: bad syntax in hwcap line" msgstr "" -#: elf/ldconfig.c:1052 +#: elf/ldconfig.c:1065 #, c-format msgid "%s:%u: hwcap index %lu above maximum %u" msgstr "" -#: elf/ldconfig.c:1059 elf/ldconfig.c:1067 +#: elf/ldconfig.c:1072 elf/ldconfig.c:1080 #, c-format msgid "%s:%u: hwcap index %lu already defined as %s" msgstr "" -#: elf/ldconfig.c:1070 +#: elf/ldconfig.c:1083 #, c-format msgid "%s:%u: duplicate hwcap %lu %s" msgstr "" -#: elf/ldconfig.c:1092 +#: elf/ldconfig.c:1105 #, c-format msgid "need absolute file name for configuration file when using -r" msgstr "" -#: elf/ldconfig.c:1099 locale/programs/xmalloc.c:69 malloc/obstack.c:434 -#: malloc/obstack.c:436 posix/getconf.c:980 posix/getconf.c:1157 +#: elf/ldconfig.c:1112 locale/programs/xmalloc.c:69 malloc/obstack.c:434 +#: malloc/obstack.c:436 posix/getconf.c:980 posix/getconf.c:1158 #, c-format msgid "memory exhausted" msgstr "" -#: elf/ldconfig.c:1129 +#: elf/ldconfig.c:1142 #, c-format msgid "%s:%u: cannot read directory %s" msgstr "" -#: elf/ldconfig.c:1169 +#: elf/ldconfig.c:1182 #, c-format msgid "relative path `%s' used to build cache" msgstr "" -#: elf/ldconfig.c:1197 +#: elf/ldconfig.c:1210 #, c-format msgid "Can't chdir to /" msgstr "" -#: elf/ldconfig.c:1239 +#: elf/ldconfig.c:1252 #, c-format msgid "Can't open cache file directory %s\n" msgstr "" @@ -939,19 +943,23 @@ msgstr "" msgid "No such file or directory" msgstr "" -#: elf/ldd.bash.in:151 +#: elf/ldd.bash.in:151 inet/rcmd.c:483 +msgid "not regular file" +msgstr "" + +#: elf/ldd.bash.in:154 msgid "warning: you do not have execution permission for" msgstr "" -#: elf/ldd.bash.in:185 +#: elf/ldd.bash.in:183 msgid "\tnot a dynamic executable" msgstr "" -#: elf/ldd.bash.in:193 +#: elf/ldd.bash.in:191 msgid "exited with unknown exit code" msgstr "" -#: elf/ldd.bash.in:198 +#: elf/ldd.bash.in:196 msgid "error: you do not have read permission for" msgstr "" @@ -1132,23 +1140,23 @@ msgstr "" msgid "error while closing input `%s'" msgstr "" -#: iconv/iconv_charmap.c:441 +#: iconv/iconv_charmap.c:449 #, c-format msgid "illegal input sequence at position %Zd" msgstr "" -#: iconv/iconv_charmap.c:460 iconv/iconv_prog.c:525 +#: iconv/iconv_charmap.c:468 iconv/iconv_prog.c:525 #, c-format msgid "incomplete character or shift sequence at end of buffer" msgstr "" -#: iconv/iconv_charmap.c:505 iconv/iconv_charmap.c:541 iconv/iconv_prog.c:568 +#: iconv/iconv_charmap.c:513 iconv/iconv_charmap.c:549 iconv/iconv_prog.c:568 #: iconv/iconv_prog.c:604 #, c-format msgid "error while reading the input" msgstr "" -#: iconv/iconv_charmap.c:523 iconv/iconv_prog.c:586 +#: iconv/iconv_charmap.c:531 iconv/iconv_prog.c:586 #, c-format msgid "unable to allocate buffer for input" msgstr "" @@ -1208,7 +1216,7 @@ msgstr "" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "" #: iconv/iconv_prog.c:246 @@ -1295,7 +1303,7 @@ msgstr "" #: iconv/iconvconfig.c:342 locale/programs/localedef.c:290 #, c-format -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: iconv/iconvconfig.c:428 @@ -1353,10 +1361,6 @@ msgstr "" msgid "lstat failed" msgstr "" -#: inet/rcmd.c:483 -msgid "not regular file" -msgstr "" - #: inet/rcmd.c:488 msgid "cannot open" msgstr "" @@ -1408,155 +1412,155 @@ msgstr "" msgid "character map file `%s' not found" msgstr "" -#: locale/programs/charmap.c:195 +#: locale/programs/charmap.c:194 #, c-format msgid "default character map file `%s' not found" msgstr "" -#: locale/programs/charmap.c:258 +#: locale/programs/charmap.c:257 #, c-format msgid "" "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "" -#: locale/programs/charmap.c:337 +#: locale/programs/charmap.c:336 #, c-format msgid "%s: must be greater than \n" msgstr "" -#: locale/programs/charmap.c:357 locale/programs/charmap.c:374 +#: locale/programs/charmap.c:356 locale/programs/charmap.c:373 #: locale/programs/repertoire.c:174 #, c-format msgid "syntax error in prolog: %s" msgstr "" -#: locale/programs/charmap.c:358 +#: locale/programs/charmap.c:357 msgid "invalid definition" msgstr "" -#: locale/programs/charmap.c:375 locale/programs/locfile.c:125 +#: locale/programs/charmap.c:374 locale/programs/locfile.c:125 #: locale/programs/locfile.c:152 locale/programs/repertoire.c:175 msgid "bad argument" msgstr "" -#: locale/programs/charmap.c:403 +#: locale/programs/charmap.c:402 #, c-format msgid "duplicate definition of <%s>" msgstr "" -#: locale/programs/charmap.c:410 +#: locale/programs/charmap.c:409 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "" -#: locale/programs/charmap.c:422 +#: locale/programs/charmap.c:421 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "" -#: locale/programs/charmap.c:445 locale/programs/repertoire.c:183 +#: locale/programs/charmap.c:444 locale/programs/repertoire.c:183 #, c-format msgid "argument to <%s> must be a single character" msgstr "" -#: locale/programs/charmap.c:471 +#: locale/programs/charmap.c:470 msgid "character sets with locking states are not supported" msgstr "" -#: locale/programs/charmap.c:498 locale/programs/charmap.c:552 -#: locale/programs/charmap.c:584 locale/programs/charmap.c:678 -#: locale/programs/charmap.c:733 locale/programs/charmap.c:774 -#: locale/programs/charmap.c:815 +#: locale/programs/charmap.c:497 locale/programs/charmap.c:551 +#: locale/programs/charmap.c:583 locale/programs/charmap.c:677 +#: locale/programs/charmap.c:732 locale/programs/charmap.c:773 +#: locale/programs/charmap.c:814 #, c-format msgid "syntax error in %s definition: %s" msgstr "" -#: locale/programs/charmap.c:499 locale/programs/charmap.c:679 -#: locale/programs/charmap.c:775 locale/programs/repertoire.c:230 +#: locale/programs/charmap.c:498 locale/programs/charmap.c:678 +#: locale/programs/charmap.c:774 locale/programs/repertoire.c:230 msgid "no symbolic name given" msgstr "" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:552 msgid "invalid encoding given" msgstr "" -#: locale/programs/charmap.c:562 +#: locale/programs/charmap.c:561 msgid "too few bytes in character encoding" msgstr "" -#: locale/programs/charmap.c:564 +#: locale/programs/charmap.c:563 msgid "too many bytes in character encoding" msgstr "" -#: locale/programs/charmap.c:586 locale/programs/charmap.c:734 -#: locale/programs/charmap.c:817 locale/programs/repertoire.c:296 +#: locale/programs/charmap.c:585 locale/programs/charmap.c:733 +#: locale/programs/charmap.c:816 locale/programs/repertoire.c:296 msgid "no symbolic name given for end of range" msgstr "" -#: locale/programs/charmap.c:610 locale/programs/locfile.c:817 +#: locale/programs/charmap.c:609 locale/programs/locfile.c:818 #: locale/programs/repertoire.c:313 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "" -#: locale/programs/charmap.c:643 +#: locale/programs/charmap.c:642 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "" -#: locale/programs/charmap.c:651 locale/programs/charmap.c:714 +#: locale/programs/charmap.c:650 locale/programs/charmap.c:713 #, c-format msgid "value for %s must be an integer" msgstr "" -#: locale/programs/charmap.c:842 +#: locale/programs/charmap.c:841 #, c-format msgid "%s: error in state machine" msgstr "" -#: locale/programs/charmap.c:850 locale/programs/ld-address.c:610 -#: locale/programs/ld-collate.c:2650 locale/programs/ld-collate.c:3818 -#: locale/programs/ld-ctype.c:2224 locale/programs/ld-ctype.c:2993 +#: locale/programs/charmap.c:849 locale/programs/ld-address.c:615 +#: locale/programs/ld-collate.c:2650 locale/programs/ld-collate.c:3820 +#: locale/programs/ld-ctype.c:2224 locale/programs/ld-ctype.c:2996 #: locale/programs/ld-identification.c:467 #: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 #: locale/programs/ld-monetary.c:956 locale/programs/ld-name.c:322 -#: locale/programs/ld-numeric.c:390 locale/programs/ld-paper.c:256 -#: locale/programs/ld-telephone.c:328 locale/programs/ld-time.c:1218 -#: locale/programs/locfile.c:824 locale/programs/repertoire.c:324 +#: locale/programs/ld-numeric.c:383 locale/programs/ld-paper.c:256 +#: locale/programs/ld-telephone.c:328 locale/programs/ld-time.c:1236 +#: locale/programs/locfile.c:825 locale/programs/repertoire.c:324 #, c-format msgid "%s: premature end of file" msgstr "" -#: locale/programs/charmap.c:869 locale/programs/charmap.c:880 +#: locale/programs/charmap.c:868 locale/programs/charmap.c:879 #, c-format msgid "unknown character `%s'" msgstr "" -#: locale/programs/charmap.c:888 +#: locale/programs/charmap.c:887 #, c-format msgid "" "number of bytes for byte sequence of beginning and end of range not the " "same: %d vs %d" msgstr "" -#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:2930 +#: locale/programs/charmap.c:992 locale/programs/ld-collate.c:2933 #: locale/programs/repertoire.c:419 msgid "invalid names for character range" msgstr "" -#: locale/programs/charmap.c:1005 locale/programs/repertoire.c:431 +#: locale/programs/charmap.c:1004 locale/programs/repertoire.c:431 msgid "hexadecimal range format should use only capital characters" msgstr "" -#: locale/programs/charmap.c:1023 +#: locale/programs/charmap.c:1022 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "" -#: locale/programs/charmap.c:1029 +#: locale/programs/charmap.c:1028 msgid "upper limit in range is not higher then lower limit" msgstr "" -#: locale/programs/charmap.c:1087 +#: locale/programs/charmap.c:1086 msgid "resulting bytes for range not representable." msgstr "" @@ -1571,9 +1575,9 @@ msgid "No definition for %s category fou msgstr "" #: locale/programs/ld-address.c:143 locale/programs/ld-address.c:181 -#: locale/programs/ld-address.c:199 locale/programs/ld-address.c:226 -#: locale/programs/ld-address.c:295 locale/programs/ld-address.c:314 -#: locale/programs/ld-address.c:327 locale/programs/ld-identification.c:145 +#: locale/programs/ld-address.c:199 locale/programs/ld-address.c:228 +#: locale/programs/ld-address.c:300 locale/programs/ld-address.c:319 +#: locale/programs/ld-address.c:332 locale/programs/ld-identification.c:145 #: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:204 #: locale/programs/ld-monetary.c:248 locale/programs/ld-monetary.c:264 #: locale/programs/ld-monetary.c:276 locale/programs/ld-name.c:104 @@ -1587,7 +1591,7 @@ msgid "%s: field `%s' not defined" msgstr "" #: locale/programs/ld-address.c:155 locale/programs/ld-address.c:207 -#: locale/programs/ld-address.c:233 locale/programs/ld-address.c:270 +#: locale/programs/ld-address.c:237 locale/programs/ld-address.c:275 #: locale/programs/ld-name.c:116 locale/programs/ld-telephone.c:116 #, c-format msgid "%s: field `%s' must not be empty" @@ -1603,81 +1607,81 @@ msgstr "" msgid "%s: terminology language code `%s' not defined" msgstr "" -#: locale/programs/ld-address.c:238 +#: locale/programs/ld-address.c:243 #, c-format msgid "%s: field `%s' must not be defined" msgstr "" -#: locale/programs/ld-address.c:252 locale/programs/ld-address.c:281 +#: locale/programs/ld-address.c:257 locale/programs/ld-address.c:286 #, c-format msgid "%s: language abbreviation `%s' not defined" msgstr "" -#: locale/programs/ld-address.c:259 locale/programs/ld-address.c:287 -#: locale/programs/ld-address.c:321 locale/programs/ld-address.c:333 +#: locale/programs/ld-address.c:264 locale/programs/ld-address.c:292 +#: locale/programs/ld-address.c:326 locale/programs/ld-address.c:338 #, c-format msgid "%s: `%s' value does not match `%s' value" msgstr "" -#: locale/programs/ld-address.c:306 +#: locale/programs/ld-address.c:311 #, c-format msgid "%s: numeric country code `%d' not valid" msgstr "" -#: locale/programs/ld-address.c:502 locale/programs/ld-address.c:539 -#: locale/programs/ld-address.c:577 locale/programs/ld-ctype.c:2600 +#: locale/programs/ld-address.c:507 locale/programs/ld-address.c:544 +#: locale/programs/ld-address.c:582 locale/programs/ld-ctype.c:2603 #: locale/programs/ld-identification.c:363 #: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 #: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 #: locale/programs/ld-monetary.c:774 locale/programs/ld-name.c:279 #: locale/programs/ld-numeric.c:262 locale/programs/ld-paper.c:223 -#: locale/programs/ld-telephone.c:287 locale/programs/ld-time.c:1107 -#: locale/programs/ld-time.c:1149 +#: locale/programs/ld-telephone.c:287 locale/programs/ld-time.c:1125 +#: locale/programs/ld-time.c:1167 #, c-format msgid "%s: field `%s' declared more than once" msgstr "" -#: locale/programs/ld-address.c:506 locale/programs/ld-address.c:544 +#: locale/programs/ld-address.c:511 locale/programs/ld-address.c:549 #: locale/programs/ld-identification.c:367 locale/programs/ld-messages.c:310 #: locale/programs/ld-monetary.c:702 locale/programs/ld-monetary.c:737 #: locale/programs/ld-name.c:283 locale/programs/ld-numeric.c:266 -#: locale/programs/ld-telephone.c:291 locale/programs/ld-time.c:1001 -#: locale/programs/ld-time.c:1070 locale/programs/ld-time.c:1112 +#: locale/programs/ld-telephone.c:291 locale/programs/ld-time.c:1019 +#: locale/programs/ld-time.c:1088 locale/programs/ld-time.c:1130 #, c-format msgid "%s: unknown character in field `%s'" msgstr "" -#: locale/programs/ld-address.c:591 locale/programs/ld-collate.c:3800 -#: locale/programs/ld-ctype.c:2973 locale/programs/ld-identification.c:448 +#: locale/programs/ld-address.c:596 locale/programs/ld-collate.c:3802 +#: locale/programs/ld-ctype.c:2976 locale/programs/ld-identification.c:448 #: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 #: locale/programs/ld-monetary.c:938 locale/programs/ld-name.c:304 -#: locale/programs/ld-numeric.c:372 locale/programs/ld-paper.c:238 -#: locale/programs/ld-telephone.c:310 locale/programs/ld-time.c:1200 +#: locale/programs/ld-numeric.c:365 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:310 locale/programs/ld-time.c:1218 #, c-format msgid "%s: incomplete `END' line" msgstr "" -#: locale/programs/ld-address.c:594 locale/programs/ld-collate.c:2653 -#: locale/programs/ld-collate.c:3802 locale/programs/ld-ctype.c:2227 -#: locale/programs/ld-ctype.c:2976 locale/programs/ld-identification.c:451 +#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:2653 +#: locale/programs/ld-collate.c:3804 locale/programs/ld-ctype.c:2227 +#: locale/programs/ld-ctype.c:2979 locale/programs/ld-identification.c:451 #: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 #: locale/programs/ld-monetary.c:940 locale/programs/ld-name.c:306 -#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1202 +#: locale/programs/ld-numeric.c:367 locale/programs/ld-paper.c:240 +#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1220 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "" -#: locale/programs/ld-address.c:601 locale/programs/ld-collate.c:521 +#: locale/programs/ld-address.c:606 locale/programs/ld-collate.c:521 #: locale/programs/ld-collate.c:573 locale/programs/ld-collate.c:869 #: locale/programs/ld-collate.c:882 locale/programs/ld-collate.c:2640 -#: locale/programs/ld-collate.c:3809 locale/programs/ld-ctype.c:1955 -#: locale/programs/ld-ctype.c:2214 locale/programs/ld-ctype.c:2798 -#: locale/programs/ld-ctype.c:2984 locale/programs/ld-identification.c:458 +#: locale/programs/ld-collate.c:3811 locale/programs/ld-ctype.c:1955 +#: locale/programs/ld-ctype.c:2214 locale/programs/ld-ctype.c:2801 +#: locale/programs/ld-ctype.c:2987 locale/programs/ld-identification.c:458 #: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 #: locale/programs/ld-monetary.c:947 locale/programs/ld-name.c:313 -#: locale/programs/ld-numeric.c:381 locale/programs/ld-paper.c:247 -#: locale/programs/ld-telephone.c:319 locale/programs/ld-time.c:1209 +#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:247 +#: locale/programs/ld-telephone.c:319 locale/programs/ld-time.c:1227 #, c-format msgid "%s: syntax error" msgstr "" @@ -1774,10 +1778,10 @@ msgstr "" #: locale/programs/ld-collate.c:1297 locale/programs/ld-ctype.c:1475 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" -#: locale/programs/ld-collate.c:1346 locale/programs/ld-collate.c:3737 +#: locale/programs/ld-collate.c:1346 locale/programs/ld-collate.c:3739 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "" @@ -1818,112 +1822,112 @@ msgstr "" msgid "too many errors; giving up" msgstr "" -#: locale/programs/ld-collate.c:2735 +#: locale/programs/ld-collate.c:2738 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "" -#: locale/programs/ld-collate.c:2771 +#: locale/programs/ld-collate.c:2774 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "" -#: locale/programs/ld-collate.c:2910 +#: locale/programs/ld-collate.c:2913 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "" -#: locale/programs/ld-collate.c:3042 +#: locale/programs/ld-collate.c:3045 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "" -#: locale/programs/ld-collate.c:3055 +#: locale/programs/ld-collate.c:3058 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "" -#: locale/programs/ld-collate.c:3065 +#: locale/programs/ld-collate.c:3068 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "" -#: locale/programs/ld-collate.c:3074 +#: locale/programs/ld-collate.c:3077 msgid "error while adding equivalent collating symbol" msgstr "" -#: locale/programs/ld-collate.c:3104 +#: locale/programs/ld-collate.c:3107 #, c-format msgid "duplicate definition of script `%s'" msgstr "" -#: locale/programs/ld-collate.c:3152 +#: locale/programs/ld-collate.c:3155 #, c-format msgid "%s: unknown section name `%s'" msgstr "" -#: locale/programs/ld-collate.c:3180 +#: locale/programs/ld-collate.c:3183 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "" -#: locale/programs/ld-collate.c:3205 +#: locale/programs/ld-collate.c:3208 #, c-format msgid "%s: invalid number of sorting rules" msgstr "" -#: locale/programs/ld-collate.c:3232 +#: locale/programs/ld-collate.c:3235 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "" -#: locale/programs/ld-collate.c:3286 locale/programs/ld-collate.c:3414 -#: locale/programs/ld-collate.c:3778 +#: locale/programs/ld-collate.c:3289 locale/programs/ld-collate.c:3417 +#: locale/programs/ld-collate.c:3780 #, c-format msgid "%s: missing `order_end' keyword" msgstr "" -#: locale/programs/ld-collate.c:3347 +#: locale/programs/ld-collate.c:3350 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "" -#: locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3368 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "" -#: locale/programs/ld-collate.c:3376 +#: locale/programs/ld-collate.c:3379 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "" -#: locale/programs/ld-collate.c:3428 locale/programs/ld-collate.c:3790 +#: locale/programs/ld-collate.c:3431 locale/programs/ld-collate.c:3792 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "" -#: locale/programs/ld-collate.c:3462 locale/programs/ld-collate.c:3662 +#: locale/programs/ld-collate.c:3465 locale/programs/ld-collate.c:3664 #, c-format msgid "%s: section `%.*s' not known" msgstr "" -#: locale/programs/ld-collate.c:3527 +#: locale/programs/ld-collate.c:3530 #, c-format msgid "%s: bad symbol <%.*s>" msgstr "" -#: locale/programs/ld-collate.c:3725 +#: locale/programs/ld-collate.c:3727 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "" -#: locale/programs/ld-collate.c:3774 +#: locale/programs/ld-collate.c:3776 #, c-format msgid "%s: empty category description not allowed" msgstr "" -#: locale/programs/ld-collate.c:3793 +#: locale/programs/ld-collate.c:3795 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "" @@ -2014,8 +2018,8 @@ msgid "implementation limit: no more tha msgstr "" #: locale/programs/ld-ctype.c:1546 locale/programs/ld-ctype.c:1671 -#: locale/programs/ld-ctype.c:1777 locale/programs/ld-ctype.c:2463 -#: locale/programs/ld-ctype.c:3459 +#: locale/programs/ld-ctype.c:1777 locale/programs/ld-ctype.c:2466 +#: locale/programs/ld-ctype.c:3462 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "" @@ -2042,114 +2046,114 @@ msgstr "" msgid "syntax error" msgstr "" -#: locale/programs/ld-ctype.c:2295 +#: locale/programs/ld-ctype.c:2298 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "" -#: locale/programs/ld-ctype.c:2310 +#: locale/programs/ld-ctype.c:2313 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "" -#: locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-ctype.c:2488 msgid "ellipsis range must be marked by two operands of same type" msgstr "" -#: locale/programs/ld-ctype.c:2494 +#: locale/programs/ld-ctype.c:2497 msgid "" "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "" -#: locale/programs/ld-ctype.c:2509 +#: locale/programs/ld-ctype.c:2512 msgid "" "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "" -#: locale/programs/ld-ctype.c:2523 +#: locale/programs/ld-ctype.c:2526 msgid "" "with character code range values one must use the absolute ellipsis `...'" msgstr "" -#: locale/programs/ld-ctype.c:2674 +#: locale/programs/ld-ctype.c:2677 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "" -#: locale/programs/ld-ctype.c:2760 locale/programs/ld-ctype.c:2904 +#: locale/programs/ld-ctype.c:2763 locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "" -#: locale/programs/ld-ctype.c:2855 +#: locale/programs/ld-ctype.c:2858 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "" -#: locale/programs/ld-ctype.c:2860 +#: locale/programs/ld-ctype.c:2863 msgid "previous definition was here" msgstr "" -#: locale/programs/ld-ctype.c:2882 +#: locale/programs/ld-ctype.c:2885 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "" -#: locale/programs/ld-ctype.c:3035 +#: locale/programs/ld-ctype.c:3038 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "" -#: locale/programs/ld-ctype.c:3040 locale/programs/ld-ctype.c:3124 -#: locale/programs/ld-ctype.c:3144 locale/programs/ld-ctype.c:3165 -#: locale/programs/ld-ctype.c:3186 locale/programs/ld-ctype.c:3207 -#: locale/programs/ld-ctype.c:3228 locale/programs/ld-ctype.c:3268 -#: locale/programs/ld-ctype.c:3289 locale/programs/ld-ctype.c:3356 +#: locale/programs/ld-ctype.c:3043 locale/programs/ld-ctype.c:3127 +#: locale/programs/ld-ctype.c:3147 locale/programs/ld-ctype.c:3168 +#: locale/programs/ld-ctype.c:3189 locale/programs/ld-ctype.c:3210 +#: locale/programs/ld-ctype.c:3231 locale/programs/ld-ctype.c:3271 +#: locale/programs/ld-ctype.c:3292 locale/programs/ld-ctype.c:3359 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "" -#: locale/programs/ld-ctype.c:3119 locale/programs/ld-ctype.c:3139 -#: locale/programs/ld-ctype.c:3181 locale/programs/ld-ctype.c:3202 -#: locale/programs/ld-ctype.c:3223 locale/programs/ld-ctype.c:3263 -#: locale/programs/ld-ctype.c:3284 locale/programs/ld-ctype.c:3351 -#: locale/programs/ld-ctype.c:3393 locale/programs/ld-ctype.c:3418 +#: locale/programs/ld-ctype.c:3122 locale/programs/ld-ctype.c:3142 +#: locale/programs/ld-ctype.c:3184 locale/programs/ld-ctype.c:3205 +#: locale/programs/ld-ctype.c:3226 locale/programs/ld-ctype.c:3266 +#: locale/programs/ld-ctype.c:3287 locale/programs/ld-ctype.c:3354 +#: locale/programs/ld-ctype.c:3396 locale/programs/ld-ctype.c:3421 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "" -#: locale/programs/ld-ctype.c:3160 +#: locale/programs/ld-ctype.c:3163 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "" -#: locale/programs/ld-ctype.c:3400 locale/programs/ld-ctype.c:3425 +#: locale/programs/ld-ctype.c:3403 locale/programs/ld-ctype.c:3428 #, c-format msgid "" "%s: character `%s' needed as default value not representable with one byte" msgstr "" -#: locale/programs/ld-ctype.c:3480 +#: locale/programs/ld-ctype.c:3483 #, c-format msgid "no output digits defined and none of the standard names in the charmap" msgstr "" -#: locale/programs/ld-ctype.c:3771 +#: locale/programs/ld-ctype.c:3774 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "" -#: locale/programs/ld-ctype.c:3867 +#: locale/programs/ld-ctype.c:3875 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "" -#: locale/programs/ld-ctype.c:3936 +#: locale/programs/ld-ctype.c:3944 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "" -#: locale/programs/ld-ctype.c:4069 +#: locale/programs/ld-ctype.c:4077 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "" @@ -2216,7 +2220,7 @@ msgstr "" msgid "%s: `-1' must be last entry in `%s' field" msgstr "" -#: locale/programs/ld-monetary.c:863 locale/programs/ld-numeric.c:338 +#: locale/programs/ld-monetary.c:863 locale/programs/ld-numeric.c:334 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "" @@ -2292,31 +2296,31 @@ msgstr "" msgid "%s: missing era format in string %Zd in `era' field" msgstr "" -#: locale/programs/ld-time.c:484 +#: locale/programs/ld-time.c:496 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "" -#: locale/programs/ld-time.c:492 locale/programs/ld-time.c:500 +#: locale/programs/ld-time.c:504 locale/programs/ld-time.c:512 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "" -#: locale/programs/ld-time.c:508 +#: locale/programs/ld-time.c:520 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "" -#: locale/programs/ld-time.c:985 +#: locale/programs/ld-time.c:1003 #, c-format msgid "%s: too few values for field `%s'" msgstr "" -#: locale/programs/ld-time.c:1030 +#: locale/programs/ld-time.c:1048 msgid "extra trailing semicolon" msgstr "" -#: locale/programs/ld-time.c:1033 +#: locale/programs/ld-time.c:1051 #, c-format msgid "%s: too many values for field `%s'" msgstr "" @@ -2325,36 +2329,36 @@ msgstr "" msgid "trailing garbage at end of line" msgstr "" -#: locale/programs/linereader.c:303 +#: locale/programs/linereader.c:297 msgid "garbage at end of number" msgstr "" -#: locale/programs/linereader.c:415 +#: locale/programs/linereader.c:409 msgid "garbage at end of character code specification" msgstr "" -#: locale/programs/linereader.c:501 +#: locale/programs/linereader.c:495 msgid "unterminated symbolic name" msgstr "" -#: locale/programs/linereader.c:628 +#: locale/programs/linereader.c:622 msgid "illegal escape sequence at end of string" msgstr "" -#: locale/programs/linereader.c:632 locale/programs/linereader.c:860 +#: locale/programs/linereader.c:626 locale/programs/linereader.c:854 msgid "unterminated string" msgstr "" -#: locale/programs/linereader.c:674 +#: locale/programs/linereader.c:668 msgid "non-symbolic character value should not be used" msgstr "" -#: locale/programs/linereader.c:821 +#: locale/programs/linereader.c:815 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "" -#: locale/programs/linereader.c:842 +#: locale/programs/linereader.c:836 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "" @@ -2627,7 +2631,7 @@ msgstr "" #: locale/programs/locarchive.c:783 locale/programs/locarchive.c:798 #: locale/programs/locarchive.c:810 locale/programs/locarchive.c:822 -#: locale/programs/locfile.c:342 +#: locale/programs/locfile.c:343 #, c-format msgid "cannot add to locale archive" msgstr "" @@ -2677,34 +2681,34 @@ msgstr "" msgid "argument to `%s' must be a single character" msgstr "" -#: locale/programs/locfile.c:250 +#: locale/programs/locfile.c:251 msgid "syntax error: not inside a locale definition section" msgstr "" -#: locale/programs/locfile.c:624 +#: locale/programs/locfile.c:625 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "" -#: locale/programs/locfile.c:648 +#: locale/programs/locfile.c:649 #, c-format msgid "failure while writing data for category `%s'" msgstr "" -#: locale/programs/locfile.c:744 +#: locale/programs/locfile.c:745 #, c-format msgid "cannot create output file `%s' for category `%s'" msgstr "" -#: locale/programs/locfile.c:780 +#: locale/programs/locfile.c:781 msgid "expect string argument for `copy'" msgstr "" -#: locale/programs/locfile.c:784 +#: locale/programs/locfile.c:785 msgid "locale name should consist only of portable characters" msgstr "" -#: locale/programs/locfile.c:803 +#: locale/programs/locfile.c:804 msgid "no other keyword shall be specified when `copy' is used" msgstr "" @@ -2720,7 +2724,7 @@ msgstr "" #: locale/programs/repertoire.c:331 #, c-format -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:342 @@ -2880,7 +2884,7 @@ msgstr "" msgid "DATAFILE [OUTFILE]" msgstr "" -#: misc/error.c:131 misc/error.c:159 timezone/zic.c:396 +#: misc/error.c:118 timezone/zic.c:396 msgid "Unknown system error" msgstr "" @@ -2888,197 +2892,197 @@ msgstr "" msgid "unable to free arguments" msgstr "" -#: nis/nis_error.c:29 nis/ypclnt.c:822 nis/ypclnt.c:910 posix/regcomp.c:132 +#: nis/nis_error.h:1 nis/ypclnt.c:822 nis/ypclnt.c:910 posix/regcomp.c:132 #: sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "" -#: nis/nis_error.c:30 +#: nis/nis_error.h:2 msgid "Probable success" msgstr "" -#: nis/nis_error.c:31 +#: nis/nis_error.h:3 msgid "Not found" msgstr "" -#: nis/nis_error.c:32 +#: nis/nis_error.h:4 msgid "Probably not found" msgstr "" -#: nis/nis_error.c:33 +#: nis/nis_error.h:5 msgid "Cache expired" msgstr "" -#: nis/nis_error.c:34 +#: nis/nis_error.h:6 msgid "NIS+ servers unreachable" msgstr "" -#: nis/nis_error.c:35 +#: nis/nis_error.h:7 msgid "Unknown object" msgstr "" -#: nis/nis_error.c:36 +#: nis/nis_error.h:8 msgid "Server busy, try again" msgstr "" -#: nis/nis_error.c:37 +#: nis/nis_error.h:9 msgid "Generic system error" msgstr "" -#: nis/nis_error.c:38 +#: nis/nis_error.h:10 msgid "First/next chain broken" msgstr "" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:867 sysdeps/gnu/errlist.c:157 +#: nis/nis_error.h:11 nis/ypclnt.c:867 sysdeps/gnu/errlist.c:157 msgid "Permission denied" msgstr "" -#: nis/nis_error.c:40 +#: nis/nis_error.h:12 msgid "Not owner" msgstr "" -#: nis/nis_error.c:41 +#: nis/nis_error.h:13 msgid "Name not served by this server" msgstr "" -#: nis/nis_error.c:42 +#: nis/nis_error.h:14 msgid "Server out of memory" msgstr "" -#: nis/nis_error.c:43 +#: nis/nis_error.h:15 msgid "Object with same name exists" msgstr "" -#: nis/nis_error.c:44 +#: nis/nis_error.h:16 msgid "Not master server for this domain" msgstr "" -#: nis/nis_error.c:45 +#: nis/nis_error.h:17 msgid "Invalid object for operation" msgstr "" -#: nis/nis_error.c:46 +#: nis/nis_error.h:18 msgid "Malformed name, or illegal name" msgstr "" -#: nis/nis_error.c:47 +#: nis/nis_error.h:19 msgid "Unable to create callback" msgstr "" -#: nis/nis_error.c:48 +#: nis/nis_error.h:20 msgid "Results sent to callback proc" msgstr "" -#: nis/nis_error.c:49 +#: nis/nis_error.h:21 msgid "Not found, no such name" msgstr "" -#: nis/nis_error.c:50 +#: nis/nis_error.h:22 msgid "Name/entry isn't unique" msgstr "" -#: nis/nis_error.c:51 +#: nis/nis_error.h:23 msgid "Modification failed" msgstr "" -#: nis/nis_error.c:52 +#: nis/nis_error.h:24 msgid "Database for table does not exist" msgstr "" -#: nis/nis_error.c:53 +#: nis/nis_error.h:25 msgid "Entry/table type mismatch" msgstr "" -#: nis/nis_error.c:54 +#: nis/nis_error.h:26 msgid "Link points to illegal name" msgstr "" -#: nis/nis_error.c:55 +#: nis/nis_error.h:27 msgid "Partial success" msgstr "" -#: nis/nis_error.c:56 +#: nis/nis_error.h:28 msgid "Too many attributes" msgstr "" -#: nis/nis_error.c:57 +#: nis/nis_error.h:29 msgid "Error in RPC subsystem" msgstr "" -#: nis/nis_error.c:58 +#: nis/nis_error.h:30 msgid "Missing or malformed attribute" msgstr "" -#: nis/nis_error.c:59 +#: nis/nis_error.h:31 msgid "Named object is not searchable" msgstr "" -#: nis/nis_error.c:60 +#: nis/nis_error.h:32 msgid "Error while talking to callback proc" msgstr "" -#: nis/nis_error.c:61 +#: nis/nis_error.h:33 msgid "Non NIS+ namespace encountered" msgstr "" -#: nis/nis_error.c:62 +#: nis/nis_error.h:34 msgid "Illegal object type for operation" msgstr "" -#: nis/nis_error.c:63 +#: nis/nis_error.h:35 msgid "Passed object is not the same object on server" msgstr "" -#: nis/nis_error.c:64 +#: nis/nis_error.h:36 msgid "Modify operation failed" msgstr "" -#: nis/nis_error.c:65 +#: nis/nis_error.h:37 msgid "Query illegal for named table" msgstr "" -#: nis/nis_error.c:66 +#: nis/nis_error.h:38 msgid "Attempt to remove a non-empty table" msgstr "" -#: nis/nis_error.c:67 +#: nis/nis_error.h:39 msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?" msgstr "" -#: nis/nis_error.c:68 +#: nis/nis_error.h:40 msgid "Full resync required for directory" msgstr "" -#: nis/nis_error.c:69 +#: nis/nis_error.h:41 msgid "NIS+ operation failed" msgstr "" -#: nis/nis_error.c:70 +#: nis/nis_error.h:42 msgid "NIS+ service is unavailable or not installed" msgstr "" -#: nis/nis_error.c:71 +#: nis/nis_error.h:43 msgid "Yes, 42 is the meaning of life" msgstr "" -#: nis/nis_error.c:72 +#: nis/nis_error.h:44 msgid "Unable to authenticate NIS+ server" msgstr "" -#: nis/nis_error.c:73 +#: nis/nis_error.h:45 msgid "Unable to authenticate NIS+ client" msgstr "" -#: nis/nis_error.c:74 +#: nis/nis_error.h:46 msgid "No file space on server" msgstr "" -#: nis/nis_error.c:75 +#: nis/nis_error.h:47 msgid "Unable to create process on server" msgstr "" -#: nis/nis_error.c:76 +#: nis/nis_error.h:48 msgid "Master server busy, full dump rescheduled." msgstr "" @@ -3338,90 +3342,90 @@ msgstr "" msgid "Object #%d:\n" msgstr "" -#: nis/nis_print_group_entry.c:113 +#: nis/nis_print_group_entry.c:117 #, c-format msgid "Group entry for \"%s.%s\" group:\n" msgstr "" -#: nis/nis_print_group_entry.c:121 +#: nis/nis_print_group_entry.c:125 msgid " Explicit members:\n" msgstr "" -#: nis/nis_print_group_entry.c:126 +#: nis/nis_print_group_entry.c:130 msgid " No explicit members\n" msgstr "" -#: nis/nis_print_group_entry.c:129 +#: nis/nis_print_group_entry.c:133 msgid " Implicit members:\n" msgstr "" -#: nis/nis_print_group_entry.c:134 +#: nis/nis_print_group_entry.c:138 msgid " No implicit members\n" msgstr "" -#: nis/nis_print_group_entry.c:137 +#: nis/nis_print_group_entry.c:141 msgid " Recursive members:\n" msgstr "" -#: nis/nis_print_group_entry.c:142 +#: nis/nis_print_group_entry.c:146 msgid " No recursive members\n" msgstr "" -#: nis/nis_print_group_entry.c:145 nis/nis_print_group_entry.c:161 +#: nis/nis_print_group_entry.c:149 nis/nis_print_group_entry.c:165 msgid " Explicit nonmembers:\n" msgstr "" -#: nis/nis_print_group_entry.c:150 +#: nis/nis_print_group_entry.c:154 msgid " No explicit nonmembers\n" msgstr "" -#: nis/nis_print_group_entry.c:153 +#: nis/nis_print_group_entry.c:157 msgid " Implicit nonmembers:\n" msgstr "" -#: nis/nis_print_group_entry.c:158 +#: nis/nis_print_group_entry.c:162 msgid " No implicit nonmembers\n" msgstr "" -#: nis/nis_print_group_entry.c:166 +#: nis/nis_print_group_entry.c:170 msgid " No recursive nonmembers\n" msgstr "" #: nis/nss_nisplus/nisplus-publickey.c:101 -#: nis/nss_nisplus/nisplus-publickey.c:182 +#: nis/nss_nisplus/nisplus-publickey.c:183 #, c-format msgid "DES entry for netname %s not unique\n" msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:218 +#: nis/nss_nisplus/nisplus-publickey.c:220 #, c-format msgid "netname2user: missing group id list in `%s'." msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:296 #: nis/nss_nisplus/nisplus-publickey.c:302 -#: nis/nss_nisplus/nisplus-publickey.c:367 -#: nis/nss_nisplus/nisplus-publickey.c:376 +#: nis/nss_nisplus/nisplus-publickey.c:308 +#: nis/nss_nisplus/nisplus-publickey.c:373 +#: nis/nss_nisplus/nisplus-publickey.c:382 #, c-format msgid "netname2user: (nis+ lookup): %s\n" msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:315 +#: nis/nss_nisplus/nisplus-publickey.c:321 #, c-format msgid "netname2user: DES entry for %s in directory %s not unique" msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:333 +#: nis/nss_nisplus/nisplus-publickey.c:339 #, c-format msgid "netname2user: principal name `%s' too long" msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:389 +#: nis/nss_nisplus/nisplus-publickey.c:395 #, c-format msgid "netname2user: LOCAL entry for %s in directory %s not unique" msgstr "" -#: nis/nss_nisplus/nisplus-publickey.c:396 +#: nis/nss_nisplus/nisplus-publickey.c:402 msgid "netname2user: should not have uid 0" msgstr "" @@ -3509,7 +3513,7 @@ msgstr "" msgid "yp_update: cannot convert host to netname\n" msgstr "" -#: nis/ypclnt.c:975 +#: nis/ypclnt.c:981 msgid "yp_update: cannot get server address\n" msgstr "" @@ -3528,217 +3532,217 @@ msgstr "" msgid "add new entry \"%s\" of type %s for %s to cache%s" msgstr "" -#: nscd/cache.c:212 nscd/connections.c:744 +#: nscd/cache.c:233 nscd/connections.c:750 #, c-format msgid "cannot stat() file `%s': %s" msgstr "" -#: nscd/cache.c:241 +#: nscd/cache.c:262 #, c-format msgid "pruning %s cache; time %ld" msgstr "" -#: nscd/cache.c:268 +#: nscd/cache.c:289 #, c-format msgid "considering %s entry \"%s\", timeout %" msgstr "" -#: nscd/connections.c:463 nscd/connections.c:475 nscd/connections.c:487 -#: nscd/connections.c:506 +#: nscd/connections.c:469 nscd/connections.c:481 nscd/connections.c:493 +#: nscd/connections.c:512 #, c-format msgid "invalid persistent database file \"%s\": %s" msgstr "" -#: nscd/connections.c:477 +#: nscd/connections.c:483 msgid "header size does not match" msgstr "" -#: nscd/connections.c:489 +#: nscd/connections.c:495 msgid "file size does not match" msgstr "" -#: nscd/connections.c:508 +#: nscd/connections.c:514 msgid "verification failed" msgstr "" -#: nscd/connections.c:522 +#: nscd/connections.c:528 #, c-format msgid "" "suggested size of table for database %s larger than the persistent " "database's table" msgstr "" -#: nscd/connections.c:532 nscd/connections.c:613 +#: nscd/connections.c:538 nscd/connections.c:619 #, c-format msgid "cannot create read-only descriptor for \"%s\"; no mmap" msgstr "" -#: nscd/connections.c:592 +#: nscd/connections.c:598 #, c-format msgid "" "database for %s corrupted or simultaneously used; remove %s manually if " "necessary and restart" msgstr "" -#: nscd/connections.c:599 +#: nscd/connections.c:605 #, c-format msgid "cannot create %s; no persistent database used" msgstr "" -#: nscd/connections.c:602 +#: nscd/connections.c:608 #, c-format msgid "cannot create %s; no sharing possible" msgstr "" -#: nscd/connections.c:673 +#: nscd/connections.c:679 #, c-format msgid "cannot write to database file %s: %s" msgstr "" -#: nscd/connections.c:707 +#: nscd/connections.c:713 #, c-format msgid "cannot set socket to close on exec: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:757 +#: nscd/connections.c:763 #, c-format msgid "cannot open socket: %s" msgstr "" -#: nscd/connections.c:774 +#: nscd/connections.c:780 #, c-format msgid "cannot change socket to nonblocking mode: %s" msgstr "" -#: nscd/connections.c:782 +#: nscd/connections.c:788 #, c-format msgid "cannot set socket to close on exec: %s" msgstr "" -#: nscd/connections.c:793 +#: nscd/connections.c:799 #, c-format msgid "cannot enable socket to accept connections: %s" msgstr "" -#: nscd/connections.c:876 +#: nscd/connections.c:892 #, c-format msgid "provide access to FD %d, for %s" msgstr "" -#: nscd/connections.c:888 +#: nscd/connections.c:904 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "" -#: nscd/connections.c:938 nscd/connections.c:991 +#: nscd/connections.c:954 nscd/connections.c:1007 #, c-format msgid "cannot write result: %s" msgstr "" -#: nscd/connections.c:1066 +#: nscd/connections.c:1082 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" -#: nscd/connections.c:1124 nscd/connections.c:1138 +#: nscd/connections.c:1140 nscd/connections.c:1154 #, c-format msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:1178 +#: nscd/connections.c:1194 #, c-format msgid "cannot change to old UID: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:1188 +#: nscd/connections.c:1204 #, c-format msgid "cannot change to old GID: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:1201 +#: nscd/connections.c:1217 #, c-format msgid "cannot change to old working directory: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:1229 +#: nscd/connections.c:1245 #, c-format msgid "re-exec failed: %s; disabling paranoia mode" msgstr "" -#: nscd/connections.c:1238 +#: nscd/connections.c:1254 #, c-format msgid "cannot change current working directory to \"/\": %s" msgstr "" -#: nscd/connections.c:1356 +#: nscd/connections.c:1372 #, c-format msgid "short read while reading request: %s" msgstr "" -#: nscd/connections.c:1388 +#: nscd/connections.c:1404 #, c-format msgid "key length in request too long: %d" msgstr "" -#: nscd/connections.c:1401 +#: nscd/connections.c:1417 #, c-format msgid "short read while reading request key: %s" msgstr "" -#: nscd/connections.c:1410 +#: nscd/connections.c:1426 #, c-format msgid "handle_request: request received (Version = %d) from PID %ld" msgstr "" -#: nscd/connections.c:1415 +#: nscd/connections.c:1431 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "" -#: nscd/connections.c:1770 +#: nscd/connections.c:1792 #, c-format msgid "could only start %d threads; terminating" msgstr "" -#: nscd/connections.c:1818 nscd/connections.c:1819 nscd/connections.c:1836 -#: nscd/connections.c:1845 nscd/connections.c:1858 nscd/connections.c:1864 -#: nscd/connections.c:1871 +#: nscd/connections.c:1840 nscd/connections.c:1841 nscd/connections.c:1858 +#: nscd/connections.c:1867 nscd/connections.c:1885 nscd/connections.c:1896 +#: nscd/connections.c:1907 #, c-format msgid "Failed to run nscd as user '%s'" msgstr "" -#: nscd/connections.c:1837 +#: nscd/connections.c:1859 #, c-format msgid "initial getgrouplist failed" msgstr "" -#: nscd/connections.c:1846 +#: nscd/connections.c:1868 #, c-format msgid "getgrouplist failed" msgstr "" -#: nscd/connections.c:1859 +#: nscd/connections.c:1886 #, c-format msgid "setgroups failed" msgstr "" -#: nscd/grpcache.c:396 nscd/hstcache.c:411 nscd/initgrcache.c:408 -#: nscd/pwdcache.c:392 +#: nscd/grpcache.c:400 nscd/hstcache.c:411 nscd/initgrcache.c:411 +#: nscd/pwdcache.c:395 #, c-format msgid "short write in %s: %s" msgstr "" -#: nscd/grpcache.c:439 nscd/initgrcache.c:77 +#: nscd/grpcache.c:443 nscd/initgrcache.c:77 #, c-format msgid "Haven't found \"%s\" in group cache!" msgstr "" -#: nscd/grpcache.c:441 nscd/initgrcache.c:79 +#: nscd/grpcache.c:445 nscd/initgrcache.c:79 #, c-format msgid "Reloading \"%s\" in group cache!" msgstr "" -#: nscd/grpcache.c:532 +#: nscd/grpcache.c:536 #, c-format msgid "Invalid numeric gid \"%s\"!" msgstr "" @@ -3831,7 +3835,22 @@ msgstr "" msgid "Only root is allowed to use this option!" msgstr "" -#: nscd/nscd.c:368 +#: nscd/nscd.c:359 nscd/nscd_stat.c:191 +#, c-format +msgid "write incomplete" +msgstr "" + +#: nscd/nscd.c:370 +#, c-format +msgid "cannot read invalidate ACK" +msgstr "" + +#: nscd/nscd.c:376 +#, c-format +msgid "invalidation failed" +msgstr "" + +#: nscd/nscd.c:386 #, c-format msgid "secure services not implemented anymore" msgstr "" @@ -3866,17 +3885,17 @@ msgstr "" msgid "Must specify value for restart-interval option" msgstr "" -#: nscd/nscd_conf.c:260 +#: nscd/nscd_conf.c:271 #, c-format msgid "Unknown option: %s %s %s" msgstr "" -#: nscd/nscd_conf.c:273 +#: nscd/nscd_conf.c:284 #, c-format msgid "cannot get current working directory: %s; disabling paranoia mode" msgstr "" -#: nscd/nscd_conf.c:293 +#: nscd/nscd_conf.c:304 #, c-format msgid "maximum file size for %s database too small" msgstr "" @@ -3904,11 +3923,6 @@ msgstr "" msgid "nscd not running!\n" msgstr "" -#: nscd/nscd_stat.c:191 -#, c-format -msgid "write incomplete" -msgstr "" - #: nscd/nscd_stat.c:203 #, c-format msgid "cannot read statistics data" @@ -3980,62 +3994,97 @@ msgid "" "%15s check /etc/%s for changes\n" msgstr "" -#: nscd/pwdcache.c:435 +#: nscd/pwdcache.c:438 #, c-format msgid "Haven't found \"%s\" in password cache!" msgstr "" -#: nscd/pwdcache.c:437 +#: nscd/pwdcache.c:440 #, c-format msgid "Reloading \"%s\" in password cache!" msgstr "" -#: nscd/pwdcache.c:529 +#: nscd/pwdcache.c:532 #, c-format msgid "Invalid numeric uid \"%s\"!" msgstr "" -#: nscd/selinux.c:150 +#: nscd/selinux.c:151 #, c-format msgid "Failed opening connection to the audit subsystem: %m" msgstr "" -#: nscd/selinux.c:162 +#: nscd/selinux.c:172 +msgid "Failed to set keep-capabilities" +msgstr "" + +#: nscd/selinux.c:173 nscd/selinux.c:232 +#, c-format +msgid "prctl(KEEPCAPS) failed" +msgstr "" + +#: nscd/selinux.c:187 +msgid "Failed to initialize drop of capabilities" +msgstr "" + +#: nscd/selinux.c:188 +#, c-format +msgid "cap_init failed" +msgstr "" + +#: nscd/selinux.c:205 +msgid "Failed to drop capabilities\n" +msgstr "" + +#: nscd/selinux.c:206 nscd/selinux.c:223 +#, c-format +msgid "cap_set_proc failed" +msgstr "" + +#: nscd/selinux.c:222 +msgid "Failed to drop capabilities" +msgstr "" + +#: nscd/selinux.c:231 +msgid "Failed to unset keep-capabilities" +msgstr "" + +#: nscd/selinux.c:247 msgid "Failed to determine if kernel supports SELinux" msgstr "" -#: nscd/selinux.c:177 +#: nscd/selinux.c:262 #, c-format msgid "Failed to start AVC thread" msgstr "" -#: nscd/selinux.c:199 +#: nscd/selinux.c:284 #, c-format msgid "Failed to create AVC lock" msgstr "" -#: nscd/selinux.c:239 +#: nscd/selinux.c:324 #, c-format msgid "Failed to start AVC" msgstr "" -#: nscd/selinux.c:241 +#: nscd/selinux.c:326 msgid "Access Vector Cache (AVC) started" msgstr "" -#: nscd/selinux.c:262 +#: nscd/selinux.c:347 msgid "Error getting context of socket peer" msgstr "" -#: nscd/selinux.c:267 +#: nscd/selinux.c:352 msgid "Error getting context of nscd" msgstr "" -#: nscd/selinux.c:273 +#: nscd/selinux.c:358 msgid "Error getting sid from context" msgstr "" -#: nscd/selinux.c:305 +#: nscd/selinux.c:390 #, c-format msgid "" "\n" @@ -4151,21 +4200,21 @@ msgstr "" msgid " %s -a [pathname]\n" msgstr "" -#: posix/getconf.c:1061 +#: posix/getconf.c:1062 #, c-format msgid "unknown specification \"%s\"" msgstr "" -#: posix/getconf.c:1089 +#: posix/getconf.c:1090 #, c-format msgid "Couldn't execute %s" msgstr "" -#: posix/getconf.c:1129 posix/getconf.c:1145 +#: posix/getconf.c:1130 posix/getconf.c:1146 msgid "undefined" msgstr "" -#: posix/getconf.c:1167 +#: posix/getconf.c:1168 #, c-format msgid "Unrecognized variable `%s'" msgstr "" @@ -4295,7 +4344,7 @@ msgstr "" msgid "No previous regular expression" msgstr "" -#: posix/wordexp.c:1799 +#: posix/wordexp.c:1798 msgid "parameter null or not set" msgstr "" @@ -4327,42 +4376,27 @@ msgstr "" msgid "Unknown resolver error" msgstr "" -#: resolv/res_hconf.c:149 -#, c-format -msgid "%s: line %d: expected service, found `%s'\n" -msgstr "" - -#: resolv/res_hconf.c:162 -#, c-format -msgid "%s: line %d: cannot specify more than %d services" -msgstr "" - -#: resolv/res_hconf.c:185 -#, c-format -msgid "%s: line %d: list delimiter not followed by keyword" -msgstr "" - -#: resolv/res_hconf.c:221 +#: resolv/res_hconf.c:124 #, c-format msgid "%s: line %d: cannot specify more than %d trim domains" msgstr "" -#: resolv/res_hconf.c:242 +#: resolv/res_hconf.c:145 #, c-format msgid "%s: line %d: list delimiter not followed by domain" msgstr "" -#: resolv/res_hconf.c:301 +#: resolv/res_hconf.c:204 #, c-format msgid "%s: line %d: expected `on' or `off', found `%s'\n" msgstr "" -#: resolv/res_hconf.c:344 +#: resolv/res_hconf.c:247 #, c-format msgid "%s: line %d: bad command `%s'\n" msgstr "" -#: resolv/res_hconf.c:369 +#: resolv/res_hconf.c:282 #, c-format msgid "%s: line %d: ignoring trailing garbage `%s'\n" msgstr "" @@ -4376,7 +4410,7 @@ msgstr "" msgid "Unknown signal" msgstr "" -#: string/_strerror.c:44 sysdeps/mach/_strerror.c:87 +#: string/_strerror.c:45 sysdeps/mach/_strerror.c:87 msgid "Unknown error " msgstr "" @@ -4607,78 +4641,78 @@ msgstr "" msgid "illegal nettype :`%s'\n" msgstr "" -#: sunrpc/rpc_main.c:1100 +#: sunrpc/rpc_main.c:1122 #, c-format msgid "rpcgen: too many defines\n" msgstr "" -#: sunrpc/rpc_main.c:1112 +#: sunrpc/rpc_main.c:1134 #, c-format msgid "rpcgen: arglist coding error\n" msgstr "" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. -#: sunrpc/rpc_main.c:1145 +#: sunrpc/rpc_main.c:1167 #, c-format msgid "file `%s' already exists and may be overwritten\n" msgstr "" -#: sunrpc/rpc_main.c:1190 +#: sunrpc/rpc_main.c:1212 #, c-format msgid "Cannot specify more than one input file!\n" msgstr "" -#: sunrpc/rpc_main.c:1360 +#: sunrpc/rpc_main.c:1382 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "" -#: sunrpc/rpc_main.c:1369 +#: sunrpc/rpc_main.c:1391 #, c-format msgid "Cannot use netid flag with inetd flag!\n" msgstr "" -#: sunrpc/rpc_main.c:1381 +#: sunrpc/rpc_main.c:1403 msgid "Cannot use netid flag without TIRPC!\n" msgstr "" -#: sunrpc/rpc_main.c:1388 +#: sunrpc/rpc_main.c:1410 msgid "Cannot use table flags with newstyle!\n" msgstr "" -#: sunrpc/rpc_main.c:1407 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\"infile\" is required for template generation flags.\n" msgstr "" -#: sunrpc/rpc_main.c:1412 +#: sunrpc/rpc_main.c:1434 #, c-format msgid "Cannot have more than one file generation flag!\n" msgstr "" -#: sunrpc/rpc_main.c:1421 +#: sunrpc/rpc_main.c:1443 #, c-format msgid "usage: %s infile\n" msgstr "" -#: sunrpc/rpc_main.c:1422 +#: sunrpc/rpc_main.c:1444 #, c-format msgid "" "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] " "infile\n" msgstr "" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1446 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "" -#: sunrpc/rpc_main.c:1426 +#: sunrpc/rpc_main.c:1448 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1449 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "" @@ -4852,23 +4886,23 @@ msgstr "" msgid "enablecache: could not allocate cache" msgstr "" -#: sunrpc/svc_udp.c:488 +#: sunrpc/svc_udp.c:489 msgid "enablecache: could not allocate cache data" msgstr "" -#: sunrpc/svc_udp.c:495 +#: sunrpc/svc_udp.c:497 msgid "enablecache: could not allocate cache fifo" msgstr "" -#: sunrpc/svc_udp.c:531 +#: sunrpc/svc_udp.c:532 msgid "cache_set: victim not found" msgstr "" -#: sunrpc/svc_udp.c:542 +#: sunrpc/svc_udp.c:543 msgid "cache_set: victim alloc failed" msgstr "" -#: sunrpc/svc_udp.c:548 +#: sunrpc/svc_udp.c:550 msgid "cache_set: could not allocate new rpc_buffer" msgstr "" @@ -4896,7 +4930,7 @@ msgstr "" msgid "xdr_string: out of memory\n" msgstr "" -#: sunrpc/xdr_array.c:108 +#: sunrpc/xdr_array.c:106 msgid "xdr_array: out of memory\n" msgstr "" @@ -6012,7 +6046,7 @@ msgid "%s: wild -c argument %s\n" msgstr "" #: timezone/zdump.c:392 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "" #: timezone/zdump.c:415 diff -uprN glibc-2.4/po/nb.po glibc-2.5/po/nb.po --- glibc-2.4/po/nb.po 2004-03-08 08:26:40.000000000 +0000 +++ glibc-2.5/po/nb.po 2006-09-21 04:16:48.000000000 +0000 @@ -264,7 +264,7 @@ msgstr "kan ikke åpne utfil" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konvertering fra «%s» til «%s» er ikke støttet" #: iconv/iconv_prog.c:246 @@ -366,7 +366,7 @@ msgid "Prefix used for all file accesses msgstr "Prefiks brukt for all filaksessering" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "på grunn av advarsler ble ingen utfil opprettet" #: iconv/iconvconfig.c:405 @@ -742,7 +742,7 @@ msgstr "%s: symbolsk område-ellipse må i #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "«%s» og «%.*s» er ulovlige navn for symbolsk område" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1662,7 +1662,7 @@ msgstr "ingen - eller #: locale/programs/repertoire.c:332 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan ikke lese ferdighetskart «%s»" #: locale/programs/repertoire.c:343 @@ -3148,7 +3148,7 @@ msgstr "%s: bruk er %s [ -v ] [ -c grens #: timezone/zdump.c:268 #, fuzzy -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "%s: Feil ved skriving til standard ut " #: timezone/zic.c:365 @@ -5208,7 +5208,7 @@ msgstr "kan ikke skrive ut resultat: «%s #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/nl.po glibc-2.5/po/nl.po --- glibc-2.4/po/nl.po 2004-08-05 15:44:40.000000000 +0000 +++ glibc-2.5/po/nl.po 2006-09-21 04:16:48.000000000 +0000 @@ -261,7 +261,7 @@ msgstr "kan uitvoerbestand niet openen" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "conversie van `%s' en naar `%s' wordt niet ondersteund" #: iconv/iconv_prog.c:248 @@ -367,7 +367,7 @@ msgid "Prefix used for all file accesses msgstr "Voorvoegsel gebruikt voor alle bestandstoegang" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "geen uitvoerbestand gemaakt omdat waarschuwing is gegeven" #: iconv/iconvconfig.c:405 @@ -742,7 +742,7 @@ msgstr "%s: weglatingsteken van symbolis #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' en `%.*s' zijn geen geldige namen voor een symbolisch bereik" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1659,7 +1659,7 @@ msgid "no or value g msgstr "geen of waarde gegeven" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan nieuwe repertoire afbeelding niet opslaan" #: locale/programs/repertoire.c:343 @@ -3080,7 +3080,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: gebruik is %s [ --version ] [ -v ] [ -c afkapwaarde ] zonenaam ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fout bij schrijven naar standaard uitvoer" #: timezone/zic.c:361 @@ -5117,7 +5117,7 @@ msgstr "kan resultaat niet schrijven: %s #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "fout bij opvragen ID van aanroeper: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/pl.po glibc-2.5/po/pl.po --- glibc-2.4/po/pl.po 2004-08-05 22:50:55.000000000 +0000 +++ glibc-2.5/po/pl.po 2006-09-21 04:16:48.000000000 +0000 @@ -261,7 +261,7 @@ msgstr "nie mo¿na otworzyæ pliku wyj¶cio #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konwersja z `%s' oraz do `%s' nie jest obs³ugiwana" #: iconv/iconv_prog.c:248 @@ -364,7 +364,7 @@ msgid "Prefix used for all file accesses msgstr "Prefiks u¿ywany przy ka¿dym dostêpie do pliku" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nie utworzono pliku wyj¶ciowego, poniewa¿ wyst±pi³y ostrze¿enia" #: iconv/iconvconfig.c:405 @@ -743,7 +743,7 @@ msgstr "%s: wyrzutnia symbolicznego prze #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' i `%.*s' nie s± poprawnymi nazwami dla symbolicznego przedzia³u" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1662,7 +1662,7 @@ msgid "no or value g msgstr "nie podano ¿adnych warto¶ci lub " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nie mo¿na zachowaæ nowej tablicy repertuaru" #: locale/programs/repertoire.c:343 @@ -3086,7 +3086,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: sk³adnia: %s [ --version ] [ -v ] [ -c rok ] nazwa_strefy...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "B³±d podczas pisania na standardowe wyj¶cie" #: timezone/zic.c:361 @@ -5129,7 +5129,7 @@ msgstr "nie mo¿na zapisaæ wyniku: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "b³±d podczas pobierania identyfikatorów wywo³uj±cych: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/pt_BR.po glibc-2.5/po/pt_BR.po --- glibc-2.4/po/pt_BR.po 1999-08-15 15:28:07.000000000 +0000 +++ glibc-2.5/po/pt_BR.po 2006-09-21 04:16:48.000000000 +0000 @@ -323,7 +323,7 @@ msgstr "%s: Erro escrevendo %s\n" #: timezone/zdump.c:266 #, c-format -msgid "%s: Error writing standard output " +msgid "%s: Error writing to standard output " msgstr "%s: Erro escrevendo para saída padrão " #: timezone/zic.c:841 @@ -3642,7 +3642,7 @@ msgid "no other keyword shall be specifi msgstr "nehuma outra palavra-chave deve ser especificada quando `copy' é usado" #: locale/programs/localedef.c:334 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nenhum arquivo de saída foi produzido porque avisos foram emitidos" #: locale/programs/locfile.c:283 locale/programs/locfile.c:301 diff -uprN glibc-2.4/po/ru.po glibc-2.5/po/ru.po --- glibc-2.4/po/ru.po 2005-02-15 10:10:52.000000000 +0000 +++ glibc-2.5/po/ru.po 2006-09-21 04:16:48.000000000 +0000 @@ -259,7 +259,7 @@ msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ×ÙÈÏÄÎÏÊ ÆÁÊÌ #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ ÉÚ `%s' É × `%s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÔÓÑ" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "ðÒÅÆÉËÓ, ÉÓÐÏÌØÚÕÅÍÙÊ ÄÌÑ ÄÏÓÔÕÐÁ ËÏ ×ÓÅÍ ÆÁÊÌÁÍ" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "×ÙÈÏÄÎÏÊ ÆÁÊÌ ÎÅ ÓÏÚÄÁÎ, ÐÏÓËÏÌØËÕ ÂÙÌÉ ÐÒÅÄÕÐÒÅÖÄÅÎÉÑ" #: iconv/iconvconfig.c:405 @@ -736,7 +736,7 @@ msgstr "%s: ÐÏÓÌÅ ÜÌÌÉÐÓÉÓÁ ÓÉÍ×ÏÌØÎÏÇÏ #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' É `%.*s' ÎÅ Ñ×ÌÑÀÔÓÑ ×ÅÒÎÙÍÉ ÉÍÅÎÁÍÉ ÓÉÍ×ÏÌØÎÏÇÏ ÄÉÁÐÏÚÏÎÁ" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1649,7 +1649,7 @@ msgid "no or value g msgstr "ÎÅ ÚÁÄÁÎÏ ÚÎÁÞÅÎÉÅ ÉÌÉ " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3074,7 +3074,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: ÉÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ --version ] [ -v ] [ -c cutoff ] ÉÍÑ-ÚÏÎÙ ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ ÎÁ ÓÔÁÎÄÁÒÔÎÙÊ ×Ù×ÏÄ" #: timezone/zic.c:361 @@ -5112,7 +5112,7 @@ msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ ÒÅÚÕÌØÔÁÔ: % #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "ÏÛÉÂËÁ ÐÒÉ ÐÏÌÕÞÅÎÉÉ ÉÄÅÎÔÉÆÉËÁÔÏÒÁ ×ÙÚÙ×ÁÀÝÅÊ ÓÔÏÒÏÎÙ: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/rw.po glibc-2.5/po/rw.po --- glibc-2.4/po/rw.po 2005-04-28 15:35:34.000000000 +0000 +++ glibc-2.5/po/rw.po 2006-09-21 04:16:48.000000000 +0000 @@ -302,7 +302,7 @@ msgstr "Gufungura Ibisohoka IDOSIYE" #: iconv/iconv_prog.c:243 #, fuzzy, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "Ihindurangero Bivuye Na Kuri OYA" #: iconv/iconv_prog.c:248 @@ -403,7 +403,7 @@ msgstr "kugirango Byose IDOSIYE" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 #, fuzzy -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Oya Ibisohoka IDOSIYE Iburira Byasohowe" #: iconv/iconvconfig.c:405 @@ -825,7 +825,7 @@ msgstr "%s:Urutonde OYA ku" #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, fuzzy, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s'Na." #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1823,7 +1823,7 @@ msgstr "Oya Cyangwa Agaciro" #: locale/programs/repertoire.c:332 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Gishya" #: locale/programs/repertoire.c:343 @@ -3440,7 +3440,7 @@ msgstr "%s:Ikoresha: ni Verisiyo v C" #: timezone/zdump.c:269 #, fuzzy -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Bisanzwe Ibisohoka" #: timezone/zic.c:361 @@ -5785,7 +5785,7 @@ msgstr "Kwandika Igisubizo" #: nscd/connections.c:392 nscd/connections.c:514 #, fuzzy, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "Ikosa ID" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/sk.po glibc-2.5/po/sk.po --- glibc-2.4/po/sk.po 2004-08-05 20:40:55.000000000 +0000 +++ glibc-2.5/po/sk.po 2006-09-21 04:16:48.000000000 +0000 @@ -260,7 +260,7 @@ msgstr "nie je možné otvoriÅ¥ výstupn #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konverzie z `%s' a do `%s' nie sú podporované" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "Predpona použitá pre vÅ¡etky prístupy k súborom" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "výstupný súbor nebol vytvorený kvôli výskytu varovaní" #: iconv/iconvconfig.c:405 @@ -736,7 +736,7 @@ msgstr "%s: pokraÄovanie symbolického #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' a `%.*s' sú neprípustné názvy pre symbolický rozsah" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1653,7 +1653,7 @@ msgid "no or value g msgstr "nezadaná alebo hodnota" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nie je možné uchovaÅ¥ mapu repertoáru" #: locale/programs/repertoire.c:343 @@ -3074,7 +3074,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: použitie je %s [ --version ] [ -v ] [ -c limit ] meno_zóny ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Chyba pri zápise na Å¡tandardný výstup" #: timezone/zic.c:361 @@ -5115,7 +5115,7 @@ msgstr "nie je možné zapísaÅ¥ výsled #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "chyba pri získaní id volajúceho: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/sv.po glibc-2.5/po/sv.po --- glibc-2.4/po/sv.po 2004-08-08 15:31:10.000000000 +0000 +++ glibc-2.5/po/sv.po 2006-09-21 04:16:48.000000000 +0000 @@ -260,7 +260,7 @@ msgstr "kan inte öppna utfil" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konvertering från \"%s\" och till \"%s\" stöds ej" #: iconv/iconv_prog.c:248 @@ -364,7 +364,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix att använda för alla filåtkomster" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "ingen utfil skapad på grund av varningar" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: symboliskt intervall kan int #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "\"%s\" och \"%.*s\" är otillåtna namn för symboliskt intervall" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1658,7 +1658,7 @@ msgid "no or value g msgstr "inget eller värde angivet" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan inte säkra repertoartabell" #: locale/programs/repertoire.c:343 @@ -3079,7 +3079,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: användning är %s [ --version ] [ -v ] [ -c gräns ] zonnamn ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fel vid skrivning till standard ut" #: timezone/zic.c:361 @@ -5114,7 +5114,7 @@ msgstr "kan inte skriva resultat: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "kunde inte hämta anropandes identitet: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/tr.po glibc-2.5/po/tr.po --- glibc-2.4/po/tr.po 2005-02-28 07:11:27.000000000 +0000 +++ glibc-2.5/po/tr.po 2006-09-21 04:16:48.000000000 +0000 @@ -261,7 +261,7 @@ msgstr "çıktı dosyası açılamıyor" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'den ve `%s'e dönüşüm desteklenmiyor" #: iconv/iconv_prog.c:248 @@ -366,7 +366,7 @@ msgid "Prefix used for all file accesses msgstr "Tüm dosya eriÅŸimlerinde kullanılan önek" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "uyarı yayınlandığından üretilen bir çıktı dosyası yok" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: sembolik kapsam elipslerinin #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ve `%.*s' sembolik kapsam için geçerli isimler deÄŸil" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1658,7 +1658,7 @@ msgid "no or value g msgstr " ya da deÄŸeri verilmeliydi" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "yeni repertuvar eÅŸlemin doÄŸruluÄŸundan emin olunamaz " #: locale/programs/repertoire.c:343 @@ -3084,7 +3084,7 @@ msgstr "" "zamanDilimiÄ°smi ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Standart çıktıya yazarken hata" #: timezone/zic.c:361 @@ -5122,7 +5122,7 @@ msgstr "sonuç yazılamıyor: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "çaÄŸrıcı kimliÄŸi alınırken hata: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/po/zh_CN.po glibc-2.5/po/zh_CN.po --- glibc-2.4/po/zh_CN.po 2003-06-10 16:23:00.000000000 +0000 +++ glibc-2.5/po/zh_CN.po 2006-09-21 04:16:48.000000000 +0000 @@ -259,7 +259,7 @@ msgstr "ÎÞ·¨´ò¿ªÊä³öÎļþ" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "²»Ö§³Ö´Ó¡°%s¡±µ½¡°%s¡±µÄת»»" #: iconv/iconv_prog.c:246 @@ -351,7 +351,7 @@ msgid "Prefix used for all file accesses msgstr "ÓÃÓÚËùÓÐÎļþ·ÃÎʵÄǰ׺" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "ÓÉÓÚ³öÏÖ¾¯¸æ¶øδÉú³ÉÊä³öÎļþ" #: iconv/iconvconfig.c:405 @@ -726,7 +726,7 @@ msgstr "" #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1623,7 +1623,7 @@ msgid "no or value g msgstr "¼´Î´¸ø³ö Ҳδ¸ø³ö " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3033,7 +3033,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s£ºÓ÷¨Îª %s [ -v ] [ -c cutoff ] ÇøÓòÃû ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "дÈë±ê×¼Êä³ö³ö´í" #: timezone/zic.c:365 @@ -5054,7 +5054,7 @@ msgstr "ÎÞ·¨Ð´Èë½á¹û£º¡°%s¡±" #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 diff -uprN glibc-2.4/po/zh_TW.po glibc-2.5/po/zh_TW.po --- glibc-2.4/po/zh_TW.po 2005-07-26 04:03:51.000000000 +0000 +++ glibc-2.5/po/zh_TW.po 2006-09-21 04:16:48.000000000 +0000 @@ -262,7 +262,7 @@ msgstr "無法開啟輸出檔" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "ä¸æ”¯æ´å¾ž `%s' 以åŠåˆ° `%s' 的轉æ›" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "使用於所有檔案存å–時的å‰ç½®æ–‡å­—" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "因為發出éŽè­¦å‘Šè¨Šæ¯ï¼Œæ‰€ä»¥æ²’有製造任何輸出檔" #: iconv/iconvconfig.c:405 @@ -737,7 +737,7 @@ msgstr "%s: 符號範åœçš„çœç•¥ä¸å¯ä #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' å’Œ `%.*s' 皆éžç¬¦è™Ÿç¯„åœä¸­é©ç”¨çš„å稱" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1654,7 +1654,7 @@ msgid "no or value g msgstr "沒有給定 或 的值" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "無法儲存新的編碼å°æ˜ æª”" #: locale/programs/repertoire.c:343 @@ -3107,7 +3107,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: 用法是 %s [ --version ] [ -v ] [ -c 切斷 ] 地å€å稱 ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "寫入標準輸出時錯誤" #: timezone/zic.c:361 @@ -5142,7 +5142,7 @@ msgstr "無法寫入çµæžœ: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "å–得呼å«ç¨‹å¼è­˜åˆ¥ç¢¼æ™‚發生錯誤: %s" #: nscd/connections.c:485 diff -uprN glibc-2.4/posix/bits/unistd.h glibc-2.5/posix/bits/unistd.h --- glibc-2.4/posix/bits/unistd.h 2005-08-08 18:58:33.000000000 +0000 +++ glibc-2.5/posix/bits/unistd.h 2006-08-24 06:47:31.000000000 +0000 @@ -1,5 +1,5 @@ /* Checking macros for unistd functions. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -80,16 +80,16 @@ pread64 (int __fd, void *__buf, size_t _ #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K -extern int __readlink_chk (__const char *__restrict __path, - char *__restrict __buf, size_t __len, - size_t __buflen) +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) __THROW __nonnull ((1, 2)) __wur; -extern int __REDIRECT_NTH (__readlink_alias, - (__const char *__restrict __path, - char *__restrict __buf, size_t __len), readlink) +extern ssize_t __REDIRECT_NTH (__readlink_alias, + (__const char *__restrict __path, + char *__restrict __buf, size_t __len), readlink) __nonnull ((1, 2)) __wur; -extern __always_inline __nonnull ((1, 2)) __wur int +extern __always_inline __nonnull ((1, 2)) __wur ssize_t __NTH (readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len)) { @@ -100,6 +100,28 @@ __NTH (readlink (__const char *__restric } #endif +#ifdef __USE_ATFILE +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + __THROW __nonnull ((2, 3)) __wur; +extern ssize_t __REDIRECT_NTH (__readlinkat_alias, + (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len), + readlinkat) + __nonnull ((2, 3)) __wur; + +extern __always_inline __nonnull ((2, 3)) __wur ssize_t +__NTH (readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len)) +{ + if (__bos (__buf) != (size_t) -1 + && (!__builtin_constant_p (__len) || __len > __bos (__buf))) + return __readlinkat_chk (__fd, __path, __buf, __len, __bos (__buf)); + return __readlinkat_alias (__fd, __path, __buf, __len); +} +#endif + extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) __THROW __wur; extern char *__REDIRECT_NTH (__getcwd_alias, @@ -176,7 +198,7 @@ __NTH (ttyname_r (int __fd, char *__buf, } -#if defined __USE_REENTRANT || defined __USE_UNIX98 +#if defined __USE_REENTRANT || defined __USE_POSIX199506 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __nonnull ((1)); extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen), diff -uprN glibc-2.4/posix/bug-regex25.c glibc-2.5/posix/bug-regex25.c --- glibc-2.4/posix/bug-regex25.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/posix/bug-regex25.c 2006-06-04 04:58:35.000000000 +0000 @@ -0,0 +1,57 @@ +/* Test re_search in multibyte locale other than UTF-8. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +const char *str1 = "\xa3\xd8\xa3\xc9\xa3\xc9"; +const char *str2 = "\xa3\xd8\xa3\xc9"; + +int +main (void) +{ + setlocale (LC_ALL, "ja_JP.eucJP"); + + re_set_syntax (RE_SYNTAX_SED); + + struct re_pattern_buffer re; + memset (&re, 0, sizeof (re)); + + struct re_registers regs; + memset (®s, 0, sizeof (regs)); + + re_compile_pattern ("$", 1, &re); + + int ret = 0, r = re_search (&re, str1, 4, 0, 4, ®s); + if (r != 4) + { + printf ("First re_search returned %d\n", r); + ret = 1; + } + r = re_search (&re, str2, 4, 0, 4, ®s); + if (r != 4) + { + printf ("Second re_search returned %d\n", r); + ret = 1; + } + return ret; +} diff -uprN glibc-2.4/posix/bug-regex26.c glibc-2.5/posix/bug-regex26.c --- glibc-2.4/posix/bug-regex26.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/posix/bug-regex26.c 2006-09-07 13:49:22.000000000 +0000 @@ -0,0 +1,38 @@ +/* Test re_search with dotless i. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +int +main (void) +{ + struct re_pattern_buffer r; + struct re_registers s; + setlocale (LC_ALL, "en_US.UTF-8"); + memset (&r, 0, sizeof (r)); + memset (&s, 0, sizeof (s)); + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); + re_compile_pattern ("insert into", 11, &r); + re_search (&r, "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK", + 15, 0, 15, &s); + return 0; +} diff -uprN glibc-2.4/posix/gai.conf glibc-2.5/posix/gai.conf --- glibc-2.4/posix/gai.conf 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/posix/gai.conf 2006-05-18 16:57:50.000000000 +0000 @@ -0,0 +1,52 @@ +# Configuration for getaddrinfo(3). +# +# So far only configuration for the destination address sorting is needed. +# RFC 3484 governs the sorting. But the RFC also says that system +# administrators should be able to overwrite the defaults. This can be +# achieved here. +# +# All lines have an initial identifier specifying the option followed by +# up to two values. Information specified in this file replaces the +# default information. Complete absence of data of one kind causes the +# appropriate default information to be used. The supported commands include: +# +# reload +# If set to yes, each getaddrinfo(3) call will check whether this file +# changed and if necessary reload. This option should not really be +# used. There are possible runtime problems. The default is no. +# +# label +# Add another rule to the RFC 3484 label table. See section 2.1 in +# RFC 3484. The default is: +# +#label ::1/128 0 +#label ::/0 1 +#label 2002::/16 2 +#label ::/96 3 +#label ::ffff:0:0/96 4 +#label fec0::/10 5 +#label fc00::/7 6 +# +# This default differs from the tables given in RFC 3484 by handling +# (now obsolete) site-local IPv6 addresses and Unique Local Addresses. +# The reason for this difference is that these addresses are never +# NATed while IPv4 site-local addresses most probably are. Given +# the precedence of IPv6 over IPv4 (see below) on machines having only +# site-local IPv4 and IPv6 addresses a lookup for a global address would +# see the IPv6 be preferred. The result is a long delay because the +# site-local IPv6 addresses cannot be used while the IPv4 address is +# (at least for the foreseeable future) NATed. +# +# precedence +# Add another rule the to RFC 3484 precedence table. See section 2.1 +# and 10.3 in RFC 3484. The default is: +# +#precedence ::1/128 50 +#precedence ::/0 40 +#precedence 2002::/16 30 +#precedence ::/96 20 +#precedence ::ffff:0:0/96 10 +# +# For sites which prefer IPv4 connections change the last line to +# +#precedence ::ffff:0:0/96 100 diff -uprN glibc-2.4/posix/getconf.c glibc-2.5/posix/getconf.c --- glibc-2.4/posix/getconf.c 2006-01-01 19:15:55.000000000 +0000 +++ glibc-2.5/posix/getconf.c 2006-05-09 23:58:22.000000000 +0000 @@ -981,6 +981,7 @@ print_all (const char *path) if (confstr (c->call_name, cvalue, clen) != clen) error (3, errno, "confstr"); printf ("%.*s\n", (int) clen, cvalue); + free (cvalue); break; } } diff -uprN glibc-2.4/posix/glob.c glibc-2.5/posix/glob.c --- glibc-2.4/posix/glob.c 2006-01-11 05:30:02.000000000 +0000 +++ glibc-2.5/posix/glob.c 2006-09-25 15:31:56.000000000 +0000 @@ -1090,16 +1090,25 @@ glob_in_dir (const char *pattern, const { size_t dirlen = strlen (directory); void *stream = NULL; - struct globlink + struct globnames { - struct globlink *next; - char *name; + struct globnames *next; + size_t count; + char *name[64]; }; - struct globlink *names = NULL; - size_t nfound; +#define INITIAL_COUNT sizeof (init_names.name) / sizeof (init_names.name[0]) + struct globnames init_names; + struct globnames *names = &init_names; + struct globnames *names_alloca = &init_names; + size_t nfound = 0; + size_t allocasize = sizeof (init_names); + size_t cur = 0; int meta; int save; + init_names.next = NULL; + init_names.count = INITIAL_COUNT; + meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE)); if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) { @@ -1107,7 +1116,6 @@ glob_in_dir (const char *pattern, const characters and we must not return an error therefore the result will always contain exactly one name. */ flags |= GLOB_NOCHECK; - nfound = 0; } else if (meta == 0 && ((flags & GLOB_NOESCAPE) || strchr (pattern, '\\') == NULL)) @@ -1128,8 +1136,6 @@ glob_in_dir (const char *pattern, const /* We found this file to be existing. Now tell the rest of the function to copy this name into the result. */ flags |= GLOB_NOCHECK; - - nfound = 0; } else { @@ -1137,12 +1143,10 @@ glob_in_dir (const char *pattern, const { /* This is a special case for matching directories like in "*a/". */ - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->name = (char *) malloc (1); - if (names->name == NULL) + names->name[cur] = (char *) malloc (1); + if (names->name[cur] == NULL) goto memory_error; - names->name[0] = '\0'; - names->next = NULL; + *names->name[cur++] = '\0'; nfound = 1; meta = 0; } @@ -1157,7 +1161,6 @@ glob_in_dir (const char *pattern, const && ((errfunc != NULL && (*errfunc) (directory, errno)) || (flags & GLOB_ERR))) return GLOB_ABORTED; - nfound = 0; meta = 0; } else @@ -1168,7 +1171,6 @@ glob_in_dir (const char *pattern, const | FNM_CASEFOLD #endif ); - nfound = 0; flags |= GLOB_MAGCHAR; while (1) @@ -1224,15 +1226,30 @@ glob_in_dir (const char *pattern, const || link_exists_p (directory, dirlen, name, pglob, flags)) { - struct globlink *new = (struct globlink *) - __alloca (sizeof (struct globlink)); + if (cur == names->count) + { + struct globnames *newnames; + size_t count = names->count * 2; + size_t size = (sizeof (struct globnames) + + ((count - INITIAL_COUNT) + * sizeof (char *))); + allocasize += size; + if (__libc_use_alloca (allocasize)) + newnames = names_alloca = __alloca (size); + else if ((newnames = malloc (size)) + == NULL) + goto memory_error; + newnames->count = count; + newnames->next = names; + names = newnames; + cur = 0; + } len = NAMLEN (d); - new->name = (char *) malloc (len + 1); - if (new->name == NULL) + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) goto memory_error; - *((char *) mempcpy (new->name, name, len)) = '\0'; - new->next = names; - names = new; + *((char *) mempcpy (names->name[cur++], name, len)) + = '\0'; ++nfound; } } @@ -1245,59 +1262,76 @@ glob_in_dir (const char *pattern, const { size_t len = strlen (pattern); nfound = 1; - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->next = NULL; - names->name = (char *) malloc (len + 1); - if (names->name == NULL) + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) goto memory_error; - *((char *) mempcpy (names->name, pattern, len)) = '\0'; + *((char *) mempcpy (names->name[cur++], pattern, len)) = '\0'; } + int result = GLOB_NOMATCH; if (nfound != 0) { - char **new_gl_pathv; + result = 0; + char **new_gl_pathv; new_gl_pathv = (char **) realloc (pglob->gl_pathv, (pglob->gl_pathc + pglob->gl_offs + nfound + 1) * sizeof (char *)); if (new_gl_pathv == NULL) - goto memory_error; - pglob->gl_pathv = new_gl_pathv; + { + memory_error: + while (1) + { + struct globnames *old = names; + for (size_t i = 0; i < cur; ++i) + free (names->name[i]); + names = names->next; + if (names == NULL) + break; + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); + } + result = GLOB_NOSPACE; + } + else + { + while (1) + { + struct globnames *old = names; + for (size_t i = 0; i < cur; ++i) + new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++] + = names->name[i]; + names = names->next; + if (names == NULL) + break; + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); + } - for (; names != NULL; names = names->next) - pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc++] = names->name; - pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; + pglob->gl_pathv = new_gl_pathv; - pglob->gl_flags = flags; + pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; + + pglob->gl_flags = flags; + } } - save = errno; if (stream != NULL) { + save = errno; if (flags & GLOB_ALTDIRFUNC) (*pglob->gl_closedir) (stream); else closedir (stream); + __set_errno (save); } - __set_errno (save); - return nfound == 0 ? GLOB_NOMATCH : 0; - - memory_error: - { - int save = errno; - if (flags & GLOB_ALTDIRFUNC) - (*pglob->gl_closedir) (stream); - else - closedir (stream); - __set_errno (save); - } - while (names != NULL) - { - if (names->name != NULL) - free (names->name); - names = names->next; - } - return GLOB_NOSPACE; + return result; } diff -uprN glibc-2.4/posix/Makefile glibc-2.5/posix/Makefile --- glibc-2.4/posix/Makefile 2006-01-08 09:39:15.000000000 +0000 +++ glibc-2.5/posix/Makefile 2006-09-07 13:50:05.000000000 +0000 @@ -81,14 +81,15 @@ tests := tstgetopt testfnm runtests run bug-regex13 bug-regex14 bug-regex15 bug-regex16 \ bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ bug-regex21 bug-regex22 bug-regex23 bug-regex24 \ - tst-nice tst-nanosleep tst-regex2 \ + bug-regex25 bug-regex26 tst-nice tst-nanosleep tst-regex2 \ transbug tst-rxspencer tst-pcre tst-boost \ bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \ tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf \ tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \ tst-execv1 tst-execv2 tst-execl1 tst-execl2 \ tst-execve1 tst-execve2 tst-execle1 tst-execle2 \ - tst-execvp3 tst-execvp4 tst-rfc3484 + tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \ + tst-getaddrinfo3 xtests := bug-ga2 ifeq (yes,$(build-shared)) test-srcs := globtest @@ -140,7 +141,7 @@ CFLAGS-pwrite.c = -fexceptions -fasynchr CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-sleep.c = -fexceptions CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-waitid.c = -fexceptions +CFLAGS-waitid.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-getopt.c = -fexceptions CFLAGS-wordexp.c = -fexceptions @@ -187,6 +188,8 @@ bug-regex19-ENV = LOCPATH=$(common-objpf bug-regex20-ENV = LOCPATH=$(common-objpfx)localedata bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata +bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata +bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata tst-rxspencer-ARGS = --utf8 rxspencer/tests tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata tst-pcre-ARGS = PCRE.tests diff -uprN glibc-2.4/posix/regex.h glibc-2.5/posix/regex.h --- glibc-2.4/posix/regex.h 2005-09-30 16:06:23.000000000 +0000 +++ glibc-2.5/posix/regex.h 2006-05-02 21:37:34.000000000 +0000 @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005 + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,15 +29,6 @@ extern "C" { #endif -/* POSIX says that must be included (by the caller) before - . */ - -#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS -/* VMS doesn't have `size_t' in , even though POSIX says it - should be there. */ -# include -#endif - /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two @@ -534,7 +525,8 @@ extern int re_exec (const char *); #endif /* gcc 3.1 and up support the [restrict] syntax. */ #ifndef __restrict_arr -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \ + && !defined __GNUG__ # define __restrict_arr __restrict # else # define __restrict_arr diff -uprN glibc-2.4/posix/regex_internal.c glibc-2.5/posix/regex_internal.c --- glibc-2.4/posix/regex_internal.c 2006-01-15 17:49:28.000000000 +0000 +++ glibc-2.5/posix/regex_internal.c 2006-09-07 13:48:12.000000000 +0000 @@ -482,7 +482,7 @@ re_string_skip_chars (re_string_t *pstr, mbstate_t prev_st; int rawbuf_idx; size_t mbclen; - wchar_t wc = 0; + wchar_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; @@ -495,7 +495,11 @@ re_string_skip_chars (re_string_t *pstr, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { - /* We treat these cases as a singlebyte character. */ + /* We treat these cases as a single byte character. */ + if (mbclen == 0 || remain_len == 0) + wc = L'\0'; + else + wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } @@ -581,34 +585,98 @@ re_string_reconstruct (re_string_t *pstr if (BE (offset != 0, 1)) { - /* Are the characters which are already checked remain? */ - if (BE (offset < pstr->valid_raw_len, 1) -#ifdef RE_ENABLE_I18N - /* Handling this would enlarge the code too much. - Accept a slowdown in that case. */ - && pstr->offsets_needed == 0 -#endif - ) + /* Should the already checked characters be kept? */ + if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ - pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); + if (BE (pstr->offsets_needed, 0)) + { + int low = 0, high = pstr->valid_len, mid; + do + { + mid = (high + low) / 2; + if (pstr->offsets[mid] > offset) + high = mid; + else if (pstr->offsets[mid] < offset) + low = mid + 1; + else + break; + } + while (low < high); + if (pstr->offsets[mid] < offset) + ++mid; + pstr->tip_context = re_string_context_at (pstr, mid - 1, + eflags); + /* This can be quite complicated, so handle specially + only the common and easy case where the character with + different length representation of lower and upper + case is present at or after offset. */ + if (pstr->valid_len > offset + && mid == offset && pstr->offsets[mid] == offset) + { + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); + memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; + for (low = 0; low < pstr->valid_len; low++) + pstr->offsets[low] = pstr->offsets[low + offset] - offset; + } + else + { + /* Otherwise, just find out how long the partial multibyte + character at offset is and fill it with WEOF/255. */ + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + while (mid > 0 && pstr->offsets[mid - 1] == offset) + --mid; + while (mid < pstr->valid_len) + if (pstr->wcs[mid] != WEOF) + break; + else + ++mid; + if (mid == pstr->valid_len) + pstr->valid_len = 0; + else + { + pstr->valid_len = pstr->offsets[mid] - offset; + if (pstr->valid_len) + { + for (low = 0; low < pstr->valid_len; ++low) + pstr->wcs[low] = WEOF; + memset (pstr->mbs, 255, pstr->valid_len); + } + } + pstr->valid_raw_len = pstr->valid_len; + } + } + else +#endif + { + pstr->tip_context = re_string_context_at (pstr, offset - 1, + eflags); +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - memmove (pstr->mbs, pstr->mbs + offset, - pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; + if (BE (pstr->mbs_allocated, 0)) + memmove (pstr->mbs, pstr->mbs + offset, + pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; #if DEBUG - assert (pstr->valid_len > 0); + assert (pstr->valid_len > 0); #endif + } } else { /* No, skip all characters until IDX. */ + int prev_valid_len = pstr->valid_len; + #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { @@ -618,7 +686,6 @@ re_string_reconstruct (re_string_t *pstr } #endif pstr->valid_len = 0; - pstr->valid_raw_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { @@ -633,6 +700,8 @@ re_string_reconstruct (re_string_t *pstr byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); + if (end < pstr->raw_mbs) + end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple @@ -640,7 +709,7 @@ re_string_reconstruct (re_string_t *pstr if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); - pstr->valid_len = 0; + /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else @@ -681,6 +750,16 @@ re_string_reconstruct (re_string_t *pstr if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; + if (wc == WEOF) + pstr->tip_context + = re_string_context_at (pstr, prev_valid_len - 1, eflags); + else + pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) + && IS_WIDE_WORD_CHAR (wc)) + ? CONTEXT_WORD + : ((IS_WIDE_NEWLINE (wc) + && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) @@ -689,17 +768,12 @@ re_string_reconstruct (re_string_t *pstr memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; - pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) - && IS_WIDE_WORD_CHAR (wc)) - ? CONTEXT_WORD - : ((IS_WIDE_NEWLINE (wc) - && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; + pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) diff -uprN glibc-2.4/posix/tst-exec.c glibc-2.5/posix/tst-exec.c --- glibc-2.4/posix/tst-exec.c 2001-07-06 04:55:38.000000000 +0000 +++ glibc-2.5/posix/tst-exec.c 2006-09-12 11:18:33.000000000 +0000 @@ -57,7 +57,7 @@ static const char fd2string[] = "This fi void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name1 = malloc (name_len + sizeof ("/execXXXXXX")); diff -uprN glibc-2.4/posix/tst-getaddrinfo3.c glibc-2.5/posix/tst-getaddrinfo3.c --- glibc-2.4/posix/tst-getaddrinfo3.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/posix/tst-getaddrinfo3.c 2006-04-30 20:15:58.000000000 +0000 @@ -0,0 +1,151 @@ +#include +#include +#include +#include +#include +#include + + +static int +do_test (void) +{ + mtrace (); + + int result = 0; + struct addrinfo hints; + struct addrinfo *ai_res; + int s; + +#define T(no, fail, addr, fam, coraddr) \ + s = getaddrinfo (addr, NULL, &hints, &ai_res); \ + if (s != 0) \ + { \ + if (s != fail) \ + { \ + printf ("getaddrinfo test %d failed: %s\n", no, gai_strerror (s)); \ + result = 1; \ + } \ + ai_res = NULL; \ + } \ + else if (fail) \ + { \ + printf ("getaddrinfo test %d should have failed but did not\n", no); \ + result = 1; \ + } \ + else if (ai_res->ai_family != fam) \ + { \ + printf ("\ +getaddrinfo test %d return address of family %d, expected %d\n", \ + no, ai_res->ai_family, fam); \ + result = 1; \ + } \ + else if (fam == AF_INET) \ + { \ + if (ai_res->ai_addrlen != sizeof (struct sockaddr_in)) \ + { \ + printf ("getaddrinfo test %d: address size %zu, expected %zu\n", \ + no, (size_t) ai_res->ai_addrlen, \ + sizeof (struct sockaddr_in)); \ + result = 1; \ + } \ + else if (strcmp (coraddr, \ + inet_ntoa (((struct sockaddr_in *) ai_res->ai_addr)->sin_addr))\ + != 0) \ + { \ + printf ("getaddrinfo test %d: got value %s, expected %s\n", \ + no, \ + inet_ntoa (((struct sockaddr_in *) ai_res->ai_addr)->sin_addr), \ + coraddr); \ + result = 1; \ + } \ + } \ + else \ + { \ + char buf[100]; \ + \ + if (ai_res->ai_addrlen != sizeof (struct sockaddr_in6)) \ + { \ + printf ("getaddrinfo test %d: address size %zu, expected %zu\n", \ + no, (size_t) ai_res->ai_addrlen, \ + sizeof (struct sockaddr_in6)); \ + result = 1; \ + } \ + else if (strcmp (coraddr, \ + inet_ntop (AF_INET6, \ + &((struct sockaddr_in6 *) ai_res->ai_addr)->sin6_addr,\ + buf, sizeof (buf))) \ + != 0) \ + { \ + printf ("getaddrinfo test %d: got value %s, expected %s\n", \ + no, \ + inet_ntop (AF_INET6, \ + & ((struct sockaddr_in6 *) ai_res->ai_addr)->sin6_addr, \ + buf, sizeof (buf)), \ + coraddr); \ + result = 1; \ + } \ + } \ + if (ai_res != NULL && ai_res->ai_next != NULL) \ + { \ + puts ("expected only one result"); \ + result = 1; \ + } \ + freeaddrinfo (ai_res) + + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + T (1, 0, "127.0.0.1", AF_INET, "127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + T (2, 0, "127.0.0.1", AF_INET, "127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_V4MAPPED; + T (3, 0, "127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + T (4, EAI_ADDRFAMILY, "127.0.0.1", AF_INET6, ""); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + T (5, 0, "::1", AF_INET6, "::1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + T (6, EAI_ADDRFAMILY, "::1", AF_INET6, ""); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + T (7, 0, "::1", AF_INET6, "::1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + T (8, 0, "::ffff:127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + T (9, 0, "::ffff:127.0.0.1", AF_INET, "127.0.0.1"); + + memset (&hints, '\0', sizeof (hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; + T (10, 0, "::ffff:127.0.0.1", AF_INET6, "::ffff:127.0.0.1"); + + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/posix/tst-preadwrite.c glibc-2.5/posix/tst-preadwrite.c --- glibc-2.4/posix/tst-preadwrite.c 2001-07-06 04:55:38.000000000 +0000 +++ glibc-2.5/posix/tst-preadwrite.c 2006-09-12 11:18:33.000000000 +0000 @@ -53,7 +53,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; #define FNAME FNAME2(TRUNCATE) #define FNAME2(s) "/" STRINGIFY(s) "XXXXXX" diff -uprN glibc-2.4/posix/tst-rfc3484-2.c glibc-2.5/posix/tst-rfc3484-2.c --- glibc-2.4/posix/tst-rfc3484-2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/posix/tst-rfc3484-2.c 2006-05-04 06:36:16.000000000 +0000 @@ -0,0 +1,145 @@ +#include +#include +#include + +/* Internal definitions used in the libc code. */ +#define __getservbyname_r getservbyname_r +#define __socket socket +#define __getsockname getsockname +#define __inet_aton inet_aton +#define __gethostbyaddr_r gethostbyaddr_r +#define __gethostbyname2_r gethostbyname2_r + +void +attribute_hidden +__check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen) +{ + *p1 = *p2 = true; + *in6ai = NULL; + *in6ailen = 0; +} +int +__idna_to_ascii_lz (const char *input, char **output, int flags) +{ + return 0; +} +int +__idna_to_unicode_lzlz (const char *input, char **output, int flags) +{ + return 0; +} + +#include "../sysdeps/posix/getaddrinfo.c" + +service_user *__nss_hosts_database attribute_hidden; + + +/* This is the beginning of the real test code. The above defines + (among other things) the function rfc3484_sort. */ + + +#if __BYTE_ORDER == __BIG_ENDIAN +# define h(n) n +#else +# define h(n) __bswap_constant_32 (n) +#endif + + +ssize_t +__getline (char **lineptr, size_t *n, FILE *s) +{ + *lineptr = NULL; + *n = 0; + return 0; +} + + +static int +do_test (void) +{ + labels = default_labels; + precedence = default_precedence; + + struct sockaddr_in so1; + so1.sin_family = AF_INET; + so1.sin_addr.s_addr = h (0xc0a85f19); + + struct sockaddr_in sa1; + sa1.sin_family = AF_INET; + sa1.sin_addr.s_addr = h (0xe0a85f19); + + struct addrinfo ai1; + ai1.ai_family = AF_INET; + ai1.ai_addr = (struct sockaddr *) &sa1; + + struct sockaddr_in6 so2; + so2.sin6_family = AF_INET6; + so2.sin6_addr.s6_addr32[0] = h (0xfec01234); + so2.sin6_addr.s6_addr32[1] = 1; + so2.sin6_addr.s6_addr32[2] = 1; + so2.sin6_addr.s6_addr32[3] = 1; + + struct sockaddr_in6 sa2; + sa2.sin6_family = AF_INET6; + sa2.sin6_addr.s6_addr32[0] = h (0x07d10001); + sa2.sin6_addr.s6_addr32[1] = 1; + sa2.sin6_addr.s6_addr32[2] = 1; + sa2.sin6_addr.s6_addr32[3] = 1; + + struct addrinfo ai2; + ai2.ai_family = AF_INET6; + ai2.ai_addr = (struct sockaddr *) &sa2; + + + struct sort_result results[2]; + + results[0].dest_addr = &ai1; + results[0].got_source_addr = true; + results[0].source_addr_len = sizeof (so1); + results[0].source_addr_flags = 0; + memcpy (&results[0].source_addr, &so1, sizeof (so1)); + + results[1].dest_addr = &ai2; + results[1].got_source_addr = true; + results[1].source_addr_len = sizeof (so2); + results[1].source_addr_flags = 0; + memcpy (&results[1].source_addr, &so2, sizeof (so2)); + + + qsort (results, 2, sizeof (results[0]), rfc3484_sort); + + int result = 0; + if (results[0].dest_addr->ai_family == AF_INET6) + { + puts ("wrong order in first test"); + result |= 1; + } + + + /* And again, this time with the reverse starting order. */ + results[1].dest_addr = &ai1; + results[1].got_source_addr = true; + results[1].source_addr_len = sizeof (so1); + results[1].source_addr_flags = 0; + memcpy (&results[1].source_addr, &so1, sizeof (so1)); + + results[0].dest_addr = &ai2; + results[0].got_source_addr = true; + results[0].source_addr_len = sizeof (so2); + results[0].source_addr_flags = 0; + memcpy (&results[0].source_addr, &so2, sizeof (so2)); + + + qsort (results, 2, sizeof (results[0]), rfc3484_sort); + + if (results[0].dest_addr->ai_family == AF_INET6) + { + puts ("wrong order in second test"); + result |= 1; + } + + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/posix/tst-rfc3484.c glibc-2.5/posix/tst-rfc3484.c --- glibc-2.4/posix/tst-rfc3484.c 2005-09-26 21:12:49.000000000 +0000 +++ glibc-2.5/posix/tst-rfc3484.c 2006-05-04 06:36:16.000000000 +0000 @@ -1,5 +1,6 @@ #include #include +#include /* Internal definitions used in the libc code. */ #define __getservbyname_r getservbyname_r @@ -11,9 +12,11 @@ void attribute_hidden -__check_pf (bool *p1, bool *p2) +__check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen) { *p1 = *p2 = true; + *in6ai = NULL; + *in6ailen = 0; } int __idna_to_ascii_lz (const char *input, char **output, int flags) @@ -61,9 +64,21 @@ static int expected[naddrs] = }; +ssize_t +__getline (char **lineptr, size_t *n, FILE *s) +{ + *lineptr = NULL; + *n = 0; + return 0; +} + + static int do_test (void) { + labels = default_labels; + precedence = default_precedence; + struct sockaddr_in so; so.sin_family = AF_INET; so.sin_addr.s_addr = h (0xc0a85f19); @@ -76,6 +91,7 @@ do_test (void) results[i].got_source_addr = true; memcpy(&results[i].source_addr, &so, sizeof (so)); results[i].source_addr_len = sizeof (so); + results[i].source_addr_flags = 0; } qsort (results, naddrs, sizeof (results[0]), rfc3484_sort); diff -uprN glibc-2.4/posix/tst-spawn.c glibc-2.5/posix/tst-spawn.c --- glibc-2.4/posix/tst-spawn.c 2001-07-06 04:55:38.000000000 +0000 +++ glibc-2.5/posix/tst-spawn.c 2006-09-12 11:18:33.000000000 +0000 @@ -61,7 +61,7 @@ static const char fd3string[] = "This fi void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name1 = (char *) malloc (name_len + sizeof ("/spawnXXXXXX")); diff -uprN glibc-2.4/posix/tst-truncate.c glibc-2.5/posix/tst-truncate.c --- glibc-2.4/posix/tst-truncate.c 2001-07-06 04:55:38.000000000 +0000 +++ glibc-2.5/posix/tst-truncate.c 2006-09-12 11:18:33.000000000 +0000 @@ -54,7 +54,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; #define FNAME FNAME2(TRUNCATE) #define FNAME2(s) "/" STRINGIFY(s) "XXXXXX" diff -uprN glibc-2.4/posix/unistd.h glibc-2.5/posix/unistd.h --- glibc-2.4/posix/unistd.h 2006-02-27 05:44:25.000000000 +0000 +++ glibc-2.5/posix/unistd.h 2006-08-24 06:46:27.000000000 +0000 @@ -770,8 +770,9 @@ extern int symlink (__const char *__from /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -extern int readlink (__const char *__restrict __path, char *__restrict __buf, - size_t __len) __THROW __nonnull ((1, 2)) __wur; +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + __THROW __nonnull ((1, 2)) __wur; #endif /* Use BSD. */ #ifdef __USE_ATFILE @@ -780,8 +781,8 @@ extern int symlinkat (__const char *__fr __const char *__to) __THROW __nonnull ((1, 3)) __wur; /* Like readlink but a relative PATH is interpreted relative to FD. */ -extern int readlinkat (int __fd, __const char *__restrict __path, - char *__restrict __buf, size_t __len) +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) __THROW __nonnull ((2, 3)) __wur; #endif @@ -810,7 +811,7 @@ extern int tcsetpgrp (int __fd, __pid_t This function is a possible cancellation points and therefore not marked with __THROW. */ extern char *getlogin (void); -#if defined __USE_REENTRANT || defined __USE_UNIX98 +#if defined __USE_REENTRANT || defined __USE_POSIX199506 /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error code. Otherwise return 0. diff -uprN glibc-2.4/posix/wordexp.c glibc-2.5/posix/wordexp.c --- glibc-2.4/posix/wordexp.c 2005-12-14 12:02:26.000000000 +0000 +++ glibc-2.5/posix/wordexp.c 2006-05-10 14:43:20.000000000 +0000 @@ -1,5 +1,5 @@ /* POSIX.2 wordexp implementation. - Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1997-2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Tim Waugh . @@ -166,6 +166,7 @@ w_addword (wordexp_t *pwordexp, char *wo /* Add a word to the wordlist */ size_t num_p; char **new_wordv; + bool allocated = false; /* Internally, NULL acts like "". Convert NULLs to "" before * the caller sees them. @@ -175,6 +176,7 @@ w_addword (wordexp_t *pwordexp, char *wo word = __strdup (""); if (word == NULL) goto no_space; + allocated = true; } num_p = 2 + pwordexp->we_wordc + pwordexp->we_offs; @@ -187,6 +189,9 @@ w_addword (wordexp_t *pwordexp, char *wo return 0; } + if (allocated) + free (word); + no_space: return WRDE_NOSPACE; } @@ -448,8 +453,7 @@ parse_glob (char **word, size_t *word_le glob_list.we_offs = 0; for (; words[*offset] != '\0'; ++*offset) { - if ((ifs && strchr (ifs, words[*offset])) || - (!ifs && strchr (" \t\n", words[*offset]))) + if (strchr (ifs, words[*offset]) != NULL) /* Reached IFS */ break; @@ -1162,9 +1166,8 @@ parse_comm (char **word, size_t *word_le return WRDE_NOSPACE; } - /* Premature end */ - if (comm) - free (comm); + /* Premature end. */ + free (comm); return WRDE_SYNTAX; } @@ -1425,8 +1428,7 @@ envsubst: &buffer[20], 10, 0); *word = w_addstr (*word, word_length, max_length, value); free (env); - if (pattern) - free (pattern); + free (pattern); return *word ? 0 : WRDE_NOSPACE; } /* Is it `$*' or `$@' (unquoted) ? */ @@ -1599,8 +1601,7 @@ envsubst: if (free_value) free (value); - if (expanded) - free (expanded); + free (expanded); goto do_error; } @@ -1620,8 +1621,7 @@ envsubst: if (free_value) free (value); - if (expanded) - free (expanded); + free (expanded); goto do_error; } @@ -1643,8 +1643,7 @@ envsubst: goto no_space; } - if (pattern) - free (pattern); + free (pattern); pattern = expanded; } @@ -1858,7 +1857,7 @@ envsubst: goto success; } - if (free_value && value) + if (free_value) free (value); value = pattern ? __strdup (pattern) : pattern; @@ -1875,8 +1874,10 @@ envsubst: } } - free (env); env = NULL; - free (pattern); pattern = NULL; + free (env); + env = NULL; + free (pattern); + pattern = NULL; if (seen_hash) { @@ -1991,11 +1992,9 @@ syntax: error = WRDE_SYNTAX; do_error: - if (env) - free (env); + free (env); - if (pattern) - free (pattern); + free (pattern); return error; } @@ -2265,7 +2264,7 @@ wordexp (const char *words, wordexp_t *p */ ifs = getenv ("IFS"); - if (!ifs) + if (ifs == NULL) /* IFS unset - use . */ ifs = strcpy (ifs_white, " \t\n"); else @@ -2273,18 +2272,15 @@ wordexp (const char *words, wordexp_t *p char *ifsch = ifs; char *whch = ifs_white; - /* Start off with no whitespace IFS characters */ - ifs_white[0] = '\0'; - while (*ifsch != '\0') { - if ((*ifsch == ' ') || (*ifsch == '\t') || (*ifsch == '\n')) + if (*ifsch == ' ' || *ifsch == '\t' || *ifsch == '\n') { /* Whitespace IFS. See first whether it is already in our collection. */ char *runp = ifs_white; - while (runp < whch && *runp != '\0' && *runp != *ifsch) + while (runp < whch && *runp != *ifsch) ++runp; if (runp == whch) @@ -2443,8 +2439,7 @@ do_error: * set pwordexp members back to what they were. */ - if (word != NULL) - free (word); + free (word); if (error == WRDE_NOSPACE) return WRDE_NOSPACE; diff -uprN glibc-2.4/README glibc-2.5/README --- glibc-2.4/README 2006-03-06 10:59:31.000000000 +0000 +++ glibc-2.5/README 2006-09-29 18:42:12.000000000 +0000 @@ -1,4 +1,4 @@ -This directory contains the version 2.4 release of the GNU C Library. +This directory contains the version 2.5 release of the GNU C Library. The GNU C Library is the standard system C library for all GNU systems, and is an important part of what makes up a GNU system. It provides the @@ -59,7 +59,7 @@ The GNU C Library supports these configu The code for other CPU configurations supported by volunteers outside of the core glibc maintenance effort is contained in the separate `ports' -add-on. You can find glibc-ports-2.4 distributed separately in the +add-on. You can find glibc-ports-2.5 distributed separately in the same place where you got the main glibc distribution files. Currently these configurations are known to work using the `ports' add-on: diff -uprN glibc-2.4/README.libm glibc-2.5/README.libm --- glibc-2.4/README.libm 1996-11-06 04:21:49.000000000 +0000 +++ glibc-2.5/README.libm 2006-09-12 11:17:37.000000000 +0000 @@ -486,7 +486,7 @@ sqrt * Bit by bit method using integer arithmetic. (Slow, but portable) * 1. Normalization * Scale x to y in [1,4) with even powers of 2: - * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then + * find an integer k such that 1 <= (y=x*2^(-2k)) < 4, then * sqrt(x) = 2^k * sqrt(y) * 2. Bit by bit computation * Let q = sqrt(y) truncated to i bit after binary point (q = 1), diff -uprN glibc-2.4/resolv/gai_cancel.c glibc-2.5/resolv/gai_cancel.c --- glibc-2.4/resolv/gai_cancel.c 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/gai_cancel.c 2006-08-03 08:01:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -20,7 +20,7 @@ #include #include -#include "gai_misc.h" +#include int diff -uprN glibc-2.4/resolv/gai_error.c glibc-2.5/resolv/gai_error.c --- glibc-2.4/resolv/gai_error.c 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/gai_error.c 2006-08-03 08:01:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -19,7 +19,7 @@ #include -#include "gai_misc.h" +#include int gai_error (struct gaicb *req) diff -uprN glibc-2.4/resolv/gai_misc.c glibc-2.5/resolv/gai_misc.c --- glibc-2.4/resolv/gai_misc.c 2002-11-01 20:43:55.000000000 +0000 +++ glibc-2.5/resolv/gai_misc.c 2006-08-03 08:01:53.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -23,10 +23,31 @@ #include #include -#include "gai_misc.h" +#include +#ifndef gai_create_helper_thread +# define gai_create_helper_thread __gai_create_helper_thread + +extern inline int +__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), + void *arg) +{ + pthread_attr_t attr; + + /* Make sure the thread is created detached. */ + pthread_attr_init (&attr); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + + int ret = pthread_create (threadp, &attr, tf, arg); + + (void) pthread_attr_destroy (&attr); + return ret; +} +#endif + + /* Pool of request list entries. */ static struct requestlist **pool; @@ -229,16 +250,11 @@ __gai_enqueue_request (struct gaicb *gai if (nthreads < optim.gai_threads && idle_thread_count == 0) { pthread_t thid; - pthread_attr_t attr; newp->running = 1; - /* Make sure the thread is created detached. */ - pthread_attr_init (&attr); - pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); - /* Now try to start a thread. */ - if (pthread_create (&thid, &attr, handle_requests, newp) == 0) + if (gai_create_helper_thread (&thid, handle_requests, newp) == 0) /* We managed to enqueue the request. All errors which can happen now can be recognized by calls to `gai_error'. */ ++nthreads; diff -uprN glibc-2.4/resolv/gai_misc.h glibc-2.5/resolv/gai_misc.h --- glibc-2.4/resolv/gai_misc.h 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/gai_misc.h 2006-08-03 08:02:43.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -29,7 +29,9 @@ struct waitlist { struct waitlist *next; +#ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t *cond; +#endif volatile int *counterp; /* The next field is used in asynchronous `lio_listio' operations. */ struct sigevent *sigevp; diff -uprN glibc-2.4/resolv/gai_notify.c glibc-2.5/resolv/gai_notify.c --- glibc-2.4/resolv/gai_notify.c 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/gai_notify.c 2006-08-03 08:03:13.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -20,15 +20,24 @@ #include #include #include +#include -#include "gai_misc.h" +struct notify_func + { + void (*func) (sigval_t); + sigval_t value; + }; static void * notify_func_wrapper (void *arg) { - struct sigevent *sigev = arg; - sigev->sigev_notify_function (sigev->sigev_value); + gai_start_notify_thread (); + struct notify_func *const n = arg; + void (*func) (sigval_t) = n->func; + sigval_t value = n->value; + free (n); + (*func) (value); return NULL; } @@ -54,8 +63,26 @@ __gai_notify_only (struct sigevent *sige pattr = &attr; } - if (pthread_create (&tid, pattr, notify_func_wrapper, sigev) < 0) + /* SIGEV may be freed as soon as we return, so we cannot let the + notification thread use that pointer. Even though a sigval_t is + only one word and the same size as a void *, we cannot just pass + the value through pthread_create as the argument and have the new + thread run the user's function directly, because on some machines + the calling convention for a union like sigval_t is different from + that for a pointer type like void *. */ + struct notify_func *nf = malloc (sizeof *nf); + if (nf == NULL) result = -1; + else + { + nf->func = sigev->sigev_notify_function; + nf->value = sigev->sigev_value; + if (pthread_create (&tid, pattr, notify_func_wrapper, nf) < 0) + { + free (nf); + result = -1; + } + } } else if (sigev->sigev_notify == SIGEV_SIGNAL) /* We have to send a signal. */ @@ -79,15 +106,21 @@ __gai_notify (struct requestlist *req) { struct waitlist *next = waitlist->next; - /* Decrement the counter. This is used in both cases. */ - --*waitlist->counterp; - if (waitlist->sigevp == NULL) - pthread_cond_signal (waitlist->cond); + { +#ifdef DONT_NEED_GAI_MISC_COND + GAI_MISC_NOTIFY (waitlist); +#else + /* Decrement the counter. */ + --*waitlist->counterp; + + pthread_cond_signal (waitlist->cond); +#endif + } else /* This is part of a asynchronous `getaddrinfo_a' operation. If this request is the last one, send the signal. */ - if (*waitlist->counterp == 0) + if (--*waitlist->counterp == 0) { __gai_notify_only (waitlist->sigevp, waitlist->caller_pid); /* This is tricky. See getaddrinfo_a.c for the reason why diff -uprN glibc-2.4/resolv/gai_sigqueue.c glibc-2.5/resolv/gai_sigqueue.c --- glibc-2.4/resolv/gai_sigqueue.c 2005-12-14 09:03:52.000000000 +0000 +++ glibc-2.5/resolv/gai_sigqueue.c 2006-08-03 08:01:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ #include #include -#include "gai_misc.h" +#include int __gai_sigqueue (sig, val, caller_pid) diff -uprN glibc-2.4/resolv/gai_suspend.c glibc-2.5/resolv/gai_suspend.c --- glibc-2.4/resolv/gai_suspend.c 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/gai_suspend.c 2006-09-06 16:48:25.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -23,7 +23,7 @@ #include #include -#include "gai_misc.h" +#include int @@ -32,9 +32,11 @@ gai_suspend (const struct gaicb *const l { struct waitlist waitlist[ent]; struct requestlist *requestlist[ent]; +#ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +#endif int cnt; - int dummy; + int cntr = 1; int none = 1; int result; @@ -50,9 +52,11 @@ gai_suspend (const struct gaicb *const l if (requestlist[cnt] != NULL) { +#ifndef DONT_NEED_GAI_MISC_COND waitlist[cnt].cond = &cond; +#endif waitlist[cnt].next = requestlist[cnt]->waiting; - waitlist[cnt].counterp = &dummy; + waitlist[cnt].counterp = &cntr; waitlist[cnt].sigevp = NULL; waitlist[cnt].caller_pid = 0; /* Not needed. */ requestlist[cnt]->waiting = &waitlist[cnt]; @@ -78,6 +82,10 @@ gai_suspend (const struct gaicb *const l which we must remove. So defer cancelation for now. */ pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); +#ifdef DONT_NEED_GAI_MISC_COND + result = 0; + GAI_MISC_WAIT (result, cntr, timeout, 1); +#else if (timeout == NULL) result = pthread_cond_wait (&cond, &__gai_requests_mutex); else @@ -99,6 +107,7 @@ gai_suspend (const struct gaicb *const l result = pthread_cond_timedwait (&cond, &__gai_requests_mutex, &abstime); } +#endif /* Now remove the entry in the waiting list for all requests which didn't terminate. */ @@ -121,10 +130,12 @@ gai_suspend (const struct gaicb *const l /* Now it's time to restore the cancelation state. */ pthread_setcancelstate (oldstate, NULL); +#ifndef DONT_NEED_GAI_MISC_COND /* Release the conditional variable. */ if (pthread_cond_destroy (&cond) != 0) /* This must never happen. */ abort (); +#endif if (result != 0) { diff -uprN glibc-2.4/resolv/getaddrinfo_a.c glibc-2.5/resolv/getaddrinfo_a.c --- glibc-2.4/resolv/getaddrinfo_a.c 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/getaddrinfo_a.c 2006-08-03 08:04:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -23,7 +23,7 @@ #include #include -#include "gai_misc.h" +#include /* We need this special structure to handle asynchronous I/O. */ @@ -96,7 +96,9 @@ getaddrinfo_a (int mode, struct gaicb *l } else if (mode == GAI_WAIT) { +#ifndef DONT_NEED_GAI_MISC_COND pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +#endif struct waitlist waitlist[ent]; int oldstate; @@ -104,7 +106,9 @@ getaddrinfo_a (int mode, struct gaicb *l for (cnt = 0; cnt < ent; ++cnt) if (requests[cnt] != NULL) { +#ifndef DONT_NEED_GAI_MISC_COND waitlist[cnt].cond = &cond; +#endif waitlist[cnt].next = requests[cnt]->waiting; waitlist[cnt].counterp = &total; waitlist[cnt].sigevp = NULL; @@ -119,15 +123,24 @@ getaddrinfo_a (int mode, struct gaicb *l pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); while (total > 0) - pthread_cond_wait (&cond, &__gai_requests_mutex); + { +#ifdef DONT_NEED_GAI_MISC_COND + int result; + GAI_MISC_WAIT (result, total, NULL, 1); +#else + pthread_cond_wait (&cond, &__gai_requests_mutex); +#endif + } /* Now it's time to restore the cancelation state. */ pthread_setcancelstate (oldstate, NULL); +#ifndef DONT_NEED_GAI_MISC_COND /* Release the conditional variable. */ if (pthread_cond_destroy (&cond) != 0) /* This must never happen. */ abort (); +#endif } else { @@ -147,7 +160,9 @@ getaddrinfo_a (int mode, struct gaicb *l for (cnt = 0; cnt < ent; ++cnt) if (requests[cnt] != NULL) { +#ifndef DONT_NEED_GAI_MISC_COND waitlist->list[cnt].cond = NULL; +#endif waitlist->list[cnt].next = requests[cnt]->waiting; waitlist->list[cnt].counterp = &waitlist->counter; waitlist->list[cnt].sigevp = &waitlist->sigev; diff -uprN glibc-2.4/resolv/nss_dns/dns-canon.c glibc-2.5/resolv/nss_dns/dns-canon.c --- glibc-2.4/resolv/nss_dns/dns-canon.c 2004-08-19 18:56:11.000000000 +0000 +++ glibc-2.5/resolv/nss_dns/dns-canon.c 2006-05-06 19:17:41.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -40,6 +40,10 @@ typedef union querybuf } querybuf; +static const short int qtypes[] = { ns_t_a, ns_t_aaaa }; +#define nqtypes (sizeof (qtypes) / sizeof (qtypes[0])) + + enum nss_status _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen, char **result,int *errnop, int *h_errnop) @@ -53,8 +57,6 @@ _nss_dns_getcanonname_r (const char *nam unsigned char *ptr; } ansp = { .ptr = buf }; enum nss_status status = NSS_STATUS_UNAVAIL; - int qtypes[] = { ns_t_a, ns_t_aaaa }; -#define nqtypes (sizeof (qtypes) / sizeof (qtypes[0])) for (int i = 0; i < nqtypes; ++i) { @@ -101,7 +103,8 @@ _nss_dns_getcanonname_r (const char *nam ptr += s; /* Check whether type and class match. */ - unsigned int type = ntohs (*(uint16_t *) ptr); + uint_fast16_t type; + NS_GET16 (type, ptr); if (type == qtypes[i]) { /* We found the record. */ @@ -130,15 +133,14 @@ _nss_dns_getcanonname_r (const char *nam if (type != ns_t_cname) goto unavail; - ptr += sizeof (uint16_t); - if (*(uint16_t *) ptr != htons (ns_c_in)) + if (ns_get16 (ptr) != ns_c_in) goto unavail; /* Also skip over the TTL. */ ptr += sizeof (uint16_t) + sizeof (uint32_t); /* Skip over the data length and data. */ - ptr += sizeof (uint16_t) + ntohs (*(uint16_t *) ptr); + ptr += sizeof (uint16_t) + ns_get16 (ptr); } } } diff -uprN glibc-2.4/resolv/res_debug.c glibc-2.5/resolv/res_debug.c --- glibc-2.4/resolv/res_debug.c 2005-12-30 22:45:29.000000000 +0000 +++ glibc-2.5/resolv/res_debug.c 2006-05-15 14:42:36.000000000 +0000 @@ -896,7 +896,7 @@ loc_ntoa(binary, ascii) const u_char *binary; char *ascii; { - static char *error = "?"; + static const char error[] = "?"; static char tmpbuf[sizeof "1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"]; const u_char *cp = binary; @@ -976,11 +976,11 @@ loc_ntoa(binary, ascii) altmeters = (altval / 100) * altsign; if ((sizestr = strdup(precsize_ntoa(sizeval))) == NULL) - sizestr = error; + sizestr = (char *) error; if ((hpstr = strdup(precsize_ntoa(hpval))) == NULL) - hpstr = error; + hpstr = (char *) error; if ((vpstr = strdup(precsize_ntoa(vpval))) == NULL) - vpstr = error; + vpstr = (char *) error; sprintf(ascii, "%d %.2d %.2d.%.3d %c %d %.2d %.2d.%.3d %c %d.%.2dm %sm %sm %sm", @@ -988,11 +988,11 @@ loc_ntoa(binary, ascii) longdeg, longmin, longsec, longsecfrac, eastwest, altmeters, altfrac, sizestr, hpstr, vpstr); - if (sizestr != error) + if (sizestr != (char *) error) free(sizestr); - if (hpstr != error) + if (hpstr != (char *) error) free(hpstr); - if (vpstr != error) + if (vpstr != (char *) error) free(vpstr); return (ascii); diff -uprN glibc-2.4/resolv/res_hconf.c glibc-2.5/resolv/res_hconf.c --- glibc-2.4/resolv/res_hconf.c 2005-12-20 18:33:06.000000000 +0000 +++ glibc-2.5/resolv/res_hconf.c 2006-04-25 20:05:19.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995-2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@azstarnet.com). @@ -53,35 +53,34 @@ /* Environment vars that all user to override default behavior: */ #define ENV_HOSTCONF "RESOLV_HOST_CONF" -#define ENV_SERVORDER "RESOLV_SERV_ORDER" #define ENV_SPOOF "RESOLV_SPOOF_CHECK" #define ENV_TRIM_OVERR "RESOLV_OVERRIDE_TRIM_DOMAINS" #define ENV_TRIM_ADD "RESOLV_ADD_TRIM_DOMAINS" #define ENV_MULTI "RESOLV_MULTI" #define ENV_REORDER "RESOLV_REORDER" -static const char *arg_service_list (const char *, int, const char *, - unsigned int); -static const char *arg_trimdomain_list (const char *, int, const char *, - unsigned int); -static const char *arg_spoof (const char *, int, const char *, unsigned int); -static const char *arg_bool (const char *, int, const char *, unsigned int); +enum parse_cbs + { + CB_none, + CB_arg_trimdomain_list, + CB_arg_spoof, + CB_arg_bool + }; static const struct cmd { - const char *name; - const char *(*parse_args) (const char * filename, int line_num, - const char * args, unsigned int arg); + const char name[11]; + uint8_t cb; unsigned int arg; } cmd[] = { - {"order", arg_service_list, 0}, - {"trim", arg_trimdomain_list, 0}, - {"spoof", arg_spoof, 0}, - {"multi", arg_bool, HCONF_FLAG_MULTI}, - {"nospoof", arg_bool, HCONF_FLAG_SPOOF}, - {"spoofalert", arg_bool, HCONF_FLAG_SPOOFALERT}, - {"reorder", arg_bool, HCONF_FLAG_REORDER} + {"order", CB_none, 0}, + {"trim", CB_arg_trimdomain_list, 0}, + {"spoof", CB_arg_spoof, 0}, + {"multi", CB_arg_bool, HCONF_FLAG_MULTI}, + {"nospoof", CB_arg_bool, HCONF_FLAG_SPOOF}, + {"spoofalert", CB_arg_bool, HCONF_FLAG_SPOOFALERT}, + {"reorder", CB_arg_bool, HCONF_FLAG_REORDER} }; /* Structure containing the state. */ @@ -107,103 +106,7 @@ skip_string (const char *str) static const char * -arg_service_list (const char *fname, int line_num, const char *args, - unsigned int arg) -{ - enum Name_Service service; - const char *start; - size_t len; - size_t i; - static const struct - { - const char name[6]; - int16_t service; - } svcs[] = - { - {"bind", SERVICE_BIND}, - {"hosts", SERVICE_HOSTS}, - {"nis", SERVICE_NIS}, - }; - - do - { - start = args; - args = skip_string (args); - len = args - start; - - service = SERVICE_NONE; - for (i = 0; i < sizeof (svcs) / sizeof (svcs[0]); ++i) - { - if (__strncasecmp (start, svcs[i].name, len) == 0 - && len == strlen (svcs[i].name)) - { - service = svcs[i].service; - break; - } - } - if (service == SERVICE_NONE) - { - char *buf; - - if (__asprintf (&buf, - _("%s: line %d: expected service, found `%s'\n"), - fname, line_num, start) < 0) - return 0; - - __fxprintf (NULL, "%s", buf); - - free (buf); - return 0; - } - if (_res_hconf.num_services >= SERVICE_MAX) - { - char *buf; - - if (__asprintf (&buf, _("\ -%s: line %d: cannot specify more than %d services"), - fname, line_num, SERVICE_MAX) < 0) - return 0; - - __fxprintf (NULL, "%s", buf); - - free (buf); - return 0; - } - _res_hconf.service[_res_hconf.num_services++] = service; - - args = skip_ws (args); - switch (*args) - { - case ',': - case ';': - case ':': - args = skip_ws (++args); - if (!*args || *args == '#') - { - char *buf; - - if (__asprintf (&buf, _("\ -%s: line %d: list delimiter not followed by keyword"), - fname, line_num) < 0) - return 0; - - __fxprintf (NULL, "%s", buf); - - free (buf); - return 0; - } - default: - break; - } - } - while (*args && *args != '#'); - return args; -} - - -static const char * -arg_trimdomain_list (const char *fname, int line_num, const char *args, - unsigned int flag) +arg_trimdomain_list (const char *fname, int line_num, const char *args) { const char * start; size_t len; @@ -259,7 +162,7 @@ arg_trimdomain_list (const char *fname, static const char * -arg_spoof (const char *fname, int line_num, const char *args, unsigned flag) +arg_spoof (const char *fname, int line_num, const char *args) { const char *start = args; size_t len; @@ -353,7 +256,17 @@ parse_line (const char *fname, int line_ /* process args: */ str = skip_ws (str); - str = (*c->parse_args) (fname, line_num, str, c->arg); + + if (c->cb == CB_arg_trimdomain_list) + str = arg_trimdomain_list (fname, line_num, str); + else if (c->cb == CB_arg_spoof) + str = arg_spoof (fname, line_num, str); + else if (c->cb == CB_arg_bool) + str = arg_bool (fname, line_num, str, c->arg); + else + /* Ignore the line. */ + return; + if (!str) return; @@ -396,10 +309,7 @@ do_init (void) hconf_name = _PATH_HOSTCONF; fp = fopen (hconf_name, "rc"); - if (!fp) - /* make up something reasonable: */ - _res_hconf.service[_res_hconf.num_services++] = SERVICE_BIND; - else + if (fp) { /* No threads using this stream. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); @@ -413,16 +323,9 @@ do_init (void) fclose (fp); } - envval = getenv (ENV_SERVORDER); - if (envval) - { - _res_hconf.num_services = 0; - arg_service_list (ENV_SERVORDER, 1, envval, 0); - } - envval = getenv (ENV_SPOOF); if (envval) - arg_spoof (ENV_SPOOF, 1, envval, 0); + arg_spoof (ENV_SPOOF, 1, envval); envval = getenv (ENV_MULTI); if (envval) @@ -434,13 +337,13 @@ do_init (void) envval = getenv (ENV_TRIM_ADD); if (envval) - arg_trimdomain_list (ENV_TRIM_ADD, 1, envval, 0); + arg_trimdomain_list (ENV_TRIM_ADD, 1, envval); envval = getenv (ENV_TRIM_OVERR); if (envval) { _res_hconf.num_trimdomains = 0; - arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0); + arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval); } _res_hconf.initialized = 1; diff -uprN glibc-2.4/resolv/res_hconf.h glibc-2.5/resolv/res_hconf.h --- glibc-2.4/resolv/res_hconf.h 2001-07-06 04:55:39.000000000 +0000 +++ glibc-2.5/resolv/res_hconf.h 2006-04-25 19:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995-1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@azstarnet.com). @@ -24,18 +24,11 @@ #define TRIMDOMAINS_MAX 4 -enum Name_Service -{ - SERVICE_NONE = 0, - SERVICE_BIND, SERVICE_HOSTS, SERVICE_NIS, - SERVICE_MAX -}; - struct hconf { int initialized; - int num_services; - enum Name_Service service[SERVICE_MAX]; + int unused1; + int unused2[4]; int num_trimdomains; const char *trimdomain[TRIMDOMAINS_MAX]; unsigned int flags; diff -uprN glibc-2.4/resolv/res_init.c glibc-2.5/resolv/res_init.c --- glibc-2.4/resolv/res_init.c 2005-11-01 00:05:17.000000000 +0000 +++ glibc-2.5/resolv/res_init.c 2006-09-04 17:59:54.000000000 +0000 @@ -537,10 +537,7 @@ net_mask(in) /* XXX - should really use u_int res_randomid(void) { - struct timeval now; - - __gettimeofday(&now, NULL); - return (0xffff & (now.tv_sec ^ now.tv_usec ^ __getpid())); + return 0xffff & __getpid(); } #ifdef _LIBC libc_hidden_def (__res_randomid) diff -uprN glibc-2.4/resolv/res_mkquery.c glibc-2.5/resolv/res_mkquery.c --- glibc-2.4/resolv/res_mkquery.c 2004-10-27 21:27:29.000000000 +0000 +++ glibc-2.5/resolv/res_mkquery.c 2006-09-04 17:57:02.000000000 +0000 @@ -124,10 +124,6 @@ res_nmkquery(res_state statp, incremented by one after the initial randomization which still predictable if the application does multiple requests. */ -#if 0 - hp->id = htons(++statp->id); -#else - hp->id = htons(statp->id); int randombits; do { @@ -141,7 +137,7 @@ res_nmkquery(res_state statp, } while ((randombits & 0xffff) == 0); statp->id = (statp->id + randombits) & 0xffff; -#endif + hp->id = statp->id; hp->opcode = op; hp->rd = (statp->options & RES_RECURSE) != 0; hp->rcode = NOERROR; @@ -155,38 +151,36 @@ res_nmkquery(res_state statp, * perform opcode specific processing */ switch (op) { - case QUERY: /*FALLTHROUGH*/ case NS_NOTIFY_OP: + if ((buflen -= QFIXEDSZ + (data == NULL ? 0 : RRFIXEDSZ)) < 0) + return (-1); + goto compose; + + case QUERY: if ((buflen -= QFIXEDSZ) < 0) return (-1); + compose: if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0) return (-1); cp += n; buflen -= n; - __putshort(type, cp); - cp += INT16SZ; - __putshort(class, cp); - cp += INT16SZ; + NS_PUT16 (type, cp); + NS_PUT16 (class, cp); hp->qdcount = htons(1); if (op == QUERY || data == NULL) break; /* * Make an additional record for completion domain. */ - buflen -= RRFIXEDSZ; n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr); - if (n < 0) + if (__builtin_expect (n < 0, 0)) return (-1); cp += n; buflen -= n; - __putshort(T_NULL, cp); - cp += INT16SZ; - __putshort(class, cp); - cp += INT16SZ; - __putlong(0, cp); - cp += INT32SZ; - __putshort(0, cp); - cp += INT16SZ; + NS_PUT16 (T_NULL, cp); + NS_PUT16 (class, cp); + NS_PUT32 (0, cp); + NS_PUT16 (0, cp); hp->arcount = htons(1); break; @@ -194,17 +188,13 @@ res_nmkquery(res_state statp, /* * Initialize answer section */ - if (buflen < 1 + RRFIXEDSZ + datalen) + if (__builtin_expect (buflen < 1 + RRFIXEDSZ + datalen, 0)) return (-1); *cp++ = '\0'; /* no domain name */ - __putshort(type, cp); - cp += INT16SZ; - __putshort(class, cp); - cp += INT16SZ; - __putlong(0, cp); - cp += INT32SZ; - __putshort(datalen, cp); - cp += INT16SZ; + NS_PUT16 (type, cp); + NS_PUT16 (class, cp); + NS_PUT32 (0, cp); + NS_PUT16 (datalen, cp); if (datalen) { memcpy(cp, data, datalen); cp += datalen; diff -uprN glibc-2.4/resolv/res_query.c glibc-2.5/resolv/res_query.c --- glibc-2.4/resolv/res_query.c 2004-10-18 05:09:59.000000000 +0000 +++ glibc-2.5/resolv/res_query.c 2006-05-06 07:15:53.000000000 +0000 @@ -69,6 +69,7 @@ static const char sccsid[] = "@(#)res_qu static const char rcsid[] = "$BINDId: res_query.c,v 8.20 2000/02/29 05:39:12 vixie Exp $"; #endif /* LIBC_SCCS and not lint */ +#include #include #include #include @@ -151,6 +152,7 @@ __libc_res_nquery(res_state statp, free (buf); return (n); } + assert (answerp == NULL || (void *) *answerp == (void *) answer); n = __libc_res_nsend(statp, buf, n, answer, anslen, answerp); if (use_malloc) free (buf); @@ -163,6 +165,10 @@ __libc_res_nquery(res_state statp, return (n); } + if (answerp != NULL) + /* __libc_res_nsend might have reallocated the buffer. */ + hp = (HEADER *) *answerp; + if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { #ifdef DEBUG if (statp->options & RES_DEBUG) diff -uprN glibc-2.4/resolv/res_send.c glibc-2.5/resolv/res_send.c --- glibc-2.4/resolv/res_send.c 2005-11-01 00:07:49.000000000 +0000 +++ glibc-2.5/resolv/res_send.c 2006-05-06 17:35:50.000000000 +0000 @@ -267,8 +267,8 @@ res_nameinquery(const char *name, int ty cp += n; if (cp + 2 * INT16SZ > eom) return (-1); - ttype = ns_get16(cp); cp += INT16SZ; - tclass = ns_get16(cp); cp += INT16SZ; + NS_GET16(ttype, cp); + NS_GET16(tclass, cp); if (ttype == type && tclass == class && ns_samename(tname, name) == 1) return (1); @@ -292,9 +292,6 @@ int res_queriesmatch(const u_char *buf1, const u_char *eom1, const u_char *buf2, const u_char *eom2) { - const u_char *cp = buf1 + HFIXEDSZ; - int qdcount = ntohs(((HEADER*)buf1)->qdcount); - if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2) return (-1); @@ -306,8 +303,16 @@ res_queriesmatch(const u_char *buf1, con (((HEADER *)buf2)->opcode == ns_o_update)) return (1); - if (qdcount != ntohs(((HEADER*)buf2)->qdcount)) + /* Note that we initially do not convert QDCOUNT to the host byte + order. We can compare it with the second buffer's QDCOUNT + value without doing this. */ + int qdcount = ((HEADER*)buf1)->qdcount; + if (qdcount != ((HEADER*)buf2)->qdcount) return (0); + + qdcount = htons (qdcount); + const u_char *cp = buf1 + HFIXEDSZ; + while (qdcount-- > 0) { char tname[MAXDNAME+1]; int n, ttype, tclass; @@ -318,8 +323,8 @@ res_queriesmatch(const u_char *buf1, con cp += n; if (cp + 2 * INT16SZ > eom1) return (-1); - ttype = ns_get16(cp); cp += INT16SZ; - tclass = ns_get16(cp); cp += INT16SZ; + NS_GET16(ttype, cp); + NS_GET16(tclass, cp); if (!res_nameinquery(tname, ttype, tclass, buf2, eom2)) return (0); } @@ -669,7 +674,7 @@ send_vc(res_state statp, /* * Send length & message */ - putshort((u_short)buflen, (u_char*)&len); + ns_put16((u_short)buflen, (u_char*)&len); evConsIovec(&len, INT16SZ, &iov[0]); evConsIovec((void*)buf, buflen, &iov[1]); if (TEMP_FAILURE_RETRY (writev(statp->_vcsock, iov, 2)) @@ -874,9 +879,12 @@ send_dg(res_state statp, pfd[0].events = POLLOUT; wait: if (need_recompute) { + recompute_resend: evNowTime(&now); if (evCmpTime(finish, now) <= 0) { - Perror(statp, stderr, "select", errno); + poll_err_out: + Perror(statp, stderr, "poll", errno); + err_out: __res_iclose(statp, false); return (0); } @@ -899,26 +907,18 @@ send_dg(res_state statp, return (0); } if (n < 0) { - if (errno == EINTR) { - recompute_resend: - evNowTime(&now); - if (evCmpTime(finish, now) > 0) { - evSubTime(&timeout, &finish, &now); - goto wait; - } - } - Perror(statp, stderr, "poll", errno); - __res_iclose(statp, false); - return (0); + if (errno == EINTR) + goto recompute_resend; + + goto poll_err_out; } __set_errno (0); if (pfd[0].revents & POLLOUT) { - if (send(pfd[0].fd, (char*)buf, buflen, 0) != buflen) { + if (send (pfd[0].fd, buf, buflen, MSG_NOSIGNAL) != buflen) { if (errno == EINTR || errno == EAGAIN) goto recompute_resend; Perror(statp, stderr, "send", errno); - __res_iclose(statp, false); - return (0); + goto err_out; } pfd[0].events = POLLIN; ++nwritten; @@ -948,8 +948,7 @@ send_dg(res_state statp, goto wait; } Perror(statp, stderr, "recvfrom", errno); - __res_iclose(statp, false); - return (0); + goto err_out; } *gotsomewhere = 1; if (resplen < HFIXEDSZ) { @@ -960,8 +959,7 @@ send_dg(res_state statp, (stdout, ";; undersized: %d\n", resplen)); *terrno = EMSGSIZE; - __res_iclose(statp, false); - return (0); + goto err_out; } if (hp->id != anhp->id) { /* @@ -1039,8 +1037,7 @@ send_dg(res_state statp, return (resplen); } else if (pfd[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { /* Something went wrong. We can stop trying. */ - __res_iclose(statp, false); - return (0); + goto err_out; } else { /* poll should not have returned > 0 in this case. */ diff -uprN glibc-2.4/rt/Makefile glibc-2.5/rt/Makefile --- glibc-2.4/rt/Makefile 2006-01-06 04:10:43.000000000 +0000 +++ glibc-2.5/rt/Makefile 2006-08-03 08:05:59.000000000 +0000 @@ -48,7 +48,8 @@ tests := tst-shm tst-clock tst-clock_nan tst-mqueue5 tst-mqueue6 tst-mqueue7 tst-mqueue8 tst-mqueue9 \ tst-timer3 tst-timer4 tst-timer5 \ tst-cpuclock1 tst-cpuclock2 \ - tst-cputimer1 tst-cputimer2 tst-cputimer3 + tst-cputimer1 tst-cputimer2 tst-cputimer3 \ + tst-clock2 extra-libs := librt extra-libs-others := $(extra-libs) diff -uprN glibc-2.4/rt/tst-aio64.c glibc-2.5/rt/tst-aio64.c --- glibc-2.4/rt/tst-aio64.c 2002-09-24 04:20:55.000000000 +0000 +++ glibc-2.5/rt/tst-aio64.c 2006-09-12 11:18:34.000000000 +0000 @@ -49,7 +49,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/aioXXXXXX")); diff -uprN glibc-2.4/rt/tst-aio.c glibc-2.5/rt/tst-aio.c --- glibc-2.4/rt/tst-aio.c 2002-09-24 04:20:55.000000000 +0000 +++ glibc-2.5/rt/tst-aio.c 2006-09-12 11:18:34.000000000 +0000 @@ -48,7 +48,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/aioXXXXXX")); diff -uprN glibc-2.4/rt/tst-clock2.c glibc-2.5/rt/tst-clock2.c --- glibc-2.4/rt/tst-clock2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/rt/tst-clock2.c 2006-08-03 08:05:32.000000000 +0000 @@ -0,0 +1,43 @@ +/* Test setting the monotonic clock. */ + +#include +#include + +#if defined CLOCK_MONOTONIC && defined _POSIX_MONOTONIC_CLOCK + +# include +# include + +static int +do_test (void) +{ + if (sysconf (_SC_MONOTONIC_CLOCK) <= 0) + return 0; + + struct timespec ts; + if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0) + { + puts ("clock_gettime(CLOCK_MONOTONIC) failed"); + return 1; + } + + /* Setting the monotonic clock must fail. */ + if (clock_settime (CLOCK_MONOTONIC, &ts) != -1) + { + puts ("clock_settime(CLOCK_MONOTONIC) did not fail"); + return 1; + } + if (errno != EINVAL) + { + printf ("clock_settime(CLOCK_MONOTONIC) set errno to %d, expected %d\n", + errno, EINVAL); + return 1; + } + return 0; +} +# define TEST_FUNCTION do_test () + +#else +# define TEST_FUNCTION 0 +#endif +#include "../test-skeleton.c" diff -uprN glibc-2.4/signal/Makefile glibc-2.5/signal/Makefile --- glibc-2.4/signal/Makefile 2003-12-29 17:49:12.000000000 +0000 +++ glibc-2.5/signal/Makefile 2006-04-23 19:03:28.000000000 +0000 @@ -1,5 +1,4 @@ -# Copyright (C) 1991,1992,1993,1994,1995,1996,1997,1998,2003 -# Free Software Foundation, Inc. +# Copyright (C) 1991-1998,2003,2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -38,7 +37,7 @@ routines := signal raise killpg \ allocrtsig sigtimedwait sigwaitinfo sigqueue \ sighold sigrelse sigignore sigset -tests := tst-signal tst-sigset tst-sigsimple tst-raise +tests := tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2 distribute := sigsetops.h testrtsig.h sigset-cvt-mask.h diff -uprN glibc-2.4/signal/tst-sigset2.c glibc-2.5/signal/tst-sigset2.c --- glibc-2.4/signal/tst-sigset2.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/signal/tst-sigset2.c 2006-04-23 19:03:05.000000000 +0000 @@ -0,0 +1,184 @@ +/* sigset_SIG_HOLD_bug.c [BZ #1951] */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TEST_SIG SIGINT + + +/* Print mask of blocked signals for this process */ +static void +printSigMask (const char *msg) +{ + sigset_t currMask; + int sig; + int cnt; + + if (msg != NULL) + printf ("%s", msg); + + if (sigprocmask (SIG_BLOCK, NULL, &currMask) == -1) + error (1, errno, "sigaction"); + + cnt = 0; + for (sig = 1; sig < NSIG; sig++) + { + if (sigismember (&currMask, sig)) + { + cnt++; + printf ("\t\t%d (%s)\n", sig, strsignal (sig)); + } + } + + if (cnt == 0) + printf ("\t\t\n"); +} /* printSigMask */ + +static void +handler (int sig) +{ + printf ("Caught signal %d\n", sig); + printSigMask ("Signal mask in handler\n"); + printf ("Handler returning\n"); + _exit (1); +} /* handler */ + +static void +printDisposition (sighandler_t disp) +{ + if (disp == SIG_HOLD) + printf ("SIG_HOLD"); + else if (disp == SIG_DFL) + printf ("SIG_DFL"); + else if (disp == SIG_IGN) + printf ("SIG_IGN"); + else + printf ("handled at %" PRIxPTR, (uintptr_t) disp); +} /* printDisposition */ + +static int +returnTest1 (void) +{ + sighandler_t prev; + + printf ("===== TEST 1 =====\n"); + printf ("Blocking signal with sighold()\n"); + if (sighold (TEST_SIG) == -1) + error (1, errno, "sighold"); + printSigMask ("Signal mask after sighold()\n"); + + printf ("About to use sigset() to establish handler\n"); + prev = sigset (TEST_SIG, handler); + if (prev == SIG_ERR) + error(1, errno, "sigset"); + + printf ("Previous disposition: "); + printDisposition (prev); + printf (" (should be SIG_HOLD)\n"); + if (prev != SIG_HOLD) + { + printf("TEST FAILED!!!\n"); + return 1; + } + return 0; +} /* returnTest1 */ + +static int +returnTest2 (void) +{ + sighandler_t prev; + + printf ("\n===== TEST 2 =====\n"); + + printf ("About to use sigset() to set SIG_HOLD\n"); + prev = sigset (TEST_SIG, SIG_HOLD); + if (prev == SIG_ERR) + error (1, errno, "sigset"); + + printf ("Previous disposition: "); + printDisposition (prev); + printf (" (should be SIG_DFL)\n"); + if (prev != SIG_DFL) + { + printf("TEST FAILED!!!\n"); + return 1; + } + return 0; +} /* returnTest2 */ + +static int +returnTest3 (void) +{ + sighandler_t prev; + + printf ("\n===== TEST 3 =====\n"); + + printf ("About to use sigset() to set SIG_HOLD\n"); + prev = sigset (TEST_SIG, SIG_HOLD); + if (prev == SIG_ERR) + error (1, errno, "sigset"); + + printf ("About to use sigset() to set SIG_HOLD (again)\n"); + prev = sigset (TEST_SIG, SIG_HOLD); + if (prev == SIG_ERR) + error (1, errno, "sigset"); + + printf ("Previous disposition: "); + printDisposition (prev); + printf (" (should be SIG_HOLD)\n"); + if (prev != SIG_HOLD) + { + printf("TEST FAILED!!!\n"); + return 1; + } + return 0; +} /* returnTest3 */ + +int +main (int argc, char *argv[]) +{ + pid_t childPid; + + childPid = fork(); + if (childPid == -1) + error (1, errno, "fork"); + + if (childPid == 0) + exit (returnTest1 ()); + + int status; + if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid) + error (1, errno, "waitpid"); + int result = !WIFEXITED (status) || WEXITSTATUS (status) != 0; + + childPid = fork(); + if (childPid == -1) + error (1, errno, "fork"); + + if (childPid == 0) + exit (returnTest2 ()); + + if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid) + error (1, errno, "waitpid"); + result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0; + + childPid = fork(); + if (childPid == -1) + error (1, errno, "fork"); + + if (childPid == 0) + exit (returnTest3 ()); + + if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid) + error (1, errno, "waitpid"); + result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0; + + return result; +} /* main */ diff -uprN glibc-2.4/soft-fp/adddf3.c glibc-2.5/soft-fp/adddf3.c --- glibc-2.4/soft-fp/adddf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/adddf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/addsf3.c glibc-2.5/soft-fp/addsf3.c --- glibc-2.4/soft-fp/addsf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/addsf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/addtf3.c glibc-2.5/soft-fp/addtf3.c --- glibc-2.4/soft-fp/addtf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/addtf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/divdf3.c glibc-2.5/soft-fp/divdf3.c --- glibc-2.4/soft-fp/divdf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/divdf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/divsf3.c glibc-2.5/soft-fp/divsf3.c --- glibc-2.4/soft-fp/divsf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/divsf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/divtf3.c glibc-2.5/soft-fp/divtf3.c --- glibc-2.4/soft-fp/divtf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/divtf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/double.h glibc-2.5/soft-fp/double.h --- glibc-2.4/soft-fp/double.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/double.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel kid. Go buy yourself a real computer." diff -uprN glibc-2.4/soft-fp/eqdf2.c glibc-2.5/soft-fp/eqdf2.c --- glibc-2.4/soft-fp/eqdf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/eqdf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/eqsf2.c glibc-2.5/soft-fp/eqsf2.c --- glibc-2.4/soft-fp/eqsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/eqsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/eqtf2.c glibc-2.5/soft-fp/eqtf2.c --- glibc-2.4/soft-fp/eqtf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/eqtf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/extenddftf2.c glibc-2.5/soft-fp/extenddftf2.c --- glibc-2.4/soft-fp/extenddftf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/extenddftf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/extended.h glibc-2.5/soft-fp/extended.h --- glibc-2.4/soft-fp/extended.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/extended.h 2006-04-04 08:24:47.000000000 +0000 @@ -9,6 +9,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -16,8 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel, kid. Go buy yourself a real computer." diff -uprN glibc-2.4/soft-fp/extendsfdf2.c glibc-2.5/soft-fp/extendsfdf2.c --- glibc-2.4/soft-fp/extendsfdf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/extendsfdf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/extendsftf2.c glibc-2.5/soft-fp/extendsftf2.c --- glibc-2.4/soft-fp/extendsftf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/extendsftf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/fixdfdi.c glibc-2.5/soft-fp/fixdfdi.c --- glibc-2.4/soft-fp/fixdfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixdfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/fixdfsi.c glibc-2.5/soft-fp/fixdfsi.c --- glibc-2.4/soft-fp/fixdfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixdfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/fixsfdi.c glibc-2.5/soft-fp/fixsfdi.c --- glibc-2.4/soft-fp/fixsfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixsfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/fixsfsi.c glibc-2.5/soft-fp/fixsfsi.c --- glibc-2.4/soft-fp/fixsfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixsfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/fixtfdi.c glibc-2.5/soft-fp/fixtfdi.c --- glibc-2.4/soft-fp/fixtfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixtfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/fixtfsi.c glibc-2.5/soft-fp/fixtfsi.c --- glibc-2.4/soft-fp/fixtfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixtfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/fixunsdfdi.c glibc-2.5/soft-fp/fixunsdfdi.c --- glibc-2.4/soft-fp/fixunsdfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunsdfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/fixunsdfsi.c glibc-2.5/soft-fp/fixunsdfsi.c --- glibc-2.4/soft-fp/fixunsdfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunsdfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/fixunssfdi.c glibc-2.5/soft-fp/fixunssfdi.c --- glibc-2.4/soft-fp/fixunssfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunssfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/fixunssfsi.c glibc-2.5/soft-fp/fixunssfsi.c --- glibc-2.4/soft-fp/fixunssfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunssfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/fixunstfdi.c glibc-2.5/soft-fp/fixunstfdi.c --- glibc-2.4/soft-fp/fixunstfdi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunstfdi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/fixunstfsi.c glibc-2.5/soft-fp/fixunstfsi.c --- glibc-2.4/soft-fp/fixunstfsi.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/fixunstfsi.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/floatdidf.c glibc-2.5/soft-fp/floatdidf.c --- glibc-2.4/soft-fp/floatdidf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatdidf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/floatdisf.c glibc-2.5/soft-fp/floatdisf.c --- glibc-2.4/soft-fp/floatdisf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatdisf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/floatditf.c glibc-2.5/soft-fp/floatditf.c --- glibc-2.4/soft-fp/floatditf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatditf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/floatsidf.c glibc-2.5/soft-fp/floatsidf.c --- glibc-2.4/soft-fp/floatsidf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatsidf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/floatsisf.c glibc-2.5/soft-fp/floatsisf.c --- glibc-2.4/soft-fp/floatsisf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatsisf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/floatsitf.c glibc-2.5/soft-fp/floatsitf.c --- glibc-2.4/soft-fp/floatsitf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatsitf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/floatundidf.c glibc-2.5/soft-fp/floatundidf.c --- glibc-2.4/soft-fp/floatundidf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatundidf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/floatundisf.c glibc-2.5/soft-fp/floatundisf.c --- glibc-2.4/soft-fp/floatundisf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatundisf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/floatunditf.c glibc-2.5/soft-fp/floatunditf.c --- glibc-2.4/soft-fp/floatunditf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatunditf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/floatunsidf.c glibc-2.5/soft-fp/floatunsidf.c --- glibc-2.4/soft-fp/floatunsidf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatunsidf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/floatunsisf.c glibc-2.5/soft-fp/floatunsisf.c --- glibc-2.4/soft-fp/floatunsisf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatunsisf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/floatunsitf.c glibc-2.5/soft-fp/floatunsitf.c --- glibc-2.4/soft-fp/floatunsitf.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/floatunsitf.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/gedf2.c glibc-2.5/soft-fp/gedf2.c --- glibc-2.4/soft-fp/gedf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/gedf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/gesf2.c glibc-2.5/soft-fp/gesf2.c --- glibc-2.4/soft-fp/gesf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/gesf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/getf2.c glibc-2.5/soft-fp/getf2.c --- glibc-2.4/soft-fp/getf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/getf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/ledf2.c glibc-2.5/soft-fp/ledf2.c --- glibc-2.4/soft-fp/ledf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/ledf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/lesf2.c glibc-2.5/soft-fp/lesf2.c --- glibc-2.4/soft-fp/lesf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/lesf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/letf2.c glibc-2.5/soft-fp/letf2.c --- glibc-2.4/soft-fp/letf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/letf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/muldf3.c glibc-2.5/soft-fp/muldf3.c --- glibc-2.4/soft-fp/muldf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/muldf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/mulsf3.c glibc-2.5/soft-fp/mulsf3.c --- glibc-2.4/soft-fp/mulsf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/mulsf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/multf3.c glibc-2.5/soft-fp/multf3.c --- glibc-2.4/soft-fp/multf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/multf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/negdf2.c glibc-2.5/soft-fp/negdf2.c --- glibc-2.4/soft-fp/negdf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/negdf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/negsf2.c glibc-2.5/soft-fp/negsf2.c --- glibc-2.4/soft-fp/negsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/negsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/negtf2.c glibc-2.5/soft-fp/negtf2.c --- glibc-2.4/soft-fp/negtf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/negtf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/op-1.h glibc-2.5/soft-fp/op-1.h --- glibc-2.4/soft-fp/op-1.h 2006-02-25 01:24:57.000000000 +0000 +++ glibc-2.5/soft-fp/op-1.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f #define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f) diff -uprN glibc-2.4/soft-fp/op-2.h glibc-2.5/soft-fp/op-2.h --- glibc-2.4/soft-fp/op-2.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/op-2.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1 #define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1) diff -uprN glibc-2.4/soft-fp/op-4.h glibc-2.5/soft-fp/op-4.h --- glibc-2.4/soft-fp/op-4.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/op-4.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4] #define _FP_FRAC_COPY_4(D,S) \ diff -uprN glibc-2.4/soft-fp/op-8.h glibc-2.5/soft-fp/op-8.h --- glibc-2.4/soft-fp/op-8.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/op-8.h 2006-04-04 08:24:47.000000000 +0000 @@ -11,6 +11,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -18,8 +27,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ /* We need just a few things from here for op-4, if we ever need some other macros, they can be added. */ diff -uprN glibc-2.4/soft-fp/op-common.h glibc-2.5/soft-fp/op-common.h --- glibc-2.4/soft-fp/op-common.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/op-common.h 2006-04-04 08:24:47.000000000 +0000 @@ -11,6 +11,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -18,8 +27,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #define _FP_DECL(wc, X) \ _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \ diff -uprN glibc-2.4/soft-fp/quad.h glibc-2.5/soft-fp/quad.h --- glibc-2.4/soft-fp/quad.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/quad.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel, kid. Go buy yourself a real computer." diff -uprN glibc-2.4/soft-fp/single.h glibc-2.5/soft-fp/single.h --- glibc-2.4/soft-fp/single.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/single.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #if _FP_W_TYPE_SIZE < 32 #error "Here's a nickel kid. Go buy yourself a real computer." diff -uprN glibc-2.4/soft-fp/soft-fp.h glibc-2.5/soft-fp/soft-fp.h --- glibc-2.4/soft-fp/soft-fp.h 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/soft-fp.h 2006-04-04 08:24:47.000000000 +0000 @@ -12,6 +12,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -19,8 +28,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #ifndef SOFT_FP_H #define SOFT_FP_H diff -uprN glibc-2.4/soft-fp/sqrtdf2.c glibc-2.5/soft-fp/sqrtdf2.c --- glibc-2.4/soft-fp/sqrtdf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/sqrtdf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/sqrtsf2.c glibc-2.5/soft-fp/sqrtsf2.c --- glibc-2.4/soft-fp/sqrtsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/sqrtsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/sqrttf2.c glibc-2.5/soft-fp/sqrttf2.c --- glibc-2.4/soft-fp/sqrttf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/sqrttf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/subdf3.c glibc-2.5/soft-fp/subdf3.c --- glibc-2.4/soft-fp/subdf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/subdf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/subsf3.c glibc-2.5/soft-fp/subsf3.c --- glibc-2.4/soft-fp/subsf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/subsf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/subtf3.c glibc-2.5/soft-fp/subtf3.c --- glibc-2.4/soft-fp/subtf3.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/subtf3.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/soft-fp/truncdfsf2.c glibc-2.5/soft-fp/truncdfsf2.c --- glibc-2.4/soft-fp/truncdfsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/truncdfsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/trunctfdf2.c glibc-2.5/soft-fp/trunctfdf2.c --- glibc-2.4/soft-fp/trunctfdf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/trunctfdf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/trunctfsf2.c glibc-2.5/soft-fp/trunctfsf2.c --- glibc-2.4/soft-fp/trunctfsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/trunctfsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -10,6 +10,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -17,8 +26,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/unorddf2.c glibc-2.5/soft-fp/unorddf2.c --- glibc-2.4/soft-fp/unorddf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/unorddf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -9,6 +9,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -16,8 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "double.h" diff -uprN glibc-2.4/soft-fp/unordsf2.c glibc-2.5/soft-fp/unordsf2.c --- glibc-2.4/soft-fp/unordsf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/unordsf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -9,6 +9,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -16,8 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "single.h" diff -uprN glibc-2.4/soft-fp/unordtf2.c glibc-2.5/soft-fp/unordtf2.c --- glibc-2.4/soft-fp/unordtf2.c 2006-02-25 01:26:21.000000000 +0000 +++ glibc-2.5/soft-fp/unordtf2.c 2006-04-04 08:24:47.000000000 +0000 @@ -9,6 +9,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Lesser General Public License restrictions do apply in + other respects; for example, they cover modification of the file, + and distribution when not linked into a combine executable.) + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -16,8 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "soft-fp.h" #include "quad.h" diff -uprN glibc-2.4/stdio-common/bug16.c glibc-2.5/stdio-common/bug16.c --- glibc-2.4/stdio-common/bug16.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/stdio-common/bug16.c 2006-08-08 15:44:33.000000000 +0000 @@ -0,0 +1,43 @@ +#include +#include + +struct +{ + long double val; + const char str[4][7]; +} tests[] = +{ + { 0x0.FFFFp+0L, { "0X1P+0", "0X2P-1", "0X4P-2", "0X8P-3" } }, + { 0x0.FFFFp+1L, { "0X1P+1", "0X2P+0", "0X4P-1", "0X8P-2" } }, + { 0x0.FFFFp+2L, { "0X1P+2", "0X2P+1", "0X4P+0", "0X8P-1" } }, + { 0x0.FFFFp+3L, { "0X1P+3", "0X2P+2", "0X4P+1", "0X8P+0" } } +}; + +static int +do_test (void) +{ + char buf[100]; + int ret = 0; + + for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) + { + snprintf (buf, sizeof (buf), "%.0LA", tests[i].val); + + size_t j; + for (j = 0; j < 4; ++j) + if (strcmp (buf, tests[i].str[j]) == 0) + break; + + if (j == 4) + { + printf ("%zd: got \"%s\", expected \"%s\" or equivalent\n", + i, buf, tests[i].str[0]); + ret = 1; + } + } + + return ret; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/stdio-common/Makefile glibc-2.5/stdio-common/Makefile --- glibc-2.4/stdio-common/Makefile 2006-01-14 12:09:45.000000000 +0000 +++ glibc-2.5/stdio-common/Makefile 2006-08-03 09:25:01.000000000 +0000 @@ -54,7 +54,7 @@ tests := tstscanf test_rdwr test-popen t tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \ tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \ - tst-fwrite + tst-fwrite bug16 test-srcs = tst-unbputc tst-printf diff -uprN glibc-2.4/stdio-common/printf_fp.c glibc-2.5/stdio-common/printf_fp.c --- glibc-2.4/stdio-common/printf_fp.c 2006-01-14 12:09:45.000000000 +0000 +++ glibc-2.5/stdio-common/printf_fp.c 2006-04-25 18:38:30.000000000 +0000 @@ -72,7 +72,11 @@ { \ register const int outc = (ch); \ if (putc (outc, fp) == EOF) \ - return -1; \ + { \ + if (buffer_malloced) \ + free (wbuffer); \ + return -1; \ + } \ ++done; \ } while (0) @@ -83,7 +87,11 @@ if (len > 20) \ { \ if (PUT (fp, wide ? (const char *) wptr : ptr, outlen) != outlen) \ - return -1; \ + { \ + if (buffer_malloced) \ + free (wbuffer); \ + return -1; \ + } \ ptr += outlen; \ done += outlen; \ } \ @@ -102,7 +110,11 @@ do \ { \ if (PAD (fp, ch, len) != len) \ - return -1; \ + { \ + if (buffer_malloced) \ + free (wbuffer); \ + return -1; \ + } \ done += len; \ } \ while (0) @@ -200,6 +212,11 @@ ___printf_fp (FILE *fp, /* Nonzero if this is output on a wide character stream. */ int wide = info->wide; + /* Buffer in which we produce the output. */ + wchar_t *wbuffer = NULL; + /* Flag whether wbuffer is malloc'ed or not. */ + int buffer_malloced = 0; + auto wchar_t hack_digit (void); wchar_t hack_digit (void) @@ -790,8 +807,7 @@ ___printf_fp (FILE *fp, { int width = info->width; - wchar_t *wbuffer, *wstartp, *wcp; - int buffer_malloced; + wchar_t *wstartp, *wcp; int chars_needed; int expscale; int intdig_max, intdig_no = 0; @@ -1109,8 +1125,12 @@ ___printf_fp (FILE *fp, buffer = (char *) malloc (2 + chars_needed + decimal_len + ngroups * thousands_sep_len); if (buffer == NULL) - /* Signal an error to the caller. */ - return -1; + { + /* Signal an error to the caller. */ + if (buffer_malloced) + free (wbuffer); + return -1; + } } else buffer = (char *) alloca (2 + chars_needed + decimal_len diff -uprN glibc-2.4/stdio-common/printf_fphex.c glibc-2.5/stdio-common/printf_fphex.c --- glibc-2.4/stdio-common/printf_fphex.c 2005-12-14 10:00:09.000000000 +0000 +++ glibc-2.5/stdio-common/printf_fphex.c 2006-08-03 09:37:36.000000000 +0000 @@ -1,5 +1,5 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 1997-2002,2004 Free Software Foundation, Inc. + Copyright (C) 1997-2002,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -399,12 +399,15 @@ __printf_fphex (FILE *fp, ++leading; else { - leading = 1; + leading = '1'; if (expnegative) { - exponent += 4; - if (exponent >= 0) - expnegative = 0; + exponent -= 4; + if (exponent <= 0) + { + exponent = -exponent; + expnegative = 0; + } } else exponent += 4; diff -uprN glibc-2.4/stdio-common/renameat.c glibc-2.5/stdio-common/renameat.c --- glibc-2.4/stdio-common/renameat.c 2005-12-20 07:31:14.000000000 +0000 +++ glibc-2.5/stdio-common/renameat.c 2006-04-27 14:29:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ renameat (oldfd, old, newfd, new) int newfd; const char *new; { - if ((oldfd < 0 & oldfd != AT_FDCWD) || (newfd < 0 && newfd != AT_FDCWD)) + if ((oldfd < 0 && oldfd != AT_FDCWD) || (newfd < 0 && newfd != AT_FDCWD)) { __set_errno (EBADF); return -1; diff -uprN glibc-2.4/stdio-common/tst-printf.c glibc-2.5/stdio-common/tst-printf.c --- glibc-2.4/stdio-common/tst-printf.c 2002-03-15 22:05:52.000000000 +0000 +++ glibc-2.5/stdio-common/tst-printf.c 2006-05-02 20:23:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,95,96,97,98,99, 2000, 2002 +/* Copyright (C) 1991,92,93,95,96,97,98,99, 2000, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -273,6 +273,15 @@ I am ready for my first lesson today."; printf ("printf (\"%%hhu\", %u) = %hhu\n", UCHAR_MAX + 2, UCHAR_MAX + 2); printf ("printf (\"%%hu\", %u) = %hu\n", USHRT_MAX + 2, USHRT_MAX + 2); + printf ("printf (\"%%hhi\", %i) = %hhi\n", UCHAR_MAX + 2, UCHAR_MAX + 2); + printf ("printf (\"%%hi\", %i) = %hi\n", USHRT_MAX + 2, USHRT_MAX + 2); + + printf ("printf (\"%%1$hhu\", %2$u) = %1$hhu\n", + UCHAR_MAX + 2, UCHAR_MAX + 2); + printf ("printf (\"%%1$hu\", %2$u) = %1$hu\n", USHRT_MAX + 2, USHRT_MAX + 2); + printf ("printf (\"%%1$hhi\", %2$i) = %1$hhi\n", + UCHAR_MAX + 2, UCHAR_MAX + 2); + printf ("printf (\"%%1$hi\", %2$i) = %1$hi\n", USHRT_MAX + 2, USHRT_MAX + 2); puts ("--- Should be no further output. ---"); rfg1 (); diff -uprN glibc-2.4/stdio-common/tst-printf.sh glibc-2.5/stdio-common/tst-printf.sh --- glibc-2.4/stdio-common/tst-printf.sh 2002-03-15 22:06:24.000000000 +0000 +++ glibc-2.5/stdio-common/tst-printf.sh 2006-05-05 13:37:17.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Testing of printf. -# Copyright (C) 2000, 2002 Free Software Foundation, Inc. +# Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc. # This file is part of the GNU C Library. # @@ -136,6 +136,12 @@ Test ok. sprintf (buf, "%07Lo", 040000000000ll) = 40000000000 printf ("%hhu", 257) = 1 printf ("%hu", 65537) = 1 +printf ("%hhi", 257) = 1 +printf ("%hi", 65537) = 1 +printf ("%1$hhu", 257) = 1 +printf ("%1$hu", 65537) = 1 +printf ("%1$hhi", 257) = 1 +printf ("%1$hi", 65537) = 1 --- Should be no further output. --- EOF cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 || @@ -246,6 +252,12 @@ Test ok. sprintf (buf, "%07Lo", 040000000000ll) = 40000000000 printf ("%hhu", 257) = 1 printf ("%hu", 65537) = 1 +printf ("%hhi", 257) = 1 +printf ("%hi", 65537) = 1 +printf ("%1$hhu", 257) = 1 +printf ("%1$hu", 65537) = 1 +printf ("%1$hhi", 257) = 1 +printf ("%1$hi", 65537) = 1 --- Should be no further output. --- EOF cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 || diff -uprN glibc-2.4/stdio-common/vfprintf.c glibc-2.5/stdio-common/vfprintf.c --- glibc-2.4/stdio-common/vfprintf.c 2006-01-14 12:09:45.000000000 +0000 +++ glibc-2.5/stdio-common/vfprintf.c 2006-05-02 20:25:15.000000000 +0000 @@ -530,14 +530,24 @@ vfprintf (FILE *s, const CHAR_T *format, { \ if (is_long_num) \ signed_number = va_arg (ap, long int); \ - else /* `char' and `short int' will be promoted to `int'. */ \ + else if (is_char) \ + signed_number = (signed char) va_arg (ap, unsigned int); \ + else if (!is_short) \ signed_number = va_arg (ap, int); \ + else \ + signed_number = (short int) va_arg (ap, unsigned int); \ } \ else \ if (is_long_num) \ signed_number = args_value[fspec->data_arg].pa_long_int; \ - else /* `char' and `short int' will be promoted to `int'. */ \ + else if (is_char) \ + signed_number = (signed char) \ + args_value[fspec->data_arg].pa_u_int; \ + else if (!is_short) \ signed_number = args_value[fspec->data_arg].pa_int; \ + else \ + signed_number = (short int) \ + args_value[fspec->data_arg].pa_u_int; \ \ is_negative = signed_number < 0; \ number.word = is_negative ? (- signed_number) : signed_number; \ diff -uprN glibc-2.4/stdio-common/vfscanf.c glibc-2.5/stdio-common/vfscanf.c --- glibc-2.4/stdio-common/vfscanf.c 2006-01-14 12:09:45.000000000 +0000 +++ glibc-2.5/stdio-common/vfscanf.c 2006-05-06 06:17:35.000000000 +0000 @@ -145,11 +145,6 @@ if (done == 0) done = EOF; \ goto errout; \ } while (0) -#define memory_error() do { \ - __set_errno (ENOMEM); \ - done = EOF; \ - goto errout; \ - } while (0) #define ARGCHECK(s, format) \ do \ { \ @@ -355,7 +350,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const do { c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); else if (c != (unsigned char) *f++) { @@ -383,7 +378,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const c = inchar (); /* Characters other than format specs must just match. */ - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); /* We saw white space char as the last character in the format @@ -391,12 +386,12 @@ _IO_vfscanf_internal (_IO_FILE *s, const if (skip_space) { while (ISSPACE (c)) - if (inchar () == EOF) + if (__builtin_expect (inchar () == EOF, 0)) input_error (); skip_space = 0; } - if (c != fc) + if (__builtin_expect (c != fc, 0)) { ungetc (c, s); conv_error (); @@ -532,7 +527,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const } /* End of the format string? */ - if (*f == L_('\0')) + if (__builtin_expect (*f == L_('\0'), 0)) conv_error (); /* Find the conversion specifier. */ @@ -544,7 +539,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const int save_errno = errno; errno = 0; do - if (inchar () == EOF && errno == EINTR) + if (__builtin_expect (inchar () == EOF && errno == EINTR, 0)) input_error (); while (ISSPACE (c)); errno = save_errno; @@ -556,9 +551,9 @@ _IO_vfscanf_internal (_IO_FILE *s, const { case L_('%'): /* Must match a literal '%'. */ c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); - if (c != fc) + if (__builtin_expect (c != fc, 0)) { ungetc_not_eof (c, s); conv_error (); @@ -624,7 +619,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const } c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); if (width == -1) @@ -640,7 +635,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const size_t n; n = __wcrtomb (!(flags & SUPPRESS) ? str : NULL, c, &state); - if (n == (size_t) -1) + if (__builtin_expect (n == (size_t) -1, 0)) /* No valid wide character. */ input_error (); @@ -675,7 +670,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const } c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); #ifdef COMPILE_WSCANF @@ -713,14 +708,14 @@ _IO_vfscanf_internal (_IO_FILE *s, const { /* Possibly correct character, just not enough input. */ - if (inchar () == EOF) + if (__builtin_expect (inchar () == EOF, 0)) encode_error (); buf[0] = c; continue; } - if (n != 1) + if (__builtin_expect (n != 1, 0)) encode_error (); /* We have a match. */ @@ -764,7 +759,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const STRING_ARG (str, char); c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); #ifdef COMPILE_WSCANF @@ -827,7 +822,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const n = __wcrtomb (!(flags & SUPPRESS) ? str : NULL, c, &state); - if (n == (size_t) -1) + if (__builtin_expect (n == (size_t) -1, 0)) encode_error (); assert (n <= MB_CUR_MAX); @@ -935,7 +930,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const STRING_ARG (wstr, wchar_t); c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); #ifndef COMPILE_WSCANF @@ -1010,14 +1005,14 @@ _IO_vfscanf_internal (_IO_FILE *s, const { /* Possibly correct character, just not enough input. */ - if (inchar () == EOF) + if (__builtin_expect (inchar () == EOF, 0)) encode_error (); buf[0] = c; continue; } - if (n != 1) + if (__builtin_expect (n != 1, 0)) encode_error (); /* We have a match. */ @@ -1112,7 +1107,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const number: c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); /* Check for a sign. */ @@ -1151,7 +1146,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const if (base == 0) base = 10; - if (base == 10 && (flags & I18N) != 0) + if (base == 10 && __builtin_expect ((flags & I18N) != 0, 0)) { int from_level; int to_level; @@ -1511,12 +1506,14 @@ _IO_vfscanf_internal (_IO_FILE *s, const { /* There was no number. If we are supposed to read a pointer we must recognize "(nil)" as well. */ - if (wpsize == 0 && read_pointer && (width < 0 || width >= 0) - && c == '(' - && TOLOWER (inchar ()) == L_('n') - && TOLOWER (inchar ()) == L_('i') - && TOLOWER (inchar ()) == L_('l') - && inchar () == L_(')')) + if (__builtin_expect (wpsize == 0 + && read_pointer + && (width < 0 || width >= 0) + && c == '(' + && TOLOWER (inchar ()) == L_('n') + && TOLOWER (inchar ()) == L_('i') + && TOLOWER (inchar ()) == L_('l') + && inchar () == L_(')'), 1)) /* We must produce the value of a NULL pointer. A single '0' digit is enough. */ ADDW (L_('0')); @@ -1549,7 +1546,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const else num.ul = __strtoul_internal (wp, &tw, base, flags & GROUP); } - if (wp == tw) + if (__builtin_expect (wp == tw, 0)) conv_error (); if (!(flags & SUPPRESS)) @@ -1594,7 +1591,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const case L_('a'): case L_('A'): c = inchar (); - if (c == EOF) + if (__builtin_expect (c == EOF, 0)) input_error (); got_dot = got_e = 0; @@ -1603,14 +1600,14 @@ _IO_vfscanf_internal (_IO_FILE *s, const if (c == L_('-') || c == L_('+')) { negative = c == L_('-'); - if (width == 0 || inchar () == EOF) + if (__builtin_expect (width == 0 || inchar () == EOF, 0)) /* EOF is only an input error before we read any chars. */ conv_error (); if (! ISDIGIT (c) && TOLOWER (c) != L_('i') && TOLOWER (c) != L_('n')) { #ifdef COMPILE_WSCANF - if (c != decimal) + if (__builtin_expect (c != decimal, 0)) { /* This is no valid number. */ ungetc (c, s); @@ -1635,7 +1632,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const break; } - if (*cmpp != '\0') + if (__builtin_expect (*cmpp != '\0', 0)) { /* This is no valid number. */ while (1) @@ -1674,12 +1671,16 @@ _IO_vfscanf_internal (_IO_FILE *s, const { /* Maybe "nan". */ ADDW (c); - if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('a')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('a'), 0)) conv_error (); if (width > 0) --width; ADDW (c); - if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('n'), 0)) conv_error (); if (width > 0) --width; @@ -1691,12 +1692,16 @@ _IO_vfscanf_internal (_IO_FILE *s, const { /* Maybe "inf" or "infinity". */ ADDW (c); - if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('n'), 0)) conv_error (); if (width > 0) --width; ADDW (c); - if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('f')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('f'), 0)) conv_error (); if (width > 0) --width; @@ -1710,26 +1715,30 @@ _IO_vfscanf_internal (_IO_FILE *s, const --width; /* Now we have to read the rest as well. */ ADDW (c); - if (width == 0 || inchar () == EOF - || TOLOWER (c) != L_('n')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('n'), 0)) conv_error (); if (width > 0) --width; ADDW (c); - if (width == 0 || inchar () == EOF - || TOLOWER (c) != L_('i')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('i'), 0)) conv_error (); if (width > 0) --width; ADDW (c); - if (width == 0 || inchar () == EOF - || TOLOWER (c) != L_('t')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('t'), 0)) conv_error (); if (width > 0) --width; ADDW (c); - if (width == 0 || inchar () == EOF - || TOLOWER (c) != L_('y')) + if (__builtin_expect (width == 0 + || inchar () == EOF + || TOLOWER (c) != L_('y'), 0)) conv_error (); if (width > 0) --width; @@ -1880,7 +1889,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const /* Have we read any character? If we try to read a number in hexadecimal notation and we have read only the `0x' prefix or no exponent this is an error. */ - if (wpsize == 0 || (is_hexa && (wpsize == 2 || ! got_e))) + if (__builtin_expect (wpsize == 0 + || (is_hexa && (wpsize == 2 || ! got_e)), 0)) conv_error (); scan_float: @@ -1905,7 +1915,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const *ARG (float *) = negative ? -d : d; } - if (tw == wp) + if (__builtin_expect (tw == wp, 0)) conv_error (); if (!(flags & SUPPRESS)) @@ -1945,7 +1955,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const while ((fc = *f++) != L'\0' && fc != L']'); - if (fc == L'\0') + if (__builtin_expect (fc == L'\0', 0)) conv_error (); wp = (wchar_t *) f - 1; #else @@ -1981,7 +1991,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const /* Add the character to the flag map. */ wp[fc] = 1; - if (fc == '\0') + if (__builtin_expect (fc == '\0', 0)) conv_error(); #endif @@ -1989,7 +1999,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const { size_t now = read_in; #ifdef COMPILE_WSCANF - if (inchar () == WEOF) + if (__builtin_expect (inchar () == WEOF, 0)) input_error (); do @@ -2094,7 +2104,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const size_t cnt = 0; mbstate_t cstate; - if (inchar () == EOF) + if (__builtin_expect (inchar () == EOF, 0)) input_error (); memset (&cstate, '\0', sizeof (cstate)); @@ -2171,13 +2181,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const } while (inchar () != EOF); - if (cnt != 0) + if (__builtin_expect (cnt != 0, 0)) /* We stopped in the middle of recognizing another character. That's a problem. */ encode_error (); #endif - if (now == read_in) + if (__builtin_expect (now == read_in, 0)) /* We haven't succesfully read any character. */ conv_error (); @@ -2202,7 +2212,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const { size_t now = read_in; - if (inchar () == EOF) + if (__builtin_expect (inchar () == EOF, 0)) input_error (); #ifdef COMPILE_WSCANF @@ -2304,7 +2314,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const } n = __wcrtomb (!(flags & SUPPRESS) ? str : NULL, c, &state); - if (n == (size_t) -1) + if (__builtin_expect (n == (size_t) -1, 0)) encode_error (); assert (n <= MB_CUR_MAX); @@ -2361,7 +2371,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const while (--width > 0 && inchar () != EOF); #endif - if (now == read_in) + if (__builtin_expect (now == read_in, 0)) /* We haven't succesfully read any character. */ conv_error (); diff -uprN glibc-2.4/stdlib/canonicalize.c glibc-2.5/stdlib/canonicalize.c --- glibc-2.4/stdlib/canonicalize.c 2005-04-27 07:26:44.000000000 +0000 +++ glibc-2.5/stdlib/canonicalize.c 2006-05-09 21:58:29.000000000 +0000 @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996-2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -91,7 +91,7 @@ __realpath (const char *name, char *reso rpath[0] = '\0'; goto error; } - dest = strchr (rpath, '\0'); + dest = __rawmemchr (rpath, '\0'); } else { diff -uprN glibc-2.4/stdlib/cxa_atexit.c glibc-2.5/stdlib/cxa_atexit.c --- glibc-2.4/stdlib/cxa_atexit.c 2005-12-18 17:30:24.000000000 +0000 +++ glibc-2.5/stdlib/cxa_atexit.c 2006-07-26 07:24:45.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -56,6 +56,7 @@ __libc_lock_define_initialized (static, static struct exit_function_list initial; struct exit_function_list *__exit_funcs = &initial; +uint64_t __new_exitfn_called; struct exit_function * __new_exitfn (void) @@ -111,7 +112,10 @@ __new_exitfn (void) /* Mark entry as used, but we don't know the flavor now. */ if (r != NULL) - r->flavor = ef_us; + { + r->flavor = ef_us; + ++__new_exitfn_called; + } __libc_lock_unlock (lock); diff -uprN glibc-2.4/stdlib/cxa_finalize.c glibc-2.5/stdlib/cxa_finalize.c --- glibc-2.4/stdlib/cxa_finalize.c 2005-12-18 17:31:14.000000000 +0000 +++ glibc-2.5/stdlib/cxa_finalize.c 2006-07-26 07:25:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,22 +31,36 @@ __cxa_finalize (void *d) { struct exit_function_list *funcs; + restart: for (funcs = __exit_funcs; funcs; funcs = funcs->next) { struct exit_function *f; for (f = &funcs->fns[funcs->idx - 1]; f >= &funcs->fns[0]; --f) - if ((d == NULL || d == f->func.cxa.dso_handle) - /* We don't want to run this cleanup more than once. */ - && ! atomic_compare_and_exchange_bool_acq (&f->flavor, ef_free, - ef_cxa)) - { - void (*cxafn) (void *arg, int status) = f->func.cxa.fn; + { + void (*cxafn) (void *arg, int status); + void *cxaarg; + + if ((d == NULL || d == f->func.cxa.dso_handle) + /* We don't want to run this cleanup more than once. */ + && (cxafn = f->func.cxa.fn, + cxaarg = f->func.cxa.arg, + ! atomic_compare_and_exchange_bool_acq (&f->flavor, ef_free, + ef_cxa))) + { + uint64_t check = __new_exitfn_called; + #ifdef PTR_DEMANGLE - PTR_DEMANGLE (cxafn); + PTR_DEMANGLE (cxafn); #endif - cxafn (f->func.cxa.arg, 0); - } + cxafn (cxaarg, 0); + + /* It is possible that that last exit function registered + more exit functions. Start the loop over. */ + if (__builtin_expect (check != __new_exitfn_called, 0)) + goto restart; + } + } } /* Remove the registered fork handlers. We do not have to diff -uprN glibc-2.4/stdlib/exit.h glibc-2.5/stdlib/exit.h --- glibc-2.4/stdlib/exit.h 2002-03-12 18:47:24.000000000 +0000 +++ glibc-2.5/stdlib/exit.h 2006-07-26 07:23:43.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,1996,1997,1999,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,1996,1997,1999,2001,2002,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +20,7 @@ #ifndef _EXIT_H #define _EXIT_H 1 +#include enum { @@ -59,5 +61,6 @@ struct exit_function_list extern struct exit_function_list *__exit_funcs attribute_hidden; extern struct exit_function *__new_exitfn (void); +extern uint64_t __new_exitfn_called attribute_hidden; #endif /* exit.h */ diff -uprN glibc-2.4/stdlib/fmtmsg.c glibc-2.5/stdlib/fmtmsg.c --- glibc-2.4/stdlib/fmtmsg.c 2005-07-20 17:50:25.000000000 +0000 +++ glibc-2.5/stdlib/fmtmsg.c 2006-05-15 18:41:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1999,2000-2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000-2003,2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -44,7 +44,7 @@ enum static const struct { - size_t len; + uint32_t len; /* Adjust the size if new elements are added. */ const char name[12]; } keywords[] = diff -uprN glibc-2.4/stdlib/longlong.h glibc-2.5/stdlib/longlong.h --- glibc-2.4/stdlib/longlong.h 2005-12-06 00:48:18.000000000 +0000 +++ glibc-2.5/stdlib/longlong.h 2006-05-15 20:25:33.000000000 +0000 @@ -1,7 +1,6 @@ /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -46,7 +45,7 @@ #define UDWtype UDItype #endif -extern const UQItype __clz_tab[256]; +extern const UQItype __clz_tab[256] attribute_hidden; /* Define auxiliary asm macros. diff -uprN glibc-2.4/stdlib/Makefile glibc-2.5/stdlib/Makefile --- glibc-2.4/stdlib/Makefile 2006-02-28 07:06:04.000000000 +0000 +++ glibc-2.5/stdlib/Makefile 2006-08-21 21:02:11.000000000 +0000 @@ -86,7 +86,7 @@ aux += fpioconst mp_clz_tab distribute := $(distribute) $(mpn-headers) fpioconst.h tst-putenvmod.c tests-extras += tst-putenvmod -extra-objs += tst-putenvmod.os +extra-test-objs += tst-putenvmod.os generated += isomac isomac.out tst-putenvmod.so diff -uprN glibc-2.4/stdlib/strfmon_l.c glibc-2.5/stdlib/strfmon_l.c --- glibc-2.4/stdlib/strfmon_l.c 2006-01-14 12:08:37.000000000 +0000 +++ glibc-2.5/stdlib/strfmon_l.c 2006-04-26 05:14:49.000000000 +0000 @@ -486,23 +486,21 @@ __vstrfmon_l (char *s, size_t maxsize, _ } if (print_curr_symbol) - { - out_string (currency_symbol); + out_string (currency_symbol); - if (sign_posn == 4) - { - if (sep_by_space == 2) - out_char (space_char); - out_string (sign_string); - if (sep_by_space == 1) - /* POSIX.2 and SUS are not clear on this case, but C99 - says a space follows the adjacent-symbol-and-sign */ - out_char (' '); - } - else - if (sep_by_space == 1) - out_char (space_char); + if (sign_posn == 4) + { + if (print_curr_symbol && sep_by_space == 2) + out_char (space_char); + out_string (sign_string); + if (sep_by_space == 1) + /* POSIX.2 and SUS are not clear on this case, but C99 + says a space follows the adjacent-symbol-and-sign */ + out_char (' '); } + else + if (print_curr_symbol && sep_by_space == 1) + out_char (space_char); } else if (sign_posn != 0 && sign_posn != 2 && sign_posn != 3 @@ -561,12 +559,13 @@ __vstrfmon_l (char *s, size_t maxsize, _ || (sign_posn == 0 && sep_by_space == 1)) out_char (space_char); out_nstring (currency_symbol, currency_symbol_len); - if (sign_posn == 4) - { - if (sep_by_space == 2) - out_char (' '); - out_string (sign_string); - } + } + + if (sign_posn == 4) + { + if (sep_by_space == 2) + out_char (' '); + out_string (sign_string); } } diff -uprN glibc-2.4/stdlib/strtol_l.c glibc-2.5/stdlib/strtol_l.c --- glibc-2.4/stdlib/strtol_l.c 2005-12-14 11:13:59.000000000 +0000 +++ glibc-2.5/stdlib/strtol_l.c 2006-08-08 15:51:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Convert string representing a number to integer value, using given locale. - Copyright (C) 1997, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -168,10 +168,15 @@ /* Define tables of maximum values and remainders in order to detect overflow. Do this at compile-time in order to avoid the runtime overhead of the division. */ +extern const unsigned long __strtol_ul_max_tab[] attribute_hidden; +extern const unsigned char __strtol_ul_rem_tab[] attribute_hidden; +#if defined(QUAD) && __WORDSIZE == 32 +extern const unsigned long long __strtol_ull_max_tab[] attribute_hidden; +extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden; +#endif #define DEF(TYPE, NAME) \ - const TYPE NAME[] attribute_hidden \ - __attribute__((section(".gnu.linkonce.r." #NAME))) = \ + const TYPE NAME[] attribute_hidden = \ { \ F(2), F(3), F(4), F(5), F(6), F(7), F(8), F(9), F(10), \ F(11), F(12), F(13), F(14), F(15), F(16), F(17), F(18), F(19), F(20), \ @@ -179,20 +184,22 @@ F(31), F(32), F(33), F(34), F(35), F(36) \ } -#define F(X) ULONG_MAX / X +#if !UNSIGNED && !defined (USE_WIDE_CHAR) && !defined (QUAD) +# define F(X) ULONG_MAX / X DEF (unsigned long, __strtol_ul_max_tab); -#undef F -#if defined(QUAD) && __WORDSIZE == 32 +# undef F +# define F(X) ULONG_MAX % X + DEF (unsigned char, __strtol_ul_rem_tab); +# undef F +#endif +#if !UNSIGNED && !defined (USE_WIDE_CHAR) && defined (QUAD) \ + && __WORDSIZE == 32 # define F(X) ULONG_LONG_MAX / X DEF (unsigned long long, __strtol_ull_max_tab); # undef F # define F(X) ULONG_LONG_MAX % X DEF (unsigned char, __strtol_ull_rem_tab); # undef F -#else -# define F(X) ULONG_MAX % X - DEF (unsigned char, __strtol_ul_rem_tab); -# undef F #endif #undef DEF diff -uprN glibc-2.4/stdlib/test-canon2.c glibc-2.5/stdlib/test-canon2.c --- glibc-2.4/stdlib/test-canon2.c 2001-07-06 04:55:41.000000000 +0000 +++ glibc-2.5/stdlib/test-canon2.c 2006-09-12 11:18:34.000000000 +0000 @@ -39,7 +39,7 @@ char *name2; void do_prepare (int argc, char *argv[]) { - char test_dir_len; + size_t test_dir_len; test_dir_len = strlen (test_dir); diff -uprN glibc-2.4/stdlib/test-canon.c glibc-2.5/stdlib/test-canon.c --- glibc-2.4/stdlib/test-canon.c 2005-04-27 07:32:32.000000000 +0000 +++ glibc-2.5/stdlib/test-canon.c 2006-08-01 06:38:48.000000000 +0000 @@ -1,5 +1,6 @@ /* Test program for returning the canonical absolute name of a given file. - Copyright (C) 1996,1997,2000,2002,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1996,1997,2000,2002,2004,2005,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger . @@ -213,7 +214,10 @@ do_test (int argc, char ** argv) } if (fd >= 0) - unlink ("doesExist/someFile"); + { + close (fd); + unlink ("doesExist/someFile"); + } if (has_dir) rmdir ("doesExist"); diff -uprN glibc-2.4/string/argz-replace.c glibc-2.5/string/argz-replace.c --- glibc-2.4/string/argz-replace.c 2001-07-06 04:55:41.000000000 +0000 +++ glibc-2.5/string/argz-replace.c 2006-05-10 06:17:46.000000000 +0000 @@ -1,5 +1,5 @@ /* String replacement in an argz vector - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader @@ -121,8 +121,7 @@ __argz_replace (char **argz, size_t *arg if (! delayed_copy) /* We never found any instances of str. */ { - if (src) - free (src); + free (src); *argz = dst; *argz_len = dst_len; } diff -uprN glibc-2.4/string/bug-envz1.c glibc-2.5/string/bug-envz1.c --- glibc-2.4/string/bug-envz1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/string/bug-envz1.c 2006-06-04 16:35:21.000000000 +0000 @@ -0,0 +1,76 @@ +/* Test for bug BZ #2703. */ +#include +#include +#include +#include + +static const struct +{ + const char *s; + int in_result; +} strs[] = +{ + { "a=1", 1 }, + { "b=2", 1 }, + { "(*)", 0 }, + { "(*)", 0 }, + { "e=5", 1 }, + { "f=", 1 }, + { "(*)", 0 }, + { "h=8", 1 }, + { "i=9", 1 }, + { "j", 0 } +}; + +#define nstrs (sizeof (strs) / sizeof (strs[0])) + + +static int +do_test (void) +{ + + size_t size = 0; + char *str = malloc (100); + if (str == NULL) + { + puts ("out of memory"); + return 1; + } + + char **argz = &str; + + for (int i = 0; i < nstrs; ++i) + argz_add_sep (argz, &size, strs[i].s, '\0'); + + printf ("calling envz_strip with size=%zu\n", size); + envz_strip (argz, &size); + + int result = 0; + printf ("new size=%zu\n", size); + for (int i = 0; i < nstrs; ++i) + if (strs[i].in_result) + { + char name[2]; + name[0] = strs[i].s[0]; + name[1] = '\0'; + + char *e = envz_entry (*argz, size, name); + if (e == NULL) + { + printf ("entry '%s' not found\n", name); + result = 1; + } + else if (strcmp (e, strs[i].s) != 0) + { + printf ("entry '%s' does not match: is '%s', expected '%s'\n", + name, e, strs[i].s); + result = 1; + } + } + + free (*argz); + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/string/envz.c glibc-2.5/string/envz.c --- glibc-2.4/string/envz.c 2002-08-06 06:08:16.000000000 +0000 +++ glibc-2.5/string/envz.c 2006-06-04 04:34:14.000000000 +0000 @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated environment vectors - Copyright (C) 1995,96,97,98,2001,02 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2001,2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader @@ -165,7 +165,7 @@ envz_strip (char **envz, size_t *envz_le left -= entry_len; if (! strchr (entry, SEP)) /* Null entry. */ - memmove (entry + entry_len, entry, left); + memmove (entry, entry + entry_len, left); else entry += entry_len; } diff -uprN glibc-2.4/string/Makefile glibc-2.5/string/Makefile --- glibc-2.4/string/Makefile 2006-01-10 00:11:53.000000000 +0000 +++ glibc-2.5/string/Makefile 2006-06-04 16:35:25.000000000 +0000 @@ -53,7 +53,8 @@ tests := tester inl-tester noinl-tester tst-strlen stratcliff tst-svc tst-inlcall \ bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \ tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \ - bug-strtok1 $(addprefix test-,$(strop-tests)) + bug-strtok1 $(addprefix test-,$(strop-tests)) \ + bug-envz1 distribute := memcopy.h pagecopy.h tst-svc.expect test-string.h @@ -64,10 +65,12 @@ inl-tester-ENV = LANGUAGE=C noinl-tester-ENV = LANGUAGE=C tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata +CFLAGS-inl-tester.c = -fno-builtin CFLAGS-noinl-tester.c = -fno-builtin CFLAGS-tst-strlen.c = -fno-builtin CFLAGS-stratcliff.c = -fno-builtin CFLAGS-test-ffs.c = -fno-builtin +CFLAGS-tst-inlcall.c = -fno-builtin ifeq ($(cross-compiling),no) tests: $(objpfx)tst-svc.out diff -uprN glibc-2.4/string/strchr.c glibc-2.5/string/strchr.c --- glibc-2.4/string/strchr.c 2005-12-14 11:07:05.000000000 +0000 +++ glibc-2.5/string/strchr.c 2006-08-22 06:46:40.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,93,94,95,96,97,99,2000,03 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993-1997,1999,2000,2003,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -42,8 +43,8 @@ strchr (s, c_in) /* Handle the first few characters by reading one character at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = s; ((unsigned long int) char_ptr - & (sizeof (longword) - 1)) != 0; + for (char_ptr = (const unsigned char *) s; + ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0; ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; diff -uprN glibc-2.4/string/_strerror.c glibc-2.5/string/_strerror.c --- glibc-2.4/string/_strerror.c 2005-12-14 08:14:22.000000000 +0000 +++ glibc-2.5/string/_strerror.c 2006-06-21 19:40:36.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,93,95,96,97,98,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,95,96,97,98,2000,2002,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -35,8 +36,8 @@ char * __strerror_r (int errnum, char *buf, size_t buflen) { - if (errnum < 0 || errnum >= _sys_nerr_internal - || _sys_errlist_internal[errnum] == NULL) + if (__builtin_expect (errnum < 0 || errnum >= _sys_nerr_internal + || _sys_errlist_internal[errnum] == NULL, 0)) { /* Buffer we use to print the number in. For a maximum size for `int' of 8 bytes we never need more than 20 digits. */ diff -uprN glibc-2.4/sunrpc/des_impl.c glibc-2.5/sunrpc/des_impl.c --- glibc-2.4/sunrpc/des_impl.c 2005-03-06 00:06:47.000000000 +0000 +++ glibc-2.5/sunrpc/des_impl.c 2006-05-05 16:10:35.000000000 +0000 @@ -6,10 +6,11 @@ /* write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,*/ /* Boston, MA 02111, USA to obtain a copy. */ #include +#include #include "des.h" -static const unsigned long des_SPtrans[8][64] = +static const uint32_t des_SPtrans[8][64] = { { /* nibble 0 */ 0x00820200, 0x00020000, 0x80800000, 0x80820200, @@ -155,7 +156,7 @@ static const unsigned long des_SPtrans[8 0x00000020, 0x08208000, 0x00208020, 0x00000000, 0x08000000, 0x08200020, 0x00008000, 0x00208020}}; -static const unsigned long des_skb[8][64] = +static const uint32_t des_skb[8][64] = { { /* for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ 0x00000000, 0x00000010, 0x20000000, 0x20000010, @@ -352,26 +353,6 @@ static const unsigned long des_skb[8][64 (a)=(a)^(t)^(t>>(16-(n)))) -/* The changes to this macro may help or hinder, depending on the - * compiler and the achitecture. gcc2 always seems to do well :-). - * Inspired by Dana How - * DO NOT use the alternative version on machines with 8 byte longs. - */ -#ifdef ALT_ECB -#define D_ENCRYPT(L,R,S) \ - u=((R^s[S ])<<2); \ - t= R^s[S+1]; \ - t=((t>>2)+(t<<30)); \ - L^= \ - *(const unsigned long *)(des_SP+0x0100+((t )&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0300+((t>> 8)&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0500+((t>>16)&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0700+((t>>24)&0xfc))+ \ - *(const unsigned long *)(des_SP+ ((u )&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0200+((u>> 8)&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0400+((u>>16)&0xfc))+ \ - *(const unsigned long *)(des_SP+0x0600+((u>>24)&0xfc)); -#else /* original version */ #define D_ENCRYPT(L,R,S) \ u=(R^s[S ]); \ t=R^s[S+1]; \ @@ -384,7 +365,6 @@ static const unsigned long des_skb[8][64 des_SPtrans[2][(u>> 8)&0x3f]| \ des_SPtrans[4][(u>>16)&0x3f]| \ des_SPtrans[6][(u>>24)&0x3f]; -#endif #define ITERATIONS 16 @@ -464,9 +444,6 @@ internal_function des_encrypt (unsigned long *buf, unsigned long *schedule, int encrypt) { register unsigned long l, r, t, u; -#ifdef ALT_ECB - register const unsigned char *des_SP = (const unsigned char *) des_SPtrans; -#endif register int i; register unsigned long *s; diff -uprN glibc-2.4/sunrpc/key_call.c glibc-2.5/sunrpc/key_call.c --- glibc-2.4/sunrpc/key_call.c 2005-03-06 00:25:54.000000000 +0000 +++ glibc-2.5/sunrpc/key_call.c 2006-05-17 15:10:44.000000000 +0000 @@ -400,6 +400,7 @@ getkeyserv_handle (int vers) /* if pid has changed, destroy client and rebuild */ if (kcp->client != NULL && kcp->pid != __getpid ()) { + auth_destroy (kcp->client->cl_auth); clnt_destroy (kcp->client); kcp->client = NULL; } @@ -552,8 +553,11 @@ __rpc_thread_key_cleanup (void) struct key_call_private *kcp = RPC_THREAD_VARIABLE(key_call_private_s); if (kcp) { - if (kcp->client) + if (kcp->client) { + if (kcp->client->cl_auth) + auth_destroy (kcp->client->cl_auth); clnt_destroy(kcp->client); + } free (kcp); } } diff -uprN glibc-2.4/sunrpc/rpc_cout.c glibc-2.5/sunrpc/rpc_cout.c --- glibc-2.4/sunrpc/rpc_cout.c 2005-11-21 15:43:03.000000000 +0000 +++ glibc-2.5/sunrpc/rpc_cout.c 2006-04-07 04:08:05.000000000 +0000 @@ -551,6 +551,7 @@ inline_struct (definition *def, int flag } size = 0; i = 0; + free (sizestr); sizestr = NULL; print_stat (indent + 1, &dl->decl); } diff -uprN glibc-2.4/sunrpc/rpc_main.c glibc-2.5/sunrpc/rpc_main.c --- glibc-2.4/sunrpc/rpc_main.c 2005-11-21 15:43:03.000000000 +0000 +++ glibc-2.5/sunrpc/rpc_main.c 2006-04-07 03:14:00.000000000 +0000 @@ -531,7 +531,7 @@ generate_guard (const char *pathname) filename = strrchr (pathname, '/'); /* find last component */ filename = ((filename == NULL) ? pathname : filename + 1); - guard = strdup (filename); + guard = extendfile (filename, "_H_RPCGEN"); /* convert to upper case */ tmp = guard; while (*tmp) @@ -541,7 +541,6 @@ generate_guard (const char *pathname) tmp++; } - guard = extendfile (guard, "_H_RPCGEN"); return guard; } @@ -661,6 +660,7 @@ h_output (const char *infile, const char } fprintf (fout, "\n#endif /* !_%s */\n", guard); + free (guard); close_input (); close_output (outfilename); } @@ -946,6 +946,8 @@ clnt_output (const char *infile, const c close_output (outfilename); } +static const char space[] = " "; + static char * file_name (const char *file, const char *ext) { @@ -954,16 +956,17 @@ file_name (const char *file, const char if (access (temp, F_OK) != -1) return (temp); - else - return ((char *) " "); + + free (temp); + return (char *) space; } static void mkfile_output (struct commandline *cmd) { char *mkfilename; - const char *clientname, *clntname, *xdrname, *hdrname; - const char *servername, *svcname, *servprogname, *clntprogname; + char *clientname, *clntname, *xdrname, *hdrname; + char *servername, *svcname, *servprogname, *clntprogname; svcname = file_name (cmd->infile, "_svc.c"); clntname = file_name (cmd->infile, "_clnt.c"); @@ -977,8 +980,8 @@ mkfile_output (struct commandline *cmd) } else { - servername = " "; - clientname = " "; + servername = (char *) space; + clientname = (char *) space; } servprogname = extendfile (cmd->infile, "_server"); clntprogname = extendfile (cmd->infile, "_client"); @@ -988,6 +991,8 @@ mkfile_output (struct commandline *cmd) char *cp, *temp; mkfilename = alloc (strlen ("Makefile.") + strlen (cmd->infile) + 1); + if (mkfilename == NULL) + abort (); temp = rindex (cmd->infile, '.'); cp = stpcpy (mkfilename, "Makefile."); strncpy (cp, cmd->infile, (temp - cmd->infile)); @@ -1046,6 +1051,23 @@ $(LDLIBS) \n\n"); f_print (fout, "clean:\n\t $(RM) core $(TARGETS) $(OBJECTS_CLNT) \ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n"); close_output (mkfilename); + + free (clntprogname); + free (servprogname); + if (servername != space) + free (servername); + if (clientname != space) + free (clientname); + if (mkfilename != (char *) cmd->outfile) + free (mkfilename); + if (svcname != space) + free (svcname); + if (clntname != space) + free (clntname); + if (xdrname != space) + free (xdrname); + if (hdrname != space) + free (hdrname); } /* diff -uprN glibc-2.4/sunrpc/rpc_parse.c glibc-2.5/sunrpc/rpc_parse.c --- glibc-2.4/sunrpc/rpc_parse.c 2005-11-21 15:43:03.000000000 +0000 +++ glibc-2.5/sunrpc/rpc_parse.c 2006-04-07 18:36:30.000000000 +0000 @@ -91,6 +91,7 @@ get_definition (void) def_const (defp); break; case TOK_EOF: + free (defp); return (NULL); default: error ("definition keyword expected"); @@ -302,7 +303,9 @@ def_union (definition *defp) case_list *cases; /* case_list *tcase; */ case_list **tailp; +#if 0 int flag; +#endif defp->def_kind = DEF_UNION; scan (TOK_IDENT, &tok); @@ -322,7 +325,9 @@ def_union (definition *defp) cases->case_name = tok.str; scan (TOK_COLON, &tok); /* now peek at next token */ +#if 0 flag = 0; +#endif if (peekscan (TOK_CASE, &tok)) { @@ -339,6 +344,7 @@ def_union (definition *defp) } while (peekscan (TOK_CASE, &tok)); } +#if 0 else if (flag) { @@ -346,6 +352,7 @@ def_union (definition *defp) tailp = &cases->next; cases = ALLOC (case_list); }; +#endif get_declaration (&dec, DEF_UNION); cases->case_decl = dec; diff -uprN glibc-2.4/sunrpc/rpc_scan.c glibc-2.5/sunrpc/rpc_scan.c --- glibc-2.4/sunrpc/rpc_scan.c 2005-11-21 15:43:03.000000000 +0000 +++ glibc-2.5/sunrpc/rpc_scan.c 2006-04-07 04:04:15.000000000 +0000 @@ -535,6 +535,7 @@ docppline (const char *line, int *lineno *p = 0; if (*file == 0) { + free (file); *fname = NULL; } else diff -uprN glibc-2.4/sunrpc/rpc_thread.c glibc-2.5/sunrpc/rpc_thread.c --- glibc-2.4/sunrpc/rpc_thread.c 2003-02-22 01:57:51.000000000 +0000 +++ glibc-2.5/sunrpc/rpc_thread.c 2006-05-04 18:07:29.000000000 +0000 @@ -20,7 +20,7 @@ __rpc_thread_destroy (void) { struct rpc_thread_variables *tvp = __libc_tsd_get (RPC_VARS); - if (tvp != NULL && tvp != &__libc_tsd_RPC_VARS_mem) { + if (tvp != NULL) { __rpc_thread_svc_cleanup (); __rpc_thread_clnt_cleanup (); __rpc_thread_key_cleanup (); @@ -29,7 +29,8 @@ __rpc_thread_destroy (void) free (tvp->svcraw_private_s); free (tvp->authdes_cache_s); free (tvp->authdes_lru_s); - free (tvp); + if (tvp != &__libc_tsd_RPC_VARS_mem) + free (tvp); __libc_tsd_set (RPC_VARS, NULL); } } diff -uprN glibc-2.4/sunrpc/svcauth_des.c glibc-2.5/sunrpc/svcauth_des.c --- glibc-2.4/sunrpc/svcauth_des.c 2005-02-17 01:17:10.000000000 +0000 +++ glibc-2.5/sunrpc/svcauth_des.c 2006-05-05 16:18:06.000000000 +0000 @@ -396,11 +396,9 @@ cache_init (void) register int i; authdes_cache = (struct cache_entry *) - mem_alloc (sizeof (struct cache_entry) * AUTHDES_CACHESZ); + calloc (sizeof (struct cache_entry) * AUTHDES_CACHESZ, 1); if (authdes_cache == NULL) return; - __bzero ((char *) authdes_cache, - sizeof (struct cache_entry) * AUTHDES_CACHESZ); authdes_lru = (int *) mem_alloc (sizeof (int) * AUTHDES_CACHESZ); /* diff -uprN glibc-2.4/sunrpc/svc_udp.c glibc-2.5/sunrpc/svc_udp.c --- glibc-2.4/sunrpc/svc_udp.c 2005-07-20 17:50:28.000000000 +0000 +++ glibc-2.5/sunrpc/svc_udp.c 2006-05-05 16:15:07.000000000 +0000 @@ -406,8 +406,8 @@ svcudp_destroy (xprt) #define ALLOC(type, size) \ (type *) mem_alloc((unsigned) (sizeof(type) * (size))) -#define BZERO(addr, type, size) \ - __bzero((char *) addr, sizeof(type) * (int) (size)) +#define CALLOC(type, size) \ + (type *) calloc (sizeof (type), size) /* * An entry in the cache @@ -482,20 +482,21 @@ svcudp_enablecache (SVCXPRT *transp, u_l } uc->uc_size = size; uc->uc_nextvictim = 0; - uc->uc_entries = ALLOC (cache_ptr, size * SPARSENESS); + uc->uc_entries = CALLOC (cache_ptr, size * SPARSENESS); if (uc->uc_entries == NULL) { + mem_free (uc, sizeof (struct udp_cache)); CACHE_PERROR (_("enablecache: could not allocate cache data")); return 0; } - BZERO (uc->uc_entries, cache_ptr, size * SPARSENESS); - uc->uc_fifo = ALLOC (cache_ptr, size); + uc->uc_fifo = CALLOC (cache_ptr, size); if (uc->uc_fifo == NULL) { + mem_free (uc->uc_entries, size * SPARSENESS); + mem_free (uc, sizeof (struct udp_cache)); CACHE_PERROR (_("enablecache: could not allocate cache fifo")); return 0; } - BZERO (uc->uc_fifo, cache_ptr, size); su->su_cache = (char *) uc; return 1; } @@ -545,6 +546,7 @@ cache_set (SVCXPRT *xprt, u_long replyle newbuf = mem_alloc (su->su_iosz); if (newbuf == NULL) { + mem_free (victim, sizeof (struct cache_node)); CACHE_PERROR (_("cache_set: could not allocate new rpc_buffer")); return; } diff -uprN glibc-2.4/sunrpc/xdr_array.c glibc-2.5/sunrpc/xdr_array.c --- glibc-2.4/sunrpc/xdr_array.c 2005-07-20 17:50:28.000000000 +0000 +++ glibc-2.5/sunrpc/xdr_array.c 2006-05-04 20:55:11.000000000 +0000 @@ -74,7 +74,6 @@ xdr_array (xdrs, addrp, sizep, maxsize, caddr_t target = *addrp; u_int c; /* the actual element count */ bool_t stat = TRUE; - u_int nodesize; /* like strings, arrays are really counted arrays */ if (!INTUSE(xdr_u_int) (xdrs, sizep)) @@ -90,7 +89,6 @@ xdr_array (xdrs, addrp, sizep, maxsize, { return FALSE; } - nodesize = c * elsize; /* * if we are deserializing, we may need to allocate an array. @@ -102,13 +100,12 @@ xdr_array (xdrs, addrp, sizep, maxsize, case XDR_DECODE: if (c == 0) return TRUE; - *addrp = target = mem_alloc (nodesize); + *addrp = target = calloc (c, elsize); if (target == NULL) { (void) __fxprintf (NULL, "%s", _("xdr_array: out of memory\n")); return FALSE; } - __bzero (target, nodesize); break; case XDR_FREE: @@ -131,7 +128,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, */ if (xdrs->x_op == XDR_FREE) { - mem_free (*addrp, nodesize); + mem_free (*addrp, c * elsize); *addrp = NULL; } return stat; diff -uprN glibc-2.4/sunrpc/xdr_rec.c glibc-2.5/sunrpc/xdr_rec.c --- glibc-2.4/sunrpc/xdr_rec.c 2005-07-20 17:50:28.000000000 +0000 +++ glibc-2.5/sunrpc/xdr_rec.c 2006-05-20 19:07:13.000000000 +0000 @@ -176,7 +176,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize /* * now the rest ... */ - /* We have to add the const since the `struct xdr_ops' in `struct XDR' + /* We have to add the cast since the `struct xdr_ops' in `struct XDR' is not `const'. */ xdrs->x_ops = (struct xdr_ops *) &xdrrec_ops; xdrs->x_private = (caddr_t) rstrm; diff -uprN glibc-2.4/sunrpc/xdr_ref.c glibc-2.5/sunrpc/xdr_ref.c --- glibc-2.4/sunrpc/xdr_ref.c 2005-07-20 17:50:28.000000000 +0000 +++ glibc-2.5/sunrpc/xdr_ref.c 2006-05-05 15:56:35.000000000 +0000 @@ -79,14 +79,13 @@ xdr_reference (xdrs, pp, size, proc) return TRUE; case XDR_DECODE: - *pp = loc = (caddr_t) mem_alloc (size); + *pp = loc = (caddr_t) calloc (1, size); if (loc == NULL) { (void) __fxprintf (NULL, "%s", _("xdr_reference: out of memory\n")); return FALSE; } - __bzero (loc, (int) size); break; default: break; diff -uprN glibc-2.4/sysdeps/generic/ldsodefs.h glibc-2.5/sysdeps/generic/ldsodefs.h --- glibc-2.4/sysdeps/generic/ldsodefs.h 2006-03-01 06:18:33.000000000 +0000 +++ glibc-2.5/sysdeps/generic/ldsodefs.h 2006-08-24 20:27:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -59,8 +59,8 @@ __BEGIN_DECLS /* Result of the lookup functions and how to retrieve the base address. */ typedef struct link_map *lookup_t; -# define LOOKUP_VALUE(map) map -# define LOOKUP_VALUE_ADDRESS(map) ((map) ? (map)->l_addr : 0) +#define LOOKUP_VALUE(map) map +#define LOOKUP_VALUE_ADDRESS(map) ((map) ? (map)->l_addr : 0) /* On some architectures a pointer to a function is not just a pointer to the actual code of the function but rather an architecture @@ -76,7 +76,7 @@ typedef struct link_map *lookup_t; /* On some architectures dladdr can't use st_size of all symbols this way. */ #define DL_ADDR_SYM_MATCH(L, SYM, MATCHSYM, ADDR) \ ((ADDR) >= (L)->l_addr + (SYM)->st_value \ - && (((SYM)->st_size == 0 \ + && ((((SYM)->st_shndx == SHN_UNDEF || (SYM)->st_size == 0) \ && (ADDR) == (L)->l_addr + (SYM)->st_value) \ || (ADDR) < (L)->l_addr + (SYM)->st_value + (SYM)->st_size) \ && ((MATCHSYM) == NULL || (MATCHSYM)->st_value < (SYM)->st_value)) @@ -193,8 +193,6 @@ struct La_ppc64_regs; struct La_ppc64_retval; struct La_sh_regs; struct La_sh_retval; -struct La_m68k_regs; -struct La_m68k_retval; struct La_alpha_regs; struct La_alpha_retval; struct La_s390_32_regs; @@ -203,10 +201,6 @@ struct La_s390_64_regs; struct La_s390_64_retval; struct La_ia64_regs; struct La_ia64_retval; -struct La_mips_32_regs; -struct La_mips_32_retval; -struct La_mips_64_regs; -struct La_mips_64_retval; struct La_sparc32_regs; struct La_sparc32_retval; struct La_sparc64_regs; @@ -247,10 +241,6 @@ struct audit_ifaces uintptr_t *, const struct La_sh_regs *, unsigned int *, const char *name, long int *framesizep); - Elf32_Addr (*m68k_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, - uintptr_t *, struct La_m68k_regs *, - unsigned int *, const char *name, - long int *framesizep); Elf64_Addr (*alpha_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *, uintptr_t *, struct La_alpha_regs *, unsigned int *, const char *name, @@ -267,21 +257,6 @@ struct audit_ifaces uintptr_t *, struct La_ia64_regs *, unsigned int *, const char *name, long int *framesizep); - Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_32_regs *, - unsigned int *, const char *name, - long int *framesizep); - Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_64_regs *, - unsigned int *, const char *name, - long int *framesizep); - Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_64_regs *, - unsigned int *, const char *name, - long int *framesizep); Elf32_Addr (*sparc32_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, uintptr_t *, const struct La_sparc32_regs *, @@ -317,9 +292,6 @@ struct audit_ifaces unsigned int (*sh_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, uintptr_t *, const struct La_sh_regs *, struct La_sh_retval *, const char *); - unsigned int (*m68k_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, - uintptr_t *, const struct La_m68k_regs *, - struct La_m68k_retval *, const char *); unsigned int (*alpha_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *, uintptr_t *, const struct La_alpha_regs *, @@ -338,21 +310,6 @@ struct audit_ifaces uintptr_t *, const struct La_ia64_regs *, struct La_ia64_retval *, const char *); - unsigned int (*mips_o32_gnu_pltexit) (Elf32_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_32_regs *, - struct La_mips_32_retval *, - const char *); - unsigned int (*mips_n32_gnu_pltexit) (Elf32_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_64_regs *, - struct La_mips_64_retval *, - const char *); - unsigned int (*mips_n64_gnu_pltexit) (Elf64_Sym *, unsigned int, - uintptr_t *, uintptr_t *, - const struct La_mips_64_regs *, - struct La_mips_64_retval *, - const char *); unsigned int (*sparc32_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, uintptr_t *, const struct La_sparc32_regs *, @@ -374,7 +331,7 @@ struct audit_ifaces /* Test whether given NAME matches any of the names of the given object. */ -extern int _dl_name_match_p (const char *__name, struct link_map *__map) +extern int _dl_name_match_p (const char *__name, const struct link_map *__map) internal_function; /* Function used as argument for `_dl_receive_error' function. The diff -uprN glibc-2.4/sysdeps/generic/local-setxid.h glibc-2.5/sysdeps/generic/local-setxid.h --- glibc-2.4/sysdeps/generic/local-setxid.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/generic/local-setxid.h 2006-06-04 22:15:39.000000000 +0000 @@ -0,0 +1,4 @@ +/* No special support. Fall back to the regular functions. */ + +#define local_seteuid(id) seteuid (id) +#define local_setegid(id) setegid (id) diff -uprN glibc-2.4/sysdeps/generic/stdint.h glibc-2.5/sysdeps/generic/stdint.h --- glibc-2.4/sysdeps/generic/stdint.h 2001-08-18 22:15:39.000000000 +0000 +++ glibc-2.5/sysdeps/generic/stdint.h 2006-08-12 21:22:51.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,1999,2000,2001,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -297,8 +297,8 @@ typedef unsigned long long int uintmax_t # endif /* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U +# define UINT8_C(c) c +# define UINT16_C(c) c # define UINT32_C(c) c ## U # if __WORDSIZE == 64 # define UINT64_C(c) c ## UL diff -uprN glibc-2.4/sysdeps/generic/unwind-dw2.c glibc-2.5/sysdeps/generic/unwind-dw2.c --- glibc-2.4/sysdeps/generic/unwind-dw2.c 2005-12-21 21:36:17.000000000 +0000 +++ glibc-2.5/sysdeps/generic/unwind-dw2.c 2006-05-02 00:45:11.000000000 +0000 @@ -1,5 +1,5 @@ /* DWARF2 exception handling and frame unwind runtime interface routines. - Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005 + Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -837,9 +838,16 @@ execute_cfa_program (const unsigned char case DW_CFA_restore_state: { struct frame_state_reg_info *old_rs = fs->regs.prev; - fs->regs = *old_rs; - old_rs->prev = unused_rs; - unused_rs = old_rs; +#ifdef _LIBC + if (old_rs == NULL) + __libc_fatal ("invalid DWARF unwind data"); + else +#endif + { + fs->regs = *old_rs; + old_rs->prev = unused_rs; + unused_rs = old_rs; + } } break; @@ -897,12 +905,16 @@ execute_cfa_program (const unsigned char break; case DW_CFA_GNU_window_save: - /* ??? Hardcoded for SPARC register window configuration. */ + /* ??? Hardcoded for SPARC register window configuration. + At least do not do anything for archs which explicitly + define a lower register number. */ +#if DWARF_FRAME_REGISTERS >= 32 for (reg = 16; reg < 32; ++reg) { fs->regs.reg[reg].how = REG_SAVED_OFFSET; fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *); } +#endif break; case DW_CFA_GNU_args_size: diff -uprN glibc-2.4/sysdeps/generic/unwind-dw2-fde.c glibc-2.5/sysdeps/generic/unwind-dw2-fde.c --- glibc-2.4/sysdeps/generic/unwind-dw2-fde.c 2004-05-18 21:18:52.000000000 +0000 +++ glibc-2.5/sysdeps/generic/unwind-dw2-fde.c 2006-04-07 20:50:31.000000000 +0000 @@ -1,5 +1,5 @@ /* Subroutines needed for unwinding stack frames for exception handling. */ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. Contributed by Jason Merrill . @@ -595,7 +595,7 @@ end_fde_sort (struct object *ob, struct { fde_compare_t fde_compare; - if (accu->linear && accu->linear->count != count) + if (accu->linear->count != count) abort (); if (ob->s.b.mixed_encoding) diff -uprN glibc-2.4/sysdeps/i386/bits/byteswap.h glibc-2.5/sysdeps/i386/bits/byteswap.h --- glibc-2.4/sysdeps/i386/bits/byteswap.h 2003-06-12 01:34:36.000000000 +0000 +++ glibc-2.5/sysdeps/i386/bits/byteswap.h 2006-08-24 07:02:16.000000000 +0000 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1997,1998,2000,2002,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -65,7 +65,8 @@ __bswap_16 (unsigned short int __bsx) /* To swap the bytes in a word the i486 processors and up provide the `bswap' opcode. On i386 we have to use three instructions. */ # if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \ - && !defined __pentium4__ + && !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \ + && !defined __k6__ # define __bswap_32(x) \ (__extension__ \ ({ register unsigned int __v, __x = (x); \ diff -uprN glibc-2.4/sysdeps/ieee754/dbl-64/s_llrint.c glibc-2.5/sysdeps/ieee754/dbl-64/s_llrint.c --- glibc-2.4/sysdeps/ieee754/dbl-64/s_llrint.c 2004-02-01 19:20:22.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/dbl-64/s_llrint.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,7 +23,7 @@ #include "math_private.h" -static const long double two52[2] = +static const double two52[2] = { 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */ @@ -48,19 +48,14 @@ __llrint (double x) if (j0 < 20) { - if (j0 < -1) - return 0; - else - { - w = two52[sx] + x; - t = w - two52[sx]; - EXTRACT_WORDS (i0, i1, t); - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; - i0 &= 0xfffff; - i0 |= 0x100000; + w = two52[sx] + x; + t = w - two52[sx]; + EXTRACT_WORDS (i0, i1, t); + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; + i0 &= 0xfffff; + i0 |= 0x100000; - result = i0 >> (20 - j0); - } + result = (j0 < 0 ? 0 : i0 >> (20 - j0)); } else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1) { diff -uprN glibc-2.4/sysdeps/ieee754/dbl-64/s_lrint.c glibc-2.5/sysdeps/ieee754/dbl-64/s_lrint.c --- glibc-2.4/sysdeps/ieee754/dbl-64/s_lrint.c 2004-02-01 19:01:03.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/dbl-64/s_lrint.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -48,19 +48,14 @@ __lrint (double x) if (j0 < 20) { - if (j0 < -1) - return 0; - else - { - w = two52[sx] + x; - t = w - two52[sx]; - EXTRACT_WORDS (i0, i1, t); - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; - i0 &= 0xfffff; - i0 |= 0x100000; + w = two52[sx] + x; + t = w - two52[sx]; + EXTRACT_WORDS (i0, i1, t); + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; + i0 &= 0xfffff; + i0 |= 0x100000; - result = i0 >> (20 - j0); - } + result = (j0 < 0 ? 0 : i0 >> (20 - j0)); } else if (j0 < (int32_t) (8 * sizeof (long int)) - 1) { diff -uprN glibc-2.4/sysdeps/ieee754/flt-32/s_llrintf.c glibc-2.5/sysdeps/ieee754/flt-32/s_llrintf.c --- glibc-2.4/sysdeps/ieee754/flt-32/s_llrintf.c 2001-07-06 04:55:55.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/flt-32/s_llrintf.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,7 +23,7 @@ #include "math_private.h" -static const double two23[2] = +static const float two23[2] = { 8.3886080000e+06, /* 0x4B000000 */ -8.3886080000e+06, /* 0xCB000000 */ @@ -49,9 +49,7 @@ __llrintf (float x) if (j0 < (int32_t) (sizeof (long long int) * 8) - 1) { - if (j0 < -1) - return 0; - else if (j0 >= 23) + if (j0 >= 23) result = (long long int) i0 << (j0 - 23); else { @@ -62,7 +60,7 @@ __llrintf (float x) i0 &= 0x7fffff; i0 |= 0x800000; - result = i0 >> (23 - j0); + result = (j0 < 0 ? 0 : i0 >> (23 - j0)); } } else diff -uprN glibc-2.4/sysdeps/ieee754/flt-32/s_lrintf.c glibc-2.5/sysdeps/ieee754/flt-32/s_lrintf.c --- glibc-2.4/sysdeps/ieee754/flt-32/s_lrintf.c 2001-07-06 04:55:55.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/flt-32/s_lrintf.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,7 +23,7 @@ #include "math_private.h" -static const double two23[2] = +static const float two23[2] = { 8.3886080000e+06, /* 0x4B000000 */ -8.3886080000e+06, /* 0xCB000000 */ @@ -49,9 +49,7 @@ __lrintf (float x) if (j0 < (int32_t) (sizeof (long int) * 8) - 1) { - if (j0 < -1) - return 0; - else if (j0 >= 23) + if (j0 >= 23) result = (long int) i0 << (j0 - 23); else { @@ -62,7 +60,7 @@ __lrintf (float x) i0 &= 0x7fffff; i0 |= 0x800000; - result = i0 >> (23 - j0); + result = (j0 < 0 ? 0 : i0 >> (23 - j0)); } } else diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128/s_llrintl.c glibc-2.5/sysdeps/ieee754/ldbl-128/s_llrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128/s_llrintl.c 2006-02-01 19:42:43.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128/s_llrintl.c 2006-09-20 17:14:24.000000000 +0000 @@ -48,8 +48,6 @@ __llrintl (long double x) if (j0 < (int32_t) (8 * sizeof (long long int)) - 1) { - if (j0 < -1) - return 0; w = two112[sx] + x; t = w - two112[sx]; GET_LDOUBLE_WORDS64 (i0, i1, t); @@ -57,7 +55,9 @@ __llrintl (long double x) i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; - if (j0 <= 48) + if (j0 < 0) + result = 0; + else if (j0 <= 48) result = i0 >> (48 - j0); else result = ((long long int) i0 << (j0 - 48)) | (i1 >> (112 - j0)); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128/s_lrintl.c glibc-2.5/sysdeps/ieee754/ldbl-128/s_lrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128/s_lrintl.c 2004-02-12 20:57:40.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128/s_lrintl.c 2006-09-25 14:11:26.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997 and Jakub Jelinek , 1999. @@ -48,19 +48,14 @@ __lrintl (long double x) if (j0 < 48) { - if (j0 < -1) - return 0; - else - { - w = two112[sx] + x; - t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); - j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; - i0 &= 0x0000ffffffffffffLL; - i0 |= 0x0001000000000000LL; + w = two112[sx] + x; + t = w - two112[sx]; + GET_LDOUBLE_WORDS64 (i0, i1, t); + j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; + i0 &= 0x0000ffffffffffffLL; + i0 |= 0x0001000000000000LL; - result = i0 >> (48 - j0); - } + result = (j0 < 0 ? 0 : i0 >> (48 - j0)); } else if (j0 < (int32_t) (8 * sizeof (long int)) - 1) { @@ -70,7 +65,7 @@ __lrintl (long double x) { w = two112[sx] + x; t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); + GET_LDOUBLE_WORDS64 (i0, i1, t); j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c 2006-03-16 11:46:37.000000000 +0000 @@ -76,8 +76,8 @@ static long double one = 1.0, Zero[] = { /* Make the IBM extended format 105 bit mantissa look like the ieee854 112 bit mantissa so the following operatations will give the correct result. */ - EXTRACT_IBM_EXTENDED_MANTISSA(hx, lx, temp, x); - EXTRACT_IBM_EXTENDED_MANTISSA(hy, ly, temp, y); + ldbl_extract_mantissa(&hx, &lx, &temp, x); + ldbl_extract_mantissa(&hy, &ly, &temp, y); /* set up {hx,lx}, {hy,ly} and align y to x */ if(ix >= -1022) @@ -127,7 +127,7 @@ static long double one = 1.0, Zero[] = { iy -= 1; } if(iy>= -1022) { /* normalize output */ - INSERT_IBM_EXTENDED_MANTISSA(x, (sx>>63), iy, hx, lx); + x = ldbl_insert_mantissa((sx>>63), iy, hx, lx); } else { /* subnormal output */ n = -1022 - iy; if(n<=48) { @@ -138,7 +138,7 @@ static long double one = 1.0, Zero[] = { } else { lx = hx>>(n-64); hx = sx; } - INSERT_IBM_EXTENDED_MANTISSA(x, (sx>>63), iy, hx, lx); + x = ldbl_insert_mantissa((sx>>63), iy, hx, lx); x *= one; /* create necessary signal */ } return x; /* exact output */ diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c 2006-03-16 11:46:37.000000000 +0000 @@ -199,7 +199,8 @@ int32_t __ieee754_rem_pio2l(long double { long double z, w, t; double tx[8]; - int64_t exp, n, ix, hx, ixd; + int exp; + int64_t n, ix, hx, ixd; u_int64_t lx, lxd; GET_LDOUBLE_WORDS64 (hx, lx, x); @@ -243,7 +244,7 @@ int32_t __ieee754_rem_pio2l(long double stored in a double array. */ /* Make the IBM extended format 105 bit mantissa look like the ieee854 112 bit mantissa so the next operatation will give the correct result. */ - EXTRACT_IBM_EXTENDED_MANTISSA (ixd, lxd, exp, x); + ldbl_extract_mantissa (&ixd, &lxd, &exp, x); exp = exp - 23; /* This is faster than doing this in floating point, because we have to convert it to integers anyway and like this we can keep diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h glibc-2.5/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h 2006-03-16 11:46:37.000000000 +0000 @@ -3,122 +3,179 @@ #endif #include +#include + +static inline void +ldbl_extract_mantissa (int64_t *hi64, u_int64_t *lo64, int *exp, long double x) +{ + /* We have 105 bits of mantissa plus one implicit digit. Since + 106 bits are representable we use the first implicit digit for + the number before the decimal point and the second implicit bit + as bit 53 of the mantissa. */ + unsigned long long hi, lo; + int ediff; + union ibm_extended_long_double eldbl; + eldbl.d = x; + *exp = eldbl.ieee.exponent - IBM_EXTENDED_LONG_DOUBLE_BIAS; -#define EXTRACT_IBM_EXTENDED_MANTISSA(hi64, lo64, expnt, ibm_ext_ldbl) \ - do \ - { \ - /* We have 105 bits of mantissa plus one implicit digit. Since \ - 106 bits are representable without the rest using hexadecimal \ - digits we use only the implicit digits for the number before \ - the decimal point. */ \ - unsigned long long hi, lo; \ - int ediff; \ - union ibm_extended_long_double eldbl; \ - eldbl.d = ibm_ext_ldbl; \ - expnt = eldbl.ieee.exponent - IBM_EXTENDED_LONG_DOUBLE_BIAS; \ - \ - lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3; \ - hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1; \ - /* If the lower double is not a denomal or zero then set the hidden \ - 53rd bit. */ \ - if (eldbl.ieee.exponent2 > 0x001) \ - { \ - lo |= (1ULL << 52); \ - lo = lo << 7; /* pre-shift lo to match ieee854. */ \ - /* The lower double is normalized separately from the upper. We \ - may need to adjust the lower manitissa to reflect this. */ \ - ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; \ - if (ediff > 53) \ - lo = lo >> (ediff-53); \ - } \ - hi |= (1ULL << 52); \ - \ - if ((eldbl.ieee.negative != eldbl.ieee.negative2) \ - && ((eldbl.ieee.exponent2 != 0) && (lo != 0LL))) \ - { \ - hi--; \ - lo = (1ULL << 60) - lo; \ - if (hi < (1ULL << 52)) \ - { \ - /* we have a borrow from the hidden bit, so shift left 1. */ \ - hi = (hi << 1) | (lo >> 59); \ - lo = 0xfffffffffffffffLL & (lo << 1); \ - expnt--; \ - } \ - } \ - lo64 = (hi << 60) | lo; \ - hi64 = hi >> 4; \ - } \ - while (0) - -#define INSERT_IBM_EXTENDED_MANTISSA(ibm_ext_ldbl, sign, expnt, hi64, lo64) \ - do \ - { \ - union ibm_extended_long_double u; \ - unsigned long hidden2, lzcount; \ - unsigned long long hi, lo; \ - \ - u.ieee.negative = sign; \ - u.ieee.negative2 = sign; \ - u.ieee.exponent = expnt + IBM_EXTENDED_LONG_DOUBLE_BIAS; \ - u.ieee.exponent2 = expnt-53 + IBM_EXTENDED_LONG_DOUBLE_BIAS; \ - /* Expect 113 bits (112 bits + hidden) right justified in two longs. \ - The low order 53 bits (52 + hidden) go into the lower double */ \ - lo = (lo64 >> 7)& ((1ULL << 53) - 1); \ - hidden2 = (lo64 >> 59) & 1ULL; \ - /* The high order 53 bits (52 + hidden) go into the upper double */ \ - hi = (lo64 >> 60) & ((1ULL << 11) - 1); \ - hi |= (hi64 << 4); \ - \ - if (lo != 0LL) \ - { \ - /* hidden2 bit of low double controls rounding of the high double. \ - If hidden2 is '1' then round up hi and adjust lo (2nd mantissa) \ - plus change the sign of the low double to compensate. */ \ - if (hidden2) \ - { \ - hi++; \ - u.ieee.negative2 = !sign; \ - lo = (1ULL << 53) - lo; \ - } \ - /* The hidden bit of the lo mantissa is zero so we need to \ - normalize the it for the low double. Shift it left until the \ - hidden bit is '1' then adjust the 2nd exponent accordingly. */ \ - \ - if (sizeof (lo) == sizeof (long)) \ - lzcount = __builtin_clzl (lo); \ - else if ((lo >> 32) != 0) \ - lzcount = __builtin_clzl ((long) (lo >> 32)); \ - else \ - lzcount = __builtin_clzl ((long) lo) + 32; \ - lzcount = lzcount - 11; \ - if (lzcount > 0) \ - { \ - int expnt2 = u.ieee.exponent2 - lzcount; \ - if (expnt2 >= 1) \ - { \ - /* Not denormal. Normalize and set low exponent. */ \ - lo = lo << lzcount; \ - u.ieee.exponent2 = expnt2; \ - } \ - else \ - { \ - /* Is denormal. */ \ - lo = lo << (lzcount + expnt2); \ - u.ieee.exponent2 = 0; \ - } \ - } \ - } \ - else \ - { \ - u.ieee.negative2 = 0; \ - u.ieee.exponent2 = 0; \ - } \ - \ - u.ieee.mantissa3 = lo & ((1ULL << 32) - 1); \ - u.ieee.mantissa2 = (lo >> 32) & ((1ULL << 20) - 1); \ - u.ieee.mantissa1 = hi & ((1ULL << 32) - 1); \ - u.ieee.mantissa0 = (hi >> 32) & ((1ULL << 20) - 1); \ - ibm_ext_ldbl = u.d; \ - } \ - while (0) + lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3; + hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1; + /* If the lower double is not a denomal or zero then set the hidden + 53rd bit. */ + if (eldbl.ieee.exponent2 > 0x001) + { + lo |= (1ULL << 52); + lo = lo << 7; /* pre-shift lo to match ieee854. */ + /* The lower double is normalized separately from the upper. We + may need to adjust the lower manitissa to reflect this. */ + ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; + if (ediff > 53) + lo = lo >> (ediff-53); + } + hi |= (1ULL << 52); + + if ((eldbl.ieee.negative != eldbl.ieee.negative2) + && ((eldbl.ieee.exponent2 != 0) && (lo != 0LL))) + { + hi--; + lo = (1ULL << 60) - lo; + if (hi < (1ULL << 52)) + { + /* we have a borrow from the hidden bit, so shift left 1. */ + hi = (hi << 1) | (lo >> 59); + lo = 0xfffffffffffffffLL & (lo << 1); + *exp = *exp - 1; + } + } + *lo64 = (hi << 60) | lo; + *hi64 = hi >> 4; +} + +static inline long double +ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64) +{ + union ibm_extended_long_double u; + unsigned long hidden2, lzcount; + unsigned long long hi, lo; + + u.ieee.negative = sign; + u.ieee.negative2 = sign; + u.ieee.exponent = exp + IBM_EXTENDED_LONG_DOUBLE_BIAS; + u.ieee.exponent2 = exp-53 + IBM_EXTENDED_LONG_DOUBLE_BIAS; + /* Expect 113 bits (112 bits + hidden) right justified in two longs. + The low order 53 bits (52 + hidden) go into the lower double */ + lo = (lo64 >> 7)& ((1ULL << 53) - 1); + hidden2 = (lo64 >> 59) & 1ULL; + /* The high order 53 bits (52 + hidden) go into the upper double */ + hi = (lo64 >> 60) & ((1ULL << 11) - 1); + hi |= (hi64 << 4); + + if (lo != 0LL) + { + /* hidden2 bit of low double controls rounding of the high double. + If hidden2 is '1' then round up hi and adjust lo (2nd mantissa) + plus change the sign of the low double to compensate. */ + if (hidden2) + { + hi++; + u.ieee.negative2 = !sign; + lo = (1ULL << 53) - lo; + } + /* The hidden bit of the lo mantissa is zero so we need to + normalize the it for the low double. Shift it left until the + hidden bit is '1' then adjust the 2nd exponent accordingly. */ + + if (sizeof (lo) == sizeof (long)) + lzcount = __builtin_clzl (lo); + else if ((lo >> 32) != 0) + lzcount = __builtin_clzl ((long) (lo >> 32)); + else + lzcount = __builtin_clzl ((long) lo) + 32; + lzcount = lzcount - 11; + if (lzcount > 0) + { + int expnt2 = u.ieee.exponent2 - lzcount; + if (expnt2 >= 1) + { + /* Not denormal. Normalize and set low exponent. */ + lo = lo << lzcount; + u.ieee.exponent2 = expnt2; + } + else + { + /* Is denormal. */ + lo = lo << (lzcount + expnt2); + u.ieee.exponent2 = 0; + } + } + } + else + { + u.ieee.negative2 = 0; + u.ieee.exponent2 = 0; + } + + u.ieee.mantissa3 = lo & ((1ULL << 32) - 1); + u.ieee.mantissa2 = (lo >> 32) & ((1ULL << 20) - 1); + u.ieee.mantissa1 = hi & ((1ULL << 32) - 1); + u.ieee.mantissa0 = (hi >> 32) & ((1ULL << 20) - 1); + return u.d; +} + +/* Handy utility functions to pack/unpack/cononicalize and find the nearbyint + of long double implemented as double double. */ +static inline long double +ldbl_pack (double a, double aa) +{ + union ibm_extended_long_double u; + u.dd[0] = a; + u.dd[1] = aa; + return u.d; +} + +static inline void +ldbl_unpack (long double l, double *a, double *aa) +{ + union ibm_extended_long_double u; + u.d = l; + *a = u.dd[0]; + *aa = u.dd[1]; +} + + +/* Convert a finite long double to canonical form. + Does not handle +/-Inf properly. */ +static inline void +ldbl_canonicalize (double *a, double *aa) +{ + double xh, xl; + + xh = *a + *aa; + xl = (*a - xh) + *aa; + *a = xh; + *aa = xl; +} + +/* Simple inline nearbyint (double) function . + Only works in the default rounding mode + but is useful in long double rounding functions. */ +static inline double +ldbl_nearbyint (double a) +{ + double two52 = 0x10000000000000LL; + + if (__builtin_expect ((__builtin_fabs (a) < two52), 1)) + { + if (__builtin_expect ((a > 0.0), 1)) + { + a += two52; + a -= two52; + } + else if (__builtin_expect ((a < 0.0), 1)) + { + a = two52 - a; + a = -(a - two52); + } + } + return a; +} diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_ceill.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_ceill.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2006-01-31 18:56:23.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2006-03-16 11:46:37.000000000 +0000 @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include -#include +#include #include #include #include @@ -34,87 +34,58 @@ __ceill (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0L; - int mode = fegetround(); - union ibm_extended_long_double u; + double xh, xl, hi, lo; - u.d = x; + ldbl_unpack (x, &xh, &xl); - if (fabs (u.dd[0]) < TWO52) + /* Return Inf, Nan, +/-0 unchanged. */ + if (__builtin_expect (xh != 0.0 + && __builtin_isless (__builtin_fabs (xh), + __builtin_inf ()), 1)) { - double high = u.dd[0]; - fesetround(FE_UPWARD); - if (high > 0.0) - { - high += TWO52; - high -= TWO52; - if (high == -0.0) high = 0.0; - } - else if (high < 0.0) - { - high -= TWO52; - high += TWO52; - if (high == 0.0) high = -0.0; - } - u.dd[0] = high; - u.dd[1] = 0.0; - fesetround(mode); - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) - { - double high, low; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) - { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_UPWARD); - low += TWO52; - low -= TWO52; - fesetround(mode); - } - else if (u.dd[0] < 0.0) - { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_UPWARD); - low -= TWO52; - low += TWO52; - fesetround(mode); - } - u.dd[0] = high + low; - u.dd[1] = high - u.dd[0] + low; + double orig_xh; + int save_round = fegetround (); + + /* Long double arithmetic, including the canonicalisation below, + only works in round-to-nearest mode. */ + fesetround (FE_TONEAREST); + + /* Convert the high double to integer. */ + orig_xh = xh; + hi = ldbl_nearbyint (xh); + + /* Subtract integral high part from the value. */ + xh -= hi; + ldbl_canonicalize (&xh, &xl); + + /* Now convert the low double, adjusted for any remainder from the + high double. */ + lo = ldbl_nearbyint (xh); + + /* Adjust the result when the remainder is non-zero. nearbyint + rounds values to the nearest integer, and values halfway + between integers to the nearest even integer. ceill must + round towards +Inf. */ + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + lo += 1.0; + + /* Ensure the final value is canonical. In certain cases, + rounding causes hi,lo calculated so far to be non-canonical. */ + xh = hi; + xl = lo; + ldbl_canonicalize (&xh, &xl); + + /* Ensure we return -0 rather than +0 when appropriate. */ + if (orig_xh < 0.0) + xh = -__builtin_fabs (xh); + + fesetround (save_round); } - return u.d; + return ldbl_pack (xh, xl); } long_double_symbol (libm, __ceill, ceill); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_floorl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_floorl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2006-01-31 18:56:23.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2006-03-16 11:46:37.000000000 +0000 @@ -19,7 +19,7 @@ 02111-1307 USA. */ #include -#include +#include #include #include #include @@ -34,86 +34,52 @@ __floorl (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0L; - int mode = fegetround(); - union ibm_extended_long_double u; + double xh, xl, hi, lo; - u.d = x; + ldbl_unpack (x, &xh, &xl); - if (fabs (u.dd[0]) < TWO52) + /* Return Inf, Nan, +/-0 unchanged. */ + if (__builtin_expect (xh != 0.0 + && __builtin_isless (__builtin_fabs (xh), + __builtin_inf ()), 1)) { - double high = u.dd[0]; - fesetround(FE_DOWNWARD); - if (high > 0.0) - { - high += TWO52; - high -= TWO52; - if (high == -0.0) high = 0.0; - } - else if (high < 0.0) - { - high -= TWO52; - high += TWO52; - if (high == 0.0) high = -0.0; - } - u.dd[0] = high; - u.dd[1] = 0.0; - fesetround(mode); - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) - { - double high, low; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) - { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_DOWNWARD); - low += TWO52; - low -= TWO52; - } - else if (u.dd[0] < 0.0) - { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_DOWNWARD); - low -= TWO52; - low += TWO52; - } - fesetround(mode); - u.dd[0] = high + low; - u.dd[1] = high - u.dd[0] + low; + int save_round = fegetround (); + + /* Long double arithmetic, including the canonicalisation below, + only works in round-to-nearest mode. */ + fesetround (FE_TONEAREST); + + /* Convert the high double to integer. */ + hi = ldbl_nearbyint (xh); + + /* Subtract integral high part from the value. */ + xh -= hi; + ldbl_canonicalize (&xh, &xl); + + /* Now convert the low double, adjusted for any remainder from the + high double. */ + lo = ldbl_nearbyint (xh); + + /* Adjust the result when the remainder is non-zero. nearbyint + rounds values to the nearest integer, and values halfway + between integers to the nearest even integer. floorl must + round towards -Inf. */ + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + lo += -1.0; + + /* Ensure the final value is canonical. In certain cases, + rounding causes hi,lo calculated so far to be non-canonical. */ + xh = hi; + xl = lo; + ldbl_canonicalize (&xh, &xl); + + fesetround (save_round); } - return u.d; + return ldbl_pack (xh, xl); } long_double_symbol (libm, __floorl, floorl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c 2006-09-17 07:24:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Round to int long double floating-point values. +/* Round to long long int long double floating-point values. IBM extended format long double version. Copyright (C) 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,10 +18,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This has been coded in assembler because GCC makes such a mess of it - when it's coded in C. */ - #include +#include #include #include #include @@ -36,89 +34,114 @@ __llrintl (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0L; - union ibm_extended_long_double u; - long long result = __LONG_LONG_MAX__; - - u.d = x; - - if (fabs (u.dd[0]) < TWO52) + double xh, xl; + long long res, hi, lo; + int save_round; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if (__builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_LONG_MAX__ - 1)), 1) +#if !defined (FE_INVALID) + || 1 +#endif + ) { - double high = u.dd[0]; - if (high > 0.0) - { - high += TWO52; - high -= TWO52; - if (high == -0.0) high = 0.0; - } - else if (high < 0.0) + save_round = fegetround (); + + if (__builtin_expect ((xh == -(double) (-__LONG_LONG_MAX__ - 1)), 0)) { - high -= TWO52; - high += TWO52; - if (high == 0.0) high = -0.0; + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_LONG_MAX__; + xh = 1.0; } - result = high; - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) - { - double high, low, tau; - long long lowint; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) + else { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - - tau = nextafter (u.dd[0], 0.0); - tau = (u.dd[0] - tau) * 2.0; - high = u.dd[0] - tau; - low = u.dd[1] + tau; - } - low += TWO52; - low -= TWO52; + hi = (long long) xh; + xh -= hi; } - else if (u.dd[0] < 0.0) + ldbl_canonicalize (&xh, &xl); + + lo = (long long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + switch (save_round) { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - tau = nextafter (u.dd[0], 0.0); - tau = (u.dd[0] - tau) * 2.0; - high = u.dd[0] - tau; - low = u.dd[1] + tau; - } - low = TWO52 - low; - low = -(low - TWO52); + case FE_TONEAREST: + if (fabs (xh) < 0.5 + || (fabs (xh) == 0.5 + && ((xh > 0.0 && xl < 0.0) + || (xh < 0.0 && xl > 0.0) + || (xl == 0.0 && (res & 1) == 0)))) + return res; + + if (xh < 0.0) + res -= 1; + else + res += 1; + break; + + case FE_TOWARDZERO: + if (res > 0 && (xh < 0.0 || (xh == 0.0 && xl < 0.0))) + res -= 1; + else if (res < 0 && (xh > 0.0 || (xh == 0.0 && xl > 0.0))) + res += 1; + return res; + break; + + case FE_UPWARD: + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + res += 1; + break; + + case FE_DOWNWARD: + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + res -= 1; + break; } - lowint = low; - result = high; - result += lowint; + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; } else - result = u.dd[0]; + { + if (xh > 0.0) + hi = __LONG_LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; + } - return result; +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } long_double_symbol (libm, __llrintl, llrintl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c 2006-09-17 07:24:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Round to long long, long double floating-point values. +/* Round to long long int long double floating-point values. IBM extended format long double version. Copyright (C) 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,16 +18,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This has been coded in assembler because GCC makes such a mess of it - when it's coded in C. */ - #include -#include +#include #include #include #include - #ifdef __STDC__ long long __llroundl (long double x) @@ -37,92 +33,95 @@ __llroundl (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0; - static const double HALF = 0.5; - int mode = fegetround(); - union ibm_extended_long_double u; - long long result = __LONG_LONG_MAX__; - - u.d = x; - - if (fabs (u.dd[0]) < TWO52) - { - fesetround(FE_TOWARDZERO); - if (u.dd[0] > 0.0) - { - u.dd[0] += HALF; - u.dd[0] += TWO52; - u.dd[0] -= TWO52; + double xh, xl; + long long res, hi, lo; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if (__builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_LONG_MAX__ - 1)), 1) +#if !defined (FE_INVALID) + || 1 +#endif + ) + { + if (__builtin_expect ((xh == -(double) (-__LONG_LONG_MAX__ - 1)), 0)) + { + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_LONG_MAX__; + xh = 1.0; + } + else + { + hi = (long long) xh; + xh -= hi; + } + ldbl_canonicalize (&xh, &xl); + + lo = (long long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + if (xh > 0.5) + { + res += 1; + } + else if (xh == 0.5) + { + if (xl > 0.0 || (xl == 0.0 && res >= 0)) + res += 1; + } + else if (-xh > 0.5) + { + res -= 1; } - else if (u.dd[0] < 0.0) + else if (-xh == 0.5) { - u.dd[0] = TWO52 - (u.dd[0] - HALF); - u.dd[0] = -(u.dd[0] - TWO52); + if (xl < 0.0 || (xl == 0.0 && res <= 0)) + res -= 1; } - fesetround(mode); - result = u.dd[0]; + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) + else { - double high, low; - long long lowint; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) - { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low += HALF; - low += TWO52; - low -= TWO52; - } - else if (u.dd[0] < 0.0) - { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low -= HALF; - low = TWO52 - low; - low = -(low - TWO52); - } - fesetround(mode); - lowint = low; - result = high; - result += lowint; + if (xh > 0.0) + hi = __LONG_LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; } - else - { - result = u.dd[0]; - } - return result; + +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } long_double_symbol (libm, __llroundl, llroundl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c 2006-09-17 07:24:52.000000000 +0000 @@ -1,9 +1,162 @@ -/* FIXME */ +/* Round to long int long double floating-point values. + IBM extended format long double version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + #include +#include #include +#include +#include + -long int __lrintl (long double d) +#ifdef __STDC__ +long +__lrintl (long double x) +#else +long +__lrintl (x) + long double x; +#endif { - return llrintl (d); + double xh, xl; + long res, hi, lo; + int save_round; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if ( +#if __LONG_MAX__ == 2147483647 + __builtin_expect + ((__builtin_fabs (xh) <= (double) __LONG_MAX__ + 2), 1) +#else + __builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_MAX__ - 1)), 1) +#endif +#if !defined (FE_INVALID) + || 1 +#endif + ) + { + save_round = fegetround (); + +#if __LONG_MAX__ == 2147483647 + long long llhi = (long long) xh; + if (llhi != (long) llhi) + hi = llhi < 0 ? -__LONG_MAX__ - 1 : __LONG_MAX__; + else + hi = llhi; + xh -= hi; +#else + if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0)) + { + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_MAX__; + xh = 1.0; + } + else + { + hi = (long) xh; + xh -= hi; + } +#endif + ldbl_canonicalize (&xh, &xl); + + lo = (long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + switch (save_round) + { + case FE_TONEAREST: + if (fabs (xh) < 0.5 + || (fabs (xh) == 0.5 + && ((xh > 0.0 && xl < 0.0) + || (xh < 0.0 && xl > 0.0) + || (xl == 0.0 && (res & 1) == 0)))) + return res; + + if (xh < 0.0) + res -= 1; + else + res += 1; + break; + + case FE_TOWARDZERO: + if (res > 0 && (xh < 0.0 || (xh == 0.0 && xl < 0.0))) + res -= 1; + else if (res < 0 && (xh > 0.0 || (xh == 0.0 && xl > 0.0))) + res += 1; + return res; + break; + + case FE_UPWARD: + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + res += 1; + break; + + case FE_DOWNWARD: + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + res -= 1; + break; + } + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; + } + else + { + if (xh > 0.0) + hi = __LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; + } + +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } + long_double_symbol (libm, __lrintl, lrintl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c 2006-09-17 07:24:52.000000000 +0000 @@ -1,9 +1,142 @@ -/* FIXME */ +/* Round to long int long double floating-point values. + IBM extended format long double version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + #include +#include #include +#include +#include -long int __lroundl (long double d) +#ifdef __STDC__ +long +__lroundl (long double x) +#else +long +__lroundl (x) + long double x; +#endif { - return llroundl (d); + double xh, xl; + long res, hi, lo; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if ( +#if __LONG_MAX__ == 2147483647 + __builtin_expect + ((__builtin_fabs (xh) <= (double) __LONG_MAX__ + 2), 1) +#else + __builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_MAX__ - 1)), 1) +#endif +#if !defined (FE_INVALID) + || 1 +#endif + ) + { +#if __LONG_MAX__ == 2147483647 + long long llhi = (long long) xh; + if (llhi != (long) llhi) + hi = llhi < 0 ? -__LONG_MAX__ - 1 : __LONG_MAX__; + else + hi = llhi; + xh -= hi; +#else + if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0)) + { + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_MAX__; + xh = 1.0; + } + else + { + hi = (long) xh; + xh -= hi; + } +#endif + ldbl_canonicalize (&xh, &xl); + + lo = (long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + if (xh > 0.5) + { + res += 1; + } + else if (xh == 0.5) + { + if (xl > 0.0 || (xl == 0.0 && res >= 0)) + res += 1; + } + else if (-xh > 0.5) + { + res -= 1; + } + else if (-xh == 0.5) + { + if (xl < 0.0 || (xl == 0.0 && res <= 0)) + res -= 1; + } + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; + } + else + { + if (xh > 0.0) + hi = __LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; + } + +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } + long_double_symbol (libm, __lroundl, lroundl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_rintl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_rintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_rintl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_rintl.c 2006-03-16 11:46:37.000000000 +0000 @@ -22,6 +22,7 @@ when it's coded in C. */ #include +#include #include #include #include @@ -36,84 +37,83 @@ __rintl (x) long double x; #endif { - static const long double TWO52 = 4503599627370496.0L; - union ibm_extended_long_double u; - u.d = x; + double xh, xl, hi, lo; - if (fabs (u.dd[0]) < TWO52) - { - double high = u.dd[0]; - if (high > 0.0) - { - high += TWO52; - high -= TWO52; - if (high == -0.0) high = 0.0; - } - else if (high < 0.0) - { - high -= TWO52; - high += TWO52; - if (high == 0.0) high = -0.0; - } - u.dd[0] = high; - u.dd[1] = 0.0; - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) + ldbl_unpack (x, &xh, &xl); + + /* Return Inf, Nan, +/-0 unchanged. */ + if (__builtin_expect (xh != 0.0 + && __builtin_isless (__builtin_fabs (xh), + __builtin_inf ()), 1)) { - double high, low, tau; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) - { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - - tau = nextafter (u.dd[0], 0.0); - tau = (u.dd[0] - tau) * 2.0; - high = u.dd[0] - tau; - low = u.dd[1] + tau; - } - low += TWO52; - low -= TWO52; - } - else if (u.dd[0] < 0.0) + double orig_xh; + int save_round = fegetround (); + + /* Long double arithmetic, including the canonicalisation below, + only works in round-to-nearest mode. */ + fesetround (FE_TONEAREST); + + /* Convert the high double to integer. */ + orig_xh = xh; + hi = ldbl_nearbyint (xh); + + /* Subtract integral high part from the value. If the low double + happens to be exactly 0.5 or -0.5, you might think that this + subtraction could result in an incorrect conversion. For + instance, subtracting an odd number would cause this function + to round in the wrong direction. However, if we have a + canonical long double with the low double 0.5 or -0.5, then the + high double must be even. */ + xh -= hi; + ldbl_canonicalize (&xh, &xl); + + /* Now convert the low double, adjusted for any remainder from the + high double. */ + lo = ldbl_nearbyint (xh); + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + switch (save_round) { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - tau = nextafter (u.dd[0], 0.0); - tau = (u.dd[0] - tau) * 2.0; - high = u.dd[0] - tau; - low = u.dd[1] + tau; - } - low = TWO52 - low; - low = -(low - TWO52); + case FE_TONEAREST: + if (xl > 0.0 && xh == 0.5) + lo += 1.0; + else if (xl < 0.0 && -xh == 0.5) + lo -= 1.0; + break; + + case FE_TOWARDZERO: + if (orig_xh < 0.0) + goto do_up; + /* Fall thru */ + + case FE_DOWNWARD: + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + lo -= 1.0; + break; + + case FE_UPWARD: + do_up: + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + lo += 1.0; + break; } - u.dd[0] = high + low; - u.dd[1] = high - u.dd[0] + low; + + /* Ensure the final value is canonical. In certain cases, + rounding causes hi,lo calculated so far to be non-canonical. */ + xh = hi; + xl = lo; + ldbl_canonicalize (&xh, &xl); + + /* Ensure we return -0 rather than +0 when appropriate. */ + if (orig_xh < 0.0) + xh = -__builtin_fabs (xh); + + fesetround (save_round); } - return u.d; + return ldbl_pack (xh, xl); } long_double_symbol (libm, __rintl, rintl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_roundl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_roundl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2006-03-16 11:46:37.000000000 +0000 @@ -22,7 +22,7 @@ when it's coded in C. */ #include -#include +#include #include #include #include @@ -37,84 +37,62 @@ __roundl (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0; - static const double HALF = 0.5; - int mode = fegetround(); - union ibm_extended_long_double u; - u.d = x; - - if (fabs (u.dd[0]) < TWO52) - { - fesetround(FE_TOWARDZERO); - if (u.dd[0] > 0.0) - { - u.dd[0] += HALF; - u.dd[0] += TWO52; - u.dd[0] -= TWO52; - } - else if (u.dd[0] < 0.0) - { - u.dd[0] = TWO52 - (u.dd[0] - HALF); - u.dd[0] = -(u.dd[0] - TWO52); - } - u.dd[1] = 0.0; - fesetround(mode); - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) + double xh, xl, hi, lo; + + ldbl_unpack (x, &xh, &xl); + + /* Return Inf, Nan, +/-0 unchanged. */ + if (__builtin_expect (xh != 0.0 + && __builtin_isless (__builtin_fabs (xh), + __builtin_inf ()), 1)) { - double high, low; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) + double orig_xh; + int save_round = fegetround (); + + /* Long double arithmetic, including the canonicalisation below, + only works in round-to-nearest mode. */ + fesetround (FE_TONEAREST); + + /* Convert the high double to integer. */ + orig_xh = xh; + hi = ldbl_nearbyint (xh); + + /* Subtract integral high part from the value. */ + xh -= hi; + ldbl_canonicalize (&xh, &xl); + + /* Now convert the low double, adjusted for any remainder from the + high double. */ + lo = ldbl_nearbyint (xh); + + /* Adjust the result when the remainder is exactly 0.5. nearbyint + rounds values halfway between integers to the nearest even + integer. roundl must round away from zero. + Also correct cases where nearbyint returns an incorrect value + for LO. */ + xh -= lo; + ldbl_canonicalize (&xh, &xl); + if (xh == 0.5) { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low += HALF; - low += TWO52; - low -= TWO52; + if (xl > 0.0 || (xl == 0.0 && orig_xh > 0.0)) + lo += 1.0; } - else if (u.dd[0] < 0.0) + else if (-xh == 0.5) { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low -= HALF; - low = TWO52 - low; - low = -(low - TWO52); + if (xl < 0.0 || (xl == 0.0 && orig_xh < 0.0)) + lo -= 1.0; } - fesetround(mode); - u.dd[0] = high + low; - u.dd[1] = high - u.dd[0] + low; + + /* Ensure the final value is canonical. In certain cases, + rounding causes hi,lo calculated so far to be non-canonical. */ + xh = hi; + xl = lo; + ldbl_canonicalize (&xh, &xl); + + fesetround (save_round); } - return u.d; + + return ldbl_pack (xh, xl); } long_double_symbol (libm, __roundl, roundl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_truncl.c glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_truncl.c --- glibc-2.4/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2006-01-28 00:07:25.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2006-03-16 11:46:37.000000000 +0000 @@ -22,7 +22,7 @@ when it's coded in C. */ #include -#include +#include #include #include #include @@ -37,83 +37,66 @@ __truncl (x) long double x; #endif { - static const double TWO52 = 4503599627370496.0L; - int mode = fegetround(); - union ibm_extended_long_double u; - - u.d = x; - - if (fabs (u.dd[0]) < TWO52) - { - fesetround(FE_TOWARDZERO); - if (u.dd[0] > 0.0) - { - u.dd[0] += TWO52; - u.dd[0] -= TWO52; - } - else if (u.dd[0] < 0.0) - { - u.dd[0] = TWO52 - u.dd[0]; - u.dd[0] = -(u.dd[0] - TWO52); - } - u.dd[1] = 0.0; - fesetround(mode); - } - else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0) + double xh, xl, hi, lo; + + ldbl_unpack (x, &xh, &xl); + + /* Return Inf, Nan, +/-0 unchanged. */ + if (__builtin_expect (xh != 0.0 + && __builtin_isless (__builtin_fabs (xh), + __builtin_inf ()), 1)) { - double high, low; - /* In this case we have to round the low double and handle any - adjustment to the high double that may be caused by rounding - (up). This is complicated by the fact that the high double - may already be rounded and the low double may have the - opposite sign to compensate. */ - if (u.dd[0] > 0.0) + double orig_xh; + int save_round = fegetround (); + + /* Long double arithmetic, including the canonicalisation below, + only works in round-to-nearest mode. */ + fesetround (FE_TONEAREST); + + /* Convert the high double to integer. */ + orig_xh = xh; + hi = ldbl_nearbyint (xh); + + /* Subtract integral high part from the value. */ + xh -= hi; + ldbl_canonicalize (&xh, &xl); + + /* Now convert the low double, adjusted for any remainder from the + high double. */ + lo = ldbl_nearbyint (xh); + + /* Adjust the result when the remainder is non-zero. nearbyint + rounds values to the nearest integer, and values halfway + between integers to the nearest even integer. floorl must + round towards -Inf. */ + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + if (orig_xh < 0.0) { - if (u.dd[1] > 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] < 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low += TWO52; - low -= TWO52; - fesetround(mode); + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + lo += 1.0; } - else if (u.dd[0] < 0.0) + else { - if (u.dd[1] < 0.0) - { - /* If the high/low doubles are the same sign then simply - round the low double. */ - high = u.dd[0]; - low = u.dd[1]; - } - else if (u.dd[1] > 0.0) - { - /* Else the high double is pre rounded and we need to - adjust for that. */ - high = nextafter (u.dd[0], 0.0); - low = u.dd[1] + (u.dd[0] - high); - } - fesetround(FE_TOWARDZERO); - low = TWO52 - low; - low = -(low - TWO52); - fesetround(mode); + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + lo -= 1.0; } - u.dd[0] = high + low; - u.dd[1] = high - u.dd[0] + low; + + /* Ensure the final value is canonical. In certain cases, + rounding causes hi,lo calculated so far to be non-canonical. */ + xh = hi; + xl = lo; + ldbl_canonicalize (&xh, &xl); + + /* Ensure we return -0 rather than +0 when appropriate. */ + if (orig_xh < 0.0) + xh = -__builtin_fabs (xh); + + fesetround (save_round); } - return u.d; + return ldbl_pack (xh, xl); } long_double_symbol (libm, __truncl, truncl); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-96/s_llrintl.c glibc-2.5/sysdeps/ieee754/ldbl-96/s_llrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-96/s_llrintl.c 2004-02-12 20:57:52.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-96/s_llrintl.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -47,9 +47,7 @@ __llrintl (long double x) if (j0 < (int32_t) (8 * sizeof (long long int)) - 1) { - if (j0 < -1) - return 0; - else if (j0 >= 63) + if (j0 >= 63) result = (((long long int) i0 << 32) | i1) << (j0 - 63); else { @@ -58,7 +56,9 @@ __llrintl (long double x) GET_LDOUBLE_WORDS (se, i0, i1, t); j0 = (se & 0x7fff) - 0x3fff; - if (j0 <= 31) + if (j0 < 0) + result = 0; + else if (j0 <= 31) result = i0 >> (31 - j0); else result = ((long long int) i0 << (j0 - 31)) | (i1 >> (63 - j0)); diff -uprN glibc-2.4/sysdeps/ieee754/ldbl-96/s_lrintl.c glibc-2.5/sysdeps/ieee754/ldbl-96/s_lrintl.c --- glibc-2.4/sysdeps/ieee754/ldbl-96/s_lrintl.c 2004-02-01 19:11:52.000000000 +0000 +++ glibc-2.5/sysdeps/ieee754/ldbl-96/s_lrintl.c 2006-09-20 17:14:24.000000000 +0000 @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -47,17 +47,12 @@ __lrintl (long double x) if (j0 < 31) { - if (j0 < -1) - return 0; - else - { - w = two63[sx] + x; - t = w - two63[sx]; - GET_LDOUBLE_WORDS (se, i0, i1, t); - j0 = (se & 0x7fff) - 0x3fff; + w = two63[sx] + x; + t = w - two63[sx]; + GET_LDOUBLE_WORDS (se, i0, i1, t); + j0 = (se & 0x7fff) - 0x3fff; - result = i0 >> (31 - j0); - } + result = (j0 < 0 ? 0 : i0 >> (31 - j0)); } else if (j0 < (int32_t) (8 * sizeof (long int)) - 1) { diff -uprN glibc-2.4/sysdeps/mach/hurd/powerpc/register-dump.h glibc-2.5/sysdeps/mach/hurd/powerpc/register-dump.h --- glibc-2.4/sysdeps/mach/hurd/powerpc/register-dump.h 2001-11-10 00:37:47.000000000 +0000 +++ glibc-2.5/sysdeps/mach/hurd/powerpc/register-dump.h 2006-09-17 15:53:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Dump registers. PowerPC/Hurd version. - Copyright (C) 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } #define REGISTER_DUMP \ diff -uprN glibc-2.4/sysdeps/posix/getaddrinfo.c glibc-2.5/sysdeps/posix/getaddrinfo.c --- glibc-2.4/sysdeps/posix/getaddrinfo.c 2005-12-20 16:49:19.000000000 +0000 +++ glibc-2.5/sysdeps/posix/getaddrinfo.c 2006-09-24 16:51:50.000000000 +0000 @@ -36,23 +36,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI /* This software is Copyright 1996 by Craig Metz, All Rights Reserved. */ #include +#include #include #include #include #include #include #include +#include #include #include -#include #include -#include +#include #include +#include +#include #include #include #include -#include +#include #include +#include #include #include #include @@ -68,7 +72,7 @@ extern int __idna_to_unicode_lzlz (const #define GAIH_EAI ~(GAIH_OKIFUNSPEC) #ifndef UNIX_PATH_MAX -#define UNIX_PATH_MAX 108 +# define UNIX_PATH_MAX 108 #endif struct gaih_service @@ -177,9 +181,9 @@ gaih_local (const char *name, const stru if (! tp->name[0]) { if (req->ai_socktype) - return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE); + return GAIH_OKIFUNSPEC | -EAI_SOCKTYPE; else - return (GAIH_OKIFUNSPEC | -EAI_SERVICE); + return GAIH_OKIFUNSPEC | -EAI_SERVICE; } } @@ -249,9 +253,10 @@ gaih_local (const char *name, const stru } #endif /* 0 */ + static int gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, - const struct addrinfo *req, struct gaih_servtuple *st) + const struct addrinfo *req, struct gaih_servtuple *st) { struct servent *s; size_t tmpbuflen = 1024; @@ -362,6 +367,7 @@ typedef enum nss_status (*nss_getcanonna int *errnop, int *h_errnop); extern service_user *__nss_hosts_database attribute_hidden; + static int gaih_inet (const char *name, const struct gaih_service *service, const struct addrinfo *req, struct addrinfo **pai, @@ -389,9 +395,9 @@ gaih_inet (const char *name, const struc if (! tp->name[0]) { if (req->ai_socktype) - return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE); + return GAIH_OKIFUNSPEC | -EAI_SOCKTYPE; else - return (GAIH_OKIFUNSPEC | -EAI_SERVICE); + return GAIH_OKIFUNSPEC | -EAI_SERVICE; } } @@ -399,7 +405,7 @@ gaih_inet (const char *name, const struc if (service != NULL) { if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0) - return (GAIH_OKIFUNSPEC | -EAI_SERVICE); + return GAIH_OKIFUNSPEC | -EAI_SERVICE; if (service->num < 0) { @@ -443,7 +449,7 @@ gaih_inet (const char *name, const struc pst = &(newp->next); } if (st == (struct gaih_servtuple *) &nullserv) - return (GAIH_OKIFUNSPEC | -EAI_SERVICE); + return GAIH_OKIFUNSPEC | -EAI_SERVICE; } } else @@ -527,7 +533,7 @@ gaih_inet (const char *name, const struc { if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) at->family = AF_INET; - else if (req->ai_family == AF_INET6 && req->ai_flags & AI_V4MAPPED) + else if (req->ai_family == AF_INET6 && (req->ai_flags & AI_V4MAPPED)) { at->addr[3] = at->addr[0]; at->addr[2] = htonl (0xffff); @@ -538,16 +544,10 @@ gaih_inet (const char *name, const struc else return -EAI_ADDRFAMILY; - dupname: if (req->ai_flags & AI_CANONNAME) - { - canon = strdup (name); - if (canon == NULL) - return -EAI_MEMORY; - } + canon = name; } - - if (at->family == AF_UNSPEC) + else if (at->family == AF_UNSPEC) { char *namebuf = (char *) name; char *scope_delim = strchr (name, SCOPE_DELIMITER); @@ -595,7 +595,8 @@ gaih_inet (const char *name, const struc } } - goto dupname; + if (req->ai_flags & AI_CANONNAME) + canon = name; } } @@ -689,7 +690,7 @@ gaih_inet (const char *name, const struc } /* We made requests but they turned out no data. The name is known, though. */ - return (GAIH_OKIFUNSPEC | -EAI_NODATA); + return GAIH_OKIFUNSPEC | -EAI_NODATA; } goto process_list; @@ -756,7 +757,7 @@ gaih_inet (const char *name, const struc free (air); if (at->family == AF_UNSPEC) - return (GAIH_OKIFUNSPEC | -EAI_NONAME); + return GAIH_OKIFUNSPEC | -EAI_NONAME; goto process_list; } @@ -898,13 +899,13 @@ gaih_inet (const char *name, const struc /* We made requests but they turned out no data. The name is known, though. */ - return (GAIH_OKIFUNSPEC | -EAI_NODATA); + return GAIH_OKIFUNSPEC | -EAI_NODATA; } } process_list: if (at->family == AF_UNSPEC) - return (GAIH_OKIFUNSPEC | -EAI_NONAME); + return GAIH_OKIFUNSPEC | -EAI_NONAME; } else { @@ -1046,7 +1047,10 @@ gaih_inet (const char *name, const struc struct addrinfo *ai; ai = *pai = malloc (sizeof (struct addrinfo) + socklen); if (ai == NULL) - return -EAI_MEMORY; + { + free ((char *) canon); + return -EAI_MEMORY; + } ai->ai_flags = req->ai_flags; ai->ai_family = family; @@ -1064,6 +1068,10 @@ gaih_inet (const char *name, const struc #endif /* _HAVE_SA_LEN */ ai->ai_addr->sa_family = family; + /* In case of an allocation error the list must be NULL + terminated. */ + ai->ai_next = NULL; + if (family == AF_INET6) { struct sockaddr_in6 *sin6p = @@ -1087,7 +1095,6 @@ gaih_inet (const char *name, const struc pai = &(ai->ai_next); } - *pai = NULL; ++*naddrs; @@ -1098,6 +1105,7 @@ gaih_inet (const char *name, const struc return 0; } +#if 0 static const struct gaih gaih[] = { { PF_INET6, gaih_inet }, @@ -1107,6 +1115,7 @@ static const struct gaih gaih[] = #endif { PF_UNSPEC, NULL } }; +#endif struct sort_result { @@ -1114,6 +1123,7 @@ struct sort_result struct sockaddr_storage source_addr; uint8_t source_addr_len; bool got_source_addr; + uint8_t source_addr_flags; }; @@ -1161,59 +1171,92 @@ get_scope (const struct sockaddr_storage } -/* XXX The system administrator should be able to install other - tables. We need to make this configurable. The problem is that - the kernel is also involved since it needs the same table. */ -static const struct prefixlist +struct prefixentry { struct in6_addr prefix; unsigned int bits; int val; -} default_labels[] = +}; + + +/* The label table. */ +static const struct prefixentry *labels; + +/* Default labels. */ +static const struct prefixentry default_labels[] = { /* See RFC 3484 for the details. */ - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }, 128, 0 }, - { { .in6_u = { .u6_addr16 = { 0x2002, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 16, 2 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 96, 3 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xffff, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } }, 96, 4 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + /* The next two entries differ from RFC 3484. We need to treat + IPv6 site-local addresses special because they are never NATed, + unlike site-locale IPv4 addresses. If this would not happen, on + machines which have only IPv4 and IPv6 site-local addresses, the + sorting would prefer the IPv6 site-local addresses, causing + unnecessary delays when trying to connect to a global IPv6 address + through a site-local IPv6 address. */ + { { .in6_u + = { .u6_addr8 = { 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, + 10, 5 }, + { { .in6_u + = { .u6_addr8 = { 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, + 7, 6 }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 0, 1 } }; -static const struct prefixlist default_precedence[] = +/* The precedence table. */ +static const struct prefixentry *precedence; + +/* The default precedences. */ +static const struct prefixentry default_precedence[] = { /* See RFC 3484 for the details. */ - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }, 128, 50 }, - { { .in6_u = { .u6_addr16 = { 0x2002, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 16, 30 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 96, 20 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xffff, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } } }, 96, 10 }, - { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 } } }, + { { .in6_u + = { .u6_addr8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }, 0, 40 } }; static int -match_prefix (const struct sockaddr_storage *ss, const struct prefixlist *list, - int default_val) +match_prefix (const struct sockaddr_storage *ss, + const struct prefixentry *list, int default_val) { int idx; struct sockaddr_in6 in6_mem; @@ -1277,7 +1320,7 @@ static int get_label (const struct sockaddr_storage *ss) { /* XXX What is a good default value? */ - return match_prefix (ss, default_labels, INT_MAX); + return match_prefix (ss, labels, INT_MAX); } @@ -1285,7 +1328,7 @@ static int get_precedence (const struct sockaddr_storage *ss) { /* XXX What is a good default value? */ - return match_prefix (ss, default_precedence, 0); + return match_prefix (ss, precedence, 0); } @@ -1336,11 +1379,27 @@ rfc3484_sort (const void *p1, const void } - /* Rule 3: Avoid deprecated addresses. - That's something only the kernel could decide. */ + /* Rule 3: Avoid deprecated addresses. */ + if (a1->got_source_addr) + { + if (!(a1->source_addr_flags & in6ai_deprecated) + && (a2->source_addr_flags & in6ai_deprecated)) + return -1; + if ((a1->source_addr_flags & in6ai_deprecated) + && !(a2->source_addr_flags & in6ai_deprecated)) + return 1; + } - /* Rule 4: Prefer home addresses. - Another thing only the kernel can decide. */ + /* Rule 4: Prefer home addresses. */ + if (a1->got_source_addr) + { + if (!(a1->source_addr_flags & in6ai_homeaddress) + && (a2->source_addr_flags & in6ai_homeaddress)) + return -1; + if ((a1->source_addr_flags & in6ai_homeaddress) + && !(a2->source_addr_flags & in6ai_homeaddress)) + return 1; + } /* Rule 5: Prefer matching label. */ if (a1->got_source_addr) @@ -1372,8 +1431,18 @@ rfc3484_sort (const void *p1, const void return 1; - /* Rule 7: Prefer native transport. - XXX How to recognize tunnels? */ + /* Rule 7: Prefer native transport. */ + if (a1->got_source_addr) + { + if (!(a1->source_addr_flags & in6ai_temporary) + && (a1->source_addr_flags & in6ai_temporary)) + return -1; + if ((a1->source_addr_flags & in6ai_temporary) + && !(a1->source_addr_flags & in6ai_temporary)) + return -1; + + /* XXX Do we need to check anything beside temporary addresses? */ + } /* Rule 8: Prefer smaller scope. */ @@ -1454,15 +1523,341 @@ rfc3484_sort (const void *p1, const void } +static int +in6aicmp (const void *p1, const void *p2) +{ + struct in6addrinfo *a1 = (struct in6addrinfo *) p1; + struct in6addrinfo *a2 = (struct in6addrinfo *) p2; + + return memcmp (a1->addr, a2->addr, sizeof (a1->addr)); +} + + +/* Name of the config file for RFC 3484 sorting (for now). */ +#define GAICONF_FNAME "/etc/gai.conf" + + +/* Nozero if we are supposed to reload the config file automatically + whenever it changed. */ +static int gaiconf_reload_flag; + +/* Last modification time. */ +static struct timespec gaiconf_mtime; + + +libc_freeres_fn(fini) +{ + if (labels != default_labels) + { + const struct prefixentry *old = labels; + labels = default_labels; + free ((void *) old); + } + + if (precedence != default_precedence) + { + const struct prefixentry *old = precedence; + precedence = default_precedence; + free ((void *) old); + } +} + + +struct prefixlist +{ + struct prefixentry entry; + struct prefixlist *next; +}; + + +static void +free_prefixlist (struct prefixlist *list) +{ + while (list != NULL) + { + struct prefixlist *oldp = list; + list = list->next; + free (oldp); + } +} + + +static int +prefixcmp (const void *p1, const void *p2) +{ + const struct prefixentry *e1 = (const struct prefixentry *) p1; + const struct prefixentry *e2 = (const struct prefixentry *) p2; + + if (e1->bits < e2->bits) + return 1; + if (e1->bits == e2->bits) + return 0; + return -1; +} + + +static void +gaiconf_init (void) +{ + struct prefixlist *labellist = NULL; + size_t nlabellist = 0; + bool labellist_nullbits = false; + struct prefixlist *precedencelist = NULL; + size_t nprecedencelist = 0; + bool precedencelist_nullbits = false; + + FILE *fp = fopen (GAICONF_FNAME, "rc"); + if (fp != NULL) + { + struct stat64 st; + if (__fxstat64 (_STAT_VER, fileno (fp), &st) != 0) + { + fclose (fp); + goto no_file; + } + + char *line = NULL; + size_t linelen = 0; + + __fsetlocking (fp, FSETLOCKING_BYCALLER); + + while (!feof_unlocked (fp)) + { + ssize_t n = __getline (&line, &linelen, fp); + if (n <= 0) + break; + + /* Handle comments. No escaping possible so this is easy. */ + char *cp = strchr (line, '#'); + if (cp != NULL) + *cp = '\0'; + + cp = line; + while (isspace (*cp)) + ++cp; + + char *cmd = cp; + while (*cp != '\0' && !isspace (*cp)) + ++cp; + size_t cmdlen = cp - cmd; + + if (*cp != '\0') + *cp++ = '\0'; + while (isspace (*cp)) + ++cp; + + char *val1 = cp; + while (*cp != '\0' && !isspace (*cp)) + ++cp; + size_t val1len = cp - cmd; + + /* We always need at least two values. */ + if (val1len == 0) + continue; + + if (*cp != '\0') + *cp++ = '\0'; + while (isspace (*cp)) + ++cp; + + char *val2 = cp; + while (*cp != '\0' && !isspace (*cp)) + ++cp; + + /* Ignore the rest of the line. */ + *cp = '\0'; + + struct prefixlist **listp; + size_t *lenp; + bool *nullbitsp; + switch (cmdlen) + { + case 5: + if (strcmp (cmd, "label") == 0) + { + struct in6_addr prefix; + unsigned long int bits; + unsigned long int val; + char *endp; + + listp = &labellist; + lenp = &nlabellist; + nullbitsp = &labellist_nullbits; + + new_elem: + bits = 128; + __set_errno (0); + cp = strchr (val1, '/'); + if (cp != NULL) + *cp++ = '\0'; + if (inet_pton (AF_INET6, val1, &prefix) + && (cp == NULL + || (bits = strtoul (cp, &endp, 10)) != ULONG_MAX + || errno != ERANGE) + && *endp == '\0' + && bits <= INT_MAX + && ((val = strtoul (val2, &endp, 10)) != ULONG_MAX + || errno != ERANGE) + && *endp == '\0' + && val <= INT_MAX) + { + struct prefixlist *newp = malloc (sizeof (*newp)); + if (newp == NULL) + { + free (line); + fclose (fp); + goto no_file; + } + + memcpy (&newp->entry.prefix, &prefix, sizeof (prefix)); + newp->entry.bits = bits; + newp->entry.val = val; + newp->next = *listp; + *listp = newp; + ++*lenp; + *nullbitsp |= bits == 0; + } + } + break; + + case 6: + if (strcmp (cmd, "reload") == 0) + gaiconf_reload_flag = strcmp (val1, "yes") == 0; + break; + + case 10: + if (strcmp (cmd, "precedence") == 0) + { + listp = &precedencelist; + lenp = &nprecedencelist; + nullbitsp = &precedencelist_nullbits; + goto new_elem; + } + break; + } + } + + free (line); + + fclose (fp); + + /* Create the array for the labels. */ + struct prefixentry *new_labels; + if (nlabellist > 0) + { + if (!labellist_nullbits) + ++nlabellist; + new_labels = malloc (nlabellist * sizeof (*new_labels)); + if (new_labels == NULL) + goto no_file; + + int i = nlabellist; + if (!labellist_nullbits) + { + --i; + memset (&new_labels[i].prefix, '\0', sizeof (struct in6_addr)); + new_labels[i].bits = 0; + new_labels[i].val = 1; + } + + struct prefixlist *l = labellist; + while (i-- > 0) + { + new_labels[i] = l->entry; + l = l->next; + } + free_prefixlist (labellist); + + /* Sort the entries so that the most specific ones are at + the beginning. */ + qsort (new_labels, nlabellist, sizeof (*new_labels), prefixcmp); + } + else + new_labels = (struct prefixentry *) default_labels; + + struct prefixentry *new_precedence; + if (nprecedencelist > 0) + { + if (!precedencelist_nullbits) + ++nprecedencelist; + new_precedence = malloc (nprecedencelist * sizeof (*new_precedence)); + if (new_precedence == NULL) + { + if (new_labels != default_labels) + free (new_labels); + goto no_file; + } + + int i = nprecedencelist; + if (!precedencelist_nullbits) + { + --i; + memset (&new_precedence[i].prefix, '\0', + sizeof (struct in6_addr)); + new_precedence[i].bits = 0; + new_precedence[i].val = 40; + } + + struct prefixlist *l = precedencelist; + while (i-- > 0) + { + new_precedence[i] = l->entry; + l = l->next; + } + free_prefixlist (precedencelist); + + /* Sort the entries so that the most specific ones are at + the beginning. */ + qsort (new_precedence, nprecedencelist, sizeof (*new_labels), + prefixcmp); + } + else + new_precedence = (struct prefixentry *) default_precedence; + + /* Now we are ready to replace the values. */ + const struct prefixentry *old = labels; + labels = new_labels; + if (old != default_labels) + free ((void *) old); + + old = precedence; + precedence = new_precedence; + if (old != default_precedence) + free ((void *) old); + + gaiconf_mtime = st.st_mtim; + } + else + { + no_file: + free_prefixlist (labellist); + free_prefixlist (precedencelist); + + /* If we previously read the file but it is gone now, free the + old data and use the builtin one. Leave the reload flag + alone. */ + fini (); + } +} + + +static void +gaiconf_reload (void) +{ + struct stat64 st; + if (__xstat64 (_STAT_VER, GAICONF_FNAME, &st) != 0 + || memcmp (&st.st_mtim, &gaiconf_mtime, sizeof (gaiconf_mtime)) != 0) + gaiconf_init (); +} + + int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) { - int i = 0, j = 0, last_i = 0; + int i = 0, last_i = 0; int nresults = 0; - struct addrinfo *p = NULL, **end; - const struct gaih *g = gaih; - const struct gaih *pg = NULL; + struct addrinfo *p = NULL; struct gaih_service gaih_service, *pservice; struct addrinfo local_hints; @@ -1490,15 +1885,23 @@ getaddrinfo (const char *name, const cha if ((hints->ai_flags & AI_CANONNAME) && name == NULL) return EAI_BADFLAGS; + struct in6addrinfo *in6ai = NULL; + size_t in6ailen; + bool seen_ipv4 = false; + bool seen_ipv6 = false; + /* We might need information about what kind of interfaces are available. + But even if AI_ADDRCONFIG is not used, if the user requested IPv6 + addresses we have to know whether an address is deprecated or + temporary. */ + if ((hints->ai_flags & AI_ADDRCONFIG) || hints->ai_family == PF_UNSPEC + || hints->ai_family == PF_INET6) + /* Determine whether we have IPv4 or IPv6 interfaces or both. We + cannot cache the results since new interfaces could be added at + any time. */ + __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen); + if (hints->ai_flags & AI_ADDRCONFIG) { - /* Determine whether we have IPv4 or IPv6 interfaces or both. - We cannot cache the results since new interfaces could be - added at any time. */ - bool seen_ipv4; - bool seen_ipv6; - __check_pf (&seen_ipv4, &seen_ipv6); - /* Now make a decision on what we return, if anything. */ if (hints->ai_family == PF_UNSPEC && (seen_ipv4 || seen_ipv6)) { @@ -1513,8 +1916,11 @@ getaddrinfo (const char *name, const cha } else if ((hints->ai_family == PF_INET && ! seen_ipv4) || (hints->ai_family == PF_INET6 && ! seen_ipv6)) - /* We cannot possibly return a valid answer. */ - return EAI_NONAME; + { + /* We cannot possibly return a valid answer. */ + free (in6ai); + return EAI_NONAME; + } } if (service && service[0]) @@ -1525,7 +1931,10 @@ getaddrinfo (const char *name, const cha if (*c != '\0') { if (hints->ai_flags & AI_NUMERICSERV) - return EAI_NONAME; + { + free (in6ai); + return EAI_NONAME; + } gaih_service.num = -1; } @@ -1535,12 +1944,21 @@ getaddrinfo (const char *name, const cha else pservice = NULL; + struct addrinfo **end; if (pai) end = &p; else end = NULL; unsigned int naddrs = 0; +#if 0 + /* If we would support more protocols than just IPv4 and IPv6 we + would iterate over a table with appropriate callback functions. + Since we currently only handle IPv4 and IPv6 this is not + necessary. */ + const struct gaih *g = gaih; + const struct gaih *pg = NULL; + int j = 0; while (g->gaih) { if (hints->ai_family == g->family || hints->ai_family == AF_UNSPEC) @@ -1564,6 +1982,7 @@ getaddrinfo (const char *name, const cha } freeaddrinfo (p); + free (in6ai); return -(i & GAIH_EAI); } @@ -1579,16 +1998,56 @@ getaddrinfo (const char *name, const cha } if (j == 0) - return EAI_FAMILY; + { + free (in6ai); + return EAI_FAMILY; + } +#else + if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET + || hints->ai_family == AF_INET6) + { + last_i = gaih_inet (name, pservice, hints, end, &naddrs); + if (last_i != 0) + { + freeaddrinfo (p); + free (in6ai); + + return -(last_i & GAIH_EAI); + } + if (end) + while (*end) + { + end = &((*end)->ai_next); + ++nresults; + } + } + else + { + free (in6ai); + return EAI_FAMILY; + } +#endif if (naddrs > 1) { + /* Read the config file. */ + __libc_once_define (static, once); + __typeof (once) old_once = once; + __libc_once (once, gaiconf_init); + if (old_once && gaiconf_reload_flag) + gaiconf_reload (); + /* Sort results according to RFC 3484. */ struct sort_result results[nresults]; struct addrinfo *q; struct addrinfo *last = NULL; char *canonname = NULL; + /* If we have information about deprecated and temporary address + sort the array now. */ + if (in6ai != NULL) + qsort (in6ai, in6ailen, sizeof (*in6ai), in6aicmp); + for (i = 0, q = p; q != NULL; ++i, last = q, q = q->ai_next) { results[i].dest_addr = q; @@ -1603,9 +2062,12 @@ getaddrinfo (const char *name, const cha results[i - 1].source_addr_len); results[i].source_addr_len = results[i - 1].source_addr_len; results[i].got_source_addr = results[i - 1].got_source_addr; + results[i].source_addr_flags = results[i - 1].source_addr_flags; } else { + results[i].source_addr_flags = 0; + /* We overwrite the type with SOCK_DGRAM since we do not want connect() to connect to the other side. If we cannot determine the source address remember this @@ -1620,6 +2082,20 @@ getaddrinfo (const char *name, const cha { results[i].source_addr_len = sl; results[i].got_source_addr = true; + + if (q->ai_family == PF_INET6 && in6ai != NULL) + { + /* See whether the address is the list of deprecated + or temporary addresses. */ + struct in6addrinfo tmp; + memcpy (tmp.addr, q->ai_addr, IN6ADDRSZ); + + struct in6addrinfo *found + = bsearch (&tmp, in6ai, in6ailen, sizeof (*in6ai), + in6aicmp); + if (found != NULL) + results[i].source_addr_flags = found->flags; + } } else /* Just make sure that if we have to process the same @@ -1653,6 +2129,8 @@ getaddrinfo (const char *name, const cha p->ai_canonname = canonname; } + free (in6ai); + if (p) { *pai = p; diff -uprN glibc-2.4/sysdeps/posix/pause.c glibc-2.5/sysdeps/posix/pause.c --- glibc-2.4/sysdeps/posix/pause.c 2003-02-24 22:35:53.000000000 +0000 +++ glibc-2.5/sysdeps/posix/pause.c 2006-07-31 05:57:58.000000000 +0000 @@ -1,5 +1,5 @@ /* pause -- suspend the process until a signal arrives. POSIX.1 version. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ /* Suspend the process until a signal arrives. This always returns -1 and sets errno to EINTR. */ + int __libc_pause (void) { @@ -39,3 +40,18 @@ __libc_pause (void) weak_alias (__libc_pause, pause) LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */ + +#ifndef NO_CANCELLATION +# include + +int +__pause_nocancel (void) +{ + sigset_t set; + + __sigemptyset (&set); + __sigprocmask (SIG_BLOCK, NULL, &set); + + return sigsuspend_not_cancel (&set); +} +#endif diff -uprN glibc-2.4/sysdeps/posix/sigset.c glibc-2.5/sysdeps/posix/sigset.c --- glibc-2.4/sysdeps/posix/sigset.c 2005-06-17 22:47:23.000000000 +0000 +++ glibc-2.5/sysdeps/posix/sigset.c 2006-04-23 19:04:13.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,8 +29,10 @@ sigset (sig, disp) int sig; __sighandler_t disp; { - struct sigaction act, oact; + struct sigaction act; + struct sigaction oact; sigset_t set; + sigset_t oset; #ifdef SIG_HOLD /* Handle SIG_HOLD first. */ @@ -45,10 +47,18 @@ sigset (sig, disp) return SIG_ERR; /* Add the signal set to the current signal mask. */ - if (__sigprocmask (SIG_BLOCK, &set, NULL) < 0) + if (__sigprocmask (SIG_BLOCK, &set, &oset) < 0) return SIG_ERR; - return SIG_HOLD; + /* If the signal was already blocked signal this to the caller. */ + if (__sigismember (&oset, sig)) + return SIG_HOLD; + + /* We need to determine whether a specific handler is installed. */ + if (__sigaction (sig, NULL, &oact) < 0) + return SIG_ERR; + + return oact.sa_handler; } #endif /* SIG_HOLD */ @@ -75,8 +85,9 @@ sigset (sig, disp) return SIG_ERR; /* Remove the signal set from the current signal mask. */ - if (__sigprocmask (SIG_UNBLOCK, &set, NULL) < 0) + if (__sigprocmask (SIG_UNBLOCK, &set, &oset) < 0) return SIG_ERR; - return oact.sa_handler; + /* If the signal was already blocked return SIG_HOLD. */ + return __sigismember (&oset, sig) ? SIG_HOLD : oact.sa_handler; } diff -uprN glibc-2.4/sysdeps/posix/spawni.c glibc-2.5/sysdeps/posix/spawni.c --- glibc-2.4/sysdeps/posix/spawni.c 2005-09-13 18:41:48.000000000 +0000 +++ glibc-2.5/sysdeps/posix/spawni.c 2006-06-04 22:16:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Guts of POSIX spawn interface. Generic POSIX.1 version. - Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 2000-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include #include "spawn_int.h" #include +#include /* The Unix standard contains a long explanation of the way to signal @@ -155,7 +156,8 @@ __spawni (pid_t *pid, const char *file, /* Set the effective user and group IDs. */ if ((flags & POSIX_SPAWN_RESETIDS) != 0 - && (seteuid (__getuid ()) != 0 || setegid (__getgid ()) != 0)) + && (local_seteuid (__getuid ()) != 0 + || local_setegid (__getgid ()) != 0)) _exit (SPAWN_ERROR); /* Execute the file actions. */ @@ -177,9 +179,10 @@ __spawni (pid_t *pid, const char *file, case spawn_do_open: { - int new_fd = __open64 (action->action.open_action.path, - action->action.open_action.oflag, - action->action.open_action.mode); + int new_fd = open_not_cancel (action->action.open_action.path, + action->action.open_action.oflag + | O_LARGEFILE, + action->action.open_action.mode); if (new_fd == -1) /* The `open' call failed. */ @@ -193,7 +196,7 @@ __spawni (pid_t *pid, const char *file, /* The `dup2' call failed. */ _exit (SPAWN_ERROR); - if (__close (new_fd) != 0) + if (close_not_cancel (new_fd) != 0) /* The `close' call failed. */ _exit (SPAWN_ERROR); } diff -uprN glibc-2.4/sysdeps/posix/tempname.c glibc-2.5/sysdeps/posix/tempname.c --- glibc-2.4/sysdeps/posix/tempname.c 2001-11-27 03:35:06.000000000 +0000 +++ glibc-2.5/sysdeps/posix/tempname.c 2006-04-07 19:29:07.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1999, 2000, 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -242,11 +242,15 @@ __gen_tempname (char *tmpl, int kind) necessary to try all these combinations. Instead if a reasonable number of names is tried (we define reasonable as 62**3) fail to give the system administrator the chance to remove the problems. */ - unsigned int attempts_min = 62 * 62 * 62; +#define ATTEMPTS_MIN (62 * 62 * 62) /* The number of times to attempt to generate a temporary file. To conform to POSIX, this must be no smaller than TMP_MAX. */ - unsigned int attempts = attempts_min < TMP_MAX ? TMP_MAX : attempts_min; +#if ATTEMPTS_MIN < TMP_MAX + unsigned int attempts = TMP_MAX; +#else + unsigned int attempts = ATTEMPTS_MIN; +#endif len = strlen (tmpl); if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) diff -uprN glibc-2.4/sysdeps/powerpc/dl-procinfo.c glibc-2.5/sysdeps/powerpc/dl-procinfo.c --- glibc-2.4/sysdeps/powerpc/dl-procinfo.c 2005-12-13 09:26:13.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/dl-procinfo.c 2006-09-15 07:47:28.000000000 +0000 @@ -1,5 +1,5 @@ /* Data for processor capability information. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,11 +46,12 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_powerpc_cap_flags #else -PROCINFO_CLASS const char _dl_powerpc_cap_flags[16][10] +PROCINFO_CLASS const char _dl_powerpc_cap_flags[20][10] #endif #ifndef PROCINFO_DECL = { - "cell", "power5+", "power5", "power4", + "arch_2_05", "ic_snoop", "smt", "booke", + "cellbe", "power5+", "power5", "power4", "notb", "efpdouble", "efpsingle", "spe", "ucache", "4xxmac", "mmu", "fpu", "altivec", "ppc601", "ppc64", "ppc32", @@ -62,5 +63,21 @@ PROCINFO_CLASS const char _dl_powerpc_ca , #endif +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_platforms +#else +PROCINFO_CLASS const char _dl_powerpc_platforms[6][12] +#endif +#ifndef PROCINFO_DECL += { + "power4", "ppc970", "power5", "power5+", "power6", "ppc-cell-be" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + #undef PROCINFO_DECL #undef PROCINFO_CLASS diff -uprN glibc-2.4/sysdeps/powerpc/dl-procinfo.h glibc-2.5/sysdeps/powerpc/dl-procinfo.h --- glibc-2.4/sysdeps/powerpc/dl-procinfo.h 2005-12-13 09:26:13.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/dl-procinfo.h 2006-09-15 07:47:45.000000000 +0000 @@ -1,5 +1,5 @@ /* Processor capability information handling macros. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,27 +23,33 @@ #include #include /* This defines the PPC_FEATURE_* macros. */ -/* There are 16 bits used, but they are bits 16..31. */ -#define _DL_HWCAP_FIRST 16 +/* There are 20 bits used, but they are bits 12..31. */ +#define _DL_HWCAP_FIRST 12 #define _DL_HWCAP_COUNT 32 /* These bits influence library search. */ -#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ - | PPC_FEATURE_POWER4 \ - | PPC_FEATURE_POWER5 \ - | PPC_FEATURE_POWER5_PLUS \ - | PPC_FEATURE_CELL) - -/* We don't use AT_PLATFORM. */ -#define _DL_HWCAP_PLATFORM 0 -#define _dl_string_platform(str) (-1) +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC) + +#define _DL_PLATFORMS_COUNT 6 + +#define _DL_FIRST_PLATFORM 32 +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ + << _DL_FIRST_PLATFORM) static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; -}; +} + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; +} static inline int __attribute__ ((unused)) @@ -53,7 +59,48 @@ _dl_string_hwcap (const char *str) if (strcmp (str, _dl_hwcap_string (i)) == 0) return i; return -1; -}; +} + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + if (str == NULL) + return -1; + + if (strncmp (str, GLRO(dl_powerpc_platforms)[0], 5) == 0) + { + int ret; + str += 5; + switch (*str) + { + case '4': + ret = _DL_FIRST_PLATFORM + 0; + break; + case '5': + ret = _DL_FIRST_PLATFORM + 2; + if (str[1] == '+') + ++ret, ++str; + break; + case '6': + ret = _DL_FIRST_PLATFORM + 4; + break; + default: + return -1; + } + if (str[1] == '\0') + return ret; + } + else if (strncmp (str, GLRO(dl_powerpc_platforms)[1], 3) == 0) + { + if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[1] + 3) == 0) + return _DL_FIRST_PLATFORM + 1; + else if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[5] + 3) == 0) + return _DL_FIRST_PLATFORM + 5; + } + + return -1; +} #ifdef IS_IN_rtld static inline int diff -uprN glibc-2.4/sysdeps/powerpc/fpu/bits/mathinline.h glibc-2.5/sysdeps/powerpc/fpu/bits/mathinline.h --- glibc-2.4/sysdeps/powerpc/fpu/bits/mathinline.h 2006-01-21 19:40:59.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/bits/mathinline.h 2006-04-14 05:43:58.000000000 +0000 @@ -129,7 +129,7 @@ __NTH (fdimf (float __x, float __y)) #include #include -# if __WORDSIZE == 64 +# if __WORDSIZE == 64 || defined _ARCH_PWR4 # define __CPU_HAS_FSQRT 1 # else # define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) @@ -141,7 +141,7 @@ __NTH (__ieee754_sqrt (double __x)) { double __z; - /* If the CPU is 64-bit we can use the optional FP instructions we. */ + /* If the CPU is 64-bit we can use the optional FP instructions. */ if (__CPU_HAS_FSQRT) { /* Volatile is required to prevent the compiler from moving the @@ -163,7 +163,7 @@ __NTH (__ieee754_sqrtf (float __x)) { float __z; - /* If the CPU is 64-bit we can use the optional FP instructions we. */ + /* If the CPU is 64-bit we can use the optional FP instructions. */ if (__CPU_HAS_FSQRT) { /* Volatile is required to prevent the compiler from moving the diff -uprN glibc-2.4/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c --- glibc-2.4/sysdeps/powerpc/fpu/e_sqrt.c 2005-11-17 23:33:52.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 05:44:30.000000000 +0000 @@ -169,8 +169,8 @@ __ieee754_sqrt (x) { double z; - /* If the CPU is 64-bit we can use the optional FP instructions we. */ - if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0) + /* If the CPU is 64-bit we can use the optional FP instructions. */ + if (__CPU_HAS_FSQRT) { /* Volatile is required to prevent the compiler from moving the fsqrt instruction above the branch. */ diff -uprN glibc-2.4/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c --- glibc-2.4/sysdeps/powerpc/fpu/e_sqrtf.c 2005-11-17 23:33:52.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 05:44:30.000000000 +0000 @@ -146,8 +146,8 @@ __ieee754_sqrtf (x) { double z; - /* If the CPU is 64-bit we can use the optional FP instructions we. */ - if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0) + /* If the CPU is 64-bit we can use the optional FP instructions. */ + if (__CPU_HAS_FSQRT) { /* Volatile is required to prevent the compiler from moving the fsqrt instruction above the branch. */ diff -uprN glibc-2.4/sysdeps/powerpc/fpu/fegetround.c glibc-2.5/sysdeps/powerpc/fpu/fegetround.c --- glibc-2.4/sysdeps/powerpc/fpu/fegetround.c 2001-07-06 04:56:02.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/fegetround.c 2006-03-16 11:46:34.000000000 +0000 @@ -23,7 +23,5 @@ int fegetround (void) { - int result; - asm ("mcrfs 7,7 ; mfcr %0" : "=r"(result) : : "cr7"); \ - return result & 3; + return __fegetround(); } diff -uprN glibc-2.4/sysdeps/powerpc/fpu/fenv_libc.h glibc-2.5/sysdeps/powerpc/fpu/fenv_libc.h --- glibc-2.4/sysdeps/powerpc/fpu/fenv_libc.h 2001-07-06 04:56:02.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/fenv_libc.h 2006-03-16 11:46:34.000000000 +0000 @@ -1,5 +1,5 @@ /* Internal libc stuff for floating point environment routines. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -54,6 +54,41 @@ typedef union unsigned int l[2]; } fenv_union_t; + +static inline int +__fegetround (void) +{ + int result; + asm volatile ("mcrfs 7,7\n\t" + "mfcr %0" : "=r"(result) : : "cr7"); + return result & 3; +} +#define fegetround() __fegetround() + +static inline int +__fesetround (int round) +{ + if ((unsigned int) round < 2) + { + asm volatile ("mtfsb0 30"); + if ((unsigned int) round == 0) + asm volatile ("mtfsb0 31"); + else + asm volatile ("mtfsb1 31"); + } + else + { + asm volatile ("mtfsb1 30"); + if ((unsigned int) round == 2) + asm volatile ("mtfsb0 31"); + else + asm volatile ("mtfsb1 31"); + } + + return 0; +} +#define fesetround(mode) __fesetround(mode) + /* Definitions of all the FPSCR bit numbers */ enum { FPSCR_FX = 0, /* exception summary */ diff -uprN glibc-2.4/sysdeps/powerpc/fpu/fesetround.c glibc-2.5/sysdeps/powerpc/fpu/fesetround.c --- glibc-2.4/sysdeps/powerpc/fpu/fesetround.c 2005-07-08 18:52:46.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/fesetround.c 2006-03-16 11:46:34.000000000 +0000 @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997, 2005 Free Software Foundation, Inc. + Copyright (C) 1997, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -20,23 +20,13 @@ #include +#undef fesetround int fesetround (int round) { - fenv_union_t u; - if ((unsigned int) round > 3) return 1; - - /* Get the current state. */ - u.fenv = fegetenv_register (); - - /* Set the relevant bits. */ - u.l[1] = (u.l[1] & ~3) | (round & 3); - - /* Put the new state in effect. */ - fesetenv_register (u.fenv); - - return 0; + else + return __fesetround(round); } libm_hidden_def (fesetround) diff -uprN glibc-2.4/sysdeps/powerpc/fpu/libm-test-ulps glibc-2.5/sysdeps/powerpc/fpu/libm-test-ulps --- glibc-2.4/sysdeps/powerpc/fpu/libm-test-ulps 2006-01-31 21:31:27.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/libm-test-ulps 2006-09-25 14:14:19.000000000 +0000 @@ -264,8 +264,8 @@ ldouble: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 @@ -364,6 +364,8 @@ ldouble: 2 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -739,6 +741,9 @@ idouble: 1 ifloat: 1 # y0 +Test "y0 (0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 Test "y0 (0.75) == -0.137172769385772397522814379396581855": ildouble: 1 ldouble: 1 @@ -800,6 +805,9 @@ ildouble: 2 ldouble: 2 # yn +Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": ildouble: 1 ldouble: 1 @@ -1066,8 +1074,8 @@ ldouble: 1 Function: Real part of "clog10": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "clog10": double: 1 diff -uprN glibc-2.4/sysdeps/powerpc/fpu/math_ldbl.h glibc-2.5/sysdeps/powerpc/fpu/math_ldbl.h --- glibc-2.4/sysdeps/powerpc/fpu/math_ldbl.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/fpu/math_ldbl.h 2006-03-16 11:46:32.000000000 +0000 @@ -0,0 +1,189 @@ +#ifndef _MATH_PRIVATE_H_ +#error "Never use directly; include instead." +#endif + +#include +#include + +static inline void +ldbl_extract_mantissa (int64_t *hi64, u_int64_t *lo64, int *exp, long double x) +{ + /* We have 105 bits of mantissa plus one implicit digit. Since + 106 bits are representable we use the first implicit digit for + the number before the decimal point and the second implicit bit + as bit 53 of the mantissa. */ + unsigned long long hi, lo; + int ediff; + union ibm_extended_long_double eldbl; + eldbl.d = x; + *exp = eldbl.ieee.exponent - IBM_EXTENDED_LONG_DOUBLE_BIAS; + + lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3; + hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1; + /* If the lower double is not a denomal or zero then set the hidden + 53rd bit. */ + if (eldbl.ieee.exponent2 > 0x001) + { + lo |= (1ULL << 52); + lo = lo << 7; /* pre-shift lo to match ieee854. */ + /* The lower double is normalized separately from the upper. We + may need to adjust the lower manitissa to reflect this. */ + ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; + if (ediff > 53) + lo = lo >> (ediff-53); + } + hi |= (1ULL << 52); + + if ((eldbl.ieee.negative != eldbl.ieee.negative2) + && ((eldbl.ieee.exponent2 != 0) && (lo != 0LL))) + { + hi--; + lo = (1ULL << 60) - lo; + if (hi < (1ULL << 52)) + { + /* we have a borrow from the hidden bit, so shift left 1. */ + hi = (hi << 1) | (lo >> 59); + lo = 0xfffffffffffffffLL & (lo << 1); + *exp = *exp - 1; + } + } + *lo64 = (hi << 60) | lo; + *hi64 = hi >> 4; +} + +static inline long double +ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64) +{ + union ibm_extended_long_double u; + unsigned long hidden2, lzcount; + unsigned long long hi, lo; + + u.ieee.negative = sign; + u.ieee.negative2 = sign; + u.ieee.exponent = exp + IBM_EXTENDED_LONG_DOUBLE_BIAS; + u.ieee.exponent2 = exp-53 + IBM_EXTENDED_LONG_DOUBLE_BIAS; + /* Expect 113 bits (112 bits + hidden) right justified in two longs. + The low order 53 bits (52 + hidden) go into the lower double */ + lo = (lo64 >> 7)& ((1ULL << 53) - 1); + hidden2 = (lo64 >> 59) & 1ULL; + /* The high order 53 bits (52 + hidden) go into the upper double */ + hi = (lo64 >> 60) & ((1ULL << 11) - 1); + hi |= (hi64 << 4); + + if (lo != 0LL) + { + /* hidden2 bit of low double controls rounding of the high double. + If hidden2 is '1' then round up hi and adjust lo (2nd mantissa) + plus change the sign of the low double to compensate. */ + if (hidden2) + { + hi++; + u.ieee.negative2 = !sign; + lo = (1ULL << 53) - lo; + } + /* The hidden bit of the lo mantissa is zero so we need to + normalize the it for the low double. Shift it left until the + hidden bit is '1' then adjust the 2nd exponent accordingly. */ + + if (sizeof (lo) == sizeof (long)) + lzcount = __builtin_clzl (lo); + else if ((lo >> 32) != 0) + lzcount = __builtin_clzl ((long) (lo >> 32)); + else + lzcount = __builtin_clzl ((long) lo) + 32; + lzcount = lzcount - 11; + if (lzcount > 0) + { + int expnt2 = u.ieee.exponent2 - lzcount; + if (expnt2 >= 1) + { + /* Not denormal. Normalize and set low exponent. */ + lo = lo << lzcount; + u.ieee.exponent2 = expnt2; + } + else + { + /* Is denormal. */ + lo = lo << (lzcount + expnt2); + u.ieee.exponent2 = 0; + } + } + } + else + { + u.ieee.negative2 = 0; + u.ieee.exponent2 = 0; + } + + u.ieee.mantissa3 = lo & ((1ULL << 32) - 1); + u.ieee.mantissa2 = (lo >> 32) & ((1ULL << 20) - 1); + u.ieee.mantissa1 = hi & ((1ULL << 32) - 1); + u.ieee.mantissa0 = (hi >> 32) & ((1ULL << 20) - 1); + return u.d; +} + +/* gcc generates disgusting code to pack and unpack long doubles. + This tells gcc that pack/unpack is really a nop. We use fr1/fr2 + because those are the regs used to pass/return a single + long double arg. */ +static inline long double +ldbl_pack (double a, double aa) +{ + register long double x __asm__ ("fr1"); + register double xh __asm__ ("fr1"); + register double xl __asm__ ("fr2"); + xh = a; + xl = aa; + __asm__ ("" : "=f" (x) : "f" (xh), "f" (xl)); + return x; +} + +static inline void +ldbl_unpack (long double l, double *a, double *aa) +{ + register long double x __asm__ ("fr1"); + register double xh __asm__ ("fr1"); + register double xl __asm__ ("fr2"); + x = l; + __asm__ ("" : "=f" (xh), "=f" (xl) : "f" (x)); + *a = xh; + *aa = xl; +} + + +/* Convert a finite long double to canonical form. + Does not handle +/-Inf properly. */ +static inline void +ldbl_canonicalize (double *a, double *aa) +{ + double xh, xl; + + xh = *a + *aa; + xl = (*a - xh) + *aa; + *a = xh; + *aa = xl; +} + +/* Simple inline nearbyint (double) function . + Only works in the default rounding mode + but is useful in long double rounding functions. */ +static inline double +ldbl_nearbyint (double a) +{ + double two52 = 0x10000000000000LL; + + if (__builtin_expect ((__builtin_fabs (a) < two52), 1)) + { + if (__builtin_expect ((a > 0.0), 1)) + { + a += two52; + a -= two52; + } + else if (__builtin_expect ((a < 0.0), 1)) + { + a = two52 - a; + a = -(a - two52); + } + } + return a; +} diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.5/sysdeps/powerpc/powerpc32/bits/atomic.h --- glibc-2.4/sysdeps/powerpc/powerpc32/bits/atomic.h 2004-09-08 05:16:09.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/bits/atomic.h 2006-04-04 08:18:49.000000000 +0000 @@ -89,12 +89,27 @@ # define __arch_atomic_decrement_if_positive_64(mem) \ ({ abort (); (*mem)--; }) +#ifdef _ARCH_PWR4 +/* + * Newer powerpc64 processors support the new "light weight" sync (lwsync) + * So if the build is using -mcpu=[power4,power5,power5+,970] we can + * safely use lwsync. + */ +# define atomic_read_barrier() __asm ("lwsync" ::: "memory") +/* + * "light weight" sync can also be used for the release barrier. + */ +# ifndef UP +# define __ARCH_REL_INSTR "lwsync" +# endif +#else /* * Older powerpc32 processors don't support the new "light weight" * sync (lwsync). So the only safe option is to use normal sync * for all powerpc32 applications. */ # define atomic_read_barrier() __asm ("sync" ::: "memory") +#endif /* * Include the rest of the atomic ops macros which are common to both diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/dl-trampoline.S glibc-2.5/sysdeps/powerpc/powerpc32/dl-trampoline.S --- glibc-2.4/sysdeps/powerpc/powerpc32/dl-trampoline.S 2006-01-07 03:47:26.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/dl-trampoline.S 2006-08-14 22:19:27.000000000 +0000 @@ -40,8 +40,9 @@ _dl_runtime_resolve: mflr r0 # We also need to save some of the condition register fields stw r7,32(r1) - stw r0,68(r1) - cfi_offset (lr, 4) + # Don't clobber the caller's LRSAVE, it is needed by _mcount. + stw r0,48(r1) + cfi_offset (lr, -16) stw r8,36(r1) mfcr r0 stw r9,40(r1) @@ -51,7 +52,7 @@ _dl_runtime_resolve: # 'fixup' returns the address we want to branch to. mtctr r3 # Put the registers back... - lwz r0,68(r1) + lwz r0,48(r1) lwz r10,44(r1) lwz r9,40(r1) mtlr r0 @@ -128,8 +129,9 @@ _dl_prof_resolve: mflr r5 # We also need to save some of the condition register fields. stw r7,32(r1) - stw r5,324(r1) - cfi_offset (lr, 4) + # Don't clobber the caller's LRSAVE, it is needed by _mcount. + stw r5,308(r1) + cfi_offset (lr, -12) stw r8,36(r1) mfcr r0 stw r9,40(r1) @@ -154,7 +156,7 @@ _dl_prof_resolve: # 'fixup' returns the address we want to branch to. mtctr r3 # Put the registers back... - lwz r0,324(r1) + lwz r0,308(r1) lwz r10,44(r1) lwz r9,40(r1) mtlr r0 diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/fpu/fprsave.S glibc-2.5/sysdeps/powerpc/powerpc32/fpu/fprsave.S --- glibc-2.4/sysdeps/powerpc/powerpc32/fpu/fprsave.S 2006-01-04 19:57:19.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/fpu/fprsave.S 2006-03-16 11:48:54.000000000 +0000 @@ -27,68 +27,86 @@ ENTRY(_savefpr_all) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14) C_TEXT(_savef14): C_TEXT(_savefpr_14): stfd fp14,-144(r1) + cfi_offset(fp14,-144) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15) C_TEXT(_savef15): C_TEXT(_savefpr_15): stfd fp15,-136(r1) + cfi_offset(fp15,-136) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16) C_TEXT(_savef16): C_TEXT(_savefpr_16): stfd fp16,-128(r1) + cfi_offset(fp16,-128) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17) C_TEXT(_savef17): C_TEXT(_savefpr_17): stfd fp17,-120(r1) + cfi_offset(fp17,-120) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18) C_TEXT(_savef18): C_TEXT(_savefpr_18): stfd fp18,-112(r1) + cfi_offset(fp18,-112) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19) C_TEXT(_savef19): C_TEXT(_savefpr_19): stfd fp19,-104(r1) + cfi_offset(fp19,-104) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20) C_TEXT(_savef20): C_TEXT(_savefpr_20): stfd fp20,-96(r1) + cfi_offset(fp20,-96) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21) C_TEXT(_savef21): C_TEXT(_savefpr_21): stfd fp21,-88(r1) + cfi_offset(fp21,-88) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22) C_TEXT(_savef22): C_TEXT(_savefpr_22): stfd fp22,-80(r1) + cfi_offset(fp22,-80) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23) C_TEXT(_savef23): C_TEXT(_savefpr_23): stfd fp23,-72(r1) + cfi_offset(fp23,-72) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24) C_TEXT(_savef24): C_TEXT(_savefpr_24): stfd fp24,-64(r1) + cfi_offset(fp24,-64) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25) C_TEXT(_savef25): C_TEXT(_savefpr_25): stfd fp25,-56(r1) + cfi_offset(fp25,-56) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26) C_TEXT(_savef26): C_TEXT(_savefpr_26): stfd fp26,-48(r1) + cfi_offset(fp26,-48) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27) C_TEXT(_savef27): C_TEXT(_savefpr_27): stfd fp27,-40(r1) + cfi_offset(fp27,-40) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28) C_TEXT(_savef28): C_TEXT(_savefpr_28): stfd fp28,-32(r1) + cfi_offset(fp28,-32) ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29) ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29) C_TEXT(_savef29): C_TEXT(_savefpr_29): stfd fp29,-24(r1) #save f29 stfd fp30,-16(r1) #save f30 stfd fp31,-8(r1) #save f31 + cfi_offset(fp29,-24) + cfi_offset(fp30,-16) + cfi_offset(fp31,-8) stw r0,8(r1) #save LR in callers frame blr #return END (_savefpr_all) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S glibc-2.5/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S --- glibc-2.4/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S 2006-01-12 09:27:44.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S 2006-09-22 06:06:43.000000000 +0000 @@ -114,7 +114,11 @@ aligned_restore_vmx: lvx v31,0,r6 L(no_vmx): #endif +#ifdef PTR_DEMANGLE + lwz r24,(JB_GPR1*4)(r3) +#else lwz r1,(JB_GPR1*4)(r3) +#endif lwz r0,(JB_LR*4)(r3) lwz r14,((JB_GPRS+0)*4)(r3) lfd fp14,((JB_FPRS+0*2)*4)(r3) @@ -131,8 +135,8 @@ L(no_vmx): lwz r20,((JB_GPRS+6)*4)(r3) lfd fp20,((JB_FPRS+6*2)*4)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r0, r25) - PTR_DEMANGLE2 (r1, r25) + PTR_DEMANGLE3 (r1, r24, r25) + PTR_DEMANGLE2 (r0, r25) #endif mtlr r0 lwz r21,((JB_GPRS+7)*4)(r3) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/fpu/s_lrint.S glibc-2.5/sysdeps/powerpc/powerpc32/fpu/s_lrint.S --- glibc-2.4/sysdeps/powerpc/powerpc32/fpu/s_lrint.S 2006-01-28 00:07:39.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/fpu/s_lrint.S 2006-09-07 13:46:45.000000000 +0000 @@ -21,13 +21,15 @@ #include /* long int[r3] __lrint (double x[fp1]) */ -ENTRY (__lrint) +ENTRY (__lrint) + stwu r1,-16(r1) fctiw fp13,fp1 - stfd fp13,-8(r1) + stfd fp13,8(r1) nop /* Insure the following load is in a different dispatch group */ nop /* to avoid pipe stall on POWER4&5. */ nop - lwz r3,-4(r1) + lwz r3,12(r1) + addi r1,r1,16 blr END (__lrint) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/gprsave0.S glibc-2.5/sysdeps/powerpc/powerpc32/gprsave0.S --- glibc-2.4/sysdeps/powerpc/powerpc32/gprsave0.S 2006-01-04 19:57:19.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/gprsave0.S 2006-03-16 11:48:54.000000000 +0000 @@ -30,40 +30,59 @@ ENTRY(_savegpr0_all) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_13) C_TEXT(_savegpr0_13): stw r13,-76(r1) + cfi_offset(r13,-76) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_14) C_TEXT(_savegpr0_14): stw r14,-72(r1) + cfi_offset(r14,-72) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_15) C_TEXT(_savegpr0_15): stw r15,-68(r1) + cfi_offset(r15,-68) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_16) C_TEXT(_savegpr0_16): stw r16,-64(r1) + cfi_offset(r16,-64) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_17) C_TEXT(_savegpr0_17): stw r17,-60(r1) + cfi_offset(r17,-60) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_18) C_TEXT(_savegpr0_18): stw r18,-56(r1) + cfi_offset(r18,-56) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_19) C_TEXT(_savegpr0_19): stw r19,-52(r1) + cfi_offset(r19,-52) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_20) C_TEXT(_savegpr0_20): stw r20,-48(r1) + cfi_offset(r20,-48) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_21) C_TEXT(_savegpr0_21): stw r21,-44(r1) + cfi_offset(r21,-44) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_22) C_TEXT(_savegpr0_22): stw r22,-40(r1) + cfi_offset(r22,-40) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_23) C_TEXT(_savegpr0_23): stw r23,-36(r1) + cfi_offset(r23,-36) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_24) C_TEXT(_savegpr0_24): stw r24,-32(r1) + cfi_offset(r24,-32) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_25) C_TEXT(_savegpr0_25): stw r25,-28(r1) + cfi_offset(r25,-28) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_26) C_TEXT(_savegpr0_26): stw r26,-24(r1) + cfi_offset(r26,-24) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_27) C_TEXT(_savegpr0_27): stw r27,-20(r1) + cfi_offset(r27,-20) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_28) C_TEXT(_savegpr0_28): stw r28,-16(r1) + cfi_offset(r28,-16) ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_29) C_TEXT(_savegpr0_29): stw r29,-12(r1) #save r29 stw r30,-8(r1) #save r30 stw r31,-4(r1) #save r31 + cfi_offset(r29,-12) + cfi_offset(r30,-8) + cfi_offset(r31,-4) stw r0,8(r1) #save LR in callers frame blr #return END (_savegpr0_all) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/__longjmp-common.S glibc-2.5/sysdeps/powerpc/powerpc32/__longjmp-common.S --- glibc-2.4/sysdeps/powerpc/powerpc32/__longjmp-common.S 2006-01-12 09:27:45.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/__longjmp-common.S 2006-09-22 06:06:43.000000000 +0000 @@ -31,7 +31,11 @@ ENTRY (BP_SYM (__longjmp)) CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +#ifdef PTR_DEMANGLE + lwz r24,(JB_GPR1*4)(r3) +#else lwz r1,(JB_GPR1*4)(r3) +#endif lwz r0,(JB_LR*4)(r3) lwz r14,((JB_GPRS+0)*4)(r3) lwz r15,((JB_GPRS+1)*4)(r3) @@ -41,8 +45,8 @@ ENTRY (BP_SYM (__longjmp)) lwz r19,((JB_GPRS+5)*4)(r3) lwz r20,((JB_GPRS+6)*4)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r0, r25) - PTR_DEMANGLE2 (r1, r25) + PTR_DEMANGLE3 (r1, r24, r25) + PTR_DEMANGLE2 (r0, r25) #endif mtlr r0 lwz r21,((JB_GPRS+7)*4)(r3) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc32/register-dump.h glibc-2.5/sysdeps/powerpc/powerpc32/register-dump.h --- glibc-2.4/sysdeps/powerpc/powerpc32/register-dump.h 2002-09-05 08:25:50.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc32/register-dump.h 2006-09-17 15:53:05.000000000 +0000 @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/dl-trampoline.S glibc-2.5/sysdeps/powerpc/powerpc64/dl-trampoline.S --- glibc-2.4/sysdeps/powerpc/powerpc64/dl-trampoline.S 2006-01-07 01:12:15.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/dl-trampoline.S 2006-03-16 11:48:54.000000000 +0000 @@ -176,7 +176,9 @@ EALIGN(_dl_profile_resolve, 4, 0) /* Spill r30, r31 to preserve the link_map* and reloc_addr, in case we need to call _dl_call_pltexit. */ std r31,-8(r1) + cfi_offset(r31,-8) std r30,-16(r1) + cfi_offset(r30,-16) /* We need to save the registers used to pass parameters, ie. r3 thru r10; the registers are saved in a stack frame. */ stdu r1,-FRAME_SIZE(r1) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_llrintl.S glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_llrintl.S --- glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_llrintl.S 2006-01-28 00:07:31.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_llrintl.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -/* Round long double to long int. - IBM extended format long double version. - Copyright (C) 2004,2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - - .section ".toc","aw" -.LC0: /* 2**52 */ - .tc FD_43300000_0[TC],0x4330000000000000 -.LC1: /* 2**63 */ - .tc FD_43E00000_0[TC],0x43e0000000000000 - .section ".text" - -/* long long int[r3] __llrintl (long double x[fp1,fp2]) */ -ENTRY (__llrintl) - lfd fp13,.LC0@toc(2) - lfd fp10,.LC1@toc(2) - fabs fp0,fp1 - fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ - fcmpu cr6,fp0,fp10 /* if (fabs(x) > TWO63) */ - beq- cr6,.L2 - fctid fp11,fp1 /* must delay this opperation to here */ - fctid fp12,fp2 /* and avoid setting "invalid operation". */ - li r0,0 - stfd fp11,-16(r1) - bgt- cr6,.L9 /* if > TWO63 return "invalid operation". */ - ble+ cr7,.L9 /* If < TWO52 only thy high double is used. */ - stfd fp12,-8(r1) - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop -.L8: - ld r0,-8(r1) -.L9: - ld r3,-16(r1) - add r3,r3,r0 - blr - -/* The high double is >= TWO63 so it looks like we are "out of range". - But this may be caused by rounding of the high double and the - negative low double may bring it back into range. So we need to - de-round the high double and invert the low double without changing - the effective long double value. To do this we compute a special - value (tau) that we can subtract from the high double and add to - the low double before conversion. The resulting integers can be - summed to get the total value. - - tau = floor(x_high/TWO52); - x0 = x_high - tau; - x1 = x_low + tau; */ -.L2: - fdiv fp8,fp1,fp13 /* x_high/TWO52 */ - fctidz fp0,fp8 - fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */ - fsub fp3,fp1,fp8 /* x0 = x_high - tau; */ - fadd fp4,fp2,fp8 /* x1 = x_low + tau; */ - fctid fp11,fp3 - fctid fp12,fp4 - stfd fp11,-16(r1) - stfd fp12,-8(r1) - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - ld r3,-16(r1) - ld r0,-8(r1) - addo. r3,r3,r0 - bnslr+ cr0 /* if the sum does not overflow, return. */ - fctid fp11,fp1 /* Otherwise we want to set "invalid operation". */ - li r0,0 - stfd fp11,-16(r1) - b .L9 - -END (__llrintl) - -strong_alias (__llrintl, __lrintl) -long_double_symbol (libm, __llrintl, llrintl) -long_double_symbol (libm, __lrintl, lrintl) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_llroundl.S glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_llroundl.S --- glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_llroundl.S 2006-01-28 00:35:55.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_llroundl.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -/* llroundl function. - IBM extended format long double version. - Copyright (C) 2004, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - - .section ".toc","aw" -.LC0: /* 0.0 */ - .tc FD_00000000_0[TC],0x0000000000000000 -.LC1: /* 0.5 */ - .tc FD_3fe00000_0[TC],0x3fe0000000000000 -.LC2: /* 2**52 */ - .tc FD_43300000_0[TC],0x4330000000000000 -.LC3: /* 2**63 */ - .tc FD_43E00000_0[TC],0x43e0000000000000 - .section ".text" - -/* long long [r3] llround (long double x [fp1,fp2]) - IEEE 1003.1 llroundl function. IEEE specifies "round to the nearest - integer value, rounding halfway cases away from zero, regardless of - the current rounding mode." However PowerPC Architecture defines - "round to Nearest" as "Choose the best approximation. In case of a - tie, choose the one that is even (least significant bit o).". - So we can't use the PowerPC "round to Nearest" mode. Instead we set - "round toward Zero" mode and round by adding +-0.5 before rounding - toward zero. The "Floating Convert To Integer Doubleword with round - toward zero" instruction handles the conversion including the - overflow cases and signalling "Invalid Operation". - - PowerPC64 long double uses the IBM extended format which is - represented two 64-floating point double values. The values are - non-overlapping giving an effective precision of 106 bits. The first - double contains the high order bits of mantisa and is always rounded - to represent a normal rounding of long double to double. Since the - long double value is sum of the high and low values, the low double - normally has the opposite sign to compensate for the this rounding. - - For long double there is 4 cases: - 1) |x| < 2**52, all the integer bits are in the high double. - Round and convert the high double to long long. - 2) 2**52 <= |x|< 2**63, Still fits but need bits from both doubles. - Round the low double, convert both, then sum the long long values. - 3) |x| == 2**63, Looks like an overflow but may not be due to rounding - of the high double. - See the description following lable L2. - 4) |x| > 2**63, This will overflow the 64-bit signed integer. - Treat like case #1. The fctidz instruction will generate the - appropriate and signal "invalid operation". - - */ - -ENTRY (__llroundl) - mffs fp7 /* Save current FPU rounding mode. */ - fabs fp0,fp1 - lfd fp13,.LC2@toc(2) /* 2**52 */ - lfd fp12,.LC3@toc(2) /* 2**63 */ - lfd fp11,.LC0@toc(2) /* 0.0 */ - lfd fp10,.LC1@toc(2) /* 0.5 */ - fabs fp9,fp2 - fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ - fcmpu cr6,fp1,fp11 /* if (x > 0.0) */ - bnl- cr7,.L2 - mtfsfi 7,1 /* Set rounding mode toward 0. */ - ble- cr6,.L1 - fadd fp9,fp1,fp10 /* x+= 0.5; */ - b .L0 -.L1: - fsub fp9,fp1,fp10 /* x-= 0.5; */ -.L0: - fctid fp0,fp9 - stfd fp0,-16(r1) - mtfsf 0x01,fp7 /* restore previous rounding mode. */ - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - ld r3,-16(r1) - blr - -/* The high double is > TWO52 so we need to round the low double and - perhaps the high double. In this case we have to round the low - double and handle any adjustment to the high double that may be - caused by rounding (up). This is complicated by the fact that the - high double may already be rounded and the low double may have the - opposite sign to compensate.This gets a bit tricky so we use the - following algorithm: - - tau = trunc(x_high/TWO52); - x0 = x_high - tau; - x1 = x_low + tau; - r1 = round(x1); - y_high = x0 + r1; - y_low = x0 - y_high + r1; - return y; */ -.L2: - fcmpu cr7,fp0,fp12 /* if (|x_high| > TWO63) */ - fcmpu cr0,fp9,fp11 /* || (|x_low| == 0.0) */ - fmr fp9,fp1 - fcmpu cr5,fp2,fp11 /* if (x_low > 0.0) */ - bgt- cr7,.L0 /* return llround(x); */ - mtfsfi 7,1 /* Set rounding mode toward 0. */ - fdiv fp8,fp1,fp13 /* x_high/TWO52 */ - - bng- cr6,.L6 /* if (x > 0.0) */ - fctidz fp0,fp8 - fcfid fp8,fp0 /* tau = trunc(x_high/TWO52); */ - bng cr5,.L4 /* if (x_low > 0.0) */ - fmr fp3,fp1 - fmr fp4,fp2 - b .L5 -.L4: /* if (x_low < 0.0) */ - fsub fp3,fp1,fp8 /* x0 = x_high - tau; */ - fadd fp4,fp2,fp8 /* x1 = x_low + tau; */ -.L5: - fadd fp5,fp4,fp10 /* r1 = x1 + 0.5; */ - b .L9 -.L6: /* if (x < 0.0) */ - fctidz fp0,fp8 - fcfid fp8,fp0 /* tau = trunc(x_high/TWO52); */ - bnl cr5,.L7 /* if (x_low < 0.0) */ - fmr fp3,fp1 - fmr fp4,fp2 - b .L8 -.L7: /* if (x_low > 0.0) */ - fsub fp3,fp1,fp8 /* x0 = x_high - tau; */ - fadd fp4,fp2,fp8 /* x1 = x_low + tau; */ -.L8: - fsub fp5,fp4,fp10 /* r1 = x1 - 0.5; */ -.L9: - fctid. fp11,fp3 - fctid fp12,fp5 - stfd fp11,-16(r1) - stfd fp12,-8(r1) - mtfsf 0x01,fp7 /* restore previous rounding mode. */ - nop /* Insure the following load is in a different dispatch group */ - nop /* to avoid pipe stall on POWER4&5. */ - nop - ld r3,-16(r1) - bunlr cr1 /* if not overflow, return. */ - ld r0,-8(r1) - addo. r3,r3,r0 - bnslr cr0 - fmr fp9,fp12 - bng cr6,.L0 - fneg fp9,fp12 - b .L0 -END (__llroundl) - -strong_alias (__llroundl, __lroundl) -long_double_symbol (libm, __llroundl, llroundl) -long_double_symbol (libm, __lroundl, lroundl) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_lrintl.S glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_lrintl.S --- glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_lrintl.S 2006-01-28 00:07:31.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_lrintl.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -/* __lrintl is in s_llrintl.c */ -/* __lrintl is in s_llrintl.c */ diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_lroundl.S glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_lroundl.S --- glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_lroundl.S 2006-01-28 00:07:31.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_lroundl.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -/* __lroundl is in s_llroundl.S */ -/* __lroundl is in s_llroundl.S */ diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_rintl.S glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_rintl.S --- glibc-2.4/sysdeps/powerpc/powerpc64/fpu/s_rintl.S 2006-01-28 00:07:31.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/fpu/s_rintl.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -/* Round to int long double floating-point values. - IBM extended format long double version. - Copyright (C) 2004, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This has been coded in assembler because GCC makes such a mess of it - when it's coded in C. */ - -#include -#include - - .section ".toc","aw" -.LC0: /* 2**52 */ - .tc FD_43300000_0[TC],0x4330000000000000 - .section ".text" - -ENTRY (__rintl) - lfd fp13,.LC0@toc(2) - fabs fp0,fp1 - fsub fp12,fp13,fp13 /* generate 0.0 */ - fabs fp9,fp2 - fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ - fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnl- cr7,.L2 - fmr fp2,fp12 - bng- cr6,.L1 - fadd fp1,fp1,fp13 /* x+= TWO52; */ - fsub fp1,fp1,fp13 /* x-= TWO52; */ - fabs fp1,fp1 /* if (x == 0.0) */ - blr /* x = 0.0; */ -.L1: - bnllr- cr6 /* if (x < 0.0) */ - fsub fp1,fp1,fp13 /* x-= TWO52; */ - fadd fp1,fp1,fp13 /* x+= TWO52; */ - fnabs fp1,fp1 /* if (x == 0.0) */ - blr /* x = -0.0; */ - -/* The high double is > TWO52 so we need to round the low double and - perhaps the high double. In this case we have to round the low - double and handle any adjustment to the high double that may be - caused by rounding (up). This is complicated by the fact that the - high double may already be rounded and the low double may have the - opposite sign to compensate.This gets a bit tricky so we use the - following algorithm: - - tau = floor(x_high/TWO52); - x0 = x_high - tau; - x1 = x_low + tau; - r1 = rint(x1); - y_high = x0 + r1; - y_low = x0 - y_high + r1; - return y; */ -.L2: - fcmpu cr7,fp9,fp13 /* if (|x_low| > TWO52) */ - fcmpu cr0,fp9,fp12 /* || (|x_low| == 0.0) */ - fcmpu cr5,fp2,fp12 /* if (x_low > 0.0) */ - bgelr- cr7 /* return x; */ - beqlr- cr0 - fdiv fp8,fp1,fp13 /* x_high/TWO52 */ - - bng- cr6,.L6 /* if (x > 0.0) */ - fctidz fp0,fp8 - fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */ - fadd fp8,fp8,fp8 /* tau++; Make tau even */ - bng cr5,.L4 /* if (x_low > 0.0) */ - fmr fp3,fp1 - fmr fp4,fp2 - b .L5 -.L4: /* if (x_low < 0.0) */ - fsub fp3,fp1,fp8 /* x0 = x_high - tau; */ - fadd fp4,fp2,fp8 /* x1 = x_low + tau; */ -.L5: - fadd fp5,fp4,fp13 /* r1 = x1 + TWO52; */ - fsub fp5,fp5,fp13 /* r1 = r1 - TWO52; */ - b .L9 -.L6: /* if (x < 0.0) */ - fctidz fp0,fp8 - fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */ - fadd fp8,fp8,fp8 /* tau++; Make tau even */ - bnl cr5,.L7 /* if (x_low < 0.0) */ - fmr fp3,fp1 - fmr fp4,fp2 - b .L8 -.L7: /* if (x_low > 0.0) */ - fsub fp3,fp1,fp8 /* x0 = x_high - tau; */ - fadd fp4,fp2,fp8 /* x1 = x_low + tau; */ -.L8: - fsub fp5,fp13,fp4 /* r1 = TWO52 - x1; */ - fsub fp0,fp5,fp13 /* r1 = - (r1 - TWO52); */ - fneg fp5,fp0 -.L9: - fadd fp1,fp3,fp5 /* y_high = x0 + r1; */ - fsub fp2,fp3,fp1 /* y_low = x0 - y_high + r1; */ - fadd fp2,fp2,fp5 - blr -END (__rintl) - -long_double_symbol (libm, __rintl, rintl) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/__longjmp-common.S glibc-2.5/sysdeps/powerpc/powerpc64/__longjmp-common.S --- glibc-2.4/sysdeps/powerpc/powerpc64/__longjmp-common.S 2006-01-12 09:27:47.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/__longjmp-common.S 2006-09-22 06:06:43.000000000 +0000 @@ -108,9 +108,11 @@ aligned_restore_vmx: lvx v31,0,r6 L(no_vmx): #endif - ld r1,(JB_GPR1*8)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r1, r25) + ld r22,(JB_GPR1*8)(r3) + PTR_DEMANGLE3 (r1, r22, r25) +#else + ld r1,(JB_GPR1*8)(r3) #endif ld r2,(JB_GPR2*8)(r3) ld r0,(JB_LR*8)(r3) diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/memcpy.S glibc-2.5/sysdeps/powerpc/powerpc64/memcpy.S --- glibc-2.4/sysdeps/powerpc/powerpc64/memcpy.S 2004-10-06 22:08:54.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/memcpy.S 2006-03-16 11:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC64. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -43,6 +43,7 @@ EALIGN (BP_SYM (memcpy), 5, 0) neg 0,3 std 3,-16(1) std 31,-8(1) + cfi_offset(31,-8) andi. 11,3,7 /* check alignement of dst. */ clrldi 0,0,61 /* Number of bytes until the 1st doubleword of dst. */ clrldi 10,4,61 /* check alignement of src. */ diff -uprN glibc-2.4/sysdeps/powerpc/powerpc64/register-dump.h glibc-2.5/sysdeps/powerpc/powerpc64/register-dump.h --- glibc-2.4/sysdeps/powerpc/powerpc64/register-dump.h 2002-09-17 23:50:02.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/powerpc64/register-dump.h 2006-09-17 15:53:33.000000000 +0000 @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ gr16-19: 000000000000010% 00000000000001 gr20-23: 000000000000014% 000000000000015% 000000000000016% 000000000000017%\n\ gr24-27: 000000000000018% 000000000000019% 00000000000001a% 00000000000001b%\n\ gr28-31: 00000000000001c% 00000000000001d% 00000000000001e% 00000000000001f%\n\ -fscr=0000071%\n\ +fscr=000000000000050%\n\ fp0-3: 000000000000030% 000000000000031% 000000000000032% 000000000000033%\n\ fp4-7: 000000000000034% 000000000000035% 000000000000036% 000000000000037%\n\ fp8-11: 000000000000038% 000000000000038% 00000000000003a% 00000000000003b%\n\ @@ -104,7 +104,7 @@ register_dump (int fd, struct sigcontext char buffer[sizeof(dumpform)]; char *bufferpos; unsigned regno; - unsigned *regs = (unsigned *)(ctx->regs); + unsigned long *regs = (unsigned long *)(ctx->regs); memcpy(buffer, dumpform, sizeof(dumpform)); @@ -117,7 +117,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } diff -uprN glibc-2.4/sysdeps/powerpc/sysdep.h glibc-2.5/sysdeps/powerpc/sysdep.h --- glibc-2.4/sysdeps/powerpc/sysdep.h 2005-11-17 23:36:13.000000000 +0000 +++ glibc-2.5/sysdeps/powerpc/sysdep.h 2006-09-15 07:48:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,14 +29,18 @@ #define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ #define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ -#define PPC_FEATURE_HAS_SPE 0x00800000 -#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 -#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 +#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */ +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */ +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */ #define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ -#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 microarch level */ -#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 microarch level */ -#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ microarch level */ -#define PPC_FEATURE_CELL 0x00010000 /* CELL PU microarch level */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.01 */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.02 */ +#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */ +#define PPC_FEATURE_BOOKE 0x00008000 +#define PPC_FEATURE_SMT 0x00004000 +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */ #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) #ifdef __ASSEMBLER__ diff -uprN glibc-2.4/sysdeps/s390/fpu/libm-test-ulps glibc-2.5/sysdeps/s390/fpu/libm-test-ulps --- glibc-2.4/sysdeps/s390/fpu/libm-test-ulps 2006-02-01 19:42:43.000000000 +0000 +++ glibc-2.5/sysdeps/s390/fpu/libm-test-ulps 2006-08-08 15:43:31.000000000 +0000 @@ -513,16 +513,16 @@ ifloat: 1 # j0 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "j0 (0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": -double: 2 +double: 3 float: 1 -idouble: 2 +idouble: 3 ifloat: 1 ildouble: 2 ldouble: 2 @@ -533,9 +533,9 @@ ildouble: 2 ldouble: 2 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "j0 (8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -569,16 +569,16 @@ ldouble: 4 # jn Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "jn (0, 0.75) == 0.864242275166648623555731103820923211": float: 1 ifloat: 1 Test "jn (0, 10.0) == -0.245935764451348335197760862485328754": -double: 2 +double: 3 float: 1 -idouble: 2 +idouble: 3 ifloat: 1 ildouble: 2 ldouble: 2 @@ -589,9 +589,9 @@ ildouble: 2 ldouble: 2 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001": float: 1 ifloat: 1 @@ -661,9 +661,9 @@ idouble: 1 ifloat: 1 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563": double: 3 -float: 1 +float: 2 idouble: 3 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835": @@ -925,9 +925,9 @@ ildouble: 1 ldouble: 1 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Test "yn (10, 2.0) == -129184.542208039282635913145923304214": @@ -1228,9 +1228,9 @@ float: 1 ifloat: 1 Function: "j0": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 ildouble: 2 ldouble: 2 diff -uprN glibc-2.4/sysdeps/s390/s390-32/elf/start.S glibc-2.5/sysdeps/s390/s390-32/elf/start.S --- glibc-2.4/sysdeps/s390/s390-32/elf/start.S 2004-08-16 04:50:59.000000000 +0000 +++ glibc-2.5/sysdeps/s390/s390-32/elf/start.S 2006-05-05 18:25:32.000000000 +0000 @@ -1,5 +1,6 @@ /* Startup code compliant to the ELF s390 ABI. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 + Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -88,9 +89,9 @@ _start: l %r12,.L5-.Llit(%r13) # load .got pointer la %r6,0(%r13,%r6) la %r5,0(%r13,%r5) - la %r2,0(%r13,%r2) - la %r1,0(%r13,%r1) la %r12,0(%r13,%r12) + l %r2,0(%r12,%r2) + la %r1,0(%r13,%r1) #endif /* ok, now branch to the libc main routine */ @@ -108,7 +109,7 @@ _start: #else .L1: .long __libc_csu_init-.Llit .L2: .long __libc_csu_fini-.Llit -.L3: .long main-.Llit +.L3: .long main@GOT .L4: .long __libc_start_main@plt-.Llit .L5: .long _GLOBAL_OFFSET_TABLE_-.Llit #endif diff -uprN glibc-2.4/sysdeps/s390/s390-64/elf/start.S glibc-2.5/sysdeps/s390/s390-64/elf/start.S --- glibc-2.4/sysdeps/s390/s390-64/elf/start.S 2004-08-16 04:50:55.000000000 +0000 +++ glibc-2.5/sysdeps/s390/s390-64/elf/start.S 2006-05-05 18:25:32.000000000 +0000 @@ -1,5 +1,5 @@ /* Startup code compliant to the 64 bit S/390 ELF ABI. - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -78,12 +78,14 @@ _start: la %r7,160(%r15) larl %r6,__libc_csu_fini # load pointer to __libc_csu_fini larl %r5,__libc_csu_init # load pointer to __libc_csu_init - larl %r2,main # load pointer to main /* Ok, now branch to the libc main routine. */ #ifdef PIC + larl %r2,main@GOTENT # load pointer to main + lg %r2,0(%r2) brasl %r14,__libc_start_main@plt #else + larl %r2,main # load pointer to main brasl %r14,__libc_start_main #endif diff -uprN glibc-2.4/sysdeps/sparc/sparc32/bits/atomic.h glibc-2.5/sysdeps/sparc/sparc32/bits/atomic.h --- glibc-2.4/sysdeps/sparc/sparc32/bits/atomic.h 2006-01-03 23:38:10.000000000 +0000 +++ glibc-2.5/sysdeps/sparc/sparc32/bits/atomic.h 2006-03-25 21:00:49.000000000 +0000 @@ -122,7 +122,7 @@ volatile unsigned char __sparc32_atomic_ __asm __volatile (".word 0xcde05005" \ : "+r" (__acev_tmp), "=m" (*__acev_mem) \ : "r" (__acev_oldval), "m" (*__acev_mem), \ - "r" (__acev_mem)); \ + "r" (__acev_mem) : "memory"); \ __acev_tmp; }) #endif diff -uprN glibc-2.4/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h glibc-2.5/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h --- glibc-2.4/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h 2006-01-03 23:39:02.000000000 +0000 +++ glibc-2.5/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h 2006-03-25 21:01:17.000000000 +0000 @@ -59,7 +59,7 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("cas [%4], %2, %0" \ : "=r" (__acev_tmp), "=m" (*__acev_mem) \ : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem), \ - "0" (newval)); \ + "0" (newval) : "memory"); \ __acev_tmp; }) /* This can be implemented if needed. */ @@ -74,7 +74,7 @@ typedef uintmax_t uatomic_max_t; if (sizeof (*(mem)) == 4) \ __asm ("swap %0, %1" \ : "=m" (*__memp), "=r" (__oldval) \ - : "m" (*__memp), "1" (__value)); \ + : "m" (*__memp), "1" (__value) : "memory"); \ else \ abort (); \ __oldval; }) diff -uprN glibc-2.4/sysdeps/sparc/sparc64/bits/atomic.h glibc-2.5/sysdeps/sparc/sparc64/bits/atomic.h --- glibc-2.4/sysdeps/sparc/sparc64/bits/atomic.h 2006-01-03 23:39:46.000000000 +0000 +++ glibc-2.5/sysdeps/sparc/sparc64/bits/atomic.h 2006-03-25 21:01:49.000000000 +0000 @@ -59,7 +59,7 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("cas [%4], %2, %0" \ : "=r" (__acev_tmp), "=m" (*__acev_mem) \ : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem), \ - "0" (newval)); \ + "0" (newval) : "memory"); \ __acev_tmp; }) #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ @@ -69,7 +69,7 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("casx [%4], %2, %0" \ : "=r" (__acev_tmp), "=m" (*__acev_mem) \ : "r" ((long) (oldval)), "m" (*__acev_mem), \ - "r" (__acev_mem), "0" ((long) (newval))); \ + "r" (__acev_mem), "0" ((long) (newval)) : "memory"); \ __acev_tmp; }) #define atomic_exchange_acq(mem, newvalue) \ @@ -80,7 +80,7 @@ typedef uintmax_t uatomic_max_t; if (sizeof (*(mem)) == 4) \ __asm ("swap %0, %1" \ : "=m" (*__memp), "=r" (__oldval) \ - : "m" (*__memp), "1" (__value)); \ + : "m" (*__memp), "1" (__value) : "memory"); \ else \ { \ __val = *__memp; \ diff -uprN glibc-2.4/sysdeps/sparc/sparc64/dl-machine.h glibc-2.5/sysdeps/sparc/sparc64/dl-machine.h --- glibc-2.4/sysdeps/sparc/sparc64/dl-machine.h 2005-04-14 21:39:27.000000000 +0000 +++ glibc-2.5/sysdeps/sparc/sparc64/dl-machine.h 2006-09-09 11:16:26.000000000 +0000 @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -623,7 +623,8 @@ elf_machine_rela (struct link_map *map, value = sym->st_value - sym_map->l_tls_offset + reloc->r_addend; if (r_type == R_SPARC_TLS_LE_HIX22) - *reloc_addr = (*reloc_addr & 0xffc00000) | ((~value) >> 10); + *reloc_addr = (*reloc_addr & 0xffc00000) + | (((~value) >> 10) & 0x3fffff); else *reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff) | 0x1c00; @@ -653,7 +654,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_WDISP30: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xc0000000) | - ((value - (Elf64_Addr) reloc_addr) >> 2)); + (((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff)); break; /* MEDLOW code model relocs */ @@ -665,7 +666,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_HI22: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xffc00000) | - (value >> 10)); + ((value >> 10) & 0x3fffff)); break; case R_SPARC_OLO10: *(unsigned int *) reloc_addr = @@ -677,7 +678,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_H44: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xffc00000) | - (value >> 22)); + ((value >> 22) & 0x3fffff)); break; case R_SPARC_M44: *(unsigned int *) reloc_addr = diff -uprN glibc-2.4/sysdeps/unix/clock_settime.c glibc-2.5/sysdeps/unix/clock_settime.c --- glibc-2.4/sysdeps/unix/clock_settime.c 2004-02-19 09:00:43.000000000 +0000 +++ glibc-2.5/sysdeps/unix/clock_settime.c 2006-08-13 08:06:21.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,6 +36,43 @@ extern void __pthread_clock_settime (clo #endif +#if HP_TIMING_AVAIL +static int +hp_timing_settime (clockid_t clock_id, const struct timespec *tp) +{ + hp_timing_t tsc; + hp_timing_t usertime; + + /* First thing is to get the current time. */ + HP_TIMING_NOW (tsc); + + if (__builtin_expect (freq == 0, 0)) + { + /* This can only happen if we haven't initialized the `freq' + variable yet. Do this now. We don't have to protect this + code against multiple execution since all of them should lead + to the same result. */ + freq = __get_clockfreq (); + if (__builtin_expect (freq == 0, 0)) + /* Something went wrong. */ + return -1; + } + + /* Convert the user-provided time into CPU ticks. */ + usertime = tp->tv_sec * freq + (tp->tv_nsec * freq) / 1000000000ull; + + /* Determine the offset and use it as the new base value. */ + if (clock_id == CLOCK_PROCESS_CPUTIME_ID + || __pthread_clock_settime == NULL) + GL(dl_cpuclock_offset) = tsc - usertime; + else + __pthread_clock_settime (clock_id, tsc - usertime); + + return 0; +} +#endif + + /* Set CLOCK to value TP. */ int clock_settime (clockid_t clock_id, const struct timespec *tp) @@ -70,55 +107,22 @@ clock_settime (clockid_t clock_id, const #endif default: -#if HP_TIMING_AVAIL - if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1)) - != CLOCK_THREAD_CPUTIME_ID) +#ifdef SYSDEP_SETTIME_CPU + SYSDEP_SETTIME_CPU; #endif +#ifndef HANDLED_CPUTIME +# if HP_TIMING_AVAIL + if (CPUCLOCK_WHICH (clock_id) == CLOCK_PROCESS_CPUTIME_ID + || CPUCLOCK_WHICH (clock_id) == CLOCK_THREAD_CPUTIME_ID) + retval = hp_timing_settime (clock_id, tp); + else +# endif { __set_errno (EINVAL); retval = -1; - break; } - -#if HP_TIMING_AVAIL - /* FALLTHROUGH. */ - case CLOCK_PROCESS_CPUTIME_ID: - { - hp_timing_t tsc; - hp_timing_t usertime; - - /* First thing is to get the current time. */ - HP_TIMING_NOW (tsc); - - if (__builtin_expect (freq == 0, 0)) - { - /* This can only happen if we haven't initialized the `freq' - variable yet. Do this now. We don't have to protect this - code against multiple execution since all of them should - lead to the same result. */ - freq = __get_clockfreq (); - if (__builtin_expect (freq == 0, 0)) - { - /* Something went wrong. */ - retval = -1; - break; - } - } - - /* Convert the user-provided time into CPU ticks. */ - usertime = tp->tv_sec * freq + (tp->tv_nsec * freq) / 1000000000ull; - - /* Determine the offset and use it as the new base value. */ - if (clock_id == CLOCK_PROCESS_CPUTIME_ID - || __pthread_clock_settime == NULL) - GL(dl_cpuclock_offset) = tsc - usertime; - else - __pthread_clock_settime (clock_id, tsc - usertime); - - retval = 0; - } - break; #endif + break; } return retval; diff -uprN glibc-2.4/sysdeps/unix/nice.c glibc-2.5/sysdeps/unix/nice.c --- glibc-2.4/sysdeps/unix/nice.c 2002-09-28 19:13:13.000000000 +0000 +++ glibc-2.5/sysdeps/unix/nice.c 2006-08-15 05:24:45.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1996, 1997, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 2001, 2002, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -42,9 +43,11 @@ nice (int incr) } result = setpriority (PRIO_PROCESS, 0, prio + incr); - if (result != -1) - return getpriority (PRIO_PROCESS, 0); - else - return -1; - + if (result == -1) + { + if (errno == EACCES) + errno = EPERM; + return -1; + } + return getpriority (PRIO_PROCESS, 0); } diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h 2005-05-26 18:49:14.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h 2006-08-30 15:04:43.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995-1999, 2000, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,8 +21,10 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files @@ -92,7 +94,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* for F_[GET|SET]FL */ +/* for F_[GET|SET]FD */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */ @@ -173,10 +175,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/alpha/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/alpha/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/alpha/bits/mman.h 2006-02-16 00:15:09.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -96,7 +96,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 6 /* Don't need these pages. */ -# define MADV_REMOVE 7 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/alpha/getcontext.S glibc-2.5/sysdeps/unix/sysv/linux/alpha/getcontext.S --- glibc-2.4/sysdeps/unix/sysv/linux/alpha/getcontext.S 2005-05-26 14:30:46.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/getcontext.S 2006-03-16 23:27:45.000000000 +0000 @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -57,6 +57,8 @@ weak_alias (__getcontext, getcontext) __getcontext_x: cfi_register (64, 0) + .set noat + /* Return value of getcontext. $0 is the only register whose value is not preserved. */ stq $31, UC_SIGCTX+SC_REGS($16) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/bits/poll.h glibc-2.5/sysdeps/unix/sysv/linux/bits/poll.h --- glibc-2.4/sysdeps/unix/sysv/linux/bits/poll.h 2001-07-31 07:46:07.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/bits/poll.h 2006-03-25 20:43:41.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,8 +36,10 @@ #endif #ifdef __USE_GNU -/* This is an extension for Linux. */ +/* These are extensions for Linux. */ # define POLLMSG 0x400 +# define POLLREMOVE 0x1000 +# define POLLRDHUP 0x2000 #endif /* Event types always implicitly polled for. These bits need not be set in diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/bits/socket.h glibc-2.5/sysdeps/unix/sysv/linux/bits/socket.h --- glibc-2.4/sysdeps/unix/sysv/linux/bits/socket.h 2004-11-20 07:04:23.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/bits/socket.h 2006-04-02 17:25:37.000000000 +0000 @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-2001, 2004 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -221,7 +221,10 @@ struct msghdr size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ + size_t msg_controllen; /* Ancillary data buffer length. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ int msg_flags; /* Flags on received message. */ }; @@ -230,7 +233,10 @@ struct msghdr struct cmsghdr { size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ + of cmsghdr structure. + !! The type should be socklen_t but the + definition of the kernel is incompatible + with this. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/bits/uio.h glibc-2.5/sysdeps/unix/sysv/linux/bits/uio.h --- glibc-2.4/sysdeps/unix/sysv/linux/bits/uio.h 2001-07-06 04:56:14.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/bits/uio.h 2006-04-27 04:10:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,10 +16,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _SYS_UIO_H +#if !defined _SYS_UIO_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif +#ifndef _BITS_UIO_H +#define _BITS_UIO_H 1 #include @@ -31,7 +33,7 @@ /* Size of object which can be written atomically. This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since + latest versions of the kernel use 1024 and this is good choice. Since the C library implementation of readv/writev is able to emulate the functionality even if the currently running kernel does not support this large value the readv/writev call will not fail because of this. */ @@ -44,3 +46,5 @@ struct iovec void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; + +#endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/check_pf.c glibc-2.5/sysdeps/unix/sysv/linux/check_pf.c --- glibc-2.4/sysdeps/unix/sysv/linux/check_pf.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/check_pf.c 2006-09-24 16:50:22.000000000 +0000 @@ -17,9 +17,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include #include #include +#include #include #include #include @@ -29,16 +31,30 @@ #include #include +#include #include +#ifndef IFA_F_TEMPORARY +# define IFA_F_TEMPORARY IFA_F_SECONDARY +#endif +#ifndef IFA_F_HOMEADDRESS +# define IFA_F_HOMEADDRESS 0 +#endif + + static int -make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6) +make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) { - struct + struct req { struct nlmsghdr nlh; struct rtgenmsg g; + /* struct rtgenmsg consists of a single byte. This means there + are three bytes of padding included in the REQ definition. + We make them explicit here. */ + char pad[3]; } req; struct sockaddr_nl nladdr; @@ -49,6 +65,9 @@ make_request (int fd, pid_t pid, bool *s req.nlh.nlmsg_seq = time (NULL); req.g.rtgen_family = AF_UNSPEC; + assert (sizeof (req) - offsetof (struct req, pad) == 3); + memset (req.pad, '\0', sizeof (req.pad)); + memset (&nladdr, '\0', sizeof (nladdr)); nladdr.nl_family = AF_NETLINK; @@ -63,6 +82,12 @@ make_request (int fd, pid_t pid, bool *s bool done = false; char buf[4096]; struct iovec iov = { buf, sizeof (buf) }; + struct in6ailist + { + struct in6addrinfo info; + struct in6ailist *next; + } *in6ailist = NULL; + size_t in6ailistlen = 0; do { @@ -101,6 +126,47 @@ make_request (int fd, pid_t pid, bool *s break; case AF_INET6: *seen_ipv6 = true; + + if (ifam->ifa_flags & (IFA_F_DEPRECATED + | IFA_F_TEMPORARY + | IFA_F_HOMEADDRESS)) + { + struct rtattr *rta = IFA_RTA (ifam); + size_t len = (nlmh->nlmsg_len + - NLMSG_LENGTH (sizeof (*ifam))); + void *local = NULL; + void *address = NULL; + while (RTA_OK (rta, len)) + { + switch (rta->rta_type) + { + case IFA_LOCAL: + local = RTA_DATA (rta); + break; + + case IFA_ADDRESS: + address = RTA_DATA (rta); + break; + } + + rta = RTA_NEXT (rta, len); + } + + struct in6ailist *newp = alloca (sizeof (*newp)); + newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED) + ? in6ai_deprecated : 0) + | ((ifam->ifa_flags + & IFA_F_TEMPORARY) + ? in6ai_temporary : 0) + | ((ifam->ifa_flags + & IFA_F_HOMEADDRESS) + ? in6ai_homeaddress : 0)); + memcpy (newp->info.addr, address ?: local, + sizeof (newp->info.addr)); + newp->next = in6ailist; + in6ailist = newp; + ++in6ailistlen; + } break; default: /* Ignore. */ @@ -110,12 +176,27 @@ make_request (int fd, pid_t pid, bool *s else if (nlmh->nlmsg_type == NLMSG_DONE) /* We found the end, leave the loop. */ done = true; - else ; } } while (! done); - __close (fd); + close_not_cancel_no_status (fd); + + if (in6ailist != NULL) + { + *in6ai = malloc (in6ailistlen * sizeof (**in6ai)); + if (*in6ai == NULL) + return -1; + + *in6ailen = in6ailistlen; + + do + { + (*in6ai)[--in6ailistlen] = in6ailist->info; + in6ailist = in6ailist->next; + } + while (in6ailist != NULL); + } return 0; } @@ -133,8 +214,12 @@ extern int __no_netlink_support attribut void attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6) +__check_pf (bool *seen_ipv4, bool *seen_ipv6, + struct in6addrinfo **in6ai, size_t *in6ailen) { + *in6ai = NULL; + *in6ailen = 0; + if (! __no_netlink_support) { int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); @@ -148,7 +233,8 @@ __check_pf (bool *seen_ipv4, bool *seen_ if (fd >= 0 && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0 && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0 - && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6) == 0) + && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6, + in6ai, in6ailen) == 0) /* It worked. */ return; @@ -178,9 +264,6 @@ __check_pf (bool *seen_ipv4, bool *seen_ return; } - *seen_ipv4 = false; - *seen_ipv6 = false; - struct ifaddrs *runp; for (runp = ifa; runp != NULL; runp = runp->ifa_next) if (runp->ifa_addr->sa_family == PF_INET) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/clock_settime.c glibc-2.5/sysdeps/unix/sysv/linux/clock_settime.c --- glibc-2.4/sysdeps/unix/sysv/linux/clock_settime.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/clock_settime.c 2006-08-15 13:39:16.000000000 +0000 @@ -16,10 +16,65 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #include +#include "kernel-posix-cpu-timers.h" #include +#ifndef HAVE_CLOCK_GETRES_VSYSCALL +# undef INTERNAL_VSYSCALL +# define INTERNAL_VSYSCALL INTERNAL_SYSCALL +# undef INLINE_VSYSCALL +# define INLINE_VSYSCALL INLINE_SYSCALL +#else +# include +#endif + +#if __ASSUME_POSIX_CPU_TIMERS <= 0 && defined __NR_clock_settime +extern int __libc_missing_posix_timers attribute_hidden; +extern int __libc_missing_posix_cpu_timers attribute_hidden; + +static int +maybe_syscall_settime_cpu (clockid_t clock_id, const struct timespec *tp) +{ + int e = EINVAL; + + if (!__libc_missing_posix_cpu_timers) + { + INTERNAL_SYSCALL_DECL (err); + int r = INTERNAL_SYSCALL (clock_settime, err, 2, clock_id, tp); + if (!INTERNAL_SYSCALL_ERROR_P (r, err)) + return 0; + + e = INTERNAL_SYSCALL_ERRNO (r, err); +# ifndef __ASSUME_POSIX_TIMERS + if (e == ENOSYS) + { + __libc_missing_posix_timers = 1; + __libc_missing_posix_cpu_timers = 1; + e = EINVAL; + } + else +# endif + { + if (e == EINVAL) + { + /* Check whether the kernel supports CPU clocks at all. + If not, record it for the future. */ + r = INTERNAL_VSYSCALL (clock_getres, err, 2, + MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED), + NULL); + if (INTERNAL_SYSCALL_ERROR_P (r, err)) + __libc_missing_posix_cpu_timers = 1; + } + } + } + + return e; +} +#endif + #ifdef __ASSUME_POSIX_TIMERS /* This means the REALTIME clock is definitely supported in the @@ -73,4 +128,22 @@ extern int __libc_missing_posix_timers a # define HANDLED_REALTIME 1 #endif +#if __ASSUME_POSIX_CPU_TIMERS > 0 +# define HANDLED_CPUTIME 1 +# define SYSDEP_SETTIME_CPU \ + retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp) +#elif defined __NR_clock_settime +# define SYSDEP_SETTIME_CPU \ + retval = maybe_syscall_settime_cpu (clock_id, tp); \ + if (retval == 0) \ + break; \ + if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \ + { \ + __set_errno (retval); \ + retval = -1; \ + break; \ + } \ + do { } while (0) +#endif + #include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/dl-osinfo.h glibc-2.5/sysdeps/unix/sysv/linux/dl-osinfo.h --- glibc-2.4/sysdeps/unix/sysv/linux/dl-osinfo.h 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/dl-osinfo.h 2006-08-01 06:55:27.000000000 +0000 @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/getcwd.c glibc-2.5/sysdeps/unix/sysv/linux/getcwd.c --- glibc-2.4/sysdeps/unix/sysv/linux/getcwd.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/getcwd.c 2006-04-02 17:58:28.000000000 +0000 @@ -87,7 +87,7 @@ __getcwd (char *buf, size_t size) return NULL; } - alloc_size = PATH_MAX; + alloc_size = MAX (PATH_MAX, __getpagesize ()); } if (buf == NULL) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/getdents.c glibc-2.5/sysdeps/unix/sysv/linux/getdents.c --- glibc-2.4/sysdeps/unix/sysv/linux/getdents.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/getdents.c 2006-05-15 19:41:58.000000000 +0000 @@ -39,9 +39,9 @@ # ifndef __ASSUME_GETDENTS64_SYSCALL # ifndef __GETDENTS /* The variable is shared between all *getdents* calls. */ -int __have_no_getdents64; +int __have_no_getdents64 attribute_hidden; # else -extern int __have_no_getdents64; +extern int __have_no_getdents64 attribute_hidden; # endif # define have_no_getdents64_defined 1 # endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/gethostid.c glibc-2.5/sysdeps/unix/sysv/linux/gethostid.c --- glibc-2.4/sysdeps/unix/sysv/linux/gethostid.c 2004-12-16 04:12:57.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/gethostid.c 2006-08-03 08:49:48.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (C) 1995,1996,1998-2001,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998-2001,2003,2004,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,7 +25,6 @@ #include #define HOSTIDFILE "/etc/hostid" -#define OLD_HOSTIDFILE "/etc/hostid" #ifdef SET_PROCEDURE int @@ -81,8 +81,6 @@ gethostid () /* First try to get the ID from a former invocation of sethostid. */ fd = open_not_cancel (HOSTIDFILE, O_RDONLY|O_LARGEFILE, 0); - if (fd < 0) - fd = open_not_cancel (OLD_HOSTIDFILE, O_RDONLY|O_LARGEFILE, 0); if (fd >= 0) { ssize_t n = read_not_cancel (fd, &id, sizeof (id)); diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/getsourcefilter.c glibc-2.5/sysdeps/unix/sysv/linux/getsourcefilter.c --- glibc-2.4/sysdeps/unix/sysv/linux/getsourcefilter.c 2004-08-07 18:21:41.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/getsourcefilter.c 2006-04-07 04:00:47.000000000 +0000 @@ -1,5 +1,5 @@ /* Get source filter. Linux version. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -112,23 +112,27 @@ getsourcefilter (int s, uint32_t interfa gf->gf_numsrc = *numsrc; /* We need to provide the appropriate socket level value. */ + int result; int sol = __get_sol (group->sa_family, grouplen); if (sol == -1) { __set_errno (EINVAL); - return -1; + result = -1; } - - int result = __getsockopt (s, sol, MCAST_MSFILTER, gf, &needed); - - /* If successful, copy the results to the places the caller wants - them in. */ - if (result == 0) + else { - *fmode = gf->gf_fmode; - memcpy (slist, gf->gf_slist, - MIN (*numsrc, gf->gf_numsrc) * sizeof (struct sockaddr_storage)); - *numsrc = gf->gf_numsrc; + result = __getsockopt (s, sol, MCAST_MSFILTER, gf, &needed); + + /* If successful, copy the results to the places the caller wants + them in. */ + if (result == 0) + { + *fmode = gf->gf_fmode; + memcpy (slist, gf->gf_slist, + MIN (*numsrc, gf->gf_numsrc) + * sizeof (struct sockaddr_storage)); + *numsrc = gf->gf_numsrc; + } } if (! use_alloca) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/i386/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/i386/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/i386/bits/fcntl.h 2004-08-23 07:28:44.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/i386/bits/fcntl.h 2006-08-30 15:04:44.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,8 +22,11 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -96,7 +99,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -180,10 +183,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/i386/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/i386/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/i386/bits/mman.h 2006-02-16 00:15:08.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/i386/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -88,7 +88,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/i386/fchownat.c glibc-2.5/sysdeps/unix/sysv/linux/i386/fchownat.c --- glibc-2.4/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-02-23 22:50:21.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-09-25 15:21:49.000000000 +0000 @@ -30,37 +30,28 @@ #include #include -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - The new lchown function has the same number as the old chown had and the - new chown has a new number. When compiling with headers from Linux > 2.1.8x - it's impossible to run this libc with older kernels. In these cases libc - has therefore to route calls to chown to the old chown function. -*/ - -extern int __chown_is_lchown (const char *__file, uid_t __owner, - gid_t __group); -extern int __real_chown (const char *__file, uid_t __owner, gid_t __group); - - -#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 -/* Running under Linux > 2.1.80. */ - -# ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -# endif /* __NR_chown32 */ -#endif - int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -87,92 +78,33 @@ fchownat (int fd, const char *file, uid_ file = buf; } - int result; +# if __ASSUME_32BITUIDS > 0 + /* This implies __ASSUME_LCHOWN_SYSCALL. */ INTERNAL_SYSCALL_DECL (err); -#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 -# if __ASSUME_LCHOWN_SYSCALL == 0 - static int __libc_old_chown; - -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), - owner, group); + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, + group); + else + result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, + group); - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { - __set_errno (EINVAL); + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); return -1; } - - if (!__libc_old_chown && (flag & AT_SYMLINK_NOFOLLOW) == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); - - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_old_chown = 1; - } - - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); -# elif __ASSUME_32BITUIDS - /* This implies __ASSUME_LCHOWN_SYSCALL. */ - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); # else - /* !__ASSUME_32BITUIDS && ASSUME_LCHOWN_SYSCALL */ -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); + /* Don't inline the rest to avoid unnecessary code duplication. */ + if (flag & AT_SYMLINK_NOFOLLOW) + result = __lchown (file, owner, group); + else + result = __chown (file, owner, group); + if (result < 0) + __atfct_seterrno (errno, fd, buf); # endif -#else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); -#endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - goto fail; return result; - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - return -1; +#endif } diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/i386/sync_file_range.S glibc-2.5/sysdeps/unix/sysv/linux/i386/sync_file_range.S --- glibc-2.4/sysdeps/unix/sysv/linux/i386/sync_file_range.S 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/i386/sync_file_range.S 2006-03-31 21:47:34.000000000 +0000 @@ -0,0 +1,72 @@ +/* Selective file content synch'ing. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#define _ERRNO_H 1 +#include + + + .text +ENTRY (sync_file_range) +#ifdef __NR_sync_file_range + pushl %ebx + cfi_adjust_cfa_offset (4) + pushl %esi + cfi_adjust_cfa_offset (4) + pushl %edi + cfi_adjust_cfa_offset (4) + pushl %ebp + cfi_adjust_cfa_offset (4) + + movl 20(%esp), %ebx + cfi_rel_offset (ebx, 12) + movl 24(%esp), %ecx + movl 28(%esp), %edx + movl 32(%esp), %esi + cfi_rel_offset (esi, 8) + movl 36(%esp), %edi + cfi_rel_offset (edi, 4) + movl 40(%esp), %ebp + cfi_rel_offset (ebp, 0) + + movl $SYS_ify(sync_file_range), %eax + ENTER_KERNEL + + popl %ebp + cfi_adjust_cfa_offset (-4) + cfi_restore (ebp) + popl %edi + cfi_adjust_cfa_offset (-4) + cfi_restore (edi) + popl %esi + cfi_adjust_cfa_offset (-4) + cfi_restore (esi) + popl %ebx + cfi_adjust_cfa_offset (-4) + cfi_restore (ebx) + + cmpl $-4095, %eax + jae SYSCALL_ERROR_LABEL +L(pseudo_end): + ret +#else + movl $-ENOSYS, %eax + jmp SYSCALL_ERROR_LABEL +#endif +PSEUDO_END (sync_file_range) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.5/sysdeps/unix/sysv/linux/i386/sysdep.h --- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h 2005-12-18 08:48:14.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/i386/sysdep.h 2006-04-01 19:53:51.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,2005 +/* Copyright (C) 1992,1993,1995-2000,2002-2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -447,7 +447,7 @@ asm (".L__X'%ebx = 1\n\t" #define LOADARGS_0 #ifdef __PIC__ -# if defined I386_USE_SYSENTER +# if defined I386_USE_SYSENTER && defined SHARED # define LOADARGS_1 \ "bpushl .L__X'%k3, %k3\n\t" # define LOADARGS_5 \ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h 2004-08-23 07:28:44.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h 2006-08-30 15:04:44.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/IA64. - Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,9 @@ #include +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -40,9 +43,9 @@ #define O_SYNC 010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 -#define O_DIRECT 040000 #ifdef __USE_GNU +# define O_DIRECT 040000 # define O_DIRECTORY 0200000 /* must be a directory */ # define O_NOFOLLOW 0400000 /* don't follow links */ # define O_NOATIME 01000000 /* Do not set atime. */ @@ -92,7 +95,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -174,10 +177,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ia64/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/ia64/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/ia64/bits/mman.h 2006-02-16 00:15:08.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ia64/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -89,7 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ia64/clone2.S glibc-2.5/sysdeps/unix/sysv/linux/ia64/clone2.S --- glibc-2.4/sysdeps/unix/sysv/linux/ia64/clone2.S 2004-12-07 20:33:29.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ia64/clone2.S 2006-04-25 19:10:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,10 +32,12 @@ ENTRY(__clone2) .prologue alloc r2=ar.pfs,8,1,6,0 cmp.eq p6,p0=0,in0 + cmp.eq p7,p0=0,in1 mov r8=EINVAL mov out0=in3 /* Flags are first syscall argument. */ mov out1=in1 /* Stack address. */ -(p6) br.cond.spnt.many __syscall_error +(p6) br.cond.spnt.many __syscall_error /* no NULL function pointers */ +(p7) br.cond.spnt.many __syscall_error /* no NULL stack pointers */ ;; mov out2=in2 /* Stack size. */ mov out3=in5 /* Parent TID Pointer */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ia64/sigsuspend.c glibc-2.5/sysdeps/unix/sysv/linux/ia64/sigsuspend.c --- glibc-2.4/sysdeps/unix/sysv/linux/ia64/sigsuspend.c 2003-09-03 03:21:27.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ia64/sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include -#include - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -__sigsuspend (set) - const sigset_t *set; -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) -strong_alias (__sigsuspend, __libc_sigsuspend) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h glibc-2.5/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h --- glibc-2.4/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h 2003-11-29 07:27:46.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h 2006-09-18 13:47:30.000000000 +0000 @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ia64 version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -75,14 +75,6 @@ enum __ptrace_request PTRACE_SINGLEBLOCK = 12, #define PT_STEPBLOCK PTRACE_SINGLEBLOCK - /* Get siginfo for process. */ - PTRACE_GETSIGINFO = 13, -#define PT_GETSIGINFO PTRACE_GETSIGINFO - - /* Set new siginfo for process. */ - PTRACE_SETSIGINFO = 14, -#define PT_GETSIGINFO PTRACE_GETSIGINFO - /* Attach to a process that is already running. */ PTRACE_ATTACH = 16, #define PT_ATTACH PTRACE_ATTACH @@ -100,8 +92,24 @@ enum __ptrace_request #define PT_SETREGS PTRACE_SETREGS /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO }; /* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ifaddrs.c glibc-2.5/sysdeps/unix/sysv/linux/ifaddrs.c --- glibc-2.4/sysdeps/unix/sysv/linux/ifaddrs.c 2005-06-13 23:54:54.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ifaddrs.c 2006-05-19 07:46:03.000000000 +0000 @@ -1,5 +1,5 @@ /* getifaddrs -- get names and addresses of all network interfaces - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -89,10 +89,11 @@ __netlink_free_handle (struct netlink_ha static int __netlink_sendreq (struct netlink_handle *h, int type) { - struct + struct req { struct nlmsghdr nlh; struct rtgenmsg g; + char pad[0]; } req; struct sockaddr_nl nladdr; @@ -105,6 +106,8 @@ __netlink_sendreq (struct netlink_handle req.nlh.nlmsg_pid = 0; req.nlh.nlmsg_seq = h->seq; req.g.rtgen_family = AF_UNSPEC; + if (sizeof (req) != offsetof (struct req, pad)) + memset (req.pad, '\0', sizeof (req) - offsetof (struct req, pad)); memset (&nladdr, '\0', sizeof (nladdr)); nladdr.nl_family = AF_NETLINK; @@ -358,8 +361,7 @@ getifaddrs (struct ifaddrs **ifap) ifa_data. */ int result = 0; - if (ifap) - *ifap = NULL; + *ifap = NULL; if (! __no_netlink_support && __netlink_open (&nh) < 0) { @@ -840,8 +842,7 @@ getifaddrs (struct ifaddrs **ifap) memmove (ifas, &ifas[newlink], sizeof (struct ifaddrs_storage)); } - if (ifap != NULL) - *ifap = &ifas[0].ifa; + *ifap = &ifas[0].ifa; exit_free: __netlink_free_handle (&nh); diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.5/sysdeps/unix/sysv/linux/kernel-features.h --- glibc-2.4/sysdeps/unix/sysv/linux/kernel-features.h 2006-02-22 07:27:53.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/kernel-features.h 2006-07-29 04:43:27.000000000 +0000 @@ -85,6 +85,12 @@ # define __ASSUME_SENDFILE 1 #endif +/* Only very old kernels had no real symlinks for terminal descriptors + in /proc/self/fd. */ +#if __LINUX_KERNEL_VERSION >= 131584 +# define __ASSUME_PROC_SELF_FD_SYMLINK 1 +#endif + /* On x86 another `getrlimit' syscall was added in 2.3.25. */ #if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__ # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 @@ -105,10 +111,10 @@ # define __ASSUME_STAT64_SYSCALL 1 #endif -/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64 +/* On sparc the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64 syscalls were introduced in 2.3.35. */ #if __LINUX_KERNEL_VERSION >= 131875 \ - && ((defined __sparc__ && !defined __arch64__) || defined __arm__) + && (defined __sparc__ && !defined __arch64__) # define __ASSUME_TRUNCATE64_SYSCALL 1 # define __ASSUME_MMAP2_SYSCALL 1 # define __ASSUME_STAT64_SYSCALL 1 @@ -191,7 +197,7 @@ don't know when it got introduced). But PowerPC64 does not support separate FCNTL64 call, FCNTL is already 64-bit */ #if __LINUX_KERNEL_VERSION >= 132100 \ - && (defined __arm__ || defined __powerpc__ || defined __sh__) \ + && (defined __powerpc__ || defined __sh__) \ && !defined __powerpc64__ # define __ASSUME_FCNTL64 1 #endif @@ -260,24 +266,10 @@ #endif /* The vfork syscall on x86 and arm was definitely available in 2.4. */ -#if __LINUX_KERNEL_VERSION >= 132097 && (defined __i386__ || defined __arm__) +#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__ # define __ASSUME_VFORK_SYSCALL 1 #endif -/* There are an infinite number of PA-RISC kernel versions numbered - 2.4.0. But they've not really been released as such. We require - and expect the final version here. */ -#ifdef __hppa__ -# define __ASSUME_32BITUIDS 1 -# define __ASSUME_TRUNCATE64_SYSCALL 1 -# define __ASSUME_MMAP2_SYSCALL 1 -# define __ASSUME_STAT64_SYSCALL 1 -# define __ASSUME_IPC64 1 -# define __ASSUME_ST_INO_64_BIT 1 -# define __ASSUME_FCNTL64 1 -# define __ASSUME_GETDENTS64_SYSCALL 1 -#endif - /* Alpha switched to a 64-bit timeval sometime before 2.2.0. */ #if __LINUX_KERNEL_VERSION >= 131584 && defined __alpha__ # define __ASSUME_TIMEVAL64 1 @@ -296,15 +288,6 @@ # define __ASSUME_CLONE_THREAD_FLAGS 1 #endif -/* These features were surely available with 2.4.12. */ -#if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__ -# define __ASSUME_MMAP2_SYSCALL 1 -# define __ASSUME_TRUNCATE64_SYSCALL 1 -# define __ASSUME_STAT64_SYSCALL 1 -# define __ASSUME_FCNTL64 1 -# define __ASSUME_VFORK_SYSCALL 1 -#endif - /* Beginning with 2.5.63 support for realtime and monotonic clocks and timers based on them is available. */ #if __LINUX_KERNEL_VERSION >= 132415 @@ -359,7 +342,7 @@ /* The utimes syscall has been available for some architectures forever. For x86 it was introduced after 2.5.75, for x86-64, ppc, and ppc64 it was introduced in 2.6.0-test3. */ -#if defined __alpha__ || defined __ia64__ || defined __hppa__ \ +#if defined __alpha__ || defined __ia64__ \ || defined __sparc__ \ || (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \ || (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \ @@ -448,23 +431,30 @@ /* pselect was introduced just after 2.6.16-rc1. Due to the way the kernel versions are advertised we can only rely on 2.6.17 to have the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && (defined __i386__ || defined __powerpc__) +#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__ # define __ASSUME_PSELECT 1 #endif /* ppoll was introduced just after 2.6.16-rc1. Due to the way the kernel versions are advertised we can only rely on 2.6.17 to have the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && (defined __i386__ || defined __powerpc__) +#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__ # define __ASSUME_PPOLL 1 #endif /* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the kernel versions are advertised we can only rely on 2.6.17 to have the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && (defined __i386__ || defined __x86_64__) +#if __LINUX_KERNEL_VERSION >= 0x020611 # define __ASSUME_ATFCTS 1 #endif + +/* Support for inter-process robust mutexes was added in 2.6.17. */ +#if __LINUX_KERNEL_VERSION >= 0x020611 +# define __ASSUME_SET_ROBUST_LIST 1 +#endif + +/* Support for PI futexes was added in 2.6.18. */ +#if __LINUX_KERNEL_VERSION >= 0x020612 +# define __ASSUME_FUTEX_LOCK_PI 1 +#endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/local-setxid.h glibc-2.5/sysdeps/unix/sysv/linux/local-setxid.h --- glibc-2.4/sysdeps/unix/sysv/linux/local-setxid.h 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/local-setxid.h 2006-06-04 22:15:39.000000000 +0000 @@ -0,0 +1,23 @@ +/* SETxID functions which only have to change the local thread and + none of the possible other threads. */ +#include +#include + +/* If we can use the syscall directly, use it. */ +#if __ASSUME_32BITUIDS > 0 && defined __NR_setresuid32 +# define local_seteuid(id) INLINE_SYSCALL (setresuid32, 3, -1, id, -1) +#elif __ASSUME_SETRESUID_SYSCALL > 0 +# define local_seteuid(id) INLINE_SYSCALL (setresuid, 3, -1, id, -1) +#else +# define local_seteuid(id) seteuid (id) +#endif + + +/* If we can use the syscall directly, use it. */ +#if __ASSUME_32BITUIDS > 0 && defined __NR_setresgid32 +# define local_setegid(id) INLINE_SYSCALL (setresgid32, 3, -1, id, -1) +#elif __ASSUME_SETRESGID_SYSCALL > 0 +# define local_setegid(id) INLINE_SYSCALL (setresgid, 3, -1, id, -1) +#else +# define local_setegid(id) setegid (id) +#endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/Makefile glibc-2.5/sysdeps/unix/sysv/linux/Makefile --- glibc-2.4/sysdeps/unix/sysv/linux/Makefile 2005-12-15 20:47:12.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/Makefile 2006-04-25 19:12:04.000000000 +0000 @@ -28,6 +28,8 @@ sysdep_headers += sys/mount.h sys/acct.h install-others += $(inst_includedir)/bits/syscall.h +tests += tst-clone + # Generate the list of SYS_* macros for the system calls (__NR_* macros). # For bi-arch platforms, the CPU/Makefile defines {32,64}bit-predefine and # we generate a file that uses . diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/msgrcv.c glibc-2.5/sysdeps/unix/sysv/linux/msgrcv.c --- glibc-2.4/sysdeps/unix/sysv/linux/msgrcv.c 2002-12-15 10:25:23.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/msgrcv.c 2006-08-03 15:36:45.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998,2000,2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -35,7 +35,7 @@ struct ipc_kludge }; -int +ssize_t __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) int msqid; void *msgp; @@ -56,8 +56,8 @@ __libc_msgrcv (msqid, msgp, msgsz, msgty int oldtype = LIBC_CANCEL_ASYNC (); - int result = INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, - __ptrvalue (&tmp)); + ssize_t result = INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, + __ptrvalue (&tmp)); LIBC_CANCEL_RESET (oldtype); diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/not-cancel.h glibc-2.5/sysdeps/unix/sysv/linux/not-cancel.h --- glibc-2.4/sysdeps/unix/sysv/linux/not-cancel.h 2006-02-15 17:19:11.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/not-cancel.h 2006-07-31 05:57:58.000000000 +0000 @@ -81,3 +81,25 @@ extern int __openat64_nocancel (int fd, # define waitpid_not_cancel(pid, stat_loc, options) \ INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL) #endif + +/* Uncancelable pause. */ +#ifdef __NR_pause +# define pause_not_cancel() \ + INLINE_SYSCALL (pause, 0) +#else +# define pause_not_cancel() \ + __pause_nocancel () +#endif + +/* Uncancelable nanosleep. */ +#ifdef __NR_nanosleep +# define nanosleep_not_cancel(requested_time, remaining) \ + INLINE_SYSCALL (nanosleep, 2, requested_time, remaining) +#else +# define nanosleep_not_cancel(requested_time, remaining) \ + __nanosleep_nocancel (requested_time, remaining) +#endif + +/* Uncancelable sigsuspend. */ +#define sigsuspend_not_cancel(set) \ + __sigsuspend_nocancel (set) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/openat.c glibc-2.5/sysdeps/unix/sysv/linux/openat.c --- glibc-2.4/sysdeps/unix/sysv/linux/openat.c 2006-03-01 05:32:42.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/openat.c 2006-08-21 19:43:24.000000000 +0000 @@ -28,9 +28,10 @@ #include -#if !defined OPENAT && !defined __ASSUME_ATFCTS +#ifndef OPENAT # define OPENAT openat +# ifndef __ASSUME_ATFCTS /* Set errno after a failed call. If BUF is not null, it is a /proc/self/fd/ path name we just tried to use. */ void @@ -61,6 +62,7 @@ __atfct_seterrno (int errval, int fd, co } int __have_atfcts; +# endif #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h 2004-08-23 07:28:45.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h 2006-08-30 15:04:43.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,8 +22,11 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -96,7 +99,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -180,10 +183,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/bits/mman.h 2006-02-16 00:15:09.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -89,7 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/fchownat.c glibc-2.5/sysdeps/unix/sysv/linux/powerpc/fchownat.c --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/fchownat.c 2005-11-11 19:43:35.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/fchownat.c 2006-09-25 15:20:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,6 +37,24 @@ int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) { + int result; + +#ifdef __NR_fchownat +# ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) +# endif + { + result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); +# ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) + __have_atfcts = -1; + else +# endif + return result; + } +#endif + +#ifndef __ASSUME_ATFCTS if (flag & ~AT_SYMLINK_NOFOLLOW) { __set_errno (EINVAL); @@ -63,143 +81,30 @@ fchownat (int fd, const char *file, uid_ file = buf; } - int result; +# if __ASSUME_LCHOWN_SYSCALL INTERNAL_SYSCALL_DECL (err); -#if __ASSUME_LCHOWN_SYSCALL if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lchown, err, 3, file, owner, group); else result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group); -#else - char link[PATH_MAX + 2]; - char path[2 * PATH_MAX + 4]; - int loopct; - size_t filelen; - static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */; - - if (libc_old_chown == 1) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } - -# ifdef __NR_lchown - if (flag & AT_SYMLINK_NOFOLLOW) - { - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } - - if (libc_old_chown == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - { - libc_old_chown = 1; - goto fail; - } - libc_old_chown = -1; - } -# else - if (flag & AT_SYMLINK_NOFOLLOW) - { - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } -# endif - result = __readlink (file, link, PATH_MAX + 1); - if (result == -1) - { -# ifdef __NR_lchown - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); -# else - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); -# endif - goto out; - } - - filelen = strlen (file) + 1; - if (filelen > sizeof (path)) + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { - errno = ENAMETOOLONG; + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); return -1; } - memcpy (path, file, filelen); - - /* 'The system has an arbitrary limit...' In practise, we'll hit - ENAMETOOLONG before this, usually. */ - for (loopct = 0; loopct < 128; ++loopct) - { - size_t linklen; - - if (result >= PATH_MAX + 1) - { - errno = ENAMETOOLONG; - return -1; - } - - link[result] = 0; /* Null-terminate string, just-in-case. */ - - linklen = strlen (link) + 1; - - if (link[0] == '/') - memcpy (path, link, linklen); - else - { - filelen = strlen (path); - - while (filelen > 1 && path[filelen - 1] == '/') - --filelen; - while (filelen > 0 && path[filelen - 1] != '/') - --filelen; - if (filelen + linklen > sizeof (path)) - { - errno = ENAMETOOLONG; - return -1; - } - memcpy (path + filelen, link, linklen); - } - - result = __readlink (path, link, PATH_MAX + 1); - - if (result == -1) - { -# ifdef __NR_lchown - result = INTERNAL_SYSCALL (lchown, err, 3, path, owner, group); # else - result = INTERNAL_SYSCALL (chown, err, 3, path, owner, group); + /* Don't inline the rest to avoid unnecessary code duplication. */ + if (flag & AT_SYMLINK_NOFOLLOW) + result = __lchown (file, owner, group); + else + result = __chown (file, owner, group); + if (result < 0) + __atfct_seterrno (errno, fd, buf); # endif - goto out; - } - } - __set_errno (ELOOP); - return -1; - out: -#endif + return result; - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { -#if !__ASSUME_LCHOWN_SYSCALL - fail: #endif - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; } diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S 2006-01-07 03:55:07.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S 2006-04-04 07:01:06.000000000 +0000 @@ -84,6 +84,10 @@ ENTRY (BP_SYM (__clone)) mr r6,r8 mr r7,r9 + /* End FDE now, because in the child the unwind info will be + wrong. */ + cfi_endproc + /* Do the call. */ DO_CALL(SYS_ify(clone)) @@ -138,6 +142,8 @@ L(parent): L(badargs): li r3,EINVAL b __syscall_error@local + + cfi_startproc END (BP_SYM (__clone)) weak_alias (BP_SYM (__clone), BP_SYM (clone)) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S 2006-01-07 03:56:26.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S 2006-03-16 11:48:55.000000000 +0000 @@ -45,6 +45,7 @@ ENTRY(__CONTEXT_FUNC_NAME) stw r0,20(r1) cfi_offset (lr, _FRAME_LR_SAVE) stw r31,12(r1) + cfi_offset(r31,-4) lwz r31,_UC_REGS_PTR(r3) /* diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h 2005-12-30 21:00:57.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h 2006-09-22 06:05:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,1997-2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1992,1997-2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -285,8 +285,12 @@ xor reg,tmpreg,reg # define PTR_MANGLE2(reg, tmpreg) \ xor reg,tmpreg,reg +# define PTR_MANGLE3(destreg, reg, tmpreg) \ + lwz tmpreg,POINTER_GUARD(r2); \ + xor destreg,tmpreg,reg # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) # define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) +# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S 2006-01-07 01:14:48.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S 2006-04-04 07:01:06.000000000 +0000 @@ -52,8 +52,12 @@ ENTRY (BP_SYM (__clone)) std r29,56(r1) std r30,64(r1) std r31,72(r1) + cfi_offset(r29,-56) + cfi_offset(r30,-64) + cfi_offset(r31,-72) #ifdef RESET_PID std r28,48(r1) + cfi_offset(r28,-48) #endif /* Set up stack frame for child. */ @@ -77,6 +81,10 @@ ENTRY (BP_SYM (__clone)) mr r6,r8 mr r7,r9 + /* End FDE now, because in the child the unwind info will be + wrong. */ + cfi_endproc + /* Do the call. */ DO_CALL(SYS_ify(clone)) @@ -128,6 +136,8 @@ L(parent): L(badargs): li r3,EINVAL b JUMPTARGET(__syscall_error) + + cfi_startproc END (BP_SYM (__clone)) weak_alias (BP_SYM (__clone), BP_SYM (clone)) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2006-03-16 11:48:54.000000000 +0000 @@ -144,6 +144,7 @@ ENTRY(__novec_getcontext) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) stdu r1,-128(r1) + cfi_adjust_cfa_offset(128) li r3,ENOSYS bl JUMPTARGET(__syscall_error) nop diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h 2005-08-30 22:33:13.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h 2006-08-24 20:28:38.000000000 +0000 @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ _dl_ppc64_addr_sym_match (const struct l return false; } } - else if (sym->st_size == 0) + else if (sym->st_shndx == SHN_UNDEF || sym->st_size == 0) { if (addr != value) return false; diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2006-03-16 11:48:54.000000000 +0000 @@ -33,6 +33,7 @@ ENTRY(__novec_setcontext) #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL mflr r0 std r31,-8(1) + cfi_offset(r31,-8) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) stdu r1,-128(r1) @@ -169,7 +170,9 @@ L(nv_do_sigret): /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ mflr r0 std r0,FRAME_LR_SAVE(r1) + cfi_offset(lr,FRAME_LR_SAVE) stdu r1,-128(r1) + cfi_adjust_cfa_offset(128) li r3,ENOSYS bl JUMPTARGET(__syscall_error) nop @@ -201,6 +204,7 @@ ENTRY(__setcontext) #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL mflr r0 std r31,-8(1) + cfi_offset(r31,-8) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) stdu r1,-128(r1) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2006-03-16 11:48:54.000000000 +0000 @@ -35,6 +35,7 @@ ENTRY(__novec_swapcontext) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 std r31,-8(1) + cfi_offset(r31,-8) std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) cfi_offset (lr, FRAME_LR_SAVE) @@ -264,6 +265,7 @@ L(nv_do_sigret): /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ mflr r0 std r0,FRAME_LR_SAVE(r1) + cfi_offset(lr,FRAME_LR_SAVE) stdu r1,-128(r1) li r3,ENOSYS bl JUMPTARGET(__syscall_error) @@ -298,11 +300,14 @@ ENTRY(__swapcontext) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 std r31,-8(1) + cfi_offset(r31,-8) std r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3) std r0,FRAME_LR_SAVE(r1) + cfi_offset (lr, FRAME_LR_SAVE) std r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r3) std r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3) stdu r1,-128(r1) + cfi_adjust_cfa_offset(128) std r4,(SIGCONTEXT_GP_REGS+(PT_R4*8))(r3) std r5,(SIGCONTEXT_GP_REGS+(PT_R5*8))(r3) std r6,(SIGCONTEXT_GP_REGS+(PT_R6*8))(r3) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h 2006-01-11 01:17:31.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h 2006-09-22 06:05:48.000000000 +0000 @@ -299,8 +299,12 @@ xor reg,tmpreg,reg # define PTR_MANGLE2(reg, tmpreg) \ xor reg,tmpreg,reg +# define PTR_MANGLE3(destreg, reg, tmpreg) \ + ld tmpreg,POINTER_GUARD(r13); \ + xor destreg,tmpreg,reg # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) # define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) +# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 2006-01-13 07:58:57.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 2006-04-04 06:58:58.000000000 +0000 @@ -35,7 +35,7 @@ __BEGIN_DECLS /* These definitions are normally provided by ucontext.h via asm/sigcontext.h, asm/ptrace.h, and asm/elf.h. Otherwise we define them here. */ -#ifndef __PPC64_ELF_H +#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ #define ELF_NFPREG 33 /* includes fpscr */ #if __WORDSIZE == 32 diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h glibc-2.5/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h --- glibc-2.4/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h 2001-07-06 04:56:19.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h 2006-09-18 13:46:59.000000000 +0000 @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -79,8 +79,24 @@ enum __ptrace_request #define PT_DETACH PTRACE_DETACH /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO }; /* Perform process tracing functions. REQUEST is one of the values diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ptrace.c glibc-2.5/sysdeps/unix/sysv/linux/ptrace.c --- glibc-2.4/sysdeps/unix/sysv/linux/ptrace.c 2003-09-03 03:21:26.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ptrace.c 2006-09-17 16:06:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998,2000,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -89,6 +90,19 @@ ptrace (enum __ptrace_request request, . #endif break; + case PTRACE_GETSIGINFO: + case PTRACE_SETSIGINFO: + (void) CHECK_1 ((siginfo_t *) data); + break; + + case PTRACE_GETEVENTMSG: + (void) CHECK_1 ((unsigned long *) data); + break; + + case PTRACE_SETOPTIONS: + (void) CHECK_1 ((long *) data); + break; + case PTRACE_TRACEME: case PTRACE_CONT: case PTRACE_KILL: diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/readlinkat.c glibc-2.5/sysdeps/unix/sysv/linux/readlinkat.c --- glibc-2.4/sysdeps/unix/sysv/linux/readlinkat.c 2006-01-20 07:06:59.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/readlinkat.c 2006-04-24 16:54:47.000000000 +0000 @@ -29,7 +29,7 @@ /* Read the contents of the symbolic link PATH relative to FD into no more than LEN bytes of BUF. */ -int +ssize_t readlinkat (fd, path, buf, len) int fd; const char *path; @@ -87,3 +87,4 @@ readlinkat (fd, path, buf, len) return result; #endif } +libc_hidden_def (readlinkat) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/s390/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/s390/bits/fcntl.h 2004-08-23 07:28:45.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/bits/fcntl.h 2006-08-30 15:04:43.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,10 @@ #include #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -110,7 +114,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -199,10 +203,55 @@ struct flock64 # endif #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/s390/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/s390/bits/mman.h 2006-02-16 00:15:08.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -89,7 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c 2006-09-25 15:22:55.000000000 +0000 @@ -1,141 +1 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - The new lchown function has the same number as the old chown had and the - new chown has a new number. When compiling with headers from Linux > 2.1.8x - it's impossible to run this libc with older kernels. In these cases libc - has therefore to route calls to chown to the old chown function. -*/ - -/* Running under Linux > 2.1.80. */ - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - int result; - INTERNAL_SYSCALL_DECL (err); - -#if __ASSUME_32BITUIDS > 0 - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -#else - static int __libc_old_chown; - -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), - owner, group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (!__libc_old_chown && (flag & AT_SYMLINK_NOFOLLOW) == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); - - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_old_chown = 1; - } - - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); -#endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -} +#include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c 2001-07-06 04:56:19.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c 2006-09-20 14:30:05.000000000 +0000 @@ -37,8 +37,6 @@ +-----------------------+ n | overflow parameters | 96 +-----------------------+ - 8 | trampoline | 96+n - +-----------------------+ The registers are set up like this: %r2-%r6: parameters 1 to 5 %r7 : (*func) pointer @@ -55,18 +53,16 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { + extern void __makecontext_ret (void); unsigned long *sp; va_list ap; int i; - sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L); - - /* Setup the trampoline. */ - *--sp = 0x07f90000; - *--sp = 0x0de71828; + sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp + + ucp->uc_stack.ss_size) & -8L); /* Set the return address to trampoline. */ - ucp->uc_mcontext.gregs[14] = (long) sp; + ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret; /* Set register parameters. */ va_start (ap, argc); @@ -98,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*f ucp->uc_mcontext.gregs[15] = (long) sp; } +asm(".text\n" + ".type __makecontext_ret,@function\n" + "__makecontext_ret:\n" + " basr %r14,%r7\n" + " lr %r2,%r8\n" + " br %r9\n" + ".size __makecontext_ret, .-__makecontext_ret"); + weak_alias (__makecontext, makecontext) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S 2003-12-06 00:18:52.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S 2006-05-05 18:23:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -48,13 +48,14 @@ ENTRY (syscall) lr %r4,%r5 /* third parameter */ lr %r5,%r6 /* fourth parameter */ l %r6,192(%r15) /* fifth parameter */ + l %r7,196(%r15) /* sixth parameter */ - basr %r7,0 -0: cl %r1,4f-0b(%r7) /* svc number < 256? */ + basr %r8,0 +0: cl %r1,4f-0b(%r8) /* svc number < 256? */ jl 2f 1: svc 0 j 3f -2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */ +2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */ 3: l %r15,0(%r15) /* load back chain */ cfi_adjust_cfa_offset (-96) lm %r6,15,24(%r15) /* load registers */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c 2001-07-06 04:56:20.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c 2006-09-20 14:30:06.000000000 +0000 @@ -37,8 +37,6 @@ +-----------------------+ n | overflow parameters | 160 +-----------------------+ - 8 | trampoline | 160+n - +-----------------------+ The registers are set up like this: %r2-%r6: parameters 1 to 5 %r7 : (*func) pointer @@ -55,17 +53,16 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { + extern void __makecontext_ret (void); unsigned long *sp; va_list ap; int i; - sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L); - - /* Setup the trampoline. */ - *--sp = 0x0de7b904002807f9; + sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp + + ucp->uc_stack.ss_size) & -8L); /* Set the return address to trampoline. */ - ucp->uc_mcontext.gregs[14] = (long) sp; + ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret; /* Set register parameters. */ va_start (ap, argc); @@ -97,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*f ucp->uc_mcontext.gregs[15] = (long) sp; } +asm(".text\n" + ".type __makecontext_ret,@function\n" + "__makecontext_ret:\n" + " basr %r14,%r7\n" + " lgr %r2,%r8\n" + " br %r9\n" + ".size __makecontext_ret, .-__makecontext_ret"); + weak_alias (__makecontext, makecontext) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c 2003-09-03 03:21:27.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -__sigsuspend (set) - const sigset_t *set; -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) -strong_alias (__sigsuspend, __libc_sigsuspend) diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S --- glibc-2.4/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S 2003-12-06 00:18:52.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S 2006-05-05 18:23:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -48,13 +48,14 @@ ENTRY (syscall) lgr %r4,%r5 /* Third parameter. */ lgr %r5,%r6 /* Fourth parameter. */ lg %r6,320(%r15) /* Fifth parameter. */ + lg %r7,328(%r15) /* Sixth parameter. */ - basr %r7,0 -0: clg %r1,4f-0b(%r7) /* svc number < 256? */ + basr %r8,0 +0: clg %r1,4f-0b(%r8) /* svc number < 256? */ jl 2f 1: svc 0 j 3f -2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */ +2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */ 3: lg %r15,0(%r15) /* load back chain */ cfi_adjust_cfa_offset (-160) lmg %r6,15,48(%r15) /* Load registers. */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/s390/sys/ptrace.h glibc-2.5/sysdeps/unix/sysv/linux/s390/sys/ptrace.h --- glibc-2.4/sysdeps/unix/sysv/linux/s390/sys/ptrace.h 2001-07-06 04:56:20.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/s390/sys/ptrace.h 2006-09-18 13:46:59.000000000 +0000 @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2006 Free Software Foundation, Inc. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). This file is part of the GNU C Library. @@ -118,8 +118,24 @@ enum __ptrace_request #define PT_DETACH PTRACE_DETACH /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO }; /* Perform process tracing functions. REQUEST is one of the values diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sched_getaffinity.c glibc-2.5/sysdeps/unix/sysv/linux/sched_getaffinity.c --- glibc-2.4/sysdeps/unix/sysv/linux/sched_getaffinity.c 2005-12-15 21:10:03.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sched_getaffinity.c 2006-05-15 14:39:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -28,8 +29,8 @@ int __sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) { - int res = INLINE_SYSCALL (sched_getaffinity, 3, pid, sizeof (cpu_set_t), - cpuset); + int res = INLINE_SYSCALL (sched_getaffinity, 3, pid, + MIN (INT_MAX, cpusetsize), cpuset); if (res != -1) { /* Clean the rest of the memory the kernel didn't do. */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/setsourcefilter.c glibc-2.5/sysdeps/unix/sysv/linux/setsourcefilter.c --- glibc-2.4/sysdeps/unix/sysv/linux/setsourcefilter.c 2004-08-07 18:21:41.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/setsourcefilter.c 2006-04-07 03:40:53.000000000 +0000 @@ -1,5 +1,5 @@ /* Set source filter. Linux version. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -57,14 +57,15 @@ setsourcefilter (int s, uint32_t interfa memcpy (gf->gf_slist, slist, numsrc * sizeof (struct sockaddr_storage)); /* We need to provide the appropriate socket level value. */ + int result; int sol = __get_sol (group->sa_family, grouplen); if (sol == -1) { __set_errno (EINVAL); - return -1; + result = -1; } - - int result = __setsockopt (s, sol, MCAST_MSFILTER, gf, needed); + else + result = __setsockopt (s, sol, MCAST_MSFILTER, gf, needed); if (! use_alloca) { diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sh/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/sh/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/sh/bits/fcntl.h 2006-02-28 08:39:34.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sh/bits/fcntl.h 2006-08-30 15:04:44.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,8 +22,11 @@ # error "Never use directly; include instead." #endif - #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -96,7 +99,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -180,10 +183,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sh/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/sh/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/sh/bits/mman.h 2006-02-16 00:15:08.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sh/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -88,7 +88,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sh/fchownat.c glibc-2.5/sysdeps/unix/sysv/linux/sh/fchownat.c --- glibc-2.4/sysdeps/unix/sysv/linux/sh/fchownat.c 2006-02-28 19:07:32.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sh/fchownat.c 2006-09-25 15:22:55.000000000 +0000 @@ -1,122 +1 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - int result; - INTERNAL_SYSCALL_DECL (err); - -#if __ASSUME_32BITUIDS > 0 - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -#else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); -#endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -} +#include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sigsuspend.c glibc-2.5/sysdeps/unix/sysv/linux/sigsuspend.c --- glibc-2.4/sysdeps/unix/sysv/linux/sigsuspend.c 2006-01-08 08:21:15.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sigsuspend.c 2006-07-31 05:57:58.000000000 +0000 @@ -56,6 +56,12 @@ do_sigsuspend (const sigset_t *set) return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]); } +#else +static inline int __attribute__ ((always_inline)) +do_sigsuspend (const sigset_t *set) +{ + return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); +} #endif /* Change the set of blocked signals to SET, @@ -64,19 +70,6 @@ int __sigsuspend (set) const sigset_t *set; { -#if __ASSUME_REALTIME_SIGNALS - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); - - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), - _NSIG / 8); - - LIBC_CANCEL_RESET (oldtype); - - return result; -#else if (SINGLE_THREAD_P) return do_sigsuspend (set); @@ -87,8 +80,16 @@ __sigsuspend (set) LIBC_CANCEL_RESET (oldtype); return result; -#endif } libc_hidden_def (__sigsuspend) weak_alias (__sigsuspend, sigsuspend) strong_alias (__sigsuspend, __libc_sigsuspend) + +#ifndef NO_CANCELLATION +int +__sigsuspend_nocancel (set) + const sigset_t *set; +{ + return do_sigsuspend (set); +} +#endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h 2004-08-23 07:28:46.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h 2006-08-30 15:04:43.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/SPARC. - Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -24,6 +24,9 @@ #include #include +#ifdef __USE_GNU +# include +#endif /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -113,7 +116,7 @@ # define F_SETLKW64 14 /* Set record locking info (blocking). */ #endif -/* for F_[GET|SET]FL */ +/* for F_[GET|SET]FD */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -199,10 +202,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/mman.h 2006-02-16 00:15:08.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/mman.h 2006-05-02 14:33:44.000000000 +0000 @@ -91,7 +91,7 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ # define MADV_FREE 5 /* Content can be freed (Solaris). */ -# define MADV_REMOVE 6 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/poll.h glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/poll.h --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/bits/poll.h 2001-07-31 07:46:04.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/bits/poll.h 2006-03-25 20:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -35,6 +35,13 @@ # define POLLWRBAND 0x100 /* Priority data may be written. */ #endif +#ifdef __USE_GNU +/* These are extensions for Linux. */ +# define POLLMSG 0x200 +# define POLLREMOVE 0x400 +# define POLLRDHUP 0x800 +#endif + /* Event types always implicitly polled for. These bits need not be set in `events', but they will appear in `revents' to indicate the status of the file descriptor. */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c 2006-02-28 19:07:32.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c 2006-09-25 15:22:55.000000000 +0000 @@ -1 +1 @@ -#include +#include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c 2005-04-14 21:44:25.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c 2006-08-15 05:27:23.000000000 +0000 @@ -1,47 +1 @@ -/* pause -- suspend the process until a signal arrives. POSIX.1 version. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include - -#include -#include -#include - -/* Suspend the process until a signal arrives. - This always returns -1 and sets errno to EINTR. */ -int -__libc_pause (void) -{ - sigset_t set; - - __sigemptyset (&set); - INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, CHECK_SIGSET (NULL), - CHECK_SIGSET_NULL_OK (&set), _NSIG / 8); - - /* pause is a cancellation point, but so is sigsuspend. - So no need for anything special here. */ - - return __sigsuspend (&set); -} -weak_alias (__libc_pause, pause) - -LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */ +#include diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c 2003-04-02 00:06:44.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#include "../../ia64/sigsuspend.c" diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h glibc-2.5/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h --- glibc-2.4/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h 2001-07-06 04:56:21.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h 2006-09-18 13:46:59.000000000 +0000 @@ -1,5 +1,6 @@ /* `ptrace' debugger support interface. Linux/SPARC version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -148,12 +149,11 @@ enum __ptrace_request #endif /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PTRACE_SYSCALL PTRACE_SYSCALL #if __WORDSIZE == 64 - , /* Get all floating point registers used by a processes. This is not supported on all machines. */ PTRACE_GETFPREGS = 25, @@ -161,10 +161,26 @@ enum __ptrace_request /* Set all floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_SETFPREGS = 26 + PTRACE_SETFPREGS = 26, #define PT_SETFPREGS PTRACE_SETFPREGS #endif + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO }; /* Perform process tracing functions. REQUEST is one of the values diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sync_file_range.c glibc-2.5/sysdeps/unix/sysv/linux/sync_file_range.c --- glibc-2.4/sysdeps/unix/sysv/linux/sync_file_range.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sync_file_range.c 2006-04-24 17:07:53.000000000 +0000 @@ -0,0 +1,47 @@ +/* Selective file content synch'ing. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +#include +#include + + +#ifdef __NR_sync_file_range +int +sync_file_range (int fd, __off64_t from, __off64_t to, int flags) +{ + return INLINE_SYSCALL (sync_file_range, 6, fd, + __LONG_LONG_PAIR ((long) (from >> 32), (long) from), + __LONG_LONG_PAIR ((long) (to >> 32), (long) to), + flags); +} +#else +int +sync_file_range (int fd, __off64_t from, __off64_t to, int flags) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sync_file_range) + +# include +#endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sys/inotify.h glibc-2.5/sysdeps/unix/sysv/linux/sys/inotify.h --- glibc-2.4/sysdeps/unix/sysv/linux/sys/inotify.h 2005-08-20 01:18:55.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sys/inotify.h 2006-05-17 17:51:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -54,7 +54,16 @@ struct inotify_event #define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ #define IN_IGNORED 0x00008000 /* File was ignored. */ +/* Helper events. */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ + /* Special flags. */ +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a + directory. */ +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already + existing watch. */ #define IN_ISDIR 0x40000000 /* Event occurred against dir. */ #define IN_ONESHOT 0x80000000 /* Only send event once. */ diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/sys/ptrace.h glibc-2.5/sysdeps/unix/sysv/linux/sys/ptrace.h --- glibc-2.4/sysdeps/unix/sysv/linux/sys/ptrace.h 2001-07-06 04:56:21.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/sys/ptrace.h 2006-09-18 13:46:13.000000000 +0000 @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996-1999,2000,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -109,8 +109,24 @@ enum __ptrace_request #define PT_SETFPXREGS PTRACE_SETFPXREGS /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203 +#define PT_SETSIGINFO PTRACE_SETSIGINFO }; /* Perform process tracing functions. REQUEST is one of the values diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/syscalls.list glibc-2.5/sysdeps/unix/sysv/linux/syscalls.list --- glibc-2.4/sysdeps/unix/sysv/linux/syscalls.list 2006-02-08 18:19:47.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/syscalls.list 2006-08-30 15:03:22.000000000 +0000 @@ -1,6 +1,5 @@ # File name Caller Syscall name Args Strong name Weak names -add_key EXTRA add_key i:pppii add_key adjtimex adjtime adjtimex i:p __adjtimex adjtimex ntp_adjtime __adjtimex_internal bdflush EXTRA bdflush i:ii bdflush capget EXTRA capget i:pp capget @@ -30,7 +29,6 @@ inotify_init EXTRA inotify_init i: inoti inotify_rm_watch EXTRA inotify_rm_watch i:ii inotify_rm_watch ioperm - ioperm i:iii ioperm iopl - iopl i:i iopl -keyctl EXTRA keyctl i:iiiii keyctl klogctl EXTRA syslog i:isi klogctl lchown - lchown i:sii __lchown lchown posix_madvise - madvise Vi:pii posix_madvise @@ -54,7 +52,6 @@ putpmsg - putpmsg i:ippii putpmsg query_module EXTRA query_module i:sipip query_module quotactl EXTRA quotactl i:isip quotactl remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages -request_key EXTRA request_key i:pppi request_key sched_getp - sched_getparam i:ip __sched_getparam sched_getparam sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler sched_primax - sched_get_priority_max i:i __sched_get_priority_max sched_get_priority_max @@ -70,11 +67,14 @@ setfsgid EXTRA setfsgid i:i setfsgid setfsuid EXTRA setfsuid i:i setfsuid setpgid - setpgid i:ii __setpgid setpgid sigaltstack - sigaltstack i:PP __sigaltstack sigaltstack +splice EXTRA splice i:iPiPii splice sysinfo EXTRA sysinfo i:p sysinfo swapon - swapon i:si __swapon swapon swapoff - swapoff i:s __swapoff swapoff +tee EXTRA tee i:iiii tee unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s uselib +vmsplice EXTRA vmsplice i:iPii vmsplice wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/tcgetattr.c glibc-2.5/sysdeps/unix/sysv/linux/tcgetattr.c --- glibc-2.4/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 19:16:07.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/tcgetattr.c 2006-05-10 19:31:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 1998, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1992,1995,1997,1998,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,39 +40,40 @@ __tcgetattr (fd, termios_p) retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); - termios_p->c_iflag = k_termios.c_iflag; - termios_p->c_oflag = k_termios.c_oflag; - termios_p->c_cflag = k_termios.c_cflag; - termios_p->c_lflag = k_termios.c_lflag; - termios_p->c_line = k_termios.c_line; + if (__builtin_expect (retval == 0, 1)) + { + termios_p->c_iflag = k_termios.c_iflag; + termios_p->c_oflag = k_termios.c_oflag; + termios_p->c_cflag = k_termios.c_cflag; + termios_p->c_lflag = k_termios.c_lflag; + termios_p->c_line = k_termios.c_line; #ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED # ifdef _HAVE_C_ISPEED - termios_p->c_ispeed = k_termios.c_ispeed; + termios_p->c_ispeed = k_termios.c_ispeed; # else - termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX); + termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX); # endif #endif #ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED # ifdef _HAVE_C_OSPEED - termios_p->c_ospeed = k_termios.c_ospeed; + termios_p->c_ospeed = k_termios.c_ospeed; # else - termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX); + termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX); # endif #endif - if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0 - || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1) - memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], - __KERNEL_NCCS * sizeof (cc_t)), - _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t)); - else - { - size_t cnt; - - memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], - __KERNEL_NCCS * sizeof (cc_t)); - - for (cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt) - termios_p->c_cc[cnt] = _POSIX_VDISABLE; + if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0 + || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1) + memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], + __KERNEL_NCCS * sizeof (cc_t)), + _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t)); + else + { + memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], + __KERNEL_NCCS * sizeof (cc_t)); + + for (size_t cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt) + termios_p->c_cc[cnt] = _POSIX_VDISABLE; + } } return retval; diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/tst-clone.c glibc-2.5/sysdeps/unix/sysv/linux/tst-clone.c --- glibc-2.4/sysdeps/unix/sysv/linux/tst-clone.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/tst-clone.c 2006-04-25 19:15:43.000000000 +0000 @@ -0,0 +1,56 @@ +/* Test for proper error/errno handling in clone. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* BZ #2386 */ +#include +#include +#include +#include +#include + +int child_fn(void *arg) +{ + puts ("FAIL: in child_fn(); should not be here"); + exit(1); +} + +static int +do_test (void) +{ + int result; + +#ifdef __ia64__ + result = __clone2(child_fn, NULL, 0, 0, NULL, NULL, NULL); +#else + result = clone(child_fn, NULL, (int) NULL, NULL); +#endif + + if (errno != EINVAL || result != -1) + { + printf ("FAIL: clone()=%d (wanted -1) errno=%d (wanted %d)\n", + result, errno, EINVAL); + return 1; + } + + puts ("All OK"); + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ttyname.c glibc-2.5/sysdeps/unix/sysv/linux/ttyname.c --- glibc-2.4/sysdeps/unix/sysv/linux/ttyname.c 2002-11-01 20:43:39.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ttyname.c 2006-04-19 07:26:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,1996-2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,1996-2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #include #include +#include #if 0 /* Is this used anywhere? It is not exported. */ @@ -41,7 +42,7 @@ static char *getttyname (const char *dev libc_freeres_ptr (static char *getttyname_name); static char * -internal_function +internal_function attribute_compat_text_section getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat) { static size_t namelen; @@ -117,10 +118,12 @@ ttyname (int fd) int dostat = 0; char *name; int save = errno; - int len; - if (!__isatty (fd)) - return NULL; + if (__builtin_expect (!__isatty (fd), 0)) + { + __set_errno (ENOTTY); + return NULL; + } /* We try using the /proc filesystem. */ *_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0'; @@ -136,10 +139,19 @@ ttyname (int fd) } } - len = __readlink (procname, ttyname_buf, buflen); - if (len != -1 - /* This is for Linux 2.0. */ - && ttyname_buf[0] != '[') + ssize_t len = __readlink (procname, ttyname_buf, buflen); + if (__builtin_expect (len == -1 && errno == ENOENT, 0)) + { + __set_errno (EBADF); + return NULL; + } + + if (__builtin_expect (len != -1 +#ifndef __ASSUME_PROC_SELF_FD_SYMLINK + /* This is for Linux 2.0. */ + && ttyname_buf[0] != '[' +#endif + , 1)) { if ((size_t) len >= buflen) return NULL; diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/ttyname_r.c glibc-2.5/sysdeps/unix/sysv/linux/ttyname_r.c --- glibc-2.4/sysdeps/unix/sysv/linux/ttyname_r.c 2003-02-25 02:05:34.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/ttyname_r.c 2006-04-19 07:26:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,1995-2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,1995-2001,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,13 +27,14 @@ #include #include +#include static int getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino, int save, int *dostat) internal_function; static int -internal_function +internal_function attribute_compat_text_section getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino, int save, int *dostat) { @@ -99,7 +100,6 @@ __ttyname_r (int fd, char *buf, size_t b struct stat64 st, st1; int dostat = 0; int save = errno; - int ret; /* Test for the absolute minimal size. This makes life easier inside the loop. */ @@ -115,29 +115,34 @@ __ttyname_r (int fd, char *buf, size_t b return ERANGE; } + if (__builtin_expect (!__isatty (fd), 0)) + { + __set_errno (ENOTTY); + return ENOTTY; + } + /* We try using the /proc filesystem. */ *_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0'; - ret = __readlink (procname, buf, buflen - 1); - if (ret == -1 && errno == ENOENT) + ssize_t ret = __readlink (procname, buf, buflen - 1); + if (__builtin_expect (ret == -1 && errno == ENOENT, 0)) { __set_errno (EBADF); return EBADF; } - if (!__isatty (fd)) - { - __set_errno (ENOTTY); - return ENOTTY; - } - - if (ret == -1 && errno == ENAMETOOLONG) + if (__builtin_expect (ret == -1 && errno == ENAMETOOLONG, 0)) { __set_errno (ERANGE); return ERANGE; } - if (ret != -1 && buf[0] != '[') + if (__builtin_expect (ret != -1 +#ifndef __ASSUME_PROC_SELF_FD_SYMLINK + /* This is for Linux 2.0. */ + && buf[0] != '[' +#endif + , 1)) { buf[ret] = '\0'; return 0; diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/Versions glibc-2.5/sysdeps/unix/sysv/linux/Versions --- glibc-2.4/sysdeps/unix/sysv/linux/Versions 2006-02-08 18:20:57.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/Versions 2006-08-01 15:54:36.000000000 +0000 @@ -123,6 +123,9 @@ libc { #errlist-compat 132 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } + GLIBC_2.5 { + splice; sync_file_range; tee; vmsplice; + } GLIBC_PRIVATE { # functions used in other libraries __syscall_rt_sigqueueinfo; diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list glibc-2.5/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list --- glibc-2.4/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list 2004-03-23 23:25:53.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list 2006-03-31 21:46:50.000000000 +0000 @@ -14,3 +14,4 @@ getrlimit - getrlimit i:ip __getrlimit g setrlimit - setrlimit i:ip __setrlimit setrlimit setrlimit64 readahead - readahead i:iii __readahead readahead sendfile - sendfile i:iipi sendfile sendfile64 +sync_file_range - sync_file_range i:iiii sync_file_range diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h glibc-2.5/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h --- glibc-2.4/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h 2004-08-23 07:28:46.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h 2006-08-30 15:04:44.000000000 +0000 @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/x86-64. - Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,9 +21,12 @@ # error "Never use directly; include instead." #endif - #include #include +#ifdef __USE_GNU +# include +#endif + /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ @@ -110,7 +113,7 @@ # define F_NOTIFY 1026 /* Request notfications on a directory. */ #endif -/* For F_[GET|SET]FL. */ +/* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ @@ -194,10 +197,55 @@ struct flock64 # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +#ifdef __USE_GNU +/* Flags for SYNC_FILE_RANGE. */ +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages + in the range before performing the + write. */ +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those + dirty pages in the range which are + not presently under writeback. */ +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in + the range after performing the + write. */ + +/* Flags for SPLICE and VMSPLICE. */ +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing + (but we may still block on the fd + we splice from/to). */ +# define SPLICE_F_MORE 4 /* Expect more data. */ +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ +#endif + __BEGIN_DECLS +#ifdef __USE_GNU + /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; + +/* Selective file content synch'ing. */ +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, + unsigned int __flags); + + +/* Splice address range into a pipe. */ +extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, + unsigned int __flags); + +/* Splice two files together. */ +extern int splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) + __THROW; + +/* In-kernel implementation of tee for pipe buffers. */ +extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) + __THROW; + +#endif + __END_DECLS diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/x86_64/bits/mman.h glibc-2.5/sysdeps/unix/sysv/linux/x86_64/bits/mman.h --- glibc-2.4/sysdeps/unix/sysv/linux/x86_64/bits/mman.h 2006-02-16 00:15:09.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/x86_64/bits/mman.h 2006-05-02 14:33:46.000000000 +0000 @@ -89,7 +89,7 @@ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 5 /* Remove these pages and resources. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ #endif diff -uprN glibc-2.4/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c glibc-2.5/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c --- glibc-2.4/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c 2001-09-19 10:31:31.000000000 +0000 +++ glibc-2.5/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#include diff -uprN glibc-2.4/sysvipc/msgrcv.c glibc-2.5/sysvipc/msgrcv.c --- glibc-2.4/sysvipc/msgrcv.c 2005-12-14 09:51:21.000000000 +0000 +++ glibc-2.5/sysvipc/msgrcv.c 2006-08-03 20:30:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , August 1995. @@ -26,7 +26,7 @@ describes which message is returned in MSGFLG describes the behaviour in buffer overflow or queue underflow. */ -int +ssize_t msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) int msqid; void *msgp; diff -uprN glibc-2.4/sysvipc/sys/msg.h glibc-2.5/sysvipc/sys/msg.h --- glibc-2.4/sysvipc/sys/msg.h 2003-04-19 16:48:35.000000000 +0000 +++ glibc-2.5/sysvipc/sys/msg.h 2006-08-03 15:38:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1999,2000,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-1997,1999,2000,2003,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -66,8 +66,8 @@ extern int msgget (key_t __key, int __ms This function is a cancellation point and therefore not marked with __THROW. */ -extern int msgrcv (int __msqid, void *__msgp, size_t __msgsz, - long int __msgtyp, int __msgflg); +extern ssize_t msgrcv (int __msqid, void *__msgp, size_t __msgsz, + long int __msgtyp, int __msgflg); /* Send message to message queue. diff -uprN glibc-2.4/time/bug-mktime1.c glibc-2.5/time/bug-mktime1.c --- glibc-2.4/time/bug-mktime1.c 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.5/time/bug-mktime1.c 2006-09-09 16:54:23.000000000 +0000 @@ -0,0 +1,17 @@ +#include +#include + + +static int +do_test (void) +{ + struct tm t2 = { 0, 0, 0, 1, 1, 2050 - 1900, 1, 1, 1 }; + time_t tt2 = mktime (&t2); + printf ("%ld\n", (long int) tt2); + if (sizeof (time_t) == 4 && tt2 != -1) + return 1; + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -uprN glibc-2.4/time/Makefile glibc-2.5/time/Makefile --- glibc-2.4/time/Makefile 2005-10-14 15:16:17.000000000 +0000 +++ glibc-2.5/time/Makefile 2006-09-09 16:54:49.000000000 +0000 @@ -35,7 +35,7 @@ distribute := datemsk tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \ - tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r + tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 include ../Rules diff -uprN glibc-2.4/time/mktime.c glibc-2.5/time/mktime.c --- glibc-2.4/time/mktime.c 2005-09-08 08:09:07.000000000 +0000 +++ glibc-2.5/time/mktime.c 2006-09-09 16:56:18.000000000 +0000 @@ -1,7 +1,7 @@ /* Convert a `struct tm' to a time_t value. - Copyright (C) 1993-1999, 2002-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2002-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Paul Eggert (eggert@twinsun.com). + Contributed by Paul Eggert . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -216,10 +216,11 @@ guess_time_tm (long int year, long int y /* Overflow occurred one way or another. Return the nearest result that is actually in range, except don't report a zero difference if the actual difference is nonzero, as that would cause a false - match. */ + match; and don't oscillate between two values, as that would + confuse the spring-forward gap detector. */ return (*t < TIME_T_MIDPOINT - ? TIME_T_MIN + (*t == TIME_T_MIN) - : TIME_T_MAX - (*t == TIME_T_MAX)); + ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) + : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); } /* Use CONVERT to convert *T to a broken down time in *TP. diff -uprN glibc-2.4/timezone/zdump.c glibc-2.5/timezone/zdump.c --- glibc-2.4/timezone/zdump.c 2006-01-10 07:55:37.000000000 +0000 +++ glibc-2.5/timezone/zdump.c 2006-09-21 03:57:30.000000000 +0000 @@ -389,7 +389,7 @@ _("%s: usage is %s [ --version ] [ -v ] } if (fflush(stdout) || ferror(stdout)) { (void) fprintf(stderr, "%s: ", progname); - (void) perror(_("Error writing standard output")); + (void) perror(_("Error writing to standard output")); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); diff -uprN glibc-2.4/version.h glibc-2.5/version.h --- glibc-2.4/version.h 2006-03-06 10:59:31.000000000 +0000 +++ glibc-2.5/version.h 2006-09-29 18:35:25.000000000 +0000 @@ -1,4 +1,4 @@ /* This file just defines the current version number of libc. */ -#define RELEASE "development" -#define VERSION "2.4" +#define RELEASE "stable" +#define VERSION "2.5" diff -uprN glibc-2.4/Versions.def glibc-2.5/Versions.def --- glibc-2.4/Versions.def 2006-01-03 23:06:57.000000000 +0000 +++ glibc-2.5/Versions.def 2006-03-31 15:44:42.000000000 +0000 @@ -21,6 +21,7 @@ libc { GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 + GLIBC_2.5 %ifdef USE_IN_LIBIO HURD_CTHREADS_0.3 %endif diff -uprN glibc-2.4/wcsmbs/wchar.h glibc-2.5/wcsmbs/wchar.h --- glibc-2.4/wcsmbs/wchar.h 2006-01-14 20:14:36.000000000 +0000 +++ glibc-2.5/wcsmbs/wchar.h 2006-09-27 15:56:30.000000000 +0000 @@ -321,6 +321,7 @@ __END_NAMESPACE_C99 #ifdef __USE_EXTERN_INLINES /* Define inline function as optimization. */ +# ifndef __cplusplus /* We can use the BTOWC and WCTOB optimizations since we know that all locales must use ASCII encoding for the values in the ASCII range and because the wchar_t encoding is always ISO 10646. */ @@ -335,6 +336,7 @@ extern __inline int __NTH (wctob (wint_t __wc)) { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } +# endif extern __inline size_t __NTH (mbrlen (__const char *__restrict __s, size_t __n, @@ -507,26 +509,30 @@ extern long double __wcstold_internal (_ wchar_t **__restrict __endptr, int __group) __THROW; -#ifndef __wcstol_internal_defined +#if !defined __wcstol_internal_defined \ + && defined __OPTIMIZE__ && __GNUC__ >= 2 extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstol_internal_defined 1 #endif -#ifndef __wcstoul_internal_defined +#if !defined __wcstoul_internal_defined \ + && defined __OPTIMIZE__ && __GNUC__ >= 2 extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, wchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstoul_internal_defined 1 #endif -#ifndef __wcstoll_internal_defined +#if !defined __wcstoll_internal_defined \ + && defined __OPTIMIZE__ && __GNUC__ >= 2 __extension__ extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstoll_internal_defined 1 #endif -#ifndef __wcstoull_internal_defined +#if !defined __wcstoull_internal_defined \ + && defined __OPTIMIZE__ && __GNUC__ >= 2 __extension__ extern unsigned long long int __wcstoull_internal (__const wchar_t * __restrict __nptr, @@ -594,6 +600,13 @@ extern wchar_t *wcpncpy (wchar_t *__dest /* Wide character I/O functions. */ + +#ifdef __USE_GNU +/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces + a wide character string. */ +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW; +#endif + #if defined __USE_ISOC99 || defined __USE_UNIX98 __BEGIN_NAMESPACE_C99