name = glibc
version = 2.26
-release = 2
+release = 3
maintainer = Michael Tremer <michael.tremer@ipfire.org>
groups = System/Base
+++ /dev/null
-* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
-- make __init_array_start etc. symbols in elf-init.oS hidden undefined
-
-diff -Nrup a/csu/elf-init.c b/csu/elf-init.c
---- a/csu/elf-init.c 2012-06-05 07:42:49.000000000 -0600
-+++ b/csu/elf-init.c 2012-06-07 12:15:21.570319597 -0600
-@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int,
- extern void (*__fini_array_start []) (void) attribute_hidden;
- extern void (*__fini_array_end []) (void) attribute_hidden;
-
-+#if defined HAVE_VISIBILITY_ATTRIBUTE \
-+ && (defined SHARED || defined LIBC_NONSHARED)
-+# define hidden_undef_2(x) #x
-+# define hidden_undef_1(x) hidden_undef_2 (x)
-+# define hidden_undef(x) \
-+ __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
-+ __asm (".hidden " #x);
-+#else
-+# define hidden_undef(x)
-+#endif
-+
-+hidden_undef (__preinit_array_start)
-+hidden_undef (__preinit_array_end)
-+hidden_undef (__init_array_start)
-+hidden_undef (__init_array_end)
-+hidden_undef (__fini_array_start)
-+hidden_undef (__fini_array_end)
-
- /* These function symbols are provided for the .init/.fini section entry
- points automagically by the linker. */
+++ /dev/null
-Binary files a/elf/.rtld.c.rej.swp and b/elf/.rtld.c.rej.swp differ
-diff -Nrup a/elf/setup-vdso.h b/elf/setup-vdso.h
---- a/elf/setup-vdso.h 2012-10-10 21:34:38.000000000 -0600
-+++ b/elf/setup-vdso.h 2012-10-11 09:43:14.152958832 -0600
-@@ -93,7 +93,9 @@ setup_vdso (struct link_map *main_map __
- char *copy = malloc (len);
- if (copy == NULL)
- _dl_fatal_printf ("out of memory\n");
-- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
-+ l->l_libname->name = memcpy (copy, dsoname, len);
-+ if (GLRO(dl_debug_mask))
-+ l->l_name = copy;
- }
-
- /* Add the vDSO to the object list. */
+++ /dev/null
-diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
---- a/sysdeps/i386/Makefile 2012-06-05 07:42:49.000000000 -0600
-+++ b/sysdeps/i386/Makefile 2012-06-07 12:15:21.826318641 -0600
-@@ -62,6 +64,14 @@ endif
-
- ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
- defines += -DNO_TLS_DIRECT_SEG_REFS
-+else
-+# .a libraries are not performance critical and so we
-+# build them without direct TLS segment references
-+# always.
-+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
-+CFLAGS-.o += -mno-tls-direct-seg-refs
-+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
-+CFLAGS-.oS += -mno-tls-direct-seg-refs
- endif
-
- ifeq ($(subdir),elf)
+++ /dev/null
-From 83e5edd390eabe8f8e8e0d051f929b77a30c0767 Mon Sep 17 00:00:00 2001
-From: Andreas Schwab <schwab@redhat.com>
-Date: Fri, 18 Mar 2011 16:22:52 +0100
-Subject: [PATCH] ldd: never run file directly
-
-* elf/ldd.bash.in: Never run file directly.
-
----
- ChangeLog | 4 ++++
- elf/ldd.bash.in | 14 +-------------
- 2 files changed, 5 insertions(+), 13 deletions(-)
-
---- a/elf/ldd.bash.in
-+++ b/elf/ldd.bash.in
-@@ -166,18 +166,6 @@ warning: you do not have execution permission for" "\`$file'" >&2
- fi
- done
- case $ret in
-- 0)
-- # If the program exits with exit code 5, it means the process has been
-- # invoked with __libc_enable_secure. Fall back to running it through
-- # the dynamic linker.
-- try_trace "$file"
-- rc=$?
-- if [ $rc = 5 ]; then
-- try_trace "$RTLD" "$file"
-- rc=$?
-- fi
-- [ $rc = 0 ] || result=1
-- ;;
- 1)
- # This can be a non-ELF binary or no binary at all.
- nonelf "$file" || {
-@@ -185,7 +173,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
- result=1
- }
- ;;
-- 2)
-+ 0|2)
- try_trace "$RTLD" "$file" || result=1
- ;;
- *)
+++ /dev/null
-diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
---- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600
-+++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600
-@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios
- {
- struct __kernel_termios k_termios;
- unsigned long int cmd;
-+ int retval;
-
- switch (optional_actions)
- {
-@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios
- memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t));
-
-- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
-+ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
-+
-+ if (retval == 0 && cmd == TCSETS)
-+ {
-+ /* The Linux kernel has a bug which silently ignore the invalid
-+ c_cflag on pty. We have to check it here. */
-+ int save = errno;
-+ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
-+ if (retval)
-+ {
-+ /* We cannot verify if the setting is ok. We don't return
-+ an error (?). */
-+ __set_errno (save);
-+ retval = 0;
-+ }
-+ else if ((termios_p->c_cflag & (PARENB | CREAD))
-+ != (k_termios.c_cflag & (PARENB | CREAD))
-+ || ((termios_p->c_cflag & CSIZE)
-+ && ((termios_p->c_cflag & CSIZE)
-+ != (k_termios.c_cflag & CSIZE))))
-+ {
-+ /* It looks like the Linux kernel silently changed the
-+ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
-+ error. */
-+ __set_errno (EINVAL);
-+ retval = -1;
-+ }
-+ }
-+
-+ return retval;
- }
- libc_hidden_def (tcsetattr)
+++ /dev/null
-From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Mon, 1 May 2006 08:02:53 +0000
-Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default
-
-* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
-- SETENT_BATCH_READ /etc/default/nss option for speeding up
- some usages of NIS+ (#188246)
-
-diff --git a/nis/nss b/nis/nss
---- a/nis/nss
-+++ b/nis/nss
-@@ -25,7 +25,7 @@
- # memory with every getXXent() call. Otherwise each getXXent() call
- # might result into a network communication with the server to get
- # the next entry.
--#SETENT_BATCH_READ=TRUE
-+SETENT_BATCH_READ=TRUE
- #
- # ADJUNCT_AS_SHADOW
- # If set to TRUE, the passwd routines in the NIS NSS module will not
+++ /dev/null
-diff -Nrup a/nptl/Makefile b/nptl/Makefile
---- a/nptl/Makefile 2012-06-05 07:42:49.000000000 -0600
-+++ b/nptl/Makefile 2012-06-07 12:15:21.816318678 -0600
-@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
- $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
- $(objpfx)tst-unload: $(libdl)
--# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
-+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
- # since otherwise libpthread.so comes before libc.so when linking.
- $(addprefix $(objpfx), $(tests-reverse)): \
-- $(objpfx)../libc.so $(objpfx)libpthread.so \
-+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
- $(objpfx)../libc.so: $(common-objpfx)libc.so ;
- $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
-
- $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
-+
-+$(objpfx)linklibc.so: $(common-objpfx)libc.so
-+ ln -s ../libc.so $@
-+generated += libclink.so
- else
- $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
- endif
+++ /dev/null
-diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
---- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
-+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
-@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
- # if HANDLE_MULTIBYTE
- if (__builtin_expect (MB_CUR_MAX, 1) != 1)
- {
-+ const char *orig_pattern = pattern;
- mbstate_t ps;
- size_t n;
- const char *p;
-@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
- alloca_used);
- n = mbsrtowcs (wpattern, &p, n + 1, &ps);
- if (__glibc_unlikely (n == (size_t) -1))
-- /* Something wrong.
-- XXX Do we have to set `errno' to something which mbsrtows hasn't
-- already done? */
-- return -1;
-+ /* Something wrong: Fall back to single byte matching. */
-+ goto try_singlebyte;
- if (p)
- {
- memset (&ps, '\0', sizeof (ps));
-@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
- prepare_wpattern:
- n = mbsrtowcs (NULL, &pattern, 0, &ps);
- if (__glibc_unlikely (n == (size_t) -1))
-- /* Something wrong.
-- XXX Do we have to set `errno' to something which mbsrtows hasn't
-- already done? */
-- return -1;
-+ /*Something wrong: Fall back to single byte matching. */
-+ goto try_singlebyte;
- if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
- {
- __set_errno (ENOMEM);
-@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
- alloca_used);
- n = mbsrtowcs (wstring, &p, n + 1, &ps);
- if (__glibc_unlikely (n == (size_t) -1))
-- {
-- /* Something wrong.
-- XXX Do we have to set `errno' to something which
-- mbsrtows hasn't already done? */
-- free_return:
-- free (wpattern_malloc);
-- return -1;
-- }
-+ /* Something wrong: Fall back to single byte matching. */
-+ goto free_and_try_singlebyte;
- if (p)
- {
- memset (&ps, '\0', sizeof (ps));
-@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
- prepare_wstring:
- n = mbsrtowcs (NULL, &string, 0, &ps);
- if (__glibc_unlikely (n == (size_t) -1))
-- /* Something wrong.
-- XXX Do we have to set `errno' to something which mbsrtows hasn't
-- already done? */
-- goto free_return;
-+ /* Something wrong: Fall back to singlebyte matching. */
-+ goto free_and_try_singlebyte;
- if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
- {
- free (wpattern_malloc);
-@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
- free (wpattern_malloc);
-
- return res;
-+ free_and_try_singlebyte:
-+ free(wpattern_malloc);
-+ try_singlebyte:
-+ pattern = orig_pattern;
- }
- # endif /* mbstate_t and mbsrtowcs or _LIBC. */
-
+++ /dev/null
-#
-# Red Hat BZ:
-# https://bugzilla.redhat.com/show_bug.cgi?id=816647
-#
-# ChangeLog
-#
-#2013-04-30 Patsy Franklin <pfrankli@redhat.com>
-#
-# * iconv/gconv_cache.c (find_module): Demangle init_fct before
-# checking for NULL. Mangle __btowc_fct if init_fct is non-NULL.
-# * iconv/gconv_db.c (free_derivation): Check that __shlib_handle
-# is non-NULL before demangling the end_fct. Check for NULL
-# end_fct after demangling.
-# (__gconv_release_step): Demangle the end_fct before checking
-# it for NULL. Remove assert on __shlibc_handle != NULL.
-# (gen_steps): Don't check btowc_fct for NULL before mangling.
-# Demangle init_fct before checking for NULL.
-# (increment_counter): Likewise
-# * gconv_dl.c (__gconv_find_shlib): Don't check init_fct or
-# end_fct for NULL before mangling.
-# * wcsmbs/btowc.c (__btowc): Demangle btowc_fct before checking
-# for NULL.
-#
-diff -Nrup a/iconv/gconv_cache.c b/iconv/gconv_cache.c
---- a/iconv/gconv_cache.c 2012-12-24 22:02:13.000000000 -0500
-+++ b/iconv/gconv_cache.c 2013-04-30 06:43:24.788684270 -0400
-@@ -207,17 +207,16 @@ find_module (const char *directory, cons
- result->__data = NULL;
-
- /* Call the init function. */
-- if (result->__init_fct != NULL)
-- {
-- __gconv_init_fct init_fct = result->__init_fct;
-+ __gconv_init_fct init_fct = result->__init_fct;
- #ifdef PTR_DEMANGLE
-- PTR_DEMANGLE (init_fct);
-+ PTR_DEMANGLE (init_fct);
- #endif
-+ if (init_fct != NULL)
-+ {
- status = DL_CALL_FCT (init_fct, (result));
-
- #ifdef PTR_MANGLE
-- if (result->__btowc_fct != NULL)
-- PTR_MANGLE (result->__btowc_fct);
-+ PTR_MANGLE (result->__btowc_fct);
- #endif
- }
- }
-diff -Nrup a/iconv/gconv_db.c b/iconv/gconv_db.c
---- a/iconv/gconv_db.c 2012-12-24 22:02:13.000000000 -0500
-+++ b/iconv/gconv_db.c 2013-04-30 06:37:16.886521576 -0400
-@@ -179,16 +179,15 @@ free_derivation (void *p)
- size_t cnt;
-
- for (cnt = 0; cnt < deriv->nsteps; ++cnt)
-- if (deriv->steps[cnt].__counter > 0
-- && deriv->steps[cnt].__end_fct != NULL)
-+ if ((deriv->steps[cnt].__counter > 0)
-+ && (deriv->steps[cnt].__shlib_handle != NULL))
- {
-- assert (deriv->steps[cnt].__shlib_handle != NULL);
--
- __gconv_end_fct end_fct = deriv->steps[cnt].__end_fct;
- #ifdef PTR_DEMANGLE
- PTR_DEMANGLE (end_fct);
- #endif
-- DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
-+ if (end_fct != NULL)
-+ DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
- }
-
- /* Free the name strings. */
-@@ -212,16 +211,12 @@ __gconv_release_step (struct __gconv_ste
- if (step->__shlib_handle != NULL && --step->__counter == 0)
- {
- /* Call the destructor. */
-- if (step->__end_fct != NULL)
-- {
-- assert (step->__shlib_handle != NULL);
--
-- __gconv_end_fct end_fct = step->__end_fct;
-+ __gconv_end_fct end_fct = step->__end_fct;
- #ifdef PTR_DEMANGLE
-- PTR_DEMANGLE (end_fct);
-+ PTR_DEMANGLE (end_fct);
- #endif
-- DL_CALL_FCT (end_fct, (step));
-- }
-+ if (end_fct != NULL)
-+ DL_CALL_FCT (end_fct, (step));
-
- #ifndef STATIC_GCONV
- /* Release the loaded module. */
-@@ -293,13 +288,11 @@ gen_steps (struct derivation_step *best,
-
- /* Call the init function. */
- __gconv_init_fct init_fct = result[step_cnt].__init_fct;
-- if (init_fct != NULL)
-- {
-- assert (result[step_cnt].__shlib_handle != NULL);
--
- # ifdef PTR_DEMANGLE
-- PTR_DEMANGLE (init_fct);
-+ PTR_DEMANGLE (init_fct);
- # endif
-+ if (init_fct != NULL)
-+ {
- status = DL_CALL_FCT (init_fct, (&result[step_cnt]));
-
- if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK)
-@@ -312,8 +305,7 @@ gen_steps (struct derivation_step *best,
- }
-
- # ifdef PTR_MANGLE
-- if (result[step_cnt].__btowc_fct != NULL)
-- PTR_MANGLE (result[step_cnt].__btowc_fct);
-+ PTR_MANGLE (result[step_cnt].__btowc_fct);
- # endif
- }
- }
-@@ -393,16 +385,15 @@ increment_counter (struct __gconv_step *
-
- /* Call the init function. */
- __gconv_init_fct init_fct = step->__init_fct;
-- if (init_fct != NULL)
-- {
- #ifdef PTR_DEMANGLE
-- PTR_DEMANGLE (init_fct);
-+ PTR_DEMANGLE (init_fct);
- #endif
-+ if (init_fct != NULL)
-+ {
- DL_CALL_FCT (init_fct, (step));
-
- #ifdef PTR_MANGLE
-- if (step->__btowc_fct != NULL)
-- PTR_MANGLE (step->__btowc_fct);
-+ PTR_MANGLE (step->__btowc_fct);
- #endif
- }
- }
-diff -Nrup a/iconv/gconv_dl.c b/iconv/gconv_dl.c
---- a/iconv/gconv_dl.c 2012-12-24 22:02:13.000000000 -0500
-+++ b/iconv/gconv_dl.c 2013-04-30 06:37:16.889521601 -0400
-@@ -132,10 +132,8 @@ __gconv_find_shlib (const char *name)
-
- #ifdef PTR_MANGLE
- PTR_MANGLE (found->fct);
-- if (found->init_fct != NULL)
-- PTR_MANGLE (found->init_fct);
-- if (found->end_fct != NULL)
-- PTR_MANGLE (found->end_fct);
-+ PTR_MANGLE (found->init_fct);
-+ PTR_MANGLE (found->end_fct);
- #endif
-
- /* We have succeeded in loading the shared object. */
-diff -Nrup a/wcsmbs/btowc.c b/wcsmbs/btowc.c
---- a/wcsmbs/btowc.c 2012-12-24 22:02:13.000000000 -0500
-+++ b/wcsmbs/btowc.c 2013-04-30 06:37:16.891521619 -0400
-@@ -47,15 +47,15 @@ __btowc (c)
- /* Get the conversion functions. */
- fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
- __gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
-+#ifdef PTR_DEMANGLE
-+ if (fcts->towc->__shlib_handle != NULL)
-+ PTR_DEMANGLE (btowc_fct);
-+#endif
-
- if (__builtin_expect (fcts->towc_nsteps == 1, 1)
- && __builtin_expect (btowc_fct != NULL, 1))
- {
- /* Use the shortcut function. */
--#ifdef PTR_DEMANGLE
-- if (fcts->towc->__shlib_handle != NULL)
-- PTR_DEMANGLE (btowc_fct);
--#endif
- return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
- }
- else