Automatic import for version 2.16.90-2

This commit is contained in:
Rosa 2012-10-09 04:29:33 +00:00
parent f95a17e413
commit cb69483390
109 changed files with 49267 additions and 6244 deletions

View file

@ -1,7 +1,6 @@
---
sources:
crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9
glibc-2.15-a316c1f-fedora.tar.gz: fc08eb2483a8401fd324ffd36290d54a5b55bde3
glibc-2.15-a316c1f.tar.gz: aa07170ac6e14a2b3eecd45af19825fa36844dd6
glibc-2.16.90-97bc38d7-fedora.tar.gz: a266443e8c36b64499f017a0a3528b4b5048577e
glibc-2.16.90-97bc38d7.tar.gz: 8207dfe16e4022a750c3496b3b2c80c591982240
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
glibc-ports-2.15-ad8ae7d.tar.gz: 8626c7eb72f0cad6acf0b94d72b124b8d2dac825

View file

@ -1,30 +0,0 @@
Index: sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
--- sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: nptl/sysdeps/pthread/pt-initfini.c
===================================================================
--- nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
+asm ("\n#undef __i686");
+asm ("\n#define __i686 __i686");
+asm ("\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");

View file

@ -1,88 +0,0 @@
--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100
+++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100
+++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100
+++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100
@@ -93,7 +93,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100
@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat
break;
}
}
- f_print (fout, separator);
+ f_print (fout, "%s", separator);
}
static int
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100
@@ -651,7 +651,7 @@ h_output (const char *infile, const char
}
else if (tblflag)
{
- fprintf (fout, rpcgen_table_dcl);
+ fprintf (fout, "%s", rpcgen_table_dcl);
}
if (Cflag)
--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100
@@ -361,7 +361,7 @@ write_real_program (const definition * d
f_print (fout, " (");
/* arg name */
if (proc->arg_num > 1)
- f_print (fout, proc->args.argname);
+ f_print (fout, "%s", proc->args.argname);
else
ptype (proc->args.decls->decl.prefix,
proc->args.decls->decl.type, 0);
--- glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h.str_fmt~ 2011-10-19 13:03:31.000000000 +0200
+++ glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h 2011-12-10 20:44:52.713364002 +0100
@@ -35,7 +35,7 @@ static void
__attribute__ ((__noreturn__))
dl_fatal (const char *str)
{
- _dl_dprintf (2, str);
+ _dl_dprintf (2, "%s", str);
_exit (1);
}
#endif

View file

@ -1,13 +0,0 @@
--- glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile.orig 2011-07-30 19:11:27.590451172 -0300
+++ glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile 2011-07-30 19:11:57.813615252 -0300
@@ -33,6 +33,10 @@ ifeq ($(subdir),nscd)
nscd-modules += libc-do-syscall
endif
+ifeq ($(subdir),nss)
+libnss_db-sysdep_routines += libc-do-syscall
+endif
+
ifeq ($(subdir),posix)
LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o

View file

@ -1,12 +0,0 @@
--- glibc-2.15-a316c1f/nscd/nscd_helper.c.orig 2012-02-11 20:25:37.804514879 -0200
+++ glibc-2.15-a316c1f/nscd/nscd_helper.c 2012-02-11 20:26:07.428588082 -0200
@@ -414,7 +414,8 @@ __nscd_get_mapping (request_type type, c
struct mapped_database *oldval = *mappedp;
*mappedp = result;
- if (oldval != NULL && atomic_decrement_val (&oldval->counter) == 0)
+ if (oldval != NULL && oldval != NO_MAPPING
+ && atomic_decrement_val (&oldval->counter) == 0)
__nscd_unmap (oldval);
return result;

View file

@ -1,11 +0,0 @@
--- glibc-2.15-a316c1f/scripts/check-local-headers.sh.orig 2012-02-11 17:00:16.708816468 -0200
+++ glibc-2.15-a316c1f/scripts/check-local-headers.sh 2012-02-11 17:00:35.235895337 -0200
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -1,24 +0,0 @@
2006-07-26 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* rt/Makefile (tests): Don't run tests in parallel on fine-grained
SMT systems.
--- glibc-2.4.90/rt/Makefile.testsuite-rt-notparallel 2006-02-16 09:32:18.000000000 -0500
+++ glibc-2.4.90/rt/Makefile 2006-10-25 03:00:03.000000000 -0400
@@ -81,6 +81,16 @@ endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif
+
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
$(resolvobjdir)/libresolv.a

View file

@ -1,36 +0,0 @@
diff -p -up glibc-2.9/Makeconfig.orig glibc-2.9/Makeconfig
--- glibc-2.9/Makeconfig.orig 2008-08-18 05:42:17.000000000 -0400
+++ glibc-2.9/Makeconfig 2009-01-15 09:44:31.000000000 -0500
@@ -226,7 +226,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)
diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig glibc-2.9/sysdeps/unix/sysv/linux/configure.in
--- glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig 2008-04-11 17:13:38.000000000 -0400
+++ glibc-2.9/sysdeps/unix/sysv/linux/configure.in 2009-01-15 09:44:31.000000000 -0500
@@ -169,7 +169,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${datadir}/locale'
fi
;;
*)
diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.orig glibc-2.9/sysdeps/unix/sysv/linux/configure
--- glibc-2.9/sysdeps/unix/sysv/linux/configure.orig 2008-04-11 17:13:51.000000000 -0400
+++ glibc-2.9/sysdeps/unix/sysv/linux/configure 2009-01-15 09:44:31.000000000 -0500
@@ -381,7 +381,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${datadir}/locale'
fi
;;
*)

View file

@ -0,0 +1,20 @@
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-06-06 13:07:41.727524312 -0600
+++ b/elf/dl-load.c 2012-06-06 13:11:19.308681002 -0600
@@ -2093,10 +2093,14 @@ _dl_map_object (struct link_map *loader,
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val);
if (strcmp (name, soname) != 0)
- continue;
+#ifdef __arm__
+ if (strcmp (name, "ld-linux.so.3")
+ || strcmp (soname, "ld-linux-armhf.so.3"))
+#endif
+ continue;
/* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
+ add_name_to_object (l, name);
l->l_soname_added = 1;
}

View file

@ -0,0 +1,83 @@
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Fri, 11 Jun 2010 11:04:11 +0200
Subject: [PATCH] Properly set __libc_multiple_libcs
* elf/rtld.c (_dl_starting_up): Always define.
(dl_main): Always set _dl_starting_up.
* elf/dl-support.c (_dl_starting_up): Always define.
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
---
ChangeLog | 7 +++++++
elf/dl-init.c | 4 ----
elf/dl-support.c | 2 --
elf/rtld.c | 4 ----
4 files changed, 7 insertions(+), 10 deletions(-)
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -23,11 +23,9 @@
/* Type of the initializer. */
typedef void (*init_t) (int, char **, char **);
-#ifndef HAVE_INLINED_SYSCALLS
/* Flag, nonzero during startup phase. */
extern int _dl_starting_up;
extern int _dl_starting_up_internal attribute_hidden;
-#endif
static void
@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env);
-#ifndef HAVE_INLINED_SYSCALLS
/* Finished starting up. */
INTUSE(_dl_starting_up) = 0;
-#endif
}
INTDEF (_dl_init)
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
create a fake scope containing nothing. */
struct r_scope_elem _dl_initial_searchlist;
-#ifndef HAVE_INLINED_SYSCALLS
/* Nonzero during startup. */
int _dl_starting_up = 1;
-#endif
/* Random data provided by the kernel. */
void *_dl_random;
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -106,7 +106,6 @@ static struct audit_list
struct audit_list *next;
} *audit_list;
-#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic
@@ -116,7 +115,6 @@ static struct audit_list
never be called. */
int _dl_starting_up = 0;
INTVARDEF(_dl_starting_up)
-#endif
/* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */
@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */
process_envvars (&mode);
-#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */
INTUSE(_dl_starting_up) = 1;
-#endif
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{

View file

@ -0,0 +1,39 @@
diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h
--- a/misc/sys/cdefs.h 2012-06-05 07:42:49.000000000 -0600
+++ b/misc/sys/cdefs.h 2012-06-07 12:15:21.808318708 -0600
@@ -142,7 +142,10 @@
#define __bos0(ptr) __builtin_object_size (ptr, 0)
#define __fortify_function __extern_always_inline __attribute_artificial__
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) \
+ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
+ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
+ && __GNUC_RH_RELEASE__ >= 31)
# define __warndecl(name, msg) \
extern void name (void) __attribute__((__warning__ (msg)))
# define __warnattr(msg) __attribute__((__warning__ (msg)))
@@ -320,7 +323,10 @@
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. */
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
+#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
+ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
+ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
+ && __GNUC_RH_RELEASE__ >= 31)
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# define __extern_always_inline \
@@ -333,7 +339,10 @@
/* GCC 4.3 and above allow passing all anonymous arguments of an
__extern_always_inline function to some other vararg function. */
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) \
+ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
+ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
+ && __GNUC_RH_RELEASE__ >= 31)
# define __va_arg_pack() __builtin_va_arg_pack ()
# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
#endif

View file

@ -0,0 +1,98 @@
From 207e77fd3f0a94acdf0557608dd4f10ce0e0f22f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Mon, 9 May 2011 10:55:58 +0200
Subject: [PATCH] Never leave $ORIGIN unexpanded
* elf/dl-load.c (is_dst): Remove parameter secure, all callers
changed. Move check for valid use of $ORIGIN ...
(_dl_dst_substitute): ... here. Reset check_for_trusted when a
path element is skipped.
---
ChangeLog | 7 +++++++
elf/dl-load.c | 34 ++++++++++++++++------------------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 18a83d2..6e16a9a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *path, size_t len)
static size_t
-is_dst (const char *start, const char *name, const char *str,
- int is_path, int secure)
+is_dst (const char *start, const char *name, const char *str, int is_path)
{
size_t len;
bool is_curly = false;
@@ -279,12 +278,6 @@ is_dst (const char *start, const char *name, const char *str,
&& (!is_path || name[len] != ':'))
return 0;
- if (__builtin_expect (secure, 0)
- && ((name[len] != '\0' && name[len] != '/'
- && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
return len;
}
@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_path)
{
size_t len;
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path. */
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
+ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
+ || (len = is_dst (start, name, "LIB", is_path)) != 0)
++cnt;
name = strchr (name + len, '$');
@@ -338,9 +328,16 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
size_t len;
++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{
+ /* For SUID/GUID programs $ORIGIN must always appear
+ first in a path element. */
+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
+ && ((name[len] != '\0' && name[len] != '/'
+ && (!is_path || name[len] != ':'))
+ || (name != start + 1 && (!is_path || name[-2] != ':'))))
+ repl = (const char *) -1;
+ else
#ifndef SHARED
if (l == NULL)
repl = _dl_get_origin ();
@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
check_for_trusted = (INTUSE(__libc_enable_secure)
&& l->l_type == lt_executable);
}
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
repl = GLRO(dl_platform);
- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
repl = DL_DST_LIB;
if (repl != NULL && repl != (const char *) -1)
@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
element, but keep an empty element at the end. */
if (wp == result && is_path && *name == ':' && name[1] != '\0')
++name;
+ check_for_trusted = false;
}
else
/* No DST we recognize. */

View file

@ -0,0 +1,30 @@
* 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. */

View file

@ -0,0 +1,128 @@
From bf18f175afdb59cdcd1016995b351e2bbb1d6ba7 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Tue, 21 Jun 2011 17:28:57 +0200
Subject: [PATCH] Don't use gethostbyaddr to determine canonical name
* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use gethostbyaddr
to determine canonical name.
---
ChangeLog | 5 +++
sysdeps/posix/getaddrinfo.c | 77 +++----------------------------------------
2 files changed, 10 insertions(+), 72 deletions(-)
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -565,8 +565,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
/* If we do not have to look for IPv6 addresses, use
the simple, old functions, which do not support
- IPv6 scope ids. */
- if (req->ai_family == AF_INET)
+ IPv6 scope ids, nor retrieving the canonical name. */
+ if (req->ai_family == AF_INET && (req->ai_flags & AI_CANONNAME) == 0)
{
/* Allocate additional room for struct host_data. */
size_t tmpbuflen = (512 + MAX_NR_ALIASES * sizeof(char*)
@@ -1107,70 +1107,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
/* Only the first entry gets the canonical name. */
if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0)
{
- char *tmpbuf2 = NULL;
- bool malloc_tmpbuf2 = false;
-
if (canon == NULL)
- {
- struct hostent *h = NULL;
- int herrno;
- struct hostent th;
- /* Add room for struct host_data. */
- size_t tmpbuf2len = (512 + (MAX_NR_ALIASES+MAX_NR_ADDRS+1)
- * sizeof(char*) + 16 * sizeof(char));
-
- do
- {
- if (__libc_use_alloca (alloca_used + 2 * tmpbuf2len))
- tmpbuf2 = extend_alloca_account (tmpbuf2, tmpbuf2len,
- tmpbuf2len * 2,
- alloca_used);
- else
- {
- char *newp = realloc (malloc_tmpbuf2 ? tmpbuf2 : NULL,
- 2 * tmpbuf2len);
- if (newp == NULL)
- {
- if (malloc_tmpbuf2)
- free (tmpbuf2);
- result = -EAI_MEMORY;
- goto free_and_return;
- }
-
- tmpbuf2 = newp;
- tmpbuf2len = 2 * tmpbuf2len;
- malloc_tmpbuf2 = true;
- }
-
- rc = __gethostbyaddr_r (at2->addr,
- ((at2->family == AF_INET6)
- ? sizeof (struct in6_addr)
- : sizeof (struct in_addr)),
- at2->family, &th, tmpbuf2,
- tmpbuf2len, &h, &herrno);
- }
- while (rc == ERANGE && herrno == NETDB_INTERNAL);
-
- if (rc != 0 && herrno == NETDB_INTERNAL)
- {
- if (malloc_tmpbuf2)
- free (tmpbuf2);
-
- __set_h_errno (herrno);
- result = -EAI_SYSTEM;
- goto free_and_return;
- }
-
- if (h != NULL)
- canon = h->h_name;
- else
- {
- assert (orig_name != NULL);
- /* If the canonical name cannot be determined, use
- the passed in string. */
- canon = orig_name;
- }
- }
+ /* If the canonical name cannot be determined, use
+ the passed in string. */
+ canon = orig_name;
#ifdef HAVE_LIBIDN
if (req->ai_flags & AI_CANONIDN)
@@ -1185,9 +1125,6 @@ gaih_inet (const char *name, const struct gaih_service *service,
int rc = __idna_to_unicode_lzlz (canon, &out, idn_flags);
if (rc != IDNA_SUCCESS)
{
- if (malloc_tmpbuf2)
- free (tmpbuf2);
-
if (rc == IDNA_MALLOC_ERROR)
result = -EAI_MEMORY;
else if (rc == IDNA_DLOPEN_ERROR)
@@ -1217,17 +1154,11 @@ gaih_inet (const char *name, const struct gaih_service *service,
canon = strdup (canon);
if (canon == NULL)
{
- if (malloc_tmpbuf2)
- free (tmpbuf2);
-
result = -EAI_MEMORY;
goto free_and_return;
}
}
}
-
- if (malloc_tmpbuf2)
- free (tmpbuf2);
}
family = at2->family;

View file

@ -0,0 +1,54 @@
From 1080954fbcf54814875eb988673004d25a1655cf Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <drepper@redhat.com>
Date: Tue, 6 Apr 2010 12:27:58 +0200
Subject: [PATCH] Assign global scope to RFC 1918 addresses
* sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
scope to RFC 1918 addresses.
* posix/gai.conf: Document difference from RFC 3484.
---
ChangeLog | 6 ++++++
posix/gai.conf | 6 ++++--
sysdeps/posix/getaddrinfo.c | 2 ++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/posix/gai.conf b/posix/gai.conf
index 195287e..bd40684 100644
--- a/posix/gai.conf
+++ b/posix/gai.conf
@@ -41,7 +41,7 @@
#
# precedence <mask> <value>
# Add another rule to the RFC 3484 precedence table. See section 2.1
-# and 10.3 in RFC 3484. The default is:
+# and 10.3 in RFC 3484. The RFC requires:
#
#precedence ::1/128 50
#precedence ::/0 40
@@ -58,7 +58,7 @@
# Add another rule to the RFC 3484 scope table for IPv4 addresses.
# By default the scope IDs described in section 3.2 in RFC 3484 are
# used. Changing these defaults should hardly ever be necessary.
-# The defaults are equivalent to:
+# The definitions in RFC 1918 are equivalent to:
#
#scopev4 ::ffff:169.254.0.0/112 2
#scopev4 ::ffff:127.0.0.0/104 2
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 2e0c724..3eb5971 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1099,10 +1099,12 @@ static const struct scopeentry
/* Link-local addresses: scope 2. */
{ { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
{ { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
+#if 0
/* Site-local addresses: scope 5. */
{ { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
{ { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
{ { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
+#endif
/* Default: scope 14. */
{ { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
};

View file

@ -0,0 +1,74 @@
2004-11-26 Jakub Jelinek <jakub@redhat.com>
* posix/Makefile (generated: Add getconf.speclist.
($(inst_libexecdir)/getconf): Use getconf.speclist instead of
getconf output.
($(objpfx)getconf.speclist): New rule.
* posix/getconf.speclist.h: New file.
diff -Nrup a/posix/Makefile b/posix/Makefile
--- a/posix/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/posix/Makefile 2012-06-07 12:15:21.820318664 -0600
@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi
mv -f $@/$$spec.new $@/$$spec; \
done < $(objpfx)getconf.speclist
-$(objpfx)getconf.speclist: $(objpfx)getconf
-ifeq (no,$(cross-compiling))
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
-else
- > $@.new
-endif
+$(objpfx)getconf.speclist: getconf.speclist.h
+ $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
+ | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
+ > $@.new
mv -f $@.new $@
diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h
--- a/posix/getconf.speclist.h 1969-12-31 17:00:00.000000000 -0700
+++ b/posix/getconf.speclist.h 2012-06-07 12:15:21.820318664 -0600
@@ -0,0 +1,39 @@
+#include <unistd.h>
+const char *START_OF_STRINGS =
+#if _POSIX_V7_ILP32_OFF32 == 1
+"POSIX_V7_ILP32_OFF32"
+#endif
+#if _POSIX_V7_ILP32_OFFBIG == 1
+"POSIX_V7_ILP32_OFFBIG"
+#endif
+#if _POSIX_V7_LP64_OFF64 == 1
+"POSIX_V7_LP64_OFF64"
+#endif
+#if _POSIX_V7_LPBIG_OFFBIG == 1
+"POSIX_V7_LPBIG_OFFBIG"
+#endif
+#if _POSIX_V6_ILP32_OFF32 == 1
+"POSIX_V6_ILP32_OFF32"
+#endif
+#if _POSIX_V6_ILP32_OFFBIG == 1
+"POSIX_V6_ILP32_OFFBIG"
+#endif
+#if _POSIX_V6_LP64_OFF64 == 1
+"POSIX_V6_LP64_OFF64"
+#endif
+#if _POSIX_V6_LPBIG_OFFBIG == 1
+"POSIX_V6_LPBIG_OFFBIG"
+#endif
+#if _XBS5_ILP32_OFF32 == 1
+"XBS5_ILP32_OFF32"
+#endif
+#if _XBS5_ILP32_OFFBIG == 1
+"XBS5_ILP32_OFFBIG"
+#endif
+#if _XBS5_LP64_OFF64 == 1
+"XBS5_LP64_OFF64"
+#endif
+#if _XBS5_LPBIG_OFFBIG == 1
+"XBS5_LPBIG_OFFBIG"
+#endif
+"";

View file

@ -0,0 +1,45 @@
From 70d0a630700f602a457832383161d261fe222db5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Jul 2010 13:14:26 +0200
Subject: [PATCH] Fix PLT reference
* include/sys/resource.h (__getrlimit): Add hidden proto.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
* resource/getrlimit.c: Likewise.
---
ChangeLog | 7 +++++++
include/sys/resource.h | 1 +
resource/getrlimit.c | 1 +
sysdeps/mach/hurd/getrlimit.c | 1 +
sysdeps/unix/sysv/linux/i386/getrlimit.c | 1 +
5 files changed, 11 insertions(+), 0 deletions(-)
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
extern int __setrlimit (enum __rlimit_resource __resource,
const struct rlimit *__rlimits);
+libc_hidden_proto (__getrlimit)
#endif
#endif
--- a/resource/getrlimit.c
+++ b/resource/getrlimit.c
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)
stub_warning (getrlimit)
--- a/sysdeps/mach/hurd/getrlimit.c
+++ b/sysdeps/mach/hurd/getrlimit.c
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
return 0;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)

View file

@ -0,0 +1,18 @@
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)

View file

@ -0,0 +1,30 @@
From 5eb4509a6651d19c7a28c4506d6aa582c9ee095a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 1 Feb 2006 09:30:43 +0000
Subject: [PATCH] 128-bit long double fixes
* include/bits/stdlib-ldbl.h: New file.
* include/bits/wchar-ldbl.h: New file.
---
ChangeLog | 5 +++++
include/bits/stdlib-ldbl.h | 1 +
include/bits/wchar-ldbl.h | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 include/bits/stdlib-ldbl.h
create mode 100644 include/bits/wchar-ldbl.h
diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
new file mode 100644
index 0000000..6250949
--- /dev/null
+++ b/include/bits/stdlib-ldbl.h
@@ -0,0 +1 @@
+#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
new file mode 100644
index 0000000..29baa2f
--- /dev/null
+++ b/include/bits/wchar-ldbl.h
@@ -0,0 +1 @@
+#include <wcsmbs/bits/wchar-ldbl.h>

42
glibc-fedora-ldd.patch Normal file
View file

@ -0,0 +1,42 @@
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
;;
*)

View file

@ -0,0 +1,48 @@
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)

View file

@ -0,0 +1,99 @@
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
- readd temporarily currencies which were superceeded by Euro
into the list of accepted currencies by localedef to make
standard conformance testsuites happy
diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def
--- a/locale/iso-4217.def 2012-06-05 07:42:49.000000000 -0600
+++ b/locale/iso-4217.def 2012-06-07 12:15:21.584319544 -0600
@@ -8,6 +8,7 @@
*
* !!! The list has to be sorted !!!
*/
+DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */
DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */
DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */
DEFINE_INT_CURR("ALL") /* Albanian Lek */
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram
DEFINE_INT_CURR("ANG") /* Netherlands Antilles */
DEFINE_INT_CURR("AOA") /* Angolan Kwanza */
DEFINE_INT_CURR("ARS") /* Argentine Peso */
+DEFINE_INT_CURR("ATS") /* Austrian Schilling -> EUR */
DEFINE_INT_CURR("AUD") /* Australian Dollar */
DEFINE_INT_CURR("AWG") /* Aruba Guilder */
DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */
DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */
DEFINE_INT_CURR("BBD") /* Barbados Dollar */
DEFINE_INT_CURR("BDT") /* Bangladesh Taka */
+DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */
DEFINE_INT_CURR("BGN") /* Bulgarian Lev */
DEFINE_INT_CURR("BHD") /* Bahraini Dinar */
DEFINE_INT_CURR("BIF") /* Burundi Franc */
@@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso *
DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */
DEFINE_INT_CURR("CYP") /* Cypriot Pound */
DEFINE_INT_CURR("CZK") /* Czech Koruna */
+DEFINE_INT_CURR("DEM") /* German Mark -> EUR */
DEFINE_INT_CURR("DJF") /* Djibouti Franc */
DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */
DEFINE_INT_CURR("DOP") /* Dominican Republic */
@@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dina
DEFINE_INT_CURR("EEK") /* Estonian Kroon */
DEFINE_INT_CURR("EGP") /* Egyptian Pound */
DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */
+DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */
DEFINE_INT_CURR("ETB") /* Ethiopian Birr */
DEFINE_INT_CURR("EUR") /* European Union Euro */
+DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */
DEFINE_INT_CURR("FJD") /* Fiji Dollar */
DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */
+DEFINE_INT_CURR("FRF") /* French Franc -> EUR */
DEFINE_INT_CURR("GBP") /* British Pound */
DEFINE_INT_CURR("GEL") /* Georgia Lari */
DEFINE_INT_CURR("GHC") /* Ghana Cedi */
DEFINE_INT_CURR("GIP") /* Gibraltar Pound */
DEFINE_INT_CURR("GMD") /* Gambian Dalasi */
DEFINE_INT_CURR("GNF") /* Guinea Franc */
+DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */
DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */
DEFINE_INT_CURR("GYD") /* Guyana Dollar */
DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */
@@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna
DEFINE_INT_CURR("HTG") /* Haiti Gourde */
DEFINE_INT_CURR("HUF") /* Hungarian Forint */
DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */
+DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */
DEFINE_INT_CURR("ILS") /* Israeli Shekel */
DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */
DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */
DEFINE_INT_CURR("IQD") /* Iraqi Dinar */
DEFINE_INT_CURR("IRR") /* Iranian Rial */
DEFINE_INT_CURR("ISK") /* Iceland Krona */
+DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */
DEFINE_INT_CURR("JEP") /* Jersey Pound */
DEFINE_INT_CURR("JMD") /* Jamaican Dollar */
DEFINE_INT_CURR("JOD") /* Jordanian Dinar */
@@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Ru
DEFINE_INT_CURR("LRD") /* Liberian Dollar */
DEFINE_INT_CURR("LSL") /* Lesotho Maloti */
DEFINE_INT_CURR("LTL") /* Lithuanian Litas */
+DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */
DEFINE_INT_CURR("LVL") /* Latvia Lat */
DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */
DEFINE_INT_CURR("MAD") /* Moroccan Dirham */
@@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Me
DEFINE_INT_CURR("NAD") /* Namibia Dollar */
DEFINE_INT_CURR("NGN") /* Nigeria Naira */
DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */
+DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */
DEFINE_INT_CURR("NOK") /* Norwegian Krone */
DEFINE_INT_CURR("NPR") /* Nepalese Rupee */
DEFINE_INT_CURR("NZD") /* New Zealand Dollar */
@@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Gui
DEFINE_INT_CURR("PHP") /* Philippines Peso */
DEFINE_INT_CURR("PKR") /* Pakistan Rupee */
DEFINE_INT_CURR("PLN") /* Polish Zloty */
+DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */
DEFINE_INT_CURR("PYG") /* Paraguay Guarani */
DEFINE_INT_CURR("QAR") /* Qatar Rial */
DEFINE_INT_CURR("ROL") /* Romanian Leu */

View file

@ -0,0 +1,57 @@
diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB
--- a/localedata/locales/cy_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/cy_GB 2012-06-07 12:15:21.805318719 -0600
@@ -248,9 +248,9 @@ mon "<U0049><U006F><U006E><U0061
d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
-date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
+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>"
first_workday 2
diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB
--- a/localedata/locales/en_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/en_GB 2012-06-07 12:15:21.806318715 -0600
@@ -116,7 +116,7 @@ mon "<U004A><U0061><U006E><U0075
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW
--- a/localedata/locales/zh_TW 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/zh_TW 2012-06-07 12:15:21.807318711 -0600
@@ -1,7 +1,7 @@
comment_char %
escape_char /
%
-% Chinese language locale for Taiwan R.O.C.
+% Chinese language locale for Taiwan
% charmap: BIG5-CP950
%
% Original Author:
@@ -17,7 +17,7 @@ escape_char /
% Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
LC_IDENTIFICATION
-title "Chinese locale for Taiwan R.O.C."
+title "Chinese locale for Taiwan"
source ""
address ""
contact ""
@@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
tel ""
fax ""
language "Chinese"
-territory "Taiwan R.O.C."
+territory "Taiwan"
revision "0.2"
date "2000-08-02"
%

View file

@ -0,0 +1,102 @@
* Mon Dec 1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-1
- for the time being, include both nb_NO* and no_NO* as locales
so that the distribution can catch up with the no_NO->nb_NO
transition
diff -Nrup a/intl/locale.alias b/intl/locale.alias
--- a/intl/locale.alias 2012-06-05 07:42:49.000000000 -0600
+++ b/intl/locale.alias 2012-06-07 12:15:21.583319548 -0600
@@ -56,8 +56,6 @@ korean ko_KR.eucKR
korean.euc ko_KR.eucKR
ko_KR ko_KR.eucKR
lithuanian lt_LT.ISO-8859-13
-no_NO nb_NO.ISO-8859-1
-no_NO.ISO-8859-1 nb_NO.ISO-8859-1
norwegian nb_NO.ISO-8859-1
nynorsk nn_NO.ISO-8859-1
polish pl_PL.ISO-8859-2
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/SUPPORTED 2012-06-07 12:15:21.805318719 -0600
@@ -320,6 +320,8 @@ nl_NL/ISO-8859-1 \
nl_NL@euro/ISO-8859-15 \
nn_NO.UTF-8/UTF-8 \
nn_NO/ISO-8859-1 \
+no_NO.UTF-8/UTF-8 \
+no_NO/ISO-8859-1 \
nr_ZA/UTF-8 \
nso_ZA/UTF-8 \
oc_FR.UTF-8/UTF-8 \
diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO
--- a/localedata/locales/no_NO 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/no_NO 2012-06-07 12:15:21.806318715 -0600
@@ -0,0 +1,69 @@
+escape_char /
+comment_char %
+
+% Norwegian language locale for Norway
+% Source: Norsk Standardiseringsforbund
+% Address: University Library,
+% Drammensveien 41, N-9242 Oslo, Norge
+% Contact: Kolbjoern Aamboe
+% Tel: +47 - 22859109
+% Fax: +47 - 22434497
+% Email: kolbjorn.aambo@usit.uio.no
+% Language: no
+% Territory: NO
+% Revision: 4.3
+% Date: 1996-10-15
+% Application: general
+% Users: general
+% Repertoiremap: mnemonic.ds
+% Charset: ISO-8859-1
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+copy "nb_NO"
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "nb_NO"
+END LC_COLLATE
+
+LC_CTYPE
+copy "nb_NO"
+END LC_CTYPE
+
+LC_MONETARY
+copy "nb_NO"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "nb_NO"
+END LC_NUMERIC
+
+LC_TIME
+copy "nb_NO"
+END LC_TIME
+
+LC_MESSAGES
+copy "nb_NO"
+END LC_MESSAGES
+
+LC_PAPER
+copy "nb_NO"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "nb_NO"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "nb_NO"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "nb_NO"
+END LC_NAME
+
+LC_ADDRESS
+copy "nb_NO"
+END LC_ADDRESS

View file

@ -0,0 +1,38 @@
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
- add a couple of .ISO-8859-15 locales (#61908)
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/SUPPORTED 2012-06-07 12:15:21.805318719 -0600
@@ -88,6 +88,7 @@ cy_GB.UTF-8/UTF-8 \
cy_GB/ISO-8859-14 \
da_DK.UTF-8/UTF-8 \
da_DK/ISO-8859-1 \
+da_DK.ISO-8859-15/ISO-8859-15 \
de_AT.UTF-8/UTF-8 \
de_AT/ISO-8859-1 \
de_AT@euro/ISO-8859-15 \
@@ -119,6 +120,7 @@ en_DK.UTF-8/UTF-8 \
en_DK/ISO-8859-1 \
en_GB.UTF-8/UTF-8 \
en_GB/ISO-8859-1 \
+en_GB.ISO-8859-15/ISO-8859-15 \
en_HK.UTF-8/UTF-8 \
en_HK/ISO-8859-1 \
en_IE.UTF-8/UTF-8 \
@@ -134,6 +136,7 @@ en_SG.UTF-8/UTF-8 \
en_SG/ISO-8859-1 \
en_US.UTF-8/UTF-8 \
en_US/ISO-8859-1 \
+en_US.ISO-8859-15/ISO-8859-15 \
en_ZA.UTF-8/UTF-8 \
en_ZA/ISO-8859-1 \
en_ZM/UTF-8 \
@@ -378,6 +381,7 @@ sv_FI/ISO-8859-1 \
sv_FI@euro/ISO-8859-15 \
sv_SE.UTF-8/UTF-8 \
sv_SE/ISO-8859-1 \
+sv_SE.ISO-8859-15/ISO-8859-15 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
ta_IN/UTF-8 \

View file

@ -0,0 +1,11 @@
diff -Nrup a/localedata/Makefile b/localedata/Makefile
--- a/localedata/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/Makefile 2012-06-07 12:15:21.776318827 -0600
@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
echo -n '...'; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
$(LOCALEDEF) --alias-file=../intl/locale.alias \
+ --no-archive \
-i locales/$$input -c -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale; \
echo ' done'; \

View file

@ -0,0 +1,51 @@
This is a part of commit glibc-2.3.3-1492-ga891c7b,
needed for fedora/build-locale-archive.c only.
diff -Nrup a/ChangeLog.17 b/ChangeLog.17
--- a/ChangeLog.17 2012-06-05 07:42:49.000000000 -0600
+++ b/ChangeLog.17 2012-06-07 12:15:21.564319619 -0600
@@ -11818,6 +11829,10 @@ d2009-10-30 Ulrich Drepper <drepper@re
[BZ #4368]
* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
+2007-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ * locale/programs/locarchive.c (add_alias, insert_name): Remove static.
+
2007-04-16 Ulrich Drepper <drepper@redhat.com>
[BZ #4364]
diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c
--- a/locale/programs/locarchive.c 2012-06-05 07:42:49.000000000 -0600
+++ b/locale/programs/locarchive.c 2012-06-07 12:15:21.585319540 -0600
@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo
/* forward decls for below */
static uint32_t add_locale (struct locarhandle *ah, const char *name,
locale_data_t data, bool replace);
-static void add_alias (struct locarhandle *ah, const char *alias,
- bool replace, const char *oldname,
- uint32_t *locrec_offset_p);
+void add_alias (struct locarhandle *ah, const char *alias,
+ bool replace, const char *oldname,
+ uint32_t *locrec_offset_p);
static bool
@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah)
#include "../../intl/explodename.c"
#include "../../intl/l10nflist.c"
-static struct namehashent *
+struct namehashent *
insert_name (struct locarhandle *ah,
const char *name, size_t name_len, bool replace)
{
@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah,
return &namehashtab[idx];
}
-static void
+void
add_alias (struct locarhandle *ah, const char *alias, bool replace,
const char *oldname, uint32_t *locrec_offset_p)
{

View file

@ -0,0 +1,20 @@
From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 3 Nov 2006 16:31:21 +0000
Subject: [PATCH] Change @dircategory.
---
manual/libc.texinfo | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -7,7 +7,7 @@
@include macros.texi
@comment Tell install-info what to do.
-@dircategory Software libraries
+@dircategory Libraries
@direntry
* Libc: (libc). C library.
@end direntry

View file

@ -0,0 +1,21 @@
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

View file

@ -0,0 +1,25 @@
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: $(common-objpfx)dlfcn/libdl.so
-# $(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

12
glibc-fedora-nscd.patch Normal file
View file

@ -0,0 +1,12 @@
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600
@@ -33,7 +33,7 @@
# logfile /var/log/nscd.log
# threads 4
# max-threads 32
-# server-user nobody
+ server-user nscd
# stat-user somebody
debug-level 0
# reload-count 5

View file

@ -0,0 +1,25 @@
From f7001472d8d6ee9c5f83170c850a8a3b3ca0635f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Fri, 20 Aug 2010 17:04:03 +0200
Subject: [PATCH] Fix overflow in nss files parser
* nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
as size_t.
---
ChangeLog | 3 +++
nss/nss_files/files-XXX.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
--- a/nss/nss_files/files-XXX.c
+++ b/nss/nss_files/files-XXX.c
@@ -189,7 +189,7 @@ internal_getent (struct STRUCTURE *result,
{
char *p;
struct parser_data *data = (void *) buffer;
- int linebuflen = buffer + buflen - data->linebuffer;
+ size_t linebuflen = buffer + buflen - data->linebuffer;
int parse_result;
if (buflen < sizeof *data + 2)

View file

@ -0,0 +1,20 @@
glibc-2.3.3-1478-g37582bc
* Thu Nov 30 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-9
- on ppc64 build __libc_start_main without unwind info,
as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the
future that could be fixable just by providing .cfi_undefined r2
in __libc_start_main instead)
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600
@@ -35,6 +35,8 @@ CFLAGS-rtld-memmove.os = $(no-special-re
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -0,0 +1,57 @@
From ee3d4021aaaeacff7cf2addcdaa48859fffba2aa Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 3 Feb 2011 15:45:02 +0100
Subject: [PATCH] Replace setuid by file capabilities
* login/programs/pt_chown.c (main): Check for valid file
descriptor instead of privileges. Be careful to drop all
capabilities when not needed.
---
ChangeLog | 6 ++++++
login/programs/pt_chown.c | 14 +++++++++-----
3 files changed, 16 insertions(+), 6 deletions(-)
--- a/login/programs/pt_chown.c
+++ b/login/programs/pt_chown.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <fcntl.h>
#ifdef HAVE_LIBCAP
# include <sys/capability.h>
# include <sys/prctl.h>
@@ -142,7 +143,7 @@ main (int argc, char *argv[])
uid_t uid = getuid ();
int remaining;
- if (argc == 1 && euid == 0)
+ if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
{
#ifdef HAVE_LIBCAP
/* Drop privileges. */
@@ -175,6 +176,13 @@ main (int argc, char *argv[])
/* We aren't going to be using privileges, so drop them right now. */
setuid (uid);
+#ifdef HAVE_LIBCAP
+ cap_t caps = cap_init ();
+ if (caps == NULL)
+ error (1, errno, "cap_init");
+ cap_set_proc (caps);
+ cap_free (caps);
+#endif
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
@@ -194,9 +202,5 @@ main (int argc, char *argv[])
return EXIT_FAILURE;
}
- /* Check if we are properly installed. */
- if (euid != 0)
- error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
-
return EXIT_SUCCESS;
}

View file

@ -0,0 +1,147 @@
From c1b97d6d896b1f22fdf5d28471ef7859ec840a57 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Wed, 1 Sep 2010 17:26:15 +0200
Subject: [PATCH] Fix handling of collating symbols in regexps
[BZ #11561]
* posix/regcomp.c (parse_bracket_exp): When looking up collating
elements compare against the byte sequence of it, not its name.
---
ChangeLog | 4 +++
posix/regcomp.c | 72 ++++++++++++++++++++----------------------------------
2 files changed, 31 insertions(+), 45 deletions(-)
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -2772,40 +2772,29 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Local function for parse_bracket_exp used in _LIBC environement.
Seek the collating symbol entry correspondings to NAME.
- Return the index of the symbol in the SYMB_TABLE. */
+ Return the index of the symbol in the SYMB_TABLE,
+ or -1 if not found. */
auto inline int32_t
__attribute ((always_inline))
- seek_collating_symbol_entry (name, name_len)
- const unsigned char *name;
- size_t name_len;
+ seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
{
- int32_t hash = elem_hash ((const char *) name, name_len);
- int32_t elem = hash % table_size;
- if (symb_table[2 * elem] != 0)
- {
- int32_t second = hash % (table_size - 2) + 1;
-
- do
- {
- /* First compare the hashing value. */
- if (symb_table[2 * elem] == hash
- /* Compare the length of the name. */
- && name_len == extra[symb_table[2 * elem + 1]]
- /* Compare the name. */
- && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
- name_len) == 0)
- {
- /* Yep, this is the entry. */
- break;
- }
+ int32_t elem;
- /* Next entry. */
- elem += second;
- }
- while (symb_table[2 * elem] != 0);
- }
- return elem;
+ for (elem = 0; elem < table_size; elem++)
+ if (symb_table[2 * elem] != 0)
+ {
+ int32_t idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ if (/* Compare the length of the name. */
+ name_len == extra[idx]
+ /* Compare the name. */
+ && memcmp (name, &extra[idx + 1], name_len) == 0)
+ /* Yep, this is the entry. */
+ return elem;
+ }
+ return -1;
}
/* Local function for parse_bracket_exp used in _LIBC environment.
@@ -2814,8 +2803,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
auto inline unsigned int
__attribute ((always_inline))
- lookup_collation_sequence_value (br_elem)
- bracket_elem_t *br_elem;
+ lookup_collation_sequence_value (bracket_elem_t *br_elem)
{
if (br_elem->type == SB_CHAR)
{
@@ -2843,7 +2831,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
int32_t elem, idx;
elem = seek_collating_symbol_entry (br_elem->opr.name,
sym_name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
@@ -2861,7 +2849,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Return the collation sequence value. */
return *(unsigned int *) (extra + idx);
}
- else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+ else if (sym_name_len == 1)
{
/* No valid character. Match it as a single byte
character. */
@@ -2883,11 +2871,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
auto inline reg_errcode_t
__attribute ((always_inline))
- build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
- re_charset_t *mbcset;
- int *range_alloc;
- bitset_t sbcset;
- bracket_elem_t *start_elem, *end_elem;
+ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
+ bracket_elem_t *start_elem, bracket_elem_t *end_elem)
{
unsigned int ch;
uint32_t start_collseq;
@@ -2966,25 +2951,22 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
auto inline reg_errcode_t
__attribute ((always_inline))
- build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
- re_charset_t *mbcset;
- int *coll_sym_alloc;
- bitset_t sbcset;
- const unsigned char *name;
+ build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+ int *coll_sym_alloc, const unsigned char *name)
{
int32_t elem, idx;
size_t name_len = strlen ((const char *) name);
if (nrules != 0)
{
elem = seek_collating_symbol_entry (name, name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
/* Skip the name of collating element name. */
idx += 1 + extra[idx];
}
- else if (symb_table[2 * elem] == 0 && name_len == 1)
+ else if (name_len == 1)
{
/* No valid character, treat it as a normal
character. */

View file

@ -0,0 +1,80 @@
From 5a0546afb448a71cf045b980eb27c13bf5783920 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 9 Jun 2011 15:36:02 +0200
Subject: [PATCH] Revert "Use .machine to prevent AS from complaining about
z9-109 instructions in iconv modules"
This reverts commit 2739047682590b1df473401b4febf424f857fccf.
---
ChangeLog | 7 -------
sysdeps/s390/s390-64/utf16-utf32-z9.c | 5 +----
sysdeps/s390/s390-64/utf8-utf16-z9.c | 5 +----
sysdeps/s390/s390-64/utf8-utf32-z9.c | 5 +----
4 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3ed77d0..90590d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -684,13 +684,6 @@
* stdlib/bug-getcontext.c: New file.
* stdlib/Makefile: Add rules to build and run bug-getcontext.
-2011-04-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-
- * sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109
- instructions into .machine "z9-109".
- * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise.
- * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise.
-
2011-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes
diff --git a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c
index 5bcaaae..14daf21 100644
--- a/sysdeps/s390/s390-64/utf16-utf32-z9.c
+++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c
@@ -169,10 +169,7 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile (".machine push \n\t" \
- ".machine \"z9-109\" \n\t" \
- "0: " INSTRUCTION " \n\t" \
- ".machine pop \n\t" \
+ asm volatile ("0: " INSTRUCTION " \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \
diff --git a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c
index 812a42f..5f73f3c 100644
--- a/sysdeps/s390/s390-64/utf8-utf16-z9.c
+++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c
@@ -151,10 +151,7 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile (".machine push \n\t" \
- ".machine \"z9-109\" \n\t" \
- "0: " INSTRUCTION " \n\t" \
- ".machine pop \n\t" \
+ asm volatile ("0: " INSTRUCTION " \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \
diff --git a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c
index 0ffd848..17ef8bc 100644
--- a/sysdeps/s390/s390-64/utf8-utf32-z9.c
+++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c
@@ -155,10 +155,7 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile (".machine push \n\t" \
- ".machine \"z9-109\" \n\t" \
- "0: " INSTRUCTION " \n\t" \
- ".machine pop \n\t" \
+ asm volatile ("0: " INSTRUCTION " \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \

View file

@ -0,0 +1,28 @@
This is part of commit glibc-2.3.3-1564-gd0b6ac6
* Fri Mar 14 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-11
- remove <stropts.h>, define _XOPEN_STREAMS -1 (#436349)
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600
@@ -188,4 +188,7 @@
/* Typed memory objects are not available. */
#define _POSIX_TYPED_MEMORY_OBJECTS -1
+/* Streams are not available. */
+#define _XOPEN_STREAMS -1
+
#endif /* bits/posix_opt.h */
diff -Nrup a/streams/Makefile b/streams/Makefile
--- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600
@@ -20,7 +20,7 @@
#
subdir := streams
-headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
include ../Rules

View file

@ -0,0 +1,97 @@
From 96aefb90e843648812d1832789f4a88ea5350605 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Tue, 25 May 2010 15:09:20 +0200
Subject: [PATCH] Avoid strict-aliasing issues
---
elf/Makefile | 1 +
inet/Makefile | 2 ++
nis/Makefile | 2 ++
nss/Makefile | 1 +
resolv/Makefile | 1 +
sunrpc/Makefile | 4 ++++
sysdeps/powerpc/powerpc64/elf/Makefile | 2 ++
7 files changed, 13 insertions(+), 0 deletions(-)
diff -Nrup a/elf/Makefile b/elf/Makefile
--- a/elf/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/elf/Makefile 2012-08-30 09:42:41.980592920 -0600
@@ -50,6 +50,7 @@ include ../Makeconfig
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
endif
before-compile = $(objpfx)trusted-dirs.h
diff -Nrup a/inet/Makefile b/inet/Makefile
--- a/inet/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/inet/Makefile 2012-08-30 09:42:41.981592916 -0600
@@ -54,6 +54,8 @@ tests := htontest test_ifindex tst-ntoa
include ../Rules
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
+
ifeq ($(have-thread-library),yes)
CFLAGS-gethstbyad_r.c = -fexceptions
diff -Nrup a/nis/Makefile b/nis/Makefile
--- a/nis/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/nis/Makefile 2012-08-30 09:42:41.982592912 -0600
@@ -71,6 +71,8 @@ libnss_nisplus-inhibit-o = $(filter-out
include ../Rules
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
+CFLAGS-ypclnt.c += -fno-strict-aliasing
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
diff -Nrup a/nss/Makefile b/nss/Makefile
--- a/nss/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/nss/Makefile 2012-08-30 09:42:42.021592753 -0600
@@ -101,6 +101,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
echo '#include "$<"') > $@.new
mv -f $@.new $@
+CFLAGS-files-hosts.c += -fno-strict-aliasing
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
diff -Nrup a/resolv/Makefile b/resolv/Makefile
--- a/resolv/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/resolv/Makefile 2012-08-30 09:42:42.023592745 -0600
@@ -80,6 +80,7 @@ ifeq (yes,$(have-ssp))
CFLAGS-libresolv += -fstack-protector
endif
CFLAGS-res_hconf.c = -fexceptions
+CFLAGS-res_send.c += -fno-strict-aliasing
# The BIND code elicits some harmless warnings.
+cflags += -Wno-strict-prototypes -Wno-write-strings
diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile
--- a/sunrpc/Makefile 2012-08-29 07:45:37.000000000 -0600
+++ b/sunrpc/Makefile 2012-08-30 09:42:42.024592741 -0600
@@ -150,6 +150,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
CPPFLAGS += $(sunrpc-CPPFLAGS)
BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
+
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-08-30 09:42:17.872692135 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-08-30 09:42:42.024592741 -0600
@@ -37,6 +37,8 @@ CFLAGS-rtld-strnlen.os = $(no-special-re
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+CFLAGS-gmon-start.c += -fno-strict-aliasing
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -0,0 +1,31 @@
From 8c508c82e7ded8bb87e2784e25be9d9f8871d6b9 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Mon, 15 Nov 2004 13:15:02 +0000
Subject: [PATCH] Restore change unintentionally killed during merge.
---
debug/tst-chk1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
index 37320c3..0e5ba88 100644
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -244,7 +244,7 @@ do_test (void)
if (memcmp (a.buf1, "aabcdabcjj", 10))
FAIL ();
-#if __USE_FORTIFY_LEVEL < 2
+#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
/* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
and sufficient GCC support, as the string operations overflow
from a.buf1 into a.buf2. */
@@ -359,7 +359,7 @@ do_test (void)
memset (a.buf1 + 9, 'j', l0 + 2);
CHK_FAIL_END
-# if __USE_FORTIFY_LEVEL >= 2
+# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
# define O 0
# else
# define O 1

View file

@ -0,0 +1,22 @@
From e818d7d5034bd33373aebf570402abdb8e434f6e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Sat, 19 Mar 2005 20:18:00 +0000
Subject: [PATCH] Updated to fedora-glibc-20050319T1907
---
debug/tst-chk1.c | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 229 insertions(+), 5 deletions(-)
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Hack: make sure GCC doesn't know __chk_fail () will not return. */
+#define __noreturn__
+
#include <assert.h>
#include <fcntl.h>
#include <locale.h>

View file

@ -0,0 +1,24 @@
From a45bd0d9682db986191b075e64bcacd038af5993 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Sep 2011 10:45:00 +0200
Subject: [PATCH] Don't treat tls_offset == 1 as forced dynamic
* include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]:
Change to -1.
---
ChangeLog | 5 +++++
include/link.h | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
--- a/include/link.h
+++ b/include/link.h
@@ -289,7 +289,7 @@ struct link_map
#endif
#ifndef FORCED_DYNAMIC_TLS_OFFSET
# if NO_TLS_OFFSET == 0
-# define FORCED_DYNAMIC_TLS_OFFSET 1
+# define FORCED_DYNAMIC_TLS_OFFSET -1
# elif NO_TLS_OFFSET == -1
# define FORCED_DYNAMIC_TLS_OFFSET -2
# else

View file

@ -0,0 +1,61 @@
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 8 Apr 2010 11:18:26 +0200
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
GLIBC_PRIVATE.
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
---
ChangeLog | 8 ++++++++
nptl/Versions | 1 +
nptl/nptl-init.c | 2 +-
nptl/sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
nptl/sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
5 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Versions
--- a/nptl/Version
+++ b/nptl/Versions
@@ -30,6 +30,7 @@ libc {
__libc_alloca_cutoff;
# Internal libc interface to libpthread
__libc_dl_error_tsd;
+ __getrlimit;
}
}
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
--- a/nptl/sysdeps/unix/sysv/linux/i386/Versions
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # Internal libc interface to libpthread
+ __uname;
+ }
+}
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -36,7 +36,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{

View file

@ -0,0 +1,62 @@
From 8a34866d978e4281d69104372056ba0211d1373a Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Tue, 31 Aug 2010 12:20:05 +0200
Subject: [PATCH] Don't parse %s format argument as multibyte string
[BZ #6530]
* stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
change.
---
ChangeLog | 4 ++++
stdio-common/vfprintf.c | 40 ++++------------------------------------
2 files changed, 8 insertions(+), 36 deletions(-)
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
else if (!is_long && spec != L_('S')) \
{ \
if (prec != -1) \
- { \
- /* Search for the end of the string, but don't search past \
- the length (in bytes) specified by the precision. Also \
- don't use incomplete characters. */ \
- if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
- len = __strnlen (string, prec); \
- else \
- { \
- /* In case we have a multibyte character set the \
- situation is more complicated. We must not copy \
- bytes at the end which form an incomplete character. */\
- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
- wchar_t ignore[ignore_size]; \
- const char *str2 = string; \
- const char *strend = string + prec; \
- if (strend < string) \
- strend = (const char *) UINTPTR_MAX; \
- \
- mbstate_t ps; \
- memset (&ps, '\0', sizeof (ps)); \
- \
- while (str2 != NULL && str2 < strend) \
- if (__mbsnrtowcs (ignore, &str2, strend - str2, \
- ignore_size, &ps) == (size_t) -1) \
- { \
- /* Conversion function has set errno. */ \
- done = -1; \
- goto all_done; \
- } \
- \
- if (str2 == NULL) \
- len = strlen (string); \
- else \
- len = str2 - string - (ps.__count & 7); \
- } \
- } \
+ /* Search for the end of the string, but don't search past \
+ the length (in bytes) specified by the precision. */ \
+ len = __strnlen (string, prec); \
else \
len = strlen (string); \
} \

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
--- glibc-2.16.90-97bc38d7/sysdeps/unix/sysv/linux/i386/sysdep.h.orig 2012-09-26 14:37:31.073094914 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/unix/sysv/linux/i386/sysdep.h 2012-09-26 14:37:42.928095292 -0300
@@ -27,6 +27,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h

View file

@ -15,11 +15,11 @@
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.c: New file.
* sysdeps/unix/sysv/linux/i386/i586/hp-timing.h: New file.
--- glibc-2.4.90/elf/rtld.c.i586-hptiming 2006-04-27 14:54:33.000000000 +0200
+++ glibc-2.4.90/elf/rtld.c 2006-05-17 08:31:50.000000000 +0200
@@ -17,6 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
--- glibc-2.16.90-97bc38d7/elf/rtld.c.orig 2012-09-26 15:04:35.933146909 -0300
+++ glibc-2.16.90-97bc38d7/elf/rtld.c 2012-09-26 15:17:00.030170722 -0300
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Early statistics require high-precision timing. */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
@ -27,7 +27,7 @@
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
@@ -178,6 +181,12 @@ static void dl_main (const ElfW(Phdr) *p
@@ -193,6 +196,12 @@ static void dl_main (const ElfW(Phdr) *p
static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2;
@ -40,7 +40,7 @@
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
@@ -311,9 +320,8 @@ _dl_start_final (void *arg, struct dl_st
@@ -324,9 +333,8 @@ _dl_start_final (void *arg, struct dl_st
#endif
@ -52,9 +52,9 @@
/* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0);
--- glibc-2.4.90/sysdeps/generic/ldsodefs.h.i586-hptiming 2006-05-10 15:42:19.000000000 +0200
+++ glibc-2.4.90/sysdeps/generic/ldsodefs.h 2006-05-17 08:13:21.000000000 +0200
@@ -408,7 +408,7 @@ struct rtld_global
--- glibc-2.16.90-97bc38d7/sysdeps/generic/ldsodefs.h.orig 2012-09-14 17:31:29.000000000 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/generic/ldsodefs.h 2012-09-26 15:17:00.030170722 -0300
@@ -309,7 +309,7 @@ struct rtld_global
/* The object to be initialized first. */
EXTERN struct link_map *_dl_initfirst;
@ -63,7 +63,7 @@
/* Start time on CPU clock. */
EXTERN hp_timing_t _dl_cpuclock_offset;
#endif
@@ -619,7 +619,7 @@ struct rtld_global_ro
@@ -522,7 +522,7 @@ struct rtld_global_ro
/* All search directories defined at startup. */
EXTERN struct r_search_path_elem *_dl_init_all_dirs;
@ -72,20 +72,13 @@
/* Overhead of a high-precision timing measurement. */
EXTERN hp_timing_t _dl_hp_timing_overhead;
#endif
--- glibc-2.4.90/sysdeps/i386/i586/Makefile.i586-hptiming 2006-05-17 06:35:29.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/Makefile 2006-05-17 06:35:41.000000000 +0200
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.c.i586-hptiming 2006-05-17 06:36:28.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.c 2006-05-17 08:17:51.000000000 +0200
--- glibc-2.16.90-97bc38d7/sysdeps/i386/i586/hp-timing.c.orig 2012-09-26 15:16:32.425169831 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/i386/i586/hp-timing.c 2012-09-26 15:17:00.030170722 -0300
@@ -0,0 +1,2 @@
+/* We can use the i686 implementation without changes. */
+#include <sysdeps/i386/i686/hp-timing.c>
--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.h.i586-hptiming 2006-05-17 06:37:28.000000000 +0200
+++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.h 2006-05-17 08:30:06.000000000 +0200
--- glibc-2.16.90-97bc38d7/sysdeps/i386/i586/hp-timing.h.orig 2012-09-26 15:16:45.313170250 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/i386/i586/hp-timing.h 2012-09-26 15:17:00.030170722 -0300
@@ -0,0 +1,43 @@
+#ifndef _HP_HWCAP_TIMING_H
+#define _HP_HWCAP_TIMING_H 1
@ -130,3 +123,10 @@
+#endif
+
+#endif /* hp-timing.h */
--- glibc-2.16.90-97bc38d7/sysdeps/i386/i586/Makefile.orig 2012-09-26 15:16:17.042169354 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/i386/i586/Makefile 2012-09-26 15:17:00.030170722 -0300
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif

View file

@ -0,0 +1,11 @@
--- glibc-2.16.90-97bc38d7/scripts/check-local-headers.sh.orig 2012-09-26 14:20:47.645062807 -0300
+++ glibc-2.16.90-97bc38d7/scripts/check-local-headers.sh 2012-09-26 14:20:59.863063231 -0300
@@ -31,7 +31,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -1,6 +1,6 @@
--- glibc-2.14-121-g5551a7b/nss/nsswitch.c.nss-upgrade 2011-07-20 02:41:44.000000000 +0200
+++ glibc-2.14-121-g5551a7b/nss/nsswitch.c 2011-07-24 01:06:25.658666115 +0200
@@ -330,9 +330,20 @@ nss_load_library (service_user *ni)
--- glibc-2.16.90-97bc38d7/nss/nsswitch.c.orig 2012-09-26 15:02:37.919143036 -0300
+++ glibc-2.16.90-97bc38d7/nss/nsswitch.c 2012-09-26 15:03:35.790145004 -0300
@@ -356,9 +356,20 @@ nss_load_library (service_user *ni)
ni->library->lib_handle = __libc_dlopen (shlib_name);
if (ni->library->lib_handle == NULL)
{
@ -22,5 +22,5 @@
+ __set_errno (saved_errno);
+ }
}
# ifdef USE_NSCD
else if (is_nscd)
{

View file

@ -0,0 +1,22 @@
--- glibc-2.16.90-97bc38d7/Makeconfig.orig 2012-09-26 13:48:22.726000556 -0300
+++ glibc-2.16.90-97bc38d7/Makeconfig 2012-09-26 13:48:36.276000993 -0300
@@ -216,7 +216,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)
--- glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.in.orig 2012-09-27 13:08:49.949074767 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.in 2012-09-27 13:09:22.748076063 -0300
@@ -18,7 +18,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${exec_prefix}/share/locale'
fi
;;
*)

View file

@ -0,0 +1,44 @@
--- glibc-2.16.90-97bc38d7/misc/tst-error1.c.orig 2012-09-26 15:21:29.672179348 -0300
+++ glibc-2.16.90-97bc38d7/misc/tst-error1.c 2012-09-26 15:21:59.422180301 -0300
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.16.90-97bc38d7/posix/regexbug1.c.orig 2012-09-26 15:23:13.175182590 -0300
+++ glibc-2.16.90-97bc38d7/posix/regexbug1.c 2012-09-26 15:23:32.198183235 -0300
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c.orig 2012-09-26 15:23:52.887183970 -0300
+++ glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c 2012-09-26 15:24:13.870184603 -0300
@@ -92,7 +92,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)

View file

@ -0,0 +1,16 @@
--- glibc-2.16.90-97bc38d7/rt/Makefile.orig 2012-09-26 14:34:25.122088945 -0300
+++ glibc-2.16.90-97bc38d7/rt/Makefile 2012-09-26 14:34:35.001089362 -0300
@@ -78,3 +78,13 @@ $(tests:%=$(objpfx)%-bp): $(objpfx)librt
endif
tst-mqueue7-ARGS = -- $(built-program-cmd)
+
+# XXX avoid timing issues on fine-grained SMT systems
+ifeq (powerpc, $(base-machine))
+no-parallel-testing = yes
+endif
+ifneq ($(filter %tests,$(MAKECMDGOALS)),)
+ifeq ($(no-parallel-testing),yes)
+.NOTPARALLEL:
+endif
+endif

View file

@ -1,157 +0,0 @@
diff -Nrup a/elf/dl-close.c b/elf/dl-close.c
--- a/elf/dl-close.c 2012-01-25 21:49:58.892869984 -0700
+++ b/elf/dl-close.c 2012-01-25 21:50:22.283882509 -0700
@@ -32,6 +32,7 @@
#include <sys/mman.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
/* Type of the constructor functions. */
@@ -469,6 +470,7 @@ _dl_close_worker (struct link_map *map)
struct r_debug *r = _dl_debug_initialize (0, nsid);
r->r_state = RT_DELETE;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_start, 2, nsid, r);
if (unload_global)
{
@@ -738,6 +740,7 @@ _dl_close_worker (struct link_map *map)
/* Notify the debugger those objects are finalized and gone. */
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_complete, 2, nsid, r);
/* Recheck if we need to retry, release the lock. */
out:
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-01-25 21:49:58.895869986 -0700
+++ b/elf/dl-load.c 2012-01-25 21:50:22.288882511 -0700
@@ -36,6 +36,7 @@
#include <stackinfo.h>
#include <caller.h>
#include <sysdep.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -881,7 +882,7 @@ _dl_init_paths (const char *llp)
static void
__attribute__ ((noreturn, noinline))
lose (int code, int fd, const char *name, char *realname, struct link_map *l,
- const char *msg, struct r_debug *r)
+ const char *msg, struct r_debug *r, Lmid_t nsid)
{
/* The file might already be closed. */
if (fd != -1)
@@ -895,6 +896,7 @@ lose (int code, int fd, const char *name
{
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, nsid, r);
}
_dl_signal_error (code, name, NULL, msg);
@@ -933,7 +935,7 @@ _dl_map_object_from_fd (const char *name
errval = errno;
call_lose:
lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL);
+ make_consistent ? r : NULL, nsid);
}
/* Look again to see if the real name matched another already loaded. */
@@ -1040,6 +1042,7 @@ _dl_map_object_from_fd (const char *name
linking has not been used before. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_start, 2, nsid, r);
make_consistent = true;
}
else
@@ -1735,7 +1738,7 @@ open_verify (const char *name, struct fi
name = strdupa (realname);
free (realname);
}
- lose (errval, fd, name, NULL, NULL, errstring, NULL);
+ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0);
}
/* See whether the ELF header is what we expect. */
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-open.c 2012-01-25 21:50:22.291882514 -0700
@@ -33,6 +33,7 @@
#include <caller.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -292,6 +293,7 @@ dl_open_worker (void *a)
struct r_debug *r = _dl_debug_initialize (0, args->nsid);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, args->nsid, r);
/* Print scope information. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
@@ -308,10 +310,18 @@ dl_open_worker (void *a)
struct link_map *l = new;
while (l->l_next)
l = l->l_next;
+ int relocation_in_progress = 0;
while (1)
{
if (! l->l_real->l_relocated)
{
+ if (! relocation_in_progress)
+ {
+ /* Notify the debugger that relocations are about to happen. */
+ LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r);
+ relocation_in_progress = 1;
+ }
+
#ifdef SHARED
if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
{
@@ -481,6 +491,10 @@ cannot load any more object with static
}
}
+ /* Notify the debugger all new objects have been relocated. */
+ if (relocation_in_progress)
+ LIBC_PROBE (rtld_reloc_complete, 2, args->nsid, r);
+
/* Run the initializer functions of new objects. */
_dl_init (new, args->argc, args->argv, args->env);
diff -Nrup a/elf/rtld.c b/elf/rtld.c
--- a/elf/rtld.c 2012-01-25 21:49:58.898869987 -0700
+++ b/elf/rtld.c 2012-01-25 21:53:42.262987201 -0700
@@ -40,6 +40,7 @@
#include <dl-osinfo.h>
#include <dl-procinfo.h>
#include <tls.h>
+#include <stap-probe.h>
#include <stackinfo.h>
#include <assert.h>
@@ -1670,6 +1671,7 @@ ERROR: ld.so: object '%s' cannot be load
/* We start adding objects. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_start, 2, LM_ID_BASE, r);
/* Auditing checkpoint: we are ready to signal that the initial map
is being constructed. */
@@ -2382,6 +2384,7 @@ ERROR: ld.so: object '%s' cannot be load
r = _dl_debug_initialize (0, LM_ID_BASE);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_complete, 2, LM_ID_BASE, r);
#ifndef MAP_COPY
/* We must munmap() the cache file. */

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/it_IT b/localedata/locales/it_IT
index 31acd53..9513970 100644
--- a/localedata/locales/it_IT
+++ b/localedata/locales/it_IT
@@ -124,6 +124,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025>/
<U0062><U0020><U0025><U0059><U002C><U0020><U0025><U0048><U002E>/
<U0025><U004D><U002E><U0025><U0053><U002C><U0020><U0025><U005A>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/ca_ES b/localedata/locales/ca_ES
index cd83bcc..3c14340 100644
--- a/localedata/locales/ca_ES
+++ b/localedata/locales/ca_ES
@@ -138,6 +138,8 @@ t_fmt_ampm ""
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>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

View file

@ -1,27 +0,0 @@
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700
@@ -438,6 +438,10 @@ __pthread_cond_wait:
addl $1, cond_futex(%ebx)
movl cond_futex(%ebx), %ebp
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ addl $1, total_seq(%ebx)
+ adcl $0, total_seq+4(%ebx)
+
/* Unlock. */
LOCK
#if cond_lock == 0
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700
@@ -366,6 +366,9 @@ __pthread_cond_wait:
incl cond_futex(%rdi)
movl cond_futex(%rdi), %edx
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ incq total_seq(%rdi)
+
/* Release internal lock. */
LOCK
#if cond_lock == 0

View file

@ -1,12 +0,0 @@
diff -rup a/manual/stdio.texi b/manual/stdio.texi
--- a/manual/stdio.texi 2012-01-01 05:16:32.000000000 -0700
+++ b/manual/stdio.texi 2012-02-09 23:46:31.660912211 -0700
@@ -2324,6 +2324,8 @@ the @var{size} argument specifies the ma
produce. The trailing null character is counted towards this limit, so
you should allocate at least @var{size} characters for the string @var{s}.
+The trailing null byte is added to @var{s}, unless @var{size} is zero.
+
The return value is the number of characters which would be generated
for the given input, excluding the trailing null. If this value is
greater or equal to @var{size}, not all characters from the result have

View file

@ -1,13 +0,0 @@
diff --git a/localedata/locales/lt_LT b/localedata/locales/lt_LT
index b709d83..63cb6de 100644
--- a/localedata/locales/lt_LT
+++ b/localedata/locales/lt_LT
@@ -2191,6 +2191,8 @@ t_fmt_ampm ""
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>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_MESSAGES

View file

@ -1,13 +0,0 @@
diff -rup a/localedata/locales/ru_UA b/localedata/locales/ru_UA
--- a/localedata/locales/ru_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/ru_UA 2012-02-09 22:57:29.698433625 -0700
@@ -141,6 +141,8 @@ t_fmt_ampm ""
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>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
Only in b/localedata/locales: uk_UA.rej

View file

@ -1,56 +0,0 @@
diff -rup a/elf/dl-deps.c b/elf/dl-deps.c
--- a/elf/dl-deps.c 2012-01-23 14:28:15.888185967 -0700
+++ b/elf/dl-deps.c 2012-01-23 14:29:11.620197431 -0700
@@ -634,7 +634,7 @@ Filters not supported with LD_TRACE_PREL
/* We can skip looking for the binary itself which is at the front
of the search list. */
i = 1;
- char seen[nlist];
+ uint16_t seen[nlist];
memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
@@ -660,13 +660,13 @@ Filters not supported with LD_TRACE_PREL
(k - i) * sizeof (l_initfini[0]));
l_initfini[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nlist - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;
diff -rup a/elf/dl-fini.c b/elf/dl-fini.c
--- a/elf/dl-fini.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-fini.c 2012-01-23 14:29:39.661203226 -0700
@@ -39,7 +39,7 @@ _dl_sort_fini (struct link_map **maps, s
/* We can skip looking for the binary itself which is at the front
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
@@ -79,13 +79,13 @@ _dl_sort_fini (struct link_map **maps, s
used[k] = here_used;
}
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
seen[k] = this_seen;

View file

@ -1,16 +1,52 @@
2011-09-01 Andreas Schwab <schwab@redhat.com>
diff -rup a/resolv/res_query.c b/resolv/res_query.c
--- a/resolv/res_query.c 2012-02-16 22:51:17.451796009 -0700
+++ b/resolv/res_query.c 2012-02-16 22:54:42.522623598 -0700
@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
int *resplen2)
{
HEADER *hp = (HEADER *) answer;
+ HEADER *hp2;
int n, use_malloc = 0;
u_int oflags = statp->_flags;
* resolv/res_query.c (__libc_res_nquery): Update assertion.
@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
/* __libc_res_nsend might have reallocated the buffer. */
hp = (HEADER *) *answerp;
diff -ru a/resolv/res_query.c b/resolv/res_query.c
--- a/resolv/res_query.c 2011-12-12 14:10:52.000000000 -0700
+++ b/resolv/res_query.c 2011-12-12 14:23:04.832739111 -0700
@@ -248,7 +248,7 @@
&& *resplen2 > (int) sizeof (HEADER))
- /* We simplify the following tests by assigning HP to HP2. It
- is easy to verify that this is the same as ignoring all
- tests of HP2. */
- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
-
- if (n < (int) sizeof (HEADER) && answerp2 != NULL
- && *resplen2 > (int) sizeof (HEADER))
+ /* We simplify the following tests by assigning HP to HP2 or
+ vice versa. It is easy to verify that this is the same as
+ ignoring all tests of HP or HP2. */
+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
{
/* Special case of partial answer. */
- /* Special case of partial answer. */
- assert (hp != hp2);
+ assert (n == 0 || hp != hp2);
hp = hp2;
- hp = hp2;
+ hp2 = hp;
}
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
- && n > (int) sizeof (HEADER))
+ else
{
- /* Special case of partial answer. */
- assert (hp != hp2);
- hp2 = hp;
+ hp2 = (HEADER *) *answerp2;
+ if (n < (int) sizeof (HEADER))
+ {
+ hp = hp2;
+ }
}
+ /* Make sure both hp and hp2 are defined */
+ assert((hp != NULL) && (hp2 != NULL));
+
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
&& (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
#ifdef DEBUG

55
glibc-rh739743.patch Normal file
View file

@ -0,0 +1,55 @@
2009-04-26 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
result if the result has no associated interface.
---
sysdeps/posix/getaddrinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1456,13 +1456,13 @@
/* Fill in the results in all the records. */
for (int i = 0; i < src->nresults; ++i)
- if (src->results[i].index == a1_index)
+ if (a1_index != -1 && src->results[i].index == a1_index)
{
assert (src->results[i].native == -1
|| src->results[i].native == a1_native);
src->results[i].native = a1_native;
}
- else if (src->results[i].index == a2_index)
+ else if (a2_index != -1 && src->results[i].index == a2_index)
{
assert (src->results[i].native == -1
|| src->results[i].native == a2_native);
2009-03-15 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect
interface for all 127.X.Y.Z addresses.
---
sysdeps/posix/getaddrinfo.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -2265,7 +2265,14 @@
tmp.addr[0] = 0;
tmp.addr[1] = 0;
tmp.addr[2] = htonl (0xffff);
- tmp.addr[3] = sinp->sin_addr.s_addr;
+ /* Special case for lo interface, the source address
+ being possibly different than the interface
+ address. */
+ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
+ == 0x7f000000)
+ tmp.addr[3] = htonl(0x7f000001);
+ else
+ tmp.addr[3] = sinp->sin_addr.s_addr;
}
else
{

View file

@ -1,40 +0,0 @@
* malloc/arena.c (arena_get2): Avoid unnecessarily
retrieving #cpus from /proc.
* malloc/malloc.c (mALLOPt): Clamp arena_test based on
the value of arena_max.
commit 41b81892f11fe1353123e892158b53de73863d62
Author: Ulrich Drepper <drepper@gmail.com>
Date: Tue Jan 31 14:42:34 2012 -0500
Handle ARENA_TEST correctly
diff --git a/malloc/arena.c b/malloc/arena.c
index d3cf4b9..b1c9469 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
{
if (mp_.arena_max != 0)
narenas_limit = mp_.arena_max;
- else
+ else if (narenas > mp_.arena_test)
{
int n = __get_nprocs ();
@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
}
repeat:;
size_t n = narenas;
- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
+ /* NB: the following depends on the fact that (size_t)0 - 1 is a
+ very large number and that the underflow is OK. If arena_max
+ is set the value of arena_test is irrelevant. If arena_test
+ is set but narenas is not yet larger or equal to arena_test
+ narenas_limit is 0. There is no possibility for narenas to
+ be too big for the test to always fail since there is not
+ enough address space to create that many arenas. */
+ if (__builtin_expect (n <= narenas_limit - 1, 0))
{
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
goto repeat;

View file

@ -1,10 +1,10 @@
diff -rup a/time/sys/time.h b/time/sys/time.h
--- a/time/sys/time.h 2012-01-01 05:16:32.000000000 -0700
+++ b/time/sys/time.h 2012-01-26 11:16:44.309112430 -0700
@@ -78,7 +78,7 @@ extern int gettimeofday (struct timeval
diff -rup c/time/sys/time.h d/time/sys/time.h
--- c/time/sys/time.h 2012-05-20 19:47:38.000000000 -0600
+++ d/time/sys/time.h 2012-05-21 00:14:17.033127079 -0600
@@ -77,7 +77,7 @@ extern int gettimeofday (struct timeval
This call is restricted to the super-user. */
extern int settimeofday (__const struct timeval *__tv,
__const struct timezone *__tz)
extern int settimeofday (const struct timeval *__tv,
const struct timezone *__tz)
- __THROW __nonnull ((1));
+ __THROW;

View file

@ -1,8 +1,7 @@
Index: glibc-2.12-2-gc4ccff1/malloc/arena.c
===================================================================
--- glibc-2.12-2-gc4ccff1.orig/malloc/arena.c
+++ glibc-2.12-2-gc4ccff1/malloc/arena.c
@@ -870,7 +870,7 @@ heap_trim(heap, pad) heap_info *heap; si
diff -Nrup a/malloc/arena.c b/malloc/arena.c
--- a/malloc/arena.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/arena.c 2012-05-30 00:13:40.683514016 -0600
@@ -673,7 +673,7 @@ heap_trim(heap_info *heap, size_t pad)
heap = prev_heap;
if(!prev_inuse(p)) { /* consolidate backward */
p = prev_chunk(p);
@ -11,11 +10,10 @@ Index: glibc-2.12-2-gc4ccff1/malloc/arena.c
}
assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0);
assert( ((char*)p + new_size) == ((char*)heap + heap->size) );
Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c
===================================================================
--- glibc-2.12-2-gc4ccff1.orig/malloc/hooks.c
+++ glibc-2.12-2-gc4ccff1/malloc/hooks.c
@@ -219,7 +219,9 @@ top_check()
diff -Nrup a/malloc/hooks.c b/malloc/hooks.c
--- a/malloc/hooks.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/hooks.c 2012-05-30 00:13:40.684514011 -0600
@@ -191,7 +191,9 @@ top_check(void)
(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
return 0;
@ -25,11 +23,10 @@ Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c
/* Try to set up a new top chunk. */
brk = MORECORE(0);
Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
===================================================================
--- glibc-2.12-2-gc4ccff1.orig/malloc/malloc.c
+++ glibc-2.12-2-gc4ccff1/malloc/malloc.c
@@ -1541,12 +1541,14 @@
diff -Nrup a/malloc/malloc.c b/malloc/malloc.c
--- a/malloc/malloc.c 2012-05-29 16:45:53.000000000 -0600
+++ b/malloc/malloc.c 2012-05-30 00:13:40.686514001 -0600
@@ -1424,12 +1424,14 @@ typedef struct malloc_chunk* mbinptr;
#define last(b) ((b)->bk)
/* Take a chunk off a bin list */
@ -47,7 +44,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
FD->bk = BK; \
BK->fd = FD; \
if (!in_smallbin_range (P->size) \
@@ -2593,7 +2595,9 @@
@@ -2511,7 +2513,9 @@ static void* sysmalloc(INTERNAL_SIZE_T n
else if (contiguous(av) && old_size && brk < old_end) {
/* Oops! Someone else killed our space.. Can't touch anything. */
@ -57,7 +54,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
}
/*
@@ -3467,7 +3471,9 @@
@@ -3345,7 +3349,9 @@ _int_malloc(mstate av, size_t bytes)
{
errstr = "malloc(): memory corruption (fast)";
errout:
@ -67,7 +64,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
return NULL;
}
check_remalloced_chunk(av, victim, nb);
@@ -3552,8 +3558,12 @@
@@ -3430,8 +3436,12 @@ _int_malloc(mstate av, size_t bytes)
bck = victim->bk;
if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
|| __builtin_expect (victim->size > av->system_mem, 0))
@ -82,7 +79,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
size = chunksize(victim);
/*
@@ -3694,7 +3704,7 @@
@@ -3572,7 +3582,7 @@ _int_malloc(mstate av, size_t bytes)
victim = victim->fd;
remainder_size = size - nb;
@ -91,7 +88,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
/* Exhaust */
if (remainder_size < MINSIZE) {
@@ -3792,7 +3802,7 @@
@@ -3670,7 +3680,7 @@ _int_malloc(mstate av, size_t bytes)
remainder_size = size - nb;
/* unlink */
@ -100,7 +97,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
/* Exhaust */
if (remainder_size < MINSIZE) {
@@ -3927,9 +3937,11 @@
@@ -3805,9 +3815,11 @@ _int_free(mstate av, mchunkptr p, int ha
{
errstr = "free(): invalid pointer";
errout:
@ -112,8 +109,8 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
+ mutex_lock(&av->mutex);
return;
}
/* We know that each chunk is at least MINSIZE bytes in size. */
@@ -4073,7 +4085,7 @@
/* We know that each chunk is at least MINSIZE bytes in size or a
@@ -3952,7 +3964,7 @@ _int_free(mstate av, mchunkptr p, int ha
prevsize = p->prev_size;
size += prevsize;
p = chunk_at_offset(p, -((long) prevsize));
@ -122,7 +119,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
}
if (nextchunk != av->top) {
@@ -4082,7 +4094,7 @@
@@ -3961,7 +3973,7 @@ _int_free(mstate av, mchunkptr p, int ha
/* consolidate forward */
if (!nextinuse) {
@ -131,7 +128,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
size += nextsize;
} else
clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4243,7 +4255,7 @@
@@ -4122,7 +4134,7 @@ static void malloc_consolidate(mstate av
prevsize = p->prev_size;
size += prevsize;
p = chunk_at_offset(p, -((long) prevsize));
@ -140,7 +137,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
}
if (nextchunk != av->top) {
@@ -4251,7 +4263,7 @@
@@ -4130,7 +4142,7 @@ static void malloc_consolidate(mstate av
if (!nextinuse) {
size += nextsize;
@ -149,7 +146,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
} else
clear_inuse_bit_at_offset(nextchunk, 0);
@@ -4320,7 +4332,9 @@
@@ -4199,7 +4211,9 @@ _int_realloc(mstate av, mchunkptr oldp,
{
errstr = "realloc(): invalid old size";
errout:
@ -159,7 +156,7 @@ Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
return NULL;
}
@@ -4362,7 +4376,7 @@
@@ -4241,7 +4255,7 @@ _int_realloc(mstate av, mchunkptr oldp,
(unsigned long)(newsize = oldsize + nextsize) >=
(unsigned long)(nb)) {
newp = oldp;

76
glibc-rh767693-2.patch Normal file
View file

@ -0,0 +1,76 @@
diff -rup a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
--- a/sunrpc/svc_tcp.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_tcp.c 2012-06-05 11:30:09.948733571 -0600
@@ -44,6 +44,7 @@
#include <sys/poll.h>
#include <errno.h>
#include <stdlib.h>
+#include <time.h>
#include <wchar.h>
#include <libio/iolibio.h>
@@ -247,6 +248,11 @@ again:
{
if (errno == EINTR)
goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
return FALSE;
}
/*
diff -rup a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
--- a/sunrpc/svc_udp.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_udp.c 2012-06-05 11:30:09.948733571 -0600
@@ -40,6 +40,7 @@
#include <sys/socket.h>
#include <errno.h>
#include <libintl.h>
+#include <time.h>
#ifdef IP_PKTINFO
#include <sys/uio.h>
@@ -277,8 +278,16 @@ again:
(int) su->su_iosz, 0,
(struct sockaddr *) &(xprt->xp_raddr), &len);
xprt->xp_addrlen = len;
- if (rlen == -1 && errno == EINTR)
- goto again;
+ if (rlen == -1)
+ {
+ if (errno == EINTR)
+ goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
+ }
if (rlen < 16) /* < 4 32-bit ints? */
return FALSE;
xdrs->x_op = XDR_DECODE;
diff -rup a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
--- a/sunrpc/svc_unix.c 2012-05-31 20:37:43.000000000 -0600
+++ b/sunrpc/svc_unix.c 2012-06-05 11:30:36.495612770 -0600
@@ -46,6 +46,7 @@
#include <errno.h>
#include <stdlib.h>
#include <libintl.h>
+#include <time.h>
#include <wchar.h>
/*
@@ -244,6 +245,11 @@ again:
{
if (errno == EINTR)
goto again;
+ if (errno == EMFILE)
+ {
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+ __nanosleep(&ts , NULL);
+ }
return FALSE;
}
/*

217
glibc-rh769421.patch Normal file
View file

@ -0,0 +1,217 @@
diff -Nrup c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:20.732670548 -0600
+++ d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:52.667518135 -0600
@@ -137,7 +137,6 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 18f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
movl %ebp, %edx
xorl %esi, %esi
@@ -151,9 +150,6 @@ __pthread_cond_wait:
sete 16(%esp)
je 19f
- cmpl $-EAGAIN, %eax
- je 91f
-
/* Normal and PI futexes dont mix. Use normal futex functions only
if the kernel does not support the PI futex functions. */
cmpl $-ENOSYS, %eax
@@ -398,78 +394,6 @@ __pthread_cond_wait:
#endif
call __lll_unlock_wake
jmp 11b
-
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
-
- /* Get internal lock. */
- movl $1, %edx
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %edx, (%ebx)
-#else
- cmpxchgl %edx, cond_lock(%ebx)
-#endif
- jz 92f
-
-#if cond_lock == 0
- movl %ebx, %edx
-#else
- leal cond_lock(%ebx), %edx
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_lock_wait
-
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- addl $1, cond_futex(%ebx)
- movl cond_futex(%ebx), %ebp
-
- /* Unlock. */
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- je 93f
-#if cond_lock == 0
- movl %ebx, %eax
-#else
- leal cond_lock(%ebx), %eax
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_unlock_wake
-
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorl %ecx, %ecx
- movl dep_mutex(%ebx), %edi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -642,10 +566,6 @@ __condvar_w_cleanup:
.long .LcleanupEND-.Lsub_cond_futex
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
- .long .LcleanupSTART2-.LSTARTCODE
- .long .LcleanupEND2-.LcleanupSTART2
- .long __condvar_w_cleanup-.LSTARTCODE
- .uleb128 0
.long .LcallUR-.LSTARTCODE
.long .LENDCODE-.LcallUR
.long 0
diff -Nrup c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-20 23:58:20.736670528 -0600
+++ d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-21 00:01:39.870720001 -0600
@@ -136,14 +136,11 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 61f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
movl $SYS_futex, %eax
syscall
movl $1, %r8d
- cmpq $-EAGAIN, %rax
- je 91f
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
@@ -331,69 +328,6 @@ __pthread_cond_wait:
13: movq %r10, %rax
jmp 14b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
- movq 8(%rsp), %rdi
-
- /* Get internal lock. */
- movl $1, %esi
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %esi, (%rdi)
-#else
- cmpxchgl %esi, cond_lock(%rdi)
-#endif
- jz 92f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- callq __lll_lock_wait
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- incl cond_futex(%rdi)
- movl cond_futex(%rdi), %edx
-
- /* Release internal lock. */
- LOCK
-#if cond_lock == 0
- decl (%rdi)
-#else
- decl cond_lock(%rdi)
-#endif
- jz 93f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- /* The call preserves %rdx. */
- callq __lll_unlock_wake
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorq %r10, %r10
- mov dep_mutex(%rdi), %R8_LP
- leaq cond_futex(%rdi), %rdi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -546,15 +480,11 @@ __condvar_cleanup1:
.uleb128 .LcleanupSTART-.LSTARTCODE
.uleb128 .LcleanupEND-.LcleanupSTART
.uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
- .uleb128 .LcleanupSTART2-.LSTARTCODE
- .uleb128 .LcleanupEND2-.LcleanupSTART2
- .uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
+ .uleb128 0
.uleb128 .LcallUR-.LSTARTCODE
.uleb128 .LENDCODE-.LcallUR
.uleb128 0
- .uleb128 0
+ .uleb128 0
.Lcstend:

View file

@ -21,101 +21,3 @@ diff -rup a/fedora/nscd.service b/fedora/nscd.service
[Install]
WantedBy=multi-user.target
diff -rup a/nscd/nscd.c b/nscd/nscd.c
--- a/nscd/nscd.c 2012-01-01 05:16:32.000000000 -0700
+++ b/nscd/nscd.c 2012-02-03 13:07:50.509740586 -0700
@@ -72,7 +72,12 @@ thread_info_t thread_info;
int do_shutdown;
int disabled_passwd;
int disabled_group;
-int go_background = 1;
+
+/* Default is to daemonize. Set to 1 to run in foreground in
+ debugging mode, or negative to run in foreground but otherwise
+ behave like a daemon, i.e., detach from terminal and use
+ syslog. */
+static int run_in_foreground = 0;
static const char *conffile = _PATH_NSCDCONF;
@@ -104,6 +109,8 @@ static const struct argp_option options[
N_("Read configuration data from NAME") },
{ "debug", 'd', NULL, 0,
N_("Do not fork and display messages on the current tty") },
+ { "foreground", 'F', NULL, 0,
+ N_("Do not fork, but otherwise behave like a deamon") },
{ "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
{ "shutdown", 'K', NULL, 0, N_("Shut the server down") },
{ "statistics", 'g', NULL, 0, N_("Print current configuration statistics") },
@@ -174,16 +181,22 @@ main (int argc, char **argv)
/* Determine page size. */
pagesize_m1 = getpagesize () - 1;
- /* Behave like a daemon. */
- if (go_background)
+ if (run_in_foreground <= 0)
{
int i;
+ pid_t pid;
- pid_t pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ /* Behave like a daemon. */
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
+ else
+ fprintf (stderr, _("further output sent to syslog\n"));
int nullfd = open (_PATH_DEVNULL, O_RDWR);
if (nullfd != -1)
@@ -234,11 +247,14 @@ main (int argc, char **argv)
for (i = min_close_fd; i < getdtablesize (); i++)
close (i);
- pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
setsid ();
@@ -260,7 +276,7 @@ main (int argc, char **argv)
signal (SIGTSTP, SIG_IGN);
}
else
- /* In foreground mode we are not paranoid. */
+ /* In debug mode we are not paranoid. */
paranoia = 0;
signal (SIGINT, termination_handler);
@@ -309,7 +325,11 @@ parse_opt (int key, char *arg, struct ar
{
case 'd':
++debug_level;
- go_background = 0;
+ run_in_foreground = 1;
+ break;
+
+ case 'F':
+ run_in_foreground = -1;
break;
case 'f':

View file

@ -1,12 +0,0 @@
diff -rup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:34:07.018768021 -0700
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:35:28.813356195 -0700
@@ -31,7 +31,7 @@ elide-routines.os += hp-timing
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
endif

View file

@ -1,144 +0,0 @@
commit 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4
Author: Ulrich Drepper <drepper@gmail.com>
Date: Fri Jan 20 22:39:54 2012 -0500
Do not cache negative results in nscd if these are transient
diff --git a/nscd/aicache.c b/nscd/aicache.c
index aaaf80d..e1f1244 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -514,8 +514,9 @@ next_nip:
if (fd != -1)
TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store the
+ result, so be it. */
+ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index e9607c6..a698f36 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
else
written = total;
- /* If we cannot permanently store the result, so be it. */
- if (db->negtimeout == 0)
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 4d68ade..c72feaa 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
MSG_NOSIGNAL)) != total)
all_written = false;
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index 4ac9942..2019991 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 49e130c..e2ba09d 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -1,5 +1,5 @@
/* Cache handling for passwd lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index d3d5dce..a6337e3 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)

159
glibc-rh788989-2.patch Normal file
View file

@ -0,0 +1,159 @@
2012-04-12 Jeff Law <law@redhat.com>
* nscd/grpcache.c (cache_addgr): Track alloca usage with alloca_account.
Do not allocate DATASET on the stack if it's too large. Free DATASET
if needed.
diff -rcp a/nscd/grpcache.c b/nscd/grpcache.c
*** a/nscd/grpcache.c Wed Apr 11 12:50:07 2012
--- b/nscd/grpcache.c Wed Apr 11 21:45:58 2012
*************** cache_addgr (struct database_dyn *db, in
*** 178,184 ****
char *cp;
const size_t key_len = strlen (key);
const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1;
! char *buf = alloca (buf_len);
ssize_t n;
size_t cnt;
--- 178,185 ----
char *cp;
const size_t key_len = strlen (key);
const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1;
! size_t alloca_used = 0;
! char *buf = alloca_account (buf_len, alloca_used);
ssize_t n;
size_t cnt;
*************** cache_addgr (struct database_dyn *db, in
*** 190,196 ****
/* Determine the length of all members. */
while (grp->gr_mem[gr_mem_cnt])
++gr_mem_cnt;
! gr_mem_len = (uint32_t *) alloca (gr_mem_cnt * sizeof (uint32_t));
for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt)
{
gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1;
--- 191,198 ----
/* Determine the length of all members. */
while (grp->gr_mem[gr_mem_cnt])
++gr_mem_cnt;
! gr_mem_len = (uint32_t *) alloca_account (gr_mem_cnt * sizeof (uint32_t),
! alloca_used);
for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt)
{
gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1;
*************** cache_addgr (struct database_dyn *db, in
*** 205,214 ****
change. Allocate memory on the cache since it is likely
discarded anyway. If it turns out to be necessary to have a
new record we can still allocate real memory. */
! bool alloca_used = false;
dataset = NULL;
! if (he == NULL)
dataset = (struct dataset *) mempool_alloc (db, total + n, 1);
if (dataset == NULL)
--- 207,216 ----
change. Allocate memory on the cache since it is likely
discarded anyway. If it turns out to be necessary to have a
new record we can still allocate real memory. */
! bool dataset_in_stack_or_freed = false;
dataset = NULL;
! if (he == NULL || ! __libc_use_alloca (alloca_used + total + n))
dataset = (struct dataset *) mempool_alloc (db, total + n, 1);
if (dataset == NULL)
*************** cache_addgr (struct database_dyn *db, in
*** 216,225 ****
/* We cannot permanently add the result in the moment. But
we can provide the result as is. Store the data in some
temporary memory. */
! dataset = (struct dataset *) alloca (total + n);
/* We cannot add this record to the permanent database. */
! alloca_used = true;
}
dataset->head.allocsize = total + n;
--- 218,227 ----
/* We cannot permanently add the result in the moment. But
we can provide the result as is. Store the data in some
temporary memory. */
! dataset = (struct dataset *) alloca_account (total + n, alloca_used);
/* We cannot add this record to the permanent database. */
! dataset_in_stack_or_freed = true;
}
dataset->head.allocsize = total + n;
*************** cache_addgr (struct database_dyn *db, in
*** 273,278 ****
--- 275,288 ----
allocated on the stack and need not be freed. */
dh->timeout = dataset->head.timeout;
++dh->nreloads;
+
+ /* If the new record was not allocated on the stack, then it must
+ be freed. Note that it can no longer be used. */
+ if (! dataset_in_stack_or_freed)
+ {
+ free (dataset);
+ dataset_in_stack_or_freed = true;
+ }
}
else
{
*************** cache_addgr (struct database_dyn *db, in
*** 288,294 ****
key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + n);
! alloca_used = false;
}
/* Mark the old record as obsolete. */
--- 298,304 ----
key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + n);
! dataset_in_stack_or_freed = false;
}
/* Mark the old record as obsolete. */
*************** cache_addgr (struct database_dyn *db, in
*** 303,309 ****
assert (fd != -1);
#ifdef HAVE_SENDFILE
! if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
{
assert (db->wr_fd != -1);
assert ((char *) &dataset->resp > (char *) db->data);
--- 313,319 ----
assert (fd != -1);
#ifdef HAVE_SENDFILE
! if (__builtin_expect (db->mmap_used, 1) && !dataset_in_stack_or_freed)
{
assert (db->wr_fd != -1);
assert ((char *) &dataset->resp > (char *) db->data);
*************** cache_addgr (struct database_dyn *db, in
*** 330,336 ****
/* Add the record to the database. But only if it has not been
stored on the stack. */
! if (! alloca_used)
{
/* If necessary, we also propagate the data to disk. */
if (db->persistent)
--- 340,346 ----
/* Add the record to the database. But only if it has not been
stored on the stack. */
! if (! dataset_in_stack_or_freed)
{
/* If necessary, we also propagate the data to disk. */
if (db->persistent)

188
glibc-rh790292.patch Normal file
View file

@ -0,0 +1,188 @@
diff -Nrup a/localedata/locales/sat_IN b/localedata/locales/sat_IN
--- a/localedata/locales/sat_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/sat_IN 2012-02-14 09:45:55.072442697 -0700
@@ -0,0 +1,184 @@
+comment_char %
+escape_char /
+% Santali language locale for India.
+% Contributed by Mr. Pravin Satpute <psatpute AT redhat DOT com> and Mr. Thakur Prasad Murmu <tp_murmu AT yahoo DOT com>
+
+LC_IDENTIFICATION
+title "Santali language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Santali"
+territory "India"
+revision "1.0"
+date "2012-01-17"
+%
+category "sat_IN:2012";LC_IDENTIFICATION
+category "sat_IN:2012";LC_CTYPE
+category "sat_IN:2012";LC_COLLATE
+category "sat_IN:2012";LC_TIME
+category "sat_IN:2012";LC_NUMERIC
+category "sat_IN:2012";LC_MONETARY
+category "sat_IN:2012";LC_MESSAGES
+category "sat_IN:2012";LC_PAPER
+category "sat_IN:2012";LC_NAME
+category "sat_IN:2012";LC_ADDRESS
+category "sat_IN:2012";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "hi_IN"
+END LC_CTYPE
+
+LC_COLLATE
+copy "hi_IN"
+END LC_COLLATE
+
+LC_MONETARY
+copy "hi_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U0938><U093F><U0902><U0917><U0947>";"<U0913><U0924><U0947>";/
+ "<U092C><U093E><U0932><U0947>";"<U0938><U093E><U0917><U0941><U0928>";/
+ "<U0938><U093E><U0930><U0926><U0940>";/
+ "<U091C><U093E><U0930><U0941><U092E>";"<U091E><U0941><U0939><U0941><U092E>"
+%
+
+% Full weekday names (%A)
+day "<U0938><U093F><U0902><U0917><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0913><U0924><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U092C><U093E><U0932><U0947><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0938><U093E><U0917><U0941><U0928><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U0938><U093E><U0930><U0926><U0940><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U091C><U093E><U0930><U0941><U092E><U092E><U093E><U0901><U0939><U093E><U0901>";/
+ "<U091E><U0941><U0939><U0941><U092E><U092E><U093E><U0901><U0939><U093E><U0901>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0947><U0932>";/
+ "<U092E><U0908>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"
+%
+
+% Full month names (%B)
+mon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0947><U0932>";/
+ "<U092E><U0908>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"
+%
+% Equivalent of AM PM
+
+am_pm "<U0041><U004D>";"<U0050><U004D>"
+
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% 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_MESSAGES category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% ^(Yes|[yY])
+yesexpr "<U005E><U0028><U0939><U094B><U092F><U007C><U005B><U0079>/
+<U0059><U005D><U0029>"
+%
+% ^(No|[nN])
+noexpr "<U005E><U0028><U092C><U093E><U0919><U007C><U005B><U006E><U004E>/
+<U005D><U0029>"
+%
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U092E><U093E><U0928>"
+name_mrs "<U092E><U093E><U0928><U0940>"
+name_miss "<U092E><U093E><U0908>"
+name_ms ""
+
+END LC_NAME
+
+
+LC_ADDRESS
+copy "hi_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "hi_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "hi_IN"
+END LC_MEASUREMENT

176
glibc-rh790298.patch Normal file
View file

@ -0,0 +1,176 @@
diff -Nrup a/localedata/locales/mni_IN b/localedata/locales/mni_IN
--- a/localedata/locales/mni_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/mni_IN 2012-02-14 09:49:33.059129964 -0700
@@ -0,0 +1,172 @@
+comment_char %
+escape_char /
+% Manipuri language locale for India.
+% Contributed by Mr. Pravin Satpute <psatpute AT redhat DOT com> and Ms. Rebika Devi < rebika_srd AT rediffmail DOT com>
+
+LC_IDENTIFICATION
+title "Manipuri language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Manipuri"
+territory "India"
+revision "1.0"
+date "2012-01-17"
+%
+category "mni_IN:2012";LC_IDENTIFICATION
+category "mni_IN:2012";LC_CTYPE
+category "mni_IN:2012";LC_COLLATE
+category "mni_IN:2012";LC_TIME
+category "mni_IN:2012";LC_NUMERIC
+category "mni_IN:2012";LC_MONETARY
+category "mni_IN:2012";LC_MESSAGES
+category "mni_IN:2012";LC_PAPER
+category "mni_IN:2012";LC_NAME
+category "mni_IN:2012";LC_ADDRESS
+category "mni_IN:2012";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "bn_IN"
+END LC_CTYPE
+
+LC_COLLATE
+copy "bn_IN"
+END LC_COLLATE
+
+LC_MONETARY
+copy "bn_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "bn_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U09A8><U09CB><U0982>";"<U09A8><U09BF><U0982>";/
+ "<U09B2><U09C8><U09AC><U09BE><U0995>";"<U09DF><U09C1><U09AE>";/
+ "<U09B6><U0997><U09CB><U09B2>";/
+ "<U0987><U09B0><U09BE>";"<U09A5><U09BE><U0982>"
+%
+
+% Full weekday names (%A)
+day "<U09A8><U09CB><U0982><U09AE><U09BE><U0987><U099C><U09BF><U0982>";/
+ "<U09A8><U09BF><U0982><U09A5><U09CC><U0995><U09BE><U09AC><U09BE>";/
+ "<U09B2><U09C8><U09AC><U09BE><U0995><U09AA><U09CB><U0995><U09AA><U09BE>";/
+ "<U09DF><U09C1><U09AE><U09B6><U0995><U09C8><U09B6><U09BE>";/
+ "<U09B6><U0997><U09CB><U09B2><U09B6><U09C7><U09A8>";/
+ "<U0987><U09B0><U09BE><U0987>";/
+ "<U09A5><U09BE><U0982><U099C>"
+%
+% Abbreviated month names (%b)
+abmon "<U099C><U09BE><U09A8>";/
+ "<U09AB><U09C7><U09AC>";/
+ "<U09AE><U09BE><U09B0>";/
+ "<U098F><U09AA><U09CD><U09B0><U09BF>";/
+ "<U09AE><U09C7>";/
+ "<U099C><U09C1><U09A8>";/
+ "<U099C><U09C1><U09B2>";/
+ "<U0986><U0997>";/
+ "<U09B8><U09C7><U09AA>";/
+ "<U0993><U0995><U09CD><U09A4>";/
+ "<U09A8><U09AC><U09C7>";/
+ "<U09A1><U09BF><U09B8>"
+%
+
+% Full month names (%B)
+mon "<U099C><U09BE><U09A8><U09C1><U09F1><U09BE><U09B0><U09BF>";/
+ "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09F1><U09BE><U09B0><U09BF>";/
+ "<U09AE><U09BE><U09B0><U09CD><U099A>";/
+ "<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/
+ "<U09AE><U09C7>";/
+ "<U099C><U09C1><U09A8>";/
+ "<U099C><U09C1><U09B2><U09BE><U0987>";/
+ "<U0986><U0997><U09B7><U09CD><U099F>";/
+ "<U09B8><U09C7><U09AA><U09CD><U09A4><U09C7><U09AE><U09CD><U09AC><U09B0>";/
+ "<U0993><U0995><U09CD><U09A4><U09CB><U09AC><U09B0>";/
+ "<U09A8><U09AC><U09C7><U09AE><U09CD><U09AC><U09B0>";/
+ "<U09A1><U09BF><U09B8><U09C7><U09AE><U09CD><U09AC><U09B0>"
+%
+% Equivalent of AM PM
+
+am_pm "<U098F><U002E><U09AE><U002E>";/
+ "<U09AA><U002E><U09AE><U002E>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% 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
+copy "en_IN"
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "bn_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U09B6><U09CD><U09B0><U09C0>"
+name_mrs "<U09B6><U09CD><U09B0><U09C0><U09AE><U09A4><U09BF>"
+name_miss "<U0995><U09C1><U09AE><U09BE><U09B0><U09C0>"
+name_ms "<U0995><U09C1><U09AE><U09BE><U09B0>"
+
+END LC_NAME
+
+
+LC_ADDRESS
+copy "bn_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "bn_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "bn_IN"
+END LC_MEASUREMENT

180
glibc-rh791161.patch Normal file
View file

@ -0,0 +1,180 @@
diff -Nrup a/localedata/locales/doi_IN b/localedata/locales/doi_IN
--- a/localedata/locales/doi_IN 1969-12-31 17:00:00.000000000 -0700
+++ b/localedata/locales/doi_IN 2012-02-16 09:14:08.215572109 -0700
@@ -0,0 +1,176 @@
+comment_char %
+escape_char /
+% Dogri language locale for India.
+% Contributed by Pravin Satpute <psatpute@redhat.com> and Sushil Badyal <badyalsk@gmail.com>
+
+LC_IDENTIFICATION
+title "Dogri language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Dogri"
+territory "India"
+revision "1.0"
+date "2012-02-16"
+%
+category "doi_IN:2012";LC_IDENTIFICATION
+category "doi_IN:2012";LC_CTYPE
+category "doi_IN:2012";LC_COLLATE
+category "doi_IN:2012";LC_TIME
+category "doi_IN:2012";LC_NUMERIC
+category "doi_IN:2012";LC_MONETARY
+category "doi_IN:2012";LC_MESSAGES
+category "doi_IN:2012";LC_PAPER
+category "doi_IN:2012";LC_NAME
+category "doi_IN:2012";LC_ADDRESS
+category "doi_IN:2012";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "hi_IN"
+END LC_CTYPE
+
+LC_COLLATE
+
+% Copy the template from ISO/IEC 14651
+copy "iso14651_t1"
+
+END LC_COLLATE
+
+LC_MONETARY
+copy "hi_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode/Java
+%
+% Abbreviated weekday names (%a)
+abday "<U0910><U0924><U0020>";/
+ "<U0938><U094B><U092E><U0020>";/
+ "<U092E><U0902><U0917><U0932><U0020>";/
+ "<U092C><U0941><U0927><U0020>";/
+ "<U092C><U0940><U0930><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0915><U0930><U0020>";/
+ "<U0936><U094D><U0928><U0940><U091A><U0930><U0020>"
+%
+% Full weekday names (%A)
+day "<U0910><U0924><U092C><U093E><U0930><U0020>";/
+ "<U0938><U094B><U092E><U092C><U093E><U0930><U0020>";/
+ "<U092E><U0902><U0917><U0932><U092C><U0930><U0020>";/
+ "<U092C><U0941><U0927><U092C><U093E><U0930><U0020>";/
+ "<U092C><U0940><U0930><U092C><U093E><U0930><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0915><U0930><U092C><U093E><U0930><U0020>";/
+ "<U0936><U094D><U0928><U0940><U091A><U0930><U092C><U093E><U0930><U0020>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U090F><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0947><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0942><U0932><U0948>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U0902><U092C><U0930>";/
+ "<U0905><U0915><U094D><U0924><U0942><U092C><U0930>";/
+ "<U0928><U0935><U0902><U092C><U0930>";/
+ "<U0926><U093F><U0938><U0902><U092C><U0930>"
+%
+% Full month names (%B)
+mon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U090F><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0947><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0942><U0932><U0948>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U0902><U092C><U0930>";/
+ "<U0905><U0915><U094D><U0924><U0942><U092C><U0930>";/
+ "<U0928><U0935><U0902><U092C><U0930>";/
+ "<U0926><U093F><U0938><U0902><U092C><U0930>"
+%
+% Equivalent of AM PM
+am_pm "<U0938><U091E><U0902>";/
+ "<U0938><U092C><U0947><U0930>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+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
+% ^(Yes|[yY])
+yesexpr "<U005E><U0028><U0911><U0939><U007C><U005B><U0079>/
+<U0059><U005D><U0029>"
+%
+% ^(No|[nN])
+noexpr "<U005E><U0028><U0928><U093E><U007C><U005B><U006E><U004E>/
+<U005D><U0029>"
+%
+END LC_MESSAGES
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the
+% LC_NAME category.
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U004D><U0072><U002E>"
+name_mrs "<U004D><U0072><U0073><U002E>"
+name_miss "<U004D><U0069><U0073><U0073><U002E>"
+name_ms "<U004D><U0073><U002E>"
+
+END LC_NAME
+
+
+
+LC_ADDRESS
+copy "hi_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "hi_IN"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "hi_IN"
+END LC_MEASUREMENT

78
glibc-rh800224.patch Normal file
View file

@ -0,0 +1,78 @@
2012-03-07 Jeff Law <law@redhat.com>
* elf/dl-reloc.c (_dl_relocate_object): Move code to allocate
l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE.
diff -rup a/elf/dl-reloc.c b/elf/dl-reloc.c
--- a/elf/dl-reloc.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-reloc.c 2012-03-06 15:41:56.486242640 -0700
@@ -238,32 +238,9 @@ _dl_relocate_object (struct link_map *l,
/* String table object symbols. */
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
-#define RESOLVE_MAP(ref, version, r_type) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
- ? (bump_num_cache_relocations (), \
- (*ref) = l->l_lookup_cache.ret, \
- l->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- l->l_lookup_cache.type_class = _tc; \
- l->l_lookup_cache.sym = (*ref); \
- const struct r_found_version *v = NULL; \
- if ((version) != NULL && (version)->hash != 0) \
- v = (version); \
- _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
- scope, v, _tc, \
- DL_LOOKUP_ADD_DEPENDENCY, NULL); \
- l->l_lookup_cache.ret = (*ref); \
- l->l_lookup_cache.value = _lr; })) \
- : l)
-
-#include "dynamic-link.h"
-
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
-
+ /* ELF_DYNAMIC_RELOCATE may need to examine l_reloc_result
+ when handling MACHINE_IRELATIVE relocs. So we must
+ allocate l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. */
#ifndef PROF
if (__builtin_expect (consider_profiling, 0))
{
@@ -290,6 +267,32 @@ _dl_relocate_object (struct link_map *l,
}
}
#endif
+
+ /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
+#define RESOLVE_MAP(ref, version, r_type) \
+ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
+ ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
+ && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
+ ? (bump_num_cache_relocations (), \
+ (*ref) = l->l_lookup_cache.ret, \
+ l->l_lookup_cache.value) \
+ : ({ lookup_t _lr; \
+ int _tc = elf_machine_type_class (r_type); \
+ l->l_lookup_cache.type_class = _tc; \
+ l->l_lookup_cache.sym = (*ref); \
+ const struct r_found_version *v = NULL; \
+ if ((version) != NULL && (version)->hash != 0) \
+ v = (version); \
+ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
+ scope, v, _tc, \
+ DL_LOOKUP_ADD_DEPENDENCY, NULL); \
+ l->l_lookup_cache.ret = (*ref); \
+ l->l_lookup_cache.value = _lr; })) \
+ : l)
+
+#include "dynamic-link.h"
+
+ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
}
/* Mark the object so we know this work has been done. */

27
glibc-rh803286.patch Normal file
View file

@ -0,0 +1,27 @@
diff -rup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-03-12 14:11:04.134056609 -0600
+++ b/localedata/SUPPORTED 2012-03-14 20:59:39.993269235 -0600
@@ -103,6 +103,7 @@ de_DE@euro/ISO-8859-15 \
de_LU.UTF-8/UTF-8 \
de_LU/ISO-8859-1 \
de_LU@euro/ISO-8859-15 \
+doi_IN/UTF-8 \
dv_MV/UTF-8 \
dz_BT/UTF-8 \
el_GR.UTF-8/UTF-8 \
@@ -298,6 +299,7 @@ mk_MK.UTF-8/UTF-8 \
mk_MK/ISO-8859-5 \
ml_IN/UTF-8 \
mn_MN/UTF-8 \
+mni_IN/UTF-8 \
mr_IN/UTF-8 \
ms_MY.UTF-8/UTF-8 \
ms_MY/ISO-8859-1 \
@@ -350,6 +352,7 @@ ru_UA.UTF-8/UTF-8 \
ru_UA/KOI8-U \
rw_RW/UTF-8 \
sa_IN/UTF-8 \
+sat_IN/UTF-8 \
sc_IT/UTF-8 \
sd_IN/UTF-8 \
sd_IN@devanagari/UTF-8 \

78
glibc-rh819430.patch Normal file
View file

@ -0,0 +1,78 @@
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 (__builtin_expect (n == (size_t) -1, 0))
- /* 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 (__builtin_expect (n == (size_t) -1, 0))
- /* 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 (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
__set_errno (ENOMEM);
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- {
- /* 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 (__builtin_expect (n == (size_t) -1, 0))
- /* 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 (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
{
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. */

13
glibc-rh825061.patch Normal file
View file

@ -0,0 +1,13 @@
diff -rup a/manual/Makefile b/manual/Makefile
--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600
+++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600
@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c
mv -f $@.new $@
$(objpfx)%.info: %.texinfo
- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
+ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $<
+ mv `basename $@`* $(objpfx)
$(objpfx)%.dvi: %.texinfo
cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(<D) && pwd) --output=$@ \

Some files were not shown because too many files have changed in this diff Show more