diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-02-01 23:49:10 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-19 17:04:19 +0000 |
commit | 6617cc92076764d51f0190786f8d62b8c99ae984 (patch) | |
tree | 2316b9285344aa83ffa262eb0d5bc6b3bc98fdc4 | |
parent | ad016fa7492ba23c751cf33dd1befde7782facfa (diff) | |
download | openembedded-core-6617cc92076764d51f0190786f8d62b8c99ae984.tar.gz openembedded-core-6617cc92076764d51f0190786f8d62b8c99ae984.tar.bz2 openembedded-core-6617cc92076764d51f0190786f8d62b8c99ae984.zip |
glibc: Upgrade 2.20 -> 2.21
Drop CVE backports and ppc/fpu detection patch which is not needed anymore
Forward port eglibc option groups patch
Default to using glibc 2.21
Additional patches needed to appease -Werror option
Change-Id: I1873097cec8387ea9e8186a255122938fc28c976
Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 files changed, 1087 insertions, 1646 deletions
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 7428aa99ff..9e25bf0225 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -25,7 +25,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext" GCCVERSION ?= "4.9%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.24" -GLIBCVERSION ?= "2.20" +GLIBCVERSION ?= "2.21" UCLIBCVERSION ?= "0.9.33+git%" LINUXLIBCVERSION ?= "3.17.7" diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb index 8aaa225706..814ae9df92 100644 --- a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb +++ b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb @@ -14,9 +14,10 @@ inherit autotools FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" -PV = "2.20" +#BRANCH = "release/${PV}/master" +BRANCH = "master" -SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master;name=glibc \ +SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH};name=glibc \ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ file://fix_for_centos_5.8.patch \ ${EGLIBCPATCHES} \ @@ -33,17 +34,17 @@ EGLIBCPATCHES = "\ file://eglibc-use-option-groups.patch \ " -SRCREV_glibc = "b8079dd0d360648e4e8de48656c5c38972621072" +SRCREV_glibc = "edac0a60c7514b8c9b59488cffdac6b22267e757" SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3" # Makes for a rather long rev (22 characters), but... # -SRCREV_FORMAT = "glibc__localedef" +SRCREV_FORMAT = "glibc_localedef" S = "${WORKDIR}/git" EXTRA_OECONF = "--with-glibc=${S}" -CFLAGS += "-DNOT_IN_libc=1" +CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" do_configure () { ${S}/localedef/configure ${EXTRA_OECONF} @@ -51,6 +52,6 @@ do_configure () { do_install() { - install -d ${D}${bindir} + install -d ${D}${bindir} install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef } diff --git a/meta/recipes-core/glibc/glibc-initial_2.20.bb b/meta/recipes-core/glibc/glibc-initial_2.21.bb index 8ab01dc79d..8ab01dc79d 100644 --- a/meta/recipes-core/glibc/glibc-initial_2.20.bb +++ b/meta/recipes-core/glibc/glibc-initial_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-locale_2.20.bb b/meta/recipes-core/glibc/glibc-locale_2.21.bb index f7702e0358..f7702e0358 100644 --- a/meta/recipes-core/glibc/glibc-locale_2.20.bb +++ b/meta/recipes-core/glibc/glibc-locale_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb b/meta/recipes-core/glibc/glibc-mtrace_2.21.bb index 0b69bad46a..0b69bad46a 100644 --- a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb +++ b/meta/recipes-core/glibc/glibc-mtrace_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-scripts_2.20.bb b/meta/recipes-core/glibc/glibc-scripts_2.21.bb index 5a89bd8022..5a89bd8022 100644 --- a/meta/recipes-core/glibc/glibc-scripts_2.20.bb +++ b/meta/recipes-core/glibc/glibc-scripts_2.21.bb diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 8aa78dfb34..767d4b8b5b 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -20,7 +20,7 @@ def get_optimization(d): SELECTED_OPTIMIZATION := "${@get_optimization(d)}" # siteconfig.bbclass runs configure which needs a working compiler -# For the compiler to work we need a working libc yet libc isn't +# For the compiler to work we need a working libc yet libc isn't # in the sysroots directory at this point. This means the libc.so # linker script won't work as the --sysroot setting isn't correct. # Here we create a hacked up libc linker script and pass in the right @@ -71,7 +71,7 @@ EXTRA_OEMAKE += "${EGLIBCPARALLELISM}" PARALLEL_MAKE = "" # glibc make-syscalls.sh has a number of issues with /bin/dash and -# it's output which make calls via the SHELL also has issues, so +# it's output which make calls via the SHELL also has issues, so # ensure make uses /bin/bash EXTRA_OEMAKE += "SHELL=/bin/bash" diff --git a/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch new file mode 100644 index 0000000000..f51a0ccb22 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch @@ -0,0 +1,36 @@ +2015-02-18 Khem Raj <raj.khem@gmail.com>> + + * iconv/gconv_charset.h (strip): + Add unused attribute. + +From 9c4a91cb331ff1e8cde2314dadee74559d8cb0dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Feb 2015 19:45:31 +0000 +Subject: [PATCH] Add unused attribute + +Helps in avoiding gcc warning when header is is included in +a source file which does not use both functions + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + iconv/gconv_charset.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h +index 80290bc..7890a8e 100644 +--- a/iconv/gconv_charset.h ++++ b/iconv/gconv_charset.h +@@ -21,7 +21,7 @@ + #include <locale.h> + + +-static void ++static void __attribute__ ((unused)) + strip (char *wp, const char *s) + { + int slash_count = 0; +-- +2.1.4 + diff --git a/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch b/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch new file mode 100644 index 0000000000..a6395b77bc --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch @@ -0,0 +1,32 @@ +From 6f5639f6405ff9a42e4f71e7b0f18bddb68d992a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Feb 2015 03:23:45 +0000 +Subject: [PATCH] When disabling SSE also make sure that fpmath is not set to + use SSE as well + +This fixes errors when we inject sse options through CFLAGS and now +that we have -Werror turned on by default this warning turns to become +error on x86 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + sysdeps/x86/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile +index 19f5eca..827ea71 100644 +--- a/sysdeps/x86/Makefile ++++ b/sysdeps/x86/Makefile +@@ -1,6 +1,6 @@ + ifeq ($(subdir),elf) + CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ +- -mno-sse -mno-mmx) ++ -mno-sse -mno-mmx -mfpmath=387) + + tests-special += $(objpfx)tst-ld-sse-use.out + $(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so +-- +2.1.4 + diff --git a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch deleted file mode 100644 index 8cfdbeaa60..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch +++ /dev/null @@ -1,339 +0,0 @@ -From a5357b7ce2a2982c5778435704bcdb55ce3667a0 Mon Sep 17 00:00:00 2001 -From: Jeff Law <law@redhat.com> -Date: Mon, 15 Dec 2014 10:09:32 +0100 -Subject: [PATCH] CVE-2012-3406: Stack overflow in vfprintf [BZ #16617] - -A larger number of format specifiers coudld cause a stack overflow, -potentially allowing to bypass _FORTIFY_SOURCE format string -protection. ---- - ChangeLog | 9 +++++++ - NEWS | 13 +++++---- - stdio-common/Makefile | 2 +- - stdio-common/bug23-2.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ - stdio-common/bug23-3.c | 50 +++++++++++++++++++++++++++++++++++ - stdio-common/bug23-4.c | 31 ++++++++++++++++++++++ - stdio-common/vfprintf.c | 40 ++++++++++++++++++++++++++-- - 7 files changed, 207 insertions(+), 8 deletions(-) - create mode 100644 stdio-common/bug23-2.c - create mode 100644 stdio-common/bug23-3.c - create mode 100644 stdio-common/bug23-4.c - -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,12 @@ -+2014-12-15 Jeff Law <law@redhat.com> -+ -+ [BZ #16617] -+ * stdio-common/vfprintf.c (vfprintf): Allocate large specs array -+ on the heap. (CVE-2012-3406) -+ * stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file. -+ * stdio-common/bug23-4.c: New file. Test case by Joseph Myers. -+ * stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4. -+ - 2014-11-19 Carlos O'Donell <carlos@redhat.com> - Florian Weimer <fweimer@redhat.com> - Joseph Myers <joseph@codesourcery.com> -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -13,24 +13,28 @@ Version 2.20 - 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16194, 16198, 16275, - 16284, 16287, 16315, 16348, 16349, 16354, 16357, 16362, 16447, 16516, - 16532, 16539, 16545, 16561, 16562, 16564, 16574, 16599, 16600, 16609, -- 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, 16642, -- 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, 16695, -- 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, 16740, -- 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16796, -- 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, 16854, -- 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, 16915, -- 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, 16965, -- 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031, -- 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079, -- 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153, -- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625. -- -+ 16610, 16611, 16613, 16617, 16619, 16623, 16629, 16632, 16634, 16639, -+ 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, -+ 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, -+ 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, -+ 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, -+ 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, -+ 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, -+ 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, -+ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, -+ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, -+ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, -+ 17625. -+ - * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag - under certain input conditions resulting in the execution of a shell for - command substitution when the applicaiton did not request it. The - implementation now checks WRDE_NOCMD immediately before executing the - shell and returns the error WRDE_CMDSUB as expected. - -+* CVE-2012-3406 printf-style functions could run into a stack overflow when -+ processing format strings with a large number of format specifiers. -+ - * Reverted change of ABI data structures for s390 and s390x: - On s390 and s390x the size of struct ucontext and jmp_buf was increased in - 2.19. This change is reverted in 2.20. The introduced 2.19 symbol versions -Index: git/stdio-common/bug23-2.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-2.c -@@ -0,0 +1,70 @@ -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+ -+static const char expected[] = "\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n"; -+ -+static int -+do_test (void) -+{ -+ char *buf = malloc (strlen (expected) + 1); -+ snprintf (buf, strlen (expected) + 1, -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", -+ "a", "b", "c", "d", 5); -+ return strcmp (buf, expected) != 0; -+} -+ -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" -Index: git/stdio-common/bug23-3.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-3.c -@@ -0,0 +1,50 @@ -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+ -+int -+do_test (void) -+{ -+ size_t instances = 16384; -+#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ const char *item = "\na\nabbcd55"; -+#define X3 X0 X0 X0 X0 X0 X0 X0 X0 -+#define X6 X3 X3 X3 X3 X3 X3 X3 X3 -+#define X9 X6 X6 X6 X6 X6 X6 X6 X6 -+#define X12 X9 X9 X9 X9 X9 X9 X9 X9 -+#define X14 X12 X12 X12 X12 -+#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%" -+#define TRAILER2 TRAILER TRAILER -+ size_t length = instances * strlen (item) + strlen (TRAILER) + 1; -+ -+ char *buf = malloc (length + 1); -+ snprintf (buf, length + 1, -+ X14 TRAILER2 "\n", -+ "a", "b", "c", "d", 5); -+ -+ const char *p = buf; -+ size_t i; -+ for (i = 0; i < instances; ++i) -+ { -+ const char *expected; -+ for (expected = item; *expected; ++expected) -+ { -+ if (*p != *expected) -+ { -+ printf ("mismatch at offset %zu (%zu): expected %d, got %d\n", -+ (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF); -+ return 1; -+ } -+ ++p; -+ } -+ } -+ if (strcmp (p, TRAILER "\n") != 0) -+ { -+ printf ("mismatch at trailer: [%s]\n", p); -+ return 1; -+ } -+ free (buf); -+ return 0; -+} -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" -Index: git/stdio-common/bug23-4.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-4.c -@@ -0,0 +1,31 @@ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <sys/resource.h> -+ -+#define LIMIT 1000000 -+ -+int -+main (void) -+{ -+ struct rlimit lim; -+ getrlimit (RLIMIT_STACK, &lim); -+ lim.rlim_cur = 1048576; -+ setrlimit (RLIMIT_STACK, &lim); -+ char *fmtstr = malloc (4 * LIMIT + 1); -+ if (fmtstr == NULL) -+ abort (); -+ char *output = malloc (LIMIT + 1); -+ if (output == NULL) -+ abort (); -+ for (size_t i = 0; i < LIMIT; i++) -+ memcpy (fmtstr + 4 * i, "%1$d", 4); -+ fmtstr[4 * LIMIT] = '\0'; -+ int ret = snprintf (output, LIMIT + 1, fmtstr, 0); -+ if (ret != LIMIT) -+ abort (); -+ for (size_t i = 0; i < LIMIT; i++) -+ if (output[i] != '0') -+ abort (); -+ return 0; -+} -Index: git/stdio-common/vfprintf.c -=================================================================== ---- git.orig/stdio-common/vfprintf.c -+++ git/stdio-common/vfprintf.c -@@ -276,6 +276,12 @@ vfprintf (FILE *s, const CHAR_T *format, - /* For the argument descriptions, which may be allocated on the heap. */ - void *args_malloced = NULL; - -+ /* For positional argument handling. */ -+ struct printf_spec *specs; -+ -+ /* Track if we malloced the SPECS array and thus must free it. */ -+ bool specs_malloced = false; -+ - /* This table maps a character into a number representing a - class. In each step there is a destination label for each - class. */ -@@ -1699,8 +1705,8 @@ do_positional: - size_t nspecs = 0; - /* A more or less arbitrary start value. */ - size_t nspecs_size = 32 * sizeof (struct printf_spec); -- struct printf_spec *specs = alloca (nspecs_size); - -+ specs = alloca (nspecs_size); - /* The number of arguments the format string requests. This will - determine the size of the array needed to store the argument - attributes. */ -@@ -1743,11 +1749,39 @@ do_positional: - if (nspecs * sizeof (*specs) >= nspecs_size) - { - /* Extend the array of format specifiers. */ -+ if (nspecs_size * 2 < nspecs_size) -+ { -+ __set_errno (ENOMEM); -+ done = -1; -+ goto all_done; -+ } - struct printf_spec *old = specs; -- specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size); -+ if (__libc_use_alloca (2 * nspecs_size)) -+ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size); -+ else -+ { -+ nspecs_size *= 2; -+ specs = malloc (nspecs_size); -+ if (specs == NULL) -+ { -+ __set_errno (ENOMEM); -+ specs = old; -+ done = -1; -+ goto all_done; -+ } -+ } - - /* Copy the old array's elements to the new space. */ - memmove (specs, old, nspecs * sizeof (*specs)); -+ -+ /* If we had previously malloc'd space for SPECS, then -+ release it after the copy is complete. */ -+ if (specs_malloced) -+ free (old); -+ -+ /* Now set SPECS_MALLOCED if needed. */ -+ if (!__libc_use_alloca (nspecs_size)) -+ specs_malloced = true; - } - - /* Parse the format specifier. */ -@@ -2068,6 +2102,8 @@ do_positional: - } - - all_done: -+ if (specs_malloced) -+ free (specs); - if (__glibc_unlikely (args_malloced != NULL)) - free (args_malloced); - if (__glibc_unlikely (workstart != NULL)) -Index: git/stdio-common/Makefile -=================================================================== ---- git.orig/stdio-common/Makefile -+++ git/stdio-common/Makefile -@@ -66,7 +66,7 @@ tests := tstscanf test_rdwr test-popen t - tst-fwrite bug16 bug17 tst-sprintf2 bug18 \ - bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \ - tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \ -- tst-printf-round bug26 -+ tst-printf-round bug23-2 bug23-3 bug23-4 - - tests-$(OPTION_EGLIBC_LOCALE_CODE) \ - += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch deleted file mode 100644 index d95d182dc4..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch +++ /dev/null @@ -1,215 +0,0 @@ -From a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c Mon Sep 17 00:00:00 2001 -From: Carlos O'Donell <carlos@redhat.com> -Date: Wed, 19 Nov 2014 11:44:12 -0500 -Subject: [PATCH] CVE-2014-7817: wordexp fails to honour WRDE_NOCMD. - -The function wordexp() fails to properly handle the WRDE_NOCMD -flag when processing arithmetic inputs in the form of "$((... ``))" -where "..." can be anything valid. The backticks in the arithmetic -epxression are evaluated by in a shell even if WRDE_NOCMD forbade -command substitution. This allows an attacker to attempt to pass -dangerous commands via constructs of the above form, and bypass -the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD -in exec_comm(), the only place that can execute a shell. All other -checks for WRDE_NOCMD are superfluous and removed. - -We expand the testsuite and add 3 new regression tests of roughly -the same form but with a couple of nested levels. - -On top of the 3 new tests we add fork validation to the WRDE_NOCMD -testing. If any forks are detected during the execution of a wordexp() -call with WRDE_NOCMD, the test is marked as failed. This is slightly -heuristic since vfork might be used in the future, but it provides a -higher level of assurance that no shells were executed as part of -command substitution with WRDE_NOCMD in effect. In addition it doesn't -require libpthread or libdl, instead we use the public implementation -namespace function __register_atfork (already part of the public ABI -for libpthread). - -Tested on x86_64 with no regressions. ---- - ChangeLog | 22 ++++++++++++++++++++++ - NEWS | 8 +++++++- - posix/wordexp-test.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ - posix/wordexp.c | 16 ++++------------ - 4 files changed, 77 insertions(+), 13 deletions(-) - -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,24 @@ -+2014-11-19 Carlos O'Donell <carlos@redhat.com> -+ Florian Weimer <fweimer@redhat.com> -+ Joseph Myers <joseph@codesourcery.com> -+ Adam Conrad <adconrad@0c3.net> -+ Andreas Schwab <schwab@suse.de> -+ Brooks <bmoses@google.com> -+ -+ [BZ #17625] -+ * wordexp-test.c (__dso_handle): Add prototype. -+ (__register_atfork): Likewise. -+ (__app_register_atfork): New function. -+ (registered_forks): New global. -+ (register_fork): New function. -+ (test_case): Add 3 new tests for WRDE_CMDSUB. -+ (main): Call __app_register_atfork. -+ (testit): If WRDE_NOCMD set registered_forks to zero, run test, and if -+ fork count is non-zero fail the test. -+ * posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag -+ is set. -+ (parse_dollars): Remove check for WRDE_NOCMD. -+ - 2014-09-07 Allan McRae <allan@archlinux.org - - * version.h (RELEASE): Set to "stable". -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -23,7 +23,13 @@ Version 2.20 - 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031, - 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079, - 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153, -- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354. -+ 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625. -+ -+* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag -+ under certain input conditions resulting in the execution of a shell for -+ command substitution when the applicaiton did not request it. The -+ implementation now checks WRDE_NOCMD immediately before executing the -+ shell and returns the error WRDE_CMDSUB as expected. - - * Reverted change of ABI data structures for s390 and s390x: - On s390 and s390x the size of struct ucontext and jmp_buf was increased in -Index: git/posix/wordexp-test.c -=================================================================== ---- git.orig/posix/wordexp-test.c -+++ git/posix/wordexp-test.c -@@ -27,6 +27,25 @@ - - #define IFS " \n\t" - -+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); -+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); -+ -+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) -+{ -+ return __register_atfork (prepare, parent, child, -+ &__dso_handle == NULL ? NULL : __dso_handle); -+} -+ -+/* Number of forks seen. */ -+static int registered_forks; -+ -+/* For each fork increment the fork count. */ -+static void -+register_fork (void) -+{ -+ registered_forks++; -+} -+ - struct test_case_struct - { - int retval; -@@ -206,6 +225,12 @@ struct test_case_struct - { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, - { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, - { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, -+ /* Test for CVE-2014-7817. We test 3 combinations of command -+ substitution inside an arithmetic expression to make sure that -+ no commands are executed and error is returned. */ -+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, -+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, -+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, - - { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, - }; -@@ -258,6 +283,15 @@ main (int argc, char *argv[]) - return -1; - } - -+ /* If we are not allowed to do command substitution, we install -+ fork handlers to verify that no forks happened. No forks should -+ happen at all if command substitution is disabled. */ -+ if (__app_register_atfork (register_fork, NULL, NULL) != 0) -+ { -+ printf ("Failed to register fork handler.\n"); -+ return -1; -+ } -+ - for (test = 0; test_case[test].retval != -1; test++) - if (testit (&test_case[test])) - ++fail; -@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) - - printf ("Test %d (%s): ", ++tests, tc->words); - -+ if (tc->flags & WRDE_NOCMD) -+ registered_forks = 0; -+ - if (tc->flags & WRDE_APPEND) - { - /* initial wordexp() call, to be appended to */ -@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) - } - retval = wordexp (tc->words, &we, tc->flags); - -+ if ((tc->flags & WRDE_NOCMD) -+ && (registered_forks > 0)) -+ { -+ printf ("FAILED fork called for WRDE_NOCMD\n"); -+ return 1; -+ } -+ - if (tc->flags & WRDE_DOOFFS) - start_offs = sav_we.we_offs; - -Index: git/posix/wordexp.c -=================================================================== ---- git.orig/posix/wordexp.c -+++ git/posix/wordexp.c -@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size - pid_t pid; - int noexec = 0; - -+ /* Do nothing if command substitution should not succeed. */ -+ if (flags & WRDE_NOCMD) -+ return WRDE_CMDSUB; -+ - /* Don't fork() unless necessary */ - if (!comm || !*comm) - return 0; -@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word - } - } - -- if (flags & WRDE_NOCMD) -- return WRDE_CMDSUB; -- - (*offset) += 2; - return parse_comm (word, word_length, max_length, words, offset, flags, - quoted? NULL : pwordexp, ifs, ifs_white); -@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_ - break; - - case '`': -- if (flags & WRDE_NOCMD) -- return WRDE_CMDSUB; -- - ++(*offset); - error = parse_backtick (word, word_length, max_length, words, - offset, flags, NULL, NULL, NULL); -@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *p - break; - - case '`': -- if (flags & WRDE_NOCMD) -- { -- error = WRDE_CMDSUB; -- goto do_error; -- } -- - ++words_offset; - error = parse_backtick (&word, &word_length, &max_length, words, - &words_offset, flags, pwordexp, ifs, diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch deleted file mode 100644 index ba1da67b76..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch +++ /dev/null @@ -1,65 +0,0 @@ -CVE-2014-9402 endless loop in getaddr_r - - -https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=11e3417af6e354f1942c68a271ae51e892b2814d - -Upstream-Status: Backport - -Signed-off-by: Armin Kuster <akuster@mvista.com> - -From 11e3417af6e354f1942c68a271ae51e892b2814d Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Mon, 15 Dec 2014 17:41:13 +0100 -Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630] - ---- - ChangeLog | 6 ++++++ - NEWS | 7 +++++-- - resolv/nss_dns/dns-network.c | 4 ++-- - 3 files changed, 13 insertions(+), 4 deletions(-) - -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -24,7 +24,10 @@ Version 2.20 - 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, - 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, - 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, -- 17625. -+ 17625, 17630. -+ -+* The nss_dns implementation of getnetbyname could run into an infinite loop -+ if the DNS response contained a PTR record of an unexpected format. - - * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag - under certain input conditions resulting in the execution of a shell for -Index: git/resolv/nss_dns/dns-network.c -=================================================================== ---- git.orig/resolv/nss_dns/dns-network.c -+++ git/resolv/nss_dns/dns-network.c -@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int - - case BYNAME: - { -- char **ap = result->n_aliases++; -- while (*ap != NULL) -+ char **ap; -+ for (ap = result->n_aliases; *ap != NULL; ++ap) - { - /* Check each alias name for being of the forms: - 4.3.2.1.in-addr.arpa = net 1.2.3.4 -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,9 @@ -+2014-12-16 Florian Weimer <fweimer@redhat.com> -+ -+ [BZ #17630] -+ * resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias -+ names. -+ - 2014-12-15 Jeff Law <law@redhat.com> - - [BZ #16617] diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch index 1910fccd3c..0fcaff9719 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch +++ b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch @@ -4,8 +4,8 @@ Upstream-Status: Pending Index: git/argp/argp-fmtstream.c =================================================================== ---- git.orig/argp/argp-fmtstream.c 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-fmtstream.c 2014-08-29 20:01:15.188070587 -0700 +--- git.orig/argp/argp-fmtstream.c ++++ git/argp/argp-fmtstream.c @@ -42,6 +42,7 @@ #ifdef _LIBC # include <wchar.h> @@ -14,7 +14,7 @@ Index: git/argp/argp-fmtstream.c # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) #endif -@@ -100,7 +101,11 @@ +@@ -100,7 +101,11 @@ __argp_fmtstream_free (argp_fmtstream_t __argp_fmtstream_update (fs); if (fs->p > fs->buf) { @@ -26,7 +26,7 @@ Index: git/argp/argp-fmtstream.c } free (fs->buf); free (fs); -@@ -145,9 +150,17 @@ +@@ -145,9 +150,17 @@ __argp_fmtstream_update (argp_fmtstream_ size_t i; for (i = 0; i < pad; i++) { @@ -45,7 +45,7 @@ Index: git/argp/argp-fmtstream.c putc_unlocked (' ', fs->stream); } } -@@ -308,9 +321,17 @@ +@@ -308,9 +321,17 @@ __argp_fmtstream_update (argp_fmtstream_ *nl++ = ' '; else for (i = 0; i < fs->wmargin; ++i) @@ -66,9 +66,9 @@ Index: git/argp/argp-fmtstream.c /* Copy the tail of the original buffer into the current buffer Index: git/argp/argp-help.c =================================================================== ---- git.orig/argp/argp-help.c 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-help.c 2014-08-29 20:01:15.188070587 -0700 -@@ -51,6 +51,7 @@ +--- git.orig/argp/argp-help.c ++++ git/argp/argp-help.c +@@ -51,6 +51,7 @@ char *alloca (); #ifdef _LIBC # include <../libio/libioP.h> # include <wchar.h> @@ -76,7 +76,7 @@ Index: git/argp/argp-help.c #endif #ifndef _ -@@ -1702,7 +1703,7 @@ +@@ -1702,7 +1703,7 @@ char *__argp_basename (char *name) } char * @@ -85,7 +85,7 @@ Index: git/argp/argp-help.c { # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME return program_invocation_short_name; -@@ -1873,9 +1874,17 @@ +@@ -1873,9 +1874,17 @@ __argp_failure (const struct argp_state #endif } @@ -106,8 +106,8 @@ Index: git/argp/argp-help.c #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) Index: git/argp/argp-namefrob.h =================================================================== ---- git.orig/argp/argp-namefrob.h 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-namefrob.h 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/argp/argp-namefrob.h ++++ git/argp/argp-namefrob.h @@ -76,10 +76,12 @@ #undef __argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin @@ -123,8 +123,8 @@ Index: git/argp/argp-namefrob.h #undef __flockfile Index: git/argp/Makefile =================================================================== ---- git.orig/argp/Makefile 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/argp/Makefile ++++ git/argp/Makefile @@ -18,6 +18,8 @@ # # Makefile for argp. @@ -136,9 +136,9 @@ Index: git/argp/Makefile include ../Makeconfig Index: git/catgets/Makefile =================================================================== ---- git.orig/catgets/Makefile 2014-08-29 20:00:43.008070587 -0700 -+++ git/catgets/Makefile 2014-08-29 20:01:15.192070587 -0700 -@@ -22,20 +22,23 @@ +--- git.orig/catgets/Makefile ++++ git/catgets/Makefile +@@ -22,20 +22,23 @@ subdir := catgets include ../Makeconfig @@ -171,8 +171,8 @@ Index: git/catgets/Makefile # To find xmalloc.c Index: git/crypt/crypt-entry.c =================================================================== ---- git.orig/crypt/crypt-entry.c 2014-08-29 20:00:43.028070587 -0700 -+++ git/crypt/crypt-entry.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/crypt/crypt-entry.c ++++ git/crypt/crypt-entry.c @@ -27,6 +27,7 @@ #include <stdio.h> #endif @@ -181,7 +181,7 @@ Index: git/crypt/crypt-entry.c #include <errno.h> #include <fips-private.h> -@@ -76,9 +77,11 @@ +@@ -76,9 +77,11 @@ __crypt_r (key, salt, data) const char *salt; struct crypt_data * __restrict data; { @@ -193,7 +193,7 @@ Index: git/crypt/crypt-entry.c #ifdef _LIBC /* Try to find out whether we have to use MD5 encryption replacement. */ -@@ -105,6 +108,7 @@ +@@ -105,6 +108,7 @@ __crypt_r (key, salt, data) sizeof (struct crypt_data)); #endif @@ -201,7 +201,7 @@ Index: git/crypt/crypt-entry.c /* * Hack DES tables according to salt */ -@@ -144,6 +148,10 @@ +@@ -144,6 +148,10 @@ __crypt_r (key, salt, data) */ _ufc_output_conversion_r (res[0], res[1], salt, data); return data->crypt_3_buf; @@ -212,7 +212,7 @@ Index: git/crypt/crypt-entry.c } weak_alias (__crypt_r, crypt_r) -@@ -168,7 +176,12 @@ +@@ -168,7 +176,12 @@ crypt (key, salt) return __sha512_crypt (key, salt); #endif @@ -227,8 +227,8 @@ Index: git/crypt/crypt-entry.c Index: git/crypt/Makefile =================================================================== ---- git.orig/crypt/Makefile 2014-08-29 20:00:43.024070587 -0700 -+++ git/crypt/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/crypt/Makefile ++++ git/crypt/Makefile @@ -18,21 +18,25 @@ # # Sub-makefile for crypt() portion of the library. @@ -261,7 +261,7 @@ Index: git/crypt/Makefile routines += $(libcrypt-routines) endif -@@ -44,7 +48,7 @@ +@@ -44,7 +48,7 @@ LDLIBS-crypt.so = -lfreebl3 else libcrypt-routines += md5 sha256 sha512 @@ -270,7 +270,7 @@ Index: git/crypt/Makefile # The test md5test-giant uses up to 400 MB of RSS and runs on a fast # machine over a minute. -@@ -64,8 +68,10 @@ +@@ -64,8 +68,10 @@ $(objpfx)sha256test: $(patsubst %, $(obj $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines)) endif @@ -283,8 +283,8 @@ Index: git/crypt/Makefile +endif # eglibc: OPTION_EGLIBC_CRYPT Index: git/csu/Makefile =================================================================== ---- git.orig/csu/Makefile 2014-08-29 20:00:43.032070587 -0700 -+++ git/csu/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/csu/Makefile ++++ git/csu/Makefile @@ -22,6 +22,8 @@ # crtn.o, special "initializer" and "finalizer" files used in the link # to make the .init and .fini sections work right. @@ -296,8 +296,8 @@ Index: git/csu/Makefile include ../Makeconfig Index: git/debug/Makefile =================================================================== ---- git.orig/debug/Makefile 2014-08-29 20:00:43.036070587 -0700 -+++ git/debug/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/Makefile ++++ git/debug/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for debug portion of the library. @@ -307,7 +307,7 @@ Index: git/debug/Makefile subdir := debug include ../Makeconfig -@@ -27,7 +29,7 @@ +@@ -27,7 +29,7 @@ headers := execinfo.h # Note that ptsname_r_chk and getlogin_r are not here, but in # login/Makefile instead. If that subdir is omitted from the # build, its _FORTIFY_SOURCE support will be too. @@ -316,7 +316,7 @@ Index: git/debug/Makefile memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \ strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \ sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \ -@@ -36,20 +38,27 @@ +@@ -36,20 +38,27 @@ routines = backtrace backtracesyms back read_chk pread_chk pread64_chk recv_chk recvfrom_chk \ readlink_chk readlinkat_chk getwd_chk getcwd_chk \ realpath_chk fread_chk fread_u_chk \ @@ -352,7 +352,7 @@ Index: git/debug/Makefile static-only-routines := warning-nop stack_chk_fail_local CFLAGS-backtrace.c = -fno-omit-frame-pointer -@@ -129,11 +138,15 @@ +@@ -131,11 +140,15 @@ LDFLAGS-tst-backtrace4 = -rdynamic LDFLAGS-tst-backtrace5 = -rdynamic LDFLAGS-tst-backtrace6 = -rdynamic @@ -371,12 +371,12 @@ Index: git/debug/Makefile +tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 +endif - tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc) - tests += $(tests-ifunc) + extra-libs = libSegFault libpcprofile + extra-libs-others = $(extra-libs) Index: git/debug/segfault.c =================================================================== ---- git.orig/debug/segfault.c 2014-08-29 20:00:46.280070587 -0700 -+++ git/debug/segfault.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/segfault.c ++++ git/debug/segfault.c @@ -30,6 +30,7 @@ #include <unistd.h> #include <_itoa.h> @@ -385,7 +385,24 @@ Index: git/debug/segfault.c /* This file defines macros to access the content of the sigcontext element passed up by the signal handler. */ -@@ -91,6 +92,7 @@ +@@ -68,11 +69,13 @@ write_strsignal (int fd, int signal) + static void + catch_segfault (int signal, SIGCONTEXT ctx) + { +- int fd, cnt, i; +- void **arr; ++ int fd; + struct sigaction sa; ++#if __OPTION_EGLIBC_BACKTRACE ++ int cnt, i; ++ void **arr; + uintptr_t pc; +- ++#endif + /* This is the name of the file we are writing to. If none is given + or we cannot write to this file write to stderr. */ + fd = 2; +@@ -91,6 +94,7 @@ catch_segfault (int signal, SIGCONTEXT c REGISTER_DUMP; #endif @@ -393,7 +410,7 @@ Index: git/debug/segfault.c WRITE_STRING ("\nBacktrace:\n"); /* Get the backtrace. */ -@@ -113,6 +115,7 @@ +@@ -113,6 +117,7 @@ catch_segfault (int signal, SIGCONTEXT c /* Now generate nicely formatted output. */ __backtrace_symbols_fd (arr + i, cnt - i, fd); @@ -403,8 +420,8 @@ Index: git/debug/segfault.c /* Now the link map. */ Index: git/debug/tst-chk1.c =================================================================== ---- git.orig/debug/tst-chk1.c 2014-08-29 20:00:46.288070587 -0700 -+++ git/debug/tst-chk1.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/tst-chk1.c ++++ git/debug/tst-chk1.c @@ -31,6 +31,7 @@ #include <sys/select.h> #include <sys/socket.h> @@ -413,7 +430,7 @@ Index: git/debug/tst-chk1.c #define obstack_chunk_alloc malloc -@@ -307,6 +308,7 @@ +@@ -307,6 +308,7 @@ do_test (void) snprintf (buf + 8, l0 + 3, "%d", num2); CHK_FAIL_END @@ -421,7 +438,7 @@ Index: git/debug/tst-chk1.c CHK_FAIL_START swprintf (wbuf + 8, 3, L"%d", num1); CHK_FAIL_END -@@ -314,6 +316,7 @@ +@@ -314,6 +316,7 @@ do_test (void) CHK_FAIL_START swprintf (wbuf + 8, l0 + 3, L"%d", num1); CHK_FAIL_END @@ -429,7 +446,7 @@ Index: git/debug/tst-chk1.c # endif memcpy (buf, str1 + 2, l0 + 9); -@@ -381,6 +384,7 @@ +@@ -381,6 +384,7 @@ do_test (void) CHK_FAIL_END #endif @@ -437,7 +454,7 @@ Index: git/debug/tst-chk1.c /* These ops can be done without runtime checking of object size. */ wmemcpy (wbuf, L"abcdefghij", 10); -@@ -605,6 +609,7 @@ +@@ -605,6 +609,7 @@ do_test (void) CHK_FAIL_END #endif @@ -445,7 +462,7 @@ Index: git/debug/tst-chk1.c /* Now checks for %n protection. */ -@@ -1192,6 +1197,7 @@ +@@ -1192,6 +1197,7 @@ do_test (void) # endif #endif @@ -453,7 +470,7 @@ Index: git/debug/tst-chk1.c if (setlocale (LC_ALL, "de_DE.UTF-8") != NULL) { assert (MB_CUR_MAX <= 10); -@@ -1348,6 +1354,7 @@ +@@ -1348,6 +1354,7 @@ do_test (void) puts ("cannot set locale"); ret = 1; } @@ -463,8 +480,8 @@ Index: git/debug/tst-chk1.c if (fd != -1) Index: git/dlfcn/Makefile =================================================================== ---- git.orig/dlfcn/Makefile 2014-08-29 20:00:46.312070587 -0700 -+++ git/dlfcn/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/dlfcn/Makefile ++++ git/dlfcn/Makefile @@ -15,6 +15,8 @@ # License along with the GNU C Library; if not, see # <http://www.gnu.org/licenses/>. @@ -474,21 +491,23 @@ Index: git/dlfcn/Makefile subdir := dlfcn include ../Makeconfig -@@ -36,7 +38,9 @@ +@@ -36,8 +38,11 @@ endif ifeq (yes,$(build-shared)) tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ -- bug-atexit3 tstatexit bug-dl-leaf -+ tstatexit bug-dl-leaf +- bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen ++ tstatexit bug-dl-leaf tst-rec-dlopen + endif + +tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 - endif ++ modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ defaultmod2 errmsg1mod modatexit modcxaatexit \ + bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ Index: git/elf/dl-support.c =================================================================== ---- git.orig/elf/dl-support.c 2014-08-29 20:00:46.384070587 -0700 -+++ git/elf/dl-support.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/elf/dl-support.c ++++ git/elf/dl-support.c @@ -19,6 +19,7 @@ /* This file defines some things that for the dynamic linker are defined in rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */ @@ -497,7 +516,7 @@ Index: git/elf/dl-support.c #include <errno.h> #include <libintl.h> #include <stdlib.h> -@@ -42,7 +43,9 @@ +@@ -42,7 +43,9 @@ char **_dl_argv = &__progname; /* This i const char *_dl_platform; size_t _dl_platformlen; @@ -509,8 +528,8 @@ Index: git/elf/dl-support.c int _dl_dynamic_weak; Index: git/elf/rtld.c =================================================================== ---- git.orig/elf/rtld.c 2014-08-29 20:01:14.708070587 -0700 -+++ git/elf/rtld.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/elf/rtld.c ++++ git/elf/rtld.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -519,7 +538,7 @@ Index: git/elf/rtld.c #include <errno.h> #include <dlfcn.h> #include <fcntl.h> -@@ -2200,6 +2201,7 @@ +@@ -2200,6 +2201,7 @@ print_missing_version (int errcode __att objname, errstring); } @@ -527,7 +546,7 @@ Index: git/elf/rtld.c /* Nonzero if any of the debugging options is enabled. */ static int any_debug attribute_relro; -@@ -2309,6 +2311,7 @@ +@@ -2309,6 +2311,7 @@ a filename can be specified using the LD _exit (0); } } @@ -535,7 +554,18 @@ Index: git/elf/rtld.c static void process_dl_audit (char *str) -@@ -2376,12 +2379,14 @@ +@@ -2348,8 +2351,9 @@ process_envvars (enum mode *modep) + char **runp = _environ; + char *envline; + enum mode mode = normal; ++#if __OPTION_EGLIBC_RTLD_DEBUG + char *debug_output = NULL; +- ++#endif + /* This is the default place for profiling data file. */ + GLRO(dl_profile_output) + = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; +@@ -2376,12 +2380,14 @@ process_envvars (enum mode *modep) break; case 5: @@ -550,7 +580,23 @@ Index: git/elf/rtld.c if (memcmp (envline, "AUDIT", 5) == 0) process_dl_audit (&envline[6]); break; -@@ -2490,7 +2495,9 @@ +@@ -2447,13 +2453,14 @@ process_envvars (enum mode *modep) + break; + } + ++#if __OPTION_EGLIBC_RTLD_DEBUG + /* Where to place the profiling data file. */ + if (memcmp (envline, "DEBUG_OUTPUT", 12) == 0) + { + debug_output = &envline[13]; + break; + } +- ++#endif + if (!__libc_enable_secure + && memcmp (envline, "DYNAMIC_WEAK", 12) == 0) + GLRO(dl_dynamic_weak) = 1; +@@ -2490,7 +2497,9 @@ process_envvars (enum mode *modep) { mode = trace; GLRO(dl_verbose) = 1; @@ -560,7 +606,7 @@ Index: git/elf/rtld.c GLRO(dl_trace_prelink) = &envline[17]; } break; -@@ -2537,12 +2544,15 @@ +@@ -2537,12 +2546,15 @@ process_envvars (enum mode *modep) if (__access ("/etc/suid-debug", F_OK) != 0) { unsetenv ("MALLOC_CHECK_"); @@ -576,7 +622,7 @@ Index: git/elf/rtld.c /* If we have to run the dynamic linker in debugging mode and the LD_DEBUG_OUTPUT environment variable is given, we write the debug messages to this file. */ -@@ -2567,6 +2577,7 @@ +@@ -2567,6 +2579,7 @@ process_envvars (enum mode *modep) /* We use standard output if opening the file failed. */ GLRO(dl_debug_fd) = STDOUT_FILENO; } @@ -586,9 +632,9 @@ Index: git/elf/rtld.c Index: git/extra-lib.mk =================================================================== ---- git.orig/extra-lib.mk 2014-08-29 20:00:46.544070587 -0700 -+++ git/extra-lib.mk 2014-08-29 20:01:15.196070587 -0700 -@@ -25,7 +25,9 @@ +--- git.orig/extra-lib.mk ++++ git/extra-lib.mk +@@ -25,7 +25,9 @@ install-lib := $(install-lib) extra-objs := $(extra-objs) # The modules that go in $(lib). @@ -599,7 +645,7 @@ Index: git/extra-lib.mk # Add each flavor of library to the lists of things to build and install. install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) -@@ -101,7 +103,7 @@ +@@ -101,7 +103,7 @@ endif endif # This will define `libof-ROUTINE := LIB' for each of the routines. @@ -610,8 +656,8 @@ Index: git/extra-lib.mk endif Index: git/grp/Makefile =================================================================== ---- git.orig/grp/Makefile 2014-08-29 20:00:46.556070587 -0700 -+++ git/grp/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/grp/Makefile ++++ git/grp/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for grp portion of the library. @@ -621,7 +667,7 @@ Index: git/grp/Makefile subdir := grp include ../Makeconfig -@@ -29,6 +31,9 @@ +@@ -29,6 +31,9 @@ routines := fgetgrent initgroups setgrou getgrent_r getgrgid_r getgrnam_r fgetgrent_r tests := testgrp @@ -633,8 +679,8 @@ Index: git/grp/Makefile test-srcs := tst_fgetgrent Index: git/hesiod/Makefile =================================================================== ---- git.orig/hesiod/Makefile 2014-08-29 20:00:46.580070587 -0700 -+++ git/hesiod/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/hesiod/Makefile ++++ git/hesiod/Makefile @@ -18,12 +18,14 @@ # # Sub-makefile for hesiod portion of the library. @@ -654,8 +700,8 @@ Index: git/hesiod/Makefile vpath %.c nss_hesiod Index: git/iconv/gconv_db.c =================================================================== ---- git.orig/iconv/gconv_db.c 2014-08-29 20:00:46.604070587 -0700 -+++ git/iconv/gconv_db.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/gconv_db.c ++++ git/iconv/gconv_db.c @@ -25,6 +25,7 @@ #include <sys/param.h> #include <bits/libc-lock.h> @@ -664,7 +710,7 @@ Index: git/iconv/gconv_db.c #include <dlfcn.h> #include <gconv_int.h> -@@ -828,9 +829,11 @@ +@@ -828,9 +829,11 @@ free_modules_db (struct gconv_module *no /* Free all resources if necessary. */ libc_freeres_fn (free_mem) { @@ -678,8 +724,8 @@ Index: git/iconv/gconv_db.c extern void _nl_finddomain_subfreeres (void) attribute_hidden; Index: git/iconv/gconv_trans.c =================================================================== ---- git.orig/iconv/gconv_trans.c 2014-08-29 20:00:46.612070587 -0700 -+++ git/iconv/gconv_trans.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/gconv_trans.c ++++ git/iconv/gconv_trans.c @@ -23,6 +23,7 @@ #include <stdint.h> #include <string.h> @@ -688,7 +734,27 @@ Index: git/iconv/gconv_trans.c #include <bits/libc-lock.h> #include "gconv_int.h" -@@ -59,6 +60,7 @@ +@@ -38,15 +39,19 @@ __gconv_transliterate (struct __gconv_st + unsigned char **outbufstart, size_t *irreversible) + { + /* Find out about the locale's transliteration. */ ++#if __OPTION_EGLIBC_LOCALE_CODE + uint_fast32_t size; + const uint32_t *from_idx; + const uint32_t *from_tbl; + const uint32_t *to_idx; + const uint32_t *to_tbl; ++#endif + const uint32_t *winbuf; + const uint32_t *winbufend; ++#if __OPTION_EGLIBC_LOCALE_CODE + uint_fast32_t low; + uint_fast32_t high; ++#endif + + /* The input buffer. There are actually 4-byte values. */ + winbuf = (const uint32_t *) *inbufp; +@@ -58,6 +63,7 @@ __gconv_transliterate (struct __gconv_st PTR_DEMANGLE (fct); #endif @@ -696,7 +762,7 @@ Index: git/iconv/gconv_trans.c /* If there is no transliteration information in the locale don't do anything and return the error. */ size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE); -@@ -194,6 +196,7 @@ +@@ -193,6 +199,7 @@ __gconv_transliterate (struct __gconv_st sorted. */ break; } @@ -706,8 +772,8 @@ Index: git/iconv/gconv_trans.c if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0) Index: git/iconv/iconv_prog.c =================================================================== ---- git.orig/iconv/iconv_prog.c 2014-08-29 20:00:46.612070587 -0700 -+++ git/iconv/iconv_prog.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/iconv_prog.c ++++ git/iconv/iconv_prog.c @@ -35,6 +35,7 @@ #ifdef _POSIX_MAPPED_FILES # include <sys/mman.h> @@ -716,7 +782,7 @@ Index: git/iconv/iconv_prog.c #include <charmap.h> #include <gconv_int.h> #include "iconv_prog.h" -@@ -221,10 +222,17 @@ +@@ -221,10 +222,17 @@ main (int argc, char *argv[]) bool to_wrong = (iconv_open (to_code, "UTF-8") == (iconv_t) -1 && errno == EINVAL); @@ -736,8 +802,8 @@ Index: git/iconv/iconv_prog.c { Index: git/iconv/Makefile =================================================================== ---- git.orig/iconv/Makefile 2014-08-29 20:00:46.600070587 -0700 -+++ git/iconv/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/Makefile ++++ git/iconv/Makefile @@ -18,6 +18,8 @@ # # Makefile for iconv. @@ -747,20 +813,22 @@ Index: git/iconv/Makefile subdir := iconv include ../Makeconfig -@@ -57,6 +59,9 @@ - CPPFLAGS-strtab = -DNOT_IN_libc - CPPFLAGS-charmap = -DNOT_IN_libc - CPPFLAGS-charmap-dir = -DNOT_IN_libc +@@ -39,6 +41,11 @@ CFLAGS-iconv_charmap.c = -I../locale/pro + CFLAGS-dummy-repertoire.c = -I../locale/programs + CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ + -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER ++ +ifneq (y,$(OPTION_EGLIBC_SPAWN)) -+CPPFLAGS-charmap-dir.c += -DNO_UNCOMPRESS ++CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS +endif ++ + CFLAGS-linereader.c = -DNO_TRANSLITERATION + CFLAGS-simple-hash.c = -I../locale - ifeq ($(run-built-tests),yes) - xtests-special += $(objpfx)test-iconvconfig.out Index: git/iconvdata/Makefile =================================================================== ---- git.orig/iconvdata/Makefile 2014-08-29 20:00:46.628070587 -0700 -+++ git/iconvdata/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconvdata/Makefile ++++ git/iconvdata/Makefile @@ -18,12 +18,15 @@ # # Makefile for iconv data and code. @@ -778,7 +846,7 @@ Index: git/iconvdata/Makefile ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \ ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \ T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \ -@@ -63,11 +66,13 @@ +@@ -63,11 +66,13 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \ CP770 CP771 CP772 CP773 CP774 @@ -794,7 +862,7 @@ Index: git/iconvdata/Makefile ifeq ($(have-thread-library),yes) tests += bug-iconv3 endif -@@ -130,13 +135,13 @@ +@@ -127,13 +132,13 @@ ifeq (yes,$(build-shared)) # Rule to generate the shared objects. charmaps = ../localedata/charmaps -include $(objpfx)iconv-rules @@ -811,7 +879,7 @@ Index: git/iconvdata/Makefile # We can build the conversion tables for numerous charsets automatically. -@@ -204,7 +209,7 @@ +@@ -201,7 +206,7 @@ before-compile += $(addprefix $(objpfx), ifndef avoid-generated $(objpfx)iconv-rules: Makefile $(make-target-directory) @@ -820,7 +888,7 @@ Index: git/iconvdata/Makefile echo 8bit $(gen-8bit-modules); \ echo 8bit-gap $(gen-8bit-gap-modules); } | \ LC_ALL=C \ -@@ -247,7 +252,7 @@ +@@ -245,7 +250,7 @@ $(addprefix $(inst_gconvdir)/, $(modules $(do-install-program) $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) $(do-install) @@ -829,7 +897,7 @@ Index: git/iconvdata/Makefile # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary # if this libc has more gconv modules than the previously installed one. if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ -@@ -256,9 +261,9 @@ +@@ -254,9 +259,9 @@ ifeq (no,$(cross-compiling)) $(common-objpfx)iconv/iconvconfig \ $(addprefix --prefix=,$(install_root)); \ fi @@ -844,9 +912,9 @@ Index: git/iconvdata/Makefile Index: git/include/netdb.h =================================================================== ---- git.orig/include/netdb.h 2014-08-29 20:00:47.152070587 -0700 -+++ git/include/netdb.h 2014-08-29 20:01:15.196070587 -0700 -@@ -232,6 +232,10 @@ +--- git.orig/include/netdb.h ++++ git/include/netdb.h +@@ -232,6 +232,10 @@ extern enum nss_status _nss_ ## service (const char *name, int af, struct hostent *host, \ char *buffer, size_t buflen, int *errnop, \ int *h_errnop); \ @@ -859,8 +927,8 @@ Index: git/include/netdb.h size_t buflen, int *errnop, int *h_errnop); \ Index: git/inet/Makefile =================================================================== ---- git.orig/inet/Makefile 2014-08-29 20:00:47.176070587 -0700 -+++ git/inet/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/inet/Makefile ++++ git/inet/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for inet portion of the library. @@ -870,7 +938,7 @@ Index: git/inet/Makefile subdir := inet include ../Makeconfig -@@ -27,7 +29,8 @@ +@@ -27,7 +29,8 @@ headers := netinet/ether.h netinet/in.h netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \ aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h @@ -880,7 +948,7 @@ Index: git/inet/Makefile inet_lnaof inet_mkadr \ inet_netof inet_ntoa inet_net herrno herrno-loc \ gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \ -@@ -41,18 +44,23 @@ +@@ -41,18 +44,23 @@ routines := htonl htons \ getrpcent_r getrpcbyname_r getrpcbynumber_r \ ether_aton ether_aton_r ether_hton ether_line \ ether_ntoa ether_ntoa_r ether_ntoh \ @@ -912,89 +980,112 @@ Index: git/inet/Makefile Index: git/intl/dcigettext.c =================================================================== ---- git.orig/intl/dcigettext.c 2014-08-29 20:00:47.224070587 -0700 -+++ git/intl/dcigettext.c 2014-08-29 20:01:15.200070587 -0700 -@@ -77,6 +77,10 @@ +--- git.orig/intl/dcigettext.c ++++ git/intl/dcigettext.c +@@ -100,11 +100,15 @@ extern int errno; + # include "libgnuintl.h" #endif #include "hash-string.h" - +#ifdef _LIBC +# include <gnu/option-groups.h> +#endif -+ - /* Thread safetyness. */ + + /* Handle multi-threaded applications. */ #ifdef _LIBC # include <bits/libc-lock.h> -@@ -449,9 +453,11 @@ - #endif + # define gl_rwlock_define_initialized __libc_rwlock_define_initialized ++# define gl_rwlock_define __libc_rwlock_define + # define gl_rwlock_rdlock __libc_rwlock_rdlock + # define gl_rwlock_wrlock __libc_rwlock_wrlock + # define gl_rwlock_unlock __libc_rwlock_unlock +@@ -523,8 +527,10 @@ DCIGETTEXT (const char *domainname, cons + saved_errno = errno; #ifdef _LIBC -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) - __libc_rwlock_rdlock (__libc_setlocale_lock); +- __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) +- __libc_rwlock_rdlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ gl_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) ++ gl_rwlock_rdlock (__libc_setlocale_lock); ++# endif #endif -+#endif - - __libc_rwlock_rdlock (_nl_state_lock); -@@ -470,7 +476,11 @@ - search.category = category; - # ifdef HAVE_PER_THREAD_LOCALE + gl_rwlock_rdlock (_nl_state_lock); +@@ -550,7 +556,11 @@ DCIGETTEXT (const char *domainname, cons + #ifdef HAVE_PER_THREAD_LOCALE + # ifndef IN_LIBGLOCALE # ifdef _LIBC +- localename = strdupa (__current_locale_name (category)); +# if __OPTION_EGLIBC_LOCALE_CODE - localename = strdupa (__current_locale_name (category)); ++ localename = strdupa (__current_locale_name (category)); +# else -+ localename = "C"; ++ localename = "C"; +# endif - # endif - search.localename = localename; - # endif -@@ -494,7 +504,9 @@ + # else + categoryname = category_to_name (category); + # define CATEGORYNAME_INITIALIZED +@@ -581,10 +591,12 @@ DCIGETTEXT (const char *domainname, cons + else retval = (char *) (*foundp)->translation; +- gl_rwlock_unlock (_nl_state_lock); # ifdef _LIBC -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif +- __libc_rwlock_unlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ gl_rwlock_unlock (__libc_setlocale_lock); ++# endif # endif - __libc_rwlock_unlock (_nl_state_lock); ++ gl_rwlock_unlock (_nl_state_lock); + __set_errno (saved_errno); return retval; -@@ -611,7 +623,9 @@ - { - no_translation: - FREE_BLOCKS (block_list); -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif - __libc_rwlock_unlock (_nl_state_lock); - __set_errno (saved_errno); - return (plural == 0 -@@ -730,7 +744,9 @@ + } +@@ -838,10 +850,13 @@ DCIGETTEXT (const char *domainname, cons if (plural) retval = plural_lookup (domain, n, retval, retlen); -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif - __libc_rwlock_unlock (_nl_state_lock); +- gl_rwlock_unlock (_nl_state_lock); + #ifdef _LIBC +- __libc_rwlock_unlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ ++ gl_rwlock_unlock (__libc_setlocale_lock); ++# endif + #endif ++ gl_rwlock_unlock (_nl_state_lock); return retval; } -@@ -1361,7 +1377,11 @@ - `LC_xxx', and `LANG'. On some systems this can be done by the - `setlocale' function itself. */ + } +@@ -850,10 +865,12 @@ DCIGETTEXT (const char *domainname, cons + return_untranslated: + /* Return the untranslated MSGID. */ + FREE_BLOCKS (block_list); +- gl_rwlock_unlock (_nl_state_lock); #ifdef _LIBC +- __libc_rwlock_unlock (__libc_setlocale_lock); +# if __OPTION_EGLIBC_LOCALE_CODE - retval = __current_locale_name (category); -+# else -+ retval = "C"; ++ gl_rwlock_unlock (__libc_setlocale_lock); +# endif - #else - retval = _nl_locale_name (category, categoryname); #endif ++ gl_rwlock_unlock (_nl_state_lock); + #ifndef _LIBC + if (!ENABLE_SECURE) + { +@@ -1550,7 +1567,11 @@ guess_category_value (int category, cons + `LC_xxx', and `LANG'. On some systems this can be done by the + `setlocale' function itself. */ + # ifdef _LIBC ++# if __OPTION_EGLIBC_LOCALE_CODE + locale = __current_locale_name (category); ++# else ++ locale = "C"; ++# endif + # else + locale_defaulted = 0; + # if HAVE_USELOCALE Index: git/intl/Makefile =================================================================== ---- git.orig/intl/Makefile 2014-08-29 20:00:47.220070587 -0700 -+++ git/intl/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/intl/Makefile ++++ git/intl/Makefile @@ -16,6 +16,7 @@ # <http://www.gnu.org/licenses/>. @@ -1003,7 +1094,7 @@ Index: git/intl/Makefile subdir = intl -@@ -48,7 +49,7 @@ +@@ -48,7 +49,7 @@ endif $(objpfx)plural.o: plural.c ifeq ($(run-built-tests),yes) @@ -1014,8 +1105,8 @@ Index: git/intl/Makefile $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \ Index: git/io/Makefile =================================================================== ---- git.orig/io/Makefile 2014-08-29 20:00:47.244070587 -0700 -+++ git/io/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/io/Makefile ++++ git/io/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for I/O portion of the library. @@ -1025,7 +1116,7 @@ Index: git/io/Makefile subdir := io include ../Makeconfig -@@ -36,7 +38,7 @@ +@@ -36,7 +38,7 @@ routines := \ fxstatat fxstatat64 \ statfs fstatfs statfs64 fstatfs64 \ statvfs fstatvfs statvfs64 fstatvfs64 \ @@ -1034,7 +1125,7 @@ Index: git/io/Makefile mkdir mkdirat \ open open_2 open64 open64_2 openat openat_2 openat64 openat64_2 \ read write lseek lseek64 access euidaccess faccessat \ -@@ -49,11 +51,13 @@ +@@ -49,11 +51,13 @@ routines := \ ttyname ttyname_r isatty \ link linkat symlink symlinkat readlink readlinkat \ unlink unlinkat rmdir \ @@ -1049,7 +1140,7 @@ Index: git/io/Makefile aux := have_o_cloexec -@@ -64,18 +68,22 @@ +@@ -64,18 +68,22 @@ static-only-routines = stat fstat lstat fstatat fstatat64 mknod mknodat others := pwd @@ -1077,8 +1168,8 @@ Index: git/io/Makefile Index: git/libidn/Makefile =================================================================== ---- git.orig/libidn/Makefile 2014-08-29 20:00:47.316070587 -0700 -+++ git/libidn/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libidn/Makefile ++++ git/libidn/Makefile @@ -16,6 +16,7 @@ # <http://www.gnu.org/licenses/>. @@ -1087,7 +1178,7 @@ Index: git/libidn/Makefile subdir := libidn -@@ -23,8 +24,8 @@ +@@ -23,8 +24,8 @@ include ../Makeconfig routines = idn-stub @@ -1100,8 +1191,8 @@ Index: git/libidn/Makefile iconvme Index: git/libidn/toutf8.c =================================================================== ---- git.orig/libidn/toutf8.c 2014-08-29 20:00:47.332070587 -0700 -+++ git/libidn/toutf8.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libidn/toutf8.c ++++ git/libidn/toutf8.c @@ -33,6 +33,11 @@ /* Get strlen. */ #include <string.h> @@ -1129,8 +1220,8 @@ Index: git/libidn/toutf8.c * stringprep_locale_charset - return charset used in current locale Index: git/libio/fileops.c =================================================================== ---- git.orig/libio/fileops.c 2014-08-29 20:00:47.352070587 -0700 -+++ git/libio/fileops.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/fileops.c ++++ git/libio/fileops.c @@ -38,6 +38,7 @@ #include <string.h> #include <errno.h> @@ -1139,7 +1230,7 @@ Index: git/libio/fileops.c #include <stdlib.h> #if _LIBC # include "../wcsmbs/wcsmbsload.h" -@@ -174,7 +175,7 @@ +@@ -172,7 +173,7 @@ _IO_new_file_close_it (_IO_FILE *fp) /* Free buffer. */ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -1148,7 +1239,7 @@ Index: git/libio/fileops.c { if (_IO_have_wbackup (fp)) _IO_free_wbackup_area (fp); -@@ -359,6 +360,7 @@ +@@ -347,6 +348,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const cs = strstr (last_recognized + 1, ",ccs="); if (cs != NULL) { @@ -1156,7 +1247,7 @@ Index: git/libio/fileops.c /* Yep. Load the appropriate conversions and set the orientation to wide. */ struct gconv_fcts fcts; -@@ -423,6 +425,12 @@ +@@ -406,6 +408,12 @@ _IO_new_file_fopen (_IO_FILE *fp, const /* Set the mode now. */ result->_mode = 1; @@ -1171,8 +1262,8 @@ Index: git/libio/fileops.c Index: git/libio/__fpurge.c =================================================================== ---- git.orig/libio/__fpurge.c 2014-08-29 20:00:47.336070587 -0700 -+++ git/libio/__fpurge.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/__fpurge.c ++++ git/libio/__fpurge.c @@ -21,7 +21,7 @@ void __fpurge (FILE *fp) @@ -1184,8 +1275,8 @@ Index: git/libio/__fpurge.c if (_IO_in_backup (fp)) Index: git/libio/iofwide.c =================================================================== ---- git.orig/libio/iofwide.c 2014-08-29 20:00:47.360070587 -0700 -+++ git/libio/iofwide.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/iofwide.c ++++ git/libio/iofwide.c @@ -26,6 +26,7 @@ #include <libioP.h> @@ -1203,7 +1294,7 @@ Index: git/libio/iofwide.c /* Prototypes of libio's codecvt functions. */ static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, -@@ -513,3 +516,26 @@ +@@ -499,3 +502,26 @@ do_max_length (struct _IO_codecvt *codec return MB_CUR_MAX; #endif } @@ -1232,9 +1323,9 @@ Index: git/libio/iofwide.c +#endif Index: git/libio/ioseekoff.c =================================================================== ---- git.orig/libio/ioseekoff.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/ioseekoff.c 2014-08-29 20:01:15.200070587 -0700 -@@ -60,7 +60,7 @@ +--- git.orig/libio/ioseekoff.c ++++ git/libio/ioseekoff.c +@@ -60,7 +60,7 @@ _IO_seekoff_unlocked (fp, offset, dir, m else abort (); } @@ -1245,9 +1336,9 @@ Index: git/libio/ioseekoff.c _IO_free_wbackup_area (fp); Index: git/libio/ioseekpos.c =================================================================== ---- git.orig/libio/ioseekpos.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/ioseekpos.c 2014-08-29 20:01:15.200070587 -0700 -@@ -35,7 +35,7 @@ +--- git.orig/libio/ioseekpos.c ++++ git/libio/ioseekpos.c +@@ -35,7 +35,7 @@ _IO_seekpos_unlocked (fp, pos, mode) /* If we have a backup buffer, get rid of it, since the __seekoff callback may not know to do the right thing about it. This may be over-kill, but it'll do for now. TODO */ @@ -1258,8 +1349,8 @@ Index: git/libio/ioseekpos.c _IO_free_backup_area (fp); Index: git/libio/iosetbuffer.c =================================================================== ---- git.orig/libio/iosetbuffer.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/iosetbuffer.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/iosetbuffer.c ++++ git/libio/iosetbuffer.c @@ -24,6 +24,8 @@ This exception applies to code released by its copyright holders in files containing the exception. */ @@ -1269,7 +1360,7 @@ Index: git/libio/iosetbuffer.c #include "libioP.h" void -@@ -38,9 +40,11 @@ +@@ -38,9 +40,11 @@ _IO_setbuffer (fp, buf, size) if (!buf) size = 0; (void) _IO_SETBUF (fp, buf, size); @@ -1283,8 +1374,8 @@ Index: git/libio/iosetbuffer.c libc_hidden_def (_IO_setbuffer) Index: git/libio/libioP.h =================================================================== ---- git.orig/libio/libioP.h 2014-08-29 20:00:47.372070587 -0700 -+++ git/libio/libioP.h 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/libioP.h ++++ git/libio/libioP.h @@ -42,6 +42,10 @@ /*# include <comthread.h>*/ #endif @@ -1296,7 +1387,7 @@ Index: git/libio/libioP.h #include <math_ldbl_opt.h> #include "iolibio.h" -@@ -508,8 +512,20 @@ +@@ -508,8 +512,20 @@ extern void _IO_old_init (_IO_FILE *fp, #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -1320,8 +1411,8 @@ Index: git/libio/libioP.h : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \ Index: git/libio/Makefile =================================================================== ---- git.orig/libio/Makefile 2014-08-29 20:00:47.332070587 -0700 -+++ git/libio/Makefile 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/Makefile ++++ git/libio/Makefile @@ -18,6 +18,8 @@ # # Specific makefile for libio. @@ -1331,7 +1422,7 @@ Index: git/libio/Makefile subdir := libio include ../Makeconfig -@@ -27,16 +29,13 @@ +@@ -27,16 +29,13 @@ headers := stdio.h libio.h _G_config.h b routines := \ filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \ @@ -1351,63 +1442,61 @@ Index: git/libio/Makefile \ clearerr feof ferror fileno fputc freopen fseek getc getchar \ memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \ -@@ -47,25 +46,48 @@ - __fpurge __fpending __fsetlocking \ +@@ -48,24 +47,49 @@ routines := \ \ libc_fatal fmemopen -- + -tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \ - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \ - tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \ - tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \ -- tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ -- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ -- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ -- tst-memstream1 tst-memstream2 \ -- tst-wmemstream1 tst-wmemstream2 \ -- bug-memstream1 bug-wmemstream1 \ -- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ -- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ -- tst-ftell-append +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ -+ wfiledoalloc \ -+ iowpadn \ -+ swprintf \ -+ vswprintf iovswscanf swscanf wgenops \ ++ wfiledoalloc \ ++ iowpadn \ ++ swprintf \ ++ vswprintf iovswscanf swscanf wgenops \ + wstrops wfileops wmemstream +routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \ + wdummyfileops +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \ + fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ -+ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ -+ putwchar putwchar_u fwprintf vwprintf \ -+ wprintf wscanf fwscanf vwscanf \ ++ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ ++ putwchar putwchar_u fwprintf vwprintf \ ++ wprintf wscanf fwscanf vwscanf \ + fwide + -+tests = test-fmemopen tst-ext tst-ext2 \ -+ tst-mmap-setvbuf tst-atime tst-eof \ -+ tst-freopen bug-ungetc bug-fseek \ -+ tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ -+ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ -+ bug-ungetc2 bug-ungetc3 bug-ungetc4 \ -+ tst-memstream1 tst-memstream2 \ -+ bug-memstream1 tst-popen1 tst-fwrite-error \ ++tests = test-fmemopen tst-ext tst-ext2 \ ++ tst-mmap-setvbuf tst-atime tst-eof \ ++ tst-freopen bug-ungetc bug-fseek \ + tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ +- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ +- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ ++ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ ++ bug-ungetc2 bug-ungetc3 bug-ungetc4 \ + tst-memstream1 tst-memstream2 \ +- tst-wmemstream1 tst-wmemstream2 \ +- bug-memstream1 bug-wmemstream1 \ +- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ +- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ +- tst-ftell-append tst-fputws ++ bug-memstream1 tst-popen1 tst-fwrite-error \ + tst-ftell-active-handler tst-ftell-append -+tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-swscanf tst-fgetws tst-setvbuf1 \ -+ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ -+ tst-widetext -+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += bug-rewind bug-rewind2 bug-ungetwc1 \ -+ bug-wfflush bug-wmemstream1 tst-fopenloc2 \ -+ tst_getwc \ -+ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ ++tests-$(OPTION_EGLIBC_LOCALE_CODE) \ ++ += tst-swscanf tst-fgetws tst-setvbuf1 \ ++ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ ++ tst-widetext tst-fputws ++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ ++ += bug-rewind bug-rewind2 bug-ungetwc1 \ ++ bug-wfflush bug-wmemstream1 tst-fopenloc2 \ ++ tst_getwc \ ++ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ + tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide -+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += tst_swprintf tst_swscanf \ -+ tst-sscanf \ ++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ += tst_swprintf tst_swscanf \ ++ tst-sscanf \ + tst-wmemstream1 tst-wmemstream2 ++ ifeq (yes,$(build-shared)) # Add test-fopenloc only if shared library is enabled since it depends on # shared localedata objects. @@ -1416,7 +1505,7 @@ Index: git/libio/Makefile endif test-srcs = test-freopen -@@ -164,13 +186,17 @@ +@@ -164,13 +188,17 @@ shared-only-routines = oldiofopen oldiof oldiofsetpos64 ifeq ($(run-built-tests),yes) @@ -1436,8 +1525,8 @@ Index: git/libio/Makefile Index: git/libio/wdummyfileops.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/libio/wdummyfileops.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/libio/wdummyfileops.c @@ -0,0 +1,161 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1602,8 +1691,8 @@ Index: git/libio/wdummyfileops.c +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap) Index: git/locale/catnames.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/locale/catnames.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/locale/catnames.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1655,8 +1744,8 @@ Index: git/locale/catnames.c + }; Index: git/locale/C-ctype.c =================================================================== ---- git.orig/locale/C-ctype.c 2014-08-29 20:00:47.396070587 -0700 -+++ git/locale/C-ctype.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/C-ctype.c ++++ git/locale/C-ctype.c @@ -19,8 +19,11 @@ #include "localeinfo.h" #include <endian.h> @@ -1669,7 +1758,7 @@ Index: git/locale/C-ctype.c /* This table's entries are taken from POSIX.2 Table 2-6 ``LC_CTYPE Category Definition in the POSIX Locale''. -@@ -647,6 +650,7 @@ +@@ -647,6 +650,7 @@ const struct __locale_data _nl_C_LC_CTYP { .word = L'7' }, { .word = L'8' }, { .word = L'9' }, @@ -1677,7 +1766,7 @@ Index: git/locale/C-ctype.c /* _NL_CTYPE_TRANSLIT_TAB_SIZE */ { .word = NTRANSLIT }, /* _NL_CTYPE_TRANSLIT_FROM_IDX */ -@@ -657,6 +661,22 @@ +@@ -657,6 +661,22 @@ const struct __locale_data _nl_C_LC_CTYP { .wstr = translit_to_idx }, /* _NL_CTYPE_TRANSLIT_TO_TBL */ { .wstr = (uint32_t *) translit_to_tbl }, @@ -1702,8 +1791,8 @@ Index: git/locale/C-ctype.c /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */ Index: git/locale/dummy-setlocale.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/locale/dummy-setlocale.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/locale/dummy-setlocale.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1740,9 +1829,9 @@ Index: git/locale/dummy-setlocale.c +libc_hidden_def (setlocale) Index: git/locale/localeinfo.h =================================================================== ---- git.orig/locale/localeinfo.h 2014-08-29 20:00:47.404070587 -0700 -+++ git/locale/localeinfo.h 2014-08-29 20:01:15.204070587 -0700 -@@ -224,7 +224,7 @@ +--- git.orig/locale/localeinfo.h ++++ git/locale/localeinfo.h +@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, L unused. We can manage this playing some tricks with weak references. But with thread-local locale settings, it becomes quite ungainly unless we can use __thread variables. So only in that case do we attempt this. */ @@ -1753,8 +1842,8 @@ Index: git/locale/localeinfo.h #endif Index: git/locale/Makefile =================================================================== ---- git.orig/locale/Makefile 2014-08-29 20:00:47.400070587 -0700 -+++ git/locale/Makefile 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/Makefile ++++ git/locale/Makefile @@ -18,27 +18,43 @@ # # Makefile for locales. @@ -1810,7 +1899,7 @@ Index: git/locale/Makefile libBrokenLocale-routines = broken_cur_max -@@ -94,6 +110,9 @@ +@@ -93,6 +109,9 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-charmap-dir.c = -Wno-write-strings @@ -1818,12 +1907,12 @@ Index: git/locale/Makefile +CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS +endif - # This makes sure -DNOT_IN_libc et al are passed for all these modules. - cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ + # Set libof-* for each routine. + cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ Index: git/locale/programs/charmap-dir.c =================================================================== ---- git.orig/locale/programs/charmap-dir.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/charmap-dir.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/programs/charmap-dir.c ++++ git/locale/programs/charmap-dir.c @@ -19,7 +19,9 @@ #include <error.h> #include <fcntl.h> @@ -1834,7 +1923,7 @@ Index: git/locale/programs/charmap-dir.c #include <stdio.h> #include <stdlib.h> #include <string.h> -@@ -156,6 +158,7 @@ +@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir) return closedir (dir); } @@ -1842,7 +1931,7 @@ Index: git/locale/programs/charmap-dir.c /* Creates a subprocess decompressing the given pathname, and returns a stream reading its output (the decompressed data). */ static -@@ -204,6 +207,7 @@ +@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname } return NULL; } @@ -1850,7 +1939,7 @@ Index: git/locale/programs/charmap-dir.c /* Opens a charmap for reading, given its name (not an alias name). */ FILE * -@@ -226,6 +230,7 @@ +@@ -226,6 +230,7 @@ charmap_open (const char *directory, con if (stream != NULL) return stream; @@ -1858,7 +1947,7 @@ Index: git/locale/programs/charmap-dir.c memcpy (p, ".gz", 4); stream = fopen_uncompressed (pathname, "gzip"); if (stream != NULL) -@@ -235,6 +240,7 @@ +@@ -235,6 +240,7 @@ charmap_open (const char *directory, con stream = fopen_uncompressed (pathname, "bzip2"); if (stream != NULL) return stream; @@ -1866,22 +1955,11 @@ Index: git/locale/programs/charmap-dir.c return NULL; } -@@ -263,8 +269,8 @@ - char *alias = NULL; - char junk[BUFSIZ]; - -- if (fscanf (stream, " <code_set_name> %ms", &alias) == 1 -- || fscanf (stream, "%% alias %ms", &alias) == 1) -+ if (fscanf (stream, " <code_set_name> %as", &alias) == 1 -+ || fscanf (stream, "%% alias %as", &alias) == 1) - { - aliases = (char **) xrealloc (aliases, - (naliases + 2) * sizeof (char *)); Index: git/locale/programs/ld-collate.c =================================================================== ---- git.orig/locale/programs/ld-collate.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/ld-collate.c 2014-08-29 20:01:15.208070587 -0700 -@@ -350,7 +350,7 @@ +--- git.orig/locale/programs/ld-collate.c ++++ git/locale/programs/ld-collate.c +@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *co } if (wcs != NULL) { @@ -1890,7 +1968,7 @@ Index: git/locale/programs/ld-collate.c uint32_t zero = 0; /* Handle <U0000> as a single character. */ if (nwcs == 0) -@@ -1776,8 +1776,7 @@ +@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), if ((*eptr)->nwcs == runp->nwcs) { @@ -1900,7 +1978,7 @@ Index: git/locale/programs/ld-collate.c if (c == 0) { -@@ -2010,9 +2009,9 @@ +@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct elem one consecutive entry. */ if (runp->wcnext != NULL && runp->nwcs == runp->wcnext->nwcs @@ -1913,7 +1991,7 @@ Index: git/locale/programs/ld-collate.c && (runp->wcs[runp->nwcs - 1] == runp->wcnext->wcs[runp->nwcs - 1] + 1)) { -@@ -2036,9 +2035,9 @@ +@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct elem runp = runp->wcnext; while (runp->wcnext != NULL && runp->nwcs == runp->wcnext->nwcs @@ -1928,9 +2006,9 @@ Index: git/locale/programs/ld-collate.c Index: git/locale/programs/ld-ctype.c =================================================================== ---- git.orig/locale/programs/ld-ctype.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/ld-ctype.c 2014-08-29 20:01:15.208070587 -0700 -@@ -957,7 +957,7 @@ +--- git.orig/locale/programs/ld-ctype.c ++++ git/locale/programs/ld-ctype.c +@@ -960,7 +960,7 @@ ctype_output (struct localedef_t *locale allocate_arrays (ctype, charmap, ctype->repertoire); default_missing_len = (ctype->default_missing @@ -1939,7 +2017,7 @@ Index: git/locale/programs/ld-ctype.c : 0); init_locale_data (&file, nelems); -@@ -1968,7 +1968,7 @@ +@@ -1971,7 +1971,7 @@ read_translit_entry (struct linereader * ignore = 1; else /* This value is usable. */ @@ -1948,7 +2026,7 @@ Index: git/locale/programs/ld-ctype.c first = 0; } -@@ -2516,8 +2516,8 @@ +@@ -2519,8 +2519,8 @@ with character code range values one mus } handle_tok_digit: @@ -1959,7 +2037,7 @@ Index: git/locale/programs/ld-ctype.c handle_digits = 1; goto read_charclass; -@@ -4001,8 +4001,7 @@ +@@ -4002,8 +4002,7 @@ allocate_arrays (struct locale_ctype_t * while (idx < number) { @@ -1969,8 +2047,8 @@ Index: git/locale/programs/ld-ctype.c if (res == 0) { replace = 1; -@@ -4039,11 +4038,11 @@ - for (cnt = 0; cnt < number; ++cnt) +@@ -4040,11 +4039,11 @@ allocate_arrays (struct locale_ctype_t * + for (size_t cnt = 0; cnt < number; ++cnt) { struct translit_to_t *srunp; - from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1; @@ -1983,7 +2061,7 @@ Index: git/locale/programs/ld-ctype.c srunp = srunp->next; } /* Plus one for the extra NUL character marking the end of -@@ -4067,18 +4066,18 @@ +@@ -4068,18 +4067,18 @@ allocate_arrays (struct locale_ctype_t * ctype->translit_from_idx[cnt] = from_len; ctype->translit_to_idx[cnt] = to_len; @@ -2010,8 +2088,8 @@ Index: git/locale/programs/ld-ctype.c } Index: git/locale/programs/ld-messages.c =================================================================== ---- git.orig/locale/programs/ld-messages.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/ld-messages.c 2014-08-29 20:01:15.208070587 -0700 +--- git.orig/locale/programs/ld-messages.c ++++ git/locale/programs/ld-messages.c @@ -25,6 +25,7 @@ #include <string.h> #include <stdint.h> @@ -2020,7 +2098,7 @@ Index: git/locale/programs/ld-messages.c #include <assert.h> -@@ -124,6 +125,7 @@ +@@ -124,6 +125,7 @@ No definition for %s category found"), " } else { @@ -2028,7 +2106,7 @@ Index: git/locale/programs/ld-messages.c int result; regex_t re; -@@ -140,6 +142,7 @@ +@@ -140,6 +142,7 @@ No definition for %s category found"), " } else if (result != 0) regfree (&re); @@ -2036,7 +2114,7 @@ Index: git/locale/programs/ld-messages.c } if (messages->noexpr == NULL) -@@ -158,6 +161,7 @@ +@@ -158,6 +161,7 @@ No definition for %s category found"), " } else { @@ -2044,7 +2122,7 @@ Index: git/locale/programs/ld-messages.c int result; regex_t re; -@@ -174,6 +178,7 @@ +@@ -174,6 +178,7 @@ No definition for %s category found"), " } else if (result != 0) regfree (&re); @@ -2054,9 +2132,9 @@ Index: git/locale/programs/ld-messages.c Index: git/locale/programs/ld-time.c =================================================================== ---- git.orig/locale/programs/ld-time.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/ld-time.c 2014-08-29 20:01:15.208070587 -0700 -@@ -215,8 +215,10 @@ +--- git.orig/locale/programs/ld-time.c ++++ git/locale/programs/ld-time.c +@@ -215,8 +215,10 @@ No definition for %s category found"), " } else { @@ -2068,7 +2146,7 @@ Index: git/locale/programs/ld-time.c } } -@@ -226,7 +228,7 @@ +@@ -226,7 +228,7 @@ No definition for %s category found"), " const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31 ,30, 31 }; size_t idx; @@ -2077,7 +2155,7 @@ Index: git/locale/programs/ld-time.c time->era_entries = (struct era_data *) xmalloc (time->num_era -@@ -464,18 +466,18 @@ +@@ -464,18 +466,18 @@ No definition for %s category found"), " } /* Now generate the wide character name and format. */ @@ -2103,7 +2181,7 @@ Index: git/locale/programs/ld-time.c } else time->era_entries[idx].wname = -@@ -530,7 +532,16 @@ +@@ -530,7 +532,16 @@ No definition for %s category found"), " if (time->date_fmt == NULL) time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; if (time->wdate_fmt == NULL) @@ -2123,9 +2201,9 @@ Index: git/locale/programs/ld-time.c Index: git/locale/programs/linereader.c =================================================================== ---- git.orig/locale/programs/linereader.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/linereader.c 2014-08-29 20:01:15.208070587 -0700 -@@ -595,7 +595,7 @@ +--- git.orig/locale/programs/linereader.c ++++ git/locale/programs/linereader.c +@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const { int return_widestr = lr->return_widestr; char *buf; @@ -2136,9 +2214,9 @@ Index: git/locale/programs/linereader.c Index: git/locale/programs/localedef.c =================================================================== ---- git.orig/locale/programs/localedef.c 2014-08-29 20:00:47.416070587 -0700 -+++ git/locale/programs/localedef.c 2014-08-29 20:01:15.208070587 -0700 -@@ -114,6 +114,7 @@ +--- git.orig/locale/programs/localedef.c ++++ git/locale/programs/localedef.c +@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE #define OPT_LIST_ARCHIVE 309 #define OPT_LITTLE_ENDIAN 400 #define OPT_BIG_ENDIAN 401 @@ -2146,7 +2224,7 @@ Index: git/locale/programs/localedef.c /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = -@@ -150,6 +151,8 @@ +@@ -150,6 +151,8 @@ static const struct argp_option options[ N_("Generate little-endian output") }, { "big-endian", OPT_BIG_ENDIAN, NULL, 0, N_("Generate big-endian output") }, @@ -2155,7 +2233,7 @@ Index: git/locale/programs/localedef.c { NULL, 0, NULL, 0, NULL } }; -@@ -239,12 +242,14 @@ +@@ -239,12 +242,14 @@ main (int argc, char *argv[]) ctype locale. (P1003.2 4.35.5.2) */ setlocale (LC_CTYPE, "POSIX"); @@ -2170,7 +2248,7 @@ Index: git/locale/programs/localedef.c /* Process charmap file. */ charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); -@@ -338,6 +343,9 @@ +@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct ar case OPT_BIG_ENDIAN: set_big_endian (true); break; @@ -2182,9 +2260,9 @@ Index: git/locale/programs/localedef.c break; Index: git/locale/programs/locfile.c =================================================================== ---- git.orig/locale/programs/locfile.c 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/programs/locfile.c 2014-08-29 20:01:15.208070587 -0700 -@@ -544,6 +544,9 @@ +--- git.orig/locale/programs/locfile.c ++++ git/locale/programs/locfile.c +@@ -544,6 +544,9 @@ compare_files (const char *filename1, co machine running localedef. */ bool swap_endianness_p; @@ -2194,7 +2272,7 @@ Index: git/locale/programs/locfile.c /* When called outside a start_locale_structure/end_locale_structure or start_locale_prelude/end_locale_prelude block, record that the next byte in FILE's obstack will be the first byte of a new element. -@@ -621,7 +624,7 @@ +@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *f void add_locale_wstring (struct locale_file *file, const uint32_t *string) { @@ -2205,9 +2283,9 @@ Index: git/locale/programs/locfile.c /* Record that FILE's next element is the 32-bit integer VALUE. */ Index: git/locale/programs/locfile.h =================================================================== ---- git.orig/locale/programs/locfile.h 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/programs/locfile.h 2014-08-29 20:01:15.208070587 -0700 -@@ -71,6 +71,8 @@ +--- git.orig/locale/programs/locfile.h ++++ git/locale/programs/locfile.h +@@ -71,6 +71,8 @@ extern void write_all_categories (struct extern bool swap_endianness_p; @@ -2216,7 +2294,7 @@ Index: git/locale/programs/locfile.h /* Change the output to be big-endian if BIG_ENDIAN is true and little-endian otherwise. */ static inline void -@@ -275,4 +277,49 @@ +@@ -276,4 +278,49 @@ extern void identification_output (struc const struct charmap_t *charmap, const char *output_path); @@ -2268,9 +2346,9 @@ Index: git/locale/programs/locfile.h #endif /* locfile.h */ Index: git/locale/setlocale.c =================================================================== ---- git.orig/locale/setlocale.c 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/setlocale.c 2014-08-29 20:01:15.208070587 -0700 -@@ -64,36 +64,6 @@ +--- git.orig/locale/setlocale.c ++++ git/locale/setlocale.c +@@ -64,36 +64,6 @@ static char *const _nl_current_used[] = #endif @@ -2309,8 +2387,8 @@ Index: git/locale/setlocale.c #else Index: git/locale/xlocale.c =================================================================== ---- git.orig/locale/xlocale.c 2014-08-29 20:00:47.436070587 -0700 -+++ git/locale/xlocale.c 2014-08-29 20:01:15.208070587 -0700 +--- git.orig/locale/xlocale.c ++++ git/locale/xlocale.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ @@ -2319,7 +2397,7 @@ Index: git/locale/xlocale.c #include "localeinfo.h" #define DEFINE_CATEGORY(category, category_name, items, a) \ -@@ -25,6 +26,19 @@ +@@ -25,6 +26,19 @@ extern struct __locale_data _nl_C_##cate #include "categories.def" #undef DEFINE_CATEGORY @@ -2339,7 +2417,7 @@ Index: git/locale/xlocale.c /* Defined in locale/C-ctype.c. */ extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; -@@ -52,3 +66,26 @@ +@@ -52,3 +66,26 @@ const struct __locale_struct _nl_C_locob .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128 }; @@ -2368,9 +2446,9 @@ Index: git/locale/xlocale.c +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ Index: git/localedata/Makefile =================================================================== ---- git.orig/localedata/Makefile 2014-08-29 20:00:47.444070587 -0700 -+++ git/localedata/Makefile 2014-08-29 20:01:15.212070587 -0700 -@@ -21,12 +21,22 @@ +--- git.orig/localedata/Makefile ++++ git/localedata/Makefile +@@ -21,12 +21,22 @@ subdir := localedata include ../Makeconfig @@ -2396,7 +2474,7 @@ Index: git/localedata/Makefile subdir-dirs = tests-mbwc vpath %.c tests-mbwc -@@ -71,14 +81,20 @@ +@@ -71,14 +81,20 @@ locale_test_suite := tst_iswalnum tst_is tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ tst_wctype tst_wcwidth @@ -2419,22 +2497,23 @@ Index: git/localedata/Makefile ifneq (no,$(PERL)) tests-special += $(objpfx)mtrace-tst-leaks.out endif -@@ -92,12 +108,14 @@ - - tests: $(objdir)/iconvdata/gconv-modules +@@ -95,6 +111,7 @@ tests: $(objdir)/iconvdata/gconv-modules + tests-static += tst-langinfo-static + ifeq ($(run-built-tests),yes) +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ - $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \ - $(objpfx)tst-numeric.out - tests-static += tst-langinfo-static +@@ -113,6 +130,7 @@ CHARMAPS := $(shell echo "$(LOCALES)" | + CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES)) + tests-special += $(addprefix $(objpfx),$(CTYPE_FILES)) + endif +endif - ifeq ($(run-built-tests),yes) - # We have to generate locales -@@ -213,6 +231,11 @@ + include ../Rules + +@@ -205,6 +223,11 @@ endif include SUPPORTED @@ -2448,8 +2527,8 @@ Index: git/localedata/Makefile # Sometimes the whole collection of locale files should be installed. Index: git/login/Makefile =================================================================== ---- git.orig/login/Makefile 2014-08-29 20:00:47.736070587 -0700 -+++ git/login/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/login/Makefile ++++ git/login/Makefile @@ -18,6 +18,7 @@ # # Sub-makefile for login portion of the library. @@ -2458,7 +2537,7 @@ Index: git/login/Makefile subdir := login -@@ -25,14 +26,16 @@ +@@ -25,14 +26,16 @@ include ../Makeconfig headers := utmp.h bits/utmp.h lastlog.h pty.h @@ -2480,7 +2559,7 @@ Index: git/login/Makefile ifeq (yes,$(build-pt-chown)) others += pt_chown -@@ -46,8 +49,8 @@ +@@ -46,8 +49,8 @@ vpath %.c programs tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname # Build the -lutil library with these extra functions. @@ -2493,9 +2572,9 @@ Index: git/login/Makefile Index: git/Makeconfig =================================================================== ---- git.orig/Makeconfig 2014-08-29 20:00:42.956070587 -0700 -+++ git/Makeconfig 2014-08-29 20:01:15.212070587 -0700 -@@ -582,7 +582,7 @@ +--- git.orig/Makeconfig ++++ git/Makeconfig +@@ -582,7 +582,7 @@ elf-objpfx = $(common-objpfx)elf/ # and run on the build system, causes that program with those # arguments to be run on the host for which the library is built. ifndef test-wrapper @@ -2504,7 +2583,7 @@ Index: git/Makeconfig endif # Likewise, but the name of the program is preceded by # <variable>=<value> assignments for environment variables. -@@ -1057,6 +1057,24 @@ +@@ -1055,6 +1055,24 @@ else libm = $(common-objpfx)math/libm.a endif @@ -2531,9 +2610,9 @@ Index: git/Makeconfig # dependencies. Index: git/Makerules =================================================================== ---- git.orig/Makerules 2014-08-29 20:00:42.960070587 -0700 -+++ git/Makerules 2014-08-29 20:01:15.212070587 -0700 -@@ -379,6 +379,25 @@ +--- git.orig/Makerules ++++ git/Makerules +@@ -446,6 +446,25 @@ define sed-remove-objpfx endef endif @@ -2561,8 +2640,8 @@ Index: git/Makerules ifeq (yes,$(build-shared)) Index: git/malloc/Makefile =================================================================== ---- git.orig/malloc/Makefile 2014-08-29 20:00:47.760070587 -0700 -+++ git/malloc/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/malloc/Makefile ++++ git/malloc/Makefile @@ -18,6 +18,8 @@ # # Makefile for malloc routines @@ -2572,7 +2651,7 @@ Index: git/malloc/Makefile subdir := malloc include ../Makeconfig -@@ -36,9 +38,15 @@ +@@ -36,9 +38,15 @@ install-lib := libmcheck.a non-lib.a := libmcheck.a # Additional library. @@ -2588,7 +2667,7 @@ Index: git/malloc/Makefile libmemusage-routines = memusage libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) -@@ -67,7 +75,7 @@ +@@ -65,7 +73,7 @@ endif # Unless we get a test for the availability of libgd which also works # for cross-compiling we disable the memusagestat generation in this # situation. @@ -2599,8 +2678,8 @@ Index: git/malloc/Makefile others: $(objpfx)memusage Index: git/malloc/memusage.c =================================================================== ---- git.orig/malloc/memusage.c 2014-08-29 20:00:47.768070587 -0700 -+++ git/malloc/memusage.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/malloc/memusage.c ++++ git/malloc/memusage.c @@ -33,6 +33,7 @@ #include <stdint.h> #include <sys/mman.h> @@ -2609,7 +2688,7 @@ Index: git/malloc/memusage.c #include <memusage.h> -@@ -93,7 +94,11 @@ +@@ -93,7 +94,11 @@ static __thread uintptr_t start_sp; #define peak_stack peak_use[1] #define peak_total peak_use[2] @@ -2624,9 +2703,9 @@ Index: git/malloc/memusage.c static int fd = -1; Index: git/malloc/memusage.sh =================================================================== ---- git.orig/malloc/memusage.sh 2014-08-29 20:00:47.768070587 -0700 -+++ git/malloc/memusage.sh 2014-08-29 20:01:15.212070587 -0700 -@@ -35,7 +35,7 @@ +--- git.orig/malloc/memusage.sh ++++ git/malloc/memusage.sh +@@ -35,7 +35,7 @@ do_missing_arg() { # Print help message do_help() { @@ -2637,9 +2716,9 @@ Index: git/malloc/memusage.sh -n,--progname=NAME Name of the program file to profile Index: git/math/Makefile =================================================================== ---- git.orig/math/Makefile 2014-08-29 20:00:47.836070587 -0700 -+++ git/math/Makefile 2014-08-29 20:01:15.212070587 -0700 -@@ -21,6 +21,8 @@ +--- git.orig/math/Makefile ++++ git/math/Makefile +@@ -21,6 +21,8 @@ subdir := math include ../Makeconfig @@ -2648,7 +2727,7 @@ Index: git/math/Makefile # Installed header files. headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \ bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \ -@@ -33,8 +35,8 @@ +@@ -33,8 +35,8 @@ aux := setfpucw fpu_control # Build the -lm library. @@ -2657,12 +2736,12 @@ Index: git/math/Makefile +extra-libs-$(OPTION_EGLIBC_LIBM) := libm +extra-libs-others-$(OPTION_EGLIBC_LIBM) = $(extra-libs-$(OPTION_EGLIBC_LIBM)) - libm-support = k_standard s_lib_version s_matherr s_signgam \ + libm-support = s_lib_version s_matherr s_signgam \ fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \ Index: git/misc/err.c =================================================================== ---- git.orig/misc/err.c 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/err.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/err.c ++++ git/misc/err.c @@ -22,6 +22,7 @@ #include <errno.h> #include <string.h> @@ -2671,7 +2750,7 @@ Index: git/misc/err.c #include <wchar.h> #define flockfile(s) _IO_flockfile (s) -@@ -37,6 +38,7 @@ +@@ -37,6 +38,7 @@ extern char *__progname; va_end (ap); \ } @@ -2679,7 +2758,7 @@ Index: git/misc/err.c static void convert_and_print (const char *format, __gnuc_va_list ap) { -@@ -81,6 +83,7 @@ +@@ -81,6 +83,7 @@ convert_and_print (const char *format, _ __vfwprintf (stderr, wformat, ap); } @@ -2687,7 +2766,7 @@ Index: git/misc/err.c void vwarnx (const char *format, __gnuc_va_list ap) -@@ -88,9 +91,13 @@ +@@ -88,9 +91,13 @@ vwarnx (const char *format, __gnuc_va_li flockfile (stderr); if (_IO_fwide (stderr, 0) > 0) { @@ -2701,7 +2780,7 @@ Index: git/misc/err.c } else { -@@ -111,6 +118,7 @@ +@@ -111,6 +118,7 @@ vwarn (const char *format, __gnuc_va_lis flockfile (stderr); if (_IO_fwide (stderr, 0) > 0) { @@ -2709,7 +2788,7 @@ Index: git/misc/err.c __fwprintf (stderr, L"%s: ", __progname); if (format) { -@@ -119,6 +127,9 @@ +@@ -119,6 +127,9 @@ vwarn (const char *format, __gnuc_va_lis } __set_errno (error); __fwprintf (stderr, L"%m\n"); @@ -2721,8 +2800,8 @@ Index: git/misc/err.c { Index: git/misc/error.c =================================================================== ---- git.orig/misc/error.c 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/error.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/error.c ++++ git/misc/error.c @@ -35,6 +35,7 @@ #endif @@ -2731,7 +2810,7 @@ Index: git/misc/error.c # include <libintl.h> # include <stdbool.h> # include <stdint.h> -@@ -205,6 +206,7 @@ +@@ -205,6 +206,7 @@ error_tail (int status, int errnum, cons #if _LIBC if (_IO_fwide (stderr, 0) > 0) { @@ -2739,7 +2818,7 @@ Index: git/misc/error.c size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; -@@ -265,6 +267,9 @@ +@@ -265,6 +267,9 @@ error_tail (int status, int errnum, cons if (use_malloc) free (wmessage); @@ -2751,8 +2830,8 @@ Index: git/misc/error.c #endif Index: git/misc/Makefile =================================================================== ---- git.orig/misc/Makefile 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/Makefile ++++ git/misc/Makefile @@ -19,6 +19,10 @@ # Sub-makefile for misc portion of the library. # @@ -2764,7 +2843,7 @@ Index: git/misc/Makefile subdir := misc include ../Makeconfig -@@ -46,40 +50,47 @@ +@@ -46,40 +50,47 @@ routines := brk sbrk sstk ioctl \ select pselect \ acct chroot fsync sync fdatasync syncfs reboot \ gethostid sethostid \ @@ -2821,9 +2900,9 @@ Index: git/misc/Makefile CFLAGS-tsearch.c = $(uses-callbacks) Index: git/misc/tst-efgcvt.c =================================================================== ---- git.orig/misc/tst-efgcvt.c 2014-08-29 20:00:52.652070587 -0700 -+++ git/misc/tst-efgcvt.c 2014-08-29 20:01:15.216070587 -0700 -@@ -59,7 +59,7 @@ +--- git.orig/misc/tst-efgcvt.c ++++ git/misc/tst-efgcvt.c +@@ -59,7 +59,7 @@ static testcase ecvt_tests[] = { 123.01, -4, 3, "" }, { 126.71, -4, 3, "" }, { 0.0, 4, 1, "0000" }, @@ -2834,8 +2913,8 @@ Index: git/misc/tst-efgcvt.c #endif Index: git/nis/Makefile =================================================================== ---- git.orig/nis/Makefile 2014-08-29 20:00:52.660070587 -0700 -+++ git/nis/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nis/Makefile ++++ git/nis/Makefile @@ -18,6 +18,8 @@ # # Makefile for NIS/NIS+ part. @@ -2845,7 +2924,7 @@ Index: git/nis/Makefile subdir := nis include ../Makeconfig -@@ -30,19 +32,26 @@ +@@ -30,19 +32,26 @@ endif # These are the databases available for the nis (and perhaps later nisplus) # service. This must be a superset of the services in nss. @@ -2878,7 +2957,7 @@ Index: git/nis/Makefile vpath %.c $(subdir-dirs) libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ -@@ -60,11 +69,11 @@ +@@ -60,11 +69,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) @@ -2892,7 +2971,7 @@ Index: git/nis/Makefile nss-nisplus nisplus-initgroups libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) -@@ -80,12 +89,12 @@ +@@ -80,12 +89,12 @@ libnsl-libc = $(common-objpfx)linkobj/li # Target-specific variable setting to link objects using deprecated # RPC interfaces with the version of libc.so that makes them available # for new links: @@ -2910,8 +2989,8 @@ Index: git/nis/Makefile endif Index: git/nptl/Makefile =================================================================== ---- git.orig/nptl/Makefile 2014-08-29 20:00:52.704070587 -0700 -+++ git/nptl/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nptl/Makefile ++++ git/nptl/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for NPTL portion of the library. @@ -2921,7 +3000,7 @@ Index: git/nptl/Makefile subdir := nptl include ../Makeconfig -@@ -116,7 +118,7 @@ +@@ -117,7 +119,7 @@ libpthread-routines = nptl-init vars eve pt-raise pt-system \ flockfile ftrylockfile funlockfile \ sigaction \ @@ -2930,7 +3009,7 @@ Index: git/nptl/Makefile pthread_kill_other_threads \ pthread_getaffinity pthread_setaffinity \ pthread_attr_getaffinity pthread_attr_setaffinity \ -@@ -136,6 +138,8 @@ +@@ -137,6 +139,8 @@ libpthread-routines = nptl-init vars eve # pthread_setgid pthread_setegid pthread_setregid \ # pthread_setresgid @@ -2939,7 +3018,7 @@ Index: git/nptl/Makefile libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind libpthread-static-only-routines = pthread_atfork -@@ -210,7 +214,7 @@ +@@ -211,7 +215,7 @@ tests = tst-typesizes \ tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ tst-mutexpi9 \ @@ -2948,7 +3027,7 @@ Index: git/nptl/Makefile tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ -@@ -244,14 +248,14 @@ +@@ -245,14 +249,14 @@ tests = tst-typesizes \ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ @@ -2964,8 +3043,8 @@ Index: git/nptl/Makefile + tst-exec2 tst-exec3 tst-exec4 \ tst-exit1 tst-exit2 tst-exit3 \ tst-stdio1 tst-stdio2 \ - tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \ -@@ -259,13 +263,12 @@ + tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \ +@@ -260,13 +264,12 @@ tests = tst-typesizes \ tst-unload \ tst-dlsym1 \ tst-sysconf \ @@ -2980,7 +3059,7 @@ Index: git/nptl/Makefile tst-abstime \ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ tst-getpid1 tst-getpid2 tst-getpid3 \ -@@ -275,6 +278,17 @@ +@@ -277,6 +280,17 @@ xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 test-srcs = tst-oddstacklimit @@ -3000,17 +3079,17 @@ Index: git/nptl/Makefile Index: git/nptl/pthread_create.c =================================================================== ---- git.orig/nptl/pthread_create.c 2014-08-29 20:00:52.764070587 -0700 -+++ git/nptl/pthread_create.c 2014-08-29 20:01:15.216070587 -0700 -@@ -31,6 +31,7 @@ - #include <kernel-features.h> +--- git.orig/nptl/pthread_create.c ++++ git/nptl/pthread_create.c +@@ -32,6 +32,7 @@ #include <exit-thread.h> + #include <default-sched.h> +#include <gnu/option-groups.h> #include <shlib-compat.h> #include <stap-probe.h> -@@ -240,8 +241,10 @@ +@@ -261,8 +262,10 @@ START_THREAD_DEFN THREAD_SETMEM (pd, cpuclock_offset, now); #endif @@ -3021,7 +3100,7 @@ Index: git/nptl/pthread_create.c /* Initialize pointers to locale data. */ __ctype_init (); -@@ -322,8 +325,10 @@ +@@ -345,8 +348,10 @@ START_THREAD_DEFN /* Run the destructor for the thread-local data. */ __nptl_deallocate_tsd (); @@ -3034,8 +3113,8 @@ Index: git/nptl/pthread_create.c do not notify the debugger, it might just irritate it if there Index: git/nscd/Makefile =================================================================== ---- git.orig/nscd/Makefile 2014-08-29 20:00:52.948070587 -0700 -+++ git/nscd/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nscd/Makefile ++++ git/nscd/Makefile @@ -18,14 +18,17 @@ # # Sub-makefile for nscd portion of the library. @@ -3056,7 +3135,7 @@ Index: git/nscd/Makefile endif # To find xmalloc.c -@@ -37,14 +40,18 @@ +@@ -37,14 +40,18 @@ nscd-modules := nscd connections pwdcach dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \ xmalloc xstrdup aicache initgrcache gai res_hconf \ netgroupcache @@ -3080,7 +3159,7 @@ Index: git/nscd/Makefile endif -@@ -101,7 +108,15 @@ +@@ -100,7 +107,15 @@ include $(patsubst %,$(..)cppflags-itera $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) ifeq ($(build-shared),yes) @@ -3100,16 +3179,16 @@ Index: git/nscd/Makefile endif Index: git/nscd/nis_hash.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nscd/nis_hash.c 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nscd/nis_hash.c @@ -0,0 +1,3 @@ +/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so; + we need our own copy. */ +#include "../nis/nis_hash.c" Index: git/nss/fixed-nsswitch.conf =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/fixed-nsswitch.conf 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/fixed-nsswitch.conf @@ -0,0 +1,22 @@ +# /etc/nsswitch.conf +# @@ -3135,8 +3214,8 @@ Index: git/nss/fixed-nsswitch.conf +netgroup: files Index: git/nss/fixed-nsswitch.functions =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/fixed-nsswitch.functions 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/fixed-nsswitch.functions @@ -0,0 +1,121 @@ +/* List of functions defined for fixed NSS in GNU C Library. + Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. @@ -3261,8 +3340,8 @@ Index: git/nss/fixed-nsswitch.functions +DEFINE_GET (shadow, files, spnam) Index: git/nss/gen-fixed-nsswitch.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/gen-fixed-nsswitch.c 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/gen-fixed-nsswitch.c @@ -0,0 +1,803 @@ +/* gen-fixed-nsswitch.c --- generate fixed name service data structures + Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc. @@ -4069,8 +4148,8 @@ Index: git/nss/gen-fixed-nsswitch.c +} Index: git/nss/getent.c =================================================================== ---- git.orig/nss/getent.c 2014-08-29 20:00:52.976070587 -0700 -+++ git/nss/getent.c 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nss/getent.c ++++ git/nss/getent.c @@ -39,6 +39,7 @@ #include <netinet/ether.h> #include <netinet/in.h> @@ -4079,7 +4158,7 @@ Index: git/nss/getent.c /* Get libc version number. */ #include <version.h> -@@ -91,6 +92,7 @@ +@@ -91,6 +92,7 @@ warranty; not even for MERCHANTABILITY o fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } @@ -4087,7 +4166,7 @@ Index: git/nss/getent.c /* This is for aliases */ static void print_aliases (struct aliasent *alias) -@@ -135,7 +137,9 @@ +@@ -135,7 +137,9 @@ aliases_keys (int number, char *key[]) return result; } @@ -4097,7 +4176,7 @@ Index: git/nss/getent.c /* This is for ethers */ static int ethers_keys (int number, char *key[]) -@@ -179,6 +183,7 @@ +@@ -179,6 +183,7 @@ ethers_keys (int number, char *key[]) return result; } @@ -4105,7 +4184,7 @@ Index: git/nss/getent.c /* This is for group */ static void -@@ -301,6 +306,7 @@ +@@ -301,6 +306,7 @@ gshadow_keys (int number, char *key[]) return result; } @@ -4113,7 +4192,7 @@ Index: git/nss/getent.c /* This is for hosts */ static void print_hosts (struct hostent *host) -@@ -598,6 +604,7 @@ +@@ -598,6 +604,7 @@ networks_keys (int number, char *key[]) return result; } @@ -4121,7 +4200,7 @@ Index: git/nss/getent.c /* Now is all for passwd */ static void -@@ -650,6 +657,7 @@ +@@ -650,6 +657,7 @@ passwd_keys (int number, char *key[]) return result; } @@ -4129,7 +4208,7 @@ Index: git/nss/getent.c /* This is for protocols */ static void print_protocols (struct protoent *proto) -@@ -805,6 +813,7 @@ +@@ -805,6 +813,7 @@ services_keys (int number, char *key[]) return result; } @@ -4137,7 +4216,7 @@ Index: git/nss/getent.c /* This is for shadow */ static void -@@ -871,21 +880,34 @@ +@@ -871,21 +880,34 @@ struct } databases[] = { #define D(name) { #name, name ## _keys }, @@ -4167,11 +4246,11 @@ Index: git/nss/getent.c D(group) D(gshadow) -D(hosts) -+DN(hosts) -D(initgroups) -+DN(initgroups) -D(netgroup) -D(networks) ++DN(hosts) ++DN(initgroups) +DN(netgroup) +DN(networks) D(passwd) @@ -4186,8 +4265,8 @@ Index: git/nss/getent.c { NULL, NULL } Index: git/nss/getnssent_r.c =================================================================== ---- git.orig/nss/getnssent_r.c 2014-08-29 20:00:52.976070587 -0700 -+++ git/nss/getnssent_r.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/getnssent_r.c ++++ git/nss/getnssent_r.c @@ -16,6 +16,7 @@ <http://www.gnu.org/licenses/>. */ @@ -4196,7 +4275,7 @@ Index: git/nss/getnssent_r.c #include <netdb.h> #include "nsswitch.h" -@@ -59,11 +60,13 @@ +@@ -59,11 +60,13 @@ __nss_setent (const char *func_name, db_ } fct; int no_more; @@ -4210,7 +4289,7 @@ Index: git/nss/getnssent_r.c /* Cycle through the services and run their `setXXent' functions until we find an available service. */ -@@ -101,11 +104,13 @@ +@@ -101,11 +104,13 @@ __nss_endent (const char *func_name, db_ } fct; int no_more; @@ -4224,7 +4303,7 @@ Index: git/nss/getnssent_r.c /* Cycle through all the services and run their endXXent functions. */ no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1); -@@ -141,12 +146,14 @@ +@@ -141,12 +146,14 @@ __nss_getent_r (const char *getent_func_ int no_more; enum nss_status status; @@ -4239,7 +4318,7 @@ Index: git/nss/getnssent_r.c /* Initialize status to return if no more functions are found. */ status = NSS_STATUS_NOTFOUND; -@@ -161,7 +168,7 @@ +@@ -161,7 +168,7 @@ __nss_getent_r (const char *getent_func_ int is_last_nip = *nip == *last_nip; status = DL_CALL_FCT (fct.f, @@ -4250,8 +4329,8 @@ Index: git/nss/getnssent_r.c provided buffer is too small. In this case we should give Index: git/nss/Makefile =================================================================== ---- git.orig/nss/Makefile 2014-08-29 20:00:52.972070587 -0700 -+++ git/nss/Makefile 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/Makefile ++++ git/nss/Makefile @@ -18,29 +18,36 @@ # # Makefile for name service switch. @@ -4297,7 +4376,7 @@ Index: git/nss/Makefile # Specify rules for the nss_* modules. We have some services. services := files db -@@ -55,7 +62,7 @@ +@@ -55,7 +62,7 @@ subdir-dirs = $(services:%=nss_%) vpath %.c $(subdir-dirs) ../locale/programs ../intl @@ -4306,7 +4385,7 @@ Index: git/nss/Makefile files-initgroups files-have_o_cloexec files-init libnss_db-dbs := $(addprefix db-,\ -@@ -78,6 +85,45 @@ +@@ -78,6 +85,45 @@ tests-static = tst-nss-static tests += $(tests-static) endif @@ -4354,8 +4433,8 @@ Index: git/nss/Makefile ifeq (yes,$(have-selinux)) Index: git/nss/nsswitch.c =================================================================== ---- git.orig/nss/nsswitch.c 2014-08-29 20:00:53.004070587 -0700 -+++ git/nss/nsswitch.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/nsswitch.c ++++ git/nss/nsswitch.c @@ -26,6 +26,7 @@ #include <stdio_ext.h> #include <stdlib.h> @@ -4380,7 +4459,7 @@ Index: git/nss/nsswitch.c /* Prototypes for the local functions. */ static name_database *nss_parse_file (const char *fname) internal_function; static name_database_entry *nss_getline (char *line) internal_function; -@@ -79,6 +89,9 @@ +@@ -79,6 +89,9 @@ bool __nss_database_custom[NSS_DBSIDX_ma __libc_lock_define_initialized (static, lock) @@ -4390,7 +4469,7 @@ Index: git/nss/nsswitch.c #if !defined DO_STATIC_NSS || defined SHARED /* String with revision number of the shared object files. */ static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15; -@@ -93,6 +106,20 @@ +@@ -93,6 +106,20 @@ static name_database *service_table; __libc_freeres. */ static name_database_entry *defconfig_entries; @@ -4411,7 +4490,7 @@ Index: git/nss/nsswitch.c #ifdef USE_NSCD /* Nonzero if this is the nscd process. */ -@@ -109,20 +136,22 @@ +@@ -109,20 +136,22 @@ __nss_database_lookup (const char *datab const char *defconfig, service_user **ni) { /* Prevent multiple threads to change the service table. */ @@ -4436,7 +4515,7 @@ Index: git/nss/nsswitch.c /* Test whether configuration data is available. */ if (service_table != NULL) -@@ -144,6 +173,7 @@ +@@ -144,6 +173,7 @@ __nss_database_lookup (const char *datab *ni = entry->service; } @@ -4444,7 +4523,7 @@ Index: git/nss/nsswitch.c /* No configuration data is available, either because nsswitch.conf doesn't exist or because it doesn't have a line for this database. -@@ -166,13 +196,23 @@ +@@ -166,13 +196,23 @@ __nss_database_lookup (const char *datab { entry->next = defconfig_entries; entry->service = *ni; @@ -4470,7 +4549,7 @@ Index: git/nss/nsswitch.c return *ni != NULL ? 0 : -1; } -@@ -252,6 +292,7 @@ +@@ -252,6 +292,7 @@ __nss_next2 (service_user **ni, const ch libc_hidden_def (__nss_next2) @@ -4478,7 +4557,7 @@ Index: git/nss/nsswitch.c int attribute_compat_text_section __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, -@@ -300,13 +341,13 @@ +@@ -300,13 +341,13 @@ __nss_configure_lookup (const char *dbna } /* Prevent multiple threads to change the service table. */ @@ -4494,7 +4573,7 @@ Index: git/nss/nsswitch.c return 0; } -@@ -402,7 +443,7 @@ +@@ -402,7 +443,7 @@ __nss_lookup_function (service_user *ni, void **found, *result; /* We now modify global data. Protect it. */ @@ -4503,7 +4582,7 @@ Index: git/nss/nsswitch.c /* Search the tree of functions previously requested. Data in the tree are `known_function' structures, whose first member is a -@@ -413,7 +454,7 @@ +@@ -413,7 +454,7 @@ __nss_lookup_function (service_user *ni, enough to a pointer to our structure to use as a lookup key that will be passed to `known_compare' (above). */ @@ -4512,7 +4591,7 @@ Index: git/nss/nsswitch.c if (found == NULL) /* This means out-of-memory. */ result = NULL; -@@ -440,7 +481,7 @@ +@@ -440,7 +481,7 @@ __nss_lookup_function (service_user *ni, #endif /* Oops. We can't instantiate this node properly. Remove it from the tree. */ @@ -4521,7 +4600,7 @@ Index: git/nss/nsswitch.c free (known); result = NULL; } -@@ -520,13 +561,43 @@ +@@ -520,13 +561,43 @@ __nss_lookup_function (service_user *ni, } /* Remove the lock. */ @@ -4566,7 +4645,7 @@ Index: git/nss/nsswitch.c static name_database * internal_function nss_parse_file (const char *fname) -@@ -632,8 +703,10 @@ +@@ -632,8 +703,10 @@ nss_parse_service_list (const char *line + (line - name + 1)); if (new_service == NULL) return result; @@ -4578,7 +4657,7 @@ Index: git/nss/nsswitch.c /* Set default actions. */ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE; -@@ -642,7 +715,7 @@ +@@ -642,7 +715,7 @@ nss_parse_service_list (const char *line new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN; new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN; new_service->library = NULL; @@ -4587,7 +4666,7 @@ Index: git/nss/nsswitch.c new_service->next = NULL; while (isspace (line[0])) -@@ -778,9 +851,10 @@ +@@ -778,9 +851,10 @@ nss_getline (char *line) result = (name_database_entry *) malloc (sizeof (name_database_entry) + len); if (result == NULL) return NULL; @@ -4599,7 +4678,7 @@ Index: git/nss/nsswitch.c /* Parse the list of services. */ result->service = nss_parse_service_list (line); -@@ -816,6 +890,7 @@ +@@ -816,6 +890,7 @@ nss_new_service (name_database *database return *currentp; } #endif @@ -4607,7 +4686,7 @@ Index: git/nss/nsswitch.c #if defined SHARED && defined USE_NSCD -@@ -834,6 +909,7 @@ +@@ -834,6 +909,7 @@ nss_load_all_libraries (const char *serv } @@ -4615,7 +4694,7 @@ Index: git/nss/nsswitch.c /* Called by nscd and nscd alone. */ void __nss_disable_nscd (void (*cb) (size_t, struct traced_file *)) -@@ -857,8 +933,10 @@ +@@ -857,8 +933,10 @@ __nss_disable_nscd (void (*cb) (size_t, __nss_not_use_nscd_services = -1; __nss_not_use_nscd_netgroup = -1; } @@ -4626,7 +4705,7 @@ Index: git/nss/nsswitch.c static void free_database_entries (name_database_entry *entry) { -@@ -871,8 +949,8 @@ +@@ -871,8 +949,8 @@ free_database_entries (name_database_ent { service_user *olds = service; @@ -4637,16 +4716,16 @@ Index: git/nss/nsswitch.c service = service->next; free (olds); -@@ -926,3 +1004,4 @@ +@@ -926,3 +1004,4 @@ libc_freeres_fn (free_mem) free (top); } +#endif /* __OPTION_EGLIBC_NSSWITCH */ Index: git/nss/nsswitch.h =================================================================== ---- git.orig/nss/nsswitch.h 2014-08-29 20:00:53.012070587 -0700 -+++ git/nss/nsswitch.h 2014-08-29 20:01:15.220070587 -0700 -@@ -65,10 +65,20 @@ +--- git.orig/nss/nsswitch.h ++++ git/nss/nsswitch.h +@@ -65,10 +65,20 @@ typedef struct service_user lookup_actions actions[5]; /* Link to the underlying library object. */ service_library *library; @@ -4670,7 +4749,7 @@ Index: git/nss/nsswitch.h } service_user; /* To access the action based on the status value use this macro. */ -@@ -82,7 +92,7 @@ +@@ -82,7 +92,7 @@ typedef struct name_database_entry /* List of service to be used. */ service_user *service; /* Name of the database. */ @@ -4681,8 +4760,8 @@ Index: git/nss/nsswitch.h Index: git/posix/bug-regex1.c =================================================================== ---- git.orig/posix/bug-regex1.c 2014-08-29 20:00:53.184070587 -0700 -+++ git/posix/bug-regex1.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/bug-regex1.c ++++ git/posix/bug-regex1.c @@ -4,6 +4,7 @@ #include <string.h> #include <regex.h> @@ -4691,7 +4770,7 @@ Index: git/posix/bug-regex1.c int main (void) -@@ -17,7 +18,9 @@ +@@ -17,7 +18,9 @@ main (void) memset (®ex, '\0', sizeof (regex)); setlocale (LC_ALL, "de_DE.ISO-8859-1"); @@ -4703,8 +4782,8 @@ Index: git/posix/bug-regex1.c Index: git/posix/bug-regex6.c =================================================================== ---- git.orig/posix/bug-regex6.c 2014-08-29 20:00:53.204070587 -0700 -+++ git/posix/bug-regex6.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/bug-regex6.c ++++ git/posix/bug-regex6.c @@ -22,6 +22,7 @@ #include <string.h> #include <sys/types.h> @@ -4713,7 +4792,7 @@ Index: git/posix/bug-regex6.c int -@@ -30,7 +31,12 @@ +@@ -30,7 +31,12 @@ main (int argc, char *argv[]) regex_t re; regmatch_t mat[10]; int i, j, ret = 0; @@ -4729,8 +4808,8 @@ Index: git/posix/bug-regex6.c { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, Index: git/posix/fnmatch.c =================================================================== ---- git.orig/posix/fnmatch.c 2014-08-29 20:00:53.208070587 -0700 -+++ git/posix/fnmatch.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/fnmatch.c ++++ git/posix/fnmatch.c @@ -30,6 +30,10 @@ #include <ctype.h> #include <string.h> @@ -4742,7 +4821,7 @@ Index: git/posix/fnmatch.c #if defined STDC_HEADERS || defined _LIBC # include <stdlib.h> #endif -@@ -131,7 +135,7 @@ +@@ -131,7 +135,7 @@ extern int fnmatch (const char *pattern, # define ISWCTYPE(WC, WT) iswctype (WC, WT) # endif @@ -4753,8 +4832,8 @@ Index: git/posix/fnmatch.c # endif Index: git/posix/fnmatch_loop.c =================================================================== ---- git.orig/posix/fnmatch_loop.c 2014-08-29 20:00:53.220070587 -0700 -+++ git/posix/fnmatch_loop.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/fnmatch_loop.c ++++ git/posix/fnmatch_loop.c @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -4764,7 +4843,7 @@ Index: git/posix/fnmatch_loop.c #include <stdint.h> struct STRUCT -@@ -54,10 +56,15 @@ +@@ -54,10 +56,15 @@ FCT (pattern, string, string_end, no_lea const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); # else @@ -4782,7 +4861,7 @@ Index: git/posix/fnmatch_loop.c while ((c = *p++) != L('\0')) { -@@ -277,7 +284,7 @@ +@@ -277,7 +284,7 @@ FCT (pattern, string, string_end, no_lea /* Leave room for the null. */ CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; size_t c1 = 0; @@ -4791,7 +4870,7 @@ Index: git/posix/fnmatch_loop.c wctype_t wt; #endif const CHAR *startp = p; -@@ -307,7 +314,7 @@ +@@ -307,7 +314,7 @@ FCT (pattern, string, string_end, no_lea } str[c1] = L('\0'); @@ -4800,7 +4879,7 @@ Index: git/posix/fnmatch_loop.c wt = IS_CHAR_CLASS (str); if (wt == 0) /* Invalid character class name. */ -@@ -681,8 +688,10 @@ +@@ -680,8 +687,10 @@ FCT (pattern, string, string_end, no_lea else lcollseq = __collseq_table_lookup (collseq, cold); # else @@ -4813,7 +4892,7 @@ Index: git/posix/fnmatch_loop.c # endif is_seqval = 0; -@@ -858,7 +867,7 @@ +@@ -857,7 +866,7 @@ FCT (pattern, string, string_end, no_lea goto matched; } # else @@ -4824,8 +4903,8 @@ Index: git/posix/fnmatch_loop.c Index: git/posix/glob.c =================================================================== ---- git.orig/posix/glob.c 2014-08-29 20:00:53.232070587 -0700 -+++ git/posix/glob.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/glob.c ++++ git/posix/glob.c @@ -25,6 +25,9 @@ #include <sys/types.h> #include <sys/stat.h> @@ -4836,7 +4915,7 @@ Index: git/posix/glob.c /* Outcomment the following line for production quality code. */ /* #define NDEBUG 1 */ -@@ -607,6 +610,7 @@ +@@ -607,6 +610,7 @@ glob (pattern, flags, errfunc, pglob) if (home_dir == NULL || home_dir[0] == '\0') home_dir = "c:/users/default"; /* poor default */ # else @@ -4844,7 +4923,7 @@ Index: git/posix/glob.c if (home_dir == NULL || home_dir[0] == '\0') { int success; -@@ -623,19 +627,19 @@ +@@ -623,19 +627,19 @@ glob (pattern, flags, errfunc, pglob) if (success) { struct passwd *p; @@ -4867,7 +4946,7 @@ Index: git/posix/glob.c if (__libc_use_alloca (alloca_used + pwbuflen)) pwtmpbuf = alloca_account (pwbuflen, alloca_used); else -@@ -682,9 +686,9 @@ +@@ -682,9 +686,9 @@ glob (pattern, flags, errfunc, pglob) } __set_errno (save); } @@ -4879,7 +4958,7 @@ Index: git/posix/glob.c if (p != NULL) { if (!malloc_pwtmpbuf) -@@ -713,6 +717,7 @@ +@@ -713,6 +717,7 @@ glob (pattern, flags, errfunc, pglob) } } } @@ -4889,8 +4968,8 @@ Index: git/posix/glob.c if (flags & GLOB_TILDE_CHECK) Index: git/posix/Makefile =================================================================== ---- git.orig/posix/Makefile 2014-08-29 20:00:53.160070587 -0700 -+++ git/posix/Makefile 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/Makefile ++++ git/posix/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for POSIX portion of the library. @@ -4900,7 +4979,7 @@ Index: git/posix/Makefile subdir := posix include ../Makeconfig -@@ -43,13 +45,24 @@ +@@ -43,13 +45,24 @@ routines := \ getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \ getresuid getresgid setresuid setresgid \ pathconf sysconf fpathconf \ @@ -4927,19 +5006,15 @@ Index: git/posix/Makefile spawn_faction_init spawn_faction_destroy spawn_faction_addclose \ spawn_faction_addopen spawn_faction_adddup2 \ spawnattr_init spawnattr_destroy \ -@@ -57,41 +70,53 @@ - spawnattr_getflags spawnattr_setflags \ - spawnattr_getpgroup spawnattr_setpgroup spawn spawnp spawni \ - spawnattr_getsigmask spawnattr_getschedpolicy spawnattr_getschedparam \ -- spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam \ -- posix_madvise \ -- get_child_max sched_cpucount sched_cpualloc sched_cpufree -+ spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam -+routines-$(OPTION_EGLIBC_WORDEXP) += wordexp +@@ -61,37 +74,53 @@ routines := \ + posix_madvise \ + get_child_max sched_cpucount sched_cpualloc sched_cpufree ++routines-$(OPTION_EGLIBC_WORDEXP) += wordexp ++ aux := init-posix environ -tests := tstgetopt testfnm runtests runptests \ -+tests := tstgetopt testfnm runtests \ ++tests := tstgetopt testfnm runtests \ tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \ - tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \ - tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \ @@ -4962,8 +5037,8 @@ Index: git/posix/Makefile + bug-regex8 bug-regex9 bug-regex10 bug-regex12 \ + bug-regex14 bug-regex15 \ + bug-regex21 bug-regex24 \ -+ bug-regex27 bug-regex28 bug-regex29 bug-regex30 \ -+ bug-regex31 \ ++ bug-regex27 bug-regex28 \ ++ bug-regex29 bug-regex30 bug-regex31 \ + tst-nice tst-nanosleep \ + transbug \ + tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ @@ -4979,22 +5054,23 @@ Index: git/posix/Makefile bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \ bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \ tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \ - tst-fnmatch3 bug-regex36 + tst-fnmatch3 bug-regex36 tst-getaddrinfo5 -xtests := bug-ga2 -+tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ -+ bug-regex23 bug-regex25 bug-regex32 bug-regex33 ++tests-$(OPTION_EGLIBC_LOCALE_CODE) \ ++ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ ++ bug-regex23 bug-regex25 bug-regex32 bug-regex33 +tests-$(OPTION_EGLIBC_INET) \ -+ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ -+ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 ++ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ ++ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 +tests-$(OPTION_POSIX_REGEXP_GLIBC) \ -+ += runptests bug-regex11 bug-regex13 bug-regex16 \ -+ tst-regex2 tst-rxspencer tst-pcre tst-boost ++ += runptests bug-regex11 bug-regex13 bug-regex16 \ ++ tst-regex2 tst-rxspencer tst-pcre tst-boost +ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC)) -+tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ -+ bug-regex22 bug-regex26 ++tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ ++ bug-regex22 bug-regex26 +endif +xtests-$(OPTION_EGLIBC_INET) += bug-ga2 ++ ifeq (yes,$(build-shared)) test-srcs := globtest -tests += wordexp-test tst-exec tst-spawn @@ -5004,7 +5080,7 @@ Index: git/posix/Makefile endif tests-static = tst-exec-static tst-spawn-static tests += $(tests-static) -@@ -117,7 +142,10 @@ +@@ -117,7 +146,10 @@ generated += $(addprefix wordexp-test-re ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) @@ -5016,7 +5092,7 @@ Index: git/posix/Makefile endif endif -@@ -125,12 +153,16 @@ +@@ -125,12 +157,16 @@ endif # XXX Please note that for now we ignore the result of this test. tests-special += $(objpfx)annexc.out ifeq ($(run-built-tests),yes) @@ -5036,7 +5112,7 @@ Index: git/posix/Makefile xtests-special += $(objpfx)bug-ga2-mem.out endif -@@ -143,6 +175,8 @@ +@@ -143,6 +179,8 @@ $(objpfx)globtest.out: globtest.sh $(obj $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \ '$(test-program-prefix)' '$(test-wrapper-env)'; \ $(evaluate-test) @@ -5045,7 +5121,7 @@ Index: git/posix/Makefile $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \ '$(run-program-env)' '$(test-program-prefix-after-env)'; \ -@@ -205,7 +239,10 @@ +@@ -205,7 +243,10 @@ tst-dir-ARGS = `pwd` `cd $(common-objdir tst-chmod-ARGS = $(objdir) tst-vfork3-ARGS = --test-dir=$(objpfx) @@ -5059,17 +5135,17 @@ Index: git/posix/Makefile tst-boost-ARGS = BOOST.tests Index: git/posix/regcomp.c =================================================================== ---- git.orig/posix/regcomp.c 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regcomp.c 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regcomp.c ++++ git/posix/regcomp.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <stdint.h> +#include <gnu/option-groups.h> - static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); -@@ -305,7 +306,7 @@ + #ifdef _LIBC + # include <locale/weight.h> +@@ -309,7 +310,7 @@ re_compile_fastmap_iter (regex_t *bufp, { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; @@ -5078,7 +5154,7 @@ Index: git/posix/regcomp.c for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; -@@ -315,9 +316,9 @@ +@@ -319,9 +320,9 @@ re_compile_fastmap_iter (regex_t *bufp, { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N @@ -5090,7 +5166,7 @@ Index: git/posix/regcomp.c wchar_t wc; mbstate_t state; -@@ -348,7 +349,11 @@ +@@ -352,7 +353,11 @@ re_compile_fastmap_iter (regex_t *bufp, re_set_fastmap (fastmap, icase, ch); } } @@ -5103,7 +5179,7 @@ Index: git/posix/regcomp.c else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; -@@ -376,7 +381,7 @@ +@@ -380,7 +385,7 @@ re_compile_fastmap_iter (regex_t *bufp, 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. */ @@ -5112,7 +5188,7 @@ Index: git/posix/regcomp.c && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes -@@ -404,7 +409,7 @@ +@@ -408,7 +413,7 @@ re_compile_fastmap_iter (regex_t *bufp, memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); @@ -5121,7 +5197,7 @@ Index: git/posix/regcomp.c { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) -@@ -413,7 +418,7 @@ +@@ -417,7 +422,7 @@ re_compile_fastmap_iter (regex_t *bufp, } } } @@ -5130,7 +5206,7 @@ Index: git/posix/regcomp.c else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD -@@ -856,11 +861,15 @@ +@@ -860,11 +865,15 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC @@ -5147,7 +5223,7 @@ Index: git/posix/regcomp.c #else # ifdef HAVE_LANGINFO_CODESET codeset_name = nl_langinfo (CODESET); -@@ -886,7 +895,7 @@ +@@ -890,7 +899,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) #endif #ifdef RE_ENABLE_I18N @@ -5156,7 +5232,7 @@ Index: git/posix/regcomp.c { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; -@@ -1784,7 +1793,7 @@ +@@ -1788,7 +1797,7 @@ peek_token (re_token_t *token, re_string token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; @@ -5165,7 +5241,7 @@ Index: git/posix/regcomp.c !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; -@@ -1805,7 +1814,7 @@ +@@ -1809,7 +1818,7 @@ peek_token (re_token_t *token, re_string token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N @@ -5174,7 +5250,7 @@ Index: git/posix/regcomp.c { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); -@@ -1919,7 +1928,7 @@ +@@ -1923,7 +1932,7 @@ peek_token (re_token_t *token, re_string token->type = CHARACTER; #ifdef RE_ENABLE_I18N @@ -5183,7 +5259,7 @@ Index: git/posix/regcomp.c { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; -@@ -2019,7 +2028,7 @@ +@@ -2023,7 +2032,7 @@ peek_token_bracket (re_token_t *token, r token->opr.c = c; #ifdef RE_ENABLE_I18N @@ -5192,7 +5268,7 @@ Index: git/posix/regcomp.c !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; -@@ -2242,7 +2251,7 @@ +@@ -2246,7 +2255,7 @@ parse_expression (re_string_t *regexp, r return NULL; } #ifdef RE_ENABLE_I18N @@ -5201,7 +5277,7 @@ Index: git/posix/regcomp.c { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) -@@ -2380,7 +2389,7 @@ +@@ -2384,7 +2393,7 @@ parse_expression (re_string_t *regexp, r *err = REG_ESPACE; return NULL; } @@ -5210,7 +5286,7 @@ Index: git/posix/regcomp.c dfa->has_mb_node = 1; break; case OP_WORD: -@@ -2686,7 +2695,7 @@ +@@ -2690,7 +2699,7 @@ build_range_exp (bitset_t sbcset, bracke However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes @@ -5219,7 +5295,7 @@ Index: git/posix/regcomp.c if (mbcset) { /* Check the space of the arrays. */ -@@ -2782,7 +2791,13 @@ +@@ -2786,7 +2795,13 @@ parse_bracket_exp (re_string_t *regexp, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC @@ -5233,7 +5309,7 @@ Index: git/posix/regcomp.c const char *collseqwc; uint32_t nrules; int32_t table_size; -@@ -2830,18 +2845,20 @@ +@@ -2834,18 +2849,20 @@ parse_bracket_exp (re_string_t *regexp, if (MB_CUR_MAX == 1) */ if (nrules == 0) @@ -5255,7 +5331,7 @@ Index: git/posix/regcomp.c else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); -@@ -2872,11 +2889,11 @@ +@@ -2876,11 +2893,11 @@ parse_bracket_exp (re_string_t *regexp, { /* No valid character. Match it as a single byte character. */ @@ -5269,7 +5345,7 @@ Index: git/posix/regcomp.c } return UINT_MAX; } -@@ -2916,7 +2933,7 @@ +@@ -2920,7 +2937,7 @@ parse_bracket_exp (re_string_t *regexp, However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ @@ -5278,7 +5354,7 @@ Index: git/posix/regcomp.c { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) -@@ -2953,7 +2970,7 @@ +@@ -2957,7 +2974,7 @@ parse_bracket_exp (re_string_t *regexp, if (MB_CUR_MAX == 1) */ if (nrules == 0) @@ -5287,7 +5363,7 @@ Index: git/posix/regcomp.c else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) -@@ -3031,7 +3048,10 @@ +@@ -3035,7 +3052,10 @@ parse_bracket_exp (re_string_t *regexp, re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; @@ -5299,7 +5375,7 @@ Index: git/posix/regcomp.c int equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ int non_match = 0; -@@ -3039,9 +3059,15 @@ +@@ -3043,9 +3063,15 @@ parse_bracket_exp (re_string_t *regexp, int token_len; int first_round = 1; #ifdef _LIBC @@ -5315,7 +5391,7 @@ Index: git/posix/regcomp.c if (nrules) { /* -@@ -3169,7 +3195,7 @@ +@@ -3175,7 +3201,7 @@ parse_bracket_exp (re_string_t *regexp, #else # ifdef RE_ENABLE_I18N *err = build_range_exp (sbcset, @@ -5324,7 +5400,7 @@ Index: git/posix/regcomp.c &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (sbcset, &start_elem, &end_elem); -@@ -3185,7 +3211,7 @@ +@@ -3191,7 +3217,7 @@ parse_bracket_exp (re_string_t *regexp, case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; @@ -5333,7 +5409,7 @@ Index: git/posix/regcomp.c case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) -@@ -3203,7 +3229,7 @@ +@@ -3209,7 +3235,7 @@ parse_bracket_exp (re_string_t *regexp, } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; @@ -5342,7 +5418,7 @@ Index: git/posix/regcomp.c case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N -@@ -3253,11 +3279,11 @@ +@@ -3259,11 +3285,11 @@ parse_bracket_exp (re_string_t *regexp, #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ @@ -5356,7 +5432,7 @@ Index: git/posix/regcomp.c || mbcset->non_match))) { bin_tree_t *mbc_tree; -@@ -3326,7 +3352,7 @@ +@@ -3332,7 +3358,7 @@ parse_bracket_element (bracket_elem_t *e re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) { @@ -5365,7 +5441,7 @@ Index: git/posix/regcomp.c int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) -@@ -3336,7 +3362,7 @@ +@@ -3342,7 +3368,7 @@ parse_bracket_element (bracket_elem_t *e re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } @@ -5374,7 +5450,7 @@ Index: git/posix/regcomp.c re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) -@@ -3416,7 +3442,9 @@ +@@ -3422,7 +3448,9 @@ build_equiv_class (bitset_t sbcset, re_c build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { @@ -5385,7 +5461,7 @@ Index: git/posix/regcomp.c uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { -@@ -3488,7 +3516,7 @@ +@@ -3492,7 +3520,7 @@ build_equiv_class (bitset_t sbcset, cons mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else @@ -5394,7 +5470,7 @@ Index: git/posix/regcomp.c { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; -@@ -3522,7 +3550,7 @@ +@@ -3526,7 +3554,7 @@ build_charclass (RE_TRANSLATE_TYPE trans && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; @@ -5403,7 +5479,7 @@ Index: git/posix/regcomp.c /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { -@@ -3538,7 +3566,7 @@ +@@ -3542,7 +3570,7 @@ build_charclass (RE_TRANSLATE_TYPE trans *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); @@ -5412,7 +5488,7 @@ Index: git/posix/regcomp.c #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ -@@ -3649,7 +3677,7 @@ +@@ -3653,7 +3681,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ @@ -5421,7 +5497,7 @@ Index: git/posix/regcomp.c bitset_mask (sbcset, dfa->sb_char); #endif -@@ -3661,7 +3689,7 @@ +@@ -3665,7 +3693,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR goto build_word_op_espace; #ifdef RE_ENABLE_I18N @@ -5432,8 +5508,8 @@ Index: git/posix/regcomp.c /* Build a tree for complex bracket. */ Index: git/posix/regexec.c =================================================================== ---- git.orig/posix/regexec.c 2014-08-29 20:00:53.268070587 -0700 -+++ git/posix/regexec.c 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regexec.c ++++ git/posix/regexec.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ @@ -5442,7 +5518,7 @@ Index: git/posix/regexec.c static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) internal_function; -@@ -186,11 +187,11 @@ +@@ -186,11 +187,11 @@ static int build_trtable (const re_dfa_t static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) internal_function; @@ -5456,7 +5532,7 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, -@@ -255,25 +256,9 @@ +@@ -255,25 +256,9 @@ regexec (preg, string, nmatch, pmatch, e return err != REG_NOERROR; } @@ -5485,7 +5561,7 @@ Index: git/posix/regexec.c /* Entry points for GNU code. */ -@@ -728,7 +713,7 @@ +@@ -728,7 +713,7 @@ re_search_internal (preg, string, length incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; @@ -5494,7 +5570,7 @@ Index: git/posix/regexec.c match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) -@@ -3448,7 +3433,7 @@ +@@ -3448,7 +3433,7 @@ out_free: if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; @@ -5503,7 +5579,7 @@ Index: git/posix/regexec.c need_word_trtable = 1; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, -@@ -3590,7 +3575,7 @@ +@@ -3590,7 +3575,7 @@ group_nodes_into_DFAstates (const re_dfa else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N @@ -5512,7 +5588,7 @@ Index: git/posix/regexec.c bitset_merge (accepts, dfa->sb_char); else #endif -@@ -3641,7 +3626,7 @@ +@@ -3641,7 +3626,7 @@ group_nodes_into_DFAstates (const re_dfa continue; } #ifdef RE_ENABLE_I18N @@ -5521,7 +5597,7 @@ Index: git/posix/regexec.c for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else -@@ -3660,7 +3645,7 @@ +@@ -3660,7 +3645,7 @@ group_nodes_into_DFAstates (const re_dfa continue; } #ifdef RE_ENABLE_I18N @@ -5530,7 +5606,7 @@ Index: git/posix/regexec.c for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else -@@ -3832,12 +3817,6 @@ +@@ -3836,12 +3821,6 @@ check_node_accept_bytes (const re_dfa_t if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; @@ -5543,7 +5619,7 @@ Index: git/posix/regexec.c int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); -@@ -3849,6 +3828,7 @@ +@@ -3853,6 +3832,7 @@ check_node_accept_bytes (const re_dfa_t match_len = char_len; goto check_node_accept_bytes_match; } @@ -5551,7 +5627,7 @@ Index: git/posix/regexec.c /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { -@@ -3859,8 +3839,16 @@ +@@ -3863,8 +3843,16 @@ check_node_accept_bytes (const re_dfa_t goto check_node_accept_bytes_match; } } @@ -5569,7 +5645,7 @@ Index: git/posix/regexec.c nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { -@@ -3953,8 +3941,12 @@ +@@ -3955,8 +3943,12 @@ check_node_accept_bytes (const re_dfa_t } } else @@ -5583,7 +5659,7 @@ Index: git/posix/regexec.c /* match with range expression? */ #if __GNUC__ >= 2 wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; -@@ -3973,6 +3965,7 @@ +@@ -3975,6 +3967,7 @@ check_node_accept_bytes (const re_dfa_t goto check_node_accept_bytes_match; } } @@ -5591,7 +5667,7 @@ Index: git/posix/regexec.c } check_node_accept_bytes_match: if (!cset->non_match) -@@ -3988,7 +3981,7 @@ +@@ -3990,7 +3983,7 @@ check_node_accept_bytes (const re_dfa_t return 0; } @@ -5600,7 +5676,7 @@ Index: git/posix/regexec.c static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) -@@ -4046,7 +4039,7 @@ +@@ -4048,7 +4041,7 @@ find_collation_sequence_value (const uns return UINT_MAX; } } @@ -5609,7 +5685,7 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th -@@ -4137,7 +4130,7 @@ +@@ -4139,7 +4132,7 @@ extend_buffers (re_match_context_t *mctx if (pstr->icase) { #ifdef RE_ENABLE_I18N @@ -5618,7 +5694,7 @@ Index: git/posix/regexec.c { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) -@@ -4150,7 +4143,7 @@ +@@ -4152,7 +4145,7 @@ extend_buffers (re_match_context_t *mctx else { #ifdef RE_ENABLE_I18N @@ -5629,8 +5705,8 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ Index: git/posix/regexec-compat.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/posix/regexec-compat.c 2014-08-29 20:01:15.224070587 -0700 +--- /dev/null ++++ git/posix/regexec-compat.c @@ -0,0 +1,39 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2008 Free Software Foundation, Inc. @@ -5673,8 +5749,8 @@ Index: git/posix/regexec-compat.c +#endif Index: git/posix/regex.h =================================================================== ---- git.orig/posix/regex.h 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex.h 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regex.h ++++ git/posix/regex.h @@ -21,6 +21,7 @@ #define _REGEX_H 1 @@ -5683,7 +5759,7 @@ Index: git/posix/regex.h /* Allow the use in C++ code. */ #ifdef __cplusplus -@@ -156,6 +157,8 @@ +@@ -156,6 +157,8 @@ typedef unsigned long int reg_syntax_t; treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) @@ -5692,7 +5768,7 @@ Index: git/posix/regex.h /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) -@@ -172,6 +175,7 @@ +@@ -172,6 +175,7 @@ typedef unsigned long int reg_syntax_t; /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) @@ -5700,7 +5776,7 @@ Index: git/posix/regex.h #endif /* This global variable defines the particular regexp syntax to use (for -@@ -231,8 +235,13 @@ +@@ -231,8 +235,13 @@ extern reg_syntax_t re_syntax_options; (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) @@ -5714,7 +5790,7 @@ Index: git/posix/regex.h /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this -@@ -298,9 +307,11 @@ +@@ -298,9 +307,11 @@ extern reg_syntax_t re_syntax_options; /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) @@ -5728,9 +5804,9 @@ Index: git/posix/regex.h /* If any error codes are removed, changed, or added, update the Index: git/posix/regex_internal.c =================================================================== ---- git.orig/posix/regex_internal.c 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex_internal.c 2014-08-29 20:01:15.224070587 -0700 -@@ -43,8 +43,8 @@ +--- git.orig/posix/regex_internal.c ++++ git/posix/regex_internal.c +@@ -43,8 +43,8 @@ re_string_allocate (re_string_t *pstr, c int init_buf_len; /* Ensure at least one character fits into the buffers. */ @@ -5741,7 +5817,7 @@ Index: git/posix/regex_internal.c init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); -@@ -55,7 +55,7 @@ +@@ -55,7 +55,7 @@ re_string_allocate (re_string_t *pstr, c pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; @@ -5750,7 +5826,7 @@ Index: git/posix/regex_internal.c pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } -@@ -82,7 +82,7 @@ +@@ -82,7 +82,7 @@ re_string_construct (re_string_t *pstr, if (icase) { #ifdef RE_ENABLE_I18N @@ -5759,7 +5835,7 @@ Index: git/posix/regex_internal.c { while (1) { -@@ -91,7 +91,7 @@ +@@ -91,7 +91,7 @@ re_string_construct (re_string_t *pstr, return ret; if (pstr->valid_raw_len >= len) break; @@ -5768,7 +5844,7 @@ Index: git/posix/regex_internal.c break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) -@@ -105,7 +105,7 @@ +@@ -105,7 +105,7 @@ re_string_construct (re_string_t *pstr, else { #ifdef RE_ENABLE_I18N @@ -5777,7 +5853,7 @@ Index: git/posix/regex_internal.c build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ -@@ -130,7 +130,7 @@ +@@ -130,7 +130,7 @@ internal_function __attribute_warn_unuse re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { #ifdef RE_ENABLE_I18N @@ -5786,7 +5862,7 @@ Index: git/posix/regex_internal.c { wint_t *new_wcs; -@@ -177,7 +177,7 @@ +@@ -177,7 +177,7 @@ re_string_construct_common (const char * pstr->trans = trans; pstr->icase = icase ? 1 : 0; pstr->mbs_allocated = (trans != NULL || icase); @@ -5795,7 +5871,7 @@ Index: git/posix/regex_internal.c pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; -@@ -203,7 +203,7 @@ +@@ -203,7 +203,7 @@ build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; @@ -5804,7 +5880,7 @@ Index: git/posix/regex_internal.c #else unsigned char buf[64]; #endif -@@ -226,7 +226,7 @@ +@@ -226,7 +226,7 @@ build_wcs_buffer (re_string_t *pstr) { int i, ch; @@ -5813,7 +5889,7 @@ Index: git/posix/regex_internal.c { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; -@@ -275,7 +275,7 @@ +@@ -275,7 +275,7 @@ build_wcs_upper_buffer (re_string_t *pst size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; @@ -5822,7 +5898,7 @@ Index: git/posix/regex_internal.c #else char buf[64]; #endif -@@ -369,7 +369,7 @@ +@@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pst { int i, ch; @@ -5831,7 +5907,7 @@ Index: git/posix/regex_internal.c { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; -@@ -567,8 +567,9 @@ +@@ -567,8 +567,9 @@ re_string_translate_buffer (re_string_t } /* This function re-construct the buffers. @@ -5843,7 +5919,7 @@ Index: git/posix/regex_internal.c static reg_errcode_t internal_function __attribute_warn_unused_result__ -@@ -579,7 +580,7 @@ +@@ -579,7 +580,7 @@ re_string_reconstruct (re_string_t *pstr { /* Reset buffer. */ #ifdef RE_ENABLE_I18N @@ -5852,7 +5928,7 @@ Index: git/posix/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; -@@ -670,7 +671,7 @@ +@@ -670,7 +671,7 @@ re_string_reconstruct (re_string_t *pstr pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N @@ -5861,7 +5937,7 @@ Index: git/posix/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ -@@ -699,7 +700,7 @@ +@@ -699,7 +700,7 @@ re_string_reconstruct (re_string_t *pstr #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N @@ -5870,7 +5946,7 @@ Index: git/posix/regex_internal.c { int wcs_idx; wint_t wc = WEOF; -@@ -711,7 +712,7 @@ +@@ -711,7 +712,7 @@ re_string_reconstruct (re_string_t *pstr /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; @@ -5879,7 +5955,7 @@ Index: git/posix/regex_internal.c if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; -@@ -803,7 +804,7 @@ +@@ -803,7 +804,7 @@ re_string_reconstruct (re_string_t *pstr /* Then build the buffers. */ #ifdef RE_ENABLE_I18N @@ -5888,7 +5964,7 @@ Index: git/posix/regex_internal.c { if (pstr->icase) { -@@ -841,7 +842,7 @@ +@@ -841,7 +842,7 @@ re_string_peek_byte_case (const re_strin return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N @@ -5897,7 +5973,7 @@ Index: git/posix/regex_internal.c && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif -@@ -930,7 +931,7 @@ +@@ -930,7 +931,7 @@ re_string_context_at (const re_string_t return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N @@ -5906,7 +5982,7 @@ Index: git/posix/regex_internal.c { wint_t wc; int wc_idx = idx; -@@ -1444,7 +1445,7 @@ +@@ -1444,7 +1445,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = @@ -5917,8 +5993,8 @@ Index: git/posix/regex_internal.c re_node_set_init_empty (dfa->edests + dfa->nodes_len); Index: git/posix/regex_internal.h =================================================================== ---- git.orig/posix/regex_internal.h 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex_internal.h 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regex_internal.h ++++ git/posix/regex_internal.h @@ -26,6 +26,10 @@ #include <stdlib.h> #include <string.h> @@ -5930,7 +6006,7 @@ Index: git/posix/regex_internal.h #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC # include <langinfo.h> #endif -@@ -370,6 +374,13 @@ +@@ -369,6 +373,13 @@ struct re_string_t }; typedef struct re_string_t re_string_t; @@ -5944,7 +6020,7 @@ Index: git/posix/regex_internal.h struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; -@@ -655,6 +666,14 @@ +@@ -654,6 +665,14 @@ struct re_dfa_t __libc_lock_define (, lock) }; @@ -5959,7 +6035,7 @@ Index: git/posix/regex_internal.h #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) -@@ -715,7 +734,7 @@ +@@ -714,7 +733,7 @@ internal_function __attribute__ ((pure, re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; @@ -5968,7 +6044,7 @@ Index: git/posix/regex_internal.h return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) -@@ -727,7 +746,7 @@ +@@ -726,7 +745,7 @@ static wint_t internal_function __attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, int idx) { @@ -5979,9 +6055,9 @@ Index: git/posix/regex_internal.h } Index: git/posix/xregex.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/posix/xregex.c 2014-08-29 20:01:15.228070587 -0700 -@@ -0,0 +1,8212 @@ +--- /dev/null ++++ git/posix/xregex.c +@@ -0,0 +1,8215 @@ +/* Extended regular expression matching and search library, + version 0.12. + (Implements POSIX draft P1003.2/D11.2, except for some of the @@ -6022,6 +6098,7 @@ Index: git/posix/xregex.c + +/*#include <ansidecl.h>*/ + ++ +#ifndef INSIDE_RECURSION + +# if defined STDC_HEADERS && !defined emacs @@ -6031,8 +6108,11 @@ Index: git/posix/xregex.c +# include <sys/types.h> +# endif + -+# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) -+ ++# if (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_BTOWC) ++# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) ++# else ++# define WIDE_CHAR_SUPPORT 0 ++# endif +/* For platform which support the ISO C amendement 1 functionality we + support user defined character classes. */ +# if WIDE_CHAR_SUPPORT @@ -6593,6 +6673,8 @@ Index: git/posix/xregex.c +# define PREFIX(name) byte_##name +# define ARG_PREFIX(name) name +# define PUT_CHAR(c) putchar (c) ++# include <locale/weight.h> ++# define FINDIDX findidx +#else +# ifdef WCHAR +# define CHAR_T wchar_t @@ -6606,6 +6688,10 @@ Index: git/posix/xregex.c +# define PUT_CHAR(c) printf ("%C", c); +# define TRUE 1 +# define FALSE 0 ++# define findidx findidxwc ++# include <locale/weightwc.h> ++# undef findidx ++# define FINDIDX findidxwc +# else +# ifdef MBS_SUPPORT +# define WCHAR @@ -8001,6 +8087,9 @@ Index: git/posix/xregex.c + reset the pointers that pointed into the old block to point to the + correct places in the new one. If extending the buffer results in it + being larger than MAX_BUF_SIZE, then flag memory exhausted. */ ++# ifndef __BOUNDED_POINTERS__ ++# define __BOUNDED_POINTERS__ 0 ++# endif +# if __BOUNDED_POINTERS__ +# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated) +# define MOVE_BUFFER_POINTER(P) \ @@ -8906,9 +8995,6 @@ Index: git/posix/xregex.c + const int32_t *indirect; + wint_t *cp; + -+ /* This #include defines a local function! */ -+# include <locale/weightwc.h> -+ + if(delim == '=') + { + /* We push the index for equivalence class. */ @@ -8920,14 +9006,14 @@ Index: git/posix/xregex.c + weights = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_WEIGHTWC); -+ extra = (const int32_t *) ++ extra = (const wint_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_EXTRAWC); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTWC); + -+ idx = findidx ((const wint_t**)&cp, c1); ++ idx = FINDIDX (table, indirect, extra, &cp, 1); + if (idx == 0 || cp < (wint_t*) str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); @@ -9364,9 +9450,6 @@ Index: git/posix/xregex.c + const unsigned char *cp = str; + int ch; + -+ /* This #include defines a local function! */ -+# include <locale/weight.h> -+ + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + weights = (const unsigned char *) @@ -9375,8 +9458,7 @@ Index: git/posix/xregex.c + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); -+ -+ idx = findidx (&cp, c1); ++ idx = FINDIDX (table, indirect, extra, &cp, 1); + if (idx == 0 || cp < str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); @@ -12319,9 +12401,6 @@ Index: git/posix/xregex.c + wint_t *cp; + size_t len; + -+ /* This #include defines a local function! */ -+# include <locale/weightwc.h> -+ + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); + weights = (const wint_t *) @@ -12347,7 +12426,7 @@ Index: git/posix/xregex.c + } + str_buf[i] = TRANSLATE(*(d+i)); + str_buf[i+1] = '\0'; /* sentinel */ -+ idx2 = findidx ((const wint_t**)&cp, i); ++ idx2 = FINDIDX (table, indirect, extra, &cp, 1); + } + + /* Update d, however d will be incremented at @@ -13129,8 +13208,8 @@ Index: git/posix/xregex.c + register from the stack, since lowest will == highest in + `pop_failure_point'. */ + active_reg_t dummy_low_reg, dummy_high_reg; -+ UCHAR_T *pdummy = NULL; -+ const CHAR_T *sdummy = NULL; ++ UCHAR_T *pdummy __attribute__ ((unused)) = NULL; ++ const CHAR_T *sdummy __attribute__ ((unused)) = NULL; + + DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); + POP_FAILURE_POINT (sdummy, pdummy, @@ -14196,8 +14275,8 @@ Index: git/posix/xregex.c +# define DEFINED_ONCE Index: git/pwd/Makefile =================================================================== ---- git.orig/pwd/Makefile 2014-08-29 20:00:53.316070587 -0700 -+++ git/pwd/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/pwd/Makefile ++++ git/pwd/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for pwd portion of the library. @@ -14209,8 +14288,8 @@ Index: git/pwd/Makefile include ../Makeconfig Index: git/resolv/Makefile =================================================================== ---- git.orig/resolv/Makefile 2014-08-29 20:00:53.320070587 -0700 -+++ git/resolv/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/resolv/Makefile ++++ git/resolv/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for resolv portion of the library. @@ -14220,7 +14299,7 @@ Index: git/resolv/Makefile subdir := resolv include ../Makeconfig -@@ -27,20 +29,21 @@ +@@ -27,20 +29,21 @@ headers := resolv.h \ arpa/nameser.h arpa/nameser_compat.h \ sys/bitypes.h @@ -14250,7 +14329,7 @@ Index: git/resolv/Makefile libresolv-routines := gethnamaddr res_comp res_debug \ res_data res_mkquery res_query res_send \ inet_net_ntop inet_net_pton inet_neta base64 \ -@@ -60,7 +63,7 @@ +@@ -60,7 +63,7 @@ routines += $(libnss_dns- static-only-routines += $(libnss_dns-routines) $(libresolv-routines) endif @@ -14261,8 +14340,8 @@ Index: git/resolv/Makefile Index: git/stdio-common/fxprintf.c =================================================================== ---- git.orig/stdio-common/fxprintf.c 2014-08-29 20:00:53.544070587 -0700 -+++ git/stdio-common/fxprintf.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/fxprintf.c ++++ git/stdio-common/fxprintf.c @@ -23,6 +23,7 @@ #include <wchar.h> #include <string.h> @@ -14271,7 +14350,7 @@ Index: git/stdio-common/fxprintf.c int -@@ -37,6 +38,7 @@ +@@ -37,6 +38,7 @@ __fxprintf (FILE *fp, const char *fmt, . int res; if (_IO_fwide (fp, 0) > 0) { @@ -14279,7 +14358,7 @@ Index: git/stdio-common/fxprintf.c size_t len = strlen (fmt) + 1; wchar_t wfmt[len]; for (size_t i = 0; i < len; ++i) -@@ -45,6 +47,9 @@ +@@ -45,6 +47,9 @@ __fxprintf (FILE *fp, const char *fmt, . wfmt[i] = fmt[i]; } res = __vfwprintf (fp, wfmt, ap); @@ -14291,8 +14370,8 @@ Index: git/stdio-common/fxprintf.c res = _IO_vfprintf (fp, fmt, ap); Index: git/stdio-common/_i18n_number.h =================================================================== ---- git.orig/stdio-common/_i18n_number.h 2014-08-29 20:00:53.500070587 -0700 -+++ git/stdio-common/_i18n_number.h 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/_i18n_number.h ++++ git/stdio-common/_i18n_number.h @@ -19,10 +19,13 @@ #include <stdbool.h> #include <wchar.h> @@ -14307,7 +14386,7 @@ Index: git/stdio-common/_i18n_number.h static CHAR_T * _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) { -@@ -115,3 +118,13 @@ +@@ -115,3 +118,13 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T return w; } @@ -14323,8 +14402,8 @@ Index: git/stdio-common/_i18n_number.h +#endif Index: git/stdio-common/Makefile =================================================================== ---- git.orig/stdio-common/Makefile 2014-08-29 20:00:53.500070587 -0700 -+++ git/stdio-common/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/Makefile ++++ git/stdio-common/Makefile @@ -18,6 +18,8 @@ # # Specific makefile for stdio-common. @@ -14334,7 +14413,7 @@ Index: git/stdio-common/Makefile subdir := stdio-common include ../Makeconfig -@@ -30,7 +32,7 @@ +@@ -30,7 +32,7 @@ routines := \ vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \ reg-modifier reg-type \ printf_size fprintf printf snprintf sprintf asprintf dprintf \ @@ -14343,7 +14422,7 @@ Index: git/stdio-common/Makefile fscanf scanf sscanf \ perror psignal \ tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname \ -@@ -41,23 +43,37 @@ +@@ -41,23 +43,36 @@ routines := \ isoc99_vsscanf \ psiginfo @@ -14351,10 +14430,10 @@ Index: git/stdio-common/Makefile +# Ideally, _itowa and itowa-digits would be in this option group as +# well, but it is used unconditionally by printf_fp and printf_fphex, +# and it didn't seem straightforward to disentangle it. -+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ -+ vfwprintf vfwscanf ++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ += vfwprintf vfwscanf + -+aux := errlist siglist printf-parsemb fxprintf ++aux := errlist siglist printf-parsemb fxprintf +aux-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += printf-parsewc tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ @@ -14368,7 +14447,6 @@ Index: git/stdio-common/Makefile - tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \ - tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \ + scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \ -+ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \ + tst-fseek tst-fmemopen tst-gets \ + tst-sprintf tst-rndseek tst-fdopen tst-fphex \ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \ @@ -14376,25 +14454,24 @@ Index: git/stdio-common/Makefile - bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \ - scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \ - bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \ -- bug25 tst-printf-round bug26 + tst-fwrite bug16 bug17 tst-sprintf2 bug18 \ -+ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \ -+ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \ -+ tst-printf-round bug26 -+ ++ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 \ ++ scanf16 scanf17 tst-setvbuf1 bug23 bug24 \ ++ bug-vfprintf-nargs tst-sprintf3 \ + bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping ++ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide ++ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += bug18a tst-swscanf tst-wc-printf ++ += bug18a tst-swscanf tst-wc-printf test-srcs = tst-unbputc tst-printf Index: git/stdio-common/printf_fp.c =================================================================== ---- git.orig/stdio-common/printf_fp.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_fp.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_fp.c ++++ git/stdio-common/printf_fp.c @@ -39,6 +39,7 @@ #include <unistd.h> #include <stdlib.h> @@ -14403,18 +14480,18 @@ Index: git/stdio-common/printf_fp.c #include <stdbool.h> #include <rounding-mode.h> -@@ -148,6 +149,10 @@ - wchar_t thousands_sep, int ngroups) - internal_function; +@@ -142,6 +143,10 @@ extern mp_size_t __mpn_extract_long_doub + extern unsigned int __guess_grouping (unsigned int intdig_max, + const char *grouping); +/* Ideally, when OPTION_EGLIBC_LOCALE_CODE is disabled, this should do + all its work in ordinary characters, rather than doing it in wide + characters and then converting at the end. But that is a challenge + for another day. */ - int - ___printf_fp (FILE *fp, -@@ -206,7 +211,14 @@ + static wchar_t *group_number (wchar_t *buf, wchar_t *bufend, + unsigned int intdig_no, const char *grouping, +@@ -251,7 +256,14 @@ ___printf_fp (FILE *fp, mp_limb_t cy; /* Nonzero if this is output on a wide character stream. */ @@ -14429,15 +14506,15 @@ Index: git/stdio-common/printf_fp.c /* Buffer in which we produce the output. */ wchar_t *wbuffer = NULL; -@@ -258,6 +270,7 @@ - +@@ -261,6 +273,7 @@ ___printf_fp (FILE *fp, + p.expsign = 0; /* Figure out the decimal point character. */ +#if __OPTION_EGLIBC_LOCALE_CODE if (info->extra == 0) { decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT); -@@ -277,7 +290,13 @@ +@@ -280,7 +293,13 @@ ___printf_fp (FILE *fp, /* The decimal point character must not be zero. */ assert (*decimal != '\0'); assert (decimalwc != L'\0'); @@ -14451,7 +14528,7 @@ Index: git/stdio-common/printf_fp.c if (info->group) { if (info->extra == 0) -@@ -321,6 +340,9 @@ +@@ -324,6 +343,9 @@ ___printf_fp (FILE *fp, } else grouping = NULL; @@ -14463,8 +14540,8 @@ Index: git/stdio-common/printf_fp.c #ifndef __NO_LONG_DOUBLE_MATH Index: git/stdio-common/printf_fphex.c =================================================================== ---- git.orig/stdio-common/printf_fphex.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_fphex.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_fphex.c ++++ git/stdio-common/printf_fphex.c @@ -28,6 +28,7 @@ #include <_itoa.h> #include <_itowa.h> @@ -14473,7 +14550,7 @@ Index: git/stdio-common/printf_fphex.c #include <stdbool.h> #include <rounding-mode.h> -@@ -139,10 +140,18 @@ +@@ -139,10 +140,18 @@ __printf_fphex (FILE *fp, int done = 0; /* Nonzero if this is output on a wide character stream. */ @@ -14492,7 +14569,7 @@ Index: git/stdio-common/printf_fphex.c if (info->extra == 0) { decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT); -@@ -156,6 +165,10 @@ +@@ -156,6 +165,10 @@ __printf_fphex (FILE *fp, } /* The decimal point character must never be zero. */ assert (*decimal != '\0' && decimalwc != L'\0'); @@ -14505,8 +14582,8 @@ Index: git/stdio-common/printf_fphex.c /* Fetch the argument value. */ Index: git/stdio-common/printf_size.c =================================================================== ---- git.orig/stdio-common/printf_size.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_size.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_size.c ++++ git/stdio-common/printf_size.c @@ -23,6 +23,7 @@ #include <math.h> #include <printf.h> @@ -14515,7 +14592,7 @@ Index: git/stdio-common/printf_size.c /* This defines make it possible to use the same code for GNU C library and -@@ -116,7 +117,14 @@ +@@ -116,7 +117,14 @@ __printf_size (FILE *fp, const struct pr struct printf_info fp_info; int done = 0; @@ -14532,25 +14609,25 @@ Index: git/stdio-common/printf_size.c /* Fetch the argument value. */ Index: git/stdio-common/scanf14.c =================================================================== ---- git.orig/stdio-common/scanf14.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/scanf14.c 2014-08-29 20:01:15.232070587 -0700 -@@ -2,6 +2,7 @@ - #include <stdlib.h> +--- git.orig/stdio-common/scanf14.c ++++ git/stdio-common/scanf14.c +@@ -3,6 +3,7 @@ #include <string.h> #include <wchar.h> + #include <libc-internal.h> +#include <gnu/option-groups.h> #define FAIL() \ do { \ -@@ -36,6 +37,7 @@ - FAIL (); - else if (d != 2.25 || memcmp (c, " x", 2) != 0) - FAIL (); +@@ -48,6 +49,7 @@ main (void) + /* See explanation above. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat"); +#if __OPTION_EGLIBC_LOCALE_CODE if (sscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2) FAIL (); else -@@ -45,6 +47,7 @@ +@@ -57,6 +59,7 @@ main (void) memset (lsp, 'x', sizeof L"3.25"); free (lsp); } @@ -14560,17 +14637,17 @@ Index: git/stdio-common/scanf14.c else Index: git/stdio-common/tstdiomisc.c =================================================================== ---- git.orig/stdio-common/tstdiomisc.c 2014-08-29 20:00:53.584070587 -0700 -+++ git/stdio-common/tstdiomisc.c 2014-08-29 20:01:15.232070587 -0700 -@@ -3,6 +3,7 @@ - #include <stdio.h> +--- git.orig/stdio-common/tstdiomisc.c ++++ git/stdio-common/tstdiomisc.c +@@ -4,6 +4,7 @@ #include <string.h> #include <wchar.h> + #include <libc-internal.h> +#include <gnu/option-groups.h> static int t1 (void) -@@ -125,6 +126,7 @@ +@@ -134,6 +135,7 @@ F (void) printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", buf); @@ -14578,7 +14655,7 @@ Index: git/stdio-common/tstdiomisc.c swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", qnanval, qnanval, qnanval, qnanval, qnanval, qnanval, qnanval, qnanval); -@@ -162,6 +164,7 @@ +@@ -171,6 +173,7 @@ F (void) result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", wbuf); @@ -14586,7 +14663,7 @@ Index: git/stdio-common/tstdiomisc.c lqnanval = NAN; -@@ -206,6 +209,7 @@ +@@ -215,6 +218,7 @@ F (void) printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", buf); @@ -14594,7 +14671,7 @@ Index: git/stdio-common/tstdiomisc.c swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%La %LA %Le %LE %Lf %LF %Lg %LG", lqnanval, lqnanval, lqnanval, lqnanval, -@@ -250,6 +254,7 @@ +@@ -259,6 +263,7 @@ F (void) result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", wbuf); @@ -14604,8 +14681,8 @@ Index: git/stdio-common/tstdiomisc.c } Index: git/stdio-common/tst-popen.c =================================================================== ---- git.orig/stdio-common/tst-popen.c 2014-08-29 20:00:53.576070587 -0700 -+++ git/stdio-common/tst-popen.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/tst-popen.c ++++ git/stdio-common/tst-popen.c @@ -19,6 +19,7 @@ #include <stdio.h> #include <string.h> @@ -14614,7 +14691,7 @@ Index: git/stdio-common/tst-popen.c static int do_test (void) -@@ -34,12 +35,14 @@ +@@ -34,12 +35,14 @@ do_test (void) return 1; } @@ -14631,17 +14708,18 @@ Index: git/stdio-common/tst-popen.c { Index: git/stdio-common/tst-sprintf.c =================================================================== ---- git.orig/stdio-common/tst-sprintf.c 2014-08-29 20:00:53.580070587 -0700 -+++ git/stdio-common/tst-sprintf.c 2014-08-29 20:01:15.236070587 -0700 -@@ -2,6 +2,7 @@ - #include <stdlib.h> +--- git.orig/stdio-common/tst-sprintf.c ++++ git/stdio-common/tst-sprintf.c +@@ -3,7 +3,7 @@ #include <locale.h> #include <string.h> + #include <libc-internal.h> +- +#include <gnu/option-groups.h> - - int -@@ -10,12 +11,14 @@ + static int + do_test (void) +@@ -11,12 +11,14 @@ do_test (void) char buf[100]; int result = 0; @@ -14658,8 +14736,8 @@ Index: git/stdio-common/tst-sprintf.c #define STR(x) #x Index: git/stdio-common/vfprintf.c =================================================================== ---- git.orig/stdio-common/vfprintf.c 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdio-common/vfprintf.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdio-common/vfprintf.c ++++ git/stdio-common/vfprintf.c @@ -29,6 +29,7 @@ #include <_itoa.h> #include <locale/localeinfo.h> @@ -14687,7 +14765,7 @@ Index: git/stdio-common/vfprintf.c #include "_i18n_number.h" /* Include the shared code for parsing the format string. */ -@@ -1123,8 +1136,11 @@ +@@ -1129,8 +1142,11 @@ vfprintf (FILE *s, const CHAR_T *format, # define process_string_arg(fspec) \ LABEL (form_character): \ /* Character. */ \ @@ -14701,7 +14779,7 @@ Index: git/stdio-common/vfprintf.c --width; /* Account for the character itself. */ \ if (!left) \ PAD (' '); \ -@@ -1137,6 +1153,7 @@ +@@ -1143,6 +1159,7 @@ vfprintf (FILE *s, const CHAR_T *format, break; \ \ LABEL (form_wcharacter): \ @@ -14709,7 +14787,7 @@ Index: git/stdio-common/vfprintf.c { \ /* Wide character. */ \ char buf[MB_CUR_MAX]; \ -@@ -1203,6 +1220,7 @@ +@@ -1209,6 +1226,7 @@ vfprintf (FILE *s, const CHAR_T *format, } \ else \ { \ @@ -14717,7 +14795,7 @@ Index: git/stdio-common/vfprintf.c const wchar_t *s2 = (const wchar_t *) string; \ mbstate_t mbstate; \ \ -@@ -1403,7 +1421,9 @@ +@@ -1409,7 +1427,9 @@ vfprintf (FILE *s, const CHAR_T *format, LABEL (flag_quote): group = 1; @@ -14728,7 +14806,7 @@ Index: git/stdio-common/vfprintf.c { #ifdef COMPILE_WPRINTF thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, -@@ -1702,7 +1722,9 @@ +@@ -1708,7 +1728,9 @@ do_positional: free (workstart); workstart = NULL; @@ -14741,8 +14819,8 @@ Index: git/stdio-common/vfprintf.c thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, Index: git/stdio-common/vfscanf.c =================================================================== ---- git.orig/stdio-common/vfscanf.c 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdio-common/vfscanf.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdio-common/vfscanf.c ++++ git/stdio-common/vfscanf.c @@ -29,6 +29,7 @@ #include <wctype.h> #include <bits/libc-lock.h> @@ -14764,7 +14842,7 @@ Index: git/stdio-common/vfscanf.c #define encode_error() do { \ errval = 4; \ __set_errno (EILSEQ); \ -@@ -316,24 +323,35 @@ +@@ -316,24 +323,35 @@ _IO_vfscanf_internal (_IO_FILE *s, const ARGCHECK (s, format); { @@ -14807,7 +14885,7 @@ Index: git/stdio-common/vfscanf.c } /* Lock the stream. */ -@@ -385,6 +403,8 @@ +@@ -385,6 +403,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const #ifndef COMPILE_WSCANF if (!isascii ((unsigned char) *f)) { @@ -14816,7 +14894,7 @@ Index: git/stdio-common/vfscanf.c /* Non-ASCII, may be a multibyte. */ int len = __mbrlen (f, strlen (f), &state); if (len > 0) -@@ -830,6 +850,8 @@ +@@ -830,6 +850,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const } /* FALLTHROUGH */ case L_('C'): @@ -14825,7 +14903,7 @@ Index: git/stdio-common/vfscanf.c if (width == -1) width = 1; -@@ -1172,6 +1194,8 @@ +@@ -1172,6 +1194,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const /* FALLTHROUGH */ case L_('S'): @@ -14834,7 +14912,7 @@ Index: git/stdio-common/vfscanf.c { #ifndef COMPILE_WSCANF mbstate_t cstate; -@@ -1419,10 +1443,17 @@ +@@ -1419,10 +1443,17 @@ _IO_vfscanf_internal (_IO_FILE *s, const const char *mbdigits[10]; const char *mbdigits_extended[10]; #endif @@ -14852,7 +14930,7 @@ Index: git/stdio-common/vfscanf.c int n; from_level = 0; -@@ -2088,6 +2119,7 @@ +@@ -2088,6 +2119,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const --width; } @@ -14860,7 +14938,7 @@ Index: git/stdio-common/vfscanf.c wctrans_t map; if (__builtin_expect ((flags & I18N) != 0, 0) /* Hexadecimal floats make no sense, fixing localized -@@ -2304,6 +2336,7 @@ +@@ -2304,6 +2336,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const ; #endif } @@ -14868,7 +14946,7 @@ Index: git/stdio-common/vfscanf.c /* Have we read any character? If we try to read a number in hexadecimal notation and we have read only the `0x' -@@ -2343,7 +2376,10 @@ +@@ -2343,7 +2376,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const case L_('['): /* Character class. */ if (flags & LONG) @@ -14880,7 +14958,7 @@ Index: git/stdio-common/vfscanf.c else STRING_ARG (str, char, 100); -@@ -2417,6 +2453,7 @@ +@@ -2417,6 +2453,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const if (flags & LONG) { size_t now = read_in; @@ -14890,8 +14968,8 @@ Index: git/stdio-common/vfscanf.c input_error (); Index: git/stdlib/Makefile =================================================================== ---- git.orig/stdlib/Makefile 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdlib/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/Makefile ++++ git/stdlib/Makefile @@ -18,6 +18,8 @@ # # Makefile for stdlib routines @@ -14901,7 +14979,7 @@ Index: git/stdlib/Makefile subdir := stdlib include ../Makeconfig -@@ -30,7 +32,7 @@ +@@ -30,7 +32,7 @@ headers := stdlib.h bits/stdlib.h bits/s alloca.h fmtmsg.h \ bits/stdlib-bsearch.h @@ -14910,7 +14988,7 @@ Index: git/stdlib/Makefile atof atoi atol atoll \ abort \ bsearch qsort msort \ -@@ -39,7 +41,6 @@ +@@ -39,7 +41,6 @@ routines := \ quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \ abs labs llabs \ div ldiv lldiv \ @@ -14918,7 +14996,7 @@ Index: git/stdlib/Makefile random random_r rand rand_r \ drand48 erand48 lrand48 nrand48 mrand48 jrand48 \ srand48 seed48 lcong48 \ -@@ -52,9 +53,18 @@ +@@ -52,9 +53,18 @@ routines := \ strtof_l strtod_l strtold_l \ system canonicalize \ a64l l64a \ @@ -14939,7 +15017,7 @@ Index: git/stdlib/Makefile aux = grouping groupingwc tens_in_limb # These routines will be omitted from the libc shared object. -@@ -62,20 +72,22 @@ +@@ -62,20 +72,22 @@ aux = grouping groupingwc tens_in_limb # linked against when the shared library will be used. static-only-routines = atexit at_quick_exit @@ -14970,7 +15048,7 @@ Index: git/stdlib/Makefile modules-names = tst-tls-atexit-lib ifeq ($(build-shared),yes) -@@ -115,8 +127,10 @@ +@@ -115,8 +127,10 @@ CFLAGS-tst-makecontext2.c = $(stack-alig tests-special += $(objpfx)isomac.out ifeq ($(run-built-tests),yes) @@ -14983,8 +15061,8 @@ Index: git/stdlib/Makefile Index: git/stdlib/strtod_l.c =================================================================== ---- git.orig/stdlib/strtod_l.c 2014-08-29 20:00:53.648070587 -0700 -+++ git/stdlib/strtod_l.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/strtod_l.c ++++ git/stdlib/strtod_l.c @@ -17,6 +17,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -14993,7 +15071,7 @@ Index: git/stdlib/strtod_l.c #include <xlocale.h> extern double ____strtod_l_internal (const char *, char **, int, __locale_t); -@@ -548,6 +549,7 @@ +@@ -548,6 +549,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group /* Used in several places. */ int cnt; @@ -15001,7 +15079,7 @@ Index: git/stdlib/strtod_l.c struct __locale_data *current = loc->__locales[LC_NUMERIC]; if (__glibc_unlikely (group)) -@@ -586,6 +588,17 @@ +@@ -586,6 +588,17 @@ ____STRTOF_INTERNAL (nptr, endptr, group decimal_len = strlen (decimal); assert (decimal_len > 0); #endif @@ -15021,8 +15099,8 @@ Index: git/stdlib/strtod_l.c exponent = 0; Index: git/stdlib/tst-strtod.c =================================================================== ---- git.orig/stdlib/tst-strtod.c 2014-08-29 20:00:53.700070587 -0700 -+++ git/stdlib/tst-strtod.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/tst-strtod.c ++++ git/stdlib/tst-strtod.c @@ -23,6 +23,7 @@ #include <errno.h> #include <string.h> @@ -15031,7 +15109,7 @@ Index: git/stdlib/tst-strtod.c struct ltest { -@@ -176,7 +177,9 @@ +@@ -176,7 +177,9 @@ main (int argc, char ** argv) status |= long_dbl (); @@ -15041,7 +15119,7 @@ Index: git/stdlib/tst-strtod.c return status ? EXIT_FAILURE : EXIT_SUCCESS; } -@@ -219,6 +222,7 @@ +@@ -219,6 +222,7 @@ long_dbl (void) return 0; } @@ -15049,15 +15127,15 @@ Index: git/stdlib/tst-strtod.c /* Perform a few tests in a locale with thousands separators. */ static int locale_test (void) -@@ -276,3 +280,4 @@ +@@ -276,3 +280,4 @@ locale_test (void) return result; } +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ Index: git/streams/Makefile =================================================================== ---- git.orig/streams/Makefile 2014-08-29 20:00:53.712070587 -0700 -+++ git/streams/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/streams/Makefile ++++ git/streams/Makefile @@ -18,11 +18,14 @@ # # Makefile for streams. @@ -15076,8 +15154,8 @@ Index: git/streams/Makefile include ../Rules Index: git/string/Makefile =================================================================== ---- git.orig/string/Makefile 2014-08-29 20:00:53.716070587 -0700 -+++ git/string/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/string/Makefile ++++ git/string/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for string portion of library. @@ -15087,7 +15165,7 @@ Index: git/string/Makefile subdir := string include ../Makeconfig -@@ -39,10 +41,12 @@ +@@ -39,10 +41,12 @@ routines := strcat strchr strcmp strcoll $(addprefix argz-,append count create ctsep next \ delete extract insert stringify \ addsep replace) \ @@ -15101,7 +15179,7 @@ Index: git/string/Makefile strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ stpcpy stpncpy strcat strchr strcmp strcpy strcspn \ strlen strncmp strncpy strpbrk strrchr strspn memmem \ -@@ -51,10 +55,12 @@ +@@ -51,10 +55,12 @@ strop-tests := memchr memcmp memcpy memm tests := tester inl-tester noinl-tester testcopy test-ffs \ tst-strlen stratcliff tst-svc tst-inlcall \ bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \ @@ -15119,17 +15197,17 @@ Index: git/string/Makefile Index: git/string/strcoll_l.c =================================================================== ---- git.orig/string/strcoll_l.c 2014-08-29 20:00:53.744070587 -0700 -+++ git/string/strcoll_l.c 2014-08-29 20:01:15.240070587 -0700 -@@ -25,6 +25,7 @@ - #include <stdlib.h> +--- git.orig/string/strcoll_l.c ++++ git/string/strcoll_l.c +@@ -24,6 +24,7 @@ + #include <stdint.h> #include <string.h> #include <sys/param.h> +#include <gnu/option-groups.h> #ifndef STRING_TYPE # define STRING_TYPE char -@@ -472,7 +473,11 @@ +@@ -247,7 +248,11 @@ int STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l) { struct __locale_data *current = l->__locales[LC_COLLATE]; @@ -15143,8 +15221,8 @@ Index: git/string/strcoll_l.c const unsigned char *rulesets; Index: git/string/strerror_l.c =================================================================== ---- git.orig/string/strerror_l.c 2014-08-29 20:00:53.744070587 -0700 -+++ git/string/strerror_l.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/strerror_l.c ++++ git/string/strerror_l.c @@ -21,6 +21,7 @@ #include <stdlib.h> #include <string.h> @@ -15153,7 +15231,7 @@ Index: git/string/strerror_l.c static __thread char *last_value; -@@ -29,10 +30,14 @@ +@@ -29,10 +30,14 @@ static __thread char *last_value; static const char * translate (const char *str, locale_t loc) { @@ -15170,8 +15248,8 @@ Index: git/string/strerror_l.c Index: git/string/strxfrm_l.c =================================================================== ---- git.orig/string/strxfrm_l.c 2014-08-29 20:00:53.748070587 -0700 -+++ git/string/strxfrm_l.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/strxfrm_l.c ++++ git/string/strxfrm_l.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> @@ -15180,23 +15258,23 @@ Index: git/string/strxfrm_l.c #ifndef STRING_TYPE # define STRING_TYPE char -@@ -85,7 +86,11 @@ - STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) +@@ -670,7 +671,11 @@ STRXFRM (STRING_TYPE *dest, const STRING { + locale_data_t l_data; struct __locale_data *current = l->__locales[LC_COLLATE]; +#if __OPTION_EGLIBC_LOCALE_CODE - uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; + l_data.nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; +#else -+ const uint_fast32_t nrules = 0; ++ l_data.nrules = 0; +#endif - /* We don't assign the following values right away since it might be - unnecessary in case there are no rules. */ - const unsigned char *rulesets; + + /* Handle byte comparison case. */ + if (l_data.nrules == 0) Index: git/string/test-strcmp.c =================================================================== ---- git.orig/string/test-strcmp.c 2014-08-29 20:00:53.752070587 -0700 -+++ git/string/test-strcmp.c 2014-08-29 20:01:15.240070587 -0700 -@@ -329,34 +329,6 @@ +--- git.orig/string/test-strcmp.c ++++ git/string/test-strcmp.c +@@ -329,34 +329,6 @@ check (void) FOR_EACH_IMPL (impl, 0) check_result (impl, s1 + i1, s2 + i2, exp_result); } @@ -15233,8 +15311,8 @@ Index: git/string/test-strcmp.c Index: git/string/tst-strxfrm2.c =================================================================== ---- git.orig/string/tst-strxfrm2.c 2014-08-29 20:00:53.756070587 -0700 -+++ git/string/tst-strxfrm2.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/tst-strxfrm2.c ++++ git/string/tst-strxfrm2.c @@ -1,6 +1,7 @@ #include <locale.h> #include <stdio.h> @@ -15243,7 +15321,7 @@ Index: git/string/tst-strxfrm2.c static int do_test (void) -@@ -38,6 +39,7 @@ +@@ -38,6 +39,7 @@ do_test (void) res = 1; } @@ -15251,7 +15329,7 @@ Index: git/string/tst-strxfrm2.c if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) { puts ("setlocale failed"); -@@ -75,6 +77,7 @@ +@@ -75,6 +77,7 @@ do_test (void) res = 1; } } @@ -15261,8 +15339,8 @@ Index: git/string/tst-strxfrm2.c } Index: git/string/tst-strxfrm.c =================================================================== ---- git.orig/string/tst-strxfrm.c 2014-08-29 20:00:53.756070587 -0700 -+++ git/string/tst-strxfrm.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/tst-strxfrm.c ++++ git/string/tst-strxfrm.c @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdlib.h> @@ -15271,7 +15349,7 @@ Index: git/string/tst-strxfrm.c char const string[] = ""; -@@ -64,8 +65,10 @@ +@@ -64,8 +65,10 @@ do_test (void) int result = 0; result |= test ("C"); @@ -15284,8 +15362,8 @@ Index: git/string/tst-strxfrm.c } Index: git/sunrpc/Makefile =================================================================== ---- git.orig/sunrpc/Makefile 2014-08-29 20:00:53.760070587 -0700 -+++ git/sunrpc/Makefile 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/sunrpc/Makefile ++++ git/sunrpc/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for sunrpc portion of the library. @@ -15295,7 +15373,7 @@ Index: git/sunrpc/Makefile subdir := sunrpc include ../Makeconfig -@@ -55,7 +57,6 @@ +@@ -55,7 +57,6 @@ headers-in-tirpc = $(addprefix rpc/,auth headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h headers = rpc/netdb.h @@ -15303,7 +15381,7 @@ Index: git/sunrpc/Makefile generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen generated-dirs += rpcsvc -@@ -65,18 +66,28 @@ +@@ -65,18 +66,28 @@ headers += $(headers-in-tirpc) $(headers endif ifeq ($(build-shared),yes) @@ -15337,7 +15415,7 @@ Index: git/sunrpc/Makefile ifneq ($(link-obsolete-rpc),yes) # We only add the RPC for compatibility to libc.so. shared-only-routines = $(routines) -@@ -85,25 +96,28 @@ +@@ -85,25 +96,28 @@ endif # We do not build rpcinfo anymore. It is not needed for a bootstrap # and not wanted on complete systems. @@ -15378,9 +15456,9 @@ Index: git/sunrpc/Makefile omit-deps = $(librpcsvc-routines) Index: git/sysdeps/generic/ldsodefs.h =================================================================== ---- git.orig/sysdeps/generic/ldsodefs.h 2014-08-29 20:00:53.904070587 -0700 -+++ git/sysdeps/generic/ldsodefs.h 2014-08-29 20:01:15.240070587 -0700 -@@ -425,6 +425,12 @@ +--- git.orig/sysdeps/generic/ldsodefs.h ++++ git/sysdeps/generic/ldsodefs.h +@@ -425,6 +425,12 @@ extern struct rtld_global _rtld_global _ # undef __rtld_global_attribute__ #endif @@ -15393,7 +15471,7 @@ Index: git/sysdeps/generic/ldsodefs.h #ifndef SHARED # define GLRO(name) _##name #else -@@ -437,8 +443,10 @@ +@@ -437,8 +443,10 @@ struct rtld_global_ro { #endif @@ -15406,9 +15484,9 @@ Index: git/sysdeps/generic/ldsodefs.h #define DL_DEBUG_BINDINGS (1 << 2) Index: git/sysdeps/gnu/Makefile =================================================================== ---- git.orig/sysdeps/gnu/Makefile 2014-08-29 20:00:53.924070587 -0700 -+++ git/sysdeps/gnu/Makefile 2014-08-29 20:01:15.240070587 -0700 -@@ -57,7 +57,8 @@ +--- git.orig/sysdeps/gnu/Makefile ++++ git/sysdeps/gnu/Makefile +@@ -59,7 +59,8 @@ $(foreach o,$(object-suffixes) $(object- endif ifeq ($(subdir),login) @@ -15420,9 +15498,9 @@ Index: git/sysdeps/gnu/Makefile sysdep_headers += utmpx.h bits/utmpx.h Index: git/sysdeps/ieee754/ldbl-opt/Makefile =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:00:54.452070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:01:15.244070587 -0700 -@@ -11,19 +11,18 @@ +--- git.orig/sysdeps/ieee754/ldbl-opt/Makefile ++++ git/sysdeps/ieee754/ldbl-opt/Makefile +@@ -11,19 +11,18 @@ libm-routines += s_nexttowardfd routines += math_ldbl_opt nldbl-compat extra-libs += libnldbl @@ -15451,7 +15529,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \ qecvt qfcvt qgcvt qecvt_r qfcvt_r \ isinf isnan finite signbit scalb log2 lgamma_r ceil \ -@@ -38,9 +37,15 @@ +@@ -38,9 +37,15 @@ libnldbl-calls = asprintf dprintf fprint casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ cabs carg cimag creal clog10 \ isoc99_scanf isoc99_fscanf isoc99_sscanf \ @@ -15470,8 +15548,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile libnldbl-static-only-routines = $(libnldbl-routines) Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:00:54.468070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c ++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c @@ -26,6 +26,7 @@ #include <locale/localeinfo.h> #include <sys/syslog.h> @@ -15480,7 +15558,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c #include "nldbl-compat.h" -@@ -33,20 +34,14 @@ +@@ -33,20 +34,14 @@ libc_hidden_proto (__nldbl_vfprintf) libc_hidden_proto (__nldbl_vsscanf) libc_hidden_proto (__nldbl_vsprintf) libc_hidden_proto (__nldbl_vfscanf) @@ -15501,7 +15579,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c libc_hidden_proto (__nldbl___vasprintf_chk) libc_hidden_proto (__nldbl___vdprintf_chk) libc_hidden_proto (__nldbl___obstack_vprintf_chk) -@@ -54,8 +49,17 @@ +@@ -54,8 +49,17 @@ libc_hidden_proto (__nldbl___vstrfmon) libc_hidden_proto (__nldbl___vstrfmon_l) libc_hidden_proto (__nldbl___isoc99_vsscanf) libc_hidden_proto (__nldbl___isoc99_vfscanf) @@ -15519,7 +15597,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c static void __nldbl_cleanup (void *arg) -@@ -117,6 +121,7 @@ +@@ -117,6 +121,7 @@ __nldbl_fprintf (FILE *stream, const cha } weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf) @@ -15527,7 +15605,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) -@@ -130,6 +135,7 @@ +@@ -130,6 +135,7 @@ __nldbl_fwprintf (FILE *stream, const wc return done; } @@ -15535,7 +15613,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -226,6 +232,7 @@ +@@ -226,6 +232,7 @@ __nldbl_snprintf (char *s, size_t maxlen return done; } @@ -15543,7 +15621,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) -@@ -239,6 +246,7 @@ +@@ -239,6 +246,7 @@ __nldbl_swprintf (wchar_t *s, size_t n, return done; } @@ -15551,7 +15629,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function -@@ -264,6 +272,7 @@ +@@ -264,6 +272,7 @@ __nldbl_vdprintf (int d, const char *fmt } libc_hidden_def (__nldbl_vdprintf) @@ -15559,7 +15637,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -275,6 +284,7 @@ +@@ -275,6 +284,7 @@ __nldbl_vfwprintf (FILE *s, const wchar_ return res; } libc_hidden_def (__nldbl_vfwprintf) @@ -15567,7 +15645,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -297,6 +307,7 @@ +@@ -297,6 +307,7 @@ __nldbl_vsnprintf (char *string, size_t libc_hidden_def (__nldbl_vsnprintf) weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf) @@ -15575,7 +15653,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, -@@ -330,6 +341,7 @@ +@@ -330,6 +341,7 @@ __nldbl_wprintf (const wchar_t *fmt, ... return done; } @@ -15583,7 +15661,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -419,6 +431,7 @@ +@@ -419,6 +431,7 @@ __nldbl_scanf (const char *fmt, ...) return done; } @@ -15591,7 +15669,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -491,6 +504,7 @@ +@@ -491,6 +504,7 @@ __nldbl_wscanf (const wchar_t *fmt, ...) return done; } @@ -15599,7 +15677,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -506,6 +520,7 @@ +@@ -506,6 +520,7 @@ __nldbl___fprintf_chk (FILE *stream, int return done; } @@ -15607,7 +15685,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) -@@ -519,6 +534,7 @@ +@@ -519,6 +534,7 @@ __nldbl___fwprintf_chk (FILE *stream, in return done; } @@ -15615,7 +15693,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -563,6 +579,7 @@ +@@ -563,6 +579,7 @@ __nldbl___sprintf_chk (char *s, int flag return done; } @@ -15623,7 +15701,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, -@@ -577,6 +594,7 @@ +@@ -577,6 +594,7 @@ __nldbl___swprintf_chk (wchar_t *s, size return done; } @@ -15631,7 +15709,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -590,6 +608,7 @@ +@@ -590,6 +608,7 @@ __nldbl___vfprintf_chk (FILE *s, int fla } libc_hidden_def (__nldbl___vfprintf_chk) @@ -15639,7 +15717,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) -@@ -601,6 +620,7 @@ +@@ -601,6 +620,7 @@ __nldbl___vfwprintf_chk (FILE *s, int fl return res; } libc_hidden_def (__nldbl___vfwprintf_chk) @@ -15647,7 +15725,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -635,6 +655,7 @@ +@@ -635,6 +655,7 @@ __nldbl___vsprintf_chk (char *string, in } libc_hidden_def (__nldbl___vsprintf_chk) @@ -15655,7 +15733,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen, -@@ -668,6 +689,7 @@ +@@ -668,6 +689,7 @@ __nldbl___wprintf_chk (int flag, const w return done; } @@ -15663,7 +15741,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -775,6 +797,7 @@ +@@ -775,6 +797,7 @@ __nldbl___printf_fp (FILE *fp, const str return ___printf_fp (fp, &info_no_ldbl, args); } @@ -15671,7 +15749,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c ssize_t attribute_compat_text_section __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...) -@@ -829,6 +852,7 @@ +@@ -829,6 +852,7 @@ __nldbl___vstrfmon_l (char *s, size_t ma return res; } libc_hidden_def (__nldbl___vstrfmon_l) @@ -15679,7 +15757,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c void attribute_compat_text_section -@@ -941,6 +965,7 @@ +@@ -941,6 +965,7 @@ __nldbl___isoc99_scanf (const char *fmt, return done; } @@ -15687,7 +15765,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -1014,6 +1039,7 @@ +@@ -1014,6 +1039,7 @@ __nldbl___isoc99_wscanf (const wchar_t * return done; } @@ -15695,7 +15773,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); -@@ -1057,6 +1083,7 @@ +@@ -1057,6 +1083,7 @@ compat_symbol (libc, __nldbl_printf_size compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1); #endif #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2) @@ -15703,7 +15781,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2); -@@ -1069,6 +1096,7 @@ +@@ -1069,6 +1096,7 @@ compat_symbol (libc, __nldbl_vfwscanf, v compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2); compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2); compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2); @@ -15713,8 +15791,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3); Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:00:54.468070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h ++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h @@ -30,6 +30,7 @@ #include <math.h> #include <monetary.h> @@ -15743,7 +15821,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h NLDBL_DECL (__asprintf); NLDBL_DECL (asprintf); NLDBL_DECL (__printf_fp); -@@ -66,12 +63,18 @@ +@@ -66,12 +63,18 @@ NLDBL_DECL (__isoc99_sscanf); NLDBL_DECL (__isoc99_vscanf); NLDBL_DECL (__isoc99_vfscanf); NLDBL_DECL (__isoc99_vsscanf); @@ -15762,7 +15840,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h /* This one does not exist in the normal interface, only __nldbl___vstrfmon really exists. */ -@@ -82,22 +85,23 @@ +@@ -82,22 +85,23 @@ extern ssize_t __nldbl___vstrfmon (char since we don't compile with _FORTIFY_SOURCE. */ extern int __nldbl___vfprintf_chk (FILE *__restrict, int, const char *__restrict, _G_va_list); @@ -15794,8 +15872,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h #endif /* __NLDBL_COMPAT_H */ Index: git/sysdeps/unix/sysv/linux/gethostid.c =================================================================== ---- git.orig/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:00:58.840070587 -0700 -+++ git/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/unix/sysv/linux/gethostid.c ++++ git/sysdeps/unix/sysv/linux/gethostid.c @@ -21,6 +21,7 @@ #include <unistd.h> #include <netdb.h> @@ -15804,7 +15882,7 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c #define HOSTIDFILE "/etc/hostid" -@@ -89,6 +90,7 @@ +@@ -89,6 +90,7 @@ gethostid (void) return id; } @@ -15812,7 +15890,7 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c /* Getting from the file was not successful. An intelligent guess for a unique number of a host is its IP address. Return this. */ if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0') -@@ -115,5 +117,9 @@ +@@ -115,5 +117,9 @@ gethostid (void) /* For the return value to be not exactly the IP address we do some bit fiddling. */ return (int32_t) (in.s_addr << 16 | in.s_addr >> 16); @@ -15824,8 +15902,8 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c #endif Index: git/sysdeps/unix/sysv/linux/libc_fatal.c =================================================================== ---- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:00:58.980070587 -0700 -+++ git/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c ++++ git/sysdeps/unix/sysv/linux/libc_fatal.c @@ -23,6 +23,7 @@ #include <string.h> #include <sys/mman.h> @@ -15834,7 +15912,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c static bool writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) -@@ -40,6 +41,7 @@ +@@ -40,6 +41,7 @@ writev_for_fatal (int fd, const struct i static void backtrace_and_maps (int do_abort, bool written, int fd) { @@ -15842,7 +15920,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c if (do_abort > 1 && written) { void *addrs[64]; -@@ -62,6 +64,7 @@ +@@ -62,6 +64,7 @@ backtrace_and_maps (int do_abort, bool w close_not_cancel_no_status (fd2); } } @@ -15852,8 +15930,8 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c Index: git/time/Makefile =================================================================== ---- git.orig/time/Makefile 2014-08-29 20:00:59.504070587 -0700 -+++ git/time/Makefile 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/Makefile ++++ git/time/Makefile @@ -18,6 +18,8 @@ # # Makefile for time routines @@ -15863,7 +15941,7 @@ Index: git/time/Makefile subdir := time include ../Makeconfig -@@ -30,14 +32,20 @@ +@@ -30,15 +32,23 @@ routines := offtime asctime clock ctime tzfile getitimer setitimer \ stime dysize timegm ftime \ getdate strptime strptime_l \ @@ -15871,27 +15949,30 @@ Index: git/time/Makefile + strftime strftime_l \ timespec_get -aux := era alt_digit lc-time-cleanup -+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ := wcsftime wcsftime_l -+aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup -tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ - tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \ ++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ := wcsftime wcsftime_l ++aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup ++ +tests := test_time clocktest tst-posixtz \ + tst-getdate tst-mktime tst-mktime2 tst-strftime \ tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \ - tst-strptime3 bug-getdate1 tst-strptime-whitespace + tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime + +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-strptime tst-ftime_l ++ += tst-strptime tst-ftime_l +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += tst_wcsftime - ++ += tst_wcsftime ++ include ../Rules + tz-cflags = -DTZDIR='"$(zonedir)"' \ Index: git/time/strftime_l.c =================================================================== ---- git.orig/time/strftime_l.c 2014-08-29 20:00:59.528070587 -0700 -+++ git/time/strftime_l.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/strftime_l.c ++++ git/time/strftime_l.c @@ -35,6 +35,10 @@ # include "../locale/localeinfo.h" #endif @@ -15903,7 +15984,7 @@ Index: git/time/strftime_l.c #if defined emacs && !defined HAVE_BCOPY # define HAVE_MEMCPY 1 #endif -@@ -882,7 +886,7 @@ +@@ -882,7 +886,7 @@ __strftime_internal (s, maxsize, format, case L_('C'): if (modifier == L_('E')) { @@ -15912,7 +15993,7 @@ Index: git/time/strftime_l.c struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { -@@ -955,7 +959,7 @@ +@@ -955,7 +959,7 @@ __strftime_internal (s, maxsize, format, if (modifier == L_('O') && 0 <= number_value) { @@ -15921,7 +16002,7 @@ Index: git/time/strftime_l.c /* Get the locale specific alternate representation of the number NUMBER_VALUE. If none exist NULL is returned. */ const CHAR_T *cp = nl_get_alt_digit (number_value -@@ -1260,7 +1264,7 @@ +@@ -1260,7 +1264,7 @@ __strftime_internal (s, maxsize, format, case L_('Y'): if (modifier == 'E') { @@ -15930,7 +16011,7 @@ Index: git/time/strftime_l.c struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { -@@ -1285,7 +1289,7 @@ +@@ -1285,7 +1289,7 @@ __strftime_internal (s, maxsize, format, case L_('y'): if (modifier == L_('E')) { @@ -15941,8 +16022,8 @@ Index: git/time/strftime_l.c { Index: git/time/strptime_l.c =================================================================== ---- git.orig/time/strptime_l.c 2014-08-29 20:00:59.528070587 -0700 -+++ git/time/strptime_l.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/strptime_l.c ++++ git/time/strptime_l.c @@ -29,6 +29,7 @@ #ifdef _LIBC @@ -15951,7 +16032,7 @@ Index: git/time/strptime_l.c # include "../locale/localeinfo.h" #endif -@@ -84,7 +85,7 @@ +@@ -84,7 +85,7 @@ localtime_r (t, tp) if (val < from || val > to) \ return NULL; \ } while (0) @@ -15960,7 +16041,18 @@ Index: git/time/strptime_l.c # define get_alt_number(from, to, n) \ ({ \ __label__ do_normal; \ -@@ -820,6 +821,7 @@ +@@ -257,8 +258,10 @@ __strptime_internal (rp, fmt, tmp, state + int cnt; + int cnt_longest; + size_t val; ++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE + size_t num_eras; + struct era_entry *era = NULL; ++#endif + enum ptime_locale_status { not, loc, raw } decided_longest; + struct __strptime_state + { +@@ -820,6 +823,7 @@ __strptime_internal (rp, fmt, tmp, state s.want_xday = 1; break; case 'C': @@ -15968,7 +16060,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { if (s.era_cnt >= 0) -@@ -856,10 +858,12 @@ +@@ -856,10 +860,12 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -15981,7 +16073,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { get_number(0, 9999, 4); -@@ -918,9 +922,10 @@ +@@ -918,9 +924,10 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -15993,7 +16085,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { num_eras = _NL_CURRENT_WORD (LC_TIME, -@@ -948,6 +953,7 @@ +@@ -948,6 +955,7 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -16001,7 +16093,7 @@ Index: git/time/strptime_l.c get_number (0, 9999, 4); tm->tm_year = val - 1900; s.want_century = 0; -@@ -1118,6 +1124,7 @@ +@@ -1118,6 +1126,7 @@ __strptime_internal (rp, fmt, tmp, state tm->tm_year = (s.century - 19) * 100; } @@ -16009,7 +16101,7 @@ Index: git/time/strptime_l.c if (s.era_cnt != -1) { era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG); -@@ -1132,6 +1139,7 @@ +@@ -1132,6 +1141,7 @@ __strptime_internal (rp, fmt, tmp, state tm->tm_year = era->start_date[0]; } else @@ -16019,9 +16111,9 @@ Index: git/time/strptime_l.c /* No era found but we have seen an E modifier. Rectify some Index: git/timezone/Makefile =================================================================== ---- git.orig/timezone/Makefile 2014-08-29 20:01:14.044070587 -0700 -+++ git/timezone/Makefile 2014-08-29 20:01:15.244070587 -0700 -@@ -115,7 +115,7 @@ +--- git.orig/timezone/Makefile ++++ git/timezone/Makefile +@@ -117,7 +117,7 @@ $(testdata)/Asia/Tokyo: asia $(zic-deps) $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make sed -e 's|/bin/bash|/bin/sh|' \ @@ -16032,8 +16124,8 @@ Index: git/timezone/Makefile -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ Index: git/wcsmbs/Makefile =================================================================== ---- git.orig/wcsmbs/Makefile 2014-08-29 20:00:59.548070587 -0700 -+++ git/wcsmbs/Makefile 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/wcsmbs/Makefile ++++ git/wcsmbs/Makefile @@ -18,15 +18,21 @@ # # Sub-makefile for wcsmbs portion of the library. @@ -16058,34 +16150,36 @@ Index: git/wcsmbs/Makefile btowc wctob mbsinit \ mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \ mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \ -@@ -38,14 +44,19 @@ +@@ -38,14 +44,21 @@ routines := wcscat wcschr wcscmp wcscpy wcscoll_l wcsxfrm_l \ wcscasecmp wcsncase wcscasecmp_l wcsncase_l \ wcsmbsload mbsrtowcs_l \ - isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \ isoc99_swscanf isoc99_vswscanf \ mbrtoc16 c16rtomb -+routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf ++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ ++ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf ++ strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy -tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ - tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \ - tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests)) ++ +tests := tst-wchar-h +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 ++ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ ++ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ + tst-wcpncpy tst-mbsrtowcs \ + wcsatcliff $(addprefix test-,$(strop-tests)) - tests-ifunc := $(strop-tests:%=test-%-ifunc) - tests += $(tests-ifunc) + + include ../Rules Index: git/wcsmbs/wcsmbsload.c =================================================================== ---- git.orig/wcsmbs/wcsmbsload.c 2014-08-29 20:00:59.580070587 -0700 -+++ git/wcsmbs/wcsmbsload.c 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/wcsmbs/wcsmbsload.c ++++ git/wcsmbs/wcsmbsload.c @@ -21,6 +21,7 @@ #include <limits.h> #include <stdlib.h> @@ -16094,7 +16188,7 @@ Index: git/wcsmbs/wcsmbsload.c #include <locale/localeinfo.h> #include <wcsmbsload.h> -@@ -143,6 +144,7 @@ +@@ -143,6 +144,7 @@ __wcsmbs_getfct (const char *to, const c }) @@ -16102,7 +16196,7 @@ Index: git/wcsmbs/wcsmbsload.c /* Some of the functions here must not be used while setlocale is called. */ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) -@@ -211,6 +213,17 @@ +@@ -211,6 +213,17 @@ __wcsmbs_load_conv (struct __locale_data __libc_rwlock_unlock (__libc_setlocale_lock); } @@ -16122,8 +16216,8 @@ Index: git/wcsmbs/wcsmbsload.c /* Clone the current conversion function set. */ Index: git/wctype/Makefile =================================================================== ---- git.orig/wctype/Makefile 2014-08-29 20:00:59.584070587 -0700 -+++ git/wctype/Makefile 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/wctype/Makefile ++++ git/wctype/Makefile @@ -18,14 +18,20 @@ # # Sub-makefile for wctype portion of the library. @@ -16150,8 +16244,8 @@ Index: git/wctype/Makefile include ../Rules Index: git/sysdeps/nptl/Makefile =================================================================== ---- git.orig/sysdeps/nptl/Makefile 2014-08-29 20:00:58.036070587 -0700 -+++ git/sysdeps/nptl/Makefile 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/Makefile ++++ git/sysdeps/nptl/Makefile @@ -18,6 +18,9 @@ ifeq ($(subdir),nptl) @@ -16164,8 +16258,8 @@ Index: git/sysdeps/nptl/Makefile ifeq ($(subdir),rt) Index: git/sysdeps/nptl/bits/libc-lock.h =================================================================== ---- git.orig/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:00:58.036070587 -0700 -+++ git/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/bits/libc-lock.h ++++ git/sysdeps/nptl/bits/libc-lock.h @@ -24,6 +24,14 @@ #include <stddef.h> @@ -16180,11 +16274,11 @@ Index: git/sysdeps/nptl/bits/libc-lock.h + /* Mutex type. */ #if defined _LIBC || defined _IO_MTSAFE_IO - # if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC -@@ -87,6 +95,14 @@ + # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC +@@ -87,6 +95,15 @@ typedef struct __libc_lock_recursive_opa /* Lock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from @@ -16193,10 +16287,11 @@ Index: git/sysdeps/nptl/bits/libc-lock.h +libc_hidden_proto (__libc_lock_lock_recursive_fn); +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ +# if __OPTION_EGLIBC_BIG_MACROS ++ # define __libc_lock_lock_recursive(NAME) \ do { \ void *self = THREAD_SELF; \ -@@ -97,6 +113,10 @@ +@@ -97,6 +114,10 @@ typedef struct __libc_lock_recursive_opa } \ ++(NAME).cnt; \ } while (0) @@ -16207,10 +16302,10 @@ Index: git/sysdeps/nptl/bits/libc-lock.h #else # define __libc_lock_lock_recursive(NAME) \ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) -@@ -104,6 +124,14 @@ +@@ -104,6 +125,14 @@ typedef struct __libc_lock_recursive_opa /* Try to lock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from @@ -16222,7 +16317,7 @@ Index: git/sysdeps/nptl/bits/libc-lock.h # define __libc_lock_trylock_recursive(NAME) \ ({ \ int result = 0; \ -@@ -122,6 +150,10 @@ +@@ -122,6 +151,10 @@ typedef struct __libc_lock_recursive_opa ++(NAME).cnt; \ result; \ }) @@ -16233,10 +16328,10 @@ Index: git/sysdeps/nptl/bits/libc-lock.h #else # define __libc_lock_trylock_recursive(NAME) \ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) -@@ -129,6 +161,14 @@ +@@ -129,6 +162,14 @@ typedef struct __libc_lock_recursive_opa /* Unlock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from @@ -16248,7 +16343,7 @@ Index: git/sysdeps/nptl/bits/libc-lock.h /* We do no error checking here. */ # define __libc_lock_unlock_recursive(NAME) \ do { \ -@@ -138,6 +178,10 @@ +@@ -138,6 +179,10 @@ typedef struct __libc_lock_recursive_opa lll_unlock ((NAME).lock, LLL_PRIVATE); \ } \ } while (0) @@ -16261,8 +16356,8 @@ Index: git/sysdeps/nptl/bits/libc-lock.h __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) Index: git/sysdeps/nptl/bits/libc-lockP.h =================================================================== ---- git.orig/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:00:58.044070587 -0700 -+++ git/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/bits/libc-lockP.h ++++ git/sysdeps/nptl/bits/libc-lockP.h @@ -33,6 +33,8 @@ #include <lowlevellock.h> #include <tls.h> @@ -16270,12 +16365,12 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h +#include <errno.h> /* For EBUSY. */ +#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ - /* Mutex type. */ - #if defined NOT_IN_libc && !defined IS_IN_libpthread -@@ -159,10 +161,22 @@ + #if IS_IN (libpthread) + /* This gets us the declarations of the __pthread_* internal names, +@@ -171,10 +173,22 @@ typedef pthread_key_t __libc_key_t; /* Lock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_lock -# define __libc_lock_lock(NAME) \ +# if __OPTION_EGLIBC_BIG_MACROS != 1 @@ -16292,16 +16387,16 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h -# endif +# endif +# else -+# define __libc_lock_lock(NAME) \ ++# define __libc_lock_lock(NAME) \ + __libc_lock_lock_fn (&(NAME)) +# endif /* __OPTION_EGLIBC_BIG_MACROS */ #else # undef __libc_lock_lock # define __libc_lock_lock(NAME) \ -@@ -175,10 +189,22 @@ +@@ -187,10 +201,22 @@ typedef pthread_key_t __libc_key_t; /* Try to lock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_trylock -# define __libc_lock_trylock(NAME) \ +# if __OPTION_EGLIBC_BIG_MACROS != 1 @@ -16324,10 +16419,10 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h #else # undef __libc_lock_trylock # define __libc_lock_trylock(NAME) \ -@@ -194,8 +220,20 @@ +@@ -206,8 +232,20 @@ typedef pthread_key_t __libc_key_t; /* Unlock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from @@ -16347,8 +16442,8 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) Index: git/sysdeps/nptl/small-macros-fns.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/nptl/small-macros-fns.c 2014-08-29 20:01:15.248070587 -0700 +--- /dev/null ++++ git/sysdeps/nptl/small-macros-fns.c @@ -0,0 +1,72 @@ +/* EGLIBC: function wrappers for big macros. + Copyright (C) 2009 Free Software Foundation, Inc. @@ -16424,8 +16519,8 @@ Index: git/sysdeps/nptl/small-macros-fns.c +#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/ Index: git/crypt/crypt_common.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/crypt/crypt_common.c 2014-08-29 20:01:15.248070587 -0700 +--- /dev/null ++++ git/crypt/crypt_common.c @@ -0,0 +1,42 @@ +/* + * crypt: crypt(3) implementation @@ -16471,9 +16566,9 @@ Index: git/crypt/crypt_common.c +} Index: git/crypt/crypt_util.c =================================================================== ---- git.orig/crypt/crypt_util.c 2014-08-29 20:00:43.028070587 -0700 -+++ git/crypt/crypt_util.c 2014-08-29 20:01:15.248070587 -0700 -@@ -242,10 +242,6 @@ +--- git.orig/crypt/crypt_util.c ++++ git/crypt/crypt_util.c +@@ -242,10 +242,6 @@ static ufc_long eperm32tab[4][256][2]; */ static ufc_long efp[16][64][2]; @@ -16484,7 +16579,7 @@ Index: git/crypt/crypt_util.c /* * For use by the old, non-reentrant routines * (crypt/encrypt/setkey) -@@ -949,17 +945,3 @@ +@@ -949,17 +945,3 @@ setkey(__key) { __setkey_r(__key, &_ufc_foobar); } @@ -16504,9 +16599,9 @@ Index: git/crypt/crypt_util.c -} Index: git/sysdeps/arm/Makefile =================================================================== ---- git.orig/sysdeps/arm/Makefile 2014-08-29 20:29:37.000000000 -0700 -+++ git/sysdeps/arm/Makefile 2014-08-29 20:31:09.904070587 -0700 -@@ -37,10 +37,13 @@ +--- git.orig/sysdeps/arm/Makefile ++++ git/sysdeps/arm/Makefile +@@ -37,10 +37,13 @@ ifeq ($(subdir),csu) # get offset to rtld_global._dl_hwcap gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math diff --git a/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch deleted file mode 100644 index f88eaf444e..0000000000 --- a/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch +++ /dev/null @@ -1,100 +0,0 @@ -Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core -We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its -already defined before redefining it. This way we can ensure that on e5500 builds it wont -emit fsqrt intructions - --Khem - -Upstream-Status: Pending - -Index: git/sysdeps/powerpc/fpu/math_private.h -=================================================================== ---- git.orig/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.224070587 -0700 -+++ git/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -25,10 +25,12 @@ - #include <fenv_private.h> - #include_next <math_private.h> - --# if __WORDSIZE == 64 || defined _ARCH_PWR4 --# define __CPU_HAS_FSQRT 1 --# else --# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# ifndef __CPU_HAS_FSQRT -+# if __WORDSIZE == 64 || defined _ARCH_PWR4 -+# define __CPU_HAS_FSQRT 1 -+# else -+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# endif - # endif - - extern double __slow_ieee754_sqrt (double); -Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E500MC_MATH_PRIVATE_H_ -+#define _E500MC_MATH_PRIVATE_H_ 1 -+/* E500MC core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E500MC_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ diff --git a/meta/recipes-core/glibc/glibc/grok_gold.patch b/meta/recipes-core/glibc/glibc/grok_gold.patch index 26875c79d4..5151802ecf 100644 --- a/meta/recipes-core/glibc/glibc/grok_gold.patch +++ b/meta/recipes-core/glibc/glibc/grok_gold.patch @@ -8,9 +8,9 @@ Upstream-Status: Backport Index: git/configure =================================================================== ---- git.orig/configure 2014-08-29 10:32:34.464070587 -0700 -+++ git/configure 2014-08-29 10:32:34.456070587 -0700 -@@ -4592,7 +4592,7 @@ +--- git.orig/configure ++++ git/configure +@@ -4593,7 +4593,7 @@ else # Found it, now check the version. { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 $as_echo_n "checking version of $LD... " >&6; } @@ -18,17 +18,17 @@ Index: git/configure + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) Index: git/configure.ac =================================================================== ---- git.orig/configure.ac 2014-08-29 10:32:34.464070587 -0700 -+++ git/configure.ac 2014-08-29 10:32:34.460070587 -0700 -@@ -930,7 +930,7 @@ - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as") +--- git.orig/configure.ac ++++ git/configure.ac +@@ -913,7 +913,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version, + [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + AS=: critic_missing="$critic_missing as") AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], + [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld") + [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + LD=: critic_missing="$critic_missing ld") - # These programs are version sensitive. diff --git a/meta/recipes-core/glibc/glibc_2.20.bb b/meta/recipes-core/glibc/glibc_2.21.bb index 8a8b296def..5ebe2503c1 100644 --- a/meta/recipes-core/glibc/glibc_2.20.bb +++ b/meta/recipes-core/glibc/glibc_2.21.bb @@ -2,11 +2,12 @@ require glibc.inc DEPENDS += "gperf-native kconfig-frontends-native" -PV = "2.20" +SRCREV = "edac0a60c7514b8c9b59488cffdac6b22267e757" -SRCREV = "b8079dd0d360648e4e8de48656c5c38972621072" +#BRANCH = "release/${PV}/master" +BRANCH = "master" -SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \ +SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \ file://IO-acquire-lock-fix.patch \ file://mips-rld-map-check.patch \ file://etc/ld.so.conf \ @@ -16,15 +17,15 @@ SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \ file://ppc-sqrt_finite.patch \ file://ppc_slow_ieee754_sqrt.patch \ file://add_resource_h_to_wait_h.patch \ - file://fsl-ppc-no-fsqrt.patch \ file://0001-R_ARM_TLS_DTPOFF32.patch \ file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ file://fix-tibetian-locales.patch \ file://ppce6500-32b_slow_ieee754_sqrt.patch \ file://grok_gold.patch \ file://fix_am_rootsbindir.patch \ + file://0001-Add-unused-attribute.patch \ + file://0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \ ${EGLIBCPATCHES} \ - ${CVEPATCHES} \ " EGLIBCPATCHES = "\ file://timezone-re-written-tzselect-as-posix-sh.patch \ @@ -41,11 +42,6 @@ EGLIBCPATCHES = "\ # file://initgroups_keys.patch \ # -CVEPATCHES = "\ - file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \ - file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \ - file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \ - " LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ |