[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r24566 - in /fsf/trunk/libc: ./ benchtests/ elf/ include/ locale/ locale/programs/ localedata/ localedata/locales/ localedat...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r24566 - in /fsf/trunk/libc: ./ benchtests/ elf/ include/ locale/ locale/programs/ localedata/ localedata/locales/ localedat...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 19 Nov 2013 08:02:09 -0000
Author: eglibc
Date: Tue Nov 19 00:02:00 2013
New Revision: 24566
Log:
Import glibc-mainline for 2013-11-19
Added:
fsf/trunk/libc/benchtests/bench-strsep-ifunc.c
fsf/trunk/libc/benchtests/bench-strsep.c
fsf/trunk/libc/elf/tst-auxv.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/benchtests/Makefile
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/elf/rtld.c
fsf/trunk/libc/include/libc-symbols.h
fsf/trunk/libc/locale/C-monetary.c
fsf/trunk/libc/locale/localeconv.c
fsf/trunk/libc/locale/programs/ld-monetary.c
fsf/trunk/libc/locale/programs/ld-numeric.c
fsf/trunk/libc/locale/programs/locale.c
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/tk_TM
fsf/trunk/libc/localedata/tests-mbwc/tst_mbrtowc.c
fsf/trunk/libc/math/test-fpucw-ieee.c
fsf/trunk/libc/stdio-common/tst-sscanf.c
fsf/trunk/libc/stdio-common/vfscanf.c
fsf/trunk/libc/stdlib/strfmon_l.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Nov 19 00:02:00 2013
@@ -1,3 +1,66 @@
+2013-11-18 Chris Metcalf <cmetcalf@xxxxxxxxxx>
+
+ * math/test-fpucw-ieee.c [!defined _FPU_IEEE] (FPU_CONTROL):
+ Omit definition of FPU_CONTROL and use default if no _FPU_IEEE.
+
+2013-11-18 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
+
+ * elf/Makefile (tst-auxv): New test.
+ * elf/tst-auxv.c: New
+ * elf/rtld.c (dl_main): Adjust AT_EXECFN
+
+2013-11-18 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * include/libc-symbols.h (__hidden_proto): Add argument "thread".
+ (hidden_proto): Caller changed.
+ (hidden_tls_proto): New macro.
+ (libc_hidden_tls_proto): Likewise.
+ (rtld_hidden_tls_proto): Likewise.
+ (libm_hidden_tls_proto): Likewise.
+ (libresolv_hidden_tls_proto): Likewise.
+ (librt_hidden_tls_proto): Likewise.
+ (libdl_hidden_tls_proto): Likewise.
+ (libnss_files_hidden_tls_proto): Likewise.
+ (libnsl_hidden_tls_proto): Likewise.
+ (libnss_nisplus_hidden_tls_proto): Likewise.
+ (libutil_hidden_tls_proto): Likewise.
+
+2013-11-18 OndÃÂej BÃÂlka <neleai@xxxxxxxxx>
+
+ [BZ #10253]
+ * elf/dl-load.c (fillin_rpath): Add linkmap parameter and expand path.
+ (decompose_rpath): Defer expansion to fillin_rpath.
+ (_dl_init_paths): Pass linkmap to fillin_rpath.
+
+2013-11-18 Rajalakshmi Srinivasaraghavan <raji@xxxxxxxxxxxxxxxxxx>
+
+ * benchtests/Makefile: Add strsep.
+ * benchtests/bench-strsep.c: New file: strsep benchtest.
+ * benchtests/bench-strsep-ifunc.c: New file: strsep benchtest.
+
+2013-11-18 Andreas Schwab <schwab@xxxxxxx>
+
+ * locale/programs/locale.c (show_info) [case byte]: Check for
+ '\377' instead of '\177'.
+ * locale/C-monetary.c (not_available): Always use "\377".
+ * stdlib/strfmon_l.c (__vstrfmon_l): Use -2 as marker for
+ unspecified p_sign_posn and n_sign_posn. Check for '\377' to
+ detect unavailable sign_posn locale elements.
+ * locale/localeconv.c (__localeconv): For grouping and
+ mon_grouping handle "\177" and "\377" like no grouping.
+ (INT_ELEM): New macro. Use it to set all numeric members.
+ * locale/programs/ld-monetary.c (monetary_read)
+ <tok_mon_grouping>: Normalize single -1 to the empty string.
+ * locale/programs/ld-numeric.c (numeric_read) <tok_grouping>:
+ Likewise.
+
+2013-11-07 OndÃÂej BÃÂlka <neleai@xxxxxxxxx>
+
+ [BZ #16055]
+ * stdio-common/vfscanf.c (_IO_vfscanf_internal): Limit width
+ when we match (nil).
+ * stdio-common/tst-sscanf.c (struct test): Add testcase.
+
2013-11-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* math/libm-test.inc (TEST_NAN_SIGN): New macro.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Tue Nov 19 00:02:00 2013
@@ -9,16 +9,16 @@
* The following bugs are resolved with this release:
- 156, 387, 431, 832, 2801, 7003, 9954, 10278, 11087, 13028, 13982, 13985,
- 14029, 14143, 14155, 14547, 14699, 14752, 14876, 14910, 15048, 15218,
- 15277, 15308, 15362, 15374, 15400, 15427, 15522, 15531, 15532, 15608,
- 15609, 15610, 15632, 15640, 15670, 15672, 15680, 15681, 15723, 15734,
- 15735, 15736, 15748, 15749, 15754, 15760, 15763, 15764, 15797, 15799,
- 15825, 15844, 15847, 15849, 15855, 15856, 15857, 15859, 15867, 15886,
- 15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919,
- 15921, 15923, 15939, 15948, 15963, 15966, 15985, 15988, 15997, 16032,
- 16034, 16036, 16037, 16041, 16071, 16072, 16074, 16078, 16103, 16112,
- 16143, 16146, 16150, 16151, 16153, 16167, 16172.
+ 156, 387, 431, 832, 2801, 7003, 9954, 10253, 10278, 11087, 13028, 13982,
+ 13985, 14029, 14143, 14155, 14547, 14699, 14752, 14876, 14910, 15048,
+ 15218, 15277, 15308, 15362, 15374, 15400, 15427, 15522, 15531, 15532,
+ 15608, 15609, 15610, 15632, 15640, 15670, 15672, 15680, 15681, 15723,
+ 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15763, 15764, 15797,
+ 15799, 15825, 15844, 15847, 15849, 15855, 15856, 15857, 15859, 15867,
+ 15886, 15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15917,
+ 15919, 15921, 15923, 15939, 15948, 15963, 15966, 15985, 15988, 15997,
+ 16032, 16034, 16036, 16037, 16041, 16055, 16071, 16072, 16074, 16078,
+ 16103, 16112, 16143, 16144, 16146, 16150, 16151, 16153, 16167, 16172.
* CVE-2012-4412 The strcoll implementation caches indices and rules for
large collation sequences to optimize multiple passes. This cache
Modified: fsf/trunk/libc/benchtests/Makefile
==============================================================================
--- fsf/trunk/libc/benchtests/Makefile (original)
+++ fsf/trunk/libc/benchtests/Makefile Tue Nov 19 00:02:00 2013
@@ -28,7 +28,7 @@
mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
strcat strchr strchrnul strcmp strcpy strcspn strlen \
strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
- strspn strstr strcpy_chk stpcpy_chk memrchr
+ strspn strstr strcpy_chk stpcpy_chk memrchr strsep
string-bench-ifunc := $(addsuffix -ifunc, $(string-bench))
string-bench-all := $(string-bench) $(string-bench-ifunc)
Added: fsf/trunk/libc/benchtests/bench-strsep-ifunc.c
==============================================================================
--- fsf/trunk/libc/benchtests/bench-strsep-ifunc.c (added)
+++ fsf/trunk/libc/benchtests/bench-strsep-ifunc.c Tue Nov 19 00:02:00 2013
@@ -1,0 +1,20 @@
+/* Measure IFUNC implementations of strsep function.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "bench-strsep.c"
Added: fsf/trunk/libc/benchtests/bench-strsep.c
==============================================================================
--- fsf/trunk/libc/benchtests/bench-strsep.c (added)
+++ fsf/trunk/libc/benchtests/bench-strsep.c Tue Nov 19 00:02:00 2013
@@ -1,0 +1,174 @@
+/* Measure strsep functions.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_MAIN
+#define TEST_NAME "strsep"
+#include "bench-string.h"
+
+char *
+simple_strsep (char **s1, char *s2)
+{
+ char *begin;
+ char *s;
+ size_t j = 0;
+
+ begin = *s1;
+ s = begin;
+ if (begin == NULL)
+ return NULL;
+ ssize_t s2len = strlen (s2);
+ while (*s)
+ {
+ for (j = 0; j < s2len; j++)
+ {
+ if (*s == s2[j])
+ {
+ s[0] = '\0';
+ *s1 = s + 1;
+ return begin;
+ }
+ }
+ s++;
+ }
+ *s1 = NULL;
+ return begin;
+}
+
+typedef char *(*proto_t) (const char **, const char *);
+
+IMPL (simple_strsep, 0)
+IMPL (strsep, 1)
+
+static void
+do_one_test (impl_t * impl, const char *s1, const char *s2)
+{
+ size_t i, iters = INNER_LOOP_ITERS;
+ timing_t start, stop, cur;
+
+ TIMING_NOW (start);
+ for (i = 0; i < iters; ++i)
+ {
+ CALL (impl, &s1, s2);
+ }
+ TIMING_NOW (stop);
+
+ TIMING_DIFF (cur, start, stop);
+
+ TIMING_PRINT_MEAN ((double) cur, (double) iters);
+}
+
+static void
+do_test (size_t align1, size_t align2, size_t len1, size_t len2, int fail)
+{
+ char *s2 = (char *) (buf2 + align2);
+ static const char d[] = "1234567890abcdef";
+#define dl (sizeof (d) - 1)
+ char *ss2 = s2;
+ for (size_t l = len2; l > 0; l = l > dl ? l - dl : 0)
+ {
+ size_t t = l > dl ? dl : l;
+ ss2 = mempcpy (ss2, d, t);
+ }
+ s2[len2] = '\0';
+
+ printf ("Length %4zd/%zd, alignment %2zd/%2zd, %s:",
+ len1, len2, align1, align2, fail ? "fail" : "found");
+
+ FOR_EACH_IMPL (impl, 0)
+ {
+ char *s1 = (char *) (buf1 + align1);
+ if (fail)
+ {
+ char *ss1 = s1;
+ for (size_t l = len1; l > 0; l = l > dl ? l - dl : 0)
+ {
+ size_t t = l > dl ? dl : l;
+ memcpy (ss1, d, t);
+ ++ss1[len2 > 7 ? 7 : len2 - 1];
+ ss1 += t;
+ }
+ }
+ else
+ {
+ memset (s1, '0', len1);
+ memcpy (s1 + (len1 - len2) - 2, s2, len2);
+ if ((len1 / len2) > 4)
+ memcpy (s1 + (len1 - len2) - (3 * len2), s2, len2);
+ }
+ s1[len1] = '\0';
+ do_one_test (impl, s1, s2);
+ }
+ putchar ('\n');
+}
+
+static int
+test_main (void)
+{
+ test_init ();
+
+ printf ("%23s", "");
+ FOR_EACH_IMPL (impl, 0)
+ printf ("\t%s", impl->name);
+ putchar ('\n');
+
+ for (size_t klen = 2; klen < 32; ++klen)
+ for (size_t hlen = 2 * klen; hlen < 16 * klen; hlen += klen)
+ {
+ do_test (0, 0, hlen, klen, 0);
+ do_test (0, 0, hlen, klen, 1);
+ do_test (0, 3, hlen, klen, 0);
+ do_test (0, 3, hlen, klen, 1);
+ do_test (0, 9, hlen, klen, 0);
+ do_test (0, 9, hlen, klen, 1);
+ do_test (0, 15, hlen, klen, 0);
+ do_test (0, 15, hlen, klen, 1);
+
+ do_test (3, 0, hlen, klen, 0);
+ do_test (3, 0, hlen, klen, 1);
+ do_test (3, 3, hlen, klen, 0);
+ do_test (3, 3, hlen, klen, 1);
+ do_test (3, 9, hlen, klen, 0);
+ do_test (3, 9, hlen, klen, 1);
+ do_test (3, 15, hlen, klen, 0);
+ do_test (3, 15, hlen, klen, 1);
+
+ do_test (9, 0, hlen, klen, 0);
+ do_test (9, 0, hlen, klen, 1);
+ do_test (9, 3, hlen, klen, 0);
+ do_test (9, 3, hlen, klen, 1);
+ do_test (9, 9, hlen, klen, 0);
+ do_test (9, 9, hlen, klen, 1);
+ do_test (9, 15, hlen, klen, 0);
+ do_test (9, 15, hlen, klen, 1);
+
+ do_test (15, 0, hlen, klen, 0);
+ do_test (15, 0, hlen, klen, 1);
+ do_test (15, 3, hlen, klen, 0);
+ do_test (15, 3, hlen, klen, 1);
+ do_test (15, 9, hlen, klen, 0);
+ do_test (15, 9, hlen, klen, 1);
+ do_test (15, 15, hlen, klen, 0);
+ do_test (15, 15, hlen, klen, 1);
+ }
+ do_test (0, 0, page_size - 1, 16, 0);
+ do_test (0, 0, page_size - 1, 16, 1);
+
+ return ret;
+}
+
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Tue Nov 19 00:02:00 2013
@@ -119,7 +119,8 @@
endif
tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 \
- tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
+ tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \
+ tst-auxv
tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static \
tst-leaks1-static tst-array1-static tst-array5-static \
tst-ptrguard1-static
Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Tue Nov 19 00:02:00 2013
@@ -1117,6 +1117,9 @@
break;
case AT_ENTRY:
av->a_un.a_val = *user_entry;
+ break;
+ case AT_EXECFN:
+ av->a_un.a_val = (uintptr_t) _dl_argv[0];
break;
}
#endif
Added: fsf/trunk/libc/elf/tst-auxv.c
==============================================================================
--- fsf/trunk/libc/elf/tst-auxv.c (added)
+++ fsf/trunk/libc/elf/tst-auxv.c Tue Nov 19 00:02:00 2013
@@ -1,0 +1,45 @@
+/* Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <elf.h>
+#include <link.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <misc/sys/auxv.h>
+
+static int
+do_test (int argc, char *argv[])
+{
+ const char *execfn = (const char *) getauxval (AT_EXECFN);
+
+ if (execfn == NULL)
+ {
+ printf ("No AT_EXECFN found, test skipped\n");
+ return 0;
+ }
+
+ if (strcmp (argv[0], execfn) != 0)
+ {
+ printf ("Mismatch: argv[0]: %s vs. AT_EXECFN: %s\n", argv[0], execfn);
+ return 1;
+ }
+
+ return 0;
+}
+
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/include/libc-symbols.h
==============================================================================
--- fsf/trunk/libc/include/libc-symbols.h (original)
+++ fsf/trunk/libc/include/libc-symbols.h Tue Nov 19 00:02:00 2013
@@ -471,9 +471,11 @@
# define __hidden_proto_hiddenattr(attrs...) \
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
- __hidden_proto (name, __GI_##name, ##attrs)
-# define __hidden_proto(name, internal, attrs...) \
- extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_tls_proto(name, attrs...) \
+ __hidden_proto (name, __thread, __GI_##name, ##attrs)
+# define __hidden_proto(name, thread, internal, attrs...) \
+ extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
@@ -524,6 +526,7 @@
#else
# ifndef __ASSEMBLER__
# define hidden_proto(name, attrs...)
+# define hidden_tls_proto(name, attrs...)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
@@ -538,6 +541,7 @@
#if !defined NOT_IN_libc
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libc_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
# define libc_hidden_def(name) hidden_def (name)
# define libc_hidden_weak(name) hidden_weak (name)
# ifdef LINK_OBSOLETE_RPC
@@ -552,6 +556,7 @@
# define libc_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libc_hidden_proto(name, attrs...)
+# define libc_hidden_tls_proto(name, attrs...)
# define libc_hidden_def(name)
# define libc_hidden_weak(name)
# define libc_hidden_ver(local, name)
@@ -562,6 +567,7 @@
#if defined NOT_IN_libc && defined IS_IN_rtld
# define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
# define rtld_hidden_def(name) hidden_def (name)
# define rtld_hidden_weak(name) hidden_weak (name)
# define rtld_hidden_ver(local, name) hidden_ver (local, name)
@@ -570,6 +576,7 @@
# define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define rtld_hidden_proto(name, attrs...)
+# define rtld_hidden_tls_proto(name, attrs...)
# define rtld_hidden_def(name)
# define rtld_hidden_weak(name)
# define rtld_hidden_ver(local, name)
@@ -580,6 +587,7 @@
#if defined NOT_IN_libc && defined IS_IN_libm
# define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
# define libm_hidden_def(name) hidden_def (name)
# define libm_hidden_weak(name) hidden_weak (name)
# define libm_hidden_ver(local, name) hidden_ver (local, name)
@@ -588,6 +596,7 @@
# define libm_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libm_hidden_proto(name, attrs...)
+# define libm_hidden_tls_proto(name, attrs...)
# define libm_hidden_def(name)
# define libm_hidden_weak(name)
# define libm_hidden_ver(local, name)
@@ -598,6 +607,8 @@
#if defined NOT_IN_libc && defined IS_IN_libresolv
# define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libresolv_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libresolv_hidden_def(name) hidden_def (name)
# define libresolv_hidden_weak(name) hidden_weak (name)
# define libresolv_hidden_ver(local, name) hidden_ver (local, name)
@@ -606,6 +617,7 @@
# define libresolv_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libresolv_hidden_proto(name, attrs...)
+# define libresolv_hidden_tls_proto(name, attrs...)
# define libresolv_hidden_def(name)
# define libresolv_hidden_weak(name)
# define libresolv_hidden_ver(local, name)
@@ -616,6 +628,8 @@
#if defined NOT_IN_libc && defined IS_IN_librt
# define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define librt_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define librt_hidden_def(name) hidden_def (name)
# define librt_hidden_weak(name) hidden_weak (name)
# define librt_hidden_ver(local, name) hidden_ver (local, name)
@@ -624,6 +638,7 @@
# define librt_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define librt_hidden_proto(name, attrs...)
+# define librt_hidden_tls_proto(name, attrs...)
# define librt_hidden_def(name)
# define librt_hidden_weak(name)
# define librt_hidden_ver(local, name)
@@ -634,6 +649,8 @@
#if defined NOT_IN_libc && defined IS_IN_libdl
# define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libdl_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libdl_hidden_def(name) hidden_def (name)
# define libdl_hidden_weak(name) hidden_weak (name)
# define libdl_hidden_ver(local, name) hidden_ver (local, name)
@@ -642,6 +659,7 @@
# define libdl_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libdl_hidden_proto(name, attrs...)
+# define libdl_hidden_tls_proto(name, attrs...)
# define libdl_hidden_def(name)
# define libdl_hidden_weak(name)
# define libdl_hidden_ver(local, name)
@@ -652,6 +670,8 @@
#if defined NOT_IN_libc && defined IS_IN_libnss_files
# define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libnss_files_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libnss_files_hidden_def(name) hidden_def (name)
# define libnss_files_hidden_weak(name) hidden_weak (name)
# define libnss_files_hidden_ver(local, name) hidden_ver (local, name)
@@ -660,6 +680,7 @@
# define libnss_files_hidden_data_ver(local, name) hidden_data_ver(local, name)
#else
# define libnss_files_hidden_proto(name, attrs...)
+# define libnss_files_hidden_tls_proto(name, attrs...)
# define libnss_files_hidden_def(name)
# define libnss_files_hidden_weak(name)
# define libnss_files_hidden_ver(local, name)
@@ -670,6 +691,8 @@
#if defined NOT_IN_libc && defined IS_IN_libnsl
# define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libnsl_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libnsl_hidden_def(name) hidden_def (name)
# define libnsl_hidden_weak(name) hidden_weak (name)
# define libnsl_hidden_ver(local, name) hidden_ver (local, name)
@@ -678,6 +701,7 @@
# define libnsl_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libnsl_hidden_proto(name, attrs...)
+# define libnsl_hidden_tls_proto(name, attrs...)
# define libnsl_hidden_def(name)
# define libnsl_hidden_weak(name)
# define libnsl_hidden_ver(local, name)
@@ -688,6 +712,8 @@
#if defined NOT_IN_libc && defined IS_IN_libnss_nisplus
# define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libnss_nisplus_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libnss_nisplus_hidden_def(name) hidden_def (name)
# define libnss_nisplus_hidden_weak(name) hidden_weak (name)
# define libnss_nisplus_hidden_ver(local, name) hidden_ver (local, name)
@@ -696,6 +722,7 @@
# define libnss_nisplus_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libnss_nisplus_hidden_proto(name, attrs...)
+# define libnss_nisplus_hidden_tls_proto(name, attrs...)
# define libnss_nisplus_hidden_def(name)
# define libnss_nisplus_hidden_weak(name)
# define libnss_nisplus_hidden_ver(local, name)
@@ -714,6 +741,8 @@
#if defined NOT_IN_libc && defined IS_IN_libutil
# define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+# define libutil_hidden_tls_proto(name, attrs...) \
+ hidden_tls_proto (name, ##attrs)
# define libutil_hidden_def(name) hidden_def (name)
# define libutil_hidden_weak(name) hidden_weak (name)
# define libutil_hidden_ver(local, name) hidden_ver (local, name)
@@ -722,6 +751,7 @@
# define libutil_hidden_data_ver(local, name) hidden_data_ver (local, name)
#else
# define libutil_hidden_proto(name, attrs...)
+# define libutil_hidden_tls_proto(name, attrs...)
# define libutil_hidden_def(name)
# define libutil_hidden_weak(name)
# define libutil_hidden_ver(local, name)
Modified: fsf/trunk/libc/locale/C-monetary.c
==============================================================================
--- fsf/trunk/libc/locale/C-monetary.c (original)
+++ fsf/trunk/libc/locale/C-monetary.c Tue Nov 19 00:02:00 2013
@@ -21,11 +21,7 @@
/* This table's entries are taken from POSIX.2 Table 2-9
``LC_MONETARY Category Definition in the POSIX Locale'',
with additions from ISO 14652, section 4.4. */
-#ifdef __CHAR_UNSIGNED__
static const char not_available[] = "\377";
-#else
-static const char not_available[] = "\177";
-#endif
const struct __locale_data _nl_C_LC_MONETARY attribute_hidden =
{
Modified: fsf/trunk/libc/locale/localeconv.c
==============================================================================
--- fsf/trunk/libc/locale/localeconv.c (original)
+++ fsf/trunk/libc/locale/localeconv.c Tue Nov 19 00:02:00 2013
@@ -28,7 +28,7 @@
result.decimal_point = (char *) _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
result.thousands_sep = (char *) _NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP);
result.grouping = (char *) _NL_CURRENT (LC_NUMERIC, GROUPING);
- if (*result.grouping == CHAR_MAX || *result.grouping == (char) -1)
+ if (*result.grouping == '\177' || *result.grouping == '\377')
result.grouping = (char *) "";
result.int_curr_symbol = (char *) _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL);
@@ -38,31 +38,29 @@
result.mon_thousands_sep = (char *) _NL_CURRENT (LC_MONETARY,
MON_THOUSANDS_SEP);
result.mon_grouping = (char *) _NL_CURRENT (LC_MONETARY, MON_GROUPING);
- if (*result.mon_grouping == CHAR_MAX || *result.mon_grouping == (char) -1)
+ if (*result.mon_grouping == '\177' || *result.mon_grouping == '\377')
result.mon_grouping = (char *) "";
result.positive_sign = (char *) _NL_CURRENT (LC_MONETARY, POSITIVE_SIGN);
result.negative_sign = (char *) _NL_CURRENT (LC_MONETARY, NEGATIVE_SIGN);
- result.int_frac_digits = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_FRAC_DIGITS);
- result.frac_digits = *(char *) _NL_CURRENT (LC_MONETARY, FRAC_DIGITS);
- result.p_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY, P_CS_PRECEDES);
- result.p_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY, P_SEP_BY_SPACE);
- result.n_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY, N_CS_PRECEDES);
- result.n_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY, N_SEP_BY_SPACE);
- result.p_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, P_SIGN_POSN);
- result.n_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
- result.int_p_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_P_CS_PRECEDES);
- result.int_p_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_P_SEP_BY_SPACE);
- result.int_n_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_N_CS_PRECEDES);
- result.int_n_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_N_SEP_BY_SPACE);
- result.int_p_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_P_SIGN_POSN);
- result.int_n_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY,
- INT_N_SIGN_POSN);
+
+#define INT_ELEM(member, element) \
+ result.member = *(char *) _NL_CURRENT (LC_MONETARY, element); \
+ if (result.member == '\377') result.member = CHAR_MAX
+
+ INT_ELEM (int_frac_digits, INT_FRAC_DIGITS);
+ INT_ELEM (frac_digits, FRAC_DIGITS);
+ INT_ELEM (p_cs_precedes, P_CS_PRECEDES);
+ INT_ELEM (p_sep_by_space, P_SEP_BY_SPACE);
+ INT_ELEM (n_cs_precedes, N_CS_PRECEDES);
+ INT_ELEM (n_sep_by_space, N_SEP_BY_SPACE);
+ INT_ELEM (p_sign_posn, P_SIGN_POSN);
+ INT_ELEM (n_sign_posn, N_SIGN_POSN);
+ INT_ELEM (int_p_cs_precedes, INT_P_CS_PRECEDES);
+ INT_ELEM (int_p_sep_by_space, INT_P_SEP_BY_SPACE);
+ INT_ELEM (int_n_cs_precedes, INT_N_CS_PRECEDES);
+ INT_ELEM (int_n_sep_by_space, INT_N_SEP_BY_SPACE);
+ INT_ELEM (int_p_sign_posn, INT_P_SIGN_POSN);
+ INT_ELEM (int_n_sign_posn, INT_N_SIGN_POSN);
return &result;
}
Modified: fsf/trunk/libc/locale/programs/ld-monetary.c
==============================================================================
--- fsf/trunk/libc/locale/programs/ld-monetary.c (original)
+++ fsf/trunk/libc/locale/programs/ld-monetary.c Tue Nov 19 00:02:00 2013
@@ -677,6 +677,9 @@
if (!ignore_content)
{
+ /* A single -1 means no grouping. */
+ if (act == 1 && grouping[0] == '\177')
+ act--;
grouping[act++] = '\0';
monetary->mon_grouping = xrealloc (grouping, act);
Modified: fsf/trunk/libc/locale/programs/ld-numeric.c
==============================================================================
--- fsf/trunk/libc/locale/programs/ld-numeric.c (original)
+++ fsf/trunk/libc/locale/programs/ld-numeric.c Tue Nov 19 00:02:00 2013
@@ -305,6 +305,9 @@
if (now->tok != tok_eol)
goto err_label;
+ /* A single -1 means no grouping. */
+ if (act == 1 && grouping[0] == '\177')
+ act--;
grouping[act++] = '\0';
numeric->grouping = xrealloc (grouping, act);
Modified: fsf/trunk/libc/locale/programs/locale.c
==============================================================================
--- fsf/trunk/libc/locale/programs/locale.c (original)
+++ fsf/trunk/libc/locale/programs/locale.c Tue Nov 19 00:02:00 2013
@@ -895,7 +895,7 @@
printf ("%s=", item->name);
if (val != NULL)
- printf ("%d", *val == '\177' ? -1 : *val);
+ printf ("%d", *val == '\377' ? -1 : *val);
putchar ('\n');
}
break;
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Tue Nov 19 00:02:00 2013
@@ -1,3 +1,12 @@
+2013-11-18 Chris Leonard <cjl@xxxxxxxxxxxxx>
+
+ [BZ #16144]
+ * locales/tk_TM: Duplicated abday value for tk_TM.
+
+2013-11-18 OndÃÂej BÃÂlka <neleai@xxxxxxxxx>
+
+ * tests-mbwc/tst_mbrtowc.c (tst_mbrtowc): Remove unused t_ini variable.
+
2013-11-17 Chris Leonard <cjl@xxxxxxxxxxxxx>
[BZ #16146]
Modified: fsf/trunk/libc/localedata/locales/tk_TM
==============================================================================
--- fsf/trunk/libc/localedata/locales/tk_TM (original)
+++ fsf/trunk/libc/localedata/locales/tk_TM Tue Nov 19 00:02:00 2013
@@ -308,10 +308,6 @@
"<U015E><U0065><U006E><U0062><U0065>";/
"<U00DD><U0065><U006B><U015F><U0065><U006E><U0062><U0065>"
-abday "<U0044><U0079><U006E>";"<U0042><U0061><U015F>";/
- "<U0059><U0061><U015F>";"<U0048><U006F><U015F>";/
- "<U0053><U006F><U0067>";"<U0041><U006E><U006E>";/
- "<U0052><U0075><U0068>"
abday "<U0044><U0075><U015F>";"<U0053><U0069><U015F>";/
"<U00C7><U0061><U0072>";"<U0050><U0065><U006E>";/
"<U0041><U006E><U006E>";"<U015E><U0065><U006E>";/
Modified: fsf/trunk/libc/localedata/tests-mbwc/tst_mbrtowc.c
==============================================================================
--- fsf/trunk/libc/localedata/tests-mbwc/tst_mbrtowc.c (original)
+++ fsf/trunk/libc/localedata/tests-mbwc/tst_mbrtowc.c Tue Nov 19 00:02:00 2013
@@ -16,7 +16,7 @@
char w_flg, s_flg;
char *s;
size_t n;
- char t_flg, t_ini;
+ char t_flg;
static mbstate_t t = { 0 };
mbstate_t *pt;
wchar_t wc, *pwc, wc_ex;
@@ -42,7 +42,6 @@
s = TST_INPUT_SEQ (mbrtowc).s;
n = TST_INPUT_SEQ (mbrtowc).n;
t_flg = TST_INPUT_SEQ (mbrtowc).t_flg;
- t_ini = TST_INPUT_SEQ (mbrtowc).t_init;
pwc = (w_flg == 0) ? NULL : &wc;
if (s_flg == 0)
@@ -56,12 +55,7 @@
}
pt = (t_flg == 0) ? NULL : &t;
-#if 0
- if (t_ini != 0)
- {
- memset (&t, 0, sizeof (t));
- }
-#endif
+
TST_CLEAR_ERRNO;
ret = mbrtowc (pwc, s, n, pt);
TST_SAVE_ERRNO;
Modified: fsf/trunk/libc/math/test-fpucw-ieee.c
==============================================================================
--- fsf/trunk/libc/math/test-fpucw-ieee.c (original)
+++ fsf/trunk/libc/math/test-fpucw-ieee.c Tue Nov 19 00:02:00 2013
@@ -16,9 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#define FPU_CONTROL _FPU_IEEE
+#ifdef _FPU_IEEE
+/* Some architectures don't have _FPU_IEEE. */
+# define FPU_CONTROL _FPU_IEEE
+#endif
#include "test-fpucw.c"
/* Preempt the library's definition of `__fpu_control'. */
-fpu_control_t __fpu_control = _FPU_IEEE;
+fpu_control_t __fpu_control = FPU_CONTROL;
Modified: fsf/trunk/libc/stdio-common/tst-sscanf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-sscanf.c (original)
+++ fsf/trunk/libc/stdio-common/tst-sscanf.c Tue Nov 19 00:02:00 2013
@@ -92,6 +92,8 @@
{ L("foo bar"), L("foo bar"), 0 },
{ L("foo bar"), L("foo %d"), 0 },
{ L("foo bar"), L("foon%d"), 0 },
+ { L("foo (nil)"), L("foo %p"), 1},
+ { L("foo (nil)"), L("foo %4p"), 0},
{ L("foo "), L("foo %n"), 0 },
{ L("foo%bar1"), L("foo%%bar%d"), 1 },
/* Some OSes skip whitespace here while others don't. */
Modified: fsf/trunk/libc/stdio-common/vfscanf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/vfscanf.c (original)
+++ fsf/trunk/libc/stdio-common/vfscanf.c Tue Nov 19 00:02:00 2013
@@ -1757,7 +1757,7 @@
we must recognize "(nil)" as well. */
if (__builtin_expect (wpsize == 0
&& (flags & READ_POINTER)
- && (width < 0 || width >= 0)
+ && (width < 0 || width >= 5)
&& c == '('
&& TOLOWER (inchar ()) == L_('n')
&& TOLOWER (inchar ()) == L_('i')
Modified: fsf/trunk/libc/stdlib/strfmon_l.c
==============================================================================
--- fsf/trunk/libc/stdlib/strfmon_l.c (original)
+++ fsf/trunk/libc/stdlib/strfmon_l.c Tue Nov 19 00:02:00 2013
@@ -158,8 +158,8 @@
group = 1; /* Print digits grouped. */
pad = ' '; /* Fill character is <SP>. */
is_long_double = 0; /* Double argument by default. */
- p_sign_posn = -1; /* This indicates whether the */
- n_sign_posn = -1; /* '(' flag is given. */
+ p_sign_posn = -2; /* This indicates whether the */
+ n_sign_posn = -2; /* '(' flag is given. */
width = -1; /* No width specified so far. */
left = 0; /* Right justified by default. */
@@ -181,7 +181,7 @@
group = 0;
continue;
case '+': /* Use +/- for sign of number. */
- if (n_sign_posn != -1)
+ if (n_sign_posn != -2)
{
__set_errno (EINVAL);
return -1;
@@ -190,7 +190,7 @@
n_sign_posn = *_NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
continue;
case '(': /* Use ( ) for negative sign. */
- if (n_sign_posn != -1)
+ if (n_sign_posn != -2)
{
__set_errno (EINVAL);
return -1;
@@ -310,16 +310,16 @@
/* If not specified by the format string now find the values for
the format specification. */
- if (p_sign_posn == -1)
+ if (p_sign_posn == -2)
p_sign_posn = *_NL_CURRENT (LC_MONETARY, int_format ? INT_P_SIGN_POSN : P_SIGN_POSN);
- if (n_sign_posn == -1)
+ if (n_sign_posn == -2)
n_sign_posn = *_NL_CURRENT (LC_MONETARY, int_format ? INT_N_SIGN_POSN : N_SIGN_POSN);
if (right_prec == -1)
{
right_prec = *_NL_CURRENT (LC_MONETARY, int_format ? INT_FRAC_DIGITS : FRAC_DIGITS);
- if (right_prec == CHAR_MAX)
+ if (right_prec == '\377')
right_prec = 2;
}
@@ -384,13 +384,13 @@
cs_precedes = 1;
if (other_cs_precedes != 0)
other_cs_precedes = 1;
- if (sep_by_space == CHAR_MAX)
+ if (sep_by_space == '\377')
sep_by_space = 0;
- if (other_sep_by_space == CHAR_MAX)
+ if (other_sep_by_space == '\377')
other_sep_by_space = 0;
- if (sign_posn == CHAR_MAX)
+ if (sign_posn == '\377')
sign_posn = 1;
- if (other_sign_posn == CHAR_MAX)
+ if (other_sign_posn == '\377')
other_sign_posn = 1;
/* Check for degenerate cases */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits