glibc/nonascii-case.patch
Andreas Schwab 746e16d2b9 Accepting request 186119 from home:Andreas_Schwab:glibc
- Update to glibc 2.17.90 85891acadf1b:
  * CVE-2013-2207 Incorrectly granting access to another user's pseudo-terminal
    has been fixed by disabling the use of pt_chown (Bugzilla #15755).
    Distributions can re-enable building and using pt_chown via the new configure
    option `--enable-pt_chown'.  Enabling the use of pt_chown carries with it
    considerable security risks and should only be used if the distribution
    understands and accepts the risks.
  * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
    #15078).
  * CVE-2013-1914 Stack overflow in getaddrinfo with many results has been
    fixed (Bugzilla #15330).
  * Add support for calling C++11 thread_local object destructors on thread
    and program exit.  This needs compiler support for offloading C++11
    destructor calls to glibc.
  * Improved worst case performance of libm functions with double inputs and
    output.
  * Support for priority inherited mutexes in pthread condition variables on
    non-x86 architectures.
  * Optimized string functions for AArch64.  Implemented by Marcus Shawcroft.
  * Optimized string functions for ARM.  Implemented by Will Newton and
    Richard Henderson.
  * Added a benchmark framework to track performance of functions in glibc.
  * New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
    It is based on draft TS 18661 and currently enabled as a GNU extension.
  * On Linux, the clock function now uses the clock_gettime system call
    for improved precision, rather than old times system call.
  * Added new API functions pthread_getattr_default_np and
    pthread_setattr_default_np to get and set the default pthread
    attributes of a process.
  * Added support for TSX lock elision for pthread mutexes on i386 and x86-64.

OBS-URL: https://build.opensuse.org/request/show/186119
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=304
2013-08-06 14:52:55 +00:00

149 lines
3.9 KiB
Diff

[BZ #15736]
* locale/categories.def (LC_CTYPE): Add "nonascii-case" element.
* string/Makefile (test-strcasecmp-ENV, test-strncasecmp-ENV)
(test-strcasecmp-ifunc-ENV, test-strncasecmp-ifunc-ENV): Define.
* string/test-strcasecmp.c (test_main): Run tests in several
locales.
* string/test-strncasecmp.c (test_main): Likewise.
Index: glibc-2.17.90/locale/categories.def
===================================================================
--- glibc-2.17.90.orig/locale/categories.def
+++ glibc-2.17.90/locale/categories.def
@@ -133,6 +133,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE_LEN, "ctype-translit-ignore-len", std, word)
DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE, "ctype-translit-ignore", std, string)
DEFINE_ELEMENT (_NL_CTYPE_MAP_TO_NONASCII, "map-to-nonascii", std, word)
+ DEFINE_ELEMENT (_NL_CTYPE_NONASCII_CASE, "nonascii-case", std, word)
), _nl_postload_ctype)
Index: glibc-2.17.90/string/Makefile
===================================================================
--- glibc-2.17.90.orig/string/Makefile
+++ glibc-2.17.90/string/Makefile
@@ -65,6 +65,10 @@ noinl-tester-ENV = LANGUAGE=C
tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
+test-strcasecmp-ENV = LOCPATH=$(common-objpfx)localedata
+test-strncasecmp-ENV = LOCPATH=$(common-objpfx)localedata
+test-strcasecmp-ifunc-ENV = LOCPATH=$(common-objpfx)localedata
+test-strncasecmp-ifunc-ENV = LOCPATH=$(common-objpfx)localedata
CFLAGS-inl-tester.c = -fno-builtin
CFLAGS-noinl-tester.c = -fno-builtin
CFLAGS-tst-strlen.c = -fno-builtin
Index: glibc-2.17.90/string/test-strcasecmp.c
===================================================================
--- glibc-2.17.90.orig/string/test-strcasecmp.c
+++ glibc-2.17.90/string/test-strcasecmp.c
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <locale.h>
#include <ctype.h>
#define TEST_MAIN
#define TEST_NAME "strcasecmp"
@@ -206,14 +207,18 @@ do_random_tests (void)
}
}
-int
-test_main (void)
+static void
+test_locale (const char *locale)
{
size_t i;
- test_init ();
+ if (setlocale (LC_CTYPE, locale) == NULL)
+ {
+ error (0, 0, "cannot set locale \"%s\"", locale);
+ ret = 1;
+ }
- printf ("%23s", "");
+ printf ("%-23s", locale);
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
putchar ('\n');
@@ -246,6 +251,19 @@ test_main (void)
}
do_random_tests ();
+}
+
+int
+test_main (void)
+{
+ test_init ();
+
+ test_locale ("C");
+ test_locale ("en_US.ISO-8859-1");
+ test_locale ("en_US.UTF-8");
+ test_locale ("tr_TR.ISO-8859-9");
+ test_locale ("tr_TR.UTF-8");
+
return ret;
}
Index: glibc-2.17.90/string/test-strncasecmp.c
===================================================================
--- glibc-2.17.90.orig/string/test-strncasecmp.c
+++ glibc-2.17.90/string/test-strncasecmp.c
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <locale.h>
#include <ctype.h>
#define TEST_MAIN
#define TEST_NAME "strncasecmp"
@@ -256,17 +257,21 @@ bz14195 (void)
check_result (impl, empty_string, "", 5, 0);
}
-int
-test_main (void)
+static void
+test_locale (const char *locale)
{
size_t i;
- test_init ();
+ if (setlocale (LC_CTYPE, locale) == NULL)
+ {
+ error (0, 0, "cannot set locale \"%s\"", locale);
+ ret = 1;
+ }
bz12205 ();
bz14195 ();
- printf ("%23s", "");
+ printf ("%23s", locale);
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
putchar ('\n');
@@ -329,6 +334,19 @@ test_main (void)
}
do_random_tests ();
+}
+
+int
+test_main (void)
+{
+ test_init ();
+
+ test_locale ("C");
+ test_locale ("en_US.ISO-8859-1");
+ test_locale ("en_US.UTF-8");
+ test_locale ("tr_TR.ISO-8859-9");
+ test_locale ("tr_TR.UTF-8");
+
return ret;
}