[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7757 - in /trunk: libc/ libc/bits/ libc/catgets/ libc/csu/ libc/debug/ libc/elf/ libc/hurd/ libc/iconv/ libc/iconvdata/ lib...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7757 - in /trunk: libc/ libc/bits/ libc/catgets/ libc/csu/ libc/debug/ libc/elf/ libc/hurd/ libc/iconv/ libc/iconvdata/ lib...
- From: joseph@xxxxxxxxxx
- Date: Mon, 19 Jan 2009 17:43:22 -0000
Author: joseph
Date: Mon Jan 19 09:43:22 2009
New Revision: 7757
Log:
Merge changes between r7510 and r7756 from /fsf/trunk.
Added:
trunk/libc/sysdeps/unix/sysv/linux/s390/Versions
- copied unchanged from r7756, fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/Versions
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h
- copied unchanged from r7756, fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h
trunk/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c
- copied unchanged from r7756, fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/gettimeofday.c
trunk/libc/sysdeps/unix/sysv/linux/s390/init-first.c
- copied unchanged from r7756, fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/init-first.c
trunk/libc/sysdeps/x86_64/bits/select.h
- copied unchanged from r7756, fsf/trunk/libc/sysdeps/x86_64/bits/select.h
trunk/libc/wctype/bug-wctypeh.c
- copied unchanged from r7756, fsf/trunk/libc/wctype/bug-wctypeh.c
Modified:
trunk/libc/ChangeLog
trunk/libc/bits/resource.h
trunk/libc/catgets/gencat.c
trunk/libc/csu/libc-start.c
trunk/libc/csu/version.c
trunk/libc/debug/catchsegv.sh
trunk/libc/debug/xtrace.sh
trunk/libc/elf/dl-support.c
trunk/libc/elf/dl-sysdep.c
trunk/libc/elf/elf.h
trunk/libc/elf/ldconfig.c
trunk/libc/elf/ldd.bash.in
trunk/libc/elf/rtld.c
trunk/libc/elf/sprof.c
trunk/libc/hurd/hurdsig.c
trunk/libc/hurd/report-wait.c
trunk/libc/iconv/iconv_prog.c
trunk/libc/iconv/iconvconfig.c
trunk/libc/iconvdata/Makefile
trunk/libc/locale/programs/locale.c
trunk/libc/locale/programs/localedef.c
trunk/libc/localedata/ChangeLog
trunk/libc/localedata/locales/as_IN
trunk/libc/localedata/locales/bn_BD
trunk/libc/localedata/locales/bn_IN
trunk/libc/localedata/locales/el_CY
trunk/libc/localedata/locales/gu_IN
trunk/libc/localedata/locales/hi_IN
trunk/libc/localedata/locales/i18n
trunk/libc/localedata/locales/iso14651_t1_common
trunk/libc/localedata/locales/kn_IN
trunk/libc/localedata/locales/ml_IN
trunk/libc/localedata/locales/mr_IN
trunk/libc/localedata/locales/mt_MT
trunk/libc/localedata/locales/or_IN
trunk/libc/localedata/locales/pa_IN
trunk/libc/localedata/locales/sk_SK
trunk/libc/localedata/locales/ta_IN
trunk/libc/localedata/locales/te_IN
trunk/libc/localedata/tests-mbwc/tst_types.h
trunk/libc/login/utmp_file.c
trunk/libc/malloc/memusage.sh
trunk/libc/malloc/mtrace.pl
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/allocatestack.c
trunk/libc/nptl/init.c
trunk/libc/nptl/pthread_mutex_lock.c
trunk/libc/nptl/pthread_mutex_unlock.c
trunk/libc/nptl/sysdeps/pthread/list.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
trunk/libc/nscd/nscd.c
trunk/libc/nscd/nscd_getai.c
trunk/libc/nscd/nscd_gethst_r.c
trunk/libc/nss/getent.c
trunk/libc/nss/nss_files/files-parse.c
trunk/libc/posix/bug-regex17.c
trunk/libc/posix/getconf.c
trunk/libc/posix/regcomp.c
trunk/libc/posix/regex_internal.c
trunk/libc/posix/regex_internal.h
trunk/libc/posix/regexec.c
trunk/libc/posix/rxspencer/tests
trunk/libc/resolv/nss_dns/dns-host.c
trunk/libc/resolv/res_init.c
trunk/libc/sysdeps/generic/dl-osinfo.h
trunk/libc/sysdeps/generic/ldsodefs.h
trunk/libc/sysdeps/i386/fpu/libm-test-ulps
trunk/libc/sysdeps/mach/hurd/Makefile
trunk/libc/sysdeps/posix/getaddrinfo.c
trunk/libc/sysdeps/unix/sysv/linux/bits/resource.h
trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h
trunk/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
trunk/libc/sysdeps/unix/sysv/linux/s390/Makefile
trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
trunk/libc/version.h
trunk/libc/wcsmbs/mbsnrtowcs.c
trunk/libc/wcsmbs/wchar.h
trunk/libc/wcsmbs/wcsnrtombs.c
trunk/libc/wctype/Makefile
trunk/libc/wctype/wctype.h
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/arm/fpu/setjmp.S
trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Mon Jan 19 09:43:22 2009
@@ -1,3 +1,170 @@
+2009-01-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Take
+ one parameter. If non-NULL use it to initialize return value.
+ (_dl_setup_pointer_guard): New function.
+ * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise.
+ * sysdeps/generic/ldsodefs.h: Declare _dl_random.
+ * elf/rtld.c (security_init): Pass _dl_random to
+ _dl_setup_stack_chk_guard. Call _dl_setup_pointer_guard to initialize
+ pointer_chk_guard.
+ * elf/dl-sysdep.c (_dl_random): New variable.
+ (_dl_sysdep_start): Handle AT_RANDOM.
+ (_dl_show_auxv): Likewise.
+ * elf/dl-support.c (_dl_random): New variable.
+ (_dl_aux_init): Handle AT_RANDOM.
+ * csu/libc-start.c [!SHARED] (libc_start_main): Pass _dl_random
+ to _dl_setup_stack_chk_guard.
+
+ * elf/elf.h (AT_RANDOM): Define AT_BASE_PLATFORM and AT_RANDOM.
+
+2009-01-10 Roland McGrath <roland@xxxxxxxxxx>
+
+ * nscd/nscd.c (parse_opt): Use argp_error for bad -i argument.
+
+2009-01-08 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/i386/fpu/libm-test-ulps: Adjust expm1 errors.
+
+ [BZ #9706]
+ * nss/nss_files/files-parse.c (strtou32): New function.
+ (INT_FIELD): Use strotu32 instead of strtoul to unify behavior
+ across 32-bit and 64-bit platforms.
+ (INT_FIELD_MAYBE_NULL): Likewise.
+
+2009-01-08 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ [BZ #9720]
+ * sysdeps/unix/sysv/linux/bits/resource.h (enum __rusage_who): Avoid
+ comma after RUSAGE_CHILDREN if not -D_GNU_SOURCE.
+ * sysdeps/unix/sysv/linux/sparc/bits/resource.h (enum __rusage_who):
+ Likewise.
+
+2009-01-05 Paolo Bonzini <bonzini@xxxxxxx>
+
+ [BZ #697]
+ * posix/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
+ being NULL also if there are no backreferences.
+ * posix/rxspencer/tests: Add testcases.
+
+2009-01-04 Paolo Bonzini <bonzini@xxxxxxx>
+
+ [BZ #9697]
+ * posix/bug-regex17.c: Add testcases.
+ * posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
+ handling.
+
+2009-01-05 Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/s390/bits/libc-vdso.h: New file.
+ * sysdeps/unix/sysv/linux/s390/gettimeofday.c: New file.
+ * sysdeps/unix/sysv/linux/s390/init-first.c: New file.
+ * sysdeps/unix/sysv/linux/s390/Makefile (sysdep_routines): Add dl-vdso
+ for elf subdir.
+ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INLINE_VSYSCALL,
+ INTERNAL_VSYSCALL, INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK,
+ INTERNAL_SYSCALL_NCS, HAVE_CLOCK_GETRES_VSYSCALL and
+ HAVE_CLOCK_GETTIME_VSYSCALL: Define.
+ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/Versions: New file.
+
+2008-12-31 Paolo Bonzini <bonzini@xxxxxxx>
+
+ * posix/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
+ * posix/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
+ re_string_skip_chars, re_string_reconstruct): Likewise.
+ * posix/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
+
+2008-12-31 Rafael Avila de Espindola <espindola@xxxxxxxxxx>
+
+ * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr2_r): Check and
+ adjust the buffer alignment.
+
+>>>>>>> 1.11443
+2009-01-07 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ * sysdeps/mach/hurd/Makefile (sysdep_headers) [subdir=socket]:
+ Add net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h
+ net/route.h.
+
+ * hurd/report-wait.c (describe_number): Use __stpcpy to prepend
+ flavor to description only when flavor is not NULL.
+
+ * hurd/hurdsig.c (signal_allowed): Unlock _hurd_dtable_lock
+ mutex after SIGIO/SIGURG lookup loop.
+
+2009-01-03 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ * bits/resource.h (PRIO_PROCESS, PRIO_PGRP, PRIO_USER): Add macros.
+
+2009-01-03 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/sysdep.h: Describe 6th argument
+ handling.
+
+2009-01-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_FUTEX_CLOCK_REALTIME): Define.
+
+ * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Create temporary state object
+ if no output is written.
+
+ * version.h: Bump to 2.10 development.
+
+ * posix/getconf.c: Update copyright year.
+ * nss/getent.c: Likewise.
+ * iconv/iconvconfig.c: Likewise.
+ * iconv/iconv_prog.c: Likewise.
+ * elf/ldconfig.c: Likewise.
+ * catgets/gencat.c: Likewise.
+ * csu/version.c: Likewise.
+ * elf/ldd.bash.in: Likewise.
+ * elf/sprof.c (print_version): Likewise.
+ * locale/programs/locale.c: Likewise.
+ * locale/programs/localedef.c: Likewise.
+ * nscd/nscd.c (print_version): Likewise.
+ * debug/xtrace.sh: Likewise.
+ * malloc/memusage.sh: Likewise.
+ * malloc/mtrace.pl: Likewise.
+ * debug/catchsegv.sh: Likewise.
+
+2008-12-29 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * iconvdata/Makefile (iconv-rules): Use LC_ALL=C when running awk
+ script.
+
+2008-12-29 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): When the
+ gethostbyname4_r function call succeeded, just leave the loop.
+
+ [BZ #9694]
+ * wcsmbs/wchar.h: Move undefs for local __need_* constants to the
+ very end.
+ * wctype/wctype.h: Get wint_t definition directly from <stddef.h>.
+ * wctype/Makefile (tests): Add bug-wctypeh.
+ * wctype/bug-wctypeh.c: New file.
+
+ * nscd/nscd_gethst_r.c (nscd_gethst_r): Don't use nscd if
+ LOCALDOMAIN is defined.
+ * nscd/nscd_getai.c (__nscd_getai): Likewise.
+
+ * sysdeps/x86_64/bits/select.h: New file.
+
+ * resolv/res_init.c (__res_vinit): Count all servers in statp->nscount.
+
+2008-12-21 Bruno Haible <bruno@xxxxxxxxx>
+
+ [BZ #9677]
+ * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Create temporary state object
+ if no output is written.
+
+2008-12-13 Klaus Dittrich <kladit@xxxxxxxx>
+
+ * login/utmp_file.c (pututline_file): Replace call to dup2 with
+ libc internal symbol __dup2 to avoid access through the PLT.
+
2008-12-08 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #6545]
Modified: trunk/libc/bits/resource.h
==============================================================================
--- trunk/libc/bits/resource.h (original)
+++ trunk/libc/bits/resource.h Mon Jan 19 09:43:22 2009
@@ -185,6 +185,9 @@
enum __priority_which
{
PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
};
Modified: trunk/libc/catgets/gencat.c
==============================================================================
--- trunk/libc/catgets/gencat.c (original)
+++ trunk/libc/catgets/gencat.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
@@ -250,7 +250,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/csu/libc-start.c
==============================================================================
--- trunk/libc/csu/libc-start.c (original)
+++ trunk/libc/csu/libc-start.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2006, 2007, 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
@@ -140,7 +140,7 @@
__pthread_initialize_minimal ();
/* Set up the stack checker's canary. */
- uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+ uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random);
# ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
# else
Modified: trunk/libc/csu/version.c
==============================================================================
--- trunk/libc/csu/version.c (original)
+++ trunk/libc/csu/version.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1992-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
@@ -25,7 +25,7 @@
static const char banner[] =
"GNU C Library "PKGVERSION RELEASE" release version "VERSION", by Roland McGrath et al.\n\
-Copyright (C) 2008 Free Software Foundation, Inc.\n\
+Copyright (C) 2009 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n\
Modified: trunk/libc/debug/catchsegv.sh
==============================================================================
--- trunk/libc/debug/catchsegv.sh (original)
+++ trunk/libc/debug/catchsegv.sh Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998,1999,2001,2003,2004,2006,2007,2008
+# Copyright (C) 1998,1999,2001,2003,2004,2006,2007,2008,2009
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -40,7 +40,7 @@
;;
--v | --ve | --ver | --vers | --versi | --versio | --version)
echo 'catchsegv @PKGVERSION@@VERSION@'
- echo 'Copyright (C) 2008 Free Software Foundation, Inc.
+ echo 'Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.'
Modified: trunk/libc/debug/xtrace.sh
==============================================================================
--- trunk/libc/debug/xtrace.sh (original)
+++ trunk/libc/debug/xtrace.sh Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
#! @BASH@
-# Copyright (C) 1999, 2001-2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001-2008, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1999.
@@ -64,7 +64,7 @@
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-" "2008"
+" "2009"
printf $"Written by %s.
" "Ulrich Drepper"
exit 0
Modified: trunk/libc/elf/dl-support.c
==============================================================================
--- trunk/libc/elf/dl-support.c (original)
+++ trunk/libc/elf/dl-support.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Support for dynamic linking code in static libc.
- Copyright (C) 1996-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1996-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
@@ -84,6 +84,9 @@
int _dl_starting_up = 1;
#endif
+/* Random data provided by the kernel. */
+void *_dl_random;
+
/* Get architecture specific initializer. */
#include <dl-procinfo.c>
@@ -215,6 +218,9 @@
seen = -1;
__libc_enable_secure = av->a_un.a_val;
__libc_enable_secure_decided = 1;
+ break;
+ case AT_RANDOM:
+ _dl_random = (void *) av->a_un.a_val;
break;
# ifdef DL_PLATFORM_AUXV
DL_PLATFORM_AUXV
Modified: trunk/libc/elf/dl-sysdep.c
==============================================================================
--- trunk/libc/elf/dl-sysdep.c (original)
+++ trunk/libc/elf/dl-sysdep.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Operating system support for run-time dynamic linker. Generic Unix version.
- Copyright (C) 1995-1998, 2000-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-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
@@ -62,6 +62,7 @@
void *__libc_stack_end attribute_relro = NULL;
rtld_hidden_data_def(__libc_stack_end)
static ElfW(auxv_t) *_dl_auxv attribute_relro;
+void *_dl_random attribute_relro = NULL;
#ifndef DL_FIND_ARG_COMPONENTS
# define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
@@ -173,6 +174,9 @@
GLRO(dl_sysinfo_dso) = (void *) av->a_un.a_val;
break;
#endif
+ case AT_RANDOM:
+ _dl_random = (void *) av->a_un.a_val;
+ break;
#ifdef DL_PLATFORM_AUXV
DL_PLATFORM_AUXV
#endif
@@ -294,6 +298,7 @@
[AT_SECURE - 2] = { "AT_SECURE: ", dec },
[AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex },
[AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex },
+ [AT_RANDOM - 2] = { "AT_RANDOM: 0x", hex },
};
unsigned int idx = (unsigned int) (av->a_type - 2);
Modified: trunk/libc/elf/elf.h
==============================================================================
--- trunk/libc/elf/elf.h (original)
+++ trunk/libc/elf/elf.h Mon Jan 19 09:43:22 2009
@@ -971,6 +971,10 @@
#define AT_IGNOREPPC 22 /* Entry should be ignored. */
#define AT_SECURE 23 /* Boolean, was exec setuid-like? */
+
+#define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/
+
+#define AT_RANDOM 25 /* Address of 16 random bytes. */
#define AT_EXECFN 31 /* Filename of executable. */
Modified: trunk/libc/elf/ldconfig.c
==============================================================================
--- trunk/libc/elf/ldconfig.c (original)
+++ trunk/libc/elf/ldconfig.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@xxxxxxx>, 1999.
@@ -299,7 +299,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"),
"Andreas Jaeger");
}
Modified: trunk/libc/elf/ldd.bash.in
==============================================================================
--- trunk/libc/elf/ldd.bash.in (original)
+++ trunk/libc/elf/ldd.bash.in Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
#! @BASH@
-# Copyright (C) 1996-2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1996-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
@@ -39,7 +39,7 @@
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-" "2008"
+" "2009"
printf $"Written by %s and %s.
" "Roland McGrath" "Ulrich Drepper"
exit 0
Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Run time dynamic linker.
- Copyright (C) 1995-2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-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
@@ -841,7 +841,7 @@
security_init (void)
{
/* Set up the stack checker's canary. */
- uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+ uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random);
#ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
#else
@@ -851,18 +851,18 @@
/* Set up the pointer guard as well, if necessary. */
if (GLRO(dl_pointer_guard))
{
- // XXX If it is cheap, we should use a separate value.
- uintptr_t pointer_chk_guard = stack_chk_guard;
-#ifndef HP_TIMING_NONAVAIL
- hp_timing_t now;
- HP_TIMING_NOW (now);
- pointer_chk_guard ^= now;
-#endif
+ uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
+ stack_chk_guard);
#ifdef THREAD_SET_POINTER_GUARD
THREAD_SET_POINTER_GUARD (pointer_chk_guard);
#endif
__pointer_chk_guard_local = pointer_chk_guard;
}
+
+ /* We do not need the _dl_random value anymore. The less
+ information we leave behind, the better, so clear the
+ variable. */
+ _dl_random = NULL;
}
Modified: trunk/libc/elf/sprof.c
==============================================================================
--- trunk/libc/elf/sprof.c (original)
+++ trunk/libc/elf/sprof.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Read and display shared object profiling data.
- Copyright (C) 1997-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -357,7 +357,7 @@
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"),
- "2008");
+ "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/hurd/hurdsig.c
==============================================================================
--- trunk/libc/hurd/hurdsig.c (original)
+++ trunk/libc/hurd/hurdsig.c Mon Jan 19 09:43:22 2009
@@ -1134,6 +1134,7 @@
}
_hurd_port_free (&_hurd_dtable[d]->port, &ulink, port);
}
+ __mutex_unlock (&_hurd_dtable_lock);
/* If we found a lucky winner, we've set D to -1 in the loop. */
if (lucky)
goto win;
Modified: trunk/libc/hurd/report-wait.c
==============================================================================
--- trunk/libc/hurd/report-wait.c (original)
+++ trunk/libc/hurd/report-wait.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Report on what a thread in our task is waiting for.
- Copyright (C) 1996,1997,1999,2002,2005 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2002,2005,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
@@ -30,7 +30,7 @@
describe_number (string_t description, const char *flavor, long int i)
{
unsigned long int j;
- char *p = flavor ? description : __stpcpy (description, flavor);
+ char *p = flavor == NULL ? description : __stpcpy (description, flavor);
char *end;
/* Handle sign. */
Modified: trunk/libc/iconv/iconv_prog.c
==============================================================================
--- trunk/libc/iconv/iconv_prog.c (original)
+++ trunk/libc/iconv/iconv_prog.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Convert text in given files from the specified from-set to the to-set.
- Copyright (C) 1998-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -435,7 +435,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/iconv/iconvconfig.c
==============================================================================
--- trunk/libc/iconv/iconvconfig.c (original)
+++ trunk/libc/iconv/iconvconfig.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Generate fastloading iconv module configuration files.
- Copyright (C) 2000-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2000.
@@ -399,7 +399,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/iconvdata/Makefile
==============================================================================
--- trunk/libc/iconvdata/Makefile (original)
+++ trunk/libc/iconvdata/Makefile Mon Jan 19 09:43:22 2009
@@ -290,6 +290,7 @@
{ echo $(filter-out lib%, $(modules-y)); \
echo 8bit $(gen-8bit-modules); \
echo 8bit-gap $(gen-8bit-gap-modules); } | \
+ LC_ALL=C \
$(AWK) 'NR == 1 { \
for (i = 1; i <= NF; i++) { \
printf "%s-routines := %s\n", $$i, tolower($$i); \
Modified: trunk/libc/locale/programs/locale.c
==============================================================================
--- trunk/libc/locale/programs/locale.c (original)
+++ trunk/libc/locale/programs/locale.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Implementation of the locale program according to POSIX 9945-2.
- Copyright (C) 1995-1997, 1999-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 1999-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1995.
@@ -276,7 +276,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/locale/programs/localedef.c
==============================================================================
--- trunk/libc/locale/programs/localedef.c (original)
+++ trunk/libc/locale/programs/localedef.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1995.
@@ -407,7 +407,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Mon Jan 19 09:43:22 2009
@@ -1,3 +1,41 @@
+2009-01-08 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #9701]
+ * locales/sk_SK: Slovakia uses the Euro.
+
+ [BZ #9704]
+ * locales/mt_MT: Malta uses the Euro.
+
+ [BZ #9705]
+ * locales/el_CY: Cyprus uses the Euro.
+
+2008-12-31 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/iso14651_t1_common: Fix sorting of U+0AB3.
+ Patch by Pravin Satpute <psatpute@xxxxxxxxxx>.
+
+2008-12-30 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/i18n: Move Indic Matra characters to punct.
+ * locales/as_IN: Add support for internationalized digits.
+ * locales/bn_BD: Likewise.
+ * locales/bn_IN: Likewise.
+ * locales/gu_IN: Likewise.
+ * locales/hi_IN: Likewise.
+ * locales/kn_IN: Likewise.
+ * locales/ml_IN: Likewise.
+ * locales/mr_IN: Likewise.
+ * locales/or_IN: Likewise.
+ * locales/pa_IN: Likewise.
+ * locales/ta_IN: Likewise.
+ * locales/te_IN: Likewise.
+ Patch by Pravin Satpute <psatpute@xxxxxxxxxx>.
+
+2008-12-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * tests-mbwc/tst_types.h (TIN_MBRLEN_REC): Use correct array
+ length constant.
+
2008-12-05 Ulrich Drepper <drepper@xxxxxxxxxx>
* SUPPORTED (SUPPORTED-LOCALES): Add hne_IN.
Modified: trunk/libc/localedata/locales/as_IN
==============================================================================
--- trunk/libc/localedata/locales/as_IN (original)
+++ trunk/libc/localedata/locales/as_IN Mon Jan 19 09:43:22 2009
@@ -32,7 +32,7 @@
%%%%%%%%%%%%%
LC_CTYPE
-copy "i18n"
+copy "bn_IN"
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/bn_BD
==============================================================================
--- trunk/libc/localedata/locales/bn_BD (original)
+++ trunk/libc/localedata/locales/bn_BD Mon Jan 19 09:43:22 2009
@@ -37,7 +37,7 @@
END LC_COLLATE
LC_CTYPE
-copy "i18n"
+copy "bn_IN"
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/bn_IN
==============================================================================
--- trunk/libc/localedata/locales/bn_IN (original)
+++ trunk/libc/localedata/locales/bn_IN Mon Jan 19 09:43:22 2009
@@ -34,7 +34,28 @@
LC_CTYPE
-copy "bn_BD"
+copy "i18n"
+
+% Bengali uses the alternate digits U+09E6..U+09EF
+outdigit <U09E6>..<U09EF>
+
+% This is used in the scanf family of functions to read Bengali numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U09E6>); /
+ (<U0031>,<U09E7>); /
+ (<U0032>,<U09E8>); /
+ (<U0033>,<U09E9>); /
+ (<U0034>,<U09EA>); /
+ (<U0035>,<U09EB>); /
+ (<U0036>,<U09EC>); /
+ (<U0037>,<U09ED>); /
+ (<U0038>,<U09EE>); /
+ (<U0039>,<U09EF>);
+
+translit_start
+include "translit_combining";""
+translit_end
END LC_CTYPE
Modified: trunk/libc/localedata/locales/el_CY
==============================================================================
--- trunk/libc/localedata/locales/el_CY (original)
+++ trunk/libc/localedata/locales/el_CY Mon Jan 19 09:43:22 2009
@@ -44,8 +44,8 @@
END LC_MESSAGES
LC_MONETARY
-int_curr_symbol "<U0043><U0059><U0050><U0020>"
-currency_symbol "<U00A3>"
+int_curr_symbol "<U0045><U0055><U0052><U0020>"
+currency_symbol "<U20AC>"
mon_decimal_point "<U002C>"
mon_thousands_sep "<U002E>"
mon_grouping 3
Modified: trunk/libc/localedata/locales/gu_IN
==============================================================================
--- trunk/libc/localedata/locales/gu_IN (original)
+++ trunk/libc/localedata/locales/gu_IN Mon Jan 19 09:43:22 2009
@@ -34,6 +34,23 @@
LC_CTYPE
copy "i18n"
+
+% Gujarati uses the alternate digits U+0AE6..U+0AEF
+outdigit <U0AE6>..<U0AEF>
+
+% This is used in the scanf family of functions to read Gujarati numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0AE6>); /
+ (<U0031>,<U0AE7>); /
+ (<U0032>,<U0AE8>); /
+ (<U0033>,<U0AE9>); /
+ (<U0034>,<U0AEA>); /
+ (<U0035>,<U0AEB>); /
+ (<U0036>,<U0AEC>); /
+ (<U0037>,<U0AED>); /
+ (<U0038>,<U0AEE>); /
+ (<U0039>,<U0AEF>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/hi_IN
==============================================================================
--- trunk/libc/localedata/locales/hi_IN (original)
+++ trunk/libc/localedata/locales/hi_IN Mon Jan 19 09:43:22 2009
@@ -32,7 +32,7 @@
END LC_IDENTIFICATION
LC_CTYPE
-copy "i18n"
+copy "mr_IN"
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/i18n
==============================================================================
--- trunk/libc/localedata/locales/i18n (original)
+++ trunk/libc/localedata/locales/i18n Mon Jan 19 09:43:22 2009
@@ -231,41 +231,55 @@
<U0780>..<U07A5>;<U07B1>;/
% NKO/
<U07C0>..<U07EA>;<U07F4>..<U07F5>;<U07FA>;/
+% - All Matras of Indic and Sinhala are moved from punct to alpha class/
+% - Added Unicode 5.1 charctares of Indic scripts/
% DEVANAGARI/
- <U0904>..<U0939>;<U093D>;<U0950>;<U0958>..<U0961>;/
- <U097B>..<U097F>;/
+ <U0901>..<U0939>;<U093C>..<U094D>;/
+ <U0950>..<U0954>;<U0958>..<U0961>;/
+ <U0962>;<U0963>;<U0972>;<U097B>..<U097F>;/
% TABLE 18 BENGALI/
- <U0985>..<U098C>;<U098F>;<U0990>;<U0993>..<U09A8>;<U09AA>..<U09B0>;/
- <U09B2>;<U09B6>..<U09B9>;<U09BD>;<U09CE>;<U09DC>;<U09DD>;<U09DF>..<U09E1>;/
- <U09F0>..<U09F1>;/
+ <U0981>..<U0983>;<U0985>..<U098C>;<U098F>;<U0990>;<U0993>..<U09A8>;/
+ <U09AA>..<U09B0>;<U09B2>;<U09B6>..<U09B9>;<U09BC>..<U09C4>;/
+ <U09C7>;<U09C8>;<U09CB>..<U09CE>;<U09D7>;/
+ <U09DC>;<U09DD>;<U09DF>..<U09E3>;<U09F0>..<U09FA>;/
% GURMUKHI/
- <U0A05>..<U0A0A>;<U0A0F>;<U0A10>;<U0A13>..<U0A28>;<U0A2A>..<U0A30>;/
- <U0A32>;<U0A33>;<U0A35>;<U0A36>;<U0A38>;<U0A39>;<U0A59>..<U0A5C>;/
- <U0A5E>;<U0A72>..<U0A74>;/
+ <U0A01>..<U0A03>;<U0A05>..<U0A0A>;<U0A0F>;<U0A10>;<U0A13>..<U0A28>;/
+ <U0A2A>..<U0A30>;<U0A32>;<U0A33>;<U0A35>;<U0A36>;<U0A38>;<U0A39>;/
+ <U0A3C>;<U0A3E>..<U0A42>;<U0A47>;<U0A48>;<U0A4B>..<U0A4D>;<U0A51>;/
+ <U0A59>..<U0A5C>;<U0A5E>;<U0A70>..<U0A75>;/
% GUJARATI/
+ <U0A81>..<U0A83>;/
<U0A85>..<U0A8D>;<U0A8F>..<U0A91>;<U0A93>..<U0AA8>;/
- <U0AAA>..<U0AB0>;<U0AB2>;<U0AB3>;<U0AB5>..<U0AB9>;<U0ABD>;<U0AD0>;/
- <U0AE0>;<U0AE1>;/
+ <U0AAA>..<U0AB0>;<U0AB2>;<U0AB3>;<U0AB5>..<U0AB9>;<U0ABC>..<U0AC5>;/
+ <U0AC7>..<U0AC9>;<U0ACB>..<U0ACD>;/
+ <U0AD0>;<U0AE0>..<U0AE3>;<U0AF1>;/
% ORIYA/
- <U0B05>..<U0B0C>;<U0B0F>;<U0B10>;<U0B13>..<U0B28>;<U0B2A>..<U0B30>;/
- <U0B32>;<U0B33>;<U0B35>..<U0B39>;<U0B3D>;<U0B5C>;<U0B5D>;/
- <U0B5F>..<U0B63>;<U0B71>;/
+ <U0B01>..<U0B03>;<U0B05>..<U0B0C>;<U0B0F>;<U0B10>;<U0B13>..<U0B28>;/
+ <U0B2A>..<U0B30>;<U0B32>;<U0B33>;<U0B35>..<U0B39>;<U0B3C>..<U0B44>;/
+ <U0B47>..<U0B48>;<U0B4B>..<U0B4D>;<U0B56>..<U0B57>;<U0B5C>;<U0B5D>;/
+ <U0B5F>..<U0B63>;<U0B70>;<U0B71>;/
% TAMIL/
- <U0B83>;<U0B85>..<U0B8A>;<U0B8E>..<U0B90>;<U0B92>..<U0B95>;<U0B99>;/
+ <U0B82>;<U0B83>;<U0B85>..<U0B8A>;<U0B8E>..<U0B90>;<U0B92>..<U0B95>;<U0B99>;/
<U0B9A>;<U0B9C>;<U0B9E>;<U0B9F>;<U0BA3>;<U0BA4>;<U0BA8>..<U0BAA>;/
- <U0BAE>..<U0BB9>;/
+ <U0BAE>..<U0BB9>;<U0BBE>..<U0BC2>;<U0BC6>..<U0BC8>;<U0BCA>..<U0BCD>;/
+ <U0BD0>;<U0BD7>;<U0BF0>..<U0BFA>;/
% TELUGU/
- <U0C05>..<U0C0C>;<U0C0E>..<U0C10>;<U0C12>..<U0C28>;<U0C2A>..<U0C33>;/
- <U0C35>..<U0C39>;<U0C3D>;<U0C58>..<U0C59>;<U0C60>..<U0C63>;/
+ <U0C01>..<U0C03>;<U0C05>..<U0C0C>;<U0C0E>..<U0C10>;<U0C12>..<U0C28>;/
+ <U0C2A>..<U0C33>;<U0C35>..<U0C39>;<U0C3D>..<U0C44>;<U0C46>..<U0C48>;/
+ <U0C4A>..<U0C4D>;<U0C55>..<U0C56>;<U0C58>..<U0C59>;<U0C60>..<U0C63>;/
% KANNADA/
- <U0C85>..<U0C8C>;<U0C8E>..<U0C90>;<U0C92>..<U0CA8>;<U0CAA>..<U0CB3>;/
- <U0CB5>..<U0CB9>;<U0CDE>;<U0CE0>..<U0CE1>;/
+ <U0C82>..<U0C83>;<U0C85>..<U0C8C>;<U0C8E>..<U0C90>;<U0C92>..<U0CA8>;/
+ <U0CAA>..<U0CB3>;<U0CB5>..<U0CB9>;<U0CBC>..<U0CC4>;<U0CC6>..<U0CC8>;<U0CCA>..<U0CCD>;/
+ <U0CD5>..<U0CD6>;<U0CDE>;<U0CE0>..<U0CE3>;<U0CF1>;<U0CF2>;/
% MALAYALAM/
- <U0D05>..<U0D0C>;<U0D0E>..<U0D10>;<U0D12>..<U0D28>;<U0D2A>..<U0D39>;/
- <U0D3D>;<U0D60>..<U0D63>;/
+ <U0D02>..<U0D03>;<U0D05>..<U0D0C>;<U0D0E>..<U0D10>;<U0D12>..<U0D28>;/
+ <U0D2A>..<U0D39>;<U0D3D>..<U0D44>;/
+ <U0D46>..<U0D48>;<U0D4A>..<U0D4D>;<U0D57>;/
+ <U0D60>..<U0D63>;<U0D79>..<U0D7F>;/
% SINHALA/
- <U0D85>..<U0D96>;<U0D9A>..<U0DB1>;<U0DB3>..<U0DBB>;<U0DBD>;/
- <U0DC0>..<U0DC6>;/
+ <U0D82>..<U0D83>;<U0D85>..<U0D96>;<U0D9A>..<U0DB1>;<U0DB3>..<U0DBB>;<U0DBD>;/
+ <U0DC0>..<U0DC6>;<U0DCA>;/
+ <U0DCF>..<U0DD4>;<U0DD6>;<U0DD8>..<U0DDF>;<U0DF2>..<U0DF4>;/
% THAI/
<U0E01>..<U0E2E>;<U0E30>..<U0E3A>;<U0E40>..<U0E45>;<U0E47>..<U0E4E>;/
% LAO/
@@ -496,7 +510,7 @@
% KANNADA/
<U0CE6>..<U0CEF>;/
% MALAYALAM/
- <U0D66>..<U0D75>;<U0D79>..<U0D7F>;/
+ <U0D66>..<U0D75>;<U0D70>..<U0D75>;/
% THAI/
<U0E50>..<U0E59>;/
% LAO/
@@ -566,22 +580,8 @@
<U064B>..<U065E>;<U066A>..<U066D>;<U0670>;<U06D4>;<U06D6>..<U06E4>;/
<U06E7>..<U06ED>;<U06FD>..<U06FE>;<U0700>..<U070D>;<U070F>;<U0711>;/
<U0730>..<U074A>;<U07A6>..<U07B0>;<U07EB>..<U07F3>;<U07F6>..<U07F9>;/
- <U0901>..<U0903>;<U093C>;<U093E>..<U094D>;<U0951>..<U0954>;/
- <U0962>..<U0965>;<U0972>;<U0981>..<U0983>;<U09BC>;<U09BE>..<U09C4>;/
- <U09C7>..<U09C8>;<U09CB>..<U09CD>;<U09D7>;<U09E2>..<U09E3>;/
- <U09F2>..<U09FA>;<U0A01>..<U0A03>;<U0A3C>;<U0A3E>..<U0A42>;/
- <U0A47>..<U0A48>;<U0A4B>..<U0A4D>;<U0A51>;<U0A70>..<U0A71>;/
- <U0A75>;<U0A81>..<U0A83>;/
- <U0ABC>;<U0ABE>..<U0AC5>;<U0AC7>..<U0AC9>;<U0ACB>..<U0ACD>;/
- <U0AE2>..<U0AE3>;<U0AF1>;<U0B01>..<U0B03>;<U0B3C>;<U0B3E>..<U0B44>;/
- <U0B47>..<U0B48>;<U0B4B>..<U0B4D>;<U0B56>..<U0B57>;<U0B70>;<U0B82>;/
- <U0BBE>..<U0BC2>;<U0BC6>..<U0BC8>;<U0BCA>..<U0BCD>;<U0BD0>;<U0BD7>;/
- <U0BF0>..<U0BFA>;<U0C01>..<U0C03>;<U0C3E>..<U0C44>;<U0C46>..<U0C48>;/
- <U0C4A>..<U0C4D>;<U0C55>..<U0C56>;<U0C82>..<U0C83>;<U0CBC>;/
- <U0CBE>..<U0CC4>;<U0CC6>..<U0CC8>;<U0CCA>..<U0CCD>;<U0CD5>..<U0CD6>;/
- <U0CE2>..<U0CE3>;<U0CF1>..<U0CF2>;<U0D02>..<U0D03>;<U0D3E>..<U0D44>;/
- <U0D46>..<U0D48>;<U0D4A>..<U0D4D>;<U0D57>;<U0D82>..<U0D83>;<U0DCA>;/
- <U0DCF>..<U0DD4>;<U0DD6>;<U0DD8>..<U0DDF>;<U0DF2>..<U0DF4>;<U0E2F>;/
+ <U0964>;<U0965>;/
+ <U0E2F>;/
<U0E3F>;<U0E46>;<U0E4F>;<U0E5A>..<U0E5B>;<U0EB1>;<U0EB4>..<U0EB9>;/
<U0EBB>..<U0EBC>;<U0EC8>..<U0ECD>;<U0F01>..<U0F1F>;<U0F2A>..<U0F3F>;/
<U0F71>..<U0F87>;<U0F90>..<U0F97>;<U0F99>..<U0FBC>;<U0FBE>..<U0FCC>;/
Modified: trunk/libc/localedata/locales/iso14651_t1_common
==============================================================================
--- trunk/libc/localedata/locales/iso14651_t1_common (original)
+++ trunk/libc/localedata/locales/iso14651_t1_common Mon Jan 19 09:43:22 2009
@@ -1465,12 +1465,12 @@
<g-ya>
<g-ra>
<g-la>
-<g-lla>
<g-va>
<g-sha>
<g-ssa>
<g-sa>
<g-ha>
+<g-lla>
<g-ksha>
<g-dnya>
<g-shra>
@@ -3666,12 +3666,12 @@
<U0AAF> <g-ya>;<BAS>;<MIN>;IGNORE
<U0AB0> <g-ra>;<BAS>;<MIN>;IGNORE
<U0AB2> <g-la>;<BAS>;<MIN>;IGNORE
-<U0AB3> <g-lla>;<BAS>;<MIN>;IGNORE
<U0AB5> <g-va>;<BAS>;<MIN>;IGNORE
<U0AB6> <g-sha>;<BAS>;<MIN>;IGNORE
<U0AB7> <g-ssa>;<BAS>;<MIN>;IGNORE
<U0AB8> <g-sa>;<BAS>;<MIN>;IGNORE
-<U0AB9> <g-ha>;<BAS>;<MIN>;IGNORE
+<U0AB9> <g-ha>;<BAS>;<MIN>;IGNORE
+<U0AB3> <g-lla>;<BAS>;<MIN>;IGNORE
<gu-ksha> <g-ksha>;<BAS>;<MIN>;IGNORE
<gu-dnya> <g-dnya>;<BAS>;<MIN>;IGNORE
<gu-shra> <g-shra>;<BAS>;<MIN>;IGNORE
Modified: trunk/libc/localedata/locales/kn_IN
==============================================================================
--- trunk/libc/localedata/locales/kn_IN (original)
+++ trunk/libc/localedata/locales/kn_IN Mon Jan 19 09:43:22 2009
@@ -35,6 +35,23 @@
LC_CTYPE
copy "i18n"
+
+% Kannada uses the alternate digits U+0CE6..U+0CEF
+outdigit <U0CE6>..<U0CEF>
+
+% This is used in the scanf family of functions to read Kannada numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0CE6>); /
+ (<U0031>,<U0CE7>); /
+ (<U0032>,<U0CE8>); /
+ (<U0033>,<U0CE9>); /
+ (<U0034>,<U0CEA>); /
+ (<U0035>,<U0CEB>); /
+ (<U0036>,<U0CEC>); /
+ (<U0037>,<U0CED>); /
+ (<U0038>,<U0CEE>); /
+ (<U0039>,<U0CEF>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/ml_IN
==============================================================================
--- trunk/libc/localedata/locales/ml_IN (original)
+++ trunk/libc/localedata/locales/ml_IN Mon Jan 19 09:43:22 2009
@@ -32,6 +32,24 @@
END LC_IDENTIFICATION
LC_CTYPE
copy "i18n"
+
+% Malayalam uses the alternate digits U+0D66..U+0D6F
+outdigit <U0D66>..<U0D6F>
+
+% This is used in the scanf family of functions to read Malayalam numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0D66>); /
+ (<U0031>,<U0D67>); /
+ (<U0032>,<U0D68>); /
+ (<U0033>,<U0D69>); /
+ (<U0034>,<U0D6A>); /
+ (<U0035>,<U0D6B>); /
+ (<U0036>,<U0D6C>); /
+ (<U0037>,<U0D6D>); /
+ (<U0038>,<U0D6E>); /
+ (<U0039>,<U0D6F>);
+
translit_start
include "translit_combining";""
translit_end
Modified: trunk/libc/localedata/locales/mr_IN
==============================================================================
--- trunk/libc/localedata/locales/mr_IN (original)
+++ trunk/libc/localedata/locales/mr_IN Mon Jan 19 09:43:22 2009
@@ -33,6 +33,23 @@
LC_CTYPE
copy "i18n"
+
+% Devanagari uses the alternate digits U+0966..U+096F
+outdigit <U0966>..<U096F>
+
+% This is used in the scanf family of functions to read devanagari numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0966>); /
+ (<U0031>,<U0967>); /
+ (<U0032>,<U0968>); /
+ (<U0033>,<U0969>); /
+ (<U0034>,<U096A>); /
+ (<U0035>,<U096B>); /
+ (<U0036>,<U096C>); /
+ (<U0037>,<U096D>); /
+ (<U0038>,<U096E>); /
+ (<U0039>,<U096F>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/mt_MT
==============================================================================
--- trunk/libc/localedata/locales/mt_MT (original)
+++ trunk/libc/localedata/locales/mt_MT Mon Jan 19 09:43:22 2009
@@ -131,8 +131,8 @@
% These are generated based on XML base Locale defintion file
% for IBM Class for Unicode.
%
-int_curr_symbol "<U004D><U0054><U004C><U0020>"
-currency_symbol "<U004C><U006D>"
+int_curr_symbol "<U0045><U0055><U0052><U0020>"
+currency_symbol "<U20AC>"
mon_decimal_point "<U002E>"
mon_thousands_sep "<U002C>"
mon_grouping 3
@@ -140,9 +140,9 @@
negative_sign "<U002D>"
int_frac_digits 2
frac_digits 2
-p_cs_precedes 1
+p_cs_precedes 0
p_sep_by_space 0
-n_cs_precedes 1
+n_cs_precedes 0
n_sep_by_space 0
p_sign_posn 1
n_sign_posn 0
Modified: trunk/libc/localedata/locales/or_IN
==============================================================================
--- trunk/libc/localedata/locales/or_IN (original)
+++ trunk/libc/localedata/locales/or_IN Mon Jan 19 09:43:22 2009
@@ -34,6 +34,23 @@
%%%%%%%%%%%%%
LC_CTYPE
copy "i18n"
+
+% Oriya uses the alternate digits U+0B66..U+0B6F
+outdigit <U0B66>..<U0B6F>
+
+% This is used in the scanf family of functions to read Oriya numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0B66>); /
+ (<U0031>,<U0B67>); /
+ (<U0032>,<U0B68>); /
+ (<U0033>,<U0B69>); /
+ (<U0034>,<U0B6A>); /
+ (<U0035>,<U0B6B>); /
+ (<U0036>,<U0B6C>); /
+ (<U0037>,<U0B6D>); /
+ (<U0038>,<U0B6E>); /
+ (<U0039>,<U0B6F>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/pa_IN
==============================================================================
--- trunk/libc/localedata/locales/pa_IN (original)
+++ trunk/libc/localedata/locales/pa_IN Mon Jan 19 09:43:22 2009
@@ -31,7 +31,28 @@
END LC_IDENTIFICATION
LC_CTYPE
-copy "pa_PK"
+copy "i18n"
+
+% Punjabi uses the alternate digits U+0A66..U+0A6F
+outdigit <U0A66>..<U0A6F>
+
+% This is used in the scanf family of functions to read Punjabi numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0A66>); /
+ (<U0031>,<U0A67>); /
+ (<U0032>,<U0A68>); /
+ (<U0033>,<U0A69>); /
+ (<U0034>,<U0A6A>); /
+ (<U0035>,<U0A6B>); /
+ (<U0036>,<U0A6C>); /
+ (<U0037>,<U0A6D>); /
+ (<U0038>,<U0A6E>); /
+ (<U0039>,<U0A6F>);
+
+translit_start
+include "translit_combining";""
+translit_end
END LC_CTYPE
Modified: trunk/libc/localedata/locales/sk_SK
==============================================================================
--- trunk/libc/localedata/locales/sk_SK (original)
+++ trunk/libc/localedata/locales/sk_SK Mon Jan 19 09:43:22 2009
@@ -91,8 +91,8 @@
LC_MONETARY
-int_curr_symbol "<U0053><U004B><U004B><U0020>"
-currency_symbol "<U0053><U006B>"
+int_curr_symbol "<U0045><U0055><U0052><U0020>"
+currency_symbol "<U20AC>"
mon_decimal_point "<U002C>"
mon_thousands_sep "<U00A0>"
mon_grouping 3;3
Modified: trunk/libc/localedata/locales/ta_IN
==============================================================================
--- trunk/libc/localedata/locales/ta_IN (original)
+++ trunk/libc/localedata/locales/ta_IN Mon Jan 19 09:43:22 2009
@@ -36,6 +36,23 @@
LC_CTYPE
copy "i18n"
+
+% Tamil uses the alternate digits U+0BE6..U+0BEF
+outdigit <U0BE6>..<U0BEF>
+
+% This is used in the scanf family of functions to read Tamil numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0BE6>); /
+ (<U0031>,<U0BE7>); /
+ (<U0032>,<U0BE8>); /
+ (<U0033>,<U0BE9>); /
+ (<U0034>,<U0BEA>); /
+ (<U0035>,<U0BEB>); /
+ (<U0036>,<U0BEC>); /
+ (<U0037>,<U0BED>); /
+ (<U0038>,<U0BEE>); /
+ (<U0039>,<U0BEF>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/locales/te_IN
==============================================================================
--- trunk/libc/localedata/locales/te_IN (original)
+++ trunk/libc/localedata/locales/te_IN Mon Jan 19 09:43:22 2009
@@ -35,6 +35,23 @@
LC_CTYPE
copy "i18n"
+
+% Telugu uses the alternate digits U+0C66..U+0C6F
+outdigit <U0C66>..<U0C6F>
+
+% This is used in the scanf family of functions to read Telugu numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0C66>); /
+ (<U0031>,<U0C67>); /
+ (<U0032>,<U0C68>); /
+ (<U0033>,<U0C69>); /
+ (<U0034>,<U0C6A>); /
+ (<U0035>,<U0C6B>); /
+ (<U0036>,<U0C6C>); /
+ (<U0037>,<U0C6D>); /
+ (<U0038>,<U0C6E>); /
+ (<U0039>,<U0C6F>);
translit_start
include "translit_combining";""
Modified: trunk/libc/localedata/tests-mbwc/tst_types.h
==============================================================================
--- trunk/libc/localedata/tests-mbwc/tst_types.h (original)
+++ trunk/libc/localedata/tests-mbwc/tst_types.h Mon Jan 19 09:43:22 2009
@@ -122,7 +122,7 @@
int t_flg;
int t_init;
}
- seq[WCSTOK_SEQNUM];
+ seq[MBRLEN_SEQNUM];
}
TIN_MBRLEN_REC;
Modified: trunk/libc/login/utmp_file.c
==============================================================================
--- trunk/libc/login/utmp_file.c (original)
+++ trunk/libc/login/utmp_file.c Mon Jan 19 09:43:22 2009
@@ -437,7 +437,7 @@
#endif
if (__lseek64 (new_fd, __lseek64 (file_fd, 0, SEEK_CUR), SEEK_SET) == -1
- || dup2 (new_fd, file_fd) < 0)
+ || __dup2 (new_fd, file_fd) < 0)
{
close_not_cancel_no_status (new_fd);
return NULL;
Modified: trunk/libc/malloc/memusage.sh
==============================================================================
--- trunk/libc/malloc/memusage.sh (original)
+++ trunk/libc/malloc/memusage.sh Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
#! @BASH@
-# Copyright (C) 1999-2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1999-2008, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1999.
@@ -72,7 +72,7 @@
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-" "2008"
+" "2009"
printf $"Written by %s.
" "Ulrich Drepper"
exit 0
Modified: trunk/libc/malloc/mtrace.pl
==============================================================================
--- trunk/libc/malloc/mtrace.pl (original)
+++ trunk/libc/malloc/mtrace.pl Mon Jan 19 09:43:22 2009
@@ -1,7 +1,7 @@
#! @PERL@
eval "exec @PERL@ -S $0 $@"
if 0;
-# Copyright (C) 1997-2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1997-2008, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1997.
# Based on the mtrace.awk script.
@@ -46,7 +46,7 @@
$ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" ||
$ARGV[0] eq "--versio" || $ARGV[0] eq "--version") {
print "mtrace $PKGVERSION$VERSION\n";
- print "Copyright (C) 2008 Free Software Foundation, Inc.\n";
+ print "Copyright (C) 2009 Free Software Foundation, Inc.\n";
print "This is free software; see the source for copying conditions. There is NO\n";
print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
print "Written by Ulrich Drepper <drepper\@gnu.org>\n";
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Mon Jan 19 09:43:22 2009
@@ -1,3 +1,60 @@
+2009-01-08 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/pthread/list.h (list_add): Initialize new element first.
+ (list_add_tail): Removed.
+
+2009-01-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * init.c (__pthread_initialize_minimal_internal): Optimize test
+ FUTEX_CLOCK_REALTIME a bit.
+
+2009-01-03 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
+ only passing five parameters to FUTEX_WAIT_BITSET call.
+
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+ (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
+ instead of computing relative timeout.
+
+2009-01-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * init.c (__pthread_initialize_minimal_internal): Check for
+ FUTEX_CLOCK_REALTIME flag.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
+ Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
+ relative timeout.
+
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
+ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
+ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
+
+2008-12-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
+ loop body instead of ; to avoid gcc warnings.
+ (pthread_cleanup_pop_restore_np): Likewise.
+ Patch by Caolán McNamara <caolanm@xxxxxxxxxx>.
+
+2008-12-09 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
+ fast path here, for robust/PI/PP mutexes call
+ __pthread_mutex_lock_full. Don't use switch, instead use a series
+ of ifs according to their probability.
+ (__pthread_mutex_lock_full): New function.
+ * pthread_mutex_unlock.c: Include assert.h.
+ (__pthread_mutex_unlock_usercnt): Handle only the
+ fast path here, for robust/PI/PP mutexes call
+ __pthread_mutex_unlock_full. Don't use switch, instead use a series
+ of ifs according to their probability.
+ (__pthread_mutex_unlock_full): New function.
+ * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
+ (__pthread_mutex_lock_full): Define.
+
2008-12-08 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
Modified: trunk/libc/nptl/allocatestack.c
==============================================================================
--- trunk/libc/nptl/allocatestack.c (original)
+++ trunk/libc/nptl/allocatestack.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -112,6 +112,11 @@
/* List of the stacks in use. */
static LIST_HEAD (stack_used);
+/* We need to record what list operations we are going to do so that,
+ in case of an asynchronous interruption due to a fork() call, we
+ can correct for the work. */
+static uintptr_t in_flight_stack;
+
/* List of the threads with user provided stacks in use. No need to
initialize this, since it's done in __pthread_initialize_minimal. */
list_t __stack_user __attribute__ ((nocommon));
@@ -125,6 +130,36 @@
/* Check whether the stack is still used or not. */
#define FREE_P(descr) ((descr)->tid <= 0)
+
+
+static void
+stack_list_del (list_t *elem)
+{
+ in_flight_stack = (uintptr_t) elem;
+
+ atomic_write_barrier ();
+
+ list_del (elem);
+
+ atomic_write_barrier ();
+
+ in_flight_stack = 0;
+}
+
+
+static void
+stack_list_add (list_t *elem, list_t *list)
+{
+ in_flight_stack = (uintptr_t) elem | 1;
+
+ atomic_write_barrier ();
+
+ list_add (elem, list);
+
+ atomic_write_barrier ();
+
+ in_flight_stack = 0;
+}
/* We create a double linked list of all cache entries. Double linked
@@ -179,10 +214,10 @@
}
/* Dequeue the entry. */
- list_del (&result->list);
+ stack_list_del (&result->list);
/* And add to the list of stacks in use. */
- list_add (&result->list, &stack_used);
+ stack_list_add (&result->list, &stack_used);
/* And decrease the cache size. */
stack_cache_actsize -= result->stackblock_size;
@@ -230,7 +265,7 @@
if (FREE_P (curr))
{
/* Unlink the block. */
- list_del (entry);
+ stack_list_del (entry);
/* Account for the freed memory. */
stack_cache_actsize -= curr->stackblock_size;
@@ -260,7 +295,7 @@
/* We unconditionally add the stack to the list. The memory may
still be in use but it will not be reused until the kernel marks
the stack as not used anymore. */
- list_add (&stack->list, &stack_cache);
+ stack_list_add (&stack->list, &stack_cache);
stack_cache_actsize += stack->stackblock_size;
if (__builtin_expect (stack_cache_actsize > stack_cache_maxsize, 0))
@@ -547,7 +582,7 @@
lll_lock (stack_cache_lock, LLL_PRIVATE);
/* And add to the list of stacks in use. */
- list_add (&pd->list, &stack_used);
+ stack_list_add (&pd->list, &stack_used);
lll_unlock (stack_cache_lock, LLL_PRIVATE);
@@ -601,7 +636,7 @@
lll_lock (stack_cache_lock, LLL_PRIVATE);
/* Remove the thread from the list. */
- list_del (&pd->list);
+ stack_list_del (&pd->list);
lll_unlock (stack_cache_lock, LLL_PRIVATE);
@@ -703,7 +738,7 @@
/* Remove the thread from the list of threads with user defined
stacks. */
- list_del (&pd->list);
+ stack_list_del (&pd->list);
/* Not much to do. Just free the mmap()ed memory. Note that we do
not reset the 'used' flag in the 'tid' field. This is done by
@@ -776,7 +811,47 @@
{
struct pthread *self = (struct pthread *) THREAD_SELF;
- /* No locking necessary. The caller is the only stack in use. */
+ /* No locking necessary. The caller is the only stack in use. But
+ we have to be aware that we might have interrupted a list
+ operation. */
+
+ if (in_flight_stack != 0)
+ {
+ bool add_p = in_flight_stack & 1;
+ list_t *elem = (list_t *) (in_flight_stack & ~UINTMAX_C (1));
+
+ if (add_p)
+ {
+ /* We always add at the beginning of the list. So in this
+ case we only need to check the beginning of these lists. */
+ int check_list (list_t *l)
+ {
+ if (l->next->prev != l)
+ {
+ assert (l->next->prev == elem);
+
+ elem->next = l->next;
+ elem->prev = l;
+ l->next = elem;
+
+ return 1;
+ }
+
+ return 0;
+ }
+
+ if (check_list (&stack_used) == 0)
+ (void) check_list (&stack_cache);
+ }
+ else
+ {
+ /* We can simply always replay the delete operation. */
+ elem->next->prev = elem->prev;
+ elem->prev->next = elem->next;
+ }
+
+ in_flight_stack = 0;
+ }
/* Mark all stacks except the still running one as free. */
list_t *runp;
@@ -829,7 +904,7 @@
/* Remove the entry for the current thread to from the cache list
and add it to the list of running threads. Which of the two
lists is decided by the user_stack flag. */
- list_del (&self->list);
+ stack_list_del (&self->list);
/* Re-initialize the lists for all the threads. */
INIT_LIST_HEAD (&stack_used);
@@ -838,7 +913,7 @@
if (__builtin_expect (THREAD_GETMEM (self, user_stack), 0))
list_add (&self->list, &__stack_user);
else
- list_add (&self->list, &stack_used);
+ stack_list_add (&self->list, &stack_used);
/* There is one thread running. */
__nptl_nthreads = 1;
Modified: trunk/libc/nptl/init.c
==============================================================================
--- trunk/libc/nptl/init.c (original)
+++ trunk/libc/nptl/init.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <assert.h>
+#include <errno.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
@@ -47,6 +48,15 @@
__set_robust_list_avail = -1
#else
# define set_robust_list_not_avail() do { } while (0)
+#endif
+
+#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+/* Nonzero if we do not have FUTEX_CLOCK_REALTIME. */
+int __have_futex_clock_realtime;
+# define __set_futex_clock_realtime() \
+ __have_futex_clock_realtime = 1
+#else
+#define __set_futex_clock_realtime() do { } while (0)
#endif
/* Version of the library, used in libthread_db to detect mismatches. */
@@ -299,6 +309,28 @@
if (!INTERNAL_SYSCALL_ERROR_P (word, err))
THREAD_SETMEM (pd, header.private_futex, FUTEX_PRIVATE_FLAG);
}
+
+ /* Private futexes have been introduced earlier than the
+ FUTEX_CLOCK_REALTIME flag. We don't have to run the test if we
+ know the former are not supported. This also means we know the
+ kernel will return ENOSYS for unknown operations. */
+ if (THREAD_GETMEM (pd, header.private_futex) != 0)
+#endif
+#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+ {
+ int word = 0;
+ /* NB: the syscall actually takes six parameters. The last is the
+ bit mask. But since we will not actually wait at all the value
+ is irrelevant. Given that passing six parameters is difficult
+ on some architectures we just pass whatever random value the
+ calling convention calls for to the kernel. It causes no harm. */
+ word = INTERNAL_SYSCALL (futex, err, 5, &word,
+ FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME
+ | FUTEX_PRIVATE_FLAG, 1, NULL, 0);
+ assert (INTERNAL_SYSCALL_ERROR_P (word, err));
+ if (INTERNAL_SYSCALL_ERRNO (word, err) != ENOSYS)
+ __set_futex_clock_realtime ();
+ }
#endif
/* Set initial thread's stack block from 0 up to __libc_stack_end.
Modified: trunk/libc/nptl/pthread_mutex_lock.c
==============================================================================
--- trunk/libc/nptl/pthread_mutex_lock.c (original)
+++ trunk/libc/nptl/pthread_mutex_lock.c Mon Jan 19 09:43:22 2009
@@ -37,21 +37,34 @@
#endif
+static int __pthread_mutex_lock_full (pthread_mutex_t *mutex)
+ __attribute_noinline__;
+
+
int
__pthread_mutex_lock (mutex)
pthread_mutex_t *mutex;
{
assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
- int oldval;
+ unsigned int type = PTHREAD_MUTEX_TYPE (mutex);
+ if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
+ return __pthread_mutex_lock_full (mutex);
+
pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
- int retval = 0;
- switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
- PTHREAD_MUTEX_TIMED_NP))
+ if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP)
+ == PTHREAD_MUTEX_TIMED_NP)
+ {
+ simple:
+ /* Normal mutex. */
+ LLL_MUTEX_LOCK (mutex);
+ assert (mutex->__data.__owner == 0);
+ }
+ else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
{
/* Recursive mutex. */
- case PTHREAD_MUTEX_RECURSIVE_NP:
+
/* Check whether we already hold the mutex. */
if (mutex->__data.__owner == id)
{
@@ -70,24 +83,9 @@
assert (mutex->__data.__owner == 0);
mutex->__data.__count = 1;
- break;
-
- /* Error checking mutex. */
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- /* Check whether we already hold the mutex. */
- if (__builtin_expect (mutex->__data.__owner == id, 0))
- return EDEADLK;
-
- /* FALLTHROUGH */
-
- case PTHREAD_MUTEX_TIMED_NP:
- simple:
- /* Normal mutex. */
- LLL_MUTEX_LOCK (mutex);
- assert (mutex->__data.__owner == 0);
- break;
-
- case PTHREAD_MUTEX_ADAPTIVE_NP:
+ }
+ else if (__builtin_expect (type == PTHREAD_MUTEX_ADAPTIVE_NP, 1))
+ {
if (! __is_smp)
goto simple;
@@ -113,8 +111,34 @@
mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8;
}
assert (mutex->__data.__owner == 0);
- break;
-
+ }
+ else
+ {
+ assert (type == PTHREAD_MUTEX_ERRORCHECK_NP);
+ /* Check whether we already hold the mutex. */
+ if (__builtin_expect (mutex->__data.__owner == id, 0))
+ return EDEADLK;
+ goto simple;
+ }
+
+ out:
+ /* Record the ownership. */
+ mutex->__data.__owner = id;
+#ifndef NO_INCR
+ ++mutex->__data.__nusers;
+#endif
+
+ return 0;
+}
+
+static int
+__pthread_mutex_lock_full (pthread_mutex_t *mutex)
+{
+ int oldval;
+ pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
+
+ switch (PTHREAD_MUTEX_TYPE (mutex))
+ {
case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP:
case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP:
case PTHREAD_MUTEX_ROBUST_NORMAL_NP:
@@ -332,8 +356,7 @@
INTERNAL_SYSCALL_DECL (__err);
INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
__lll_private_flag (FUTEX_UNLOCK_PI,
- PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
-),
+ PTHREAD_ROBUST_MUTEX_PSHARED (mutex)),
0, 0);
THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
@@ -390,7 +413,7 @@
return EINVAL;
}
- retval = __pthread_tpp_change_priority (oldprio, ceiling);
+ int retval = __pthread_tpp_change_priority (oldprio, ceiling);
if (retval)
return retval;
@@ -445,7 +468,7 @@
++mutex->__data.__nusers;
#endif
- return retval;
+ return 0;
}
#ifndef __pthread_mutex_lock
strong_alias (__pthread_mutex_lock, pthread_mutex_lock)
Modified: trunk/libc/nptl/pthread_mutex_unlock.c
==============================================================================
--- trunk/libc/nptl/pthread_mutex_unlock.c (original)
+++ trunk/libc/nptl/pthread_mutex_unlock.c Mon Jan 19 09:43:22 2009
@@ -17,11 +17,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include "pthreadP.h"
#include <lowlevellock.h>
+static int
+internal_function
+__pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
+ __attribute_noinline__;
int
internal_function attribute_hidden
@@ -29,30 +34,13 @@
pthread_mutex_t *mutex;
int decr;
{
- int newowner = 0;
-
- switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
- PTHREAD_MUTEX_TIMED_NP))
- {
- case PTHREAD_MUTEX_RECURSIVE_NP:
- /* Recursive mutex. */
- if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid))
- return EPERM;
-
- if (--mutex->__data.__count != 0)
- /* We still hold the mutex. */
- return 0;
- goto normal;
-
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- /* Error checking mutex. */
- if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)
- || ! lll_islocked (mutex->__data.__lock))
- return EPERM;
- /* FALLTHROUGH */
-
- case PTHREAD_MUTEX_TIMED_NP:
- case PTHREAD_MUTEX_ADAPTIVE_NP:
+ int type = PTHREAD_MUTEX_TYPE (mutex);
+ if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0))
+ return __pthread_mutex_unlock_full (mutex, decr);
+
+ if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP)
+ == PTHREAD_MUTEX_TIMED_NP)
+ {
/* Always reset the owner field. */
normal:
mutex->__data.__owner = 0;
@@ -62,8 +50,41 @@
/* Unlock. */
lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex));
- break;
-
+ return 0;
+ }
+ else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1))
+ {
+ /* Recursive mutex. */
+ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid))
+ return EPERM;
+
+ if (--mutex->__data.__count != 0)
+ /* We still hold the mutex. */
+ return 0;
+ goto normal;
+ }
+ else if (__builtin_expect (type == PTHREAD_MUTEX_ADAPTIVE_NP, 1))
+ goto normal;
+ else
+ {
+ /* Error checking mutex. */
+ assert (type == PTHREAD_MUTEX_ERRORCHECK_NP);
+ if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)
+ || ! lll_islocked (mutex->__data.__lock))
+ return EPERM;
+ goto normal;
+ }
+}
+
+
+static int
+internal_function
+__pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
+{
+ int newowner = 0;
+
+ switch (PTHREAD_MUTEX_TYPE (mutex))
+ {
case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP:
/* Recursive mutex. */
if ((mutex->__data.__lock & FUTEX_TID_MASK)
Modified: trunk/libc/nptl/sysdeps/pthread/list.h
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/list.h (original)
+++ trunk/libc/nptl/sysdeps/pthread/list.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -46,21 +46,10 @@
static inline void
list_add (list_t *newp, list_t *head)
{
- head->next->prev = newp;
newp->next = head->next;
newp->prev = head;
+ head->next->prev = newp;
head->next = newp;
-}
-
-
-/* Add new element at the tail of the list. */
-static inline void
-list_add_tail (list_t *newp, list_t *head)
-{
- head->prev->next = newp;
- newp->next = head;
- newp->prev = head->prev;
- head->prev = newp;
}
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -31,6 +31,8 @@
movl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg
# define LOAD_FUTEX_WAIT(reg) \
xorl $(FUTEX_WAIT | FUTEX_PRIVATE_FLAG), reg
+# define LOAD_FUTEX_WAIT_ABS(reg) \
+ xorl $(FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME), reg
# define LOAD_FUTEX_WAKE(reg) \
xorl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg
#else
@@ -55,6 +57,10 @@
andl %gs:PRIVATE_FUTEX, reg ; \
orl $FUTEX_WAIT, reg
# endif
+# define LOAD_FUTEX_WAIT_ABS(reg) \
+ xorl $FUTEX_PRIVATE_FLAG, reg ; \
+ andl %gs:PRIVATE_FUTEX, reg ; \
+ orl $FUTEX_WAIT | FUTEX_CLOCK_REALTIME, reg
# define LOAD_FUTEX_WAKE(reg) \
xorl $FUTEX_PRIVATE_FLAG, reg ; \
andl %gs:PRIVATE_FUTEX, reg ; \
@@ -154,28 +160,81 @@
cfi_endproc
.size __lll_lock_wait,.-__lll_lock_wait
+ /* %ecx: futex
+ %esi: flags
+ %edx: timeout
+ %eax: futex value
+ */
.globl __lll_timedlock_wait
.type __lll_timedlock_wait,@function
.hidden __lll_timedlock_wait
.align 16
__lll_timedlock_wait:
cfi_startproc
+ pushl %ebp
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebp, 0)
+ pushl %ebx
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebx, 0)
+
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+# ifdef PIC
+ LOAD_PIC_REG (bx)
+ cmpl $0, __have_futex_clock_realtime@GOTOFF(%ebx)
+# else
+ cmpl $0, __have_futex_clock_realtime
+# endif
+ je .Lreltmo
+# endif
+
+ movl %ecx, %ebx
+ movl %esi, %ecx
+ movl %edx, %esi
+ movl $0xffffffff, %ebp
+ LOAD_FUTEX_WAIT_ABS (%ecx)
+
+ movl $2, %edx
+ cmpl %edx, %eax
+ jne 2f
+
+1: movl $SYS_futex, %eax
+ movl $2, %edx
+ ENTER_KERNEL
+
+2: xchgl %edx, (%ebx) /* NB: lock is implied */
+
+ testl %edx, %edx
+ jz 3f
+
+ cmpl $-ETIMEDOUT, %eax
+ je 4f
+ cmpl $-EINVAL, %eax
+ jne 1b
+4: movl %eax, %edx
+ negl %edx
+
+3: movl %edx, %eax
+7: popl %ebx
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebx)
+ popl %ebp
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebp)
+ ret
+
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+.Lreltmo:
/* Check for a valid timeout value. */
cmpl $1000000000, 4(%edx)
jae 3f
+ pushl %esi
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%esi, 0)
pushl %edi
cfi_adjust_cfa_offset(4)
- pushl %esi
- cfi_adjust_cfa_offset(4)
- pushl %ebx
- cfi_adjust_cfa_offset(4)
- pushl %ebp
- cfi_adjust_cfa_offset(4)
- cfi_offset(%edi, -8)
- cfi_offset(%esi, -12)
- cfi_offset(%ebx, -16)
- cfi_offset(%ebp, -20)
+ cfi_rel_offset(%edi, 0)
/* Stack frame for the timespec and timeval structs. */
subl $8, %esp
@@ -236,23 +295,24 @@
6: addl $8, %esp
cfi_adjust_cfa_offset(-8)
+ popl %edi
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%edi)
+ popl %esi
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%esi)
+7: popl %ebx
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebx)
popl %ebp
cfi_adjust_cfa_offset(-4)
cfi_restore(%ebp)
- popl %ebx
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%ebx)
- popl %esi
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%esi)
- popl %edi
- cfi_adjust_cfa_offset(-4)
- cfi_restore(%edi)
movl %edx, %eax
ret
-3: movl $EINVAL, %eax
- ret
+3: movl $EINVAL, %edx
+ jmp 7b
+# endif
cfi_endproc
.size __lll_timedlock_wait,.-__lll_timedlock_wait
#endif
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -55,6 +55,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2003.
@@ -40,6 +40,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@xxxxxxxxxx>, 2003.
@@ -41,6 +41,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c Mon Jan 19 09:43:22 2009
@@ -8,6 +8,7 @@
lll_robust_cond_lock ((mutex)->__data.__lock, id, \
PTHREAD_ROBUST_MUTEX_PSHARED (mutex))
#define __pthread_mutex_lock __pthread_mutex_cond_lock
+#define __pthread_mutex_lock_full __pthread_mutex_cond_lock_full
#define NO_INCR
#include <nptl/pthread_mutex_lock.c>
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
@@ -39,6 +39,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -31,6 +31,8 @@
movl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg
# define LOAD_FUTEX_WAIT(reg) \
xorl $(FUTEX_WAIT | FUTEX_PRIVATE_FLAG), reg
+# define LOAD_FUTEX_WAIT_ABS(reg) \
+ xorl $(FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME), reg
# define LOAD_FUTEX_WAKE(reg) \
xorl $(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), reg
#else
@@ -55,6 +57,10 @@
andl %fs:PRIVATE_FUTEX, reg ; \
orl $FUTEX_WAIT, reg
# endif
+# define LOAD_FUTEX_WAIT_ABS(reg) \
+ xorl $FUTEX_PRIVATE_FLAG, reg ; \
+ andl %fs:PRIVATE_FUTEX, reg ; \
+ orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
# define LOAD_FUTEX_WAKE(reg) \
xorl $FUTEX_PRIVATE_FLAG, reg ; \
andl %fs:PRIVATE_FUTEX, reg ; \
@@ -143,12 +149,61 @@
cfi_endproc
.size __lll_lock_wait,.-__lll_lock_wait
+ /* %rdi: futex
+ %rsi: flags
+ %rdx: timeout
+ %eax: futex value
+ */
.globl __lll_timedlock_wait
.type __lll_timedlock_wait,@function
.hidden __lll_timedlock_wait
.align 16
__lll_timedlock_wait:
cfi_startproc
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+# ifdef PIC
+ cmpl $0, __have_futex_clock_realtime(%rip)
+# else
+ cmpl $0, __have_futex_clock_realtime
+# endif
+ je .Lreltmo
+# endif
+
+ pushq %r9
+ cfi_adjust_cfa_offset(8)
+ cfi_rel_offset(%r9, 0)
+ movq %rdx, %r10
+ movl $0xffffffff, %r9d
+ LOAD_FUTEX_WAIT_ABS (%esi)
+
+ movl $2, %edx
+ cmpl %edx, %eax
+ jne 2f
+
+1: movl $SYS_futex, %eax
+ movl $2, %edx
+ syscall
+
+2: xchgl %edx, (%rdi) /* NB: lock is implied */
+
+ testl %edx, %edx
+ jz 3f
+
+ cmpl $-ETIMEDOUT, %eax
+ je 4f
+ cmpl $-EINVAL, %eax
+ jne 1b
+4: movl %eax, %edx
+ negl %edx
+
+3: movl %edx, %eax
+ popq %r9
+ cfi_adjust_cfa_offset(-8)
+ cfi_restore(%r9)
+ retq
+
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+.Lreltmo:
/* Check for a valid timeout value. */
cmpq $1000000000, 8(%rdx)
jae 3f
@@ -253,6 +308,7 @@
3: movl $EINVAL, %eax
retq
+# endif
cfi_endproc
.size __lll_timedlock_wait,.-__lll_timedlock_wait
#endif
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -48,13 +48,16 @@
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
#define FUTEX_CMP_REQUEUE 4
-#define FUTEX_WAKE_OP 5
+#define FUTEX_WAKE_OP 5
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
Modified: trunk/libc/nscd/nscd.c
==============================================================================
--- trunk/libc/nscd/nscd.c (original)
+++ trunk/libc/nscd/nscd.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998-2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (c) 1998-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1998.
@@ -340,7 +340,10 @@
break;
if (cnt == lastdb)
- return ARGP_ERR_UNKNOWN;
+ {
+ argp_error (state, _("'%s' is not a known database"), arg);
+ return EINVAL;
+ }
size_t arg_len = strlen (arg) + 1;
struct
@@ -409,7 +412,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"),
"Thorsten Kukuk and Ulrich Drepper");
}
Modified: trunk/libc/nscd/nscd_getai.c
==============================================================================
--- trunk/libc/nscd/nscd_getai.c (original)
+++ trunk/libc/nscd/nscd_getai.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
@@ -36,10 +36,24 @@
/* We use the mapping from nscd_gethst. */
libc_locked_map_ptr (extern, __hst_map_handle) attribute_hidden;
+/* Defined in nscd_gethst_r.c. */
+extern int __nss_have_localdomain attribute_hidden;
+
int
__nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
{
+ if (__builtin_expect (__nss_have_localdomain >= 0, 0))
+ {
+ if (__nss_have_localdomain == 0)
+ __nss_have_localdomain = getenv ("LOCALDOMAIN") != NULL ? 1 : -1;
+ if (__nss_have_localdomain > 0)
+ {
+ __nss_not_use_nscd_hosts = 1;
+ return -1;
+ }
+ }
+
size_t keylen = strlen (key) + 1;
int gc_cycle;
int nretries = 0;
Modified: trunk/libc/nscd/nscd_gethst_r.c
==============================================================================
--- trunk/libc/nscd/nscd_gethst_r.c (original)
+++ trunk/libc/nscd/nscd_gethst_r.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -97,12 +97,25 @@
}
+int __nss_have_localdomain attribute_hidden;
+
static int
internal_function
nscd_gethst_r (const char *key, size_t keylen, request_type type,
struct hostent *resultbuf, char *buffer, size_t buflen,
struct hostent **result, int *h_errnop)
{
+ if (__builtin_expect (__nss_have_localdomain >= 0, 0))
+ {
+ if (__nss_have_localdomain == 0)
+ __nss_have_localdomain = getenv ("LOCALDOMAIN") != NULL ? 1 : -1;
+ if (__nss_have_localdomain > 0)
+ {
+ __nss_not_use_nscd_hosts = 1;
+ return -1;
+ }
+ }
+
int gc_cycle;
int nretries = 0;
Modified: trunk/libc/nss/getent.c
==============================================================================
--- trunk/libc/nss/getent.c (original)
+++ trunk/libc/nss/getent.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (c) 1998-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1998.
@@ -85,7 +85,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk");
}
Modified: trunk/libc/nss/nss_files/files-parse.c
==============================================================================
--- trunk/libc/nss/nss_files/files-parse.c (original)
+++ trunk/libc/nss/nss_files/files-parse.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Common code for file-based database parsers in nss_files module.
- Copyright (C) 1996-2000, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000, 2003, 2004, 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
@@ -127,10 +127,24 @@
} \
}
+/* Helper function. */
+static inline uint32_t
+__attribute__ ((always_inline))
+strtou32 (const char *nptr, char **endptr, int base)
+{
+ unsigned long int val = strtoul (nptr, endptr, base);
+
+ /* Match the 32-bit behavior on 64-bit platforms. */
+ if (sizeof (long int) > 4 && val > 0xffffffff)
+ val = 0xffffffff;
+
+ return val;
+}
+
# define INT_FIELD(variable, terminator_p, swallow, base, convert) \
{ \
char *endp; \
- variable = convert (strtoul (line, &endp, base)); \
+ variable = convert (strtou32 (line, &endp, base)); \
if (endp == line) \
return 0; \
else if (terminator_p (*endp)) \
@@ -148,7 +162,7 @@
if (*line == '\0') \
/* We expect some more input, so don't allow the string to end here. */ \
return 0; \
- variable = convert (strtoul (line, &endp, base)); \
+ variable = convert (strtou32 (line, &endp, base)); \
if (endp == line) \
variable = default; \
if (terminator_p (*endp)) \
Modified: trunk/libc/posix/bug-regex17.c
==============================================================================
--- trunk/libc/posix/bug-regex17.c (original)
+++ trunk/libc/posix/bug-regex17.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
-/* Turkish regular expression tests.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* German regular expression tests.
+ Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2002.
@@ -33,10 +33,10 @@
int flags, nmatch;
regmatch_t rm[5];
} tests[] = {
- /* \xc3\x84 LATIN CAPITAL LETTER A WITH DIAERESIS
- \xc3\x96 LATIN CAPITAL LETTER O WITH DIAERESIS
- \xc3\xa4 LATIN SMALL LETTER A WITH DIAERESIS
- \xc3\xb6 LATIN SMALL LETTER O WITH DIAERESIS */
+ /* U+00C4 \xc3\x84 LATIN CAPITAL LETTER A WITH DIAERESIS
+ U+00D6 \xc3\x96 LATIN CAPITAL LETTER O WITH DIAERESIS
+ U+00E4 \xc3\xa4 LATIN SMALL LETTER A WITH DIAERESIS
+ U+00F6 \xc3\xb6 LATIN SMALL LETTER O WITH DIAERESIS */
{ "\xc3\x84\xc3\x96*\xc3\xb6$", "aB\xc3\xa4\xc3\xb6\xc3\xb6\xc3\x96", REG_ICASE, 2,
{ { 2, 10 }, { -1, -1 } } },
{ "[\xc3\x84x]\xc3\x96*\xc3\xb6$", "aB\xc3\x84\xc3\xb6\xc3\xb6\xc3\x96", REG_ICASE, 2,
@@ -45,10 +45,22 @@
{ { 2, 10 }, { -1, -1 } } },
{ "[^x]\xc3\x96*\xc3\xb6$", "aB\xc3\xa4\xc3\xb6\xc3\xb6\xc3\x96", REG_ICASE, 2,
{ { 2, 10 }, { -1, -1 } } },
+
+ /* Tests for bug 9697:
+ U+00DF \xc3\x9f LATIN SMALL LETTER SHARP S
+ U+02DA \xcb\x9a RING ABOVE
+ U+02E2 \xcb\xa2 MODIFIER LETTER SMALL S */
+ { "[a-z]|[^a-z]", "\xcb\xa2", REG_EXTENDED, 2,
+ { { 0, 2 }, { -1, -1 } } },
+ { "[a-z]", "\xc3\x9f", REG_EXTENDED, 2,
+ { { 0, 2 }, { -1, -1 } } },
+ { "[^a-z]", "\xcb\x9a", REG_EXTENDED, 2,
+ { { 0, 2 }, { -1, -1 } } },
};
-int
-main (void)
+
+static int
+do_test (void)
{
regex_t re;
regmatch_t rm[5];
@@ -93,3 +105,6 @@
return ret;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: trunk/libc/posix/getconf.c
==============================================================================
--- trunk/libc/posix/getconf.c (original)
+++ trunk/libc/posix/getconf.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 1995-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 1995-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -1013,7 +1013,7 @@
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2008");
+"), "2009");
printf (gettext ("Written by %s.\n"), "Roland McGrath");
return 0;
}
Modified: trunk/libc/posix/regcomp.c
==============================================================================
--- trunk/libc/posix/regcomp.c (original)
+++ trunk/libc/posix/regcomp.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,6 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003,2004,2005,2006,2007,2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@xxxxxxxxxxxxxx>.
@@ -327,8 +328,8 @@
&& dfa->nodes[node].mb_partial)
*p++ = dfa->nodes[node].opr.c;
memset (&state, '\0', sizeof (state));
- if (mbrtowc (&wc, (const char *) buf, p - buf,
- &state) == p - buf
+ if (__mbrtowc (&wc, (const char *) buf, p - buf,
+ &state) == p - buf
&& (__wcrtomb ((char *) buf, towlower (wc), &state)
!= (size_t) -1))
re_set_fastmap (fastmap, 0, buf[0]);
@@ -354,47 +355,67 @@
#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
else if (type == COMPLEX_BRACKET)
{
+ re_charset_t *cset = dfa->nodes[node].opr.mbcset;
int i;
- re_charset_t *cset = dfa->nodes[node].opr.mbcset;
- if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes
- || cset->nranges || cset->nchar_classes)
- {
+
# ifdef _LIBC
- if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0)
+ /* See if we have to try all bytes which start multiple collation
+ elements.
+ e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+ collation element, and don't catch 'b' since 'b' is
+ the only collation element which starts from 'b' (and
+ it is caught by SIMPLE_BRACKET). */
+ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+ && (cset->ncoll_syms || cset->nranges))
{
- /* In this case we want to catch the bytes which are
- the first byte of any collation elements.
- e.g. In da_DK, we want to catch 'a' since "aa"
- is a valid collation element, and don't catch
- 'b' since 'b' is the only collation element
- which starts from 'b'. */
const int32_t *table = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
for (i = 0; i < SBC_MAX; ++i)
if (table[i] < 0)
re_set_fastmap (fastmap, icase, i);
}
-# else
- if (dfa_mb_cur_max (dfa) > 1)
- for (i = 0; i < SBC_MAX; ++i)
- if (__btowc (i) == WEOF)
- re_set_fastmap (fastmap, icase, i);
-# endif /* not _LIBC */
+# endif /* _LIBC */
+
+ /* See if we have to start the match at all multibyte characters,
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+ if (dfa_mb_cur_max (dfa) > 1
+ && (cset->nchar_classes || cset->non_match
+# ifdef _LIBC
+ || cset->nequiv_classes
+# endif /* _LIBC */
+ ))
+ {
+ unsigned char c = 0;
+ do
+ {
+ mbstate_t mbs;
+ memset (&mbs, 0, sizeof (mbs));
+ if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+ re_set_fastmap (fastmap, false, (int) c);
+ }
+ while (++c != 0);
}
- for (i = 0; i < cset->nmbchars; ++i)
+
+ else
{
- char buf[256];
- mbstate_t state;
- memset (&state, '\0', sizeof (state));
- if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
- re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
- if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ /* ... Else catch all bytes which can start the mbchars. */
+ for (i = 0; i < cset->nmbchars; ++i)
{
- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
- != (size_t) -1)
- re_set_fastmap (fastmap, 0, *(unsigned char *) buf);
- }
- }
+ char buf[256];
+ mbstate_t state;
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+ if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+ re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+ }
+ }
+ }
}
#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
else if (type == OP_PERIOD
Modified: trunk/libc/posix/regex_internal.c
==============================================================================
--- trunk/libc/posix/regex_internal.c (original)
+++ trunk/libc/posix/regex_internal.c Mon Jan 19 09:43:22 2009
@@ -229,7 +229,7 @@
}
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
- mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen == (size_t) -2, 0))
{
/* The buffer doesn't have enough space, finish to build. */
@@ -299,9 +299,9 @@
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
- mbclen = mbrtowc (&wc,
- ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
- + byte_idx), remain_len, &pstr->cur_state);
+ mbclen = __mbrtowc (&wc,
+ ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+ + byte_idx), remain_len, &pstr->cur_state);
if (BE (mbclen + 2 > 2, 1))
{
wchar_t wcu = wc;
@@ -369,7 +369,7 @@
}
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
- mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen + 2 > 2, 1))
{
wchar_t wcu = wc;
@@ -491,8 +491,8 @@
int remain_len;
remain_len = pstr->len - rawbuf_idx;
prev_st = pstr->cur_state;
- mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
- remain_len, &pstr->cur_state);
+ mbclen = __mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
+ remain_len, &pstr->cur_state);
if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
{
/* We treat these cases as a single byte character. */
@@ -735,8 +735,8 @@
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));
- mbclen = mbrtowc (&wc2, (const char *) p, mlen,
- &cur_state);
+ mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ &cur_state);
if (raw + offset - p <= mbclen
&& mbclen < (size_t) -2)
{
Modified: trunk/libc/posix/regex_internal.h
==============================================================================
--- trunk/libc/posix/regex_internal.h (original)
+++ trunk/libc/posix/regex_internal.h Mon Jan 19 09:43:22 2009
@@ -120,6 +120,7 @@
# define __wctype wctype
# define __iswctype iswctype
# define __btowc btowc
+# define __mbrtowc mbrtowc
# define __mempcpy mempcpy
# define __wcrtomb wcrtomb
# define __regfree regfree
Modified: trunk/libc/posix/regexec.c
==============================================================================
--- trunk/libc/posix/regexec.c (original)
+++ trunk/libc/posix/regexec.c Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@xxxxxxxxxxxxxx>.
@@ -988,6 +988,11 @@
re_node_set_free (&sctx.limits);
if (BE (ret != REG_NOERROR, 0))
goto free_return;
+ if (sifted_states[0] == NULL)
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
}
re_free (mctx->state_log);
mctx->state_log = sifted_states;
Modified: trunk/libc/posix/rxspencer/tests
==============================================================================
--- trunk/libc/posix/rxspencer/tests (original)
+++ trunk/libc/posix/rxspencer/tests Mon Jan 19 09:43:22 2009
@@ -536,3 +536,7 @@
\B & aSbTc
\B & SaT @SaT
\B & aSTSb @TSb
+
+o$($|.) - oN
+o$($|.) - op
+o$($|.) - o o
Modified: trunk/libc/resolv/nss_dns/dns-host.c
==============================================================================
--- trunk/libc/resolv/nss_dns/dns-host.c (original)
+++ trunk/libc/resolv/nss_dns/dns-host.c Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
@@ -376,6 +376,19 @@
int n, status;
int olderr = errno;
+ uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
+ buffer += pad;
+ buflen = buflen > pad ? buflen - pad : 0;
+
+ if (__builtin_expect (buflen < sizeof (struct host_data), 0))
+ {
+ *errnop = ERANGE;
+ *h_errnop = NETDB_INTERNAL;
+ return NSS_STATUS_TRYAGAIN;
+ }
+
+ host_data = (struct host_data *) buffer;
+
if (__res_maybe_init (&_res, 0) == -1)
return NSS_STATUS_UNAVAIL;
Modified: trunk/libc/resolv/res_init.c
==============================================================================
--- trunk/libc/resolv/res_init.c (original)
+++ trunk/libc/resolv/res_init.c Mon Jan 19 09:43:22 2009
@@ -420,7 +420,7 @@
continue;
}
}
- statp->nscount = nserv;
+ statp->nscount = nservall;
#ifdef _LIBC
if (nservall - nserv > 0) {
statp->_u._ext.nscount6 = nservall - nserv;
Modified: trunk/libc/sysdeps/generic/dl-osinfo.h
==============================================================================
--- trunk/libc/sysdeps/generic/dl-osinfo.h (original)
+++ trunk/libc/sysdeps/generic/dl-osinfo.h Mon Jan 19 09:43:22 2009
@@ -1,12 +1,29 @@
#include <stdint.h>
static inline uintptr_t __attribute__ ((always_inline))
-_dl_setup_stack_chk_guard (void)
+_dl_setup_stack_chk_guard (void *dl_random)
{
- uintptr_t ret = 0;
- unsigned char *p = (unsigned char *) &ret;
- p[sizeof (ret) - 1] = 255;
- p[sizeof (ret) - 2] = '\n';
- p[0] = 0;
+ uintptr_t ret;
+ if (dl_random == NULL)
+ {
+ ret = 0;
+ unsigned char *p = (unsigned char *) &ret;
+ p[sizeof (ret) - 1] = 255;
+ p[sizeof (ret) - 2] = '\n';
+ p[0] = 0;
+ }
+ else
+ memcmp (&ret, dl_random, sizeof (ret));
return ret;
}
+
+static inline uintptr_t __attribute__ ((always_inline))
+_dl_setup_pointer_guard (void *dl_random, uintptr_t stack_chk_guard)
+{
+ uintptr_t ret;
+ if (dl_random == NULL)
+ ret = stack_chk_guard;
+ else
+ memcmp (&ret, (char *) dl_random + sizeof (ret), sizeof (ret));
+ return ret;
+}
Modified: trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ trunk/libc/sysdeps/generic/ldsodefs.h Mon Jan 19 09:43:22 2009
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-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
@@ -731,6 +731,9 @@
extern int _dl_starting_up_internal attribute_hidden;
#endif
+/* Random data provided by the kernel. */
+extern void *_dl_random attribute_hidden;
+
/* OS-dependent function to open the zero-fill device. */
extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */
Modified: trunk/libc/sysdeps/i386/fpu/libm-test-ulps
==============================================================================
--- trunk/libc/sysdeps/i386/fpu/libm-test-ulps (original)
+++ trunk/libc/sysdeps/i386/fpu/libm-test-ulps Mon Jan 19 09:43:22 2009
@@ -453,6 +453,10 @@
ildouble: 8
ldouble: 8
+# expm1
+Test "expm1 (1) == M_El - 1.0":
+ildouble: 1
+
# gamma
Test "gamma (-0.5) == log(2*sqrt(pi))":
double: 1
@@ -1134,6 +1138,9 @@
ildouble: 8
ldouble: 8
+Function: "expm1":
+ildouble: 1
+
Function: "gamma":
double: 1
idouble: 1
Modified: trunk/libc/sysdeps/mach/hurd/Makefile
==============================================================================
--- trunk/libc/sysdeps/mach/hurd/Makefile (original)
+++ trunk/libc/sysdeps/mach/hurd/Makefile Mon Jan 19 09:43:22 2009
@@ -1,4 +1,4 @@
[... 727 lines stripped ...]