[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r13054 - in /trunk: libc/ libc/bits/ libc/elf/ libc/include/ libc/libio/ libc/manual/ libc/nis/ libc/nscd/ libc/posix/ libc/...
- To: commits@xxxxxxxxxx
- Subject: [commits] r13054 - in /trunk: libc/ libc/bits/ libc/elf/ libc/include/ libc/libio/ libc/manual/ libc/nis/ libc/nscd/ libc/posix/ libc/...
- From: joseph@xxxxxxxxxx
- Date: Sat, 05 Mar 2011 19:39:35 -0000
Author: joseph
Date: Sat Mar 5 11:39:34 2011
New Revision: 13054
Log:
Merge changes between r12752 and r13053 from /fsf/trunk.
Regenerate configure scripts as part of merge.
Added:
trunk/libc/stdio-common/bug23.c
- copied unchanged from r13053, fsf/trunk/libc/stdio-common/bug23.c
trunk/libc/sysdeps/mach/hurd/ifreq.h
- copied unchanged from r13053, fsf/trunk/libc/sysdeps/mach/hurd/ifreq.h
trunk/libc/sysdeps/powerpc/powerpc64/power7/Makefile
- copied unchanged from r13053, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/Makefile
trunk/libc/sysdeps/wordsize-64/Makefile
- copied unchanged from r13053, fsf/trunk/libc/sysdeps/wordsize-64/Makefile
trunk/libc/sysdeps/wordsize-64/tst-writev.c
- copied unchanged from r13053, fsf/trunk/libc/sysdeps/wordsize-64/tst-writev.c
trunk/ports/sysdeps/arm/Makefile
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/Makefile
trunk/ports/sysdeps/arm/dl-lookupcfg.h
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/dl-lookupcfg.h
trunk/ports/sysdeps/arm/dl-tlsdesc.S
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/dl-tlsdesc.S
trunk/ports/sysdeps/arm/dl-tlsdesc.h
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/dl-tlsdesc.h
trunk/ports/sysdeps/arm/tlsdesc.c
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/tlsdesc.c
trunk/ports/sysdeps/arm/tlsdesc.sym
- copied unchanged from r13053, fsf/trunk/ports/sysdeps/arm/tlsdesc.sym
Modified:
trunk/libc/ChangeLog
trunk/libc/Makeconfig
trunk/libc/Makerules
trunk/libc/NEWS
trunk/libc/aclocal.m4
trunk/libc/bits/sched.h
trunk/libc/configure
trunk/libc/configure.in
trunk/libc/elf/Makefile
trunk/libc/elf/dl-close.c
trunk/libc/elf/dl-deps.c
trunk/libc/elf/dl-load.c
trunk/libc/elf/dl-object.c
trunk/libc/elf/elf.h
trunk/libc/elf/noload.c
trunk/libc/elf/rtld-Rules
trunk/libc/elf/rtld.c
trunk/libc/include/link.h
trunk/libc/libio/fmemopen.c
trunk/libc/manual/install.texi
trunk/libc/nis/nis_add.c
trunk/libc/nis/nis_modify.c
trunk/libc/nis/nis_remove.c
trunk/libc/nis/nis_server.c
trunk/libc/nis/nis_table.c
trunk/libc/nscd/aicache.c
trunk/libc/nscd/cache.c
trunk/libc/nscd/connections.c
trunk/libc/nscd/grpcache.c
trunk/libc/nscd/hstcache.c
trunk/libc/nscd/initgrcache.c
trunk/libc/nscd/nscd-client.h
trunk/libc/nscd/nscd.h
trunk/libc/nscd/pwdcache.c
trunk/libc/nscd/servicescache.c
trunk/libc/posix/fnmatch_loop.c
trunk/libc/setjmp/bits/setjmp2.h
trunk/libc/stdio-common/Makefile
trunk/libc/stdio-common/_i18n_number.h
trunk/libc/stdio-common/printf-parsemb.c
trunk/libc/stdio-common/psiginfo.c
trunk/libc/stdio-common/vfprintf.c
trunk/libc/sysdeps/i386/configure
trunk/libc/sysdeps/mach/i386/sysdep.h
trunk/libc/sysdeps/mach/i386/thread_state.h
trunk/libc/sysdeps/sparc/sparc64/multiarch/memset.S
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/socket.h
trunk/libc/sysdeps/x86_64/elf/configure
trunk/libc/sysdeps/x86_64/elf/configure.in
trunk/libc/sysdeps/x86_64/multiarch/memset-x86-64.S
trunk/ports/ChangeLog.alpha
trunk/ports/ChangeLog.arm
trunk/ports/sysdeps/alpha/fpu/feupdateenv.c
trunk/ports/sysdeps/alpha/fpu/ftestexcept.c
trunk/ports/sysdeps/alpha/stackinfo.h
trunk/ports/sysdeps/arm/bits/linkmap.h
trunk/ports/sysdeps/arm/dl-machine.h
trunk/ports/sysdeps/arm/dl-tls.h
trunk/ports/sysdeps/arm/sysdep.h
trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Sat Mar 5 11:39:34 2011
@@ -1,3 +1,175 @@
+2011-03-04 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * libio/fmemopen.c (fmemopen): Optimize a bit.
+
+2011-03-03 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * libio/fmemopen.c (fmemopen): Don't read past end of buffer.
+
+2011-03-03 Roland McGrath <roland@xxxxxxxxxx>
+
+ * setjmp/bits/setjmp2.h: Canonicalize comment formatting.
+
+2011-02-28 Aurelien Jarno <aurelien@xxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/multiarch/memset.S(__bzero): call
+ __bzero_ultra1 instead of __memset_ultra1.
+
+2011-02-23 Andreas Schwab <schwab@xxxxxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12509]
+ * include/link.h (struct link_map): Add l_orig_initfini.
+ * elf/dl-load.c (_dl_map_object_from_fd): Free realname before
+ returning unsuccessfully.
+ * elf/dl-close.c (_dl_close_worker): If this is the last explicit
+ close of a file loaded at startup, restore the original l_initfini
+ list.
+ * elf/dl-deps.c (_dl_map_object_deps): Don't free old l_initfini
+ list, store the pointer.
+ * elf/Makefile ($(objpfx)noload-mem): New rule.
+ (noload-ENV): Define.
+ (tests): Add $(objpfx)noload-mem.
+ * elf/noload.c: Include <memcheck.h>.
+ (main): Call mtrace. Close all opened handles.
+
+2011-02-17 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #12454]
+ * elf/dl-deps.c (_dl_map_object_deps): Signal error early when
+ dependencies are missing.
+
+2011-02-22 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ Fix __if_freereq crash: Unlike the generic version which uses free,
+ Hurd needs munmap.
+ * sysdeps/mach/hurd/ifreq.h: New file.
+
+2011-01-27 Petr Baudis <pasky@xxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ 12445]#
+ * stdio-common/vfprintf.c (vfprintf): Pass correct newlen
+ to extend_alloca().
+ * stdio-common/bug23.c: New file.
+ * stdio-common/Makefile (tests): Add bug23.
+
+2010-09-28 Andreas Schwab <schwab@xxxxxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12489]
+ * elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
+ before performing relro protection. At old place add assertion
+ to make sure nothing changed.
+
+2011-02-17 Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx>
+ Glauber de Oliveira Costa <glommer@xxxxxxxxx>
+
+ * elf/elf.h: Add new ARM TLS relocs.
+
+2011-02-16 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:
+ (INTERNAL_VSYSCALL_NCS INTERNAL_SYSCALL_NCS): Remove erroneous (int)
+ cast from r3.
+ * sysdeps/wordsize-64/Makefile: New file. Add tst-writev to
+ 'tests' variable.
+ * sysdeps/wordsize-64/tst-writev.c: New file.
+
+2011-02-15 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power7/Makefile: New file which adds
+ -mno-vsx to the CFLAGS-rtld.c variable to avoid using VSX registers and
+ insns in _dl_start to prevent a TOC reference before relocs are
+ resolved.
+
+2011-02-15 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12469]
+ * Makeconfig: Remove RANLIB definition.
+ * Makerules: Don't use RANLIB.
+ * aclocal.m4: Remove ranlib test.
+ * configure.in: No need to check for ranlib.
+ * elf/rtld-Rules: Don't use RANLIB.
+
+2011-02-16 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ * sysdeps/mach/i386/sysdep.h: Add _MACH_I386_SYSDEP_H inclusion
+ protection macro.
+ * sysdeps/mach/i386/thread_state.h: Add _MACH_I386_THREAD_STATE_H
+ inclusion protection macro.
+
+ * stdio-common/psiginfo.c (psiginfo): Check pinfo->si_signo against
+ SIGRTMIN and SIGRTMAX and print information in that case only when
+ SIGRTMIN is defined.
+
+2011-02-11 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * stdio-common/printf-parsemb.c (__parse_one_specmb): Handle
+ arginfo fn returning -1.
+
+ * stdio-common/_i18n_number.h (_i18n_number_rewrite): Ensure decimal
+ and thousands string is zero terminated.
+
+2011-02-03 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Sync with
+ sysdeps/unix/sysv/linux/bits/socket.h.
+
+2011-01-30 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ * bits/sched.h (__CPU_ZERO, __CPU_SET, __CPU_CLR, __CPU_ISSET)
+ (__CPU_COUNT): Remove old macros.
+ (__CPU_ZERO_S, __CPU_SET_S, __CPU_CLR_S, __CPU_ISSET_S)
+ (__CPU_COUNT, __CPU_EQUAL_S, __CPU_OP_S, __CPU_ALLOC_SIZE)
+ (__CPU_ALLOC, __CPU_FREE): Add macros.
+ (__sched_cpualloc, __sched_cpufree): Add declarations.
+
+2011-02-05 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * nscd/nscd-client.h: Define MAX_TIMEOUT_VALUE.
+ (struct datahead): Reuse 32 bits of the alignment for a TTL field.
+ * nscd/aicache.c (addhstaiX): Return timeout of added value.
+ (readdhstai): Return value of addhstaiX call.
+ * nscd/grpcache.c (cache_addgr): Return timeout of added value.
+ (addgrbyX): Return value returned by cache_addgr.
+ (readdgrbyname): Return value returned by addgrbyX.
+ (readdgrbygid): Likewise.
+ * nscd/pwdcache.c (cache_addpw): Return timeout of added value.
+ (addpwbyX): Return value returned by cache_addpw.
+ (readdpwbyname): Return value returned by addhstbyX.
+ (readdpwbyuid): Likewise.
+ * nscd/servicescache.c (cache_addserv): Return timeout of added value.
+ (addservbyX): Return value returned by cache_addserv.
+ (readdservbyname): Return value returned by addservbyX:
+ (readdservbyport): Likewise.
+ * nscd/hstcache.c (cache_addhst): Return timeout of added value.
+ (addhstbyX): Return value returned by cache_addhst.
+ (readdhstbyname): Return value returned by addhstbyX.
+ (readdhstbyaddr): Likewise.
+ (readdhstbynamev6): Likewise.
+ (readdhstbyaddrv6): Likewise.
+ * nscd/initgrcache.c (addinitgroupsX): Return timeout of added value.
+ (readdinitgroups): Return value returned by addinitgroupsX.
+ * nscd/cache.c (readdfcts): Change return value of functions to time_t.
+ (prune_cache): Keep track of timeout value of re-added entries.
+ * nscd/connections.c (nscd_run_prune): Use MAX_TIMEOUT_VALUE.
+ * nscd/nscd.h: Adjust prototypes of readd* functions.
+
+2011-02-04 Roland McGrath <roland@xxxxxxxxxx>
+
+ * nis/nis_server.c (nis_servstate): Use the right name for 0.
+ (nis_stats): Likewise.
+ * nis/nis_modify.c (nis_modify): Likewise.
+ * nis/nis_remove.c (nis_remove): Likewise.
+ * nis/nis_add.c (nis_add): Likewise.
+
+ * elf/dl-object.c (_dl_new_object): Remove unused variable L.
+
+ * posix/fnmatch_loop.c: Add some consts.
+
+ * sysdeps/x86_64/multiarch/memset-x86-64.S: Add an #undef.
+
2011-02-02 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #12460]
Modified: trunk/libc/Makeconfig
==============================================================================
--- trunk/libc/Makeconfig (original)
+++ trunk/libc/Makeconfig Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010
+# Copyright (C) 1991-2003,2004,2005,2006,2007,2008,2009,2010,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -599,10 +599,6 @@
ifndef LD
LD := ld -X
-endif
-
-ifndef RANLIB
-RANLIB = ranlib
endif
# Extra flags to pass to GCC.
Modified: trunk/libc/Makerules
==============================================================================
--- trunk/libc/Makerules (original)
+++ trunk/libc/Makerules Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+# Copyright (C) 1991-2010, 2011 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
@@ -836,7 +836,6 @@
define do-makelib
cd $(common-objdir) && \
$(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
-$(RANLIB) $@
endef
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
@@ -858,7 +857,6 @@
$(patsubst %/,cd % &&,$(objpfx)) \
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
$(patsubst $(objpfx)%,%,$^)
-$(RANLIB) $@
endef
# Installation.
@@ -904,9 +902,6 @@
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
$(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
-# Running ranlib after installing makes the __.SYMDEF time stamp up to
-# date, which avoids messages from some linkers.
- $(RANLIB) $@
define do-install-program
$(make-target-directory)
@@ -1156,7 +1151,6 @@
$(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
$(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a $(+force)
$(do-install)
- $(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
endif
endif
ifdef install-data
Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-2-2
+GNU C Library NEWS -- history of user-visible changes. 2011-2-25
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -9,7 +9,7 @@
* The following bugs are resolved with this release:
- 11724, 12460
+ 11724, 12445, 12454, 12460, 12469, 12489, 12509
Version 2.13
Modified: trunk/libc/aclocal.m4
==============================================================================
--- trunk/libc/aclocal.m4 (original)
+++ trunk/libc/aclocal.m4 Sat Mar 5 11:39:34 2011
@@ -57,7 +57,7 @@
AC_MSG_CHECKING([version of [$]$1])
changequote(<<,>>)dnl
ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
- <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
+ <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
<<$5>>)
@@ -103,17 +103,6 @@
AC_SUBST(NM)
OBJDUMP=`$CC -print-prog-name=objdump`
AC_SUBST(OBJDUMP)
-
-# ranlib has to be treated a bit differently since it might not exist at all.
-ac_ranlib=`$CC -print-prog-name=ranlib`
-if test "x$ac_ranlib" = xranlib; then
-# This extra check has to happen since gcc simply echos the parameter in
-# case it cannot find the value in its own directories.
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-else
- RANLIB=$ac_ranlib
-fi
-AC_SUBST(RANLIB)
# Determine whether we are using GNU binutils.
AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
Modified: trunk/libc/bits/sched.h
==============================================================================
--- trunk/libc/bits/sched.h (original)
+++ trunk/libc/bits/sched.h Sat Mar 5 11:39:34 2011
@@ -1,6 +1,7 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
- Copyright (C) 1996, 1997, 2001, 2003, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
+ 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,7 +57,7 @@
# define __CPU_SETSIZE 1024
# define __NCPUBITS (8 * sizeof (__cpu_mask))
-/* Type for array elements in 'cpu_set'. */
+/* Type for array elements in 'cpu_set_t'. */
typedef unsigned long int __cpu_mask;
/* Basic access functions. */
@@ -70,27 +71,83 @@
} cpu_set_t;
/* Access functions for CPU masks. */
-# define __CPU_ZERO(cpusetp) \
+# if __GNUC_PREREQ (2, 91)
+# define __CPU_ZERO_S(setsize, cpusetp) \
+ do __builtin_memset (cpusetp, '\0', setsize); while (0)
+# else
+# define __CPU_ZERO_S(setsize, cpusetp) \
do { \
- unsigned int __i; \
- cpu_set *__arr = (cpusetp); \
- for (__i = 0; __i < sizeof (cpu_set) / sizeof (__cpu_mask); ++__i) \
- __arr->__bits[__i] = 0; \
+ size_t __i; \
+ size_t __imax = (setsize) / sizeof (__cpu_mask); \
+ __cpu_mask *__bits = (cpusetp)->__bits; \
+ for (__i = 0; __i < __imax; ++__i) \
+ __bits[__i] = 0; \
} while (0)
-# define __CPU_SET(cpu, cpusetp) \
- ((cpusetp)->__bits[__CPUELT (cpu)] |= __CPUMASK (cpu))
-# define __CPU_CLR(cpu, cpusetp) \
- ((cpusetp)->__bits[__CPUELT (cpu)] &= ~__CPUMASK (cpu))
-# define __CPU_ISSET(cpu, cpusetp) \
- (((cpusetp)->__bits[__CPUELT (cpu)] & __CPUMASK (cpu)) != 0)
+# endif
+# define __CPU_SET_S(cpu, setsize, cpusetp) \
+ (__extension__ \
+ ({ size_t __cpu = (cpu); \
+ __cpu < 8 * (setsize) \
+ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ |= __CPUMASK (__cpu)) \
+ : 0; }))
+# define __CPU_CLR_S(cpu, setsize, cpusetp) \
+ (__extension__ \
+ ({ size_t __cpu = (cpu); \
+ __cpu < 8 * (setsize) \
+ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ &= ~__CPUMASK (__cpu)) \
+ : 0; }))
+# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
+ (__extension__ \
+ ({ size_t __cpu = (cpu); \
+ __cpu < 8 * (setsize) \
+ ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
+ & __CPUMASK (__cpu))) != 0 \
+ : 0; }))
+
+# define __CPU_COUNT_S(setsize, cpusetp) \
+ __sched_cpucount (setsize, cpusetp)
+
+# if __GNUC_PREREQ (2, 91)
+# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
+ (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
+# else
+# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
+ (__extension__ \
+ ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
+ __const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
+ size_t __imax = (setsize) / sizeof (__cpu_mask); \
+ size_t __i; \
+ for (__i = 0; __i < __imax; ++__i) \
+ if (__bits[__i] != __bits[__i]) \
+ break; \
+ __i == __imax; }))
+# endif
+
+# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
+ (__extension__ \
+ ({ cpu_set_t *__dest = (destset); \
+ __const __cpu_mask *__arr1 = (srcset1)->__bits; \
+ __const __cpu_mask *__arr2 = (srcset2)->__bits; \
+ size_t __imax = (setsize) / sizeof (__cpu_mask); \
+ size_t __i; \
+ for (__i = 0; __i < __imax; ++__i) \
+ ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
+ __dest; }))
+
+# define __CPU_ALLOC_SIZE(count) \
+ ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
+# define __CPU_ALLOC(count) __sched_cpualloc (count)
+# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
__BEGIN_DECLS
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
__THROW;
+extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
+extern void __sched_cpufree (cpu_set_t *__set) __THROW;
__END_DECLS
-# define __CPU_COUNT(cpusetp) \
- __sched_cpucount (sizeof (cpu_set_t), cpusetp)
#endif
Modified: trunk/libc/configure
==============================================================================
--- trunk/libc/configure (original)
+++ trunk/libc/configure Sat Mar 5 11:39:34 2011
@@ -713,7 +713,6 @@
LD
AS
MIG
-RANLIB
OBJDUMP
NM
AR
@@ -4910,108 +4909,6 @@
OBJDUMP=`$CC -print-prog-name=objdump`
-# ranlib has to be treated a bit differently since it might not exist at all.
-ac_ranlib=`$CC -print-prog-name=ranlib`
-if test "x$ac_ranlib" = xranlib; then
-# This extra check has to happen since gcc simply echos the parameter in
-# case it cannot find the value in its own directories.
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-else
- RANLIB=$ac_ranlib
-fi
-
-
# Determine whether we are using GNU binutils.
{ $as_echo "$as_me:$LINENO: checking whether $AS is GNU as" >&5
$as_echo_n "checking whether $AS is GNU as... " >&6; }
@@ -5657,33 +5554,8 @@
-# check if ranlib is necessary
-{ $as_echo "$as_me:$LINENO: checking whether ranlib is necessary" >&5
-$as_echo_n "checking whether ranlib is necessary... " >&6; }
-if test "${libc_cv_ranlib_necessary+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<EOF
-int a;
-char b;
-void c(void) {}
-EOF
-$CC $CFLAGS $CPPFLAGS -c conftest.c
-$AR cr conftest.a conftest.o
-cp conftest.a conftest2.a
-$RANLIB conftest.a
-if cmp -s conftest.a conftest2.a; then
- libc_cv_ranlib_necessary=no
-else
- libc_cv_ranlib_necessary=yes
-fi
-rm -rf conftest*
-fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_ranlib_necessary" >&5
-$as_echo "$libc_cv_ranlib_necessary" >&6; }
-if test "$libc_cv_ranlib_necessary" = no; then
- RANLIB=:
-fi
+# ranlib is never necessary on Linux and Hurd systems
+RANLIB=:
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
Modified: trunk/libc/configure.in
==============================================================================
--- trunk/libc/configure.in (original)
+++ trunk/libc/configure.in Sat Mar 5 11:39:34 2011
@@ -1128,26 +1128,8 @@
AC_SUBST(SYSINCLUDES)
AC_SUBST(CXX_SYSINCLUDES)
-# check if ranlib is necessary
-AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl
-cat > conftest.c <<EOF
-int a;
-char b;
-void c(void) {}
-EOF
-$CC $CFLAGS $CPPFLAGS -c conftest.c
-$AR cr conftest.a conftest.o
-cp conftest.a conftest2.a
-$RANLIB conftest.a
-if cmp -s conftest.a conftest2.a; then
- libc_cv_ranlib_necessary=no
-else
- libc_cv_ranlib_necessary=yes
-fi
-rm -rf conftest*])
-if test "$libc_cv_ranlib_necessary" = no; then
- RANLIB=:
-fi
+# ranlib is never necessary on Linux and Hurd systems
+RANLIB=:
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
Modified: trunk/libc/elf/Makefile
==============================================================================
--- trunk/libc/elf/Makefile (original)
+++ trunk/libc/elf/Makefile Sat Mar 5 11:39:34 2011
@@ -214,7 +214,7 @@
ifeq (yesyes,$(have-fpie)$(build-shared))
tests: $(objpfx)tst-pie1.out
endif
-tests: $(objpfx)tst-leaks1-mem
+tests: $(objpfx)tst-leaks1-mem $(objpfx)noload-mem
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tlsmod17a-modules = $(addprefix tst-tlsmod17a, $(tlsmod17a-suffixes))
@@ -686,6 +686,10 @@
LDFLAGS-noload = -rdynamic
$(objpfx)noload.out: $(objpfx)testobj5.so
+$(objpfx)noload-mem: $(objpfx)noload.out
+ $(common-objpfx)malloc/mtrace $(objpfx)noload.mtrace > $@
+noload-ENV = MALLOC_TRACE=$(objpfx)noload.mtrace
+
LDFLAGS-nodelete = -rdynamic
LDFLAGS-nodelmod1.so = -Wl,--enable-new-dtags,-z,nodelete
LDFLAGS-nodelmod4.so = -Wl,--enable-new-dtags,-z,nodelete
Modified: trunk/libc/elf/dl-close.c
==============================================================================
--- trunk/libc/elf/dl-close.c (original)
+++ trunk/libc/elf/dl-close.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009, 2010, 2011 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
@@ -119,8 +119,17 @@
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|| dl_close_state != not_pending)
{
- if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
- dl_close_state = rerun;
+ if (map->l_direct_opencount == 0)
+ {
+ if (map->l_type == lt_loaded)
+ dl_close_state = rerun;
+ else if (map->l_type == lt_library)
+ {
+ struct link_map **oldp = map->l_initfini;
+ map->l_initfini = map->l_orig_initfini;
+ _dl_scope_free (oldp);
+ }
+ }
/* There are still references to this object. Do nothing more. */
if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
Modified: trunk/libc/elf/dl-deps.c
==============================================================================
--- trunk/libc/elf/dl-deps.c (original)
+++ trunk/libc/elf/dl-deps.c Sat Mar 5 11:39:34 2011
@@ -491,6 +491,10 @@
if (errno == 0 && errno_saved != 0)
__set_errno (errno_saved);
+ if (errno_reason)
+ _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
+ NULL, errstring);
+
struct link_map **old_l_initfini = NULL;
if (map->l_initfini != NULL && map->l_type == lt_loaded)
{
@@ -682,9 +686,5 @@
_dl_scope_free (old_l_reldeps);
}
if (old_l_initfini != NULL)
- _dl_scope_free (old_l_initfini);
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
- NULL, errstring);
+ map->l_orig_initfini = old_l_initfini;
}
Modified: trunk/libc/elf/dl-load.c
==============================================================================
--- trunk/libc/elf/dl-load.c (original)
+++ trunk/libc/elf/dl-load.c Sat Mar 5 11:39:34 2011
@@ -894,6 +894,7 @@
{
/* We are not supposed to load the object unless it is already
loaded. So return now. */
+ free (realname);
__close (fd);
return NULL;
}
@@ -912,6 +913,7 @@
_dl_zerofd = _dl_sysdep_open_zero_fill ();
if (_dl_zerofd == -1)
{
+ free (realname);
__close (fd);
_dl_signal_error (errno, NULL, NULL,
N_("cannot open zero fill device"));
Modified: trunk/libc/elf/dl-object.c
==============================================================================
--- trunk/libc/elf/dl-object.c (original)
+++ trunk/libc/elf/dl-object.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,6 @@
/* Storage management for the chain of loaded shared objects.
- Copyright (C) 1995-2002,2004,2006-2009,2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2004,2006,2007,2008,2009,2010,2011
+ 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,7 +61,6 @@
_dl_new_object (char *realname, const char *libname, int type,
struct link_map *loader, int mode, Lmid_t nsid)
{
- struct link_map *l;
size_t libname_len = strlen (libname) + 1;
struct link_map *new;
struct libname_list *newname;
Modified: trunk/libc/elf/elf.h
==============================================================================
--- trunk/libc/elf/elf.h (original)
+++ trunk/libc/elf/elf.h Sat Mar 5 11:39:34 2011
@@ -2318,7 +2318,8 @@
#define R_ARM_THM_PC22 10
#define R_ARM_THM_PC8 11
#define R_ARM_AMP_VCALL9 12
-#define R_ARM_SWI24 13
+#define R_ARM_SWI24 13 /* Obsolete static relocation. */
+#define R_ARM_TLS_DESC 13 /* Dynamic relocation. */
#define R_ARM_THM_SWI8 14
#define R_ARM_XPC25 15
#define R_ARM_THM_XPC22 16
@@ -2339,6 +2340,10 @@
#define R_ARM_LDR_SBREL_11_0 35
#define R_ARM_ALU_SBREL_19_12 36
#define R_ARM_ALU_SBREL_27_20 37
+#define R_ARM_TLS_GOTDESC 90
+#define R_ARM_TLS_CALL 91
+#define R_ARM_TLS_DESCSEQ 92
+#define R_ARM_THM_TLS_CALL 93
#define R_ARM_GNU_VTENTRY 100
#define R_ARM_GNU_VTINHERIT 101
#define R_ARM_THM_PC11 102 /* thumb unconditional branch */
@@ -2353,6 +2358,7 @@
static TLS block offset */
#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
TLS block */
+#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_RXPC25 249
#define R_ARM_RSBREL32 250
#define R_ARM_THM_RPC22 251
Modified: trunk/libc/elf/noload.c
==============================================================================
--- trunk/libc/elf/noload.c (original)
+++ trunk/libc/elf/noload.c Sat Mar 5 11:39:34 2011
@@ -1,20 +1,28 @@
#include <dlfcn.h>
#include <stdio.h>
+#include <mcheck.h>
int
main (void)
{
int result = 0;
+ void *p;
+
+ mtrace ();
/* First try to load an object which is a dependency. This should
succeed. */
- if (dlopen ("testobj1.so", RTLD_LAZY | RTLD_NOLOAD) == NULL)
+ p = dlopen ("testobj1.so", RTLD_LAZY | RTLD_NOLOAD);
+ if (p == NULL)
{
printf ("cannot open \"testobj1.so\": %s\n", dlerror ());
result = 1;
}
else
- puts ("loading \"testobj1.so\" succeeded, OK");
+ {
+ puts ("loading \"testobj1.so\" succeeded, OK");
+ dlclose (p);
+ }
/* Now try loading an object which is not already loaded. */
if (dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD) != NULL)
@@ -25,8 +33,6 @@
else
{
/* Load the object and run the same test again. */
- void *p;
-
puts ("\"testobj5.so\" wasn't loaded and RTLD_NOLOAD prevented it, OK");
p = dlopen ("testobj5.so", RTLD_LAZY);
@@ -41,13 +47,17 @@
{
puts ("loading \"testobj5.so\" succeeded, OK");
- if (dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD) == NULL)
+ void *q = dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD);
+ if (q == NULL)
{
printf ("cannot open \"testobj5.so\": %s\n", dlerror ());
result = 1;
}
else
- puts ("loading \"testobj5.so\" with RTLD_NOLOAD succeeded, OK");
+ {
+ puts ("loading \"testobj5.so\" with RTLD_NOLOAD succeeded, OK");
+ dlclose (q);
+ }
if (dlclose (p) != 0)
{
Modified: trunk/libc/elf/rtld-Rules
==============================================================================
--- trunk/libc/elf/rtld-Rules (original)
+++ trunk/libc/elf/rtld-Rules Sat Mar 5 11:39:34 2011
@@ -1,6 +1,7 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
-# Copyright (C) 2002,2003,2005,2006,2008,2010 Free Software Foundation, Inc.
+# Copyright (C) 2002,2003,2005,2006,2008,2010,2011
+# 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,7 +51,6 @@
$(rtld-$(dir))))
@-rm -f $@T
$(AR) cq$(verbose) $@T $^
- $(RANLIB) $@T
mv -f $@T $@
# Use the verbose option of ar and tar when not running silently.
Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Run time dynamic linker.
- Copyright (C) 1995-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2010, 2011 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
@@ -2179,6 +2179,10 @@
we need it in the memory handling later. */
GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+ /* Remember the last search directory added at startup, now that
+ malloc will no longer be the one from dl-minimal.c. */
+ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
if (prelinked)
{
if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
@@ -2298,9 +2302,8 @@
lossage);
}
- /* Remember the last search directory added at startup, now that
- malloc will no longer be the one from dl-minimal.c. */
- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+ /* Make sure no new search directories have been added. */
+ assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
if (! prelinked && rtld_multiple_ref)
{
Modified: trunk/libc/include/link.h
==============================================================================
--- trunk/libc/include/link.h (original)
+++ trunk/libc/include/link.h Sat Mar 5 11:39:34 2011
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 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
@@ -240,6 +240,9 @@
/* List of object in order of the init and fini calls. */
struct link_map **l_initfini;
+ /* The init and fini list generated at startup, saved when the
+ object is also loaded dynamically. */
+ struct link_map **l_orig_initfini;
/* List of the dependencies introduced through symbol binding. */
struct link_map_reldeps
Modified: trunk/libc/libio/fmemopen.c
==============================================================================
--- trunk/libc/libio/fmemopen.c (original)
+++ trunk/libc/libio/fmemopen.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Fmemopen implementation.
- Copyright (C) 2000, 2002, 2005, 2006, 2008, 2009
+ Copyright (C) 2000, 2002, 2005, 2006, 2008, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Hanno Mueller, kontakt@xxxxxxxx, 2000.
@@ -226,6 +226,7 @@
return NULL;
}
c->buffer[0] = '\0';
+ c->maxpos = 0;
}
else
{
@@ -236,14 +237,14 @@
}
c->buffer = buf;
+
+ if (mode[0] == 'w')
+ c->buffer[0] = '\0';
+
+ c->maxpos = strnlen (c->buffer, len);
}
c->size = len;
-
- if (mode[0] == 'w')
- c->buffer[0] = '\0';
-
- c->maxpos = strlen (c->buffer);
if (mode[0] == 'a')
c->pos = c->maxpos;
Modified: trunk/libc/manual/install.texi
==============================================================================
--- trunk/libc/manual/install.texi (original)
+++ trunk/libc/manual/install.texi Sat Mar 5 11:39:34 2011
@@ -228,8 +228,8 @@
@code{configure}, like this: @samp{CC=@var{target}-gcc configure
@var{target}}. Set @code{BUILD_CC} to the compiler to use for programs
run on the build system as part of compiling the library. You may need to
-set @code{AR} and @code{RANLIB} to cross-compiling versions of @code{ar}
-and @code{ranlib} if the native tools are not configured to work with
+set @code{AR} to cross-compiling versions of @code{ar}
+if the native tools are not configured to work with
object files for the target you configured for.
Modified: trunk/libc/nis/nis_add.c
==============================================================================
--- trunk/libc/nis/nis_add.c (original)
+++ trunk/libc/nis/nis_add.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxx>, 1997.
@@ -65,7 +65,7 @@
NIS_ADD, (xdrproc_t) _xdr_ns_request,
(caddr_t) &req, (xdrproc_t) _xdr_nis_result,
(caddr_t) res, MASTER_ONLY, NULL);
- if (status != RPC_SUCCESS)
+ if (status != NIS_SUCCESS)
NIS_RES_STATUS (res) = status;
nis_destroy_object (req.ns_object.ns_object_val);
Modified: trunk/libc/nis/nis_modify.c
==============================================================================
--- trunk/libc/nis/nis_modify.c (original)
+++ trunk/libc/nis/nis_modify.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxx>, 1997.
@@ -65,7 +65,7 @@
(caddr_t) & req, (xdrproc_t) _xdr_nis_result,
(caddr_t) res, MASTER_ONLY,
NULL);
- if (status != RPC_SUCCESS)
+ if (status != NIS_SUCCESS)
NIS_RES_STATUS (res) = status;
nis_destroy_object (req.ns_object.ns_object_val);
Modified: trunk/libc/nis/nis_remove.c
==============================================================================
--- trunk/libc/nis/nis_remove.c (original)
+++ trunk/libc/nis/nis_remove.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxx>, 1997.
@@ -49,7 +49,7 @@
if ((status = __do_niscall (name, NIS_REMOVE, (xdrproc_t) _xdr_ns_request,
(caddr_t) &req, (xdrproc_t) _xdr_nis_result,
(caddr_t) res, MASTER_ONLY,
- NULL)) != RPC_SUCCESS)
+ NULL)) != NIS_SUCCESS)
NIS_RES_STATUS (res) = status;
nis_destroy_object (req.ns_object.ns_object_val);
Modified: trunk/libc/nis/nis_server.c
==============================================================================
--- trunk/libc/nis/nis_server.c (original)
+++ trunk/libc/nis/nis_server.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (c) 1997,1998,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxxxxxxxxxxxxxx>, 1997.
@@ -41,7 +41,7 @@
if (__do_niscall2 (serv, 1, NIS_SERVSTATE, (xdrproc_t) _xdr_nis_taglist,
(caddr_t) &taglist, (xdrproc_t) _xdr_nis_taglist,
- (caddr_t) &tagres, 0, NULL) != RPC_SUCCESS)
+ (caddr_t) &tagres, 0, NULL) != NIS_SUCCESS)
return NIS_RPCERROR;
*result = tagres.tags.tags_val;
@@ -67,7 +67,7 @@
if (__do_niscall2 (serv, 1, NIS_STATUS, (xdrproc_t) _xdr_nis_taglist,
(caddr_t) &taglist, (xdrproc_t) _xdr_nis_taglist,
- (caddr_t) &tagres, 0, NULL) != RPC_SUCCESS)
+ (caddr_t) &tagres, 0, NULL) != NIS_SUCCESS)
return NIS_RPCERROR;
*result = tagres.tags.tags_val;
Modified: trunk/libc/nis/nis_table.c
==============================================================================
--- trunk/libc/nis/nis_table.c (original)
+++ trunk/libc/nis/nis_table.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
-/* Copyright (c) 1997-1999, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+/* Copyright (c) 1997-1999, 2003, 2004, 2005, 2006, 2007, 2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1997.
Modified: trunk/libc/nscd/aicache.c
==============================================================================
--- trunk/libc/nscd/aicache.c (original)
+++ trunk/libc/nscd/aicache.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
@@ -58,7 +58,7 @@
};
-static void
+static time_t
addhstaiX (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid, struct hashentry *const he,
struct datahead *dh)
@@ -119,6 +119,7 @@
ssize_t total = 0;
char *key_copy = NULL;
bool alloca_used = false;
+ time_t timeout = MAX_TIMEOUT_VALUE;
while (!no_more)
{
@@ -388,8 +389,8 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = time (NULL) + (ttl == INT32_MAX
- ? db->postimeout : ttl);
+ dataset->head.ttl = ttl == INT32_MAX ? db->postimeout : ttl;
+ timeout = dataset->head.timeout = time (NULL) + dataset->head.ttl;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -421,6 +422,7 @@
timeout value. Note that the new record has been
allocated on the stack and need not be freed. */
dh->timeout = dataset->head.timeout;
+ dh->ttl = dataset->head.ttl;
++dh->nreloads;
}
else
@@ -496,6 +498,9 @@
if (reload_count != UINT_MAX && dh->nreloads == reload_count)
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = time (NULL) + dh->ttl;
}
else
{
@@ -517,7 +522,8 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = time (NULL) + db->negtimeout;
+ timeout = dataset->head.timeout = time (NULL) + db->negtimeout;
+ dataset->head.ttl = db->negtimeout;
/* This is the reply. */
memcpy (&dataset->resp, ¬found, total);
@@ -551,6 +557,8 @@
if (dh != NULL)
dh->usable = false;
}
+
+ return timeout;
}
@@ -562,7 +570,7 @@
}
-void
+time_t
readdhstai (struct database_dyn *db, struct hashentry *he, struct datahead *dh)
{
request_header req =
@@ -571,5 +579,5 @@
.key_len = he->len
};
- addhstaiX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addhstaiX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
Modified: trunk/libc/nscd/cache.c
==============================================================================
--- trunk/libc/nscd/cache.c (original)
+++ trunk/libc/nscd/cache.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 1999, 2003-2008, 2009 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2003-2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -45,9 +45,9 @@
unsigned int reload_count = DEFAULT_RELOAD_LIMIT;
-static void (*const readdfcts[LASTREQ]) (struct database_dyn *,
- struct hashentry *,
- struct datahead *) =
+static time_t (*const readdfcts[LASTREQ]) (struct database_dyn *,
+ struct hashentry *,
+ struct datahead *) =
{
[GETPWBYNAME] = readdpwbyname,
[GETPWBYUID] = readdpwbyuid,
@@ -272,7 +272,7 @@
{
char buf[128];
/* We cannot stat() the file, disable file checking if the
- file does not exist. */
+ file does not exist. */
dbg_log (_("cannot stat() file `%s': %s"),
table->filename, strerror_r (errno, buf, sizeof (buf)));
if (errno == ENOENT)
@@ -389,7 +389,8 @@
assert (runp->type < LASTREQ
&& readdfcts[runp->type] != NULL);
- readdfcts[runp->type] (table, runp, dh);
+ time_t timeout = readdfcts[runp->type] (table, runp, dh);
+ next_timeout = MIN (next_timeout, timeout);
/* If the entry has been replaced, we might need
cleanup. */
Modified: trunk/libc/nscd/connections.c
==============================================================================
--- trunk/libc/nscd/connections.c (original)
+++ trunk/libc/nscd/connections.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Inner loops of cache daemon.
- Copyright (C) 1998-2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2007, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -1533,10 +1533,7 @@
pruning we want to know about it. Therefore set the
timeout to the maximum. It will be descreased when adding
new entries to the cache, if necessary. */
- if (sizeof (time_t) == sizeof (long int))
- dbs[my_number].wakeup_time = LONG_MAX;
- else
- dbs[my_number].wakeup_time = INT_MAX;
+ dbs[my_number].wakeup_time = MAX_TIMEOUT_VALUE;
/* Unconditionally reset the flag. */
time_t prune_now = dbs[my_number].clear_cache ? LONG_MAX : now;
Modified: trunk/libc/nscd/grpcache.c
==============================================================================
--- trunk/libc/nscd/grpcache.c (original)
+++ trunk/libc/nscd/grpcache.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -71,7 +71,7 @@
};
-static void
+static time_t
cache_addgr (struct database_dyn *db, int fd, request_header *req,
const void *key, struct group *grp, uid_t owner,
struct hashentry *const he, struct datahead *dh, int errval)
@@ -91,6 +91,7 @@
assert (offsetof (struct dataset, resp) == offsetof (struct datahead, data));
+ time_t timeout = MAX_TIMEOUT_VALUE;
if (grp == NULL)
{
if (he != NULL && errval == EAGAIN)
@@ -102,6 +103,9 @@
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = t + db->postimeout;
+
written = total = 0;
}
else
@@ -125,7 +129,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->negtimeout;
+ timeout = dataset->head.timeout = t + db->negtimeout;
/* This is the reply. */
memcpy (&dataset->resp, ¬found, total);
@@ -217,7 +221,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->postimeout;
+ timeout = dataset->head.timeout = t + db->postimeout;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -379,6 +383,8 @@
dbg_log (_("short write in %s: %s"), __FUNCTION__,
strerror_r (errno, buf, sizeof (buf)));
}
+
+ return timeout;
}
@@ -400,7 +406,7 @@
}
-static void
+static time_t
addgrbyX (struct database_dyn *db, int fd, request_header *req,
union keytype key, const char *keystr, uid_t uid,
struct hashentry *he, struct datahead *dh)
@@ -456,10 +462,12 @@
buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen);
}
- cache_addgr (db, fd, req, keystr, grp, uid, he, dh, errval);
+ time_t timeout = cache_addgr (db, fd, req, keystr, grp, uid, he, dh, errval);
if (use_malloc)
free (buffer);
+
+ return timeout;
}
@@ -473,7 +481,7 @@
}
-void
+time_t
readdgrbyname (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -484,7 +492,7 @@
};
union keytype u = { .v = db->data + he->key };
- addgrbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
+ return addgrbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
}
@@ -498,7 +506,7 @@
if (*(char *) key == '\0' || *ep != '\0') /* invalid numeric uid */
{
if (debug_level > 0)
- dbg_log (_("Invalid numeric gid \"%s\"!"), (char *) key);
+ dbg_log (_("Invalid numeric gid \"%s\"!"), (char *) key);
errno = EINVAL;
return;
@@ -510,7 +518,7 @@
}
-void
+time_t
readdgrbygid (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -527,5 +535,5 @@
};
union keytype u = { .g = gid };
- addgrbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
-}
+ return addgrbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
+}
Modified: trunk/libc/nscd/hstcache.c
==============================================================================
--- trunk/libc/nscd/hstcache.c (original)
+++ trunk/libc/nscd/hstcache.c Sat Mar 5 11:39:34 2011
@@ -91,7 +91,7 @@
};
-static void
+static time_t
cache_addhst (struct database_dyn *db, int fd, request_header *req,
const void *key, struct hostent *hst, uid_t owner,
struct hashentry *const he, struct datahead *dh, int errval,
@@ -111,6 +111,7 @@
assert (offsetof (struct dataset, resp) == offsetof (struct datahead, data));
+ time_t timeout = MAX_TIMEOUT_VALUE;
if (hst == NULL)
{
if (he != NULL && errval == EAGAIN)
@@ -121,6 +122,9 @@
if (reload_count != UINT_MAX)
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = t + dh->ttl;
}
else
{
@@ -149,8 +153,8 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + (ttl == INT32_MAX
- ? db->negtimeout : ttl);
+ dataset->head.ttl = ttl == INT32_MAX ? db->negtimeout : ttl;
+ timeout = dataset->head.timeout = t + dataset->head.ttl;
/* This is the reply. */
memcpy (&dataset->resp, resp, total);
@@ -214,7 +218,7 @@
if (h_addr_list_cnt == 0)
/* Invalid entry. */
- return;
+ return MAX_TIMEOUT_VALUE;
total += (sizeof (struct dataset)
+ h_name_len
@@ -255,7 +259,8 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + (ttl == INT32_MAX ? db->postimeout : ttl);
+ dataset->head.ttl = ttl == INT32_MAX ? db->postimeout : ttl;
+ timeout = dataset->head.timeout = t + dataset->head.ttl;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -312,6 +317,7 @@
timeout value. Note that the new record has been
allocated on the stack and need not be freed. */
assert (h_addr_list_cnt == 1);
+ dh->ttl = dataset->head.ttl;
dh->timeout = dataset->head.timeout;
++dh->nreloads;
}
@@ -433,6 +439,8 @@
dbg_log (_("short write in %s: %s"), __FUNCTION__,
strerror_r (errno, buf, sizeof (buf)));
}
+
+ return timeout;
}
@@ -454,7 +462,7 @@
}
-static void
+static time_t
addhstbyX (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid, struct hashentry *he, struct datahead *dh)
{
@@ -520,11 +528,13 @@
buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen);
}
- cache_addhst (db, fd, req, key, hst, uid, he, dh,
- h_errno == TRY_AGAIN ? errval : 0, ttl);
+ time_t timeout = cache_addhst (db, fd, req, key, hst, uid, he, dh,
+ h_errno == TRY_AGAIN ? errval : 0, ttl);
if (use_malloc)
free (buffer);
+
+ return timeout;
}
@@ -536,7 +546,7 @@
}
-void
+time_t
readdhstbyname (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -546,7 +556,7 @@
.key_len = he->len
};
- addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
@@ -558,7 +568,7 @@
}
-void
+time_t
readdhstbyaddr (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -568,7 +578,7 @@
.key_len = he->len
};
- addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
@@ -580,7 +590,7 @@
}
-void
+time_t
readdhstbynamev6 (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -590,7 +600,7 @@
.key_len = he->len
};
- addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
@@ -602,7 +612,7 @@
}
-void
+time_t
readdhstbyaddrv6 (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -612,5 +622,5 @@
.key_len = he->len
};
- addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
-}
+ return addhstbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+}
Modified: trunk/libc/nscd/initgrcache.c
==============================================================================
--- trunk/libc/nscd/initgrcache.c (original)
+++ trunk/libc/nscd/initgrcache.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
@@ -52,7 +52,7 @@
#include "../grp/compat-initgroups.c"
-static void
+static time_t
addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid, struct hashentry *const he,
struct datahead *dh)
@@ -174,7 +174,9 @@
ssize_t total;
ssize_t written;
+ time_t timeout;
out:
+ timeout = MAX_TIMEOUT_VALUE;
if (!any_success)
{
/* Nothing found. Create a negative result record. */
@@ -188,6 +190,9 @@
if (reload_count != UINT_MAX && dh->nreloads == reload_count)
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = time (NULL) + db->postimeout;
}
else
{
@@ -209,7 +214,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = time (NULL) + db->negtimeout;
+ timeout = dataset->head.timeout = time (NULL) + db->negtimeout;
/* This is the reply. */
memcpy (&dataset->resp, ¬found, total);
@@ -273,7 +278,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = time (NULL) + db->postimeout;
+ timeout = dataset->head.timeout = time (NULL) + db->postimeout;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -401,6 +406,8 @@
dbg_log (_("short write in %s: %s"), __FUNCTION__,
strerror_r (errno, buf, sizeof (buf)));
}
+
+ return timeout;
}
@@ -412,7 +419,7 @@
}
-void
+time_t
readdinitgroups (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -422,5 +429,5 @@
.key_len = he->len
};
- addinitgroupsX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addinitgroupsX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
Modified: trunk/libc/nscd/nscd-client.h
==============================================================================
--- trunk/libc/nscd/nscd-client.h (original)
+++ trunk/libc/nscd/nscd-client.h Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009
+/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1998.
@@ -179,6 +179,10 @@
/* Timestamp type. */
typedef uint64_t nscd_time_t;
+/* Maximum timestamp. */
+#define MAX_TIMEOUT_VALUE \
+ (sizeof (time_t) == sizeof (long int) ? LONG_MAX : INT_MAX)
+
/* Alignment requirement of the beginning of the data region. */
#define ALIGN 16
@@ -192,7 +196,8 @@
uint8_t notfound; /* Nonzero if data has not been found. */
uint8_t nreloads; /* Reloads without use. */
uint8_t usable; /* False if the entry must be ignored. */
- uint64_t :40; /* Alignment. */
+ uint8_t unused; /* Unused. */
+ uint32_t ttl; /* TTL value used. */
/* We need to have the following element aligned for the response
header data types and their use in the 'struct dataset' types
Modified: trunk/libc/nscd/nscd.h
==============================================================================
--- trunk/libc/nscd/nscd.h (original)
+++ trunk/libc/nscd/nscd.h Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998-2001, 2003-2008, 2009 Free Software Foundation, Inc.
+/* Copyright (c) 1998-2001, 2003-2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1998.
@@ -217,20 +217,20 @@
void *key, uid_t uid);
extern void addpwbyuid (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid);
-extern void readdpwbyname (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
-extern void readdpwbyuid (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdpwbyname (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
+extern time_t readdpwbyuid (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* grpcache.c */
extern void addgrbyname (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid);
extern void addgrbygid (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid);
-extern void readdgrbyname (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
-extern void readdgrbygid (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdgrbyname (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
+extern time_t readdgrbygid (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* hstcache.c */
extern void addhstbyname (struct database_dyn *db, int fd, request_header *req,
@@ -241,37 +241,37 @@
request_header *req, void *key, uid_t uid);
extern void addhstbyaddrv6 (struct database_dyn *db, int fd,
request_header *req, void *key, uid_t uid);
-extern void readdhstbyname (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
-extern void readdhstbyaddr (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
-extern void readdhstbynamev6 (struct database_dyn *db, struct hashentry *he,
+extern time_t readdhstbyname (struct database_dyn *db, struct hashentry *he,
struct datahead *dh);
-extern void readdhstbyaddrv6 (struct database_dyn *db, struct hashentry *he,
+extern time_t readdhstbyaddr (struct database_dyn *db, struct hashentry *he,
struct datahead *dh);
+extern time_t readdhstbynamev6 (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
+extern time_t readdhstbyaddrv6 (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* aicache.c */
extern void addhstai (struct database_dyn *db, int fd, request_header *req,
void *key, uid_t uid);
-extern void readdhstai (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdhstai (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* initgrcache.c */
extern void addinitgroups (struct database_dyn *db, int fd,
request_header *req, void *key, uid_t uid);
-extern void readdinitgroups (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdinitgroups (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* servicecache.c */
extern void addservbyname (struct database_dyn *db, int fd,
request_header *req, void *key, uid_t uid);
-extern void readdservbyname (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdservbyname (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
extern void addservbyport (struct database_dyn *db, int fd,
request_header *req, void *key, uid_t uid);
-extern void readdservbyport (struct database_dyn *db, struct hashentry *he,
- struct datahead *dh);
+extern time_t readdservbyport (struct database_dyn *db, struct hashentry *he,
+ struct datahead *dh);
/* mem.c */
extern void *mempool_alloc (struct database_dyn *db, size_t len,
Modified: trunk/libc/nscd/pwdcache.c
==============================================================================
--- trunk/libc/nscd/pwdcache.c (original)
+++ trunk/libc/nscd/pwdcache.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Cache handling for passwd lookup.
- Copyright (C) 1998-2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -77,7 +77,7 @@
};
-static void
+static time_t
cache_addpw (struct database_dyn *db, int fd, request_header *req,
const void *key, struct passwd *pwd, uid_t owner,
struct hashentry *const he, struct datahead *dh, int errval)
@@ -97,6 +97,7 @@
assert (offsetof (struct dataset, resp) == offsetof (struct datahead, data));
+ time_t timeout = MAX_TIMEOUT_VALUE;
if (pwd == NULL)
{
if (he != NULL && errval == EAGAIN)
@@ -108,6 +109,9 @@
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = t + db->postimeout;
+
written = total = 0;
}
else
@@ -132,7 +136,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->negtimeout;
+ timeout = dataset->head.timeout = t + db->negtimeout;
/* This is the reply. */
memcpy (&dataset->resp, ¬found, total);
@@ -212,7 +216,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->postimeout;
+ timeout = dataset->head.timeout = t + db->postimeout;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -293,8 +297,8 @@
assert ((char *) dataset - (char *) db->head
+ total
<= (sizeof (struct database_pers_head)
- + db->head->module * sizeof (ref_t)
- + db->head->data_size));
+ + db->head->module * sizeof (ref_t)
+ + db->head->data_size));
written = sendfileall (fd, db->wr_fd,
(char *) &dataset->resp
- (char *) db->head, dataset->head.recsize );
@@ -374,6 +378,8 @@
dbg_log (_("short write in %s: %s"), __FUNCTION__,
strerror_r (errno, buf, sizeof (buf)));
}
+
+ return timeout;
}
@@ -395,7 +401,7 @@
}
-static void
+static time_t
addpwbyX (struct database_dyn *db, int fd, request_header *req,
union keytype key, const char *keystr, uid_t c_uid,
struct hashentry *he, struct datahead *dh)
@@ -452,10 +458,13 @@
}
/* Add the entry to the cache. */
- cache_addpw (db, fd, req, keystr, pwd, c_uid, he, dh, errval);
+ time_t timeout = cache_addpw (db, fd, req, keystr, pwd, c_uid, he, dh,
+ errval);
if (use_malloc)
free (buffer);
+
+ return timeout;
}
@@ -469,7 +478,7 @@
}
-void
+time_t
readdpwbyname (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -480,7 +489,7 @@
};
union keytype u = { .v = db->data + he->key };
- addpwbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
+ return addpwbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
}
@@ -494,7 +503,7 @@
if (*(char *) key == '\0' || *ep != '\0') /* invalid numeric uid */
{
if (debug_level > 0)
- dbg_log (_("Invalid numeric uid \"%s\"!"), (char *) key);
+ dbg_log (_("Invalid numeric uid \"%s\"!"), (char *) key);
errno = EINVAL;
return;
@@ -506,7 +515,7 @@
}
-void
+time_t
readdpwbyuid (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -523,5 +532,5 @@
};
union keytype u = { .u = uid };
- addpwbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
-}
+ return addpwbyX (db, -1, &req, u, db->data + he->key, he->owner, he, dh);
+}
Modified: trunk/libc/nscd/servicescache.c
==============================================================================
--- trunk/libc/nscd/servicescache.c (original)
+++ trunk/libc/nscd/servicescache.c Sat Mar 5 11:39:34 2011
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxxx>, 2007.
@@ -61,7 +61,7 @@
};
-static void
+static time_t
cache_addserv (struct database_dyn *db, int fd, request_header *req,
const void *key, struct servent *serv, uid_t owner,
struct hashentry *const he, struct datahead *dh, int errval)
@@ -81,6 +81,7 @@
assert (offsetof (struct dataset, resp) == offsetof (struct datahead, data));
+ time_t timeout = MAX_TIMEOUT_VALUE;
if (serv == NULL)
{
if (he != NULL && errval == EAGAIN)
@@ -92,6 +93,9 @@
/* Do not reset the value if we never not reload the record. */
dh->nreloads = reload_count - 1;
+ /* Reload with the same time-to-live value. */
+ timeout = dh->timeout = t + db->postimeout;
+
written = total = 0;
}
else
@@ -115,7 +119,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->negtimeout;
+ timeout = dataset->head.timeout = t + db->negtimeout;
/* This is the reply. */
memcpy (&dataset->resp, ¬found, total);
@@ -203,7 +207,7 @@
dataset->head.usable = true;
/* Compute the timeout time. */
- dataset->head.timeout = t + db->postimeout;
+ timeout = dataset->head.timeout = t + db->postimeout;
dataset->resp.version = NSCD_VERSION;
dataset->resp.found = 1;
@@ -328,6 +332,8 @@
dbg_log (_("short write in %s: %s"), __FUNCTION__,
strerror_r (errno, buf, sizeof (buf)));
}
+
+ return timeout;
}
@@ -354,7 +360,7 @@
}
-static void
+static time_t
addservbyX (struct database_dyn *db, int fd, request_header *req,
char *key, uid_t uid, struct hashentry *he, struct datahead *dh)
{
@@ -409,10 +415,12 @@
buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen);
}
- cache_addserv (db, fd, req, key, serv, uid, he, dh, errval);
+ time_t timeout = cache_addserv (db, fd, req, key, serv, uid, he, dh, errval);
if (use_malloc)
free (buffer);
+
+ return timeout;
}
@@ -424,7 +432,7 @@
}
-void
+time_t
readdservbyname (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -434,7 +442,7 @@
.key_len = he->len
};
- addservbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+ return addservbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
}
@@ -446,7 +454,7 @@
}
-void
+time_t
readdservbyport (struct database_dyn *db, struct hashentry *he,
struct datahead *dh)
{
@@ -456,5 +464,5 @@
.key_len = he->len
};
- addservbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
-}
+ return addservbyX (db, -1, &req, db->data + he->key, he->owner, he, dh);
+}
Modified: trunk/libc/posix/fnmatch_loop.c
==============================================================================
--- trunk/libc/posix/fnmatch_loop.c (original)
+++ trunk/libc/posix/fnmatch_loop.c Sat Mar 5 11:39:34 2011
@@ -242,8 +242,8 @@
case L('['):
{
/* Nonzero if the sense of the character class is inverted. */
- CHAR *p_init = p;
- CHAR *n_init = n;
+ const CHAR *p_init = p;
+ const CHAR *n_init = n;
register int not;
CHAR cold;
UCHAR fn;
Modified: trunk/libc/setjmp/bits/setjmp2.h
==============================================================================
--- trunk/libc/setjmp/bits/setjmp2.h (original)
+++ trunk/libc/setjmp/bits/setjmp2.h Sat Mar 5 11:39:34 2011
@@ -1,21 +1,21 @@
/* Checking macros for setjmp functions.
- * Copyright (C) 2009 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. */
+ Copyright (C) 2009 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. */
#ifndef _SETJMP_H
# error "Never include <bits/setjmp2.h> directly; use <setjmp.h> instead."
Modified: trunk/libc/stdio-common/Makefile
==============================================================================
--- trunk/libc/stdio-common/Makefile (original)
+++ trunk/libc/stdio-common/Makefile Sat Mar 5 11:39:34 2011
@@ -68,7 +68,7 @@
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
- tst-setvbuf1
+ tst-setvbuf1 bug23
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-sscanf tst-swprintf bug15 test-vfprintf bug14 scanf13 tst-grouping
tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
Modified: trunk/libc/stdio-common/_i18n_number.h
==============================================================================
--- trunk/libc/stdio-common/_i18n_number.h (original)
+++ trunk/libc/stdio-common/_i18n_number.h Sat Mar 5 11:39:34 2011
@@ -33,8 +33,8 @@
# define decimal NULL
# define thousands NULL
#else
- char decimal[MB_LEN_MAX];
- char thousands[MB_LEN_MAX];
+ char decimal[MB_LEN_MAX + 1];
+ char thousands[MB_LEN_MAX + 1];
#endif
/* "to_outpunct" is a map from ASCII decimal point and thousands-sep
@@ -50,13 +50,19 @@
mbstate_t state;
memset (&state, '\0', sizeof (state));
- if (__wcrtomb (decimal, wdecimal, &state) == (size_t) -1)
+ size_t n = __wcrtomb (decimal, wdecimal, &state);
+ if (n == (size_t) -1)
memcpy (decimal, ".", 2);
+ else
+ decimal[n] = '\0';
memset (&state, '\0', sizeof (state));
- if (__wcrtomb (thousands, wthousands, &state) == (size_t) -1)
+ n = __wcrtomb (thousands, wthousands, &state);
+ if (n == (size_t) -1)
memcpy (thousands, ",", 2);
+ else
+ thousands[n] = '\0';
}
#endif
Modified: trunk/libc/stdio-common/printf-parsemb.c
==============================================================================
--- trunk/libc/stdio-common/printf-parsemb.c (original)
+++ trunk/libc/stdio-common/printf-parsemb.c Sat Mar 5 11:39:34 2011
@@ -295,9 +295,9 @@
/* We don't try to get the types for all arguments if the format
uses more than one. The normal case is covered though. If
the call returns -1 we continue with the normal specifiers. */
- || (spec->ndata_args = (*__printf_arginfo_table[spec->info.spec])
- (&spec->info, 1, &spec->data_arg_type,
- &spec->size)) < 0)
+ || (int) (spec->ndata_args = (*__printf_arginfo_table[spec->info.spec])
+ (&spec->info, 1, &spec->data_arg_type,
+ &spec->size)) < 0)
{
/* Find the data argument types of a built-in spec. */
spec->ndata_args = 1;
Modified: trunk/libc/stdio-common/psiginfo.c
==============================================================================
--- trunk/libc/stdio-common/psiginfo.c (original)
+++ trunk/libc/stdio-common/psiginfo.c Sat Mar 5 11:39:34 2011
@@ -86,8 +86,12 @@
const char *desc;
if (pinfo->si_signo >= 0 && pinfo->si_signo < NSIG
&& ((desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL
- || (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)))
+#ifdef SIGRTMIN
+ || (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)
+#endif
+ ))
{
+#ifdef SIGRTMIN
if (desc == NULL)
{
if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo)
@@ -106,6 +110,7 @@
}
}
else
+#endif
fprintf (fp, "%s (", _(desc));
const char *base = NULL;
Modified: trunk/libc/stdio-common/vfprintf.c
==============================================================================
--- trunk/libc/stdio-common/vfprintf.c (original)
+++ trunk/libc/stdio-common/vfprintf.c Sat Mar 5 11:39:34 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2008, 2009, 2010, 2011 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
@@ -1705,7 +1705,8 @@
{
/* Extend the array of format specifiers. */
struct printf_spec *old = specs;
- specs = extend_alloca (specs, nspecs_max, 2 * nspecs_max);
+ specs = extend_alloca (specs, nspecs_max,
+ 2 * nspecs_max * sizeof (*specs));
/* Copy the old array's elements to the new space. */
memmove (specs, old, nspecs * sizeof (struct printf_spec));
Modified: trunk/libc/sysdeps/i386/configure
==============================================================================
--- trunk/libc/sysdeps/i386/configure (original)
+++ trunk/libc/sysdeps/i386/configure Sat Mar 5 11:39:34 2011
@@ -1,102 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -133,249 +34,14 @@
# include <unistd.h>
#endif"
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if test "${ac_cv_path_GREP+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -386,7 +52,7 @@
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
@@ -406,7 +72,7 @@
$as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
+ ac_count=`expr $ac_count + 1`
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
@@ -421,24 +87,26 @@
$ac_path_GREP_found && break 3
done
done
- done
+done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
fi
else
ac_cv_path_GREP=$GREP
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if test "${ac_cv_path_EGREP+set}" = set; then
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -452,7 +120,7 @@
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
@@ -472,7 +140,7 @@
$as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
+ ac_count=`expr $ac_count + 1`
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
@@ -487,10 +155,12 @@
$ac_path_EGREP_found && break 3
done
done
- done
+done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
fi
else
ac_cv_path_EGREP=$EGREP
@@ -498,17 +168,21 @@
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
@@ -523,23 +197,48 @@
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- ac_cv_header_stdc=no
-fi
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
else
ac_cv_header_stdc=no
fi
@@ -549,14 +248,18 @@
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
+ $EGREP "free" >/dev/null 2>&1; then
+ :
else
ac_cv_header_stdc=no
fi
@@ -566,10 +269,14 @@
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes; then
:
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ctype.h>
#include <stdlib.h>
@@ -596,33 +303,118 @@
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -632,18 +424,146 @@
done
-ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default"
-if test "x$ac_cv_header_cpuid_h" = x""yes; then :
-
-else
- as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
+if test "${ac_cv_header_cpuid_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for cpuid.h" >&5
+$as_echo_n "checking for cpuid.h... " >&6; }
+if test "${ac_cv_header_cpuid_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cpuid_h" >&5
+$as_echo "$ac_cv_header_cpuid_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cpuid.h usability" >&5
+$as_echo_n "checking cpuid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <cpuid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cpuid.h presence" >&5
+$as_echo_n "checking cpuid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
[... 768 lines stripped ...]