From bd5a53f1a20b8ba4bb58f8e33a4fa69419ede7e9f390661ea988fdd31b62c9f1 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dleuenberger@suse.com>
Date: Fri, 22 Apr 2016 14:15:59 +0000
Subject: [PATCH] Accepting request 387900 from Base:System

OBS-URL: https://build.opensuse.org/request/show/387900
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=200
---
 catopen-unbound-alloca.patch           | 219 ------
 crypt_blowfish-1.3.tar.gz.sign         |  10 -
 dont-remove-nodelete-flag.patch        |  34 -
 errorcheck-mutex-no-elision.patch      | 102 ---
 fix-locking-in-_IO_cleanup.patch       |   2 +-
 glibc-2.14-crypt.diff                  | 307 ++++-----
 glibc-2.22.tar.xz                      |   3 -
 glibc-2.22.tar.xz.sig                  |  11 -
 glibc-2.23.tar.xz                      |   3 +
 glibc-2.23.tar.xz.sig                  |  11 +
 glibc-c-utf8-locale.patch              | 270 ++++++++
 glibc-disable-gettext-for-c-utf8.patch |  12 +
 glibc-memset-nontemporal.diff          |  16 +-
 glibc-resolv-reload.diff               |   2 +-
 glibc-testsuite.changes                |  99 ++-
 glibc-testsuite.spec                   | 144 ++--
 glibc-utils.changes                    |  99 ++-
 glibc-utils.spec                       | 144 ++--
 glibc-version.diff                     |   2 +-
 glibc.changes                          |  99 ++-
 glibc.spec                             | 144 ++--
 hcreate-overflow-check.patch           | 193 ------
 ibm93x-redundant-shift-si.patch        | 201 ------
 iconv-reset-input-buffer.patch         |   2 +-
 isinf-cxx11-conflict.patch             | 127 ----
 ld-pointer-guard.patch                 |  66 --
 ldd-system-interp.patch                |  16 +-
 mntent-blank-line.patch                | 183 -----
 no-long-double.patch                   |  23 +
 openat64-readd-o-largefile.patch       |  16 -
 opendir-o-directory-check.patch        |  21 -
 powerpc-elision-adapt-param.patch      |  81 ---
 powerpc-elision-enable-envvar.patch    |  41 ++
 powerpc-lock-elision-race.patch        | 146 ----
 prelink-elf-rtype-class.patch          | 258 -------
 refactor-nan-parsing.patch             | 896 -------------------------
 send-dg-buffer-overflow.patch          | 569 ----------------
 static-dlopen.patch                    |  18 -
 strcoll-remove-strdiff-opt.patch       | 366 ----------
 strftime-range-check.patch             | 126 ----
 tls-dtor-list-mangling.patch           |  37 -
 tzset-tzname.patch                     | 133 ----
 vector-finite-math-aliases.patch       | 149 ----
 43 files changed, 962 insertions(+), 4439 deletions(-)
 delete mode 100644 catopen-unbound-alloca.patch
 delete mode 100644 crypt_blowfish-1.3.tar.gz.sign
 delete mode 100644 dont-remove-nodelete-flag.patch
 delete mode 100644 errorcheck-mutex-no-elision.patch
 delete mode 100644 glibc-2.22.tar.xz
 delete mode 100644 glibc-2.22.tar.xz.sig
 create mode 100644 glibc-2.23.tar.xz
 create mode 100644 glibc-2.23.tar.xz.sig
 create mode 100644 glibc-c-utf8-locale.patch
 create mode 100644 glibc-disable-gettext-for-c-utf8.patch
 delete mode 100644 hcreate-overflow-check.patch
 delete mode 100644 ibm93x-redundant-shift-si.patch
 delete mode 100644 isinf-cxx11-conflict.patch
 delete mode 100644 ld-pointer-guard.patch
 delete mode 100644 mntent-blank-line.patch
 create mode 100644 no-long-double.patch
 delete mode 100644 openat64-readd-o-largefile.patch
 delete mode 100644 opendir-o-directory-check.patch
 delete mode 100644 powerpc-elision-adapt-param.patch
 create mode 100644 powerpc-elision-enable-envvar.patch
 delete mode 100644 powerpc-lock-elision-race.patch
 delete mode 100644 prelink-elf-rtype-class.patch
 delete mode 100644 refactor-nan-parsing.patch
 delete mode 100644 send-dg-buffer-overflow.patch
 delete mode 100644 static-dlopen.patch
 delete mode 100644 strcoll-remove-strdiff-opt.patch
 delete mode 100644 strftime-range-check.patch
 delete mode 100644 tls-dtor-list-mangling.patch
 delete mode 100644 tzset-tzname.patch
 delete mode 100644 vector-finite-math-aliases.patch

diff --git a/catopen-unbound-alloca.patch b/catopen-unbound-alloca.patch
deleted file mode 100644
index fbfd278..0000000
--- a/catopen-unbound-alloca.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-2015-08-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
-
-	[BZ #17905]
-	* catgets/Makefile (tst-catgets-mem): New test.
-	* catgets/catgets.c (catopen): Don't use unbounded alloca.
-	* catgets/open_catalog.c (__open_catalog): Likewise.
-	* catgets/tst-catgets.c (do_bz17905): Test unbounded alloca.
-
-Index: glibc-2.22/catgets/Makefile
-===================================================================
---- glibc-2.22.orig/catgets/Makefile
-+++ glibc-2.22/catgets/Makefile
-@@ -34,6 +34,7 @@ test-srcs = test-gencat
- ifeq ($(run-built-tests),yes)
- tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
- 		 $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
-+tests-special += $(objpfx)tst-catgets-mem.out
- endif
- 
- gencat-modules	= xmalloc
-@@ -50,9 +51,11 @@ catgets-CPPFLAGS := -DNLSPATH='"$(msgcat
- 
- generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
- 	     test-gencat.h
-+generated += tst-catgets.mtrace tst-catgets-mem.out
-+
- generated-dirs += de
- 
--tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
-+tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de MALLOC_TRACE=$(objpfx)tst-catgets.mtrace
- 
- ifeq ($(run-built-tests),yes)
- # This test just checks whether the program produces any error or not.
-@@ -86,4 +89,8 @@ $(objpfx)test-gencat.out: test-gencat.sh
- $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
- 	$(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
- 	$(evaluate-test)
-+
-+$(objpfx)tst-catgets-mem.out: $(objpfx)tst-catgets.out
-+	$(common-objpfx)malloc/mtrace $(objpfx)tst-catgets.mtrace > $@; \
-+	$(evaluate-test)
- endif
-Index: glibc-2.22/catgets/catgets.c
-===================================================================
---- glibc-2.22.orig/catgets/catgets.c
-+++ glibc-2.22/catgets/catgets.c
-@@ -16,7 +16,6 @@
-    License along with the GNU C Library; if not, see
-    <http://www.gnu.org/licenses/>.  */
- 
--#include <alloca.h>
- #include <errno.h>
- #include <locale.h>
- #include <nl_types.h>
-@@ -35,6 +34,7 @@ catopen (const char *cat_name, int flag)
-   __nl_catd result;
-   const char *env_var = NULL;
-   const char *nlspath = NULL;
-+  char *tmp = NULL;
- 
-   if (strchr (cat_name, '/') == NULL)
-     {
-@@ -54,7 +54,10 @@ catopen (const char *cat_name, int flag)
- 	{
- 	  /* Append the system dependent directory.  */
- 	  size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
--	  char *tmp = alloca (len);
-+	  tmp = malloc (len);
-+
-+	  if (__glibc_unlikely (tmp == NULL))
-+	    return (nl_catd) -1;
- 
- 	  __stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
- 	  nlspath = tmp;
-@@ -65,16 +68,18 @@ catopen (const char *cat_name, int flag)
- 
-   result = (__nl_catd) malloc (sizeof (*result));
-   if (result == NULL)
--    /* We cannot get enough memory.  */
--    return (nl_catd) -1;
--
--  if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
-+    {
-+      /* We cannot get enough memory.  */
-+      result = (nl_catd) -1;
-+    }
-+  else if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
-     {
-       /* Couldn't open the file.  */
-       free ((void *) result);
--      return (nl_catd) -1;
-+      result = (nl_catd) -1;
-     }
- 
-+  free (tmp);
-   return (nl_catd) result;
- }
- 
-Index: glibc-2.22/catgets/open_catalog.c
-===================================================================
---- glibc-2.22.orig/catgets/open_catalog.c
-+++ glibc-2.22/catgets/open_catalog.c
-@@ -47,6 +47,7 @@ __open_catalog (const char *cat_name, co
-   size_t tab_size;
-   const char *lastp;
-   int result = -1;
-+  char *buf = NULL;
- 
-   if (strchr (cat_name, '/') != NULL || nlspath == NULL)
-     fd = open_not_cancel_2 (cat_name, O_RDONLY);
-@@ -57,23 +58,23 @@ __open_catalog (const char *cat_name, co
-   if (__glibc_unlikely (bufact + (n) >= bufmax))			      \
-     {									      \
-       char *old_buf = buf;						      \
--      bufmax += 256 + (n);						      \
--      buf = (char *) alloca (bufmax);					      \
--      memcpy (buf, old_buf, bufact);					      \
-+      bufmax += (bufmax < 256 + (n)) ? 256 + (n) : bufmax;		      \
-+      buf = realloc (buf, bufmax);					      \
-+      if (__glibc_unlikely (buf == NULL))				      \
-+	{								      \
-+	  free (old_buf);						      \
-+	  return -1;							      \
-+	}								      \
-     }
- 
-       /* The RUN_NLSPATH variable contains a colon separated list of
- 	 descriptions where we expect to find catalogs.  We have to
- 	 recognize certain % substitutions and stop when we found the
- 	 first existing file.  */
--      char *buf;
-       size_t bufact;
--      size_t bufmax;
-+      size_t bufmax = 0;
-       size_t len;
- 
--      buf = NULL;
--      bufmax = 0;
--
-       fd = -1;
-       while (*run_nlspath != '\0')
- 	{
-@@ -188,7 +189,10 @@ __open_catalog (const char *cat_name, co
- 
-   /* Avoid dealing with directories and block devices */
-   if (__builtin_expect (fd, 0) < 0)
--    return -1;
-+    {
-+      free (buf);
-+      return -1;
-+    }
- 
-   if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
-     goto close_unlock_return;
-@@ -325,6 +329,7 @@ __open_catalog (const char *cat_name, co
-   /* Release the lock again.  */
-  close_unlock_return:
-   close_not_cancel_no_status (fd);
-+  free (buf);
- 
-   return result;
- }
-Index: glibc-2.22/catgets/tst-catgets.c
-===================================================================
---- glibc-2.22.orig/catgets/tst-catgets.c
-+++ glibc-2.22/catgets/tst-catgets.c
-@@ -1,7 +1,10 @@
-+#include <assert.h>
- #include <mcheck.h>
- #include <nl_types.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
-+#include <sys/resource.h>
- 
- 
- static const char *msgs[] =
-@@ -12,6 +15,33 @@ static const char *msgs[] =
- };
- #define nmsgs (sizeof (msgs) / sizeof (msgs[0]))
- 
-+
-+/* Test for unbounded alloca.  */
-+static int
-+do_bz17905 (void)
-+{
-+  char *buf;
-+  struct rlimit rl;
-+  nl_catd result;
-+
-+  const int sz = 1024 * 1024;
-+
-+  getrlimit (RLIMIT_STACK, &rl);
-+  rl.rlim_cur = sz;
-+  setrlimit (RLIMIT_STACK, &rl);
-+
-+  buf = malloc (sz + 1);
-+  memset (buf, 'A', sz);
-+  buf[sz] = '\0';
-+  setenv ("NLSPATH", buf, 1);
-+
-+  result = catopen (buf, NL_CAT_LOCALE);
-+  assert (result == (nl_catd) -1);
-+
-+  free (buf);
-+  return 0;
-+}
-+
- #define ROUNDS 5
- 
- static int
-@@ -62,6 +92,7 @@ do_test (void)
- 	}
-     }
- 
-+  result += do_bz17905 ();
-   return result;
- }
- 
diff --git a/crypt_blowfish-1.3.tar.gz.sign b/crypt_blowfish-1.3.tar.gz.sign
deleted file mode 100644
index 77b51bb..0000000
--- a/crypt_blowfish-1.3.tar.gz.sign
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1
-Comment: http://www.openwall.com/signatures/
-
-iQCVAwUAU71f6nK5fbEpUCnxAQJCewQAqvRc4UbpJyJlYR0sbVbIjLPc6+3s9KQ9
-9LUrDkNJLlWli/4i0FXiFgRohNgzSYwaMRqbrsxZ+Dbp5XHKgjf3wzyhGGDvr0wb
-fLvIVrIHO/XgeBz08h6feFsxD+er5iy4FMBVe1MRMw6IiJNtWsahQLP5EjddfEwD
-XvIct4zt2Cc=
-=cncr
------END PGP SIGNATURE-----
diff --git a/dont-remove-nodelete-flag.patch b/dont-remove-nodelete-flag.patch
deleted file mode 100644
index 4749ba5..0000000
--- a/dont-remove-nodelete-flag.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Index: glibc-2.22/elf/dl-close.c
-===================================================================
---- glibc-2.22.orig/elf/dl-close.c
-+++ glibc-2.22/elf/dl-close.c
-@@ -144,6 +144,14 @@ _dl_close_worker (struct link_map *map,
-   char done[nloaded];
-   struct link_map *maps[nloaded];
- 
-+   /* Clear DF_1_NODELETE to force object deletion.  We don't need to touch
-+      l_tls_dtor_count because forced object deletion only happens when an
-+      error occurs during object load.  Destructor registration for TLS
-+      non-POD objects should not have happened till then for this
-+      object.  */
-+  if (force)
-+    map->l_flags_1 &= ~DF_1_NODELETE;
-+
-   /* Run over the list and assign indexes to the link maps and enter
-      them into the MAPS array.  */
-   int idx = 0;
-@@ -152,14 +160,6 @@ _dl_close_worker (struct link_map *map,
-       l->l_idx = idx;
-       maps[idx] = l;
-       ++idx;
--
--      /* Clear DF_1_NODELETE to force object deletion.  We don't need to touch
--	 l_tls_dtor_count because forced object deletion only happens when an
--	 error occurs during object load.  Destructor registration for TLS
--	 non-POD objects should not have happened till then for this
--	 object.  */
--      if (force)
--	l->l_flags_1 &= ~DF_1_NODELETE;
-     }
-   assert (idx == nloaded);
- 
diff --git a/errorcheck-mutex-no-elision.patch b/errorcheck-mutex-no-elision.patch
deleted file mode 100644
index 90ee12a..0000000
--- a/errorcheck-mutex-no-elision.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-2016-01-25  Andreas Schwab  <schwab@suse.de>
-
-	[BZ #17514]
-	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock)
-	<case PTHREAD_MUTEX_ERRORCHECK_NP>: Don't do lock elision.
-	* nptl/Makefile (tests): Add tst-mutex-errorcheck.
-	* nptl/tst-mutex-errorcheck.c: New file.
-
-Index: glibc-2.22/nptl/Makefile
-===================================================================
---- glibc-2.22.orig/nptl/Makefile
-+++ glibc-2.22/nptl/Makefile
-@@ -283,7 +283,8 @@ tests = tst-typesizes \
- 	tst-getpid3 \
- 	tst-setuid3 \
- 	tst-initializers1 $(addprefix tst-initializers1-,c89 gnu89 c99 gnu99) \
--	tst-bad-schedattr
-+	tst-bad-schedattr \
-+	tst-thread_local1 tst-mutex-errorcheck
- xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
- 	tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
- test-srcs = tst-oddstacklimit
-Index: glibc-2.22/nptl/pthread_mutex_timedlock.c
-===================================================================
---- glibc-2.22.orig/nptl/pthread_mutex_timedlock.c
-+++ glibc-2.22/nptl/pthread_mutex_timedlock.c
-@@ -90,7 +90,8 @@ pthread_mutex_timedlock (mutex, abstime)
-       if (__glibc_unlikely (mutex->__data.__owner == id))
- 	return EDEADLK;
- 
--      /* FALLTHROUGH */
-+      /* Don't do lock elision on an error checking mutex.  */
-+      goto simple;
- 
-     case PTHREAD_MUTEX_TIMED_NP:
-       FORCE_ELISION (mutex, goto elision);
-Index: glibc-2.22/nptl/tst-mutex-errorcheck.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/nptl/tst-mutex-errorcheck.c
-@@ -0,0 +1,61 @@
-+/* Check that error checking mutexes are not subject to lock elision.
-+   Copyright (C) 2016 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 <stdio.h>
-+#include <errno.h>
-+#include <time.h>
-+#include <pthread.h>
-+
-+static int
-+do_test (void)
-+{
-+  struct timespec tms = { 0 };
-+  pthread_mutex_t mutex;
-+  pthread_mutexattr_t mutexattr;
-+  int ret = 0;
-+
-+  if (pthread_mutexattr_init (&mutexattr) != 0)
-+    return 1;
-+  if (pthread_mutexattr_settype (&mutexattr, PTHREAD_MUTEX_ERRORCHECK) != 0)
-+    return 1;
-+
-+  if (pthread_mutex_init (&mutex, &mutexattr) != 0)
-+    return 1;
-+  if (pthread_mutexattr_destroy (&mutexattr) != 0)
-+    return 1;
-+
-+  /* The call to pthread_mutex_timedlock erroneously enabled lock elision
-+     on the mutex, which then triggered an assertion failure in
-+     pthread_mutex_unlock.  It would also defeat the error checking nature
-+     of the mutex.  */
-+  if (pthread_mutex_timedlock (&mutex, &tms) != 0)
-+    return 1;
-+  if (pthread_mutex_timedlock (&mutex, &tms) != EDEADLK)
-+    {
-+      printf ("Failed error checking on locked mutex\n");
-+      ret = 1;
-+    }
-+
-+  if (pthread_mutex_unlock (&mutex) != 0)
-+    ret = 1;
-+
-+  return ret;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
diff --git a/fix-locking-in-_IO_cleanup.patch b/fix-locking-in-_IO_cleanup.patch
index 4608ecc..b3f591b 100644
--- a/fix-locking-in-_IO_cleanup.patch
+++ b/fix-locking-in-_IO_cleanup.patch
@@ -186,7 +186,7 @@ index e0ce8cc..9def1d4 100644
  
  	  if (! dealloc_buffers && !(fp->_flags & _IO_USER_BUF))
 @@ -980,8 +934,8 @@ _IO_unbuffer_write (void)
- 	  _IO_SETBUF (fp, NULL, 0);
+ 	    _IO_wsetb (fp, NULL, NULL, 0);
  
  #ifdef _IO_MTSAFE_IO
 -	  if (cnt < MAXTRIES && fp->_lock != NULL)
diff --git a/glibc-2.14-crypt.diff b/glibc-2.14-crypt.diff
index f857644..767ea1f 100644
--- a/glibc-2.14-crypt.diff
+++ b/glibc-2.14-crypt.diff
@@ -44,11 +44,11 @@ Index: glibc-2.20/crypt/crypt-entry.c
   */
  
  char *
--__crypt_r (key, salt, data)
-+__des_crypt_r (key, salt, data)
-      const char *key;
-      const char *salt;
-      struct crypt_data * __restrict data;
+-__crypt_r (const char *key, const char *salt,
++__des_crypt_r (const char *key, const char *salt,
+ 	   struct crypt_data * __restrict data)
+ {
+   ufc_long res[4];
 @@ -145,6 +145,7 @@ __crypt_r (key, salt, data)
    _ufc_output_conversion_r (res[0], res[1], salt, data);
    return data->crypt_3_buf;
@@ -91,269 +91,242 @@ Index: glibc-2.20/sysdeps/unix/sysv/linux/aarch64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/aarch64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/alpha/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/alpha/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/arm/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/arm/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/hppa/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/hppa/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/i386/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/i386/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/ia64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/ia64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/m68k/coldfire/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/m68k/coldfire/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/m68k/m680x0/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/m68k/m680x0/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/microblaze/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/microblaze/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/mips/mips32/fpu/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/mips/mips32/fpu/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/mips/mips64/n32/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/mips/mips64/n32/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/mips/mips64/n64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/mips/mips64/n64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc64/libowcrypt-le.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc64/libowcrypt-le.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/powerpc/powerpc64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/s390/s390-32/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/s390/s390-32/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/s390/s390-64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/s390/s390-64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/sh/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/sh/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/sparc/sparc32/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/sparc/sparc32/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/sparc/sparc64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/sparc/sparc64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/tile/tilepro/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/tile/tilepro/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/x86_64/64/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/x86_64/64/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
 Index: glibc-2.20/sysdeps/unix/sysv/linux/x86_64/x32/libowcrypt.abilist
 ===================================================================
 --- /dev/null
 +++ glibc-2.20/sysdeps/unix/sysv/linux/x86_64/x32/libowcrypt.abilist
-@@ -0,0 +1,5 @@
-+OW_CRYPT_1.0
-+ OW_CRYPT_1.0 A
-+ crypt_gensalt F
-+ crypt_gensalt_ra F
-+ crypt_gensalt_rn F
+@@ -0,0 +1,4 @@
++OW_CRYPT_1.0 OW_CRYPT_1.0 A
++OW_CRYPT_1.0 crypt_gensalt F
++OW_CRYPT_1.0 crypt_gensalt_ra F
++OW_CRYPT_1.0 crypt_gensalt_rn F
diff --git a/glibc-2.22.tar.xz b/glibc-2.22.tar.xz
deleted file mode 100644
index cda9102..0000000
--- a/glibc-2.22.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948
-size 12969072
diff --git a/glibc-2.22.tar.xz.sig b/glibc-2.22.tar.xz.sig
deleted file mode 100644
index 7c558c4..0000000
--- a/glibc-2.22.tar.xz.sig
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1
-
-iQEcBAABAgAGBQJVwbd/AAoJECXvCkNsKkr/51cIAKdzgyrQSN6EKFIIhj/SrxPz
-RyxACKUITXw5F5BldwIx3pYqpF3V7eslWdkPcZ7Ztcc/9irgvoW+qARAxivciOn1
-N33GA8hLG+Nj4kYCI9DjdJTB01UsR1iEd02ISRB23rqnUvVOgioPubJKb6GJM9Ob
-NyAn/rIR+hVXAb5SDci2lkiA604MWg2VdjPxt+dDc8lBCcBfkGHh1Sz+nVxyXWGR
-v45+US9jwefFCgBLJvfUmqlgUYxmB6RxMcxrlNx4mTtobdsQM+rBOy84T12s3HMK
-k1IPVd6YD7k4lOYjSpzzc/sj7Ib33/hfbGvwDFpjr85RgoGUgsyqnSxEL1U8Azw=
-=C5JY
------END PGP SIGNATURE-----
diff --git a/glibc-2.23.tar.xz b/glibc-2.23.tar.xz
new file mode 100644
index 0000000..549667e
--- /dev/null
+++ b/glibc-2.23.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94efeb00e4603c8546209cefb3e1a50a5315c86fa9b078b6fad758e187ce13e9
+size 13455260
diff --git a/glibc-2.23.tar.xz.sig b/glibc-2.23.tar.xz.sig
new file mode 100644
index 0000000..377ae1e
--- /dev/null
+++ b/glibc-2.23.tar.xz.sig
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQEcBAABAgAGBQJWxqmXAAoJECXvCkNsKkr/RAcIALXtkYD/eJ2DM+PBWv+/8UD6
+iT2PAjaEhWWbSOu+u9DonCm9FjVjwXZSxOhtNt5x4l4SQfNVMnYc+/m6O30JKhrq
+5spaVhL3v0aqxWaIqLapAlG3JuQFc2ItOW+W191MYSPANB366pUW0Z28//ccCifq
+8q/hLiB6KXBdHkDX7odtYNkUQY5Ql+Ikkjcxt5tS8JOmBHX6ZJ9aACFeX7AuxxfE
+l9DFnYLDzpNdxXJpOEZRprSDJizV84JiaN9XvuWjQHd1W2IeRYiwTxI0EmOO8cOD
+ldHkzmkABkfOfswcYlp294IYXp3a+Rvn+wNHQFLwxdnIbeUZ/bd4t49UWDgBp1w=
+=DBf0
+-----END PGP SIGNATURE-----
diff --git a/glibc-c-utf8-locale.patch b/glibc-c-utf8-locale.patch
new file mode 100644
index 0000000..2aa622b
--- /dev/null
+++ b/glibc-c-utf8-locale.patch
@@ -0,0 +1,270 @@
+From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
+From: Mike FABIAN <mfabian@redhat.com>
+Date: Mon, 10 Aug 2015 15:58:12 +0200
+Subject: [PATCH] Add a C.UTF-8 locale
+
+---
+ localedata/SUPPORTED |   1 +
+ localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 239 insertions(+)
+ create mode 100644 localedata/locales/C
+
+diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
+index 8ca023e..2a78391 100644
+--- a/localedata/SUPPORTED
++++ b/localedata/SUPPORTED
+@@ -1,6 +1,7 @@
+ # This file names the currently supported and somewhat tested locales.
+ # If you have any additions please file a glibc bug report.
+ SUPPORTED-LOCALES=\
++C.UTF-8/UTF-8 \
+ aa_DJ.UTF-8/UTF-8 \
+ aa_DJ/ISO-8859-1 \
+ aa_ER/UTF-8 \
+diff --git a/localedata/locales/C b/localedata/locales/C
+new file mode 100644
+index 0000000..fdf460e
+--- /dev/null
++++ b/localedata/locales/C
+@@ -0,0 +1,238 @@
++escape_char /
++comment_char %
++% Locale for C locale in UTF-8
++
++LC_IDENTIFICATION
++title      "C locale"
++source     ""
++address    ""
++contact    ""
++email      "mfabian@redhat.com"
++tel        ""
++fax        ""
++language   "C"
++territory  ""
++revision   "1.0"
++date       "2015-08-10"
++%
++category  "C:2015";LC_IDENTIFICATION
++category  "C:2015";LC_CTYPE
++category  "C:2015";LC_COLLATE
++category  "C:2015";LC_TIME
++category  "C:2015";LC_NUMERIC
++category  "C:2015";LC_MONETARY
++category  "C:2015";LC_MESSAGES
++category  "C:2015";LC_PAPER
++category  "C:2015";LC_NAME
++category  "C:2015";LC_ADDRESS
++category  "C:2015";LC_TELEPHONE
++category  "C:2015";LC_MEASUREMENT
++END LC_IDENTIFICATION
++
++LC_CTYPE
++copy "i18n"
++
++translit_start
++include "translit_combining";""
++translit_end
++
++END LC_CTYPE
++
++LC_COLLATE
++order_start forward
++<U0000>
++..
++<UFFFF>
++<U10000>
++..
++<U1FFFF>
++<U20000>
++..
++<U2FFFF>
++<UE0000>
++..
++<UEFFFF>
++<UF0000>
++..
++<UFFFFF>
++<U100000>
++..
++<U10FFFF>
++UNDEFINED
++order_end
++END LC_COLLATE
++
++LC_MONETARY
++% This is the 14652 i18n fdcc-set definition for
++% the LC_MONETARY category
++% (except for the int_curr_symbol and currency_symbol, they are empty in
++% the 14652 i18n fdcc-set definition and also empty in
++% glibc/locale/C-monetary.c. But localedef complains in that case).
++%
++% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
++% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
++int_curr_symbol     "<U0055><U0053><U0044><U0020>"
++% Using "$" for currency_symbol. But maybe <U00A4> would be better?
++% U+00A4 is the "generic currency symbol"
++% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
++currency_symbol     "<U0024>"
++mon_decimal_point   "<U002E>"
++mon_thousands_sep   ""
++mon_grouping        -1
++positive_sign       ""
++negative_sign       "<U002D>"
++int_frac_digits     -1
++frac_digits         -1
++p_cs_precedes       -1
++int_p_sep_by_space  -1
++p_sep_by_space      -1
++n_cs_precedes       -1
++int_n_sep_by_space  -1
++n_sep_by_space      -1
++p_sign_posn         -1
++n_sign_posn         -1
++%
++END LC_MONETARY
++
++LC_NUMERIC
++% This is the POSIX Locale definition for
++% the LC_NUMERIC category.
++%
++decimal_point   "<U002E>"
++thousands_sep   ""
++grouping        -1
++END LC_NUMERIC
++
++LC_TIME
++% This is the POSIX Locale definition for
++% the LC_TIME category.
++%
++% Abbreviated weekday names (%a)
++abday       "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
++            "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
++            "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
++            "<U0053><U0061><U0074>"
++
++% Full weekday names (%A)
++day         "<U0053><U0075><U006E><U0064><U0061><U0079>";/
++            "<U004D><U006F><U006E><U0064><U0061><U0079>";/
++            "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
++            "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
++            "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
++            "<U0046><U0072><U0069><U0064><U0061><U0079>";/
++            "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
++
++% Abbreviated month names (%b)
++abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
++            "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
++            "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
++            "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
++            "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
++            "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
++
++% Full month names (%B)
++mon         "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
++            "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
++            "<U004D><U0061><U0072><U0063><U0068>";/
++            "<U0041><U0070><U0072><U0069><U006C>";/
++            "<U004D><U0061><U0079>";/
++            "<U004A><U0075><U006E><U0065>";/
++            "<U004A><U0075><U006C><U0079>";/
++            "<U0041><U0075><U0067><U0075><U0073><U0074>";/
++            "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
++            "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
++            "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
++            "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
++
++% Week description, consists of three fields:
++% 1. Number of days in a week.
++% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
++% 3. The weekday number to be contained in the first week of the year.
++%
++% ISO 8601 conforming applications should use the values 7, 19971201 (a
++% Monday), and 4 (Thursday), respectively.
++week    7;19971201;4
++first_weekday	1
++first_workday	1
++
++% Appropriate date and time representation (%c)
++%	"%a %b %e %H:%M:%S %Y"
++d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
++
++% Appropriate date representation (%x)
++%	"%m/%d/%y"
++d_fmt   "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
++
++% Appropriate time representation (%X)
++%	"%H:%M:%S"
++t_fmt   "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
++
++% Appropriate AM/PM time representation (%r)
++%	"%I:%M:%S %p"
++t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
++
++% Equivalent of AM/PM (%p)      "AM"/"PM"
++%
++am_pm	"<U0041><U004D>";"<U0050><U004D>"
++
++% Appropriate date representation (date(1))   "%a %b %e %H:%M:%S %Z %Y"
++date_fmt	"<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
++END LC_TIME
++
++LC_MESSAGES
++% This is the POSIX Locale definition for
++% the LC_NUMERIC category.
++%
++yesexpr "<U005E><U005B><U0079><U0059><U005D>"
++noexpr  "<U005E><U005B><U006E><U004E><U005D>"
++yesstr  "<U0059><U0065><U0073>"
++nostr   "<U004E><U006F>"
++END LC_MESSAGES
++
++LC_PAPER
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_PAPER category.
++% (A4 paper, this is also used in the built in C/POSIX
++% locale in glibc/locale/C-paper.c)
++height   297
++width    210
++END LC_PAPER
++
++LC_NAME
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_NAME category.
++% "%p%t%g%t%m%t%f"
++% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
++name_fmt    "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
++<U0025><U006D><U0025><U0074><U0025><U0066>"
++END LC_NAME
++
++LC_ADDRESS
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_ADDRESS category.
++% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
++% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
++postal_fmt    "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
++<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
++<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
++<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
++<U004E><U0025><U0063><U0025><U004E>"
++END LC_ADDRESS
++
++LC_TELEPHONE
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_TELEPHONE category.
++% "+%c %a %l"
++tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
++<U006C>"
++% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
++END LC_TELEPHONE
++
++LC_MEASUREMENT
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_MEASUREMENT category.
++% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
++%metric
++measurement    1
++END LC_MEASUREMENT
++
+-- 
+2.4.3
+
diff --git a/glibc-disable-gettext-for-c-utf8.patch b/glibc-disable-gettext-for-c-utf8.patch
new file mode 100644
index 0000000..466df5b
--- /dev/null
+++ b/glibc-disable-gettext-for-c-utf8.patch
@@ -0,0 +1,12 @@
+Index: glibc-2.23/intl/dcigettext.c
+===================================================================
+--- glibc-2.23.orig/intl/dcigettext.c
++++ glibc-2.23/intl/dcigettext.c
+@@ -714,6 +714,7 @@ DCIGETTEXT (const char *domainname, cons
+       /* If the current locale value is C (or POSIX) we don't load a
+ 	 domain.  Return the MSGID.  */
+       if (strcmp (single_locale, "C") == 0
++	  || strcmp (single_locale, "C.UTF-8") == 0
+ 	  || strcmp (single_locale, "POSIX") == 0)
+ 	break;
+ 
diff --git a/glibc-memset-nontemporal.diff b/glibc-memset-nontemporal.diff
index 413b515..d6a3489 100644
--- a/glibc-memset-nontemporal.diff
+++ b/glibc-memset-nontemporal.diff
@@ -5,9 +5,9 @@ index db4fb84..9c42018 100644
 --- a/sysdeps/x86_64/memset.S
 +++ b/sysdeps/x86_64/memset.S
 @@ -84,6 +84,9 @@ L(loop_start):
- 	movdqu	%xmm8, -48(%rdi,%rdx)
- 	movdqu	%xmm8, 48(%rdi)
- 	movdqu	%xmm8, -64(%rdi,%rdx)
+ 	movdqu	%xmm0, -48(%rdi,%rdx)
+ 	movdqu	%xmm0, 48(%rdi)
+ 	movdqu	%xmm0, -64(%rdi,%rdx)
 +	mov	__x86_shared_cache_size(%rip),%r9d  # The largest cache size
 +	cmp	%r9,%rdx
 +	ja	L(nt_move)
@@ -25,10 +25,10 @@ index db4fb84..9c42018 100644
 +	je	L(return)
 +	.p2align 4
 +L(nt_loop):
-+	movntdq	%xmm8, (%rcx)
-+	movntdq	%xmm8, 16(%rcx)
-+	movntdq	%xmm8, 32(%rcx)
-+	movntdq	%xmm8, 48(%rcx)
++	movntdq	%xmm0, (%rcx)
++	movntdq	%xmm0, 16(%rcx)
++	movntdq	%xmm0, 32(%rcx)
++	movntdq	%xmm0, 48(%rcx)
 +	addq	$64, %rcx
 +	cmpq	%rcx, %rdx
 +	jne	L(nt_loop)
@@ -36,5 +36,5 @@ index db4fb84..9c42018 100644
 +	rep
 +	ret
  L(less_16_bytes):
- 	movq %xmm8, %rcx
+ 	movq %xmm0, %rcx
  	testb	$24, %dl
diff --git a/glibc-resolv-reload.diff b/glibc-resolv-reload.diff
index 397e300..e1cbbf1 100644
--- a/glibc-resolv-reload.diff
+++ b/glibc-resolv-reload.diff
@@ -79,7 +79,7 @@ Index: glibc-2.17.90/resolv/res_libc.c
 @@ -22,7 +22,7 @@
  #include <arpa/nameser.h>
  #include <resolv.h>
- #include <bits/libc-lock.h>
+ #include <libc-lock.h>
 -
 +#include <sys/stat.h>
  
diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes
index 50b0b7f..2d69bea 100644
--- a/glibc-testsuite.changes
+++ b/glibc-testsuite.changes
@@ -1,3 +1,85 @@
+-------------------------------------------------------------------
+Mon Apr 11 08:00:07 UTC 2016 - schwab@suse.de
+
+- Add compatibility symlinks for LSB 3.0 (fate#318933)
+
+-------------------------------------------------------------------
+Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
+
+- powerpc-elision-enable-envvar.patch: enable TLE only if
+  GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
+
+-------------------------------------------------------------------
+Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de
+
+- ldd-system-interp.patch: Restore warning about execution permission, it
+  is still needed for noexec mounts (bsc#915985)
+
+-------------------------------------------------------------------
+Tue Mar  8 15:28:16 UTC 2016 - idonmez@suse.com
+
+- Add C.UTF-8 locale (see https://sourceware.org/glibc/wiki/Proposals/C.UTF-8)
+  and rh#902094 . Added with glibc-c-utf8-locale.patch.
+- Add glibc-disable-gettext-for-c-utf8.patch to disable gettext for
+  C.UTF-8 same as C locale.
+
+-------------------------------------------------------------------
+Mon Mar  7 14:47:50 UTC 2016 - schwab@suse.de
+
+- Move %install_info_delete to %preun
+- crypt_blowfish-1.3.tar.gz.sign: Remove, the sign key is no longer
+  acceptable
+
+-------------------------------------------------------------------
+Tue Feb 23 16:11:36 UTC 2016 - schwab@suse.de
+
+- no-long-double.patch: Don't use long double functions if NO_LONG_DOUBLE
+
+-------------------------------------------------------------------
+Mon Feb 22 11:05:12 UTC 2016 - schwab@suse.de
+
+- Update to glibc 2.23 release.
+  * Unicode 8.0.0 Support
+  * sched_setaffinity, pthread_setaffinity_np no longer attempt to guess
+    the kernel-internal CPU set size
+  * The fts.h header can now be used with -D_FILE_OFFSET_BITS=64
+  * getaddrinfo now detects certain invalid responses on an internal
+    netlink socket
+  * A defect in the malloc implementation, present since glibc 2.15 (2012)
+    or glibc 2.10 via --enable-experimental-malloc (2009), could result in
+    the unnecessary serialization of memory allocation requests across
+    threads
+  * The obsolete header <regexp.h> has been removed
+  * The obsolete functions bdflush, create_module, get_kernel_syms,
+    query_module and uselib are no longer available to newly linked
+    binaries
+  * Optimized string, wcsmbs and memory functions for IBM z13.
+  * Newly linked programs that define a variable called signgam will no
+    longer have it set by the lgamma, lgammaf and lgammal functions
+- Removed patches:
+  * dont-remove-nodelete-flag.patch
+  * openat64-readd-o-largefile.patch
+  * mntent-blank-line.patch
+  * opendir-o-directory-check.patch
+  * strcoll-remove-strdiff-opt.patch
+  * ld-pointer-guard.patch
+  * tls-dtor-list-mangling.patch
+  * powerpc-lock-elision-race.patch
+  * prelink-elf-rtype-class.patch
+  * vector-finite-math-aliases.patch
+  * powerpc-elision-adapt-param.patch
+  * catopen-unbound-alloca.patch
+  * strftime-range-check.patch
+  * hcreate-overflow-check.patch
+  * errorcheck-mutex-no-elision.patch
+  * refactor-nan-parsing.patch
+  * send-dg-buffer-overflow.patch
+  * isinf-cxx11-conflict.patch
+  * ibm93x-redundant-shift-si.patch
+  * iconv-reset-input-buffer.patch
+  * tzset-tzname.patch
+  * static-dlopen.patch
+
 -------------------------------------------------------------------
 Thu Feb 18 13:22:19 UTC 2016 - schwab@suse.de
 
@@ -39,12 +121,12 @@ Mon Feb 15 15:43:02 UTC 2016 - schwab@suse.de
 Thu Nov 26 14:46:21 UTC 2015 - schwab@suse.de
 
 - reinitialize-dl_load_write_lock.patch: Reinitialize dl_load_write_lock
-  on fork (BZ #19282)
+  on fork (bsc#958315, BZ #19282)
 
 -------------------------------------------------------------------
 Wed Nov 18 15:09:30 UTC 2015 - schwab@suse.de
 
-- resolv-mem-leak.patch: Fix resource leak in resolver (BZ #19257)
+- resolv-mem-leak.patch: Fix resource leak in resolver (bsc#955647, BZ #19257)
 - tzset-tzname.patch: Force rereading TZDEFRULES after it was used to set
   DST rules only (BZ #19253)
 
@@ -56,8 +138,8 @@ Mon Oct 26 15:22:53 UTC 2015 - schwab@suse.de
 -------------------------------------------------------------------
 Mon Oct 19 12:28:58 UTC 2015 - schwab@suse.de
 
-- ld-pointer-guard.patch: Always enable pointer guard (bsc#950944, BZ
-  #18928)
+- ld-pointer-guard.patch: Always enable pointer guard (CVE-2015-8777,
+  bsc#950944, BZ #18928)
 
 -------------------------------------------------------------------
 Mon Oct 12 08:12:10 UTC 2015 - schwab@suse.de
@@ -115,7 +197,7 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
 - Update to glibc 2.22 release.
   * Cache information can be queried via sysconf() function on s390
   * A buffer overflow in gethostbyname_r and related functions performing DNS
-    requests has been fixed.
+    requests has been fixed.  (CVE-2015-1781)
   * The time zone file parser has been made more robust against crafted time
     zone files
   * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors
@@ -126,6 +208,8 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
     compliance.
   * The header <regexp.h> is deprecated, and will be removed in a future
     release.
+  * bsc#905313 bsc#920338 bsc#927080 bsc#928723 bsc#931480 bsc#939211
+    bsc#940195 bsc#940332
 - Patches from upstream removed
   * htm-tabort.patch
   * o-tmpfile.patch
@@ -189,7 +273,7 @@ Mon Mar 30 09:04:49 UTC 2015 - schwab@suse.de
 - powerpc-software-sqrt.patch: Fix powerpc software sqrt (BZ #17964, BZ
   #17967)
 - nss-separate-state-getXXent.patch: Separate internal state between
-  getXXent and getXXbyYY NSS calls (bsc#918187, BZ #18007)
+  getXXent and getXXbyYY NSS calls (CVE-2014-8121, bsc#918187, BZ #18007)
 - static-tls-dtv-limit.patch: Fix DTV race, assert, DTV_SURPLUS Static TLS
   limit, and nptl_db garbage (bsc#919678, BZ #17090, BZ #17620, BZ #17621,
   BZ #17628)
@@ -230,6 +314,8 @@ Mon Feb  9 09:26:01 UTC 2015 - schwab@suse.de
   * i386 memcpy functions optimized with SSE2 unaligned load/store
   * New locales: tu_IN, bh_IN, raj_IN, ce_RU
   * The obsolete sigvec function has been removed
+  * CVE-2015-1472 CVE-2015-1473 CVE-2104-7817 CVE-2012-3406 CVE-2014-9402
+    CVE-2014-7817 bsc#864081 bsc#906371 bsc#909053 bsc#910599 bsc#916222
 - Patches from upstream removed
   * ifunc-x86-slow-sse4.patch
   * pthread-mutex-trylock-elision.patch
@@ -269,6 +355,7 @@ Mon Sep  8 09:48:26 UTC 2014 - schwab@suse.de
     and the LC_* variables), are more tightly checked for proper syntax
   * On x86-64, the dynamic linker's lazy-binding support is now compatible
     with application code using Intel MPX instructions
+  * CVE-2013-7423 bsc#915526 bsc#934084
 - Patches from upstream removed
   * nss-dns-memleak.patch
   * sin-sign.patch
diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec
index 664d526..05d9b9b 100644
--- a/glibc-testsuite.spec
+++ b/glibc-testsuite.spec
@@ -45,6 +45,7 @@ BuildRequires:  systemd-rpm-macros
 BuildRequires:  xz
 %if %{testsuite_build}
 BuildRequires:  gcc-c++
+BuildRequires:  glibc-devel-static
 BuildRequires:  libstdc++-devel
 %endif
 %if %{utils_build}
@@ -102,9 +103,9 @@ BuildRequires:  gd-devel
 # 3.1 is the openSUSE 12.1 kernel
 %define enablekernel 3.0
 
-Version:        2.22
+Version:        2.23
 Release:        0
-%define git_id bbab82c25da9
+%define git_id 10ed3a0ffbb4
 Url:            http://www.gnu.org/software/libc/libc.html
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #Source:         glibc-%{version}-%{git_id}.tar.xz
@@ -123,7 +124,8 @@ Source20:       nscd.conf
 Source21:       nscd.service
 # crypt_blowfish
 Source50:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz
-Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
+# The sign key uses MD5 which is no longer accepted by gpg
+#Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
 
 %if %{normal_build}
 # ngpt was used in 8.1 and SLES8
@@ -208,6 +210,8 @@ Patch15:        glibc-2.3.90-langpackdir.diff
 Patch18:        glibc-cpusetsize.diff
 # PATCH-FEATURE-SLE Use nscd user for nscd
 Patch19:        nscd-server-user.patch
+# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
+Patch21:        powerpc-elision-enable-envvar.patch
 
 ### Locale related patches
 # PATCH-FIX-OPENSUSE Add additional locales
@@ -216,6 +220,10 @@ Patch100:       glibc-2.3.locales.diff.bz2
 Patch102:       glibc-2.4.90-no_NO.diff
 # PATCH-FIX-OPENSUSE -- Renames for China
 Patch103:       glibc-2.4-china.diff
+# PATCH-FIX-OPENSUSE -- Add C.UTF-8 locale
+Patch104:       glibc-c-utf8-locale.patch
+# PATCH-FIX-OPENSUSE -- Disable gettext for C.UTF-8 locale
+Patch105:       glibc-disable-gettext-for-c-utf8.patch
 
 ### Broken patches in glibc that we revert for now:
 
@@ -232,42 +240,10 @@ Patch306:       glibc-fix-double-loopback.diff
 ###
 # Patches from upstream
 ###
-# PATCH-FIX-UPSTREAM Clear DF_1_NODELETE flag only for failed to load library (BZ #18778)
-Patch1000:      dont-remove-nodelete-flag.patch
-# PATCH-FIX-UPSTREAM Readd O_LARGEFILE flag for openat64 (BZ #18781)
-Patch1001:      openat64-readd-o-largefile.patch
-# PATCH-FIX-UPSTREAM getmntent: fix memory corruption w/blank lines (BZ #18887)
-Patch1002:      mntent-blank-line.patch
-# PATCH-FIX-UPSTREAM Fix opendir inverted o_directory_works test (BZ #18921)
-Patch1003:      opendir-o-directory-check.patch
-# PATCH-FIX-UPSTREAM strcoll: Remove incorrect STRDIFF-based optimization (BZ #18589)
-Patch1004:      strcoll-remove-strdiff-opt.patch
-# PATCH-FIX-UPSTREAM Always enable pointer guard (BZ #18928)
-Patch1005:      ld-pointer-guard.patch
-# PATCH-FIX-UPSTREAM Harden tls_dtor_list with pointer mangling (BZ #19018)
-Patch1006:      tls-dtor-list-mangling.patch
-# PATCH-FIX-UPSTREAM PowerPC: Fix a race condition when eliding a lock (BZ #18743)
-Patch1007:      powerpc-lock-elision-race.patch
-# PATCH-FIX-UPSTREAM Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink (BZ #19178)
-Patch1008:      prelink-elf-rtype-class.patch
-# PATCH-FIX-UPSTREAM Better workaround for aliases of *_finite symbols in vector math library (BZ# 19058)
-Patch1009:      vector-finite-math-aliases.patch
-# PATCH-FIX-UPSTREAM powerpc: Fix usage of elision transient failure adapt param (BZ #19174)
-Patch1010:      powerpc-elision-adapt-param.patch
-# PATCH-FIX-UPSTREAM Fix unbound alloca in catopen (CVE-2015-8779, BZ #17905)
-Patch1011:      catopen-unbound-alloca.patch
-# PATCH-FIX-UPSTREAM Add range check on time fields (CVE-2015-8776, BZ #18985)
-Patch1012:      strftime-range-check.patch
-# PATCH-FIX-UPSTREAM Handle overflow in hcreate (CVE-2015-8778, BZ #18240)
-Patch1013:      hcreate-overflow-check.patch
-# PATCH-FIX-UPSTREAM Don't do lock elision on an error checking mutex (BZ #17514)
-Patch1014:      errorcheck-mutex-no-elision.patch
-# PATCH-FIX-UPSTREAM Refactor strtod parsing of NaN payloads (CVE-2014-9761, BZ #16962)
-Patch1015:      refactor-nan-parsing.patch
-# PATCH-FIX-UPSTREAM Fix getaddrinfo stack-based buffer overflow (CVE-2015-7547, BZ #18665)
-Patch1016:      send-dg-buffer-overflow.patch
-# PATCH-FIX-UPSTREAM Fix isinf/isnan declaration conflict with C++11 (BZ #19439)
-Patch1017:      isinf-cxx11-conflict.patch
+# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
+Patch1000:      resolv-mem-leak.patch
+# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
+Patch1001:      no-long-double.patch
 
 ### 
 # Patches awaiting upstream approval
@@ -275,27 +251,19 @@ Patch1017:      isinf-cxx11-conflict.patch
 # PATCH-FIX-UPSTREAM Always to locking when accessing streams (BZ #15142)
 Patch2000:      fix-locking-in-_IO_cleanup.patch
 # PATCH-FIX-UPSTREAM Never try to execute the file in ldd (BZ #16750)
-Patch2002:      ldd-system-interp.patch
+Patch2001:      ldd-system-interp.patch
 # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436)
-Patch2003:      abort-no-flush.patch
+Patch2002:      abort-no-flush.patch
 # PATCH-FIX-UPSTREAM Speedup memset on x86-64 for large block sizes (BZ #16830)
-Patch2005:      glibc-memset-nontemporal.diff
-# PATCH-FIX-UPSTREAM Avoid redundant shift character in iconv output at block boundary (BZ #17197)
-Patch2006:      ibm93x-redundant-shift-si.patch
-# PATCH-FIX-UPSTREAM Static dlopen default library search path fix (BZ #17250)
-Patch2007:      static-dlopen.patch
+Patch2003:      glibc-memset-nontemporal.diff
 # PATCH-FIX-UPSTREAM Fix fnmatch handling of collating elements (BZ #17396, BZ #16976)
-Patch2008:      fnmatch-collating-elements.patch
+Patch2004:      fnmatch-collating-elements.patch
 # PATCH-FIX-UPSTREAM Properly reread entry after failure in nss_files getent function (BZ #18991)
-Patch2009:      nss-files-long-lines-2.patch
+Patch2005:      nss-files-long-lines-2.patch
 # PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
-Patch2010:      iconv-reset-input-buffer.patch
-# PATCH-FIX-UPSTREAM Force rereading TZDEFRULES after it was used to set DST rules only (BZ #19253)
-Patch2011:      tzset-tzname.patch
-# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
-Patch2012:      resolv-mem-leak.patch
+Patch2006:      iconv-reset-input-buffer.patch
 # PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
-Patch2013:      reinitialize-dl_load_write_lock.patch
+Patch2008:      reinitialize-dl_load_write_lock.patch
 
 # Non-glibc patches
 # PATCH-FIX-OPENSUSE Remove debianisms from manpages
@@ -312,7 +280,7 @@ Summary:        Info Files for the GNU C Library
 License:        GFDL-1.1
 Group:          Documentation/Other
 Requires(post): %{install_info_prereq}
-Requires(postun): %{install_info_prereq}
+Requires(preun): %{install_info_prereq}
 BuildArch:      noarch
 
 %description info
@@ -485,10 +453,13 @@ rm nscd/s-stamp
 %patch15 -p1
 %patch18 -p1
 %patch19 -p1
+%patch21 -p1
 
 %patch100 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
+%patch105 -p1
 
 %patch300 -p1
 %patch301 -p1
@@ -497,35 +468,15 @@ rm nscd/s-stamp
 
 %patch1000 -p1
 %patch1001 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1014 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1017 -p1
 
 %patch2000 -p1
+%patch2001 -p1
 %patch2002 -p1
 %patch2003 -p1
+%patch2004 -p1
 %patch2005 -p1
 %patch2006 -p1
-%patch2007 -p1
 %patch2008 -p1
-%patch2009 -p1
-%patch2010 -p1
-%patch2011 -p1
-%patch2012 -p1
-%patch2013 -p1
 
 %patch3000
 
@@ -680,7 +631,8 @@ configure_and_build_glibc() {
 %endif
 		--enable-kernel=%{enablekernel} \
 		--with-bugurl=http://bugs.opensuse.org \
-		--enable-bind-now --enable-obsolete-rpc
+		--enable-bind-now --enable-obsolete-rpc \
+		--disable-timezone-tools
 # Should we enable --enable-systemtap?
 # Should we enable --enable-nss-crypt to build use freebl3 hash functions?
 	# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
@@ -920,10 +872,6 @@ export RPM_BUILD_ROOT
 mkdir -p %{buildroot}/%{_lib}/obsolete
 %endif
 
-# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
-# the generic one (RH#162634)
-cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
-
 # Miscelanna:
 
 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
@@ -997,11 +945,7 @@ rm -f %{buildroot}/%{_lib}/libNoVersion*
 # Don't look at ldd! We don't wish a /bin/sh requires
 chmod 644 %{buildroot}%{_bindir}/ldd
 
-# Remove timezone data, now coming in standalone package:
-for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
-	rm -f %{buildroot}/$i
-done
-rm -rf %{buildroot}%{_datadir}/zoneinfo
+rm -f %{buildroot}/sbin/sln
 
 # Remove the buildflags tracking section and the build-id
 for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshared.a; do
@@ -1043,6 +987,26 @@ rm -rf %{buildroot}/usr/lib/tmpfiles.d
 rm -rf %{buildroot}/run/nscd
 %endif # i686
 
+# LSB
+%ifarch %ix86
+ln -sf /%{_lib}/ld-linux.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb.so.3
+%endif
+%ifarch x86_64
+ln -sf /%{_lib}/ld-linux-x86-64.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-x86-64.so.3
+%endif
+%ifarch ppc
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc32.so.3
+%endif
+%ifarch ppc64
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc64.so.3
+%endif
+%ifarch s390
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390.so.3
+%endif
+%ifarch s390x
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390x.so.3
+%endif
+
 %endif # %{normal_build}
 
 %if %{utils_build}
@@ -1084,7 +1048,7 @@ done
 %post info
 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
-%postun info
+%preun info
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
 %pre -n nscd
@@ -1168,6 +1132,10 @@ exit 0
 /lib/ld-linux-aarch64.so.1
 /%{_lib}/ld-linux-aarch64.so.1
 %endif
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x
+# LSB
+/%{_lib}/*-lsb*.so.3
+%endif
 
 /%{_lib}/libBrokenLocale-%{version}.so
 /%{_lib}/libBrokenLocale.so.1
diff --git a/glibc-utils.changes b/glibc-utils.changes
index 50b0b7f..2d69bea 100644
--- a/glibc-utils.changes
+++ b/glibc-utils.changes
@@ -1,3 +1,85 @@
+-------------------------------------------------------------------
+Mon Apr 11 08:00:07 UTC 2016 - schwab@suse.de
+
+- Add compatibility symlinks for LSB 3.0 (fate#318933)
+
+-------------------------------------------------------------------
+Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
+
+- powerpc-elision-enable-envvar.patch: enable TLE only if
+  GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
+
+-------------------------------------------------------------------
+Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de
+
+- ldd-system-interp.patch: Restore warning about execution permission, it
+  is still needed for noexec mounts (bsc#915985)
+
+-------------------------------------------------------------------
+Tue Mar  8 15:28:16 UTC 2016 - idonmez@suse.com
+
+- Add C.UTF-8 locale (see https://sourceware.org/glibc/wiki/Proposals/C.UTF-8)
+  and rh#902094 . Added with glibc-c-utf8-locale.patch.
+- Add glibc-disable-gettext-for-c-utf8.patch to disable gettext for
+  C.UTF-8 same as C locale.
+
+-------------------------------------------------------------------
+Mon Mar  7 14:47:50 UTC 2016 - schwab@suse.de
+
+- Move %install_info_delete to %preun
+- crypt_blowfish-1.3.tar.gz.sign: Remove, the sign key is no longer
+  acceptable
+
+-------------------------------------------------------------------
+Tue Feb 23 16:11:36 UTC 2016 - schwab@suse.de
+
+- no-long-double.patch: Don't use long double functions if NO_LONG_DOUBLE
+
+-------------------------------------------------------------------
+Mon Feb 22 11:05:12 UTC 2016 - schwab@suse.de
+
+- Update to glibc 2.23 release.
+  * Unicode 8.0.0 Support
+  * sched_setaffinity, pthread_setaffinity_np no longer attempt to guess
+    the kernel-internal CPU set size
+  * The fts.h header can now be used with -D_FILE_OFFSET_BITS=64
+  * getaddrinfo now detects certain invalid responses on an internal
+    netlink socket
+  * A defect in the malloc implementation, present since glibc 2.15 (2012)
+    or glibc 2.10 via --enable-experimental-malloc (2009), could result in
+    the unnecessary serialization of memory allocation requests across
+    threads
+  * The obsolete header <regexp.h> has been removed
+  * The obsolete functions bdflush, create_module, get_kernel_syms,
+    query_module and uselib are no longer available to newly linked
+    binaries
+  * Optimized string, wcsmbs and memory functions for IBM z13.
+  * Newly linked programs that define a variable called signgam will no
+    longer have it set by the lgamma, lgammaf and lgammal functions
+- Removed patches:
+  * dont-remove-nodelete-flag.patch
+  * openat64-readd-o-largefile.patch
+  * mntent-blank-line.patch
+  * opendir-o-directory-check.patch
+  * strcoll-remove-strdiff-opt.patch
+  * ld-pointer-guard.patch
+  * tls-dtor-list-mangling.patch
+  * powerpc-lock-elision-race.patch
+  * prelink-elf-rtype-class.patch
+  * vector-finite-math-aliases.patch
+  * powerpc-elision-adapt-param.patch
+  * catopen-unbound-alloca.patch
+  * strftime-range-check.patch
+  * hcreate-overflow-check.patch
+  * errorcheck-mutex-no-elision.patch
+  * refactor-nan-parsing.patch
+  * send-dg-buffer-overflow.patch
+  * isinf-cxx11-conflict.patch
+  * ibm93x-redundant-shift-si.patch
+  * iconv-reset-input-buffer.patch
+  * tzset-tzname.patch
+  * static-dlopen.patch
+
 -------------------------------------------------------------------
 Thu Feb 18 13:22:19 UTC 2016 - schwab@suse.de
 
@@ -39,12 +121,12 @@ Mon Feb 15 15:43:02 UTC 2016 - schwab@suse.de
 Thu Nov 26 14:46:21 UTC 2015 - schwab@suse.de
 
 - reinitialize-dl_load_write_lock.patch: Reinitialize dl_load_write_lock
-  on fork (BZ #19282)
+  on fork (bsc#958315, BZ #19282)
 
 -------------------------------------------------------------------
 Wed Nov 18 15:09:30 UTC 2015 - schwab@suse.de
 
-- resolv-mem-leak.patch: Fix resource leak in resolver (BZ #19257)
+- resolv-mem-leak.patch: Fix resource leak in resolver (bsc#955647, BZ #19257)
 - tzset-tzname.patch: Force rereading TZDEFRULES after it was used to set
   DST rules only (BZ #19253)
 
@@ -56,8 +138,8 @@ Mon Oct 26 15:22:53 UTC 2015 - schwab@suse.de
 -------------------------------------------------------------------
 Mon Oct 19 12:28:58 UTC 2015 - schwab@suse.de
 
-- ld-pointer-guard.patch: Always enable pointer guard (bsc#950944, BZ
-  #18928)
+- ld-pointer-guard.patch: Always enable pointer guard (CVE-2015-8777,
+  bsc#950944, BZ #18928)
 
 -------------------------------------------------------------------
 Mon Oct 12 08:12:10 UTC 2015 - schwab@suse.de
@@ -115,7 +197,7 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
 - Update to glibc 2.22 release.
   * Cache information can be queried via sysconf() function on s390
   * A buffer overflow in gethostbyname_r and related functions performing DNS
-    requests has been fixed.
+    requests has been fixed.  (CVE-2015-1781)
   * The time zone file parser has been made more robust against crafted time
     zone files
   * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors
@@ -126,6 +208,8 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
     compliance.
   * The header <regexp.h> is deprecated, and will be removed in a future
     release.
+  * bsc#905313 bsc#920338 bsc#927080 bsc#928723 bsc#931480 bsc#939211
+    bsc#940195 bsc#940332
 - Patches from upstream removed
   * htm-tabort.patch
   * o-tmpfile.patch
@@ -189,7 +273,7 @@ Mon Mar 30 09:04:49 UTC 2015 - schwab@suse.de
 - powerpc-software-sqrt.patch: Fix powerpc software sqrt (BZ #17964, BZ
   #17967)
 - nss-separate-state-getXXent.patch: Separate internal state between
-  getXXent and getXXbyYY NSS calls (bsc#918187, BZ #18007)
+  getXXent and getXXbyYY NSS calls (CVE-2014-8121, bsc#918187, BZ #18007)
 - static-tls-dtv-limit.patch: Fix DTV race, assert, DTV_SURPLUS Static TLS
   limit, and nptl_db garbage (bsc#919678, BZ #17090, BZ #17620, BZ #17621,
   BZ #17628)
@@ -230,6 +314,8 @@ Mon Feb  9 09:26:01 UTC 2015 - schwab@suse.de
   * i386 memcpy functions optimized with SSE2 unaligned load/store
   * New locales: tu_IN, bh_IN, raj_IN, ce_RU
   * The obsolete sigvec function has been removed
+  * CVE-2015-1472 CVE-2015-1473 CVE-2104-7817 CVE-2012-3406 CVE-2014-9402
+    CVE-2014-7817 bsc#864081 bsc#906371 bsc#909053 bsc#910599 bsc#916222
 - Patches from upstream removed
   * ifunc-x86-slow-sse4.patch
   * pthread-mutex-trylock-elision.patch
@@ -269,6 +355,7 @@ Mon Sep  8 09:48:26 UTC 2014 - schwab@suse.de
     and the LC_* variables), are more tightly checked for proper syntax
   * On x86-64, the dynamic linker's lazy-binding support is now compatible
     with application code using Intel MPX instructions
+  * CVE-2013-7423 bsc#915526 bsc#934084
 - Patches from upstream removed
   * nss-dns-memleak.patch
   * sin-sign.patch
diff --git a/glibc-utils.spec b/glibc-utils.spec
index 4010918..58435a2 100644
--- a/glibc-utils.spec
+++ b/glibc-utils.spec
@@ -44,6 +44,7 @@ BuildRequires:  systemd-rpm-macros
 BuildRequires:  xz
 %if %{testsuite_build}
 BuildRequires:  gcc-c++
+BuildRequires:  glibc-devel-static
 BuildRequires:  libstdc++-devel
 %endif
 %if %{utils_build}
@@ -101,9 +102,9 @@ BuildRequires:  gd-devel
 # 3.1 is the openSUSE 12.1 kernel
 %define enablekernel 3.0
 
-Version:        2.22
+Version:        2.23
 Release:        0
-%define git_id bbab82c25da9
+%define git_id 10ed3a0ffbb4
 Url:            http://www.gnu.org/software/libc/libc.html
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #Source:         glibc-%{version}-%{git_id}.tar.xz
@@ -122,7 +123,8 @@ Source20:       nscd.conf
 Source21:       nscd.service
 # crypt_blowfish
 Source50:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz
-Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
+# The sign key uses MD5 which is no longer accepted by gpg
+#Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
 
 %if %{normal_build}
 # ngpt was used in 8.1 and SLES8
@@ -207,6 +209,8 @@ Patch15:        glibc-2.3.90-langpackdir.diff
 Patch18:        glibc-cpusetsize.diff
 # PATCH-FEATURE-SLE Use nscd user for nscd
 Patch19:        nscd-server-user.patch
+# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
+Patch21:        powerpc-elision-enable-envvar.patch
 
 ### Locale related patches
 # PATCH-FIX-OPENSUSE Add additional locales
@@ -215,6 +219,10 @@ Patch100:       glibc-2.3.locales.diff.bz2
 Patch102:       glibc-2.4.90-no_NO.diff
 # PATCH-FIX-OPENSUSE -- Renames for China
 Patch103:       glibc-2.4-china.diff
+# PATCH-FIX-OPENSUSE -- Add C.UTF-8 locale
+Patch104:       glibc-c-utf8-locale.patch
+# PATCH-FIX-OPENSUSE -- Disable gettext for C.UTF-8 locale
+Patch105:       glibc-disable-gettext-for-c-utf8.patch
 
 ### Broken patches in glibc that we revert for now:
 
@@ -231,42 +239,10 @@ Patch306:       glibc-fix-double-loopback.diff
 ###
 # Patches from upstream
 ###
-# PATCH-FIX-UPSTREAM Clear DF_1_NODELETE flag only for failed to load library (BZ #18778)
-Patch1000:      dont-remove-nodelete-flag.patch
-# PATCH-FIX-UPSTREAM Readd O_LARGEFILE flag for openat64 (BZ #18781)
-Patch1001:      openat64-readd-o-largefile.patch
-# PATCH-FIX-UPSTREAM getmntent: fix memory corruption w/blank lines (BZ #18887)
-Patch1002:      mntent-blank-line.patch
-# PATCH-FIX-UPSTREAM Fix opendir inverted o_directory_works test (BZ #18921)
-Patch1003:      opendir-o-directory-check.patch
-# PATCH-FIX-UPSTREAM strcoll: Remove incorrect STRDIFF-based optimization (BZ #18589)
-Patch1004:      strcoll-remove-strdiff-opt.patch
-# PATCH-FIX-UPSTREAM Always enable pointer guard (BZ #18928)
-Patch1005:      ld-pointer-guard.patch
-# PATCH-FIX-UPSTREAM Harden tls_dtor_list with pointer mangling (BZ #19018)
-Patch1006:      tls-dtor-list-mangling.patch
-# PATCH-FIX-UPSTREAM PowerPC: Fix a race condition when eliding a lock (BZ #18743)
-Patch1007:      powerpc-lock-elision-race.patch
-# PATCH-FIX-UPSTREAM Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink (BZ #19178)
-Patch1008:      prelink-elf-rtype-class.patch
-# PATCH-FIX-UPSTREAM Better workaround for aliases of *_finite symbols in vector math library (BZ# 19058)
-Patch1009:      vector-finite-math-aliases.patch
-# PATCH-FIX-UPSTREAM powerpc: Fix usage of elision transient failure adapt param (BZ #19174)
-Patch1010:      powerpc-elision-adapt-param.patch
-# PATCH-FIX-UPSTREAM Fix unbound alloca in catopen (CVE-2015-8779, BZ #17905)
-Patch1011:      catopen-unbound-alloca.patch
-# PATCH-FIX-UPSTREAM Add range check on time fields (CVE-2015-8776, BZ #18985)
-Patch1012:      strftime-range-check.patch
-# PATCH-FIX-UPSTREAM Handle overflow in hcreate (CVE-2015-8778, BZ #18240)
-Patch1013:      hcreate-overflow-check.patch
-# PATCH-FIX-UPSTREAM Don't do lock elision on an error checking mutex (BZ #17514)
-Patch1014:      errorcheck-mutex-no-elision.patch
-# PATCH-FIX-UPSTREAM Refactor strtod parsing of NaN payloads (CVE-2014-9761, BZ #16962)
-Patch1015:      refactor-nan-parsing.patch
-# PATCH-FIX-UPSTREAM Fix getaddrinfo stack-based buffer overflow (CVE-2015-7547, BZ #18665)
-Patch1016:      send-dg-buffer-overflow.patch
-# PATCH-FIX-UPSTREAM Fix isinf/isnan declaration conflict with C++11 (BZ #19439)
-Patch1017:      isinf-cxx11-conflict.patch
+# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
+Patch1000:      resolv-mem-leak.patch
+# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
+Patch1001:      no-long-double.patch
 
 ### 
 # Patches awaiting upstream approval
@@ -274,27 +250,19 @@ Patch1017:      isinf-cxx11-conflict.patch
 # PATCH-FIX-UPSTREAM Always to locking when accessing streams (BZ #15142)
 Patch2000:      fix-locking-in-_IO_cleanup.patch
 # PATCH-FIX-UPSTREAM Never try to execute the file in ldd (BZ #16750)
-Patch2002:      ldd-system-interp.patch
+Patch2001:      ldd-system-interp.patch
 # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436)
-Patch2003:      abort-no-flush.patch
+Patch2002:      abort-no-flush.patch
 # PATCH-FIX-UPSTREAM Speedup memset on x86-64 for large block sizes (BZ #16830)
-Patch2005:      glibc-memset-nontemporal.diff
-# PATCH-FIX-UPSTREAM Avoid redundant shift character in iconv output at block boundary (BZ #17197)
-Patch2006:      ibm93x-redundant-shift-si.patch
-# PATCH-FIX-UPSTREAM Static dlopen default library search path fix (BZ #17250)
-Patch2007:      static-dlopen.patch
+Patch2003:      glibc-memset-nontemporal.diff
 # PATCH-FIX-UPSTREAM Fix fnmatch handling of collating elements (BZ #17396, BZ #16976)
-Patch2008:      fnmatch-collating-elements.patch
+Patch2004:      fnmatch-collating-elements.patch
 # PATCH-FIX-UPSTREAM Properly reread entry after failure in nss_files getent function (BZ #18991)
-Patch2009:      nss-files-long-lines-2.patch
+Patch2005:      nss-files-long-lines-2.patch
 # PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
-Patch2010:      iconv-reset-input-buffer.patch
-# PATCH-FIX-UPSTREAM Force rereading TZDEFRULES after it was used to set DST rules only (BZ #19253)
-Patch2011:      tzset-tzname.patch
-# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
-Patch2012:      resolv-mem-leak.patch
+Patch2006:      iconv-reset-input-buffer.patch
 # PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
-Patch2013:      reinitialize-dl_load_write_lock.patch
+Patch2008:      reinitialize-dl_load_write_lock.patch
 
 # Non-glibc patches
 # PATCH-FIX-OPENSUSE Remove debianisms from manpages
@@ -312,7 +280,7 @@ Summary:        Info Files for the GNU C Library
 License:        GFDL-1.1
 Group:          Documentation/Other
 Requires(post): %{install_info_prereq}
-Requires(postun): %{install_info_prereq}
+Requires(preun): %{install_info_prereq}
 BuildArch:      noarch
 
 %description info
@@ -485,10 +453,13 @@ rm nscd/s-stamp
 %patch15 -p1
 %patch18 -p1
 %patch19 -p1
+%patch21 -p1
 
 %patch100 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
+%patch105 -p1
 
 %patch300 -p1
 %patch301 -p1
@@ -497,35 +468,15 @@ rm nscd/s-stamp
 
 %patch1000 -p1
 %patch1001 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1014 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1017 -p1
 
 %patch2000 -p1
+%patch2001 -p1
 %patch2002 -p1
 %patch2003 -p1
+%patch2004 -p1
 %patch2005 -p1
 %patch2006 -p1
-%patch2007 -p1
 %patch2008 -p1
-%patch2009 -p1
-%patch2010 -p1
-%patch2011 -p1
-%patch2012 -p1
-%patch2013 -p1
 
 %patch3000
 
@@ -680,7 +631,8 @@ configure_and_build_glibc() {
 %endif
 		--enable-kernel=%{enablekernel} \
 		--with-bugurl=http://bugs.opensuse.org \
-		--enable-bind-now --enable-obsolete-rpc
+		--enable-bind-now --enable-obsolete-rpc \
+		--disable-timezone-tools
 # Should we enable --enable-systemtap?
 # Should we enable --enable-nss-crypt to build use freebl3 hash functions?
 	# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
@@ -920,10 +872,6 @@ export RPM_BUILD_ROOT
 mkdir -p %{buildroot}/%{_lib}/obsolete
 %endif
 
-# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
-# the generic one (RH#162634)
-cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
-
 # Miscelanna:
 
 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
@@ -997,11 +945,7 @@ rm -f %{buildroot}/%{_lib}/libNoVersion*
 # Don't look at ldd! We don't wish a /bin/sh requires
 chmod 644 %{buildroot}%{_bindir}/ldd
 
-# Remove timezone data, now coming in standalone package:
-for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
-	rm -f %{buildroot}/$i
-done
-rm -rf %{buildroot}%{_datadir}/zoneinfo
+rm -f %{buildroot}/sbin/sln
 
 # Remove the buildflags tracking section and the build-id
 for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshared.a; do
@@ -1043,6 +987,26 @@ rm -rf %{buildroot}/usr/lib/tmpfiles.d
 rm -rf %{buildroot}/run/nscd
 %endif # i686
 
+# LSB
+%ifarch %ix86
+ln -sf /%{_lib}/ld-linux.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb.so.3
+%endif
+%ifarch x86_64
+ln -sf /%{_lib}/ld-linux-x86-64.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-x86-64.so.3
+%endif
+%ifarch ppc
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc32.so.3
+%endif
+%ifarch ppc64
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc64.so.3
+%endif
+%ifarch s390
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390.so.3
+%endif
+%ifarch s390x
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390x.so.3
+%endif
+
 %endif # %{normal_build}
 
 %if %{utils_build}
@@ -1084,7 +1048,7 @@ done
 %post info
 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
-%postun info
+%preun info
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
 %pre -n nscd
@@ -1168,6 +1132,10 @@ exit 0
 /lib/ld-linux-aarch64.so.1
 /%{_lib}/ld-linux-aarch64.so.1
 %endif
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x
+# LSB
+/%{_lib}/*-lsb*.so.3
+%endif
 
 /%{_lib}/libBrokenLocale-%{version}.so
 /%{_lib}/libBrokenLocale.so.1
diff --git a/glibc-version.diff b/glibc-version.diff
index ae13f25..0cc1703 100644
--- a/glibc-version.diff
+++ b/glibc-version.diff
@@ -8,7 +8,7 @@ Index: glibc-2.17.90/csu/version.c
  static const char banner[] =
 -"GNU C Library "PKGVERSION RELEASE" release version "VERSION", by Roland McGrath et al.\n\
 +"GNU C Library "PKGVERSION RELEASE" release version "VERSION" (git "GITID"), by Roland McGrath et al.\n\
- Copyright (C) 2015 Free Software Foundation, Inc.\n\
+ Copyright (C) 2016 Free Software Foundation, Inc.\n\
  This is free software; see the source for copying conditions.\n\
  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
  PARTICULAR PURPOSE.\n\
diff --git a/glibc.changes b/glibc.changes
index 50b0b7f..2d69bea 100644
--- a/glibc.changes
+++ b/glibc.changes
@@ -1,3 +1,85 @@
+-------------------------------------------------------------------
+Mon Apr 11 08:00:07 UTC 2016 - schwab@suse.de
+
+- Add compatibility symlinks for LSB 3.0 (fate#318933)
+
+-------------------------------------------------------------------
+Mon Mar 21 11:57:49 UTC 2016 - schwab@suse.de
+
+- powerpc-elision-enable-envvar.patch: enable TLE only if
+  GLIBC_ELISION_ENABLE=yes is defined (bsc#967594, fate#318236)
+
+-------------------------------------------------------------------
+Tue Mar 15 10:44:46 UTC 2016 - schwab@suse.de
+
+- ldd-system-interp.patch: Restore warning about execution permission, it
+  is still needed for noexec mounts (bsc#915985)
+
+-------------------------------------------------------------------
+Tue Mar  8 15:28:16 UTC 2016 - idonmez@suse.com
+
+- Add C.UTF-8 locale (see https://sourceware.org/glibc/wiki/Proposals/C.UTF-8)
+  and rh#902094 . Added with glibc-c-utf8-locale.patch.
+- Add glibc-disable-gettext-for-c-utf8.patch to disable gettext for
+  C.UTF-8 same as C locale.
+
+-------------------------------------------------------------------
+Mon Mar  7 14:47:50 UTC 2016 - schwab@suse.de
+
+- Move %install_info_delete to %preun
+- crypt_blowfish-1.3.tar.gz.sign: Remove, the sign key is no longer
+  acceptable
+
+-------------------------------------------------------------------
+Tue Feb 23 16:11:36 UTC 2016 - schwab@suse.de
+
+- no-long-double.patch: Don't use long double functions if NO_LONG_DOUBLE
+
+-------------------------------------------------------------------
+Mon Feb 22 11:05:12 UTC 2016 - schwab@suse.de
+
+- Update to glibc 2.23 release.
+  * Unicode 8.0.0 Support
+  * sched_setaffinity, pthread_setaffinity_np no longer attempt to guess
+    the kernel-internal CPU set size
+  * The fts.h header can now be used with -D_FILE_OFFSET_BITS=64
+  * getaddrinfo now detects certain invalid responses on an internal
+    netlink socket
+  * A defect in the malloc implementation, present since glibc 2.15 (2012)
+    or glibc 2.10 via --enable-experimental-malloc (2009), could result in
+    the unnecessary serialization of memory allocation requests across
+    threads
+  * The obsolete header <regexp.h> has been removed
+  * The obsolete functions bdflush, create_module, get_kernel_syms,
+    query_module and uselib are no longer available to newly linked
+    binaries
+  * Optimized string, wcsmbs and memory functions for IBM z13.
+  * Newly linked programs that define a variable called signgam will no
+    longer have it set by the lgamma, lgammaf and lgammal functions
+- Removed patches:
+  * dont-remove-nodelete-flag.patch
+  * openat64-readd-o-largefile.patch
+  * mntent-blank-line.patch
+  * opendir-o-directory-check.patch
+  * strcoll-remove-strdiff-opt.patch
+  * ld-pointer-guard.patch
+  * tls-dtor-list-mangling.patch
+  * powerpc-lock-elision-race.patch
+  * prelink-elf-rtype-class.patch
+  * vector-finite-math-aliases.patch
+  * powerpc-elision-adapt-param.patch
+  * catopen-unbound-alloca.patch
+  * strftime-range-check.patch
+  * hcreate-overflow-check.patch
+  * errorcheck-mutex-no-elision.patch
+  * refactor-nan-parsing.patch
+  * send-dg-buffer-overflow.patch
+  * isinf-cxx11-conflict.patch
+  * ibm93x-redundant-shift-si.patch
+  * iconv-reset-input-buffer.patch
+  * tzset-tzname.patch
+  * static-dlopen.patch
+
 -------------------------------------------------------------------
 Thu Feb 18 13:22:19 UTC 2016 - schwab@suse.de
 
@@ -39,12 +121,12 @@ Mon Feb 15 15:43:02 UTC 2016 - schwab@suse.de
 Thu Nov 26 14:46:21 UTC 2015 - schwab@suse.de
 
 - reinitialize-dl_load_write_lock.patch: Reinitialize dl_load_write_lock
-  on fork (BZ #19282)
+  on fork (bsc#958315, BZ #19282)
 
 -------------------------------------------------------------------
 Wed Nov 18 15:09:30 UTC 2015 - schwab@suse.de
 
-- resolv-mem-leak.patch: Fix resource leak in resolver (BZ #19257)
+- resolv-mem-leak.patch: Fix resource leak in resolver (bsc#955647, BZ #19257)
 - tzset-tzname.patch: Force rereading TZDEFRULES after it was used to set
   DST rules only (BZ #19253)
 
@@ -56,8 +138,8 @@ Mon Oct 26 15:22:53 UTC 2015 - schwab@suse.de
 -------------------------------------------------------------------
 Mon Oct 19 12:28:58 UTC 2015 - schwab@suse.de
 
-- ld-pointer-guard.patch: Always enable pointer guard (bsc#950944, BZ
-  #18928)
+- ld-pointer-guard.patch: Always enable pointer guard (CVE-2015-8777,
+  bsc#950944, BZ #18928)
 
 -------------------------------------------------------------------
 Mon Oct 12 08:12:10 UTC 2015 - schwab@suse.de
@@ -115,7 +197,7 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
 - Update to glibc 2.22 release.
   * Cache information can be queried via sysconf() function on s390
   * A buffer overflow in gethostbyname_r and related functions performing DNS
-    requests has been fixed.
+    requests has been fixed.  (CVE-2015-1781)
   * The time zone file parser has been made more robust against crafted time
     zone files
   * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors
@@ -126,6 +208,8 @@ Wed Aug  5 09:35:41 UTC 2015 - schwab@suse.de
     compliance.
   * The header <regexp.h> is deprecated, and will be removed in a future
     release.
+  * bsc#905313 bsc#920338 bsc#927080 bsc#928723 bsc#931480 bsc#939211
+    bsc#940195 bsc#940332
 - Patches from upstream removed
   * htm-tabort.patch
   * o-tmpfile.patch
@@ -189,7 +273,7 @@ Mon Mar 30 09:04:49 UTC 2015 - schwab@suse.de
 - powerpc-software-sqrt.patch: Fix powerpc software sqrt (BZ #17964, BZ
   #17967)
 - nss-separate-state-getXXent.patch: Separate internal state between
-  getXXent and getXXbyYY NSS calls (bsc#918187, BZ #18007)
+  getXXent and getXXbyYY NSS calls (CVE-2014-8121, bsc#918187, BZ #18007)
 - static-tls-dtv-limit.patch: Fix DTV race, assert, DTV_SURPLUS Static TLS
   limit, and nptl_db garbage (bsc#919678, BZ #17090, BZ #17620, BZ #17621,
   BZ #17628)
@@ -230,6 +314,8 @@ Mon Feb  9 09:26:01 UTC 2015 - schwab@suse.de
   * i386 memcpy functions optimized with SSE2 unaligned load/store
   * New locales: tu_IN, bh_IN, raj_IN, ce_RU
   * The obsolete sigvec function has been removed
+  * CVE-2015-1472 CVE-2015-1473 CVE-2104-7817 CVE-2012-3406 CVE-2014-9402
+    CVE-2014-7817 bsc#864081 bsc#906371 bsc#909053 bsc#910599 bsc#916222
 - Patches from upstream removed
   * ifunc-x86-slow-sse4.patch
   * pthread-mutex-trylock-elision.patch
@@ -269,6 +355,7 @@ Mon Sep  8 09:48:26 UTC 2014 - schwab@suse.de
     and the LC_* variables), are more tightly checked for proper syntax
   * On x86-64, the dynamic linker's lazy-binding support is now compatible
     with application code using Intel MPX instructions
+  * CVE-2013-7423 bsc#915526 bsc#934084
 - Patches from upstream removed
   * nss-dns-memleak.patch
   * sin-sign.patch
diff --git a/glibc.spec b/glibc.spec
index 98433c6..5e019f9 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -45,6 +45,7 @@ BuildRequires:  systemd-rpm-macros
 BuildRequires:  xz
 %if %{testsuite_build}
 BuildRequires:  gcc-c++
+BuildRequires:  glibc-devel-static
 BuildRequires:  libstdc++-devel
 %endif
 %if %{utils_build}
@@ -102,9 +103,9 @@ BuildRequires:  gd-devel
 # 3.1 is the openSUSE 12.1 kernel
 %define enablekernel 3.0
 
-Version:        2.22
+Version:        2.23
 Release:        0
-%define git_id bbab82c25da9
+%define git_id 10ed3a0ffbb4
 Url:            http://www.gnu.org/software/libc/libc.html
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #Source:         glibc-%{version}-%{git_id}.tar.xz
@@ -123,7 +124,8 @@ Source20:       nscd.conf
 Source21:       nscd.service
 # crypt_blowfish
 Source50:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz
-Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
+# The sign key uses MD5 which is no longer accepted by gpg
+#Source51:       http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_version}.tar.gz.sign
 
 %if %{normal_build}
 # ngpt was used in 8.1 and SLES8
@@ -208,6 +210,8 @@ Patch15:        glibc-2.3.90-langpackdir.diff
 Patch18:        glibc-cpusetsize.diff
 # PATCH-FEATURE-SLE Use nscd user for nscd
 Patch19:        nscd-server-user.patch
+# PATCH-FEATURE-SLE powerpc: enable TLE only if GLIBC_ELISION_ENABLE=yes is defined
+Patch21:        powerpc-elision-enable-envvar.patch
 
 ### Locale related patches
 # PATCH-FIX-OPENSUSE Add additional locales
@@ -216,6 +220,10 @@ Patch100:       glibc-2.3.locales.diff.bz2
 Patch102:       glibc-2.4.90-no_NO.diff
 # PATCH-FIX-OPENSUSE -- Renames for China
 Patch103:       glibc-2.4-china.diff
+# PATCH-FIX-OPENSUSE -- Add C.UTF-8 locale
+Patch104:       glibc-c-utf8-locale.patch
+# PATCH-FIX-OPENSUSE -- Disable gettext for C.UTF-8 locale
+Patch105:       glibc-disable-gettext-for-c-utf8.patch
 
 ### Broken patches in glibc that we revert for now:
 
@@ -232,42 +240,10 @@ Patch306:       glibc-fix-double-loopback.diff
 ###
 # Patches from upstream
 ###
-# PATCH-FIX-UPSTREAM Clear DF_1_NODELETE flag only for failed to load library (BZ #18778)
-Patch1000:      dont-remove-nodelete-flag.patch
-# PATCH-FIX-UPSTREAM Readd O_LARGEFILE flag for openat64 (BZ #18781)
-Patch1001:      openat64-readd-o-largefile.patch
-# PATCH-FIX-UPSTREAM getmntent: fix memory corruption w/blank lines (BZ #18887)
-Patch1002:      mntent-blank-line.patch
-# PATCH-FIX-UPSTREAM Fix opendir inverted o_directory_works test (BZ #18921)
-Patch1003:      opendir-o-directory-check.patch
-# PATCH-FIX-UPSTREAM strcoll: Remove incorrect STRDIFF-based optimization (BZ #18589)
-Patch1004:      strcoll-remove-strdiff-opt.patch
-# PATCH-FIX-UPSTREAM Always enable pointer guard (BZ #18928)
-Patch1005:      ld-pointer-guard.patch
-# PATCH-FIX-UPSTREAM Harden tls_dtor_list with pointer mangling (BZ #19018)
-Patch1006:      tls-dtor-list-mangling.patch
-# PATCH-FIX-UPSTREAM PowerPC: Fix a race condition when eliding a lock (BZ #18743)
-Patch1007:      powerpc-lock-elision-race.patch
-# PATCH-FIX-UPSTREAM Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink (BZ #19178)
-Patch1008:      prelink-elf-rtype-class.patch
-# PATCH-FIX-UPSTREAM Better workaround for aliases of *_finite symbols in vector math library (BZ# 19058)
-Patch1009:      vector-finite-math-aliases.patch
-# PATCH-FIX-UPSTREAM powerpc: Fix usage of elision transient failure adapt param (BZ #19174)
-Patch1010:      powerpc-elision-adapt-param.patch
-# PATCH-FIX-UPSTREAM Fix unbound alloca in catopen (CVE-2015-8779, BZ #17905)
-Patch1011:      catopen-unbound-alloca.patch
-# PATCH-FIX-UPSTREAM Add range check on time fields (CVE-2015-8776, BZ #18985)
-Patch1012:      strftime-range-check.patch
-# PATCH-FIX-UPSTREAM Handle overflow in hcreate (CVE-2015-8778, BZ #18240)
-Patch1013:      hcreate-overflow-check.patch
-# PATCH-FIX-UPSTREAM Don't do lock elision on an error checking mutex (BZ #17514)
-Patch1014:      errorcheck-mutex-no-elision.patch
-# PATCH-FIX-UPSTREAM Refactor strtod parsing of NaN payloads (CVE-2014-9761, BZ #16962)
-Patch1015:      refactor-nan-parsing.patch
-# PATCH-FIX-UPSTREAM Fix getaddrinfo stack-based buffer overflow (CVE-2015-7547, BZ #18665)
-Patch1016:      send-dg-buffer-overflow.patch
-# PATCH-FIX-UPSTREAM Fix isinf/isnan declaration conflict with C++11 (BZ #19439)
-Patch1017:      isinf-cxx11-conflict.patch
+# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
+Patch1000:      resolv-mem-leak.patch
+# PATCH-FIX-UPSTREAM Don't use long double functions if NO_LONG_DOUBLE
+Patch1001:      no-long-double.patch
 
 ### 
 # Patches awaiting upstream approval
@@ -275,27 +251,19 @@ Patch1017:      isinf-cxx11-conflict.patch
 # PATCH-FIX-UPSTREAM Always to locking when accessing streams (BZ #15142)
 Patch2000:      fix-locking-in-_IO_cleanup.patch
 # PATCH-FIX-UPSTREAM Never try to execute the file in ldd (BZ #16750)
-Patch2002:      ldd-system-interp.patch
+Patch2001:      ldd-system-interp.patch
 # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436)
-Patch2003:      abort-no-flush.patch
+Patch2002:      abort-no-flush.patch
 # PATCH-FIX-UPSTREAM Speedup memset on x86-64 for large block sizes (BZ #16830)
-Patch2005:      glibc-memset-nontemporal.diff
-# PATCH-FIX-UPSTREAM Avoid redundant shift character in iconv output at block boundary (BZ #17197)
-Patch2006:      ibm93x-redundant-shift-si.patch
-# PATCH-FIX-UPSTREAM Static dlopen default library search path fix (BZ #17250)
-Patch2007:      static-dlopen.patch
+Patch2003:      glibc-memset-nontemporal.diff
 # PATCH-FIX-UPSTREAM Fix fnmatch handling of collating elements (BZ #17396, BZ #16976)
-Patch2008:      fnmatch-collating-elements.patch
+Patch2004:      fnmatch-collating-elements.patch
 # PATCH-FIX-UPSTREAM Properly reread entry after failure in nss_files getent function (BZ #18991)
-Patch2009:      nss-files-long-lines-2.patch
+Patch2005:      nss-files-long-lines-2.patch
 # PATCH-FIX-UPSTREAM Fix iconv buffer handling with IGNORE error handler (BZ #18830)
-Patch2010:      iconv-reset-input-buffer.patch
-# PATCH-FIX-UPSTREAM Force rereading TZDEFRULES after it was used to set DST rules only (BZ #19253)
-Patch2011:      tzset-tzname.patch
-# PATCH-FIX-UPSTREAM Fix resource leak in resolver (BZ #19257)
-Patch2012:      resolv-mem-leak.patch
+Patch2006:      iconv-reset-input-buffer.patch
 # PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
-Patch2013:      reinitialize-dl_load_write_lock.patch
+Patch2008:      reinitialize-dl_load_write_lock.patch
 
 # Non-glibc patches
 # PATCH-FIX-OPENSUSE Remove debianisms from manpages
@@ -312,7 +280,7 @@ Summary:        Info Files for the GNU C Library
 License:        GFDL-1.1
 Group:          Documentation/Other
 Requires(post): %{install_info_prereq}
-Requires(postun): %{install_info_prereq}
+Requires(preun): %{install_info_prereq}
 BuildArch:      noarch
 
 %description info
@@ -485,10 +453,13 @@ rm nscd/s-stamp
 %patch15 -p1
 %patch18 -p1
 %patch19 -p1
+%patch21 -p1
 
 %patch100 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
+%patch105 -p1
 
 %patch300 -p1
 %patch301 -p1
@@ -497,35 +468,15 @@ rm nscd/s-stamp
 
 %patch1000 -p1
 %patch1001 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1014 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1017 -p1
 
 %patch2000 -p1
+%patch2001 -p1
 %patch2002 -p1
 %patch2003 -p1
+%patch2004 -p1
 %patch2005 -p1
 %patch2006 -p1
-%patch2007 -p1
 %patch2008 -p1
-%patch2009 -p1
-%patch2010 -p1
-%patch2011 -p1
-%patch2012 -p1
-%patch2013 -p1
 
 %patch3000
 
@@ -680,7 +631,8 @@ configure_and_build_glibc() {
 %endif
 		--enable-kernel=%{enablekernel} \
 		--with-bugurl=http://bugs.opensuse.org \
-		--enable-bind-now --enable-obsolete-rpc
+		--enable-bind-now --enable-obsolete-rpc \
+		--disable-timezone-tools
 # Should we enable --enable-systemtap?
 # Should we enable --enable-nss-crypt to build use freebl3 hash functions?
 	# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
@@ -920,10 +872,6 @@ export RPM_BUILD_ROOT
 mkdir -p %{buildroot}/%{_lib}/obsolete
 %endif
 
-# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
-# the generic one (RH#162634)
-cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
-
 # Miscelanna:
 
 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
@@ -997,11 +945,7 @@ rm -f %{buildroot}/%{_lib}/libNoVersion*
 # Don't look at ldd! We don't wish a /bin/sh requires
 chmod 644 %{buildroot}%{_bindir}/ldd
 
-# Remove timezone data, now coming in standalone package:
-for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
-	rm -f %{buildroot}/$i
-done
-rm -rf %{buildroot}%{_datadir}/zoneinfo
+rm -f %{buildroot}/sbin/sln
 
 # Remove the buildflags tracking section and the build-id
 for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshared.a; do
@@ -1043,6 +987,26 @@ rm -rf %{buildroot}/usr/lib/tmpfiles.d
 rm -rf %{buildroot}/run/nscd
 %endif # i686
 
+# LSB
+%ifarch %ix86
+ln -sf /%{_lib}/ld-linux.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb.so.3
+%endif
+%ifarch x86_64
+ln -sf /%{_lib}/ld-linux-x86-64.so.2 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-x86-64.so.3
+%endif
+%ifarch ppc
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc32.so.3
+%endif
+%ifarch ppc64
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-ppc64.so.3
+%endif
+%ifarch s390
+ln -sf /%{_lib}/ld.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390.so.3
+%endif
+%ifarch s390x
+ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/%{_lib}/ld-lsb-s390x.so.3
+%endif
+
 %endif # %{normal_build}
 
 %if %{utils_build}
@@ -1084,7 +1048,7 @@ done
 %post info
 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
-%postun info
+%preun info
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
 
 %pre -n nscd
@@ -1168,6 +1132,10 @@ exit 0
 /lib/ld-linux-aarch64.so.1
 /%{_lib}/ld-linux-aarch64.so.1
 %endif
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x
+# LSB
+/%{_lib}/*-lsb*.so.3
+%endif
 
 /%{_lib}/libBrokenLocale-%{version}.so
 /%{_lib}/libBrokenLocale.so.1
diff --git a/hcreate-overflow-check.patch b/hcreate-overflow-check.patch
deleted file mode 100644
index 7890dc6..0000000
--- a/hcreate-overflow-check.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-2016-02-12  Florian Weimer  <fweimer@redhat.com>
-
-	* misc/bug18240.c (do_test): Set RLIMIT_AS.
-
-2016-01-27  Paul Eggert  <eggert@cs.ucla.edu>
-
-	[BZ #18240]
-	* misc/hsearch_r.c (isprime, __hcreate_r): Protect against
-	unsigned int wraparound.
-
-2016-01-27  Florian Weimer  <fweimer@redhat.com>
-
-	[BZ #18240]
-	* misc/bug18240.c: New test.
-	* misc/Makefile (tests): Add it.
-
-2015-08-25  Ondřej Bílka  <neleai@seznam.cz>
-
-	[BZ #18240]
-	* misc/hsearch_r.c (__hcreate_r): Handle overflow.
-
-Index: glibc-2.22/misc/Makefile
-===================================================================
---- glibc-2.22.orig/misc/Makefile
-+++ glibc-2.22/misc/Makefile
-@@ -77,7 +77,7 @@ gpl2lgpl := error.c error.h
- 
- tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
- 	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
--	 tst-mntent-blank-corrupt tst-mntent-blank-passno
-+	 tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240
- ifeq ($(run-built-tests),yes)
- tests-special += $(objpfx)tst-error1-mem.out
- endif
-Index: glibc-2.22/misc/bug18240.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/misc/bug18240.c
-@@ -0,0 +1,97 @@
-+/* Test integer wraparound in hcreate.
-+   Copyright (C) 2016 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 <errno.h>
-+#include <limits.h>
-+#include <search.h>
-+#include <stdbool.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <sys/resource.h>
-+
-+static void
-+test_size (size_t size)
-+{
-+  int res = hcreate (size);
-+  if (res == 0)
-+    {
-+      if (errno == ENOMEM)
-+        return;
-+      printf ("error: hcreate (%zu): %m\n", size);
-+      exit (1);
-+    }
-+  char *keys[100];
-+  for (int i = 0; i < 100; ++i)
-+    {
-+      if (asprintf (keys + i, "%d", i) < 0)
-+        {
-+          printf ("error: asprintf: %m\n");
-+          exit (1);
-+        }
-+      ENTRY e = { keys[i], (char *) "value" };
-+      if (hsearch (e, ENTER) == NULL)
-+        {
-+          printf ("error: hsearch (\"%s\"): %m\n", keys[i]);
-+          exit (1);
-+        }
-+    }
-+  hdestroy ();
-+
-+  for (int i = 0; i < 100; ++i)
-+    free (keys[i]);
-+}
-+
-+static int
-+do_test (void)
-+{
-+  /* Limit the size of the process, so that memory allocation will
-+     fail without impacting the entire system.  */
-+  {
-+    struct rlimit limit;
-+    if (getrlimit (RLIMIT_AS, &limit) != 0)
-+      {
-+        printf ("getrlimit (RLIMIT_AS) failed: %m\n");
-+        return 1;
-+      }
-+    long target = 100 * 1024 * 1024;
-+    if (limit.rlim_cur == RLIM_INFINITY || limit.rlim_cur > target)
-+      {
-+        limit.rlim_cur = target;
-+        if (setrlimit (RLIMIT_AS, &limit) != 0)
-+          {
-+            printf ("setrlimit (RLIMIT_AS) failed: %m\n");
-+            return 1;
-+          }
-+      }
-+  }
-+
-+  test_size (500);
-+  test_size (-1);
-+  test_size (-3);
-+  test_size (INT_MAX - 2);
-+  test_size (INT_MAX - 1);
-+  test_size (INT_MAX);
-+  test_size (((unsigned) INT_MAX) + 1);
-+  test_size (UINT_MAX - 2);
-+  test_size (UINT_MAX - 1);
-+  test_size (UINT_MAX);
-+  return 0;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: glibc-2.22/misc/hsearch_r.c
-===================================================================
---- glibc-2.22.orig/misc/hsearch_r.c
-+++ glibc-2.22/misc/hsearch_r.c
-@@ -19,7 +19,7 @@
- #include <errno.h>
- #include <malloc.h>
- #include <string.h>
--
-+#include <stdint.h>
- #include <search.h>
- 
- /* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
-@@ -46,15 +46,12 @@ static int
- isprime (unsigned int number)
- {
-   /* no even number will be passed */
--  unsigned int div = 3;
--
--  while (div * div < number && number % div != 0)
--    div += 2;
--
--  return number % div != 0;
-+  for (unsigned int div = 3; div <= number / div; div += 2)
-+    if (number % div == 0)
-+      return 0;
-+  return 1;
- }
- 
--
- /* Before using the hash table we must allocate memory for it.
-    Test for an existing table are done. We allocate one element
-    more as the found prime number says. This is done for more effective
-@@ -81,10 +78,19 @@ __hcreate_r (nel, htab)
-      use will not work.  */
-   if (nel < 3)
-     nel = 3;
--  /* Change nel to the first prime number not smaller as nel. */
--  nel |= 1;      /* make odd */
--  while (!isprime (nel))
--    nel += 2;
-+
-+  /* Change nel to the first prime number in the range [nel, UINT_MAX - 2],
-+     The '- 2' means 'nel += 2' cannot overflow.  */
-+  for (nel |= 1; ; nel += 2)
-+    {
-+      if (UINT_MAX - 2 < nel)
-+	{
-+	  __set_errno (ENOMEM);
-+	  return 0;
-+	}
-+      if (isprime (nel))
-+	break;
-+    }
- 
-   htab->size = nel;
-   htab->filled = 0;
diff --git a/ibm93x-redundant-shift-si.patch b/ibm93x-redundant-shift-si.patch
deleted file mode 100644
index 420b7c0..0000000
--- a/ibm93x-redundant-shift-si.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-Avoid redundant shift character in iconv output at block boundary (bug #17197)
-
-	[BZ #17197]
-	* iconvdata/ibm930.c (BODY for TO_LOOP): Record current DBCS state
-	immediately after emitting SI.
-	* iconvdata/ibm933.c (BODY for TO_LOOP): Likewise.
-	* iconvdata/ibm935.c (BODY for TO_LOOP): Likewise.
-	* iconvdata/ibm937.c (BODY for TO_LOOP): Likewise.
-	* iconvdata/ibm939.c (BODY for TO_LOOP): Likewise.
-	* iconvdata/bug-iconv10.c: New file.
-	* iconvdata/Makefile (tests): Add bug-iconv10.
-	($(objpfx)bug-iconv10.out): New rule.
-
-Index: glibc-2.19/iconvdata/Makefile
-===================================================================
---- glibc-2.19.orig/iconvdata/Makefile
-+++ glibc-2.19/iconvdata/Makefile
-@@ -67,7 +67,8 @@ include ../Makeconfig
- 
- ifeq (yes,$(build-shared))
- tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
--	tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9
-+	tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \
-+	bug-iconv10
- ifeq ($(have-thread-library),yes)
- tests += bug-iconv3
- endif
-@@ -295,6 +296,8 @@ $(objpfx)tst-iconv4.out: $(objpfx)gconv-
- 			 $(addprefix $(objpfx),$(modules.so))
- $(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \
- 			 $(addprefix $(objpfx),$(modules.so))
-+$(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \
-+			  $(addprefix $(objpfx),$(modules.so))
- 
- $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
- 			 $(addprefix $(objpfx),$(modules.so)) \
-Index: glibc-2.19/iconvdata/bug-iconv10.c
-===================================================================
---- /dev/null
-+++ glibc-2.19/iconvdata/bug-iconv10.c
-@@ -0,0 +1,60 @@
-+/* bug 17197: check for redundant shift character at block boundary.  */
-+#include <iconv.h>
-+#include <locale.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+
-+static int
-+do_test (void)
-+{
-+  iconv_t cd = iconv_open ("IBM930", "UTF-8");
-+  if (cd == (iconv_t) -1)
-+    {
-+      puts ("iconv_open failed");
-+      return 1;
-+    }
-+
-+  char instr1[] = "\xc2\xa6.";
-+  const char expstr1[4] = "\016Bj\017";
-+  const char expstr2[] = "K";
-+  char outstr[4];
-+  size_t inlen = sizeof (instr1);
-+  size_t outlen = sizeof (outstr);
-+  char *inptr = instr1;
-+  char *outptr = outstr;
-+  size_t r = iconv (cd, &inptr, &inlen, &outptr, &outlen);
-+  if (r != -1
-+      || errno != E2BIG
-+      || inlen != sizeof (instr1) - 2
-+      || inptr != instr1 + 2
-+      || outlen != 0
-+      || memcmp (outstr, expstr1, sizeof (expstr1)) != 0)
-+    {
-+      puts ("wrong first conversion");
-+      return 1;
-+    }
-+
-+  outlen = sizeof (outstr);
-+  outptr = outstr;
-+  r = iconv (cd, &inptr, &inlen, &outptr, &outlen);
-+  if (r != 0
-+      || inlen != 0
-+      || outlen != sizeof (outstr) - sizeof (expstr2)
-+      || memcmp (outstr, expstr2, sizeof (expstr2)) != 0)
-+    {
-+      puts ("wrong second conversion");
-+      return 1;
-+    }
-+
-+  if (iconv_close (cd) != 0)
-+    {
-+      puts ("iconv_close failed");
-+      return 1;
-+    }
-+  return 0;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: glibc-2.19/iconvdata/ibm930.c
-===================================================================
---- glibc-2.19.orig/iconvdata/ibm930.c
-+++ glibc-2.19/iconvdata/ibm930.c
-@@ -255,6 +255,7 @@ enum
- 		break;							      \
- 	      }								      \
- 	    *outptr++ = SI;						      \
-+	    curcs = sb;							      \
- 	  }								      \
- 									      \
- 	if (__glibc_unlikely (outptr + 1 > outend))			      \
-@@ -268,7 +269,6 @@ enum
- 	  *outptr++ = 0x5b;						      \
- 	else								      \
- 	  *outptr++ = cp[0];						      \
--	curcs = sb;							      \
-       }									      \
- 									      \
-     /* Now that we wrote the output increment the input pointer.  */	      \
-Index: glibc-2.19/iconvdata/ibm933.c
-===================================================================
---- glibc-2.19.orig/iconvdata/ibm933.c
-+++ glibc-2.19/iconvdata/ibm933.c
-@@ -254,6 +254,7 @@ enum
- 		break;							      \
- 	      }								      \
- 	    *outptr++ = SI;						      \
-+	    curcs = sb;							      \
- 	  }								      \
- 									      \
- 	if (__glibc_unlikely (outptr + 1 > outend))			      \
-@@ -262,7 +263,6 @@ enum
- 	    break;							      \
- 	  }								      \
- 	*outptr++ = cp[0];						      \
--	curcs = sb;							      \
-       }									      \
- 									      \
-     /* Now that we wrote the output increment the input pointer.  */	      \
-Index: glibc-2.19/iconvdata/ibm935.c
-===================================================================
---- glibc-2.19.orig/iconvdata/ibm935.c
-+++ glibc-2.19/iconvdata/ibm935.c
-@@ -254,6 +254,7 @@ enum
- 		break;							      \
- 	      }								      \
- 	    *outptr++ = SI;						      \
-+	    curcs = sb;							      \
- 	  }								      \
- 									      \
- 	if (__glibc_unlikely (outptr + 1 > outend))			      \
-@@ -262,7 +263,6 @@ enum
- 	    break;							      \
- 	  }								      \
- 	*outptr++ = cp[0];						      \
--	curcs = sb;							      \
-       }									      \
- 									      \
-     /* Now that we wrote the output increment the input pointer.  */	      \
-Index: glibc-2.19/iconvdata/ibm937.c
-===================================================================
---- glibc-2.19.orig/iconvdata/ibm937.c
-+++ glibc-2.19/iconvdata/ibm937.c
-@@ -254,6 +254,7 @@ enum
- 		break;							      \
- 	      }								      \
- 	    *outptr++ = SI;						      \
-+	    curcs = sb;							      \
- 	  }								      \
- 									      \
- 	if (__glibc_unlikely (outptr + 1 > outend))			      \
-@@ -262,7 +263,6 @@ enum
- 	    break;							      \
- 	  }								      \
- 	*outptr++ = cp[0];						      \
--	curcs = sb;							      \
-       }									      \
- 									      \
-     /* Now that we wrote the output increment the input pointer.  */	      \
-Index: glibc-2.19/iconvdata/ibm939.c
-===================================================================
---- glibc-2.19.orig/iconvdata/ibm939.c
-+++ glibc-2.19/iconvdata/ibm939.c
-@@ -254,6 +254,7 @@ enum
- 		break;							      \
- 	      }								      \
- 	    *outptr++ = SI;						      \
-+	    curcs = sb;							      \
- 	  }								      \
- 									      \
- 	if (__glibc_unlikely (outptr + 1 > outend))			      \
-@@ -267,7 +268,6 @@ enum
- 	  *outptr++ = 0xb2;						      \
- 	else								      \
- 	  *outptr++ = cp[0];						      \
--	curcs = sb;							      \
-       }									      \
- 									      \
-     /* Now that we wrote the output increment the input pointer.  */	      \
diff --git a/iconv-reset-input-buffer.patch b/iconv-reset-input-buffer.patch
index 86d6811..a0f8321 100644
--- a/iconv-reset-input-buffer.patch
+++ b/iconv-reset-input-buffer.patch
@@ -179,7 +179,7 @@ Index: glibc-2.22/iconv/skeleton.c
 +#endif
  		      /* We have a problem in one of the functions below.
  			 Undo the conversion upto the error point.  */
- 		      size_t nstatus;
+ 		      size_t nstatus __attribute__ ((unused));
 @@ -682,9 +694,9 @@ FUNCTION_NAME (struct __gconv_step *step
  		      outbuf = outstart;
  
diff --git a/isinf-cxx11-conflict.patch b/isinf-cxx11-conflict.patch
deleted file mode 100644
index dec2fd8..0000000
--- a/isinf-cxx11-conflict.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-2016-02-14  Jakub Jelinek  <jakub@redhat.com>
-	    Jonathan Wakely  <jwakely@redhat.com>
-	    Carlos O'Donell  <carlos@redhat.com>
-
-	[BZ 19439]
-	* math/Makefile (tests): Add test-math-isinff.
-	(CFLAGS-test-math-isinff.cc): Use -std=gnu++11.
-	* math/bits/mathcalls.h [__USE_MISC]: Use
-	'|| __MATH_DECLARING_DOUBLE == 0' to relax definition of
-	functions not in C++11 and which don't conflict e.g. isinff,
-	isinfl etc.
-	* math/test-math-isinff.cc: New file.
-
-2016-01-11  Jonathan Wakely  <jwakely.gcc@gmail.com>
-	    Adhemerval Zanella  <adhemerval.zanella@linaro.org>
-
-	[BZ #19439]
-	* math/bits/mathcalls.h
-	[!__cplusplus || __cplusplus < 201103L] (isinf): Do not declare
-	prototype.
-	[!__cplusplus || __cplusplus < 201103L] (isnan): Likewise.
-
-Index: glibc-2.22/math/Makefile
-===================================================================
---- glibc-2.22.orig/math/Makefile
-+++ glibc-2.22/math/Makefile
-@@ -108,6 +108,7 @@ tests = test-matherr test-fenv atest-exp
- 	test-tgmath-ret bug-nextafter bug-nexttoward bug-tgmath1 \
- 	test-tgmath-int test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan \
- 	test-fenv-tls test-fenv-preserve test-fenv-return test-fenvinline \
-+	test-math-isinff \
- 	$(tests-static)
- tests-static = test-fpucw-static test-fpucw-ieee-static
- # We do the `long double' tests only if this data type is available and
-@@ -184,6 +185,8 @@ CPPFLAGS-test-ildoubl.c = -U__LIBC_INTER
- 			  $(libm-test-fast-math-cflags)
- 
- 
-+CFLAGS-test-math-isinff.cc = -std=gnu++11
-+
- # The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
- # for error handling in the -lm functions.
- install-lib += libieee.a
-Index: glibc-2.22/math/bits/mathcalls.h
-===================================================================
---- glibc-2.22.orig/math/bits/mathcalls.h
-+++ glibc-2.22/math/bits/mathcalls.h
-@@ -196,9 +196,13 @@ __MATHDECL_1 (int,__finite,, (_Mdouble_
- _Mdouble_END_NAMESPACE
- 
- #ifdef __USE_MISC
-+# if (!defined __cplusplus \
-+      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
-+      || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't.  */
- /* Return 0 if VALUE is finite or NaN, +1 if it
-    is +Infinity, -1 if it is -Infinity.  */
- __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
-+# endif
- 
- /* Return nonzero if VALUE is finite and not NaN.  */
- __MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
-@@ -230,8 +234,12 @@ __END_NAMESPACE_C99
- __MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
- 
- #if defined __USE_MISC || defined __USE_XOPEN
-+# if (!defined __cplusplus \
-+      || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
-+      || __MATH_DECLARING_DOUBLE == 0) /* isnanf or isnanl don't.  */
- /* Return nonzero if VALUE is not a number.  */
- __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
-+# endif
- 
- /* Bessel functions.  */
- __MATHCALL (j0,, (_Mdouble_));
-Index: glibc-2.22/math/test-math-isinff.cc
-===================================================================
---- /dev/null
-+++ glibc-2.22/math/test-math-isinff.cc
-@@ -0,0 +1,48 @@
-+/* Test for bug 19439.
-+   Copyright (C) 2016 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Contributed by Marek Polacek <polacek@redhat.com>, 2012.
-+
-+   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 _GNU_SOURCE 1
-+#include <math.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+static int
-+do_test (void)
-+{
-+  /* Verify that isinff, isinfl, isnanf, and isnanlf are defined
-+     in the header under C++11 and can be called.  Without the
-+     header fix this test will not compile.  */
-+  if (isinff (1.0f)
-+      || !isinff (INFINITY)
-+      || isinfl (1.0L)
-+      || !isinfl (INFINITY)
-+      || isnanf (2.0f)
-+      || !isnanf (NAN)
-+      || isnanl (2.0L)
-+      || !isnanl (NAN))
-+    {
-+      printf ("FAIL: Failed to call is* functions.\n");
-+      exit (1);
-+    }
-+  printf ("PASS: Able to call isinff, isinfl, isnanf, and isnanl.\n");
-+  exit (0);
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
diff --git a/ld-pointer-guard.patch b/ld-pointer-guard.patch
deleted file mode 100644
index 433164b..0000000
--- a/ld-pointer-guard.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-2015-10-15  Florian Weimer  <fweimer@redhat.com>
-
-	[BZ #18928]
-	* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
-	_dl_pointer_guard member.
-	* elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
-	initializer.
-	(security_init): Always set up pointer guard.
-	(process_envvars): Do not process LD_POINTER_GUARD.
-
-Index: glibc-2.22/elf/rtld.c
-===================================================================
---- glibc-2.22.orig/elf/rtld.c
-+++ glibc-2.22/elf/rtld.c
-@@ -162,7 +162,6 @@ struct rtld_global_ro _rtld_global_ro at
-     ._dl_hwcap_mask = HWCAP_IMPORTANT,
-     ._dl_lazy = 1,
-     ._dl_fpu_control = _FPU_DEFAULT,
--    ._dl_pointer_guard = 1,
-     ._dl_pagesize = EXEC_PAGESIZE,
-     ._dl_inhibit_cache = 0,
- 
-@@ -709,15 +708,12 @@ security_init (void)
- #endif
- 
-   /* Set up the pointer guard as well, if necessary.  */
--  if (GLRO(dl_pointer_guard))
--    {
--      uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
--							     stack_chk_guard);
-+  uintptr_t pointer_chk_guard
-+    = _dl_setup_pointer_guard (_dl_random, stack_chk_guard);
- #ifdef THREAD_SET_POINTER_GUARD
--      THREAD_SET_POINTER_GUARD (pointer_chk_guard);
-+  THREAD_SET_POINTER_GUARD (pointer_chk_guard);
- #endif
--      __pointer_chk_guard_local = pointer_chk_guard;
--    }
-+  __pointer_chk_guard_local = pointer_chk_guard;
- 
-   /* We do not need the _dl_random value anymore.  The less
-      information we leave behind, the better, so clear the
-@@ -2517,9 +2513,6 @@ process_envvars (enum mode *modep)
- 	      GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
- 	      break;
- 	    }
--
--	  if (memcmp (envline, "POINTER_GUARD", 13) == 0)
--	    GLRO(dl_pointer_guard) = envline[14] != '0';
- 	  break;
- 
- 	case 14:
-Index: glibc-2.22/sysdeps/generic/ldsodefs.h
-===================================================================
---- glibc-2.22.orig/sysdeps/generic/ldsodefs.h
-+++ glibc-2.22/sysdeps/generic/ldsodefs.h
-@@ -592,9 +592,6 @@ struct rtld_global_ro
-   /* List of auditing interfaces.  */
-   struct audit_ifaces *_dl_audit;
-   unsigned int _dl_naudit;
--
--  /* 0 if internal pointer values should not be guarded, 1 if they should.  */
--  EXTERN int _dl_pointer_guard;
- };
- # define __rtld_global_attribute__
- # if IS_IN (rtld)
diff --git a/ldd-system-interp.patch b/ldd-system-interp.patch
index 518aa2c..55d84ce 100644
--- a/ldd-system-interp.patch
+++ b/ldd-system-interp.patch
@@ -5,23 +5,13 @@ they are invoked with __libc_enable_secure, and run them through the known
 good dynamic linker.
 
 	* elf/ldd.bash.in: Always run through the dynamic linker, even if
-	the file has its own interpreter.  Remove unneeded executable
-	check.
+	the file has its own interpreter.
 
 Index: glibc-2.19/elf/ldd.bash.in
 ===================================================================
 --- glibc-2.19.orig/elf/ldd.bash.in
 +++ glibc-2.19/elf/ldd.bash.in
-@@ -150,8 +150,6 @@ for file do
-     echo "ldd: ${file}:" $"not regular file" >&2
-     result=1
-   elif test -r "$file"; then
--    test -x "$file" || echo 'ldd:' $"\
--warning: you do not have execution permission for" "\`$file'" >&2
-     RTLD=
-     ret=1
-     for rtld in ${RTLDLIST}; do
-@@ -164,18 +162,6 @@ warning: you do not have execution permi
+@@ -164,18 +164,6 @@ warning: you do not have execution permi
        fi
      done
      case $ret in
@@ -40,7 +30,7 @@ Index: glibc-2.19/elf/ldd.bash.in
      1)
        # This can be a non-ELF binary or no binary at all.
        nonelf "$file" || {
-@@ -183,7 +169,7 @@ warning: you do not have execution permi
+@@ -183,7 +171,7 @@ warning: you do not have execution permi
  	result=1
        }
        ;;
diff --git a/mntent-blank-line.patch b/mntent-blank-line.patch
deleted file mode 100644
index 8605bcf..0000000
--- a/mntent-blank-line.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-2015-08-28  Mike Frysinger  <vapier@gentoo.org>
-
-	[BZ #18887]
-	* misc/Makefile (tests): Add tst-mntent-blank-corrupt and
-	tst-mntent-blank-passno.
-	* misc/mntent_r.c (__getmntent_r): Do not read past buffer[0].
-	* misc/tst-mntent-blank-corrupt.c: New test.
-	* misc/tst-mntent-blank-passno.c: New test ripped from ...
-	* misc/tst-mntent.c (do_test): ... here.
-
-diff --git a/misc/Makefile b/misc/Makefile
-index aecb0da..2f5edf6 100644
---- a/misc/Makefile
-+++ b/misc/Makefile
-@@ -76,7 +76,8 @@ install-lib := libg.a
- gpl2lgpl := error.c error.h
- 
- tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
--	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
-+	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
-+	 tst-mntent-blank-corrupt tst-mntent-blank-passno
- ifeq ($(run-built-tests),yes)
- tests-special += $(objpfx)tst-error1-mem.out
- endif
-diff --git a/misc/mntent_r.c b/misc/mntent_r.c
-index 6159873..4f26998 100644
---- a/misc/mntent_r.c
-+++ b/misc/mntent_r.c
-@@ -136,7 +136,9 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
-       end_ptr = strchr (buffer, '\n');
-       if (end_ptr != NULL)	/* chop newline */
- 	{
--	  while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t')
-+	  /* Do not walk past the start of buffer if it's all whitespace.  */
-+	  while (end_ptr != buffer
-+		 && (end_ptr[-1] == ' ' || end_ptr[-1] == '\t'))
-             end_ptr--;
- 	  *end_ptr = '\0';
- 	}
-diff --git a/misc/tst-mntent-blank-corrupt.c b/misc/tst-mntent-blank-corrupt.c
-new file mode 100644
-index 0000000..92266a3
---- /dev/null
-+++ b/misc/tst-mntent-blank-corrupt.c
-@@ -0,0 +1,45 @@
-+/* Make sure blank lines does not cause memory corruption BZ #18887.
-+
-+   Copyright (C) 2009-2015 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 <mntent.h>
-+#include <stdio.h>
-+#include <string.h>
-+
-+/* Make sure blank lines don't trigger memory corruption.  This doesn't happen
-+   for all targets though, so it's a best effort test BZ #18887.  */
-+static int
-+do_test (void)
-+{
-+  FILE *fp;
-+
-+  fp = tmpfile ();
-+  fputs ("\n \n/foo\\040dir /bar\\040dir auto bind \t \n", fp);
-+  rewind (fp);
-+
-+  /* The corruption happens here ...  */
-+  getmntent (fp);
-+  /* ... but trigers here.  */
-+  endmntent (fp);
-+
-+  /* If the test failed, we would crash, and not hit this point.  */
-+  return 0;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-diff --git a/misc/tst-mntent-blank-passno.c b/misc/tst-mntent-blank-passno.c
-new file mode 100644
-index 0000000..fc04291
---- /dev/null
-+++ b/misc/tst-mntent-blank-passno.c
-@@ -0,0 +1,53 @@
-+/* Make sure trailing whitespace is handled properly BZ #17273.
-+
-+   Copyright (C) 2009-2015 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 <mntent.h>
-+#include <stdio.h>
-+#include <string.h>
-+
-+/* Check entries to make sure trailing whitespace is ignored and we return the
-+   correct passno value BZ #17273.  */
-+static int
-+do_test (void)
-+{
-+  int result = 0;
-+  FILE *fp;
-+  struct mntent *mnt;
-+
-+  fp = tmpfile ();
-+  fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp);
-+  rewind (fp);
-+
-+  mnt = getmntent (fp);
-+  if (strcmp (mnt->mnt_fsname, "/foo dir") != 0
-+      || strcmp (mnt->mnt_dir, "/bar dir") != 0
-+      || strcmp (mnt->mnt_type, "auto") != 0
-+      || strcmp (mnt->mnt_opts, "bind") != 0
-+      || mnt->mnt_freq != 0
-+      || mnt->mnt_passno != 0)
-+    {
-+      puts ("Error while reading entry with trailing whitespaces");
-+      result = 1;
-+    }
-+
-+  return result;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c
-index 932fd3f..b6ad8af 100644
---- a/misc/tst-mntent.c
-+++ b/misc/tst-mntent.c
-@@ -73,26 +73,6 @@ do_test (void)
- 	  puts ("Error while reading written entry back in");
- 	  result = 1;
- 	}
--
--      /* Part III: Entry with whitespaces at the end of a line. */
--      rewind (fp);
--
--      fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp);
--
--      rewind (fp);
--
--      mnt = getmntent (fp);
--
--      if (strcmp (mnt->mnt_fsname, "/foo dir") != 0
--	  || strcmp (mnt->mnt_dir, "/bar dir") != 0
--	  || strcmp (mnt->mnt_type, "auto") != 0
--	  || strcmp (mnt->mnt_opts, "bind") != 0
--	  || mnt->mnt_freq != 0
--	  || mnt->mnt_passno != 0)
--	{
--	  puts ("Error while reading entry with trailing whitespaces");
--	  result = 1;
--	}
-    }
- 
-   return result;
--- 
-2.5.1
-
diff --git a/no-long-double.patch b/no-long-double.patch
new file mode 100644
index 0000000..cedd20d
--- /dev/null
+++ b/no-long-double.patch
@@ -0,0 +1,23 @@
+Index: glibc-2.22/math/test-math-isinff.cc
+===================================================================
+--- glibc-2.22.orig/math/test-math-isinff.cc
++++ glibc-2.22/math/test-math-isinff.cc
+@@ -30,12 +30,17 @@ do_test (void)
+      header fix this test will not compile.  */
+   if (isinff (1.0f)
+       || !isinff (INFINITY)
++#ifndef NO_LONG_DOUBLE
+       || isinfl (1.0L)
+       || !isinfl (INFINITY)
++#endif
+       || isnanf (2.0f)
+       || !isnanf (NAN)
++#ifndef NO_LONG_DOUBLE
+       || isnanl (2.0L)
+-      || !isnanl (NAN))
++      || !isnanl (NAN)
++#endif
++      )
+     {
+       printf ("FAIL: Failed to call is* functions.\n");
+       exit (1);
diff --git a/openat64-readd-o-largefile.patch b/openat64-readd-o-largefile.patch
deleted file mode 100644
index 5a5447a..0000000
--- a/openat64-readd-o-largefile.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: glibc-2.22/sysdeps/unix/sysv/linux/openat.c
-===================================================================
---- glibc-2.22.orig/sysdeps/unix/sysv/linux/openat.c
-+++ glibc-2.22/sysdeps/unix/sysv/linux/openat.c
-@@ -68,6 +68,11 @@ __OPENAT (int fd, const char *file, int
-       va_end (arg);
-     }
- 
-+  /* We have to add the O_LARGEFILE flag for openat64.  */
-+#ifdef MORE_OFLAGS
-+  oflag |= MORE_OFLAGS;
-+#endif
-+
-   return SYSCALL_CANCEL (openat, fd, file, oflag, mode);
- }
- libc_hidden_def (__OPENAT)
diff --git a/opendir-o-directory-check.patch b/opendir-o-directory-check.patch
deleted file mode 100644
index 1543c7e..0000000
--- a/opendir-o-directory-check.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-2015-09-04  Roland McGrath  <roland@hack.frob.com>
-
-	[BZ #18921]
-	* sysdeps/posix/opendir.c (need_isdir_precheck) [O_DIRECTORY]:
-	Fix inverted sense of test of 'o_directory_works' value.
-	Reported by Pádraig Brady <P@draigBrady.com>, diagnosed by
-	Bernhard Voelker <mail@bernhard-voelker.de>.
-
-Index: glibc-2.22/sysdeps/posix/opendir.c
-===================================================================
---- glibc-2.22.orig/sysdeps/posix/opendir.c
-+++ glibc-2.22/sysdeps/posix/opendir.c
-@@ -105,7 +105,7 @@ need_isdir_precheck (void)
-     tryopen_o_directory ();
- 
-   /* We can skip the expensive `stat' call if O_DIRECTORY works.  */
--  return o_directory_works > 0;
-+  return o_directory_works < 0;
- #endif
-   return true;
- }
diff --git a/powerpc-elision-adapt-param.patch b/powerpc-elision-adapt-param.patch
deleted file mode 100644
index 49d5f23..0000000
--- a/powerpc-elision-adapt-param.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-2015-12-17  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
-
-	[BZ #19174]
-	* sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of
-	.skip_lock_out_of_tbegin_retries.
-	* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
-	(__lll_lock_elision): Likewise, and respect a value of
-	try_tbegin <= 0.
-
-Index: glibc-2.22/sysdeps/powerpc/nptl/elide.h
-===================================================================
---- glibc-2.22.orig/sysdeps/powerpc/nptl/elide.h
-+++ glibc-2.22/sysdeps/powerpc/nptl/elide.h
-@@ -27,7 +27,7 @@
-    configurations.  Returns true if the system should retry again or false
-    otherwise.  */
- static inline bool
--__get_new_count (uint8_t *adapt_count)
-+__get_new_count (uint8_t *adapt_count, int attempt)
- {
-   /* A persistent failure indicates that a retry will probably
-      result in another failure.  Use normal locking now and
-@@ -40,7 +40,7 @@ __get_new_count (uint8_t *adapt_count)
-     }
-   /* Same logic as above, but for a number of temporary failures in a
-      a row.  */
--  else if (__elision_aconf.skip_lock_out_of_tbegin_retries > 0
-+  else if (attempt <= 1 && __elision_aconf.skip_lock_out_of_tbegin_retries > 0
- 	   && __elision_aconf.try_tbegin > 0)
-     *adapt_count = __elision_aconf.skip_lock_out_of_tbegin_retries;
-   return true;
-@@ -78,7 +78,7 @@ __get_new_count (uint8_t *adapt_count)
- 	      __builtin_tabort (_ABORT_LOCK_BUSY);			\
- 	    }								\
- 	  else								\
--	    if (!__get_new_count(&adapt_count))				\
-+	    if (!__get_new_count (&adapt_count,i))			\
- 	      break;							\
- 	}								\
-     ret;								\
-Index: glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-lock.c
-===================================================================
---- glibc-2.22.orig/sysdeps/unix/sysv/linux/powerpc/elision-lock.c
-+++ glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-lock.c
-@@ -72,8 +72,7 @@ __lll_lock_elision (int *lock, short *ad
-       goto use_lock;
-     }
- 
--  int try_begin = aconf.try_tbegin;
--  while (1)
-+  for (int i = aconf.try_tbegin; i > 0; i--)
-     {
-       if (__builtin_tbegin (0))
- 	{
-@@ -87,21 +86,19 @@ __lll_lock_elision (int *lock, short *ad
- 	  /* A persistent failure indicates that a retry will probably
- 	     result in another failure.  Use normal locking now and
- 	     for the next couple of calls.  */
--	  if (try_begin-- <= 0
--	      || _TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ()))
-+	  if (_TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ()))
- 	    {
- 	      if (aconf.skip_lock_internal_abort > 0)
- 		*adapt_count = aconf.skip_lock_internal_abort;
- 	      goto use_lock;
- 	    }
--	  /* Same logic as above, but for for a number of temporary failures
--	     in a row.  */
--	  else if (aconf.skip_lock_out_of_tbegin_retries > 0
--                   && aconf.try_tbegin > 0)
--	    *adapt_count = aconf.skip_lock_out_of_tbegin_retries;
- 	}
-      }
- 
-+  /* Fall back to locks for a bit if retries have been exhausted */
-+  if (aconf.try_tbegin > 0 && aconf.skip_lock_out_of_tbegin_retries > 0)
-+    *adapt_count = aconf.skip_lock_out_of_tbegin_retries;
-+
- use_lock:
-   return LLL_LOCK ((*lock), pshared);
- }
diff --git a/powerpc-elision-enable-envvar.patch b/powerpc-elision-enable-envvar.patch
new file mode 100644
index 0000000..6e7bbb1
--- /dev/null
+++ b/powerpc-elision-enable-envvar.patch
@@ -0,0 +1,41 @@
+2016-02-11  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/elision-conf.c
+	(elision_init): Further restrict enablement based
+	on whether GLIBC_ELISION_ENABLE=yes is in the env.
+---
+ sysdeps/unix/sysv/linux/powerpc/elision-conf.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+Index: glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
+===================================================================
+--- glibc-2.22.orig/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
++++ glibc-2.22/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
+@@ -21,6 +21,7 @@
+ #include <elision-conf.h>
+ #include <unistd.h>
+ #include <dl-procinfo.h>
++#include <string.h>
+ 
+ /* Reasonable initial tuning values, may be revised in the future.
+    This is a conservative initial value.  */
+@@ -61,7 +62,18 @@ elision_init (int argc __attribute__ ((u
+ {
+ #ifdef ENABLE_LOCK_ELISION
+   int elision_available = (GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_HTM) ? 1 : 0;
+-  __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
++
++  /* Scan the environment and conditionally enable TLE.  */
++  if (elision_available != 0 && __libc_enable_secure == 0)
++    {
++      for ( ; *environ != NULL; environ++)
++	  if (**environ == 'G' &&
++	      strcmp (*environ,"GLIBC_ELISION_ENABLE=yes") == 0)
++	    {
++	      __pthread_force_elision = elision_available;
++	      break;
++	    }
++    }
+ #endif
+   if (!__pthread_force_elision)
+     /* Disable elision on rwlocks.  */
diff --git a/powerpc-lock-elision-race.patch b/powerpc-lock-elision-race.patch
deleted file mode 100644
index 06067f6..0000000
--- a/powerpc-lock-elision-race.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-2015-10-20  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
-
-	[BZ #18743]
-	* sysdeps/powerpc/nptl/elide.h (__elide_lock): Move most of this
-	code to...
-	(ELIDE_LOCK): ...here.
-	(__get_new_count): New function with part of the code from
-	__elide_lock that updates the value of adapt_count after a
-	transaction abort.
-	(__elided_trylock): Moved this code to...
-	(ELIDE_TRYLOCK): ...here.
-
-Index: glibc-2.22/sysdeps/powerpc/nptl/elide.h
-===================================================================
---- glibc-2.22.orig/sysdeps/powerpc/nptl/elide.h
-+++ glibc-2.22/sysdeps/powerpc/nptl/elide.h
-@@ -23,67 +23,78 @@
- # include <htm.h>
- # include <elision-conf.h>
- 
--/* Returns true if the lock defined by is_lock_free as elided.
--   ADAPT_COUNT is a pointer to per-lock state variable. */
--
-+/* Get the new value of adapt_count according to the elision
-+   configurations.  Returns true if the system should retry again or false
-+   otherwise.  */
- static inline bool
--__elide_lock (uint8_t *adapt_count, int is_lock_free)
-+__get_new_count (uint8_t *adapt_count)
- {
--  if (*adapt_count > 0)
-+  /* A persistent failure indicates that a retry will probably
-+     result in another failure.  Use normal locking now and
-+     for the next couple of calls.  */
-+  if (_TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ()))
-     {
--      (*adapt_count)--;
-+      if (__elision_aconf.skip_lock_internal_abort > 0)
-+	*adapt_count = __elision_aconf.skip_lock_internal_abort;
-       return false;
-     }
--
--  for (int i = __elision_aconf.try_tbegin; i > 0; i--)
--    {
--      if (__builtin_tbegin (0))
--	{
--	  if (is_lock_free)
--	    return true;
--	  /* Lock was busy.  */
--	  __builtin_tabort (_ABORT_LOCK_BUSY);
--	}
--      else
--	{
--	  /* A persistent failure indicates that a retry will probably
--	     result in another failure.  Use normal locking now and
--	     for the next couple of calls.  */
--	  if (_TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ()))
--	    {
--	      if (__elision_aconf.skip_lock_internal_abort > 0)
--		*adapt_count = __elision_aconf.skip_lock_internal_abort;
--	      break;
--	    }
--	  /* Same logic as above, but for a number of temporary failures in a
--	     a row.  */
--	  else if (__elision_aconf.skip_lock_out_of_tbegin_retries > 0
--		   && __elision_aconf.try_tbegin > 0)
--	    *adapt_count = __elision_aconf.skip_lock_out_of_tbegin_retries;
--	}
--     }
--
--  return false;
-+  /* Same logic as above, but for a number of temporary failures in a
-+     a row.  */
-+  else if (__elision_aconf.skip_lock_out_of_tbegin_retries > 0
-+	   && __elision_aconf.try_tbegin > 0)
-+    *adapt_count = __elision_aconf.skip_lock_out_of_tbegin_retries;
-+  return true;
- }
- 
--# define ELIDE_LOCK(adapt_count, is_lock_free) \
--  __elide_lock (&(adapt_count), is_lock_free)
--
-+/* CONCURRENCY NOTES:
- 
--static inline bool
--__elide_trylock (uint8_t *adapt_count, int is_lock_free, int write)
--{
--  if (__elision_aconf.try_tbegin > 0)
--    {
--      if (write)
--	__builtin_tabort (_ABORT_NESTED_TRYLOCK);
--      return __elide_lock (adapt_count, is_lock_free);
--    }
--  return false;
--}
-+   The evaluation of the macro expression is_lock_free encompasses one or
-+   more loads from memory locations that are concurrently modified by other
-+   threads.  For lock elision to work, this evaluation and the rest of the
-+   critical section protected by the lock must be atomic because an
-+   execution with lock elision must be equivalent to an execution in which
-+   the lock would have been actually acquired and released.  Therefore, we
-+   evaluate is_lock_free inside of the transaction that represents the
-+   critical section for which we want to use lock elision, which ensures
-+   the atomicity that we require.  */
-+
-+/* Returns 0 if the lock defined by is_lock_free was elided.
-+   ADAPT_COUNT is a per-lock state variable.  */
-+# define ELIDE_LOCK(adapt_count, is_lock_free)				\
-+  ({									\
-+    int ret = 0;							\
-+    if (adapt_count > 0)						\
-+      (adapt_count)--;							\
-+    else								\
-+      for (int i = __elision_aconf.try_tbegin; i > 0; i--)		\
-+	{								\
-+	  if (__builtin_tbegin (0))					\
-+	    {								\
-+	      if (is_lock_free)						\
-+		{							\
-+		  ret = 1;						\
-+		  break;						\
-+		}							\
-+	      __builtin_tabort (_ABORT_LOCK_BUSY);			\
-+	    }								\
-+	  else								\
-+	    if (!__get_new_count(&adapt_count))				\
-+	      break;							\
-+	}								\
-+    ret;								\
-+  })
- 
- # define ELIDE_TRYLOCK(adapt_count, is_lock_free, write)	\
--  __elide_trylock (&(adapt_count), is_lock_free, write)
-+  ({								\
-+    int ret = 0;						\
-+    if (__elision_aconf.try_tbegin > 0)				\
-+      {								\
-+	if (write)						\
-+	  __builtin_tabort (_ABORT_NESTED_TRYLOCK);		\
-+	ret = ELIDE_LOCK (adapt_count, is_lock_free);		\
-+      }								\
-+    ret;							\
-+  })
- 
- 
- static inline bool
diff --git a/prelink-elf-rtype-class.patch b/prelink-elf-rtype-class.patch
deleted file mode 100644
index 2bebff4..0000000
--- a/prelink-elf-rtype-class.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-2015-11-14  H.J. Lu  <hongjiu.lu@intel.com>
-
-	* config.make.in (have-glob-dat-reloc): New.
-	* configure.ac (libc_cv_has_glob_dat): New.  Set to yes if
-	target supports GLOB_DAT relocaton. AC_SUBST.
-	* configure: Regenerated.
-	* elf/Makefile (tests): Add tst-prelink.
-	(tests-special): Add $(objpfx)tst-prelink-cmp.out.
-	(tst-prelink-ENV): New.
-	($(objpfx)tst-prelink-conflict.out): Likewise.
-	($(objpfx)tst-prelink-cmp.out): Likewise.
-	* sysdeps/x86/tst-prelink.c: Moved to ...
-	* elf/tst-prelink.c: Here.
-	* sysdeps/x86/tst-prelink.exp: Moved to ...
-	* elf/tst-prelink.exp: Here.
-	* sysdeps/x86/Makefile (tests): Don't add tst-prelink.
-	(tst-prelink-ENV): Removed.
-	($(objpfx)tst-prelink-conflict.out): Likewise.
-	($(objpfx)tst-prelink-cmp.out): Likewise.
-	(tests-special): Don't add $(objpfx)tst-prelink-cmp.out.
-
-2015-11-10  H.J. Lu  <hongjiu.lu@intel.com>
-
-	[BZ #19178]
-	* sysdeps/x86/Makefile (tests): Add tst-prelink.
-	(tst-prelink-ENV): New.
-	($(objpfx)tst-prelink-conflict.out): Likewise.
-	($(objpfx)tst-prelink-cmp.out): Likewise.
-	(tests-special): Add $(objpfx)tst-prelink-cmp.out.
-	* sysdeps/x86/tst-prelink.c: New file.
-	* sysdeps/x86/tst-prelink.exp: Likewise.
-
-2015-11-07  H.J. Lu  <hongjiu.lu@intel.com>
-
-	[BZ #19178]
-	* elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
-	(RTYPE_CLASS_PLT): Likewise.
-	(RTYPE_CLASS_COPY): Likewise.
-	(RTYPE_CLASS_TLS): Likewise.
-	(_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
-	to set relocation type class for DL_DEBUG_PRELINK.  Keep only
-	ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
-	DL_DEBUG_PRELINK.
-
-Index: glibc-2.22/config.make.in
-===================================================================
---- glibc-2.22.orig/config.make.in
-+++ glibc-2.22/config.make.in
-@@ -51,6 +51,7 @@ have-z-combreloc = @libc_cv_z_combreloc@
- have-z-execstack = @libc_cv_z_execstack@
- have-Bgroup = @libc_cv_Bgroup@
- have-protected-data = @libc_cv_protected_data@
-+have-glob-dat-reloc = @libc_cv_has_glob_dat@
- with-fp = @with_fp@
- old-glibc-headers = @old_glibc_headers@
- unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
-Index: glibc-2.22/configure
-===================================================================
---- glibc-2.22.orig/configure
-+++ glibc-2.22/configure
-@@ -628,6 +628,7 @@ gnu89_inline
- libc_cv_ssp
- fno_unit_at_a_time
- libc_cv_output_format
-+libc_cv_has_glob_dat
- libc_cv_hashstyle
- libc_cv_fpie
- libc_cv_z_execstack
-@@ -6335,6 +6336,39 @@ $as_echo "$libc_cv_use_default_link" >&6
-   use_default_link=$libc_cv_use_default_link
- fi
- 
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
-+$as_echo_n "checking for GLOB_DAT reloc... " >&6; }
-+if ${libc_cv_has_glob_dat+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat > conftest.c <<EOF
-+extern int mumble;
-+int foo (void) { return mumble; }
-+EOF
-+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-+			-fPIC -shared -o conftest.so conftest.c
-+			-nostdlib -nostartfiles
-+			1>&5'
-+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+  (eval $ac_try) 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }
-+then
-+  if $READELF -rW conftest.so | grep '_GLOB_DAT' > /dev/null; then
-+    libc_cv_has_glob_dat=yes
-+  else
-+    libc_cv_has_glob_dat=no
-+  fi
-+else
-+  libc_cv_has_glob_dat=no
-+fi
-+rm -f conftest*
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_has_glob_dat" >&5
-+$as_echo "$libc_cv_has_glob_dat" >&6; }
-+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
- $as_echo_n "checking linker output format... " >&6; }
- if ${libc_cv_output_format+:} false; then :
-Index: glibc-2.22/configure.ac
-===================================================================
---- glibc-2.22.orig/configure.ac
-+++ glibc-2.22/configure.ac
-@@ -1535,6 +1535,29 @@ $ac_try"
-   use_default_link=$libc_cv_use_default_link
- fi
- 
-+AC_CACHE_CHECK(for GLOB_DAT reloc,
-+	       libc_cv_has_glob_dat, [dnl
-+cat > conftest.c <<EOF
-+extern int mumble;
-+int foo (void) { return mumble; }
-+EOF
-+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-+			-fPIC -shared -o conftest.so conftest.c
-+			-nostdlib -nostartfiles
-+			1>&AS_MESSAGE_LOG_FD])
-+then
-+dnl look for GLOB_DAT relocation.
-+  if $READELF -rW conftest.so | grep '_GLOB_DAT' > /dev/null; then
-+    libc_cv_has_glob_dat=yes
-+  else
-+    libc_cv_has_glob_dat=no
-+  fi
-+else
-+  libc_cv_has_glob_dat=no
-+fi
-+rm -f conftest*])
-+AC_SUBST(libc_cv_has_glob_dat)
-+
- AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
- if libc_cv_output_format=`
- ${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD`
-Index: glibc-2.22/elf/Makefile
-===================================================================
---- glibc-2.22.orig/elf/Makefile
-+++ glibc-2.22/elf/Makefile
-@@ -292,6 +292,13 @@ check-abi: $(objpfx)check-abi-ld.out
- tests-special += $(objpfx)check-abi-ld.out
- update-abi: update-abi-ld
- 
-+ifeq ($(have-glob-dat-reloc),yes)
-+tests += tst-prelink
-+ifeq ($(run-built-tests),yes)
-+tests-special += $(objpfx)tst-prelink-cmp.out
-+endif
-+endif
-+
- include ../Rules
- 
- ifeq (yes,$(build-shared))
-@@ -1205,3 +1212,13 @@ $(objpfx)tst-unused-dep.out: $(objpfx)te
- $(objpfx)tst-unused-dep-cmp.out: $(objpfx)tst-unused-dep.out
- 	cmp $< /dev/null > $@; \
- 	$(evaluate-test)
-+
-+tst-prelink-ENV = LD_TRACE_PRELINKING=1
-+
-+$(objpfx)tst-prelink-conflict.out: $(objpfx)tst-prelink.out
-+	grep stdout $< | grep conflict | $(AWK) '{ print $$10, $$11 }' > $@
-+
-+$(objpfx)tst-prelink-cmp.out: tst-prelink.exp \
-+			      $(objpfx)tst-prelink-conflict.out
-+	cmp $^ > $@; \
-+	$(evaluate-test)
-Index: glibc-2.22/elf/dl-lookup.c
-===================================================================
---- glibc-2.22.orig/elf/dl-lookup.c
-+++ glibc-2.22/elf/dl-lookup.c
-@@ -1016,6 +1016,18 @@ _dl_debug_bindings (const char *undef_na
- #ifdef SHARED
-   if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-     {
-+/* ELF_RTYPE_CLASS_XXX must match RTYPE_CLASS_XXX used by prelink with
-+   LD_TRACE_PRELINKING.  */
-+#define RTYPE_CLASS_VALID	8
-+#define RTYPE_CLASS_PLT		(8|1)
-+#define RTYPE_CLASS_COPY	(8|2)
-+#define RTYPE_CLASS_TLS		(8|4)
-+#if ELF_RTYPE_CLASS_PLT != 0 && ELF_RTYPE_CLASS_PLT != 1
-+# error ELF_RTYPE_CLASS_PLT must be 0 or 1!
-+#endif
-+#if ELF_RTYPE_CLASS_COPY != 0 && ELF_RTYPE_CLASS_COPY != 2
-+# error ELF_RTYPE_CLASS_COPY must be 0 or 2!
-+#endif
-       int conflict = 0;
-       struct sym_val val = { NULL, NULL };
- 
-@@ -1071,12 +1083,17 @@ _dl_debug_bindings (const char *undef_na
- 
-       if (value->s)
- 	{
-+	  /* Keep only ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
-+	     bits since since prelink only uses them.  */
-+	  type_class &= ELF_RTYPE_CLASS_PLT | ELF_RTYPE_CLASS_COPY;
- 	  if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
- 				== STT_TLS))
--	    type_class = 4;
-+	    /* Clear the RTYPE_CLASS_VALID bit in RTYPE_CLASS_TLS.  */
-+	    type_class = RTYPE_CLASS_TLS & ~RTYPE_CLASS_VALID;
- 	  else if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
- 				     == STT_GNU_IFUNC))
--	    type_class |= 8;
-+	    /* Set the RTYPE_CLASS_VALID bit.  */
-+	    type_class |= RTYPE_CLASS_VALID;
- 	}
- 
-       if (conflict
-Index: glibc-2.22/elf/tst-prelink.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/elf/tst-prelink.c
-@@ -0,0 +1,30 @@
-+/* Test the output from the environment variable, LD_TRACE_PRELINKING,
-+   for prelink.
-+   Copyright (C) 2015 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 <stdio.h>
-+
-+static int
-+do_test (void)
-+{
-+  fprintf (stdout, "hello\n");
-+  return 0;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: glibc-2.22/elf/tst-prelink.exp
-===================================================================
---- /dev/null
-+++ glibc-2.22/elf/tst-prelink.exp
-@@ -0,0 +1 @@
-+/0 stdout
diff --git a/refactor-nan-parsing.patch b/refactor-nan-parsing.patch
deleted file mode 100644
index 1d51201..0000000
--- a/refactor-nan-parsing.patch
+++ /dev/null
@@ -1,896 +0,0 @@
-2015-11-24  Joseph Myers  <joseph@codesourcery.com>
-
-	* stdlib/strtod_nan.c: New file.
-	* stdlib/strtod_nan_double.h: Likewise.
-	* stdlib/strtod_nan_float.h: Likewise.
-	* stdlib/strtod_nan_main.c: Likewise.
-	* stdlib/strtod_nan_narrow.h: Likewise.
-	* stdlib/strtod_nan_wide.h: Likewise.
-	* stdlib/strtof_nan.c: Likewise.
-	* stdlib/strtold_nan.c: Likewise.
-	* sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h: Likewise.
-	* sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h: Likewise.
-	* sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h: Likewise.
-	* wcsmbs/wcstod_nan.c: Likewise.
-	* wcsmbs/wcstof_nan.c: Likewise.
-	* wcsmbs/wcstold_nan.c: Likewise.
-	* stdlib/Makefile (routines): Add strtof_nan, strtod_nan and
-	strtold_nan.
-	* wcsmbs/Makefile (routines): Add wcstod_nan, wcstold_nan and
-	wcstof_nan.
-	* include/stdlib.h (__strtof_nan): Declare and use
-	libc_hidden_proto.
-	(__strtod_nan): Likewise.
-	(__strtold_nan): Likewise.
-	(__wcstof_nan): Likewise.
-	(__wcstod_nan): Likewise.
-	(__wcstold_nan): Likewise.
-	* include/wchar.h (____wcstoull_l_internal): Declare.
-	* stdlib/strtod_l.c: Do not include <ieee754.h>.
-	(____strtoull_l_internal): Remove declaration.
-	(STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	(STRTOULL): Likewise.
-	(____STRTOF_INTERNAL): Use STRTOF_NAN to parse NaN payload.
-	* stdlib/strtof_l.c (____strtoull_l_internal): Remove declaration.
-	(STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-128/strtold_l.c (STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c (STRTOF_NAN): Define
-	macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-64-128/strtold_l.c (STRTOF_NAN): Define
-	macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-96/strtold_l.c (STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* wcsmbs/wcstod_l.c (____wcstoull_l_internal): Remove declaration.
-	* wcsmbs/wcstof_l.c (____wcstoull_l_internal): Likewise.
-	* wcsmbs/wcstold_l.c (____wcstoull_l_internal): Likewise.
-
-Index: glibc-2.22/include/stdlib.h
-===================================================================
---- glibc-2.22.orig/include/stdlib.h
-+++ glibc-2.22/include/stdlib.h
-@@ -203,6 +203,24 @@ libc_hidden_proto (strtoll)
- libc_hidden_proto (strtoul)
- libc_hidden_proto (strtoull)
- 
-+extern float __strtof_nan (const char *, char **, char) internal_function;
-+extern double __strtod_nan (const char *, char **, char) internal_function;
-+extern long double __strtold_nan (const char *, char **, char)
-+     internal_function;
-+extern float __wcstof_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+extern double __wcstod_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+extern long double __wcstold_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+
-+libc_hidden_proto (__strtof_nan)
-+libc_hidden_proto (__strtod_nan)
-+libc_hidden_proto (__strtold_nan)
-+libc_hidden_proto (__wcstof_nan)
-+libc_hidden_proto (__wcstod_nan)
-+libc_hidden_proto (__wcstold_nan)
-+
- extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
- 		     int *__restrict __sign);
- extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
-Index: glibc-2.22/include/wchar.h
-===================================================================
---- glibc-2.22.orig/include/wchar.h
-+++ glibc-2.22/include/wchar.h
-@@ -52,6 +52,9 @@ extern unsigned long long int __wcstoull
- 						   __restrict __endptr,
- 						   int __base,
- 						   int __group) __THROW;
-+extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
-+						       wchar_t **, int, int,
-+						       __locale_t);
- libc_hidden_proto (__wcstof_internal)
- libc_hidden_proto (__wcstod_internal)
- libc_hidden_proto (__wcstold_internal)
-Index: glibc-2.22/stdlib/Makefile
-===================================================================
---- glibc-2.22.orig/stdlib/Makefile
-+++ glibc-2.22/stdlib/Makefile
-@@ -50,6 +50,7 @@ routines	:=							      \
- 	strtol_l strtoul_l strtoll_l strtoull_l				      \
- 	strtof strtod strtold						      \
- 	strtof_l strtod_l strtold_l					      \
-+	strtof_nan strtod_nan strtold_nan				      \
- 	system canonicalize						      \
- 	a64l l64a							      \
- 	rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg		      \
-Index: glibc-2.22/stdlib/strtod_l.c
-===================================================================
---- glibc-2.22.orig/stdlib/strtod_l.c
-+++ glibc-2.22/stdlib/strtod_l.c
-@@ -20,8 +20,6 @@
- #include <xlocale.h>
- 
- extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
--extern unsigned long long int ____strtoull_l_internal (const char *, char **,
--						       int, int, __locale_t);
- 
- /* Configuration part.  These macros are defined by `strtold.c',
-    `strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
-@@ -33,27 +31,20 @@ extern unsigned long long int ____strtou
- # ifdef USE_WIDE_CHAR
- #  define STRTOF	wcstod_l
- #  define __STRTOF	__wcstod_l
-+#  define STRTOF_NAN	__wcstod_nan
- # else
- #  define STRTOF	strtod_l
- #  define __STRTOF	__strtod_l
-+#  define STRTOF_NAN	__strtod_nan
- # endif
- # define MPN2FLOAT	__mpn_construct_double
- # define FLOAT_HUGE_VAL	HUGE_VAL
--# define SET_MANTISSA(flt, mant) \
--  do { union ieee754_double u;						      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa1 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)			      \
--	 (flt) = u.d;							      \
--  } while (0)
- #endif
- /* End of configuration part.  */
- 
- #include <ctype.h>
- #include <errno.h>
- #include <float.h>
--#include <ieee754.h>
- #include "../locale/localeinfo.h"
- #include <locale.h>
- #include <math.h>
-@@ -104,7 +95,6 @@ extern unsigned long long int ____strtou
- # define TOLOWER_C(Ch) __towlower_l ((Ch), _nl_C_locobj_ptr)
- # define STRNCASECMP(S1, S2, N) \
-   __wcsncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
--# define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0, loc)
- #else
- # define STRING_TYPE char
- # define CHAR_TYPE char
-@@ -116,7 +106,6 @@ extern unsigned long long int ____strtou
- # define TOLOWER_C(Ch) __tolower_l ((Ch), _nl_C_locobj_ptr)
- # define STRNCASECMP(S1, S2, N) \
-   __strncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
--# define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0, loc)
- #endif
- 
- 
-@@ -655,33 +644,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group
- 	  if (*cp == L_('('))
- 	    {
- 	      const STRING_TYPE *startp = cp;
--	      do
--		++cp;
--	      while ((*cp >= L_('0') && *cp <= L_('9'))
--		     || ({ CHAR_TYPE lo = TOLOWER (*cp);
--			   lo >= L_('a') && lo <= L_('z'); })
--		     || *cp == L_('_'));
--
--	      if (*cp != L_(')'))
--		/* The closing brace is missing.  Only match the NAN
--		   part.  */
--		cp = startp;
-+	      STRING_TYPE *endp;
-+	      retval = STRTOF_NAN (cp + 1, &endp, L_(')'));
-+	      if (*endp == L_(')'))
-+		/* Consume the closing parenthesis.  */
-+		cp = endp + 1;
- 	      else
--		{
--		  /* This is a system-dependent way to specify the
--		     bitmask used for the NaN.  We expect it to be
--		     a number which is put in the mantissa of the
--		     number.  */
--		  STRING_TYPE *endp;
--		  unsigned long long int mant;
--
--		  mant = STRTOULL (startp + 1, &endp, 0);
--		  if (endp == cp)
--		    SET_MANTISSA (retval, mant);
--
--		  /* Consume the closing brace.  */
--		  ++cp;
--		}
-+		/* Only match the NAN part.  */
-+		cp = startp;
- 	    }
- 
- 	  if (endptr != NULL)
-Index: glibc-2.22/stdlib/strtod_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan.c
-@@ -0,0 +1,24 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, double.
-+   Copyright (C) 2015 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 <strtod_nan_narrow.h>
-+#include <strtod_nan_double.h>
-+
-+#define STRTOD_NAN __strtod_nan
-+#include <strtod_nan_main.c>
-Index: glibc-2.22/stdlib/strtod_nan_double.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan_double.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For double.
-+   Copyright (C) 1997-2015 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 FLOAT		double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee754_double u;				\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa1 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: glibc-2.22/stdlib/strtod_nan_float.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan_float.h
-@@ -0,0 +1,29 @@
-+/* Convert string for NaN payload to corresponding NaN.  For float.
-+   Copyright (C) 1997-2015 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	FLOAT		float
-+#define SET_MANTISSA(flt, mant)			\
-+  do						\
-+    {						\
-+      union ieee754_float u;			\
-+      u.f = (flt);				\
-+      u.ieee_nan.mantissa = (mant);		\
-+      if (u.ieee.mantissa != 0)			\
-+	(flt) = u.f;				\
-+    }						\
-+  while (0)
-Index: glibc-2.22/stdlib/strtod_nan_main.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan_main.c
-@@ -0,0 +1,63 @@
-+/* Convert string for NaN payload to corresponding NaN.
-+   Copyright (C) 1997-2015 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 <ieee754.h>
-+#include <locale.h>
-+#include <math.h>
-+#include <stdlib.h>
-+#include <wchar.h>
-+
-+
-+/* If STR starts with an optional n-char-sequence as defined by ISO C
-+   (a sequence of ASCII letters, digits and underscores), followed by
-+   ENDC, return a NaN whose payload is set based on STR.  Otherwise,
-+   return a default NAN.  If ENDPTR is not NULL, set *ENDPTR to point
-+   to the character after the initial n-char-sequence.  */
-+
-+internal_function
-+FLOAT
-+STRTOD_NAN (const STRING_TYPE *str, STRING_TYPE **endptr, STRING_TYPE endc)
-+{
-+  const STRING_TYPE *cp = str;
-+
-+  while ((*cp >= L_('0') && *cp <= L_('9'))
-+	 || (*cp >= L_('A') && *cp <= L_('Z'))
-+	 || (*cp >= L_('a') && *cp <= L_('z'))
-+	 || *cp == L_('_'))
-+    ++cp;
-+
-+  FLOAT retval = NAN;
-+  if (*cp != endc)
-+    goto out;
-+
-+  /* This is a system-dependent way to specify the bitmask used for
-+     the NaN.  We expect it to be a number which is put in the
-+     mantissa of the number.  */
-+  STRING_TYPE *endp;
-+  unsigned long long int mant;
-+
-+  mant = STRTOULL (str, &endp, 0);
-+  if (endp == cp)
-+    SET_MANTISSA (retval, mant);
-+
-+ out:
-+  if (endptr != NULL)
-+    *endptr = (STRING_TYPE *) cp;
-+  return retval;
-+}
-+libc_hidden_def (STRTOD_NAN)
-Index: glibc-2.22/stdlib/strtod_nan_narrow.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan_narrow.h
-@@ -0,0 +1,22 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow strings.
-+   Copyright (C) 1997-2015 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 STRING_TYPE char
-+#define L_(Ch) Ch
-+#define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0,	\
-+						   _nl_C_locobj_ptr)
-Index: glibc-2.22/stdlib/strtod_nan_wide.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtod_nan_wide.h
-@@ -0,0 +1,22 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings.
-+   Copyright (C) 1997-2015 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 STRING_TYPE wchar_t
-+#define L_(Ch) L##Ch
-+#define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0,	\
-+						   _nl_C_locobj_ptr)
-Index: glibc-2.22/stdlib/strtof_l.c
-===================================================================
---- glibc-2.22.orig/stdlib/strtof_l.c
-+++ glibc-2.22/stdlib/strtof_l.c
-@@ -20,26 +20,19 @@
- #include <xlocale.h>
- 
- extern float ____strtof_l_internal (const char *, char **, int, __locale_t);
--extern unsigned long long int ____strtoull_l_internal (const char *, char **,
--						       int, int, __locale_t);
- 
- #define	FLOAT		float
- #define	FLT		FLT
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstof_l
- # define __STRTOF	__wcstof_l
-+# define STRTOF_NAN	__wcstof_nan
- #else
- # define STRTOF		strtof_l
- # define __STRTOF	__strtof_l
-+# define STRTOF_NAN	__strtof_nan
- #endif
- #define	MPN2FLOAT	__mpn_construct_float
- #define	FLOAT_HUGE_VAL	HUGE_VALF
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee754_float u;						      \
--       u.f = (flt);							      \
--       u.ieee_nan.mantissa = (mant);					      \
--       if (u.ieee.mantissa != 0)					      \
--	 (flt) = u.f;							      \
--  } while (0)
- 
- #include "strtod_l.c"
-Index: glibc-2.22/stdlib/strtof_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtof_nan.c
-@@ -0,0 +1,24 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, float.
-+   Copyright (C) 2015 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 <strtod_nan_narrow.h>
-+#include <strtod_nan_float.h>
-+
-+#define STRTOD_NAN __strtof_nan
-+#include <strtod_nan_main.c>
-Index: glibc-2.22/stdlib/strtold_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/stdlib/strtold_nan.c
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, long double.
-+   Copyright (C) 2015 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 <math.h>
-+
-+/* This function is unused if long double and double have the same
-+   representation.  */
-+#ifndef __NO_LONG_DOUBLE_MATH
-+# include <strtod_nan_narrow.h>
-+# include <strtod_nan_ldouble.h>
-+
-+# define STRTOD_NAN __strtold_nan
-+# include <strtod_nan_main.c>
-+#endif
-Index: glibc-2.22/sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h
-@@ -0,0 +1,33 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-128.
-+   Copyright (C) 1997-2015 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 FLOAT		long double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee854_long_double u;			\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = 0;				\
-+      u.ieee_nan.mantissa1 = 0;				\
-+      u.ieee_nan.mantissa2 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa3 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1		\
-+	   | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: glibc-2.22/sysdeps/ieee754/ldbl-128/strtold_l.c
-===================================================================
---- glibc-2.22.orig/sysdeps/ieee754/ldbl-128/strtold_l.c
-+++ glibc-2.22/sysdeps/ieee754/ldbl-128/strtold_l.c
-@@ -25,22 +25,13 @@
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstold_l
- # define __STRTOF	__wcstold_l
-+# define STRTOF_NAN	__wcstold_nan
- #else
- # define STRTOF		strtold_l
- # define __STRTOF	__strtold_l
-+# define STRTOF_NAN	__strtold_nan
- #endif
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = 0;					      \
--       u.ieee_nan.mantissa1 = 0;					      \
--       u.ieee_nan.mantissa2 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa3 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1				      \
--	    | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)		      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <strtod_l.c>
-Index: glibc-2.22/sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-128ibm.
-+   Copyright (C) 1997-2015 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 FLOAT		long double
-+#define SET_MANTISSA(flt, mant)					\
-+  do								\
-+    {								\
-+      union ibm_extended_long_double u;				\
-+      u.ld = (flt);						\
-+      u.d[0].ieee_nan.mantissa0 = (mant) >> 32;			\
-+      u.d[0].ieee_nan.mantissa1 = (mant);			\
-+      if ((u.d[0].ieee.mantissa0 | u.d[0].ieee.mantissa1) != 0)	\
-+	(flt) = u.ld;						\
-+    }								\
-+  while (0)
-Index: glibc-2.22/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-===================================================================
---- glibc-2.22.orig/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-+++ glibc-2.22/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-@@ -30,25 +30,19 @@ extern long double ____new_wcstold_l (co
- # define STRTOF		__new_wcstold_l
- # define __STRTOF	____new_wcstold_l
- # define ____STRTOF_INTERNAL ____wcstold_l_internal
-+# define STRTOF_NAN	__wcstold_nan
- #else
- extern long double ____new_strtold_l (const char *, char **, __locale_t);
- # define STRTOF		__new_strtold_l
- # define __STRTOF	____new_strtold_l
- # define ____STRTOF_INTERNAL ____strtold_l_internal
-+# define STRTOF_NAN	__strtold_nan
- #endif
- extern __typeof (__STRTOF) STRTOF;
- libc_hidden_proto (__STRTOF)
- libc_hidden_proto (STRTOF)
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--# define SET_MANTISSA(flt, mant) \
--  do { union ibm_extended_long_double u;				      \
--       u.ld = (flt);							      \
--       u.d[0].ieee_nan.mantissa0 = (mant) >> 32;			      \
--       u.d[0].ieee_nan.mantissa1 = (mant);				      \
--       if ((u.d[0].ieee.mantissa0 | u.d[0].ieee.mantissa1) != 0)	      \
--	 (flt) = u.ld;							      \
--  } while (0)
- 
- #include <strtod_l.c>
- 
-Index: glibc-2.22/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-===================================================================
---- glibc-2.22.orig/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-+++ glibc-2.22/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-@@ -30,28 +30,19 @@ extern long double ____new_wcstold_l (co
- # define STRTOF		__new_wcstold_l
- # define __STRTOF	____new_wcstold_l
- # define ____STRTOF_INTERNAL ____wcstold_l_internal
-+# define STRTOF_NAN	__wcstold_nan
- #else
- extern long double ____new_strtold_l (const char *, char **, __locale_t);
- # define STRTOF		__new_strtold_l
- # define __STRTOF	____new_strtold_l
- # define ____STRTOF_INTERNAL ____strtold_l_internal
-+# define STRTOF_NAN	__strtold_nan
- #endif
- extern __typeof (__STRTOF) STRTOF;
- libc_hidden_proto (__STRTOF)
- libc_hidden_proto (STRTOF)
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = 0;					      \
--       u.ieee_nan.mantissa1 = 0;					      \
--       u.ieee_nan.mantissa2 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa3 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1				      \
--	    | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)		      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <strtod_l.c>
- 
-Index: glibc-2.22/sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ glibc-2.22/sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-96.
-+   Copyright (C) 1997-2015 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 FLOAT		long double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee854_long_double u;			\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa1 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: glibc-2.22/sysdeps/ieee754/ldbl-96/strtold_l.c
-===================================================================
---- glibc-2.22.orig/sysdeps/ieee754/ldbl-96/strtold_l.c
-+++ glibc-2.22/sysdeps/ieee754/ldbl-96/strtold_l.c
-@@ -25,19 +25,13 @@
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstold_l
- # define __STRTOF	__wcstold_l
-+# define STRTOF_NAN	__wcstold_nan
- #else
- # define STRTOF		strtold_l
- # define __STRTOF	__strtold_l
-+# define STRTOF_NAN	__strtold_nan
- #endif
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa1 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)			      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <stdlib/strtod_l.c>
-Index: glibc-2.22/wcsmbs/Makefile
-===================================================================
---- glibc-2.22.orig/wcsmbs/Makefile
-+++ glibc-2.22/wcsmbs/Makefile
-@@ -33,6 +33,7 @@ routines := wcscat wcschr wcscmp wcscpy
- 	    wcstol wcstoul wcstoll wcstoull wcstod wcstold wcstof \
- 	    wcstol_l wcstoul_l wcstoll_l wcstoull_l \
- 	    wcstod_l wcstold_l wcstof_l \
-+	    wcstod_nan wcstold_nan wcstof_nan \
- 	    wcscoll wcsxfrm \
- 	    wcwidth wcswidth \
- 	    wcscoll_l wcsxfrm_l \
-Index: glibc-2.22/wcsmbs/wcstod_l.c
-===================================================================
---- glibc-2.22.orig/wcsmbs/wcstod_l.c
-+++ glibc-2.22/wcsmbs/wcstod_l.c
-@@ -23,9 +23,6 @@
- 
- extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
- 				     __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #define	USE_WIDE_CHAR	1
- 
-Index: glibc-2.22/wcsmbs/wcstod_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/wcsmbs/wcstod_nan.c
-@@ -0,0 +1,23 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings, double.
-+   Copyright (C) 2015 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 "../stdlib/strtod_nan_wide.h"
-+#include "../stdlib/strtod_nan_double.h"
-+
-+#define STRTOD_NAN __wcstod_nan
-+#include "../stdlib/strtod_nan_main.c"
-Index: glibc-2.22/wcsmbs/wcstof_l.c
-===================================================================
---- glibc-2.22.orig/wcsmbs/wcstof_l.c
-+++ glibc-2.22/wcsmbs/wcstof_l.c
-@@ -25,8 +25,5 @@
- 
- extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int,
- 				    __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #include <stdlib/strtof_l.c>
-Index: glibc-2.22/wcsmbs/wcstof_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/wcsmbs/wcstof_nan.c
-@@ -0,0 +1,23 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings, float.
-+   Copyright (C) 2015 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 "../stdlib/strtod_nan_wide.h"
-+#include "../stdlib/strtod_nan_float.h"
-+
-+#define STRTOD_NAN __wcstof_nan
-+#include "../stdlib/strtod_nan_main.c"
-Index: glibc-2.22/wcsmbs/wcstold_l.c
-===================================================================
---- glibc-2.22.orig/wcsmbs/wcstold_l.c
-+++ glibc-2.22/wcsmbs/wcstold_l.c
-@@ -24,8 +24,5 @@
- 
- extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **, int,
- 					   __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #include <strtold_l.c>
-Index: glibc-2.22/wcsmbs/wcstold_nan.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/wcsmbs/wcstold_nan.c
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings,
-+   long double.
-+   Copyright (C) 2015 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 <math.h>
-+
-+/* This function is unused if long double and double have the same
-+   representation.  */
-+#ifndef __NO_LONG_DOUBLE_MATH
-+# include "../stdlib/strtod_nan_wide.h"
-+# include <strtod_nan_ldouble.h>
-+
-+# define STRTOD_NAN __wcstold_nan
-+# include "../stdlib/strtod_nan_main.c"
-+#endif
diff --git a/send-dg-buffer-overflow.patch b/send-dg-buffer-overflow.patch
deleted file mode 100644
index ae71f49..0000000
--- a/send-dg-buffer-overflow.patch
+++ /dev/null
@@ -1,569 +0,0 @@
-2016-02-15  Carlos O'Donell  <carlos@redhat.com>
-
-	[BZ #18665]
-	* resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
-	*herrno_p.
-	(gaih_getanswer): Document functional behviour. Return tryagain
-	if any result is tryagain.
-	* resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
-	when freed.
-	* resolv/res_send.c: Add copyright text.
-	(__libc_res_nsend): Document that MAXPACKET is expected.
-	(send_vc): Document. Remove buffer reuse.
-	(send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
-	size of the buffer. Add Dprint for truncated UDP buffer.
-
-Index: glibc-2.22/resolv/nss_dns/dns-host.c
-===================================================================
---- glibc-2.22.orig/resolv/nss_dns/dns-host.c
-+++ glibc-2.22/resolv/nss_dns/dns-host.c
-@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *an
-   int h_namelen = 0;
- 
-   if (ancount == 0)
--    return NSS_STATUS_NOTFOUND;
-+    {
-+      *h_errnop = HOST_NOT_FOUND;
-+      return NSS_STATUS_NOTFOUND;
-+    }
- 
-   while (ancount-- > 0 && cp < end_of_message && had_error == 0)
-     {
-@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *an
-   /* Special case here: if the resolver sent a result but it only
-      contains a CNAME while we are looking for a T_A or T_AAAA record,
-      we fail with NOTFOUND instead of TRYAGAIN.  */
--  return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
-+  if (canon != NULL)
-+    {
-+      *h_errnop = HOST_NOT_FOUND;
-+      return NSS_STATUS_NOTFOUND;
-+    }
-+
-+  *h_errnop = NETDB_INTERNAL;
-+  return NSS_STATUS_TRYAGAIN;
- }
- 
- 
-@@ -1222,11 +1232,101 @@ gaih_getanswer (const querybuf *answer1,
- 
-   enum nss_status status = NSS_STATUS_NOTFOUND;
- 
-+  /* Combining the NSS status of two distinct queries requires some
-+     compromise and attention to symmetry (A or AAAA queries can be
-+     returned in any order).  What follows is a breakdown of how this
-+     code is expected to work and why. We discuss only SUCCESS,
-+     TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
-+     that apply (though RETURN and MERGE exist).  We make a distinction
-+     between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
-+     A recoverable TRYAGAIN is almost always due to buffer size issues
-+     and returns ERANGE in errno and the caller is expected to retry
-+     with a larger buffer.
-+
-+     Lastly, you may be tempted to make significant changes to the
-+     conditions in this code to bring about symmetry between responses.
-+     Please don't change anything without due consideration for
-+     expected application behaviour.  Some of the synthesized responses
-+     aren't very well thought out and sometimes appear to imply that
-+     IPv4 responses are always answer 1, and IPv6 responses are always
-+     answer 2, but that's not true (see the implementation of send_dg
-+     and send_vc to see response can arrive in any order, particularly
-+     for UDP). However, we expect it holds roughly enough of the time
-+     that this code works, but certainly needs to be fixed to make this
-+     a more robust implementation.
-+
-+     ----------------------------------------------
-+     | Answer 1 Status /   | Synthesized | Reason |
-+     | Answer 2 Status     | Status      |        |
-+     |--------------------------------------------|
-+     | SUCCESS/SUCCESS     | SUCCESS     | [1]    |
-+     | SUCCESS/TRYAGAIN    | TRYAGAIN    | [5]    |
-+     | SUCCESS/TRYAGAIN'   | SUCCESS     | [1]    |
-+     | SUCCESS/NOTFOUND    | SUCCESS     | [1]    |
-+     | SUCCESS/UNAVAIL     | SUCCESS     | [1]    |
-+     | TRYAGAIN/SUCCESS    | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/TRYAGAIN   | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/TRYAGAIN'  | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/NOTFOUND   | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/UNAVAIL    | TRYAGAIN    | [2]    |
-+     | TRYAGAIN'/SUCCESS   | SUCCESS     | [3]    |
-+     | TRYAGAIN'/TRYAGAIN  | TRYAGAIN    | [3]    |
-+     | TRYAGAIN'/TRYAGAIN' | TRYAGAIN'   | [3]    |
-+     | TRYAGAIN'/NOTFOUND  | TRYAGAIN'   | [3]    |
-+     | TRYAGAIN'/UNAVAIL   | UNAVAIL     | [3]    |
-+     | NOTFOUND/SUCCESS    | SUCCESS     | [3]    |
-+     | NOTFOUND/TRYAGAIN   | TRYAGAIN    | [3]    |
-+     | NOTFOUND/TRYAGAIN'  | TRYAGAIN'   | [3]    |
-+     | NOTFOUND/NOTFOUND   | NOTFOUND    | [3]    |
-+     | NOTFOUND/UNAVAIL    | UNAVAIL     | [3]    |
-+     | UNAVAIL/SUCCESS     | UNAVAIL     | [4]    |
-+     | UNAVAIL/TRYAGAIN    | UNAVAIL     | [4]    |
-+     | UNAVAIL/TRYAGAIN'   | UNAVAIL     | [4]    |
-+     | UNAVAIL/NOTFOUND    | UNAVAIL     | [4]    |
-+     | UNAVAIL/UNAVAIL     | UNAVAIL     | [4]    |
-+     ----------------------------------------------
-+
-+     [1] If the first response is a success we return success.
-+	 This ignores the state of the second answer and in fact
-+	 incorrectly sets errno and h_errno to that of the second
-+	 answer.  However because the response is a success we ignore
-+	 *errnop and *h_errnop (though that means you touched errno on
-+	 success).  We are being conservative here and returning the
-+	 likely IPv4 response in the first answer as a success.
-+
-+     [2] If the first response is a recoverable TRYAGAIN we return
-+	 that instead of looking at the second response.  The
-+	 expectation here is that we have failed to get an IPv4 response
-+	 and should retry both queries.
-+
-+     [3] If the first response was not a SUCCESS and the second
-+	 response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
-+	 or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
-+	 result from the second response, otherwise the first responses
-+	 status is used.  Again we have some odd side-effects when the
-+	 second response is NOTFOUND because we overwrite *errnop and
-+	 *h_errnop that means that a first answer of NOTFOUND might see
-+	 its *errnop and *h_errnop values altered.  Whether it matters
-+	 in practice that a first response NOTFOUND has the wrong
-+	 *errnop and *h_errnop is undecided.
-+
-+     [4] If the first response is UNAVAIL we return that instead of
-+	 looking at the second response.  The expectation here is that
-+	 it will have failed similarly e.g. configuration failure.
-+
-+     [5] Testing this code is complicated by the fact that truncated
-+	 second response buffers might be returned as SUCCESS if the
-+	 first answer is a SUCCESS.  To fix this we add symmetry to
-+	 TRYAGAIN with the second response.  If the second response
-+	 is a recoverable error we now return TRYAGIN even if the first
-+	 response was SUCCESS.  */
-+
-   if (anslen1 > 0)
-     status = gaih_getanswer_slice(answer1, anslen1, qname,
- 				  &pat, &buffer, &buflen,
- 				  errnop, h_errnop, ttlp,
- 				  &first);
-+
-   if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
-        || (status == NSS_STATUS_TRYAGAIN
- 	   /* We want to look at the second answer in case of an
-@@ -1242,8 +1342,15 @@ gaih_getanswer (const querybuf *answer1,
- 						     &pat, &buffer, &buflen,
- 						     errnop, h_errnop, ttlp,
- 						     &first);
-+      /* Use the second response status in some cases.  */
-       if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
- 	status = status2;
-+      /* Do not return a truncated second response (unless it was
-+	 unavoidable e.g. unrecoverable TRYAGAIN).  */
-+      if (status == NSS_STATUS_SUCCESS
-+	  && (status2 == NSS_STATUS_TRYAGAIN
-+	      && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
-+	status = NSS_STATUS_TRYAGAIN;
-     }
- 
-   return status;
-Index: glibc-2.22/resolv/res_query.c
-===================================================================
---- glibc-2.22.orig/resolv/res_query.c
-+++ glibc-2.22/resolv/res_query.c
-@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp,
- 		  {
- 		    free (*answerp2);
- 		    *answerp2 = NULL;
-+		    *nanswerp2 = 0;
- 		    *answerp2_malloced = 0;
- 		  }
- 	}
-@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp,
- 			  {
- 			    free (*answerp2);
- 			    *answerp2 = NULL;
-+			    *nanswerp2 = 0;
- 			    *answerp2_malloced = 0;
- 			  }
- 
-@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp,
- 	  {
- 	    free (*answerp2);
- 	    *answerp2 = NULL;
-+	    *nanswerp2 = 0;
- 	    *answerp2_malloced = 0;
- 	  }
- 	if (saved_herrno != -1)
-Index: glibc-2.22/resolv/res_send.c
-===================================================================
---- glibc-2.22.orig/resolv/res_send.c
-+++ glibc-2.22/resolv/res_send.c
-@@ -1,3 +1,20 @@
-+/* Copyright (C) 2016 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/>.  */
-+
- /*
-  * Copyright (c) 1985, 1989, 1993
-  *    The Regents of the University of California.  All rights reserved.
-@@ -363,6 +380,8 @@ __libc_res_nsend(res_state statp, const
- #ifdef USE_HOOKS
- 	if (__glibc_unlikely (statp->qhook || statp->rhook))       {
- 		if (anssiz < MAXPACKET && ansp) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *buf = malloc (MAXPACKET);
- 			if (buf == NULL)
- 				return (-1);
-@@ -638,6 +657,77 @@ get_nsaddr (res_state statp, int n)
-     return (struct sockaddr *) (void *) &statp->nsaddr_list[n];
- }
- 
-+/* The send_vc function is responsible for sending a DNS query over TCP
-+   to the nameserver numbered NS from the res_state STATP i.e.
-+   EXT(statp).nssocks[ns].  The function supports sending both IPv4 and
-+   IPv6 queries at the same serially on the same socket.
-+
-+   Please note that for TCP there is no way to disable sending both
-+   queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
-+   and sends the queries serially and waits for the result after each
-+   sent query.  This implemetnation should be corrected to honour these
-+   options.
-+
-+   Please also note that for TCP we send both queries over the same
-+   socket one after another.  This technically violates best practice
-+   since the server is allowed to read the first query, respond, and
-+   then close the socket (to service another client).  If the server
-+   does this, then the remaining second query in the socket data buffer
-+   will cause the server to send the client an RST which will arrive
-+   asynchronously and the client's OS will likely tear down the socket
-+   receive buffer resulting in a potentially short read and lost
-+   response data.  This will force the client to retry the query again,
-+   and this process may repeat until all servers and connection resets
-+   are exhausted and then the query will fail.  It's not known if this
-+   happens with any frequency in real DNS server implementations.  This
-+   implementation should be corrected to use two sockets by default for
-+   parallel queries.
-+
-+   The query stored in BUF of BUFLEN length is sent first followed by
-+   the query stored in BUF2 of BUFLEN2 length.  Queries are sent
-+   serially on the same socket.
-+
-+   Answers to the query are stored firstly in *ANSP up to a max of
-+   *ANSSIZP bytes.  If more than *ANSSIZP bytes are needed and ANSCP
-+   is non-NULL (to indicate that modifying the answer buffer is allowed)
-+   then malloc is used to allocate a new response buffer and ANSCP and
-+   ANSP will both point to the new buffer.  If more than *ANSSIZP bytes
-+   are needed but ANSCP is NULL, then as much of the response as
-+   possible is read into the buffer, but the results will be truncated.
-+   When truncation happens because of a small answer buffer the DNS
-+   packets header field TC will bet set to 1, indicating a truncated
-+   message and the rest of the socket data will be read and discarded.
-+
-+   Answers to the query are stored secondly in *ANSP2 up to a max of
-+   *ANSSIZP2 bytes, with the actual response length stored in
-+   *RESPLEN2.  If more than *ANSSIZP bytes are needed and ANSP2
-+   is non-NULL (required for a second query) then malloc is used to
-+   allocate a new response buffer, *ANSSIZP2 is set to the new buffer
-+   size and *ANSP2_MALLOCED is set to 1.
-+
-+   The ANSP2_MALLOCED argument will eventually be removed as the
-+   change in buffer pointer can be used to detect the buffer has
-+   changed and that the caller should use free on the new buffer.
-+
-+   Note that the answers may arrive in any order from the server and
-+   therefore the first and second answer buffers may not correspond to
-+   the first and second queries.
-+
-+   It is not supported to call this function with a non-NULL ANSP2
-+   but a NULL ANSCP.  Put another way, you can call send_vc with a
-+   single unmodifiable buffer or two modifiable buffers, but no other
-+   combination is supported.
-+
-+   It is the caller's responsibility to free the malloc allocated
-+   buffers by detecting that the pointers have changed from their
-+   original values i.e. *ANSCP or *ANSP2 has changed.
-+
-+   If errors are encountered then *TERRNO is set to an appropriate
-+   errno value and a zero result is returned for a recoverable error,
-+   and a less-than zero result is returned for a non-recoverable error.
-+
-+   If no errors are encountered then *TERRNO is left unmodified and
-+   a the length of the first response in bytes is returned.  */
- static int
- send_vc(res_state statp,
- 	const u_char *buf, int buflen, const u_char *buf2, int buflen2,
-@@ -647,11 +737,7 @@ send_vc(res_state statp,
- {
- 	const HEADER *hp = (HEADER *) buf;
- 	const HEADER *hp2 = (HEADER *) buf2;
--	u_char *ans = *ansp;
--	int orig_anssizp = *anssizp;
--	// XXX REMOVE
--	// int anssiz = *anssizp;
--	HEADER *anhp = (HEADER *) ans;
-+	HEADER *anhp = (HEADER *) *ansp;
- 	struct sockaddr *nsap = get_nsaddr (statp, ns);
- 	int truncating, connreset, n;
- 	/* On some architectures compiler might emit a warning indicating
-@@ -743,6 +829,8 @@ send_vc(res_state statp,
- 	 * Receive length & response
- 	 */
- 	int recvresp1 = 0;
-+	/* Skip the second response if there is no second query.
-+	   To do that we mark the second response as received.  */
- 	int recvresp2 = buf2 == NULL;
- 	uint16_t rlen16;
-  read_len:
-@@ -779,40 +867,14 @@ send_vc(res_state statp,
- 	u_char **thisansp;
- 	int *thisresplenp;
- 	if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
-+		/* We have not received any responses
-+		   yet or we only have one response to
-+		   receive.  */
- 		thisanssizp = anssizp;
- 		thisansp = anscp ?: ansp;
- 		assert (anscp != NULL || ansp2 == NULL);
- 		thisresplenp = &resplen;
- 	} else {
--		if (*anssizp != MAXPACKET) {
--			/* No buffer allocated for the first
--			   reply.  We can try to use the rest
--			   of the user-provided buffer.  */
--#if __GNUC_PREREQ (4, 7)
--			DIAG_PUSH_NEEDS_COMMENT;
--			DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
--#endif
--#if _STRING_ARCH_unaligned
--			*anssizp2 = orig_anssizp - resplen;
--			*ansp2 = *ansp + resplen;
--#else
--			int aligned_resplen
--			  = ((resplen + __alignof__ (HEADER) - 1)
--			     & ~(__alignof__ (HEADER) - 1));
--			*anssizp2 = orig_anssizp - aligned_resplen;
--			*ansp2 = *ansp + aligned_resplen;
--#endif
--#if __GNUC_PREREQ (4, 7)
--			DIAG_POP_NEEDS_COMMENT;
--#endif
--		} else {
--			/* The first reply did not fit into the
--			   user-provided buffer.  Maybe the second
--			   answer will.  */
--			*anssizp2 = orig_anssizp;
--			*ansp2 = *ansp;
--		}
--
- 		thisanssizp = anssizp2;
- 		thisansp = ansp2;
- 		thisresplenp = resplen2;
-@@ -820,10 +882,14 @@ send_vc(res_state statp,
- 	anhp = (HEADER *) *thisansp;
- 
- 	*thisresplenp = rlen;
--	if (rlen > *thisanssizp) {
--		/* Yes, we test ANSCP here.  If we have two buffers
--		   both will be allocatable.  */
--		if (__glibc_likely (anscp != NULL))       {
-+	/* Is the answer buffer too small?  */
-+	if (*thisanssizp < rlen) {
-+		/* If the current buffer is not the the static
-+		   user-supplied buffer then we can reallocate
-+		   it.  */
-+		if (thisansp != NULL && thisansp != ansp) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *newp = malloc (MAXPACKET);
- 			if (newp == NULL) {
- 				*terrno = ENOMEM;
-@@ -835,6 +901,9 @@ send_vc(res_state statp,
- 			if (thisansp == ansp2)
- 			  *ansp2_malloced = 1;
- 			anhp = (HEADER *) newp;
-+			/* A uint16_t can't be larger than MAXPACKET
-+			   thus it's safe to allocate MAXPACKET but
-+			   read RLEN bytes instead.  */
- 			len = rlen;
- 		} else {
- 			Dprint(statp->options & RES_DEBUG,
-@@ -997,6 +1066,66 @@ reopen (res_state statp, int *terrno, in
- 	return 1;
- }
- 
-+/* The send_dg function is responsible for sending a DNS query over UDP
-+   to the nameserver numbered NS from the res_state STATP i.e.
-+   EXT(statp).nssocks[ns].  The function supports IPv4 and IPv6 queries
-+   along with the ability to send the query in parallel for both stacks
-+   (default) or serially (RES_SINGLKUP).  It also supports serial lookup
-+   with a close and reopen of the socket used to talk to the server
-+   (RES_SNGLKUPREOP) to work around broken name servers.
-+
-+   The query stored in BUF of BUFLEN length is sent first followed by
-+   the query stored in BUF2 of BUFLEN2 length.  Queries are sent
-+   in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
-+
-+   Answers to the query are stored firstly in *ANSP up to a max of
-+   *ANSSIZP bytes.  If more than *ANSSIZP bytes are needed and ANSCP
-+   is non-NULL (to indicate that modifying the answer buffer is allowed)
-+   then malloc is used to allocate a new response buffer and ANSCP and
-+   ANSP will both point to the new buffer.  If more than *ANSSIZP bytes
-+   are needed but ANSCP is NULL, then as much of the response as
-+   possible is read into the buffer, but the results will be truncated.
-+   When truncation happens because of a small answer buffer the DNS
-+   packets header field TC will bet set to 1, indicating a truncated
-+   message, while the rest of the UDP packet is discarded.
-+
-+   Answers to the query are stored secondly in *ANSP2 up to a max of
-+   *ANSSIZP2 bytes, with the actual response length stored in
-+   *RESPLEN2.  If more than *ANSSIZP bytes are needed and ANSP2
-+   is non-NULL (required for a second query) then malloc is used to
-+   allocate a new response buffer, *ANSSIZP2 is set to the new buffer
-+   size and *ANSP2_MALLOCED is set to 1.
-+
-+   The ANSP2_MALLOCED argument will eventually be removed as the
-+   change in buffer pointer can be used to detect the buffer has
-+   changed and that the caller should use free on the new buffer.
-+
-+   Note that the answers may arrive in any order from the server and
-+   therefore the first and second answer buffers may not correspond to
-+   the first and second queries.
-+
-+   It is not supported to call this function with a non-NULL ANSP2
-+   but a NULL ANSCP.  Put another way, you can call send_vc with a
-+   single unmodifiable buffer or two modifiable buffers, but no other
-+   combination is supported.
-+
-+   It is the caller's responsibility to free the malloc allocated
-+   buffers by detecting that the pointers have changed from their
-+   original values i.e. *ANSCP or *ANSP2 has changed.
-+
-+   If an answer is truncated because of UDP datagram DNS limits then
-+   *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
-+   the caller to retry with TCP.  The value *GOTSOMEWHERE is set to 1
-+   if any progress was made reading a response from the nameserver and
-+   is used by the caller to distinguish between ECONNREFUSED and
-+   ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
-+
-+   If errors are encountered then *TERRNO is set to an appropriate
-+   errno value and a zero result is returned for a recoverable error,
-+   and a less-than zero result is returned for a non-recoverable error.
-+
-+   If no errors are encountered then *TERRNO is left unmodified and
-+   a the length of the first response in bytes is returned.  */
- static int
- send_dg(res_state statp,
- 	const u_char *buf, int buflen, const u_char *buf2, int buflen2,
-@@ -1006,8 +1135,6 @@ send_dg(res_state statp,
- {
- 	const HEADER *hp = (HEADER *) buf;
- 	const HEADER *hp2 = (HEADER *) buf2;
--	u_char *ans = *ansp;
--	int orig_anssizp = *anssizp;
- 	struct timespec now, timeout, finish;
- 	struct pollfd pfd[1];
- 	int ptimeout;
-@@ -1040,6 +1167,8 @@ send_dg(res_state statp,
- 	int need_recompute = 0;
- 	int nwritten = 0;
- 	int recvresp1 = 0;
-+	/* Skip the second response if there is no second query.
-+	   To do that we mark the second response as received.  */
- 	int recvresp2 = buf2 == NULL;
- 	pfd[0].fd = EXT(statp).nssocks[ns];
- 	pfd[0].events = POLLOUT;
-@@ -1203,55 +1332,56 @@ send_dg(res_state statp,
- 		int *thisresplenp;
- 
- 		if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
-+			/* We have not received any responses
-+			   yet or we only have one response to
-+			   receive.  */
- 			thisanssizp = anssizp;
- 			thisansp = anscp ?: ansp;
- 			assert (anscp != NULL || ansp2 == NULL);
- 			thisresplenp = &resplen;
- 		} else {
--			if (*anssizp != MAXPACKET) {
--				/* No buffer allocated for the first
--				   reply.  We can try to use the rest
--				   of the user-provided buffer.  */
--#if _STRING_ARCH_unaligned
--				*anssizp2 = orig_anssizp - resplen;
--				*ansp2 = *ansp + resplen;
--#else
--				int aligned_resplen
--				  = ((resplen + __alignof__ (HEADER) - 1)
--				     & ~(__alignof__ (HEADER) - 1));
--				*anssizp2 = orig_anssizp - aligned_resplen;
--				*ansp2 = *ansp + aligned_resplen;
--#endif
--			} else {
--				/* The first reply did not fit into the
--				   user-provided buffer.  Maybe the second
--				   answer will.  */
--				*anssizp2 = orig_anssizp;
--				*ansp2 = *ansp;
--			}
--
- 			thisanssizp = anssizp2;
- 			thisansp = ansp2;
- 			thisresplenp = resplen2;
- 		}
- 
- 		if (*thisanssizp < MAXPACKET
--		    /* Yes, we test ANSCP here.  If we have two buffers
--		       both will be allocatable.  */
--		    && anscp
-+		    /* If the current buffer is not the the static
-+		       user-supplied buffer then we can reallocate
-+		       it.  */
-+		    && (thisansp != NULL && thisansp != ansp)
- #ifdef FIONREAD
-+		    /* Is the size too small?  */
- 		    && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
- 			|| *thisanssizp < *thisresplenp)
- #endif
-                     ) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *newp = malloc (MAXPACKET);
- 			if (newp != NULL) {
--				*anssizp = MAXPACKET;
--				*thisansp = ans = newp;
-+				*thisanssizp = MAXPACKET;
-+				*thisansp = newp;
- 				if (thisansp == ansp2)
- 				  *ansp2_malloced = 1;
- 			}
- 		}
-+		/* We could end up with truncation if anscp was NULL
-+		   (not allowed to change caller's buffer) and the
-+		   response buffer size is too small.  This isn't a
-+		   reliable way to detect truncation because the ioctl
-+		   may be an inaccurate report of the UDP message size.
-+		   Therefore we use this only to issue debug output.
-+		   To do truncation accurately with UDP we need
-+		   MSG_TRUNC which is only available on Linux.  We
-+		   can abstract out the Linux-specific feature in the
-+		   future to detect truncation.  */
-+		if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
-+			Dprint(statp->options & RES_DEBUG,
-+			       (stdout, ";; response may be truncated (UDP)\n")
-+			);
-+		}
-+
- 		HEADER *anhp = (HEADER *) *thisansp;
- 		socklen_t fromlen = sizeof(struct sockaddr_in6);
- 		assert (sizeof(from) <= fromlen);
diff --git a/static-dlopen.patch b/static-dlopen.patch
deleted file mode 100644
index 728598b..0000000
--- a/static-dlopen.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-2015-08-04  Maciej W. Rozycki  <macro@linux-mips.org>
-
-	[BZ #17250]
-	* elf/dl-support.c (_dl_main_map): Don't initialize l_flags_1
-	member.
-
-Index: glibc-2.22/elf/dl-support.c
-===================================================================
---- glibc-2.22.orig/elf/dl-support.c
-+++ glibc-2.22/elf/dl-support.c
-@@ -91,7 +91,6 @@ static struct link_map _dl_main_map =
-     .l_scope = _dl_main_map.l_scope_mem,
-     .l_local_scope = { &_dl_main_map.l_searchlist },
-     .l_used = 1,
--    .l_flags_1 = DF_1_NODEFLIB,
-     .l_tls_offset = NO_TLS_OFFSET,
-     .l_serial = 1,
-   };
diff --git a/strcoll-remove-strdiff-opt.patch b/strcoll-remove-strdiff-opt.patch
deleted file mode 100644
index 832258c..0000000
--- a/strcoll-remove-strdiff-opt.patch
+++ /dev/null
@@ -1,366 +0,0 @@
-2015-10-09  Carlos O'Donell  <carlos@redhat.com>
-
-	[BZ #18589]
-	* string/bug-strcoll2.c: Adjust copyright, and remove contributed by.
-	* string/Makefile ($(objpfx)bug-strcoll2.out): Depend on
-	$(gen-locales).
-
-2015-10-08  Carlos O'Donell  <carlos@redhat.com>
-
-	[BZ #18589]
-	* string/Makefile (tests): Add bug-strcoll2.
-	(LOCALES): Add cs_CZ.UTF-8.
-
-2015-09-28  Martin Sebor  <msebor@redhat.com>
-
-	[BZ #18969]
-	* string/Makefile (LOCALES): Define.
-	(gen-locales.mk): Include.
-	(test-strcasecmp.out, test-strncasecmp.out, tst-strxfrm.out)
-	(tst-strxfrm2.out): Add deppendency on $(gen-locales).
-	* string/tst-strxfrm2.c (do_test): Print the name of the locale
-	on setlocale failure.
-
-2015-10-08  Carlos O'Donell  <carlos@redhat.com>
-
-	[BZ #18589]
-	* string/bug-strcoll2.c: New file.
-	* locale/categories.def: Revert commit
-	f13c2a8dff2329c6692a80176262ceaaf8a6f74e.
-	* locale/langinfo.h: Likewise.
-	* locale/localeinfo.h: Likewise.
-	* locale/C-collate.c: Likewise.
-	* programs/ld-collate.c (collate_output): Likewise.
-	* string/strcoll_l.c (STRDIFF): Likewise.
-	(STRCOLL): Likewise.
-	* wcsmbs/wcscoll_l.c: Likewise.
-
-Index: glibc-2.22/locale/C-collate.c
-===================================================================
---- glibc-2.22.orig/locale/C-collate.c
-+++ glibc-2.22/locale/C-collate.c
-@@ -144,8 +144,6 @@ const struct __locale_data _nl_C_LC_COLL
-     /* _NL_COLLATE_COLLSEQWC */
-     { .string = (const char *) collseqwc },
-     /* _NL_COLLATE_CODESET */
--    { .string = _nl_C_codeset },
--    /* _NL_COLLATE_ENCODING_TYPE */
--    { .word = __cet_8bit }
-+    { .string = _nl_C_codeset }
-   }
- };
-Index: glibc-2.22/locale/categories.def
-===================================================================
---- glibc-2.22.orig/locale/categories.def
-+++ glibc-2.22/locale/categories.def
-@@ -58,7 +58,6 @@ DEFINE_CATEGORY
-   DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB,        "collate-collseqmb",        std, wstring)
-   DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC,        "collate-collseqwc",        std, wstring)
-   DEFINE_ELEMENT (_NL_COLLATE_CODESET,		"collate-codeset",	    std, string)
--  DEFINE_ELEMENT (_NL_COLLATE_ENCODING_TYPE,   "collate-encoding-type",    std, word)
-   ), NO_POSTLOAD)
- 
- 
-Index: glibc-2.22/locale/langinfo.h
-===================================================================
---- glibc-2.22.orig/locale/langinfo.h
-+++ glibc-2.22/locale/langinfo.h
-@@ -255,7 +255,6 @@ enum
-   _NL_COLLATE_COLLSEQMB,
-   _NL_COLLATE_COLLSEQWC,
-   _NL_COLLATE_CODESET,
--  _NL_COLLATE_ENCODING_TYPE,
-   _NL_NUM_LC_COLLATE,
- 
-   /* LC_CTYPE category: character classification.
-Index: glibc-2.22/locale/localeinfo.h
-===================================================================
---- glibc-2.22.orig/locale/localeinfo.h
-+++ glibc-2.22/locale/localeinfo.h
-@@ -110,14 +110,6 @@ enum coll_sort_rule
-   sort_mask
- };
- 
--/* Collation encoding type.  */
--enum collation_encoding_type
--{
--  __cet_other,
--  __cet_8bit,
--  __cet_utf8
--};
--
- /* We can map the types of the entries into a few categories.  */
- enum value_type
- {
-Index: glibc-2.22/locale/programs/ld-collate.c
-===================================================================
---- glibc-2.22.orig/locale/programs/ld-collate.c
-+++ glibc-2.22/locale/programs/ld-collate.c
-@@ -32,7 +32,6 @@
- #include "linereader.h"
- #include "locfile.h"
- #include "elem-hash.h"
--#include "../localeinfo.h"
- 
- /* Uncomment the following line in the production version.  */
- /* #define NDEBUG 1 */
-@@ -2131,8 +2130,6 @@ collate_output (struct localedef_t *loca
- 	  /* The words have to be handled specially.  */
- 	  if (idx == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_HASH_SIZEMB))
- 	    add_locale_uint32 (&file, 0);
--	  else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE))
--	    add_locale_uint32 (&file, __cet_other);
- 	  else
- 	    add_locale_empty (&file);
- 	}
-@@ -2496,12 +2493,6 @@ collate_output (struct localedef_t *loca
-   add_locale_raw_data (&file, collate->mbseqorder, 256);
-   add_locale_collseq_table (&file, &collate->wcseqorder);
-   add_locale_string (&file, charmap->code_set_name);
--  if (strcmp (charmap->code_set_name, "UTF-8") == 0)
--    add_locale_uint32 (&file, __cet_utf8);
--  else if (charmap->mb_cur_max == 1)
--    add_locale_uint32 (&file, __cet_8bit);
--  else
--    add_locale_uint32 (&file, __cet_other);
-   write_locale_data (output_path, LC_COLLATE, "LC_COLLATE", &file);
- 
-   obstack_free (&weightpool, NULL);
-Index: glibc-2.22/string/Makefile
-===================================================================
---- glibc-2.22.orig/string/Makefile
-+++ glibc-2.22/string/Makefile
-@@ -54,7 +54,7 @@ tests		:= tester inl-tester noinl-tester
- 		   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry	\
- 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
- 		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\
--		   tst-strtok_r
-+		   tst-strtok_r bug-strcoll2
- 
- xtests = tst-strcoll-overflow
- 
-@@ -75,4 +75,17 @@ ifeq ($(run-built-tests),yes)
- $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
- 	cmp $^ > $@; \
- 	$(evaluate-test)
-+
-+LOCALES := de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 \
-+           tr_TR.ISO-8859-9 tr_TR.UTF-8 cs_CZ.UTF-8 \
-+	   da_DK.ISO-8859-1
-+include ../gen-locales.mk
-+
-+$(objpfx)test-strcasecmp.out: $(gen-locales)
-+$(objpfx)test-strncasecmp.out: $(gen-locales)
-+$(objpfx)tst-strxfrm.out: $(gen-locales)
-+$(objpfx)tst-strxfrm2.out: $(gen-locales)
-+# bug-strcoll2 needs cs_CZ.UTF-8 and da_DK.ISO-8859-1.
-+$(objpfx)bug-strcoll2.out: $(gen-locales)
-+
- endif
-Index: glibc-2.22/string/bug-strcoll2.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/string/bug-strcoll2.c
-@@ -0,0 +1,92 @@
-+/* Bug 18589: sort-test.sh fails at random.
-+   Copyright (C) 2015 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 <stdio.h>
-+#include <string.h>
-+#include <locale.h>
-+
-+/* An incorrect strcoll optimization resulted in incorrect
-+   results from strcoll for cs_CZ and da_DK.  */
-+
-+int
-+test_cs_CZ (void)
-+{
-+  const char t1[] = "config";
-+  const char t2[] = "choose";
-+  if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
-+    {
-+      perror ("setlocale");
-+      return 1;
-+    }
-+  /* In Czech the digraph ch sorts after c, therefore we expect
-+     config to sort before choose.  */
-+  int a = strcoll (t1, t2);
-+  int b = strcoll (t2, t1);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
-+  if (a < 0 && b > 0)
-+    {
-+      puts ("PASS: config < choose");
-+      return 0;
-+    }
-+  else
-+    {
-+      puts ("FAIL: Wrong sorting in cs_CZ.UTF-8.");
-+      return 1;
-+    }
-+}
-+
-+int
-+test_da_DK (void)
-+{
-+  const char t1[] = "AS";
-+  const char t2[] = "AA";
-+  if (setlocale (LC_ALL, "da_DK.ISO-8859-1") == NULL)
-+    {
-+      perror ("setlocale");
-+      return 1;
-+    }
-+  /* AA should be treated as the last letter of the Danish alphabet,
-+     hence sorting after AS.  */
-+  int a = strcoll (t1, t2);
-+  int b = strcoll (t2, t1);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
-+  if (a < 0 && b > 0)
-+    {
-+      puts ("PASS: AS < AA");
-+      return 0;
-+    }
-+  else
-+    {
-+      puts ("FAIL: Wrong sorting in da_DK.ISO-8859-1");
-+      return 1;
-+    }
-+}
-+
-+static int
-+do_test (void)
-+{
-+  int err = 0;
-+  err |= test_cs_CZ ();
-+  err |= test_da_DK ();
-+  return err;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: glibc-2.22/string/strcoll_l.c
-===================================================================
---- glibc-2.22.orig/string/strcoll_l.c
-+++ glibc-2.22/string/strcoll_l.c
-@@ -29,7 +29,6 @@
- # define STRING_TYPE char
- # define USTRING_TYPE unsigned char
- # define STRCOLL __strcoll_l
--# define STRDIFF __strdiff
- # define STRCMP strcmp
- # define WEIGHT_H "../locale/weight.h"
- # define SUFFIX	MB
-@@ -42,20 +41,6 @@
- #include "../locale/localeinfo.h"
- #include WEIGHT_H
- 
--#define MASK_UTF8_7BIT  (1 << 7)
--#define MASK_UTF8_START (3 << 6)
--
--size_t
--STRDIFF (const STRING_TYPE *s, const STRING_TYPE *t)
--{
--  size_t n;
--
--  for (n = 0; *s != '\0' && *s++ == *t++; ++n)
--    continue;
--
--  return n;
--}
--
- /* Track status while looking for sequences in a string.  */
- typedef struct
- {
-@@ -269,29 +254,9 @@ STRCOLL (const STRING_TYPE *s1, const ST
-   const USTRING_TYPE *extra;
-   const int32_t *indirect;
- 
--  /* In case there is no locale specific sort order (C / POSIX).  */
-   if (nrules == 0)
-     return STRCMP (s1, s2);
- 
--  /* Fast forward to the position of the first difference.  Needs to be
--     encoding aware as the byte-by-byte comparison can stop in the middle
--     of a char sequence for multibyte encodings like UTF-8.  */
--  uint_fast32_t encoding =
--    current->values[_NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE)].word;
--  if (encoding != __cet_other)
--    {
--      size_t diff = STRDIFF (s1, s2);
--      if (diff > 0)
--	{
--	  if (encoding == __cet_utf8 && (*(s1 + diff) & MASK_UTF8_7BIT) != 0)
--	    do
--	      diff--;
--	    while (diff > 0 && (*(s1 + diff) & MASK_UTF8_START) != MASK_UTF8_START);
--	  s1 += diff;
--	  s2 += diff;
--	}
--    }
--
-   /* Catch empty strings.  */
-   if (__glibc_unlikely (*s1 == '\0') || __glibc_unlikely (*s2 == '\0'))
-     return (*s1 != '\0') - (*s2 != '\0');
-@@ -358,8 +323,7 @@ STRCOLL (const STRING_TYPE *s1, const ST
- 		     byte-level comparison to ensure that we don't waste time
- 		     going through multiple passes for totally equal strings
- 		     before proceeding to subsequent passes.  */
--		  if (pass == 0 && encoding == __cet_other &&
--		      STRCMP (s1, s2) == 0)
-+		  if (pass == 0 && STRCMP (s1, s2) == 0)
- 		    return result;
- 		  else
- 		    break;
-Index: glibc-2.22/string/tst-strxfrm2.c
-===================================================================
---- glibc-2.22.orig/string/tst-strxfrm2.c
-+++ glibc-2.22/string/tst-strxfrm2.c
-@@ -5,6 +5,8 @@
- static int
- do_test (void)
- {
-+  static const char test_locale[] = "de_DE.UTF-8";
-+
-   int res = 0;
- 
-   char buf[20];
-@@ -38,9 +40,9 @@ do_test (void)
-       res = 1;
-     }
- 
--  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
-+  if (setlocale (LC_ALL, test_locale) == NULL)
-     {
--      puts ("setlocale failed");
-+      printf ("cannot set locale \"%s\"\n", test_locale);
-       res = 1;
-     }
-   else
-Index: glibc-2.22/wcsmbs/wcscoll_l.c
-===================================================================
---- glibc-2.22.orig/wcsmbs/wcscoll_l.c
-+++ glibc-2.22/wcsmbs/wcscoll_l.c
-@@ -23,7 +23,6 @@
- #define STRING_TYPE wchar_t
- #define USTRING_TYPE wint_t
- #define STRCOLL __wcscoll_l
--#define STRDIFF __wcsdiff
- #define STRCMP __wcscmp
- #define WEIGHT_H "../locale/weightwc.h"
- #define SUFFIX	WC
diff --git a/strftime-range-check.patch b/strftime-range-check.patch
deleted file mode 100644
index 27ff3d2..0000000
--- a/strftime-range-check.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-2015-09-26  Paul Pluzhnikov  <ppluzhnikov@google.com>
-
-	[BZ #18985]
-	* time/strftime_l.c (a_wkday, f_wkday, a_month, f_month): Range check.
-	(__strftime_internal): Likewise.
-	* time/tst-strftime.c (do_bz18985): New test.
-	(do_test): Call it.
-
-Index: glibc-2.22/time/strftime_l.c
-===================================================================
---- glibc-2.22.orig/time/strftime_l.c
-+++ glibc-2.22/time/strftime_l.c
-@@ -510,13 +510,17 @@ __strftime_internal (s, maxsize, format,
-      only a few elements.  Dereference the pointers only if the format
-      requires this.  Then it is ok to fail if the pointers are invalid.  */
- # define a_wkday \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))
-+  ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)))
- # define f_wkday \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))
-+  ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)))
- # define a_month \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))
-+  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)))
- # define f_month \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))
-+  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
- # define ampm \
-   ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11		      \
- 				 ? NLW(PM_STR) : NLW(AM_STR)))
-@@ -526,8 +530,10 @@ __strftime_internal (s, maxsize, format,
- # define ap_len STRLEN (ampm)
- #else
- # if !HAVE_STRFTIME
--#  define f_wkday (weekday_name[tp->tm_wday])
--#  define f_month (month_name[tp->tm_mon])
-+#  define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6	\
-+		   ? "?" : weekday_name[tp->tm_wday])
-+#  define f_month (tp->tm_mon < 0 || tp->tm_mon > 11	\
-+		   ? "?" : month_name[tp->tm_mon])
- #  define a_wkday f_wkday
- #  define a_month f_month
- #  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
-@@ -1321,7 +1327,7 @@ __strftime_internal (s, maxsize, format,
- 		  *tzset_called = true;
- 		}
- # endif
--	      zone = tzname[tp->tm_isdst];
-+	      zone = tp->tm_isdst <= 1 ? tzname[tp->tm_isdst] : "?";
- 	    }
- #endif
- 	  if (! zone)
-Index: glibc-2.22/time/tst-strftime.c
-===================================================================
---- glibc-2.22.orig/time/tst-strftime.c
-+++ glibc-2.22/time/tst-strftime.c
-@@ -4,6 +4,56 @@
- #include <time.h>
- 
- 
-+static int
-+do_bz18985 (void)
-+{
-+  char buf[1000];
-+  struct tm ttm;
-+  int rc, ret = 0;
-+
-+  memset (&ttm, 1, sizeof (ttm));
-+  ttm.tm_zone = NULL;  /* Dereferenced directly if non-NULL.  */
-+  rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
-+
-+  if (rc == 66)
-+    {
-+      const char expected[]
-+	= "? ? ? ? ? ? 16843009 16843009:16843009:16843009 16844909 +467836 ?";
-+      if (0 != strcmp (buf, expected))
-+	{
-+	  printf ("expected:\n  %s\ngot:\n  %s\n", expected, buf);
-+	  ret += 1;
-+	}
-+    }
-+  else
-+    {
-+      printf ("expected 66, got %d\n", rc);
-+      ret += 1;
-+    }
-+
-+  /* Check negative values as well.  */
-+  memset (&ttm, 0xFF, sizeof (ttm));
-+  ttm.tm_zone = NULL;  /* Dereferenced directly if non-NULL.  */
-+  rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
-+
-+  if (rc == 30)
-+    {
-+      const char expected[] = "? ? ? ? ? ? -1 -1:-1:-1 1899  ";
-+      if (0 != strcmp (buf, expected))
-+	{
-+	  printf ("expected:\n  %s\ngot:\n  %s\n", expected, buf);
-+	  ret += 1;
-+	}
-+    }
-+  else
-+    {
-+      printf ("expected 30, got %d\n", rc);
-+      ret += 1;
-+    }
-+
-+  return ret;
-+}
-+
- static struct
- {
-   const char *fmt;
-@@ -104,7 +154,7 @@ do_test (void)
- 	}
-     }
- 
--  return result;
-+  return result + do_bz18985 ();
- }
- 
- #define TEST_FUNCTION do_test ()
diff --git a/tls-dtor-list-mangling.patch b/tls-dtor-list-mangling.patch
deleted file mode 100644
index 302eaa2..0000000
--- a/tls-dtor-list-mangling.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-2015-10-06  Florian Weimer  <fweimer@redhat.com>
-
-	[BZ #19018]
-	* stdlib/cxa_thread_atexit_impl.c (__cxa_thread_atexit_impl):
-	Mangle function pointer before storing it.
-	(__call_tls_dtors): Demangle function pointer before calling it.
-
-Index: glibc-2.22/stdlib/cxa_thread_atexit_impl.c
-===================================================================
---- glibc-2.22.orig/stdlib/cxa_thread_atexit_impl.c
-+++ glibc-2.22/stdlib/cxa_thread_atexit_impl.c
-@@ -98,6 +98,10 @@ static __thread struct link_map *lm_cach
- int
- __cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol)
- {
-+#ifdef PTR_MANGLE
-+  PTR_MANGLE (func);
-+#endif
-+
-   /* Prepend.  */
-   struct dtor_list *new = calloc (1, sizeof (struct dtor_list));
-   new->func = func;
-@@ -142,9 +146,13 @@ __call_tls_dtors (void)
-   while (tls_dtor_list)
-     {
-       struct dtor_list *cur = tls_dtor_list;
-+      dtor_func func = cur->func;
-+#ifdef PTR_DEMANGLE
-+      PTR_DEMANGLE (func);
-+#endif
- 
-       tls_dtor_list = tls_dtor_list->next;
--      cur->func (cur->obj);
-+      func (cur->obj);
- 
-       /* Ensure that the MAP dereference happens before
- 	 l_tls_dtor_count decrement.  That way, we protect this access from a
diff --git a/tzset-tzname.patch b/tzset-tzname.patch
deleted file mode 100644
index 72b045c..0000000
--- a/tzset-tzname.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-Force rereading TZDEFRULES after it was used to set DST rules only (bug #19253)
-
-If the TZDEFRULES file was used to set the DST rules when $TZ didn't
-provide any we need to make sure that the next time it is used we
-recompute everything as __tzfile_default changes some setting from what is
-provided by TZDEFRULES.
-
-	[BZ #19253]
-	* time/tzfile.c (__tzfile_default): Invalidate tzfile attribute
-	cache when TZDEFRULES was used.
-	* time/tst-tzname.c: New file.
-	* time/Makefile (test): Add tst-tzname.
-	(tst-tzname-ENV, CFLAGS-tst-tzname.c): Define.
-	* timezone/Makefile (test-zones): Add $(posixrules-file).
-	($(testdata)/$(posixrules-file)): New rule.
-
-Index: glibc-2.22/time/Makefile
-===================================================================
---- glibc-2.22.orig/time/Makefile
-+++ glibc-2.22/time/Makefile
-@@ -37,7 +37,8 @@ aux :=	    era alt_digit lc-time-cleanup
- tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
- 	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
- 	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
--	   tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime
-+	   tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \
-+	   tst-tzname
- 
- include ../Rules
- 
-@@ -55,4 +56,7 @@ CFLAGS-test_time.c = -Wno-format
- tst-getdate-ENV= DATEMSK=datemsk TZDIR=${common-objpfx}timezone/testdata
- test_time-ARGS= EST5EDT CST
- 
-+tst-tzname-ENV = TZDIR=${common-objpfx}timezone/testdata
-+CFLAGS-tst-tzname.c = -DTZDEFRULES='"$(posixrules-file)"'
-+
- bug-getdate1-ARGS = ${objpfx}bug-getdate1-fmt
-Index: glibc-2.22/time/tst-tzname.c
-===================================================================
---- /dev/null
-+++ glibc-2.22/time/tst-tzname.c
-@@ -0,0 +1,50 @@
-+/* Test that tzset sets tzname correctly (BZ #19253).
-+   Copyright (C) 2015 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 <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <time.h>
-+
-+static int
-+do_test (void)
-+{
-+  int result = 0;
-+
-+  setenv ("TZ", TZDEFRULES, 1);
-+  tzset ();
-+  const char *stdtz = strdup (tzname[0]);
-+  setenv ("TZ", "STD-1DST", 1);
-+  tzset ();
-+  if (strcmp (tzname[0], "STD") != 0)
-+    {
-+      printf ("FAIL: TZ=STD-1DST, tzname[0] = %s\n", tzname[0]);
-+      result = 1;
-+    }
-+  setenv ("TZ", TZDEFRULES, 1);
-+  tzset ();
-+  if (strcmp (tzname[0], stdtz) != 0)
-+    {
-+      printf ("FAIL: TZ=%s, tzname[0] = %s\n", TZDEFRULES, tzname[0]);
-+      result = 1;
-+    }
-+  return result;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: glibc-2.22/time/tzfile.c
-===================================================================
---- glibc-2.22.orig/time/tzfile.c
-+++ glibc-2.22/time/tzfile.c
-@@ -628,6 +628,12 @@ __tzfile_default (const char *std, const
-   __timezone = -types[0].offset;
- 
-   compute_tzname_max (stdlen + dstlen);
-+
-+  /* Invalidate the tzfile attribute cache to force rereading
-+     TZDEFRULES the next time it is used.  */
-+  tzfile_dev = 0;
-+  tzfile_ino = 0;
-+  tzfile_mtime = 0;
- }
- 
- void
-Index: glibc-2.22/timezone/Makefile
-===================================================================
---- glibc-2.22.orig/timezone/Makefile
-+++ glibc-2.22/timezone/Makefile
-@@ -49,7 +49,8 @@ ifeq ($(run-built-tests),yes)
- # List zones generated by separate commands running zic on the host.
- # Each such zic run counts as a separate test.
- test-zones := America/New_York Etc/UTC UTC Europe/Berlin \
--	      Australia/Melbourne America/Sao_Paulo Asia/Tokyo
-+	      Australia/Melbourne America/Sao_Paulo Asia/Tokyo \
-+	      $(posixrules-file)
- tests-special += $(addprefix $(testdata)/, $(test-zones))
- endif
- 
-@@ -101,6 +102,8 @@ zic-deps = $(objpfx)zic $(leapseconds) y
- 
- $(testdata)/America/New_York: northamerica $(zic-deps)
- 	$(build-testdata)
-+$(testdata)/$(posixrules-file): $(testdata)/America/New_York
-+	$(make-link); $(evaluate-test)
- $(testdata)/Etc/UTC: etcetera $(zic-deps)
- 	$(build-testdata)
- # Use a pattern rule to indicate the command produces both targets at once.
diff --git a/vector-finite-math-aliases.patch b/vector-finite-math-aliases.patch
deleted file mode 100644
index 602a884..0000000
--- a/vector-finite-math-aliases.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-2015-12-03  Andrew Senkevich  <andrew.senkevich@intel.com>
-
-	* math/Makefile ($(inst_libdir)/libm.so): Corrected path to
-	libmvec_nonshared.a
-
-2015-11-27  Andrew Senkevich  <andrew.senkevich@intel.com>
-
-	[BZ #19058]
-	* math/Makefile ($(inst_libdir)/libm.so): Added libmvec_nonshared.a to
-	AS_NEEDED.
-	* sysdeps/x86/fpu/bits/math-vector.h: Removed code with asm aliases
-	workaround.
-	* sysdeps/x86_64/fpu/Makefile (libmvec-support,
-	libmvec-static-only-routines): Added new file.
-	* sysdeps/x86_64/fpu/svml_finite_alias.S: New file.
-	* NEWS: Mention this fix.
-
-Index: glibc-2.22/math/Makefile
-===================================================================
---- glibc-2.22.orig/math/Makefile
-+++ glibc-2.22/math/Makefile
-@@ -98,7 +98,7 @@ $(inst_libdir)/libm.so: $(common-objpfx)
- 	(echo '/* GNU ld script'; echo '*/';\
- 	 cat $<; \
- 	 echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \
--	      'AS_NEEDED ( $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
-+	      'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
- 	) > $@
- endif
- 
-Index: glibc-2.22/sysdeps/x86/fpu/bits/math-vector.h
-===================================================================
---- glibc-2.22.orig/sysdeps/x86/fpu/bits/math-vector.h
-+++ glibc-2.22/sysdeps/x86/fpu/bits/math-vector.h
-@@ -53,34 +53,5 @@
- #  undef __DECL_SIMD_powf
- #  define __DECL_SIMD_powf __DECL_SIMD_x86_64
- 
--/* Workaround to exclude unnecessary symbol aliases in libmvec
--   while GCC creates the vector names based on scalar asm name.
--   Corresponding discussion started at
--   <https://gcc.gnu.org/ml/gcc/2015-06/msg00173.html>.  */
--__asm__ ("_ZGVbN2v___log_finite = _ZGVbN2v_log");
--__asm__ ("_ZGVcN4v___log_finite = _ZGVcN4v_log");
--__asm__ ("_ZGVdN4v___log_finite = _ZGVdN4v_log");
--__asm__ ("_ZGVeN8v___log_finite = _ZGVeN8v_log");
--__asm__ ("_ZGVbN4v___logf_finite = _ZGVbN4v_logf");
--__asm__ ("_ZGVcN8v___logf_finite = _ZGVcN8v_logf");
--__asm__ ("_ZGVdN8v___logf_finite = _ZGVdN8v_logf");
--__asm__ ("_ZGVeN16v___logf_finite = _ZGVeN16v_logf");
--__asm__ ("_ZGVbN2v___exp_finite = _ZGVbN2v_exp");
--__asm__ ("_ZGVcN4v___exp_finite = _ZGVcN4v_exp");
--__asm__ ("_ZGVdN4v___exp_finite = _ZGVdN4v_exp");
--__asm__ ("_ZGVeN8v___exp_finite = _ZGVeN8v_exp");
--__asm__ ("_ZGVbN4v___expf_finite = _ZGVbN4v_expf");
--__asm__ ("_ZGVcN8v___expf_finite = _ZGVcN8v_expf");
--__asm__ ("_ZGVdN8v___expf_finite = _ZGVdN8v_expf");
--__asm__ ("_ZGVeN16v___expf_finite = _ZGVeN16v_expf");
--__asm__ ("_ZGVbN2vv___pow_finite = _ZGVbN2vv_pow");
--__asm__ ("_ZGVcN4vv___pow_finite = _ZGVcN4vv_pow");
--__asm__ ("_ZGVdN4vv___pow_finite = _ZGVdN4vv_pow");
--__asm__ ("_ZGVeN8vv___pow_finite = _ZGVeN8vv_pow");
--__asm__ ("_ZGVbN4vv___powf_finite = _ZGVbN4vv_powf");
--__asm__ ("_ZGVcN8vv___powf_finite = _ZGVcN8vv_powf");
--__asm__ ("_ZGVdN8vv___powf_finite = _ZGVdN8vv_powf");
--__asm__ ("_ZGVeN16vv___powf_finite = _ZGVeN16vv_powf");
--
- # endif
- #endif
-Index: glibc-2.22/sysdeps/x86_64/fpu/Makefile
-===================================================================
---- glibc-2.22.orig/sysdeps/x86_64/fpu/Makefile
-+++ glibc-2.22/sysdeps/x86_64/fpu/Makefile
-@@ -20,7 +20,10 @@ libmvec-support += svml_d_cos2_core svml
- 		   svml_d_pow_data svml_s_powf4_core svml_s_powf8_core_avx \
- 		   svml_s_powf8_core svml_s_powf16_core svml_s_powf_data \
- 		   svml_s_sincosf4_core svml_s_sincosf8_core_avx \
--		   svml_s_sincosf8_core svml_s_sincosf16_core init-arch
-+		   svml_s_sincosf8_core svml_s_sincosf16_core init-arch \
-+		   svml_finite_alias
-+
-+libmvec-static-only-routines = svml_finite_alias
- endif
- 
- # Variables for libmvec tests.
-Index: glibc-2.22/sysdeps/x86_64/fpu/svml_finite_alias.S
-===================================================================
---- /dev/null
-+++ glibc-2.22/sysdeps/x86_64/fpu/svml_finite_alias.S
-@@ -0,0 +1,59 @@
-+/* These aliases added as workaround to exclude unnecessary symbol
-+   aliases in libmvec.so while compiler creates the vector names
-+   based on scalar asm name.  Corresponding discussion is at
-+   <https://gcc.gnu.org/ml/gcc/2015-06/msg00173.html>.
-+   Copyright (C) 2015 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 <sysdep.h>
-+
-+#define ALIAS_IMPL(alias, target) \
-+ENTRY (alias); \
-+	call target; \
-+	ret; \
-+END (alias)
-+
-+	.text
-+ALIAS_IMPL (_ZGVbN2v___log_finite, _ZGVbN2v_log)
-+ALIAS_IMPL (_ZGVcN4v___log_finite, _ZGVcN4v_log)
-+ALIAS_IMPL (_ZGVdN4v___log_finite, _ZGVdN4v_log)
-+ALIAS_IMPL (_ZGVeN8v___log_finite, _ZGVeN8v_log)
-+
-+ALIAS_IMPL (_ZGVbN4v___logf_finite, _ZGVbN4v_logf)
-+ALIAS_IMPL (_ZGVcN8v___logf_finite, _ZGVcN8v_logf)
-+ALIAS_IMPL (_ZGVdN8v___logf_finite, _ZGVdN8v_logf)
-+ALIAS_IMPL (_ZGVeN16v___logf_finite, _ZGVeN16v_logf)
-+
-+ALIAS_IMPL (_ZGVbN2v___exp_finite, _ZGVbN2v_exp)
-+ALIAS_IMPL (_ZGVcN4v___exp_finite, _ZGVcN4v_exp)
-+ALIAS_IMPL (_ZGVdN4v___exp_finite, _ZGVdN4v_exp)
-+ALIAS_IMPL (_ZGVeN8v___exp_finite, _ZGVeN8v_exp)
-+
-+ALIAS_IMPL (_ZGVbN4v___expf_finite, _ZGVbN4v_expf)
-+ALIAS_IMPL (_ZGVcN8v___expf_finite, _ZGVcN8v_expf)
-+ALIAS_IMPL (_ZGVdN8v___expf_finite, _ZGVdN8v_expf)
-+ALIAS_IMPL (_ZGVeN16v___expf_finite, _ZGVeN16v_expf)
-+
-+ALIAS_IMPL (_ZGVbN2vv___pow_finite, _ZGVbN2vv_pow)
-+ALIAS_IMPL (_ZGVcN4vv___pow_finite, _ZGVcN4vv_pow)
-+ALIAS_IMPL (_ZGVdN4vv___pow_finite, _ZGVdN4vv_pow)
-+ALIAS_IMPL (_ZGVeN8vv___pow_finite, _ZGVeN8vv_pow)
-+
-+ALIAS_IMPL (_ZGVbN4vv___powf_finite, _ZGVbN4vv_powf)
-+ALIAS_IMPL (_ZGVcN8vv___powf_finite, _ZGVcN8vv_powf)
-+ALIAS_IMPL (_ZGVdN8vv___powf_finite, _ZGVdN8vv_powf)
-+ALIAS_IMPL (_ZGVeN16vv___powf_finite, _ZGVeN16vv_powf)