e1b411d
diff -Nrup a/ChangeLog b/ChangeLog
6ae22f0
--- a/ChangeLog	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/ChangeLog	2012-06-07 12:15:21.516319798 -0600
6ae22f0
@@ -12178,6 +12178,11 @@
Andreas Schwab aeada30
 
Andreas Schwab aeada30
 	* sysdeps/mach/hurd/sys/param.h (DEV_BSIZE): New macro.
Andreas Schwab aeada30
 
Andreas Schwab aeada30
+2011-09-02  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab aeada30
+
Andreas Schwab aeada30
+	* nscd/selinux.c (avc_create_thread): Set PR_SET_KEEPCAPS before
Andreas Schwab aeada30
+	spawning AVC thread.
Andreas Schwab aeada30
+
Andreas Schwab aeada30
 2011-09-08  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab aeada30
 
Andreas Schwab aeada30
 	* elf/dl-load.c (lose): Check for non-null L.
6ae22f0
@@ -12440,6 +12445,11 @@
Andreas Schwab d05dd85
 	* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
Andreas Schwab d05dd85
 	directive.
Andreas Schwab d05dd85
 
Andreas Schwab d05dd85
+2011-08-31  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab d05dd85
+
Andreas Schwab d05dd85
+	* include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]:
Andreas Schwab d05dd85
+	Change to -1.
Andreas Schwab d05dd85
+
Andreas Schwab d05dd85
 2011-08-24  David S. Miller  <davem@davemloft.net>
Andreas Schwab d05dd85
 
Andreas Schwab d05dd85
 	* sysdeps/sparc/sparc64/strcmp.S: Rewrite.
6ae22f0
@@ -13245,6 +13255,14 @@
Andreas Schwab 538b3c0
 	* config.make.in: Likewise.
Andreas Schwab 538b3c0
 	* malloc/Makefile: Likewise.
Andreas Schwab 538b3c0
 
Andreas Schwab d1bf7db
+2011-06-28  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab f350991
+
Andreas Schwab d1bf7db
+	* iconvdata/gb18030.c: Update tables.
Andreas Schwab d1bf7db
+	(BODY for FROM_LOOP): Handle non-BMP characters specially.
Andreas Schwab f350991
+
Andreas Schwab d1bf7db
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use gethostbyaddr
Andreas Schwab d1bf7db
+	to determine canonical name.
Andreas Schwab cecb16f
+
Andreas Schwab d1bf7db
 2011-06-27  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab d1bf7db
 
Andreas Schwab d1bf7db
 	* iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP
6ae22f0
@@ -13376,6 +13394,10 @@
Andreas Schwab 538b3c0
 
Andreas Schwab 538b3c0
 	* inet/getnetgrent_r.c: Use DL_CALL_FCT in several places.
Andreas Schwab d1bf7db
 
Andreas Schwab d1bf7db
+2011-06-21  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab d1bf7db
+
Andreas Schwab d1bf7db
+	* iconvdata/gb18030.c: Regenerate tables.
Andreas Schwab cecb16f
+
Andreas Schwab 538b3c0
 2011-06-20  David S. Miller  <davem@davemloft.net>
Andreas Schwab 7f8f336
 
Andreas Schwab 538b3c0
 	* sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple
6ae22f0
@@ -13998,6 +14020,13 @@
Andreas Schwab 33bafa6
 	* libio/Makefile (tests): Add bug-fclose1.
Andreas Schwab 33bafa6
 	* libio/bug-fclose1.c: New file.
Andreas Schwab 33bafa6
 
Andreas Schwab 5423dcc
+2011-05-13  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 532ddd8
+
Andreas Schwab 5423dcc
+	* elf/dl-load.c (is_dst): Remove parameter secure, all callers
Andreas Schwab 5423dcc
+	changed.  Move check for valid use of $ORIGIN ...
Andreas Schwab 5423dcc
+	(_dl_dst_substitute): ... here.  Reset check_for_trusted when a
Andreas Schwab 5423dcc
+	path element is skipped.
Andreas Schwab 532ddd8
+
Andreas Schwab 5423dcc
 2011-05-12  Ulrich Drepper  <drepper@gmail.com>
Andreas Schwab 532ddd8
 
Andreas Schwab 5423dcc
 	[BZ #12511]
6ae22f0
@@ -14275,13 +14304,6 @@
Andreas Schwab cecb16f
 	* stdlib/bug-getcontext.c: New file.
Andreas Schwab cecb16f
 	* stdlib/Makefile: Add rules to build and run bug-getcontext.
Andreas Schwab cecb16f
 
Andreas Schwab cecb16f
-2011-04-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
Andreas Schwab cecb16f
-
Andreas Schwab cecb16f
-	* sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109
Andreas Schwab cecb16f
-	instructions into .machine "z9-109".
Andreas Schwab cecb16f
-	* sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise.
Andreas Schwab cecb16f
-	* sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise.
Andreas Schwab cecb16f
-
Andreas Schwab cecb16f
 2011-04-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
Andreas Schwab cecb16f
 
Andreas Schwab cecb16f
 	* sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes
6ae22f0
@@ -14579,6 +14601,10 @@
Andreas Schwab 5d12cdc
 	$LDFLAGS and -nostdlib -nostartfiles to linking step.  Change main
Andreas Schwab 5d12cdc
 	to _start.
Andreas Schwab 5d12cdc
 
Andreas Schwab 5d12cdc
+2011-03-18  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 5d12cdc
+
Andreas Schwab 5d12cdc
+	* elf/ldd.bash.in: Never run file directly.
Andreas Schwab 5d12cdc
+
Andreas Schwab 5d12cdc
 2011-03-06  Ulrich Drepper  <drepper@gmail.com>
Andreas Schwab 5d12cdc
 
Andreas Schwab 5d12cdc
 	* elf/dl-load.c (_dl_map_object): If we are looking for the first
6ae22f0
@@ -14795,6 +14821,12 @@
Andreas Schwab 87a7e49
 	* shadow/sgetspent.c: Check return value of __sgetspent_r instead
Andreas Schwab 87a7e49
 	of errno.
Andreas Schwab 87a7e49
 
Andreas Schwab 87a7e49
+2011-02-03  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 87a7e49
+
Andreas Schwab 87a7e49
+	* login/programs/pt_chown.c (main): Check for valid file
Andreas Schwab 87a7e49
+	descriptor instead of privileges.  Be careful to drop all
Andreas Schwab 87a7e49
+	capabilities when not needed.
Andreas Schwab cd1b6b2
+
Andreas Schwab cd1b6b2
 2011-01-19  Ulrich Drepper  <drepper@gmail.com>
Andreas Schwab 87a7e49
 
Andreas Schwab cd1b6b2
 	[BZ #11724]
6ae22f0
@@ -15482,6 +15514,19 @@
Andreas Schwab 7870b78
 	* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
Andreas Schwab 7870b78
 	Mask out sign-bit copies when constructing f_fsid.
Andreas Schwab 7870b78
 
Andreas Schwab 26ee51a
+2010-09-27  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 26ee51a
+
Andreas Schwab 26ee51a
+	[BZ #11561]
Andreas Schwab 26ee51a
+	* posix/regcomp.c (parse_bracket_exp): When looking up collating
Andreas Schwab 26ee51a
+	elements compare against the byte sequence of it, not its name.
Andreas Schwab 26ee51a
+
Andreas Schwab 26ee51a
+	[BZ #6530]
Andreas Schwab 26ee51a
+	* stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22
Andreas Schwab 26ee51a
+	change.
Andreas Schwab 26ee51a
+
Andreas Schwab 26ee51a
+	* nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen
Andreas Schwab 26ee51a
+	as size_t.
Andreas Schwab 26ee51a
+
Andreas Schwab 26ee51a
 2010-09-24  Petr Baudis <pasky@suse.cz>
Andreas Schwab 26ee51a
 
Andreas Schwab 26ee51a
 	* debug/stack_chk_fail_local.c: Add missing licence exception.
6ae22f0
@@ -16274,6 +16319,17 @@
Andreas Schwab da9d145
 	call returning > 0 value.
Andreas Schwab da9d145
 	* sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise.
Andreas Schwab da9d145
 
Andreas Schwab da9d145
+2010-07-01  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab da9d145
+
Andreas Schwab da9d145
+	* include/sys/resource.h (__getrlimit): Add hidden proto.
Andreas Schwab da9d145
+	* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
Andreas Schwab da9d145
+	* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
Andreas Schwab da9d145
+	* resource/getrlimit.c: Likewise.
Andreas Schwab da9d145
+
Andreas Schwab 87a7e49
+2010-06-21  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 87a7e49
+
Andreas Schwab 87a7e49
+	* sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler.
Andreas Schwab 87a7e49
+
Andreas Schwab da9d145
 2010-06-07  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab da9d145
 
Andreas Schwab da9d145
 	* dlfcn/Makefile: Remove explicit dependencies on libc.so and
6ae22f0
@@ -16326,6 +16382,21 @@
Andreas Schwab 809a543
 	* hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
Andreas Schwab 809a543
 	* sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
Andreas Schwab 809a543
 
Andreas Schwab 809a543
+2010-06-11  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 809a543
+
Andreas Schwab 809a543
+	* elf/rtld.c (_dl_starting_up): Always define.
Andreas Schwab 809a543
+	(dl_main): Always set _dl_starting_up.
Andreas Schwab 809a543
+	* elf/dl-support.c (_dl_starting_up): Always define.
Andreas Schwab 809a543
+	* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
Andreas Schwab 809a543
+
Andreas Schwab 809a543
+2010-06-10  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab 809a543
+
Andreas Schwab 809a543
+	* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
Andreas Schwab 809a543
+	GLIBC_PRIVATE.
Andreas Schwab 809a543
+	* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
Andreas Schwab 809a543
+	* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
Andreas Schwab 809a543
+	* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
Andreas Schwab 809a543
+
Andreas Schwab 809a543
 2010-05-28  Luis Machado  <luisgpm@br.ibm.com>
Andreas Schwab 08541d9
 
Andreas Schwab 08541d9
 	* sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
e1b411d
diff -Nrup a/ChangeLog.15 b/ChangeLog.15
6ae22f0
--- a/ChangeLog.15	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/ChangeLog.15	2012-06-07 12:15:21.518319790 -0600
e72031f
@@ -477,6 +477,14 @@
e72031f
 
e72031f
 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
e72031f
 
e72031f
+	* posix/Makefile (generated: Add getconf.speclist.
e72031f
+	($(inst_libexecdir)/getconf): Use getconf.speclist instead of
e72031f
+	getconf output.
e72031f
+	($(objpfx)getconf.speclist): New rule.
e72031f
+	* posix/getconf.speclist.h: New file.
e72031f
+
e72031f
+2004-11-26  Jakub Jelinek  <jakub@redhat.com>
e72031f
+
e72031f
 	* sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
e72031f
 
e72031f
 2004-11-26  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
f7dfce4
@@ -3182,6 +3190,17 @@
e72031f
 	before return type.
e72031f
 	* locale/localename.c (__current_locale_name): Likewise.
e72031f
 
e72031f
+2004-08-31  Jakub Jelinek  <jakub@redhat.com>
e72031f
+
e72031f
+	* elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
e72031f
+	before arguments to add_dir and pass to parse_conf_include.
e72031f
+	(parse_conf_include): Add prefix argument, pass it down to
e72031f
+	parse_conf.
e72031f
+	(main): Call arch_startup.  Adjust parse_conf caller.
e72031f
+	Call add_arch_dirs.
e72031f
+	* sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
e72031f
+	* sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
e72031f
+
e72031f
 2004-08-30  Roland McGrath  <roland@frob.com>
e72031f
 
e72031f
 	* scripts/extract-abilist.awk: If `lastversion' variable defined, omit
e1b411d
diff -Nrup a/ChangeLog.16 b/ChangeLog.16
6ae22f0
--- a/ChangeLog.16	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/ChangeLog.16	2012-06-07 12:15:21.523319772 -0600
Andreas Schwab 6c0e600
@@ -2042,6 +2042,9 @@
e72031f
 	(__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
e72031f
 	followed by __THROW.
e72031f
 
e72031f
+	* sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
e72031f
+	file == NULL, use __futimes unconditionally.
e72031f
+
e72031f
 2006-02-02  Ulrich Drepper  <drepper@redhat.com>
e72031f
 
e72031f
 	* sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
Andreas Schwab 6c0e600
@@ -2101,6 +2104,11 @@
e72031f
 	* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
e72031f
 	* sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
e72031f
 
e72031f
+2006-01-30  Jakub Jelinek  <jakub@redhat.com>
e72031f
+
e72031f
+	* include/bits/stdlib-ldbl.h: New file.
e72031f
+	* include/bits/wchar-ldbl.h: New file.
e72031f
+
e72031f
 2006-01-19  Thomas Schwinge  <tschwinge@gnu.org>
e72031f
 
e72031f
 	* libio/genops.c: Include <stdbool.h>.
e1b411d
diff -Nrup a/ChangeLog.17 b/ChangeLog.17
6ae22f0
--- a/ChangeLog.17	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/ChangeLog.17	2012-06-07 12:15:21.564319619 -0600
Andreas Schwab 976b178
@@ -256,6 +256,12 @@
Andreas Schwab 976b178
 
Andreas Schwab 976b178
 	* Makerules (libc-abis): Fix search for libc-abis in add-ons.
Andreas Schwab 976b178
 
Andreas Schwab 976b178
+2010-04-06  Ulrich Drepper  <drepper@redhat.com>
Andreas Schwab 976b178
+
Andreas Schwab 976b178
+	* sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
Andreas Schwab 976b178
+	scope to RFC 1918 addresses.
Andreas Schwab 976b178
+	* posix/gai.conf: Document difference from RFC 3484.
Andreas Schwab 976b178
+
Andreas Schwab 976b178
 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
Andreas Schwab 976b178
 
Andreas Schwab 976b178
 	* sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
71ecd3c
@@ -2953,6 +2959,11 @@ d2009-10-30  Ulrich Drepper  
Andreas Schwab 976b178
 	* sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
Andreas Schwab 976b178
 	the unique symbol hash table should not be const.
Andreas Schwab 976b178
 
Andreas Schwab 976b178
+2009-07-22  Jakub Jelinek  <jakub@redhat.com>
Andreas Schwab 976b178
+
Andreas Schwab 976b178
+	* Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
Andreas Schwab 976b178
+	* sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
Andreas Schwab 976b178
+
Andreas Schwab 976b178
 2009-07-21  Ulrich Drepper  <drepper@redhat.com>
Andreas Schwab 976b178
 
Andreas Schwab 976b178
 	* sysdeps/x86_64/multiarch/strstr.c: Minor cleanups.  Remove
f7dfce4
@@ -11818,6 +11829,10 @@ d2009-10-30  Ulrich Drepper  
Andreas Schwab 976b178
 	[BZ #4368]
Andreas Schwab 976b178
 	* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
Andreas Schwab 976b178
 
Andreas Schwab 976b178
+2007-04-16  Jakub Jelinek  <jakub@redhat.com>
Andreas Schwab 976b178
+
Andreas Schwab 976b178
+	* locale/programs/locarchive.c (add_alias, insert_name): Remove static.
Andreas Schwab 976b178
+
Andreas Schwab 976b178
 2007-04-16  Ulrich Drepper  <drepper@redhat.com>
Andreas Schwab 976b178
 
Andreas Schwab 976b178
 	[BZ #4364]
f7dfce4
@@ -13075,6 +13090,15 @@ d2009-10-30  Ulrich Drepper  
Andreas Schwab 976b178
 	separators also if no non-zero digits found.
Andreas Schwab 976b178
 	* stdlib/Makefile (tests): Add tst-strtod3.
Andreas Schwab 976b178
 
Andreas Schwab 976b178
+2006-12-10  Jakub Jelinek  <jakub@redhat.com>
Andreas Schwab 976b178
+
Andreas Schwab 976b178
+	* sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
Andreas Schwab 976b178
+	if IFA_MAX is not defined.
Andreas Schwab 976b178
+	(IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
Andreas Schwab 976b178
+	defined.
Andreas Schwab 976b178
+	* sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
Andreas Schwab 976b178
+	instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
Andreas Schwab 976b178
+
Andreas Schwab 976b178
 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
Andreas Schwab 976b178
 
Andreas Schwab 976b178
 	[BZ #3632]
e1b411d
diff -Nrup a/Makeconfig b/Makeconfig
6ae22f0
--- a/Makeconfig	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/Makeconfig	2012-06-07 12:15:21.568319604 -0600
e1b411d
@@ -753,12 +753,12 @@ endif
b37e2e8
 # The assembler can generate debug information too.
b37e2e8
 ifndef ASFLAGS
b37e2e8
 ifeq ($(have-cpp-asm-debuginfo),yes)
b37e2e8
-ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
b37e2e8
+ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
b37e2e8
 else
b37e2e8
-ASFLAGS :=
b37e2e8
+ASFLAGS =
b37e2e8
 endif
b37e2e8
 endif
b37e2e8
-ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
b37e2e8
+ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS)
b37e2e8
 
b37e2e8
 ifndef BUILD_CC
b37e2e8
 BUILD_CC = $(CC)
e1b411d
diff -Nrup a/NEWS b/NEWS
6ae22f0
--- a/NEWS	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/NEWS	2012-06-07 12:15:21.569319601 -0600
6ae22f0
@@ -196,16 +196,6 @@ Version 2.14
b37e2e8
   12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
b37e2e8
   12795, 12811, 12813, 12814, 12841
b37e2e8
 
b37e2e8
-* The RPC implementation in libc is obsoleted.  Old programs keep working
b37e2e8
-  but new programs cannot be linked with the routines in libc anymore.
b37e2e8
-  Programs in need of RPC functionality must be linked against TI-RPC.
b37e2e8
-  The TI-RPC implementation is IPv6 enabled and there are other benefits.
b37e2e8
-
b37e2e8
-  Visible changes of this change include (obviously) the inability to link
b37e2e8
-  programs using RPC functions without referencing the TI-RPC library and the
b37e2e8
-  removal of the RPC headers from the glibc headers.
b37e2e8
-  Implemented by Ulrich Drepper.
b37e2e8
-
b37e2e8
 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
b37e2e8
   syncfs, setns, sendmmsg
b37e2e8
 
e1b411d
diff -Nrup a/csu/elf-init.c b/csu/elf-init.c
6ae22f0
--- a/csu/elf-init.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/csu/elf-init.c	2012-06-07 12:15:21.570319597 -0600
f7dfce4
@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int,
b37e2e8
 extern void (*__fini_array_start []) (void) attribute_hidden;
b37e2e8
 extern void (*__fini_array_end []) (void) attribute_hidden;
b37e2e8
 
b37e2e8
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
b37e2e8
+    && (defined SHARED || defined LIBC_NONSHARED)
b37e2e8
+# define hidden_undef_2(x) #x
b37e2e8
+# define hidden_undef_1(x) hidden_undef_2 (x)
b37e2e8
+# define hidden_undef(x) \
b37e2e8
+  __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
b37e2e8
+  __asm (".hidden " #x);
b37e2e8
+#else
b37e2e8
+# define hidden_undef(x)
b37e2e8
+#endif
b37e2e8
+
b37e2e8
+hidden_undef (__preinit_array_start)
b37e2e8
+hidden_undef (__preinit_array_end)
b37e2e8
+hidden_undef (__init_array_start)
b37e2e8
+hidden_undef (__init_array_end)
b37e2e8
+hidden_undef (__fini_array_start)
b37e2e8
+hidden_undef (__fini_array_end)
b37e2e8
 
b37e2e8
 /* These function symbols are provided for the .init/.fini section entry
b37e2e8
    points automagically by the linker.  */
e1b411d
diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c
6ae22f0
--- a/debug/tst-chk1.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/debug/tst-chk1.c	2012-06-07 12:15:21.571319593 -0600
f7dfce4
@@ -16,6 +16,9 @@
f7dfce4
    License along with the GNU C Library; if not, see
f7dfce4
    <http://www.gnu.org/licenses/>.  */
b37e2e8
 
b37e2e8
+/* Hack: make sure GCC doesn't know __chk_fail () will not return.  */
b37e2e8
+#define __noreturn__
b37e2e8
+
b37e2e8
 #include <assert.h>
b37e2e8
 #include <fcntl.h>
b37e2e8
 #include <locale.h>
f7dfce4
@@ -244,7 +247,7 @@ do_test (void)
b37e2e8
   if (memcmp (a.buf1, "aabcdabcjj", 10))
b37e2e8
     FAIL ();
b37e2e8
 
b37e2e8
-#if __USE_FORTIFY_LEVEL < 2
b37e2e8
+#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
b37e2e8
   /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
b37e2e8
      and sufficient GCC support, as the string operations overflow
b37e2e8
      from a.buf1 into a.buf2.  */
f7dfce4
@@ -359,7 +362,7 @@ do_test (void)
b37e2e8
   memset (a.buf1 + 9, 'j', l0 + 2);
b37e2e8
   CHK_FAIL_END
b37e2e8
 
b37e2e8
-# if __USE_FORTIFY_LEVEL >= 2
b37e2e8
+# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
b37e2e8
 #  define O 0
b37e2e8
 # else
b37e2e8
 #  define O 1
e1b411d
diff -Nrup a/elf/Makefile b/elf/Makefile
6ae22f0
--- a/elf/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/Makefile	2012-06-07 12:15:21.572319589 -0600
f7dfce4
@@ -50,6 +50,7 @@ include ../Makeconfig
b37e2e8
 ifeq ($(unwind-find-fde),yes)
b37e2e8
 routines += unwind-dw2-fde-glibc
b37e2e8
 shared-only-routines += unwind-dw2-fde-glibc
b37e2e8
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
b37e2e8
 endif
b37e2e8
 
b37e2e8
 before-compile  = $(objpfx)trusted-dirs.h
e1b411d
diff -Nrup a/elf/dl-init.c b/elf/dl-init.c
6ae22f0
--- a/elf/dl-init.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/dl-init.c	2012-06-07 12:15:21.573319585 -0600
f7dfce4
@@ -23,11 +23,9 @@
b37e2e8
 /* Type of the initializer.  */
b37e2e8
 typedef void (*init_t) (int, char **, char **);
b37e2e8
 
b37e2e8
-#ifndef HAVE_INLINED_SYSCALLS
b37e2e8
 /* Flag, nonzero during startup phase.  */
b37e2e8
 extern int _dl_starting_up;
b37e2e8
 extern int _dl_starting_up_internal attribute_hidden;
b37e2e8
-#endif
b37e2e8
 
b37e2e8
 
b37e2e8
 static void
f7dfce4
@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int
b37e2e8
   while (i-- > 0)
b37e2e8
     call_init (main_map->l_initfini[i], argc, argv, env);
b37e2e8
 
b37e2e8
-#ifndef HAVE_INLINED_SYSCALLS
b37e2e8
   /* Finished starting up.  */
b37e2e8
   INTUSE(_dl_starting_up) = 0;
b37e2e8
-#endif
b37e2e8
 }
b37e2e8
 INTDEF (_dl_init)
e1b411d
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
6ae22f0
--- a/elf/dl-load.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/dl-load.c	2012-06-07 12:15:21.575319577 -0600
f7dfce4
@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *p
b37e2e8
 
b37e2e8
 
b37e2e8
 static size_t
b37e2e8
-is_dst (const char *start, const char *name, const char *str,
b37e2e8
-	int is_path, int secure)
b37e2e8
+is_dst (const char *start, const char *name, const char *str, int is_path)
b37e2e8
 {
b37e2e8
   size_t len;
b37e2e8
   bool is_curly = false;
f7dfce4
@@ -279,12 +278,6 @@ is_dst (const char *start, const char *n
b37e2e8
 	   && (!is_path || name[len] != ':'))
b37e2e8
     return 0;
b37e2e8
 
b37e2e8
-  if (__builtin_expect (secure, 0)
b37e2e8
-      && ((name[len] != '\0' && name[len] != '/'
b37e2e8
-	   && (!is_path || name[len] != ':'))
b37e2e8
-	  || (name != start + 1 && (!is_path || name[-2] != ':'))))
b37e2e8
-    return 0;
b37e2e8
-
b37e2e8
   return len;
b37e2e8
 }
b37e2e8
 
f7dfce4
@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_
b37e2e8
     {
b37e2e8
       size_t len;
b37e2e8
 
b37e2e8
-      /* $ORIGIN is not expanded for SUID/GUID programs (except if it
b37e2e8
-	 is $ORIGIN alone) and it must always appear first in path.  */
b37e2e8
       ++name;
b37e2e8
-      if ((len = is_dst (start, name, "ORIGIN", is_path,
b37e2e8
-			 INTUSE(__libc_enable_secure))) != 0
b37e2e8
-	  || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
b37e2e8
-	  || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
b37e2e8
+      if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
b37e2e8
+	  || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
b37e2e8
+	  || (len = is_dst (start, name, "LIB", is_path)) != 0)
b37e2e8
 	++cnt;
b37e2e8
 
b37e2e8
       name = strchr (name + len, '$');
f7dfce4
@@ -338,9 +328,16 @@ _dl_dst_substitute (struct link_map *l,
b37e2e8
 	  size_t len;
b37e2e8
 
b37e2e8
 	  ++name;
b37e2e8
-	  if ((len = is_dst (start, name, "ORIGIN", is_path,
b37e2e8
-			     INTUSE(__libc_enable_secure))) != 0)
b37e2e8
+	  if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
b37e2e8
 	    {
b37e2e8
+	      /* For SUID/GUID programs $ORIGIN must always appear
b37e2e8
+		 first in a path element.  */
b37e2e8
+	      if (__builtin_expect (INTUSE(__libc_enable_secure), 0)
b37e2e8
+		  && ((name[len] != '\0' && name[len] != '/'
b37e2e8
+		       && (!is_path || name[len] != ':'))
b37e2e8
+		      || (name != start + 1 && (!is_path || name[-2] != ':'))))
b37e2e8
+		repl = (const char *) -1;
b37e2e8
+	      else
b37e2e8
 #ifndef SHARED
b37e2e8
 	      if (l == NULL)
b37e2e8
 		repl = _dl_get_origin ();
f7dfce4
@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l,
b37e2e8
 	      check_for_trusted = (INTUSE(__libc_enable_secure)
b37e2e8
 				   && l->l_type == lt_executable);
b37e2e8
 	    }
b37e2e8
-	  else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
b37e2e8
+	  else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
b37e2e8
 	    repl = GLRO(dl_platform);
b37e2e8
-	  else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
b37e2e8
+	  else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
b37e2e8
 	    repl = DL_DST_LIB;
b37e2e8
 
b37e2e8
 	  if (repl != NULL && repl != (const char *) -1)
f7dfce4
@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l,
b37e2e8
 		 element, but keep an empty element at the end.  */
b37e2e8
 	      if (wp == result && is_path && *name == ':' && name[1] != '\0')
b37e2e8
 		++name;
b37e2e8
+	      check_for_trusted = false;
b37e2e8
 	    }
b37e2e8
 	  else
b37e2e8
 	    /* No DST we recognize.  */
e1b411d
diff -Nrup a/elf/dl-support.c b/elf/dl-support.c
6ae22f0
--- a/elf/dl-support.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/dl-support.c	2012-06-07 12:15:21.576319573 -0600
f7dfce4
@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds;
b37e2e8
    create a fake scope containing nothing.  */
b37e2e8
 struct r_scope_elem _dl_initial_searchlist;
b37e2e8
 
b37e2e8
-#ifndef HAVE_INLINED_SYSCALLS
b37e2e8
 /* Nonzero during startup.  */
b37e2e8
 int _dl_starting_up = 1;
b37e2e8
-#endif
b37e2e8
 
b37e2e8
 /* Random data provided by the kernel.  */
b37e2e8
 void *_dl_random;
e1b411d
diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c
6ae22f0
--- a/elf/ldconfig.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/ldconfig.c	2012-06-07 12:15:21.577319570 -0600
f7dfce4
@@ -1033,17 +1033,19 @@ search_dirs (void)
b37e2e8
 
b37e2e8
 
b37e2e8
 static void parse_conf_include (const char *config_file, unsigned int lineno,
b37e2e8
-				bool do_chroot, const char *pattern);
b37e2e8
+				const char *prefix, bool do_chroot,
b37e2e8
+				const char *pattern);
b37e2e8
 
b37e2e8
 /* Parse configuration file.  */
b37e2e8
 static void
b37e2e8
-parse_conf (const char *filename, bool do_chroot)
b37e2e8
+parse_conf (const char *filename, const char *prefix, bool do_chroot)
b37e2e8
 {
b37e2e8
   FILE *file = NULL;
b37e2e8
   char *line = NULL;
b37e2e8
   const char *canon;
b37e2e8
   size_t len = 0;
b37e2e8
   unsigned int lineno;
b37e2e8
+  size_t prefix_len = prefix ? strlen (prefix) : 0;
b37e2e8
 
b37e2e8
   if (do_chroot && opt_chroot)
b37e2e8
     {
f7dfce4
@@ -1106,7 +1108,14 @@ Warning: ignoring configuration file tha
b37e2e8
 	  cp += 8;
b37e2e8
 	  while ((dir = strsep (&cp, " \t")) != NULL)
b37e2e8
 	    if (dir[0] != '\0')
b37e2e8
-	      parse_conf_include (filename, lineno, do_chroot, dir);
b37e2e8
+	      parse_conf_include (filename, lineno, prefix, do_chroot, dir);
b37e2e8
+	}
b37e2e8
+      else if (prefix != NULL)
b37e2e8
+	{
b37e2e8
+	  size_t cp_len = strlen (cp);
b37e2e8
+	  char new_cp [prefix_len + cp_len + 1];
b37e2e8
+	  memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
b37e2e8
+	  add_dir (new_cp);
b37e2e8
 	}
b37e2e8
       else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
b37e2e8
 	{
f7dfce4
@@ -1169,7 +1178,7 @@ Warning: ignoring configuration file tha
b37e2e8
    config files to read.  */
b37e2e8
 static void
b37e2e8
 parse_conf_include (const char *config_file, unsigned int lineno,
b37e2e8
-		    bool do_chroot, const char *pattern)
b37e2e8
+		    const char *prefix, bool do_chroot, const char *pattern)
b37e2e8
 {
b37e2e8
   if (opt_chroot && pattern[0] != '/')
b37e2e8
     error (EXIT_FAILURE, 0,
f7dfce4
@@ -1201,7 +1210,7 @@ parse_conf_include (const char *config_f
b37e2e8
     {
b37e2e8
     case 0:
b37e2e8
       for (size_t i = 0; i < gl.gl_pathc; ++i)
b37e2e8
-	parse_conf (gl.gl_pathv[i], false);
b37e2e8
+	parse_conf (gl.gl_pathv[i], prefix, false);
b37e2e8
       globfree64 (&gl);
b37e2e8
       break;
b37e2e8
 
f7dfce4
@@ -1244,6 +1253,8 @@ main (int argc, char **argv)
b37e2e8
   /* Set the text message domain.  */
b37e2e8
   textdomain (_libc_intl_domainname);
b37e2e8
 
b37e2e8
+  arch_startup (argc, argv);
Andreas Schwab c883c14
+
b37e2e8
   /* Parse and process arguments.  */
b37e2e8
   int remaining;
b37e2e8
   argp_parse (&argp, argc, argv, 0, &remaining, NULL);
f7dfce4
@@ -1353,12 +1364,14 @@ main (int argc, char **argv)
b37e2e8
 
b37e2e8
   if (!opt_only_cline)
b37e2e8
     {
b37e2e8
-      parse_conf (config_file, true);
b37e2e8
+      parse_conf (config_file, NULL, true);
b37e2e8
 
b37e2e8
       /* Always add the standard search paths.  */
b37e2e8
       add_system_dir (SLIBDIR);
b37e2e8
       if (strcmp (SLIBDIR, LIBDIR))
b37e2e8
 	add_system_dir (LIBDIR);
Andreas Schwab c883c14
+
b37e2e8
+      add_arch_dirs (config_file);
b37e2e8
     }
b37e2e8
 
b37e2e8
   const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
e1b411d
diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in
6ae22f0
--- a/elf/ldd.bash.in	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/ldd.bash.in	2012-06-07 12:15:21.577319570 -0600
f7dfce4
@@ -166,18 +166,6 @@ warning: you do not have execution permi
b37e2e8
       fi
b37e2e8
     done
b37e2e8
     case $ret in
b37e2e8
-    0)
b37e2e8
-      # If the program exits with exit code 5, it means the process has been
b37e2e8
-      # invoked with __libc_enable_secure.  Fall back to running it through
b37e2e8
-      # the dynamic linker.
b37e2e8
-      try_trace "$file"
b37e2e8
-      rc=$?
b37e2e8
-      if [ $rc = 5 ]; then
b37e2e8
-	try_trace "$RTLD" "$file"
b37e2e8
-	rc=$?
b37e2e8
-      fi
b37e2e8
-      [ $rc = 0 ] || result=1
b37e2e8
-      ;;
b37e2e8
     1)
b37e2e8
       # This can be a non-ELF binary or no binary at all.
b37e2e8
       nonelf "$file" || {
f7dfce4
@@ -185,7 +173,7 @@ warning: you do not have execution permi
b37e2e8
 	result=1
b37e2e8
       }
b37e2e8
       ;;
b37e2e8
-    2)
b37e2e8
+    0|2)
b37e2e8
       try_trace "$RTLD" "$file" || result=1
b37e2e8
       ;;
b37e2e8
     *)
e1b411d
diff -Nrup a/elf/rtld.c b/elf/rtld.c
6ae22f0
--- a/elf/rtld.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/elf/rtld.c	2012-06-07 12:15:21.579319564 -0600
f7dfce4
@@ -106,7 +106,6 @@ static struct audit_list
b37e2e8
   struct audit_list *next;
b37e2e8
 } *audit_list;
b37e2e8
 
b37e2e8
-#ifndef HAVE_INLINED_SYSCALLS
b37e2e8
 /* Set nonzero during loading and initialization of executable and
b37e2e8
    libraries, cleared before the executable's entry point runs.  This
b37e2e8
    must not be initialized to nonzero, because the unused dynamic
f7dfce4
@@ -116,7 +115,6 @@ static struct audit_list
b37e2e8
    never be called.  */
b37e2e8
 int _dl_starting_up = 0;
b37e2e8
 INTVARDEF(_dl_starting_up)
b37e2e8
-#endif
b37e2e8
 
b37e2e8
 /* This is the structure which defines all variables global to ld.so
b37e2e8
    (except those which cannot be added for some reason).  */
b37e2e8
@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr,
b37e2e8
   /* Process the environment variable which control the behaviour.  */
b37e2e8
   process_envvars (&mode);
b37e2e8
 
b37e2e8
-#ifndef HAVE_INLINED_SYSCALLS
b37e2e8
   /* Set up a flag which tells we are just starting.  */
b37e2e8
   INTUSE(_dl_starting_up) = 1;
b37e2e8
-#endif
b37e2e8
 
b37e2e8
   if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
b37e2e8
     {
f7dfce4
@@ -1408,7 +1404,9 @@ of this helper program; chances are you
b37e2e8
 	      char *copy = malloc (len);
b37e2e8
 	      if (copy == NULL)
b37e2e8
 		_dl_fatal_printf ("out of memory\n");
b37e2e8
-	      l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
b37e2e8
+	      l->l_libname->name = memcpy (copy, dsoname, len);
b37e2e8
+	      if (GLRO(dl_debug_mask))
b37e2e8
+		l->l_name = copy;
b37e2e8
 	    }
b37e2e8
 
b37e2e8
 	  /* Add the vDSO to the object list.  */
f7dfce4
@@ -2343,7 +2341,6 @@ ERROR: ld.so: object '%s' cannot be load
b37e2e8
 
b37e2e8
   /* Make sure no new search directories have been added.  */
b37e2e8
   assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
b37e2e8
-
b37e2e8
   if (! prelinked && rtld_multiple_ref)
b37e2e8
     {
b37e2e8
       /* There was an explicit ref to the dynamic linker as a shared lib.
e1b411d
diff -Nrup a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
e1b411d
--- a/include/bits/stdlib-ldbl.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/include/bits/stdlib-ldbl.h	2012-06-07 12:15:21.580319560 -0600
b37e2e8
@@ -0,0 +1 @@
b37e2e8
+#include <stdlib/bits/stdlib-ldbl.h>
e1b411d
diff -Nrup a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h
e1b411d
--- a/include/bits/wchar-ldbl.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/include/bits/wchar-ldbl.h	2012-06-07 12:15:21.580319560 -0600
b37e2e8
@@ -0,0 +1 @@
b37e2e8
+#include <wcsmbs/bits/wchar-ldbl.h>
e1b411d
diff -Nrup a/include/link.h b/include/link.h
6ae22f0
--- a/include/link.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/include/link.h	2012-06-07 12:15:21.581319556 -0600
f7dfce4
@@ -289,7 +289,7 @@ struct link_map
b37e2e8
 #endif
b37e2e8
 #ifndef FORCED_DYNAMIC_TLS_OFFSET
b37e2e8
 # if NO_TLS_OFFSET == 0
b37e2e8
-#  define FORCED_DYNAMIC_TLS_OFFSET 1
b37e2e8
+#  define FORCED_DYNAMIC_TLS_OFFSET -1
b37e2e8
 # elif NO_TLS_OFFSET == -1
b37e2e8
 #  define FORCED_DYNAMIC_TLS_OFFSET -2
b37e2e8
 # else
e1b411d
diff -Nrup a/include/sys/resource.h b/include/sys/resource.h
6ae22f0
--- a/include/sys/resource.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/include/sys/resource.h	2012-06-07 12:15:21.582319552 -0600
f7dfce4
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_wh
b37e2e8
 
b37e2e8
 extern int __setrlimit (enum __rlimit_resource __resource,
b37e2e8
 			const struct rlimit *__rlimits);
b37e2e8
+libc_hidden_proto (__getrlimit)
b37e2e8
 #endif
f7dfce4
 #endif
e1b411d
diff -Nrup a/inet/Makefile b/inet/Makefile
6ae22f0
--- a/inet/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/inet/Makefile	2012-06-07 12:15:21.582319552 -0600
f7dfce4
@@ -54,6 +54,8 @@ tests := htontest test_ifindex tst-ntoa
b37e2e8
 
b37e2e8
 include ../Rules
b37e2e8
 
b37e2e8
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
Andreas Schwab c883c14
+
b37e2e8
 ifeq ($(have-thread-library),yes)
b37e2e8
 
b37e2e8
 CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
e1b411d
diff -Nrup a/intl/locale.alias b/intl/locale.alias
6ae22f0
--- a/intl/locale.alias	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/intl/locale.alias	2012-06-07 12:15:21.583319548 -0600
f7dfce4
@@ -56,8 +56,6 @@ korean		ko_KR.eucKR
b37e2e8
 korean.euc 	ko_KR.eucKR
b37e2e8
 ko_KR		ko_KR.eucKR
b37e2e8
 lithuanian      lt_LT.ISO-8859-13
b37e2e8
-no_NO		nb_NO.ISO-8859-1
b37e2e8
-no_NO.ISO-8859-1 nb_NO.ISO-8859-1
b37e2e8
 norwegian       nb_NO.ISO-8859-1
b37e2e8
 nynorsk		nn_NO.ISO-8859-1
b37e2e8
 polish          pl_PL.ISO-8859-2
e1b411d
diff -Nrup a/libio/stdio.h b/libio/stdio.h
6ae22f0
--- a/libio/stdio.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/libio/stdio.h	2012-06-07 12:15:21.584319544 -0600
f7dfce4
@@ -168,10 +168,12 @@ typedef _G_fpos64_t fpos64_t;
b37e2e8
 extern struct _IO_FILE *stdin;		/* Standard input stream.  */
b37e2e8
 extern struct _IO_FILE *stdout;		/* Standard output stream.  */
b37e2e8
 extern struct _IO_FILE *stderr;		/* Standard error output stream.  */
b37e2e8
+#ifdef __STDC__
b37e2e8
 /* C89/C99 say they're macros.  Make them happy.  */
b37e2e8
 #define stdin stdin
b37e2e8
 #define stdout stdout
b37e2e8
 #define stderr stderr
b37e2e8
+#endif
b37e2e8
 
b37e2e8
 __BEGIN_NAMESPACE_STD
b37e2e8
 /* Remove file FILENAME.  */
e1b411d
diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def
6ae22f0
--- a/locale/iso-4217.def	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/locale/iso-4217.def	2012-06-07 12:15:21.584319544 -0600
b37e2e8
@@ -8,6 +8,7 @@
b37e2e8
  *
b37e2e8
  * !!! The list has to be sorted !!!
b37e2e8
  */
b37e2e8
+DEFINE_INT_CURR("ADP")		/* Andorran Peseta -> EUR  */
b37e2e8
 DEFINE_INT_CURR("AED")		/* United Arab Emirates Dirham  */
b37e2e8
 DEFINE_INT_CURR("AFN")		/* Afghanistan Afgani  */
b37e2e8
 DEFINE_INT_CURR("ALL")		/* Albanian Lek  */
b37e2e8
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD")		/* Armenia Dram
b37e2e8
 DEFINE_INT_CURR("ANG")		/* Netherlands Antilles  */
b37e2e8
 DEFINE_INT_CURR("AOA")		/* Angolan Kwanza  */
b37e2e8
 DEFINE_INT_CURR("ARS")		/* Argentine Peso  */
b37e2e8
+DEFINE_INT_CURR("ATS")		/* Austrian Schilling -> EUR  */
b37e2e8
 DEFINE_INT_CURR("AUD")		/* Australian Dollar  */
b37e2e8
 DEFINE_INT_CURR("AWG")		/* Aruba Guilder  */
b37e2e8
 DEFINE_INT_CURR("AZM")		/* Azerbaijan Manat  */
b37e2e8
 DEFINE_INT_CURR("BAM")		/* Bosnian and Herzegovina Convertible Mark  */
b37e2e8
 DEFINE_INT_CURR("BBD")		/* Barbados Dollar  */
b37e2e8
 DEFINE_INT_CURR("BDT")		/* Bangladesh Taka  */
b37e2e8
+DEFINE_INT_CURR("BEF")		/* Belgian Franc -> EUR  */
b37e2e8
 DEFINE_INT_CURR("BGN")		/* Bulgarian Lev  */
b37e2e8
 DEFINE_INT_CURR("BHD")		/* Bahraini Dinar  */
b37e2e8
 DEFINE_INT_CURR("BIF")		/* Burundi Franc  */
b37e2e8
@@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP")		/* Cuban Peso  *
b37e2e8
 DEFINE_INT_CURR("CVE")		/* Cape Verde Escudo  */
b37e2e8
 DEFINE_INT_CURR("CYP")		/* Cypriot Pound  */
b37e2e8
 DEFINE_INT_CURR("CZK")		/* Czech Koruna  */
b37e2e8
+DEFINE_INT_CURR("DEM")		/* German Mark -> EUR  */
b37e2e8
 DEFINE_INT_CURR("DJF")		/* Djibouti Franc  */
b37e2e8
 DEFINE_INT_CURR("DKK")		/* Danish Krone (Faroe Islands, Greenland)  */
b37e2e8
 DEFINE_INT_CURR("DOP")		/* Dominican Republic  */
b37e2e8
@@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD")		/* Algerian Dina
b37e2e8
 DEFINE_INT_CURR("EEK")		/* Estonian Kroon  */
b37e2e8
 DEFINE_INT_CURR("EGP")		/* Egyptian Pound  */
b37e2e8
 DEFINE_INT_CURR("ERN")		/* Eritrean Nakfa  */
b37e2e8
+DEFINE_INT_CURR("ESP")		/* Spanish Peseta -> EUR  */
b37e2e8
 DEFINE_INT_CURR("ETB")		/* Ethiopian Birr  */
b37e2e8
 DEFINE_INT_CURR("EUR")		/* European Union Euro  */
b37e2e8
+DEFINE_INT_CURR("FIM")		/* Finnish Markka -> EUR  */
b37e2e8
 DEFINE_INT_CURR("FJD")		/* Fiji Dollar  */
b37e2e8
 DEFINE_INT_CURR("FKP")		/* Falkland Islands Pound (Malvinas)  */
b37e2e8
+DEFINE_INT_CURR("FRF")		/* French Franc -> EUR  */
b37e2e8
 DEFINE_INT_CURR("GBP")		/* British Pound  */
b37e2e8
 DEFINE_INT_CURR("GEL")		/* Georgia Lari  */
b37e2e8
 DEFINE_INT_CURR("GHC")		/* Ghana Cedi  */
b37e2e8
 DEFINE_INT_CURR("GIP")		/* Gibraltar Pound  */
b37e2e8
 DEFINE_INT_CURR("GMD")		/* Gambian Dalasi  */
b37e2e8
 DEFINE_INT_CURR("GNF")		/* Guinea Franc  */
b37e2e8
+DEFINE_INT_CURR("GRD")		/* Greek Drachma -> EUR  */
b37e2e8
 DEFINE_INT_CURR("GTQ")		/* Guatemala Quetzal  */
b37e2e8
 DEFINE_INT_CURR("GYD")		/* Guyana Dollar  */
b37e2e8
 DEFINE_INT_CURR("HKD")		/* Hong Kong Dollar  */
b37e2e8
@@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK")		/* Croatia Kuna
b37e2e8
 DEFINE_INT_CURR("HTG")		/* Haiti Gourde  */
b37e2e8
 DEFINE_INT_CURR("HUF")		/* Hungarian Forint  */
b37e2e8
 DEFINE_INT_CURR("IDR")		/* Indonesia Rupiah  */
b37e2e8
+DEFINE_INT_CURR("IEP")		/* Irish Pound -> EUR  */
b37e2e8
 DEFINE_INT_CURR("ILS")		/* Israeli Shekel  */
b37e2e8
 DEFINE_INT_CURR("IMP")		/* Isle of Man Pounds  */
b37e2e8
 DEFINE_INT_CURR("INR")		/* Indian Rupee (Bhutan)  */
b37e2e8
 DEFINE_INT_CURR("IQD")		/* Iraqi Dinar  */
b37e2e8
 DEFINE_INT_CURR("IRR")		/* Iranian Rial  */
b37e2e8
 DEFINE_INT_CURR("ISK")		/* Iceland Krona  */
b37e2e8
+DEFINE_INT_CURR("ITL")		/* Italian Lira -> EUR  */
b37e2e8
 DEFINE_INT_CURR("JEP")		/* Jersey Pound  */
b37e2e8
 DEFINE_INT_CURR("JMD")		/* Jamaican Dollar  */
b37e2e8
 DEFINE_INT_CURR("JOD")		/* Jordanian Dinar  */
b37e2e8
@@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR")		/* Sri Lankan Ru
b37e2e8
 DEFINE_INT_CURR("LRD")		/* Liberian Dollar  */
b37e2e8
 DEFINE_INT_CURR("LSL")		/* Lesotho Maloti  */
b37e2e8
 DEFINE_INT_CURR("LTL")		/* Lithuanian Litas  */
b37e2e8
+DEFINE_INT_CURR("LUF")		/* Luxembourg Franc -> EUR  */
b37e2e8
 DEFINE_INT_CURR("LVL")		/* Latvia Lat  */
b37e2e8
 DEFINE_INT_CURR("LYD")		/* Libyan Arab Jamahiriya Dinar  */
b37e2e8
 DEFINE_INT_CURR("MAD")		/* Moroccan Dirham  */
b37e2e8
@@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM")		/* Mozambique Me
b37e2e8
 DEFINE_INT_CURR("NAD")		/* Namibia Dollar  */
b37e2e8
 DEFINE_INT_CURR("NGN")		/* Nigeria Naira  */
b37e2e8
 DEFINE_INT_CURR("NIO")		/* Nicaragua Cordoba Oro  */
b37e2e8
+DEFINE_INT_CURR("NLG")		/* Netherlands Guilder -> EUR  */
b37e2e8
 DEFINE_INT_CURR("NOK")		/* Norwegian Krone  */
b37e2e8
 DEFINE_INT_CURR("NPR")		/* Nepalese Rupee  */
b37e2e8
 DEFINE_INT_CURR("NZD")		/* New Zealand Dollar  */
b37e2e8
@@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK")		/* Papau New Gui
b37e2e8
 DEFINE_INT_CURR("PHP")		/* Philippines Peso  */
b37e2e8
 DEFINE_INT_CURR("PKR")		/* Pakistan Rupee  */
b37e2e8
 DEFINE_INT_CURR("PLN")		/* Polish Zloty  */
b37e2e8
+DEFINE_INT_CURR("PTE")		/* Portugese Escudo -> EUR  */
b37e2e8
 DEFINE_INT_CURR("PYG")		/* Paraguay Guarani  */
b37e2e8
 DEFINE_INT_CURR("QAR")		/* Qatar Rial  */
b37e2e8
 DEFINE_INT_CURR("ROL")		/* Romanian Leu  */
e1b411d
diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c
6ae22f0
--- a/locale/programs/locarchive.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/locale/programs/locarchive.c	2012-06-07 12:15:21.585319540 -0600
f7dfce4
@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo
b37e2e8
 /* forward decls for below */
b37e2e8
 static uint32_t add_locale (struct locarhandle *ah, const char *name,
b37e2e8
 			    locale_data_t data, bool replace);
b37e2e8
-static void add_alias (struct locarhandle *ah, const char *alias,
b37e2e8
-		       bool replace, const char *oldname,
b37e2e8
-		       uint32_t *locrec_offset_p);
b37e2e8
+void add_alias (struct locarhandle *ah, const char *alias,
b37e2e8
+		bool replace, const char *oldname,
b37e2e8
+		uint32_t *locrec_offset_p);
b37e2e8
 
b37e2e8
 
b37e2e8
 static bool
f7dfce4
@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah)
b37e2e8
 #include "../../intl/explodename.c"
b37e2e8
 #include "../../intl/l10nflist.c"
b37e2e8
 
b37e2e8
-static struct namehashent *
b37e2e8
+struct namehashent *
b37e2e8
 insert_name (struct locarhandle *ah,
b37e2e8
 	     const char *name, size_t name_len, bool replace)
b37e2e8
 {
f7dfce4
@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah,
b37e2e8
   return &namehashtab[idx];
b37e2e8
 }
b37e2e8
 
b37e2e8
-static void
b37e2e8
+void
b37e2e8
 add_alias (struct locarhandle *ah, const char *alias, bool replace,
b37e2e8
 	   const char *oldname, uint32_t *locrec_offset_p)
b37e2e8
 {
e1b411d
diff -Nrup a/localedata/ChangeLog b/localedata/ChangeLog
6ae22f0
--- a/localedata/ChangeLog	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/ChangeLog	2012-06-07 12:15:21.683319174 -0600
6ae22f0
@@ -181,6 +181,14 @@
b37e2e8
 	* tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE):
b37e2e8
 	Remove unused variable.
b37e2e8
 
b37e2e8
+2011-06-28  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab c883c14
+
b37e2e8
+	* charmaps/GB18030: Correct some entries.
Andreas Schwab c883c14
+
b37e2e8
+2011-06-21  Andreas Schwab  <schwab@redhat.com>
Andreas Schwab c883c14
+
b37e2e8
+	* charmaps/GB18030: Readd lost characters.
Andreas Schwab c883c14
+
b37e2e8
 2011-05-21  Ulrich Drepper  <drepper@gmail.com>
b37e2e8
 
b37e2e8
 	[BZ #12788]
e1b411d
diff -Nrup a/localedata/Makefile b/localedata/Makefile
6ae22f0
--- a/localedata/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/Makefile	2012-06-07 12:15:21.776318827 -0600
f7dfce4
@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
b37e2e8
 	echo -n '...'; \
b37e2e8
 	input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
b37e2e8
 	$(LOCALEDEF) --alias-file=../intl/locale.alias \
b37e2e8
+		     --no-archive \
b37e2e8
 		     -i locales/$$input -c -f charmaps/$$charset \
b37e2e8
 		     $(addprefix --prefix=,$(install_root)) $$locale; \
b37e2e8
 	echo ' done'; \
e1b411d
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
6ae22f0
--- a/localedata/SUPPORTED	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/SUPPORTED	2012-06-07 12:15:21.805318719 -0600
b37e2e8
@@ -88,6 +88,7 @@ cy_GB.UTF-8/UTF-8 \
b37e2e8
 cy_GB/ISO-8859-14 \
b37e2e8
 da_DK.UTF-8/UTF-8 \
b37e2e8
 da_DK/ISO-8859-1 \
b37e2e8
+da_DK.ISO-8859-15/ISO-8859-15 \
b37e2e8
 de_AT.UTF-8/UTF-8 \
b37e2e8
 de_AT/ISO-8859-1 \
b37e2e8
 de_AT@euro/ISO-8859-15 \
b37e2e8
@@ -119,6 +120,7 @@ en_DK.UTF-8/UTF-8 \
b37e2e8
 en_DK/ISO-8859-1 \
b37e2e8
 en_GB.UTF-8/UTF-8 \
b37e2e8
 en_GB/ISO-8859-1 \
b37e2e8
+en_GB.ISO-8859-15/ISO-8859-15 \
b37e2e8
 en_HK.UTF-8/UTF-8 \
b37e2e8
 en_HK/ISO-8859-1 \
b37e2e8
 en_IE.UTF-8/UTF-8 \
b37e2e8
@@ -134,6 +136,7 @@ en_SG.UTF-8/UTF-8 \
b37e2e8
 en_SG/ISO-8859-1 \
b37e2e8
 en_US.UTF-8/UTF-8 \
b37e2e8
 en_US/ISO-8859-1 \
b37e2e8
+en_US.ISO-8859-15/ISO-8859-15 \
b37e2e8
 en_ZA.UTF-8/UTF-8 \
b37e2e8
 en_ZA/ISO-8859-1 \
b37e2e8
 en_ZM/UTF-8 \
e1b411d
@@ -317,6 +320,8 @@ nl_NL/ISO-8859-1 \
b37e2e8
 nl_NL@euro/ISO-8859-15 \
b37e2e8
 nn_NO.UTF-8/UTF-8 \
b37e2e8
 nn_NO/ISO-8859-1 \
b37e2e8
+no_NO.UTF-8/UTF-8 \
b37e2e8
+no_NO/ISO-8859-1 \
b37e2e8
 nr_ZA/UTF-8 \
b37e2e8
 nso_ZA/UTF-8 \
b37e2e8
 oc_FR.UTF-8/UTF-8 \
e1b411d
@@ -378,6 +383,7 @@ sv_FI/ISO-8859-1 \
b37e2e8
 sv_FI@euro/ISO-8859-15 \
b37e2e8
 sv_SE.UTF-8/UTF-8 \
b37e2e8
 sv_SE/ISO-8859-1 \
b37e2e8
+sv_SE.ISO-8859-15/ISO-8859-15 \
b37e2e8
 sw_KE/UTF-8 \
b37e2e8
 sw_TZ/UTF-8 \
b37e2e8
 ta_IN/UTF-8 \
e1b411d
diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB
6ae22f0
--- a/localedata/locales/cy_GB	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/locales/cy_GB	2012-06-07 12:15:21.805318719 -0600
f7dfce4
@@ -248,9 +248,9 @@ mon         "<U0049><U006F><U006E>
b37e2e8
 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>"
b37e2e8
 d_fmt       "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
b37e2e8
 t_fmt       "<U0025><U0054>"
f7dfce4
-am_pm       "<U0061><U006D>";"<U0070><U006D>"
b37e2e8
+am_pm       "<U0041><U004D>";"<U0050><U004D>"
f7dfce4
 t_fmt_ampm  "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
f7dfce4
-date_fmt    "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
b37e2e8
+date_fmt    "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
f7dfce4
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
f7dfce4
 <U0025><U005A><U0020><U0025><U0059>"
6ae22f0
 first_workday 2
e1b411d
diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB
6ae22f0
--- a/localedata/locales/en_GB	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/locales/en_GB	2012-06-07 12:15:21.806318715 -0600
f7dfce4
@@ -116,7 +116,7 @@ mon         "<U004A><U0061><U006E>
b37e2e8
 d_t_fmt     "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
b37e2e8
 d_fmt       "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
b37e2e8
 t_fmt       "<U0025><U0054>"
f7dfce4
-am_pm       "<U0061><U006D>";"<U0070><U006D>"
b37e2e8
+am_pm       "<U0041><U004D>";"<U0050><U004D>"
f7dfce4
 t_fmt_ampm  "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
f7dfce4
 date_fmt    "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
b37e2e8
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
e1b411d
diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO
e1b411d
--- a/localedata/locales/no_NO	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/localedata/locales/no_NO	2012-06-07 12:15:21.806318715 -0600
b37e2e8
@@ -0,0 +1,69 @@
b37e2e8
+escape_char	/
b37e2e8
+comment_char    %
b37e2e8
+
b37e2e8
+% Norwegian language locale for Norway
b37e2e8
+% Source: Norsk Standardiseringsforbund
b37e2e8
+% Address: University Library,
b37e2e8
+%   Drammensveien 41, N-9242 Oslo, Norge
b37e2e8
+% Contact: Kolbjoern Aamboe
b37e2e8
+% Tel: +47 - 22859109
b37e2e8
+% Fax: +47 - 22434497
b37e2e8
+% Email: kolbjorn.aambo@usit.uio.no
b37e2e8
+% Language: no
b37e2e8
+% Territory: NO
b37e2e8
+% Revision: 4.3
b37e2e8
+% Date: 1996-10-15
b37e2e8
+% Application: general
b37e2e8
+% Users: general
b37e2e8
+% Repertoiremap: mnemonic.ds
b37e2e8
+% Charset: ISO-8859-1
b37e2e8
+% Distribution and use is free, also
b37e2e8
+% for commercial purposes.
b37e2e8
+
b37e2e8
+LC_IDENTIFICATION
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_IDENTIFICATION
b37e2e8
+
b37e2e8
+LC_COLLATE
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_COLLATE
b37e2e8
+
b37e2e8
+LC_CTYPE
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_CTYPE
b37e2e8
+
b37e2e8
+LC_MONETARY
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_MONETARY
b37e2e8
+
b37e2e8
+LC_NUMERIC
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_NUMERIC
b37e2e8
+
b37e2e8
+LC_TIME
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_TIME
b37e2e8
+
b37e2e8
+LC_MESSAGES
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_MESSAGES
b37e2e8
+
b37e2e8
+LC_PAPER
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_PAPER
b37e2e8
+
b37e2e8
+LC_TELEPHONE
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_TELEPHONE
b37e2e8
+
b37e2e8
+LC_MEASUREMENT
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_MEASUREMENT
b37e2e8
+
b37e2e8
+LC_NAME
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_NAME
b37e2e8
+
b37e2e8
+LC_ADDRESS
b37e2e8
+copy "nb_NO"
b37e2e8
+END LC_ADDRESS
e1b411d
diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW
6ae22f0
--- a/localedata/locales/zh_TW	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/localedata/locales/zh_TW	2012-06-07 12:15:21.807318711 -0600
b37e2e8
@@ -1,7 +1,7 @@
b37e2e8
 comment_char %
b37e2e8
 escape_char /
b37e2e8
 %
b37e2e8
-% Chinese language locale for Taiwan R.O.C.
b37e2e8
+% Chinese language locale for Taiwan
b37e2e8
 % charmap: BIG5-CP950
b37e2e8
 %
b37e2e8
 % Original Author:
b37e2e8
@@ -17,7 +17,7 @@ escape_char /
b37e2e8
 % Reference:	http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
b37e2e8
 
b37e2e8
 LC_IDENTIFICATION
b37e2e8
-title      "Chinese locale for Taiwan R.O.C."
b37e2e8
+title      "Chinese locale for Taiwan"
b37e2e8
 source     ""
b37e2e8
 address    ""
b37e2e8
 contact    ""
b37e2e8
@@ -25,7 +25,7 @@ email      "bug-glibc-locales@gnu.org"
b37e2e8
 tel        ""
b37e2e8
 fax        ""
b37e2e8
 language   "Chinese"
b37e2e8
-territory  "Taiwan R.O.C."
b37e2e8
+territory  "Taiwan"
b37e2e8
 revision   "0.2"
b37e2e8
 date       "2000-08-02"
b37e2e8
 %
e1b411d
diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c
6ae22f0
--- a/login/programs/pt_chown.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/login/programs/pt_chown.c	2012-06-07 12:15:21.807318711 -0600
f7dfce4
@@ -28,6 +28,7 @@
b37e2e8
 #include <string.h>
b37e2e8
 #include <sys/stat.h>
b37e2e8
 #include <unistd.h>
b37e2e8
+#include <fcntl.h>
b37e2e8
 #ifdef HAVE_LIBCAP
b37e2e8
 # include <sys/capability.h>
b37e2e8
 # include <sys/prctl.h>
f7dfce4
@@ -142,7 +143,7 @@ main (int argc, char *argv[])
b37e2e8
   uid_t uid = getuid ();
b37e2e8
   int remaining;
b37e2e8
 
b37e2e8
-  if (argc == 1 && euid == 0)
b37e2e8
+  if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
b37e2e8
     {
b37e2e8
 #ifdef HAVE_LIBCAP
b37e2e8
   /* Drop privileges.  */
f7dfce4
@@ -175,6 +176,13 @@ main (int argc, char *argv[])
b37e2e8
 
b37e2e8
   /* We aren't going to be using privileges, so drop them right now. */
b37e2e8
   setuid (uid);
b37e2e8
+#ifdef HAVE_LIBCAP
b37e2e8
+  cap_t caps = cap_init ();
b37e2e8
+  if (caps == NULL)
b37e2e8
+    error (1, errno, "cap_init");
b37e2e8
+  cap_set_proc (caps);
b37e2e8
+  cap_free (caps);
b37e2e8
+#endif
b37e2e8
 
b37e2e8
   /* Set locale via LC_ALL.  */
b37e2e8
   setlocale (LC_ALL, "");
f7dfce4
@@ -194,9 +202,5 @@ main (int argc, char *argv[])
b37e2e8
       return EXIT_FAILURE;
b37e2e8
     }
b37e2e8
 
b37e2e8
-  /* Check if we are properly installed.  */
b37e2e8
-  if (euid != 0)
b37e2e8
-    error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
b37e2e8
-
b37e2e8
   return EXIT_SUCCESS;
b37e2e8
 }
e1b411d
diff -Nrup a/manual/libc.texinfo b/manual/libc.texinfo
6ae22f0
--- a/manual/libc.texinfo	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/manual/libc.texinfo	2012-06-07 12:15:21.808318708 -0600
f7dfce4
@@ -7,7 +7,7 @@
f7dfce4
 @include macros.texi
b37e2e8
 
b37e2e8
 @comment Tell install-info what to do.
b37e2e8
-@dircategory Software libraries
b37e2e8
+@dircategory Libraries
b37e2e8
 @direntry
b37e2e8
 * Libc: (libc).                 C library.
b37e2e8
 @end direntry
e1b411d
diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h
6ae22f0
--- a/misc/sys/cdefs.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/misc/sys/cdefs.h	2012-06-07 12:15:21.808318708 -0600
f7dfce4
@@ -142,7 +142,10 @@
b37e2e8
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
f7dfce4
 #define __fortify_function __extern_always_inline __attribute_artificial__
b37e2e8
 
b37e2e8
-#if __GNUC_PREREQ (4,3)
b37e2e8
+#if __GNUC_PREREQ (4,3) \
b37e2e8
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b37e2e8
+	&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b37e2e8
+	&& __GNUC_RH_RELEASE__ >= 31)
b37e2e8
 # define __warndecl(name, msg) \
b37e2e8
   extern void name (void) __attribute__((__warning__ (msg)))
b37e2e8
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
f7dfce4
@@ -320,7 +323,10 @@
b37e2e8
 
b37e2e8
 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
b37e2e8
    inline semantics, unless -fgnu89-inline is used.  */
b37e2e8
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
b37e2e8
+#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
b37e2e8
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
f7dfce4
+       && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
f7dfce4
+       && __GNUC_RH_RELEASE__ >= 31)
b37e2e8
 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
b37e2e8
 #  define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
f7dfce4
 #  define __extern_always_inline \
f7dfce4
@@ -333,7 +339,10 @@
b37e2e8
 
b37e2e8
 /* GCC 4.3 and above allow passing all anonymous arguments of an
b37e2e8
    __extern_always_inline function to some other vararg function.  */
b37e2e8
-#if __GNUC_PREREQ (4,3)
b37e2e8
+#if __GNUC_PREREQ (4,3) \
b37e2e8
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b37e2e8
+	&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b37e2e8
+	&& __GNUC_RH_RELEASE__ >= 31)
b37e2e8
 # define __va_arg_pack() __builtin_va_arg_pack ()
b37e2e8
 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
b37e2e8
 #endif
e1b411d
diff -Nrup a/nis/Makefile b/nis/Makefile
6ae22f0
--- a/nis/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nis/Makefile	2012-06-07 12:15:21.810318702 -0600
f7dfce4
@@ -71,6 +71,8 @@ libnss_nisplus-inhibit-o = $(filter-out
b37e2e8
 
b37e2e8
 include ../Rules
b37e2e8
 
b37e2e8
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
b37e2e8
+CFLAGS-ypclnt.c += -fno-strict-aliasing
b37e2e8
 
b37e2e8
 $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
b37e2e8
 $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
e1b411d
diff -Nrup a/nis/nss b/nis/nss
6ae22f0
--- a/nis/nss	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nis/nss	2012-06-07 12:15:21.811318698 -0600
b37e2e8
@@ -25,7 +25,7 @@
b37e2e8
 #  memory with every getXXent() call.  Otherwise each getXXent() call
b37e2e8
 #  might result into a network communication with the server to get
b37e2e8
 #  the next entry.
b37e2e8
-#SETENT_BATCH_READ=TRUE
b37e2e8
+SETENT_BATCH_READ=TRUE
b37e2e8
 #
b37e2e8
 # ADJUNCT_AS_SHADOW
b37e2e8
 #  If set to TRUE, the passwd routines in the NIS NSS module will not
e1b411d
diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog
6ae22f0
--- a/nptl/ChangeLog	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/ChangeLog	2012-06-07 12:15:21.813318690 -0600
6ae22f0
@@ -5562,6 +5562,11 @@
b37e2e8
 	Move definition inside libpthread, libc, librt check.  Provide
b37e2e8
 	definition for rtld.
b37e2e8
 
b37e2e8
+2004-09-02  Jakub Jelinek  <jakub@redhat.com>
Andreas Schwab c883c14
+
b37e2e8
+	* pthread_cond_destroy.c (__pthread_cond_destroy): If there are
b37e2e8
+	waiters, awake all waiters on the associated mutex.
Andreas Schwab c883c14
+
b37e2e8
 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
b37e2e8
 
b37e2e8
 	* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6ae22f0
@@ -7636,6 +7641,11 @@
b37e2e8
 
b37e2e8
 	* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
b37e2e8
 
b37e2e8
+2003-07-22  Jakub Jelinek  <jakub@redhat.com>
Andreas Schwab c883c14
+
b37e2e8
+	* descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
b37e2e8
+	if __need_struct_pthread_size, instead define lll_lock_t.
Andreas Schwab c883c14
+
b37e2e8
 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
b37e2e8
 
b37e2e8
 	* tst-cancel17.c (do_test): Check if aio_cancel failed.
e1b411d
diff -Nrup a/nptl/Makefile b/nptl/Makefile
6ae22f0
--- a/nptl/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/Makefile	2012-06-07 12:15:21.816318678 -0600
f7dfce4
@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
b37e2e8
     $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
b37e2e8
 				       $(objpfx)libpthread_nonshared.a
b37e2e8
 $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
b37e2e8
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
b37e2e8
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
b37e2e8
 # since otherwise libpthread.so comes before libc.so when linking.
b37e2e8
 $(addprefix $(objpfx), $(tests-reverse)): \
b37e2e8
-  $(objpfx)../libc.so $(objpfx)libpthread.so \
b37e2e8
+  $(objpfx)linklibc.so $(objpfx)libpthread.so \
b37e2e8
   $(objpfx)libpthread_nonshared.a
b37e2e8
 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
b37e2e8
 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
b37e2e8
 
b37e2e8
 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
Andreas Schwab c883c14
+
b37e2e8
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
b37e2e8
+	ln -s ../libc.so $@
b37e2e8
+generated += libclink.so
b37e2e8
 else
b37e2e8
 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
b37e2e8
 endif
e1b411d
diff -Nrup a/nptl/Versions b/nptl/Versions
6ae22f0
--- a/nptl/Versions	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/Versions	2012-06-07 12:15:21.817318674 -0600
b37e2e8
@@ -30,6 +30,7 @@ libc {
b37e2e8
     __libc_alloca_cutoff;
b37e2e8
     # Internal libc interface to libpthread
b37e2e8
     __libc_dl_error_tsd;
b37e2e8
+    __getrlimit;
b37e2e8
   }
b37e2e8
 }
b37e2e8
 
e1b411d
diff -Nrup a/nptl/nptl-init.c b/nptl/nptl-init.c
6ae22f0
--- a/nptl/nptl-init.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/nptl-init.c	2012-06-07 12:15:21.817318674 -0600
f7dfce4
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (v
b37e2e8
   /* Determine the default allowed stack size.  This is the size used
b37e2e8
      in case the user does not specify one.  */
b37e2e8
   struct rlimit limit;
b37e2e8
-  if (getrlimit (RLIMIT_STACK, &limit) != 0
b37e2e8
+  if (__getrlimit (RLIMIT_STACK, &limit) != 0
b37e2e8
       || limit.rlim_cur == RLIM_INFINITY)
b37e2e8
     /* The system limit is not usable.  Use an architecture-specific
b37e2e8
        default.  */
e1b411d
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
6ae22f0
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h	2012-06-07 12:15:21.817318674 -0600
f7dfce4
@@ -188,4 +188,7 @@
b37e2e8
 /* Typed memory objects are not available.  */
b37e2e8
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
b37e2e8
 
b37e2e8
+/* Streams are not available.  */
b37e2e8
+#define _XOPEN_STREAMS	-1
b37e2e8
+
b37e2e8
 #endif /* bits/posix_opt.h */
e1b411d
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions
e1b411d
--- a/nptl/sysdeps/unix/sysv/linux/i386/Versions	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions	2012-06-07 12:15:21.818318670 -0600
b37e2e8
@@ -0,0 +1,6 @@
b37e2e8
+libc {
b37e2e8
+  GLIBC_PRIVATE {
b37e2e8
+    # Internal libc interface to libpthread
b37e2e8
+    __uname;
b37e2e8
+  }
b37e2e8
+}
e1b411d
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
6ae22f0
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h	2012-06-07 12:15:21.818318670 -0600
f7dfce4
@@ -36,7 +36,7 @@ is_smp_system (void)
b37e2e8
   char *cp;
b37e2e8
 
b37e2e8
   /* Try reading the number using `sysctl' first.  */
b37e2e8
-  if (uname (&u.uts) == 0)
b37e2e8
+  if (__uname (&u.uts) == 0)
b37e2e8
     cp = u.uts.version;
b37e2e8
   else
b37e2e8
     {
e1b411d
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/sysv/linux/kernel-features.h
e1b411d
--- a/nptl/sysdeps/unix/sysv/linux/kernel-features.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h	2012-06-07 12:15:21.818318670 -0600
b37e2e8
@@ -0,0 +1,6 @@
b37e2e8
+#include_next <kernel-features.h>
b37e2e8
+
b37e2e8
+/* NPTL can always assume all clone thread flags work.  */
b37e2e8
+#ifndef __ASSUME_CLONE_THREAD_FLAGS
b37e2e8
+# define __ASSUME_CLONE_THREAD_FLAGS	1
b37e2e8
+#endif
e1b411d
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
6ae22f0
--- a/nscd/nscd.conf	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nscd/nscd.conf	2012-06-07 12:15:21.818318670 -0600
b37e2e8
@@ -33,7 +33,7 @@
b37e2e8
 #	logfile			/var/log/nscd.log
b37e2e8
 #	threads			4
b37e2e8
 #	max-threads		32
b37e2e8
-#	server-user		nobody
b37e2e8
+	server-user		nscd
b37e2e8
 #	stat-user		somebody
b37e2e8
 	debug-level		0
b37e2e8
 #	reload-count		5
e1b411d
diff -Nrup a/nscd/nscd.init b/nscd/nscd.init
6ae22f0
--- a/nscd/nscd.init	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nscd/nscd.init	2012-06-07 12:15:21.818318670 -0600
b37e2e8
@@ -9,6 +9,7 @@
b37e2e8
 #		slow naming services like NIS, NIS+, LDAP, or hesiod.
b37e2e8
 # processname: /usr/sbin/nscd
b37e2e8
 # config: /etc/nscd.conf
b37e2e8
+# config: /etc/sysconfig/nscd
b37e2e8
 #
b37e2e8
 ### BEGIN INIT INFO
b37e2e8
 # Provides: nscd
b37e2e8
@@ -28,20 +29,8 @@
b37e2e8
 # Source function library.
b37e2e8
 . /etc/init.d/functions
b37e2e8
 
b37e2e8
-# nscd does not run on any kernel lower than 2.2.0 because of threading
b37e2e8
-# problems, so we require that in first place.
b37e2e8
-case $(uname -r) in
b37e2e8
-    2.[2-9].*)
b37e2e8
-	# this is okay
b37e2e8
-	;;
b37e2e8
-    [3-9]*)
b37e2e8
-	# these are of course also okay
b37e2e8
-	;;
b37e2e8
-    *)
b37e2e8
-	#this is not
b37e2e8
-	exit 1
b37e2e8
-	;;
b37e2e8
-esac
b37e2e8
+# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
b37e2e8
+[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
b37e2e8
 
b37e2e8
 RETVAL=0
b37e2e8
 prog=nscd
b37e2e8
@@ -50,7 +39,7 @@ start () {
b37e2e8
     [ -d /var/run/nscd ] || mkdir /var/run/nscd
b37e2e8
     [ -d /var/db/nscd ] || mkdir /var/db/nscd
b37e2e8
     echo -n $"Starting $prog: "
b37e2e8
-    daemon /usr/sbin/nscd
b37e2e8
+    daemon /usr/sbin/nscd $NSCD_OPTIONS
b37e2e8
     RETVAL=$?
b37e2e8
     echo
b37e2e8
     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
b37e2e8
@@ -83,11 +72,11 @@ restart() {
b37e2e8
 # See how we were called.
b37e2e8
 case "$1" in
b37e2e8
     start)
b37e2e8
-	start
b37e2e8
+	[ -e /var/lock/subsys/nscd ] || start
b37e2e8
 	RETVAL=$?
b37e2e8
 	;;
b37e2e8
     stop)
b37e2e8
-	stop
b37e2e8
+	[ ! -e /var/lock/subsys/nscd ] || stop
b37e2e8
 	RETVAL=$?
b37e2e8
 	;;
b37e2e8
     status)
b37e2e8
@@ -99,14 +88,17 @@ case "$1" in
b37e2e8
 	RETVAL=$?
b37e2e8
 	;;
b37e2e8
     try-restart | condrestart)
b37e2e8
-	[ -e /var/lock/subsys/nscd ] && restart
b37e2e8
+	[ ! -e /var/lock/subsys/nscd ] || restart
b37e2e8
 	RETVAL=$?
b37e2e8
 	;;
b37e2e8
     force-reload | reload)
b37e2e8
     	echo -n $"Reloading $prog: "
b37e2e8
-	killproc /usr/sbin/nscd -HUP
b37e2e8
-	RETVAL=$?
b37e2e8
-	echo
b37e2e8
+    	RETVAL=0
b37e2e8
+    	/usr/sbin/nscd -i passwd || RETVAL=$?
b37e2e8
+    	/usr/sbin/nscd -i group || RETVAL=$?
b37e2e8
+    	/usr/sbin/nscd -i hosts || RETVAL=$?
b37e2e8
+    	/usr/sbin/nscd -i services || RETVAL=$?
b37e2e8
+    	echo
b37e2e8
 	;;
b37e2e8
     *)
b37e2e8
 	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
e1b411d
diff -Nrup a/nscd/selinux.c b/nscd/selinux.c
6ae22f0
--- a/nscd/selinux.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nscd/selinux.c	2012-06-07 12:15:21.819318667 -0600
f7dfce4
@@ -269,6 +269,18 @@ avc_create_thread (void (*run) (void))
b37e2e8
 {
b37e2e8
   int rc;
b37e2e8
 
b37e2e8
+#if defined HAVE_LIBAUDIT && defined HAVE_LIBCAP
b37e2e8
+  if (server_user != NULL && getuid () == 0)
b37e2e8
+    {
b37e2e8
+      /* We need to preserve the capabilities in the AVC thread.  */
b37e2e8
+      if (prctl (PR_SET_KEEPCAPS, 1) == -1)
b37e2e8
+	{
b37e2e8
+	  dbg_log (_("Failed to set keep-capabilities"));
b37e2e8
+	  error (EXIT_FAILURE, errno, _("prctl(KEEPCAPS) failed"));
b37e2e8
+	}
b37e2e8
+    }
b37e2e8
+#endif
b37e2e8
+
b37e2e8
   rc =
b37e2e8
     pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL);
b37e2e8
   if (rc != 0)
e1b411d
diff -Nrup a/nss/Makefile b/nss/Makefile
6ae22f0
--- a/nss/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nss/Makefile	2012-06-07 12:15:21.819318667 -0600
f7dfce4
@@ -101,6 +101,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
f7dfce4
 	 echo '#include "$<"') > $@.new
f7dfce4
 	mv -f $@.new $@
b37e2e8
 
b37e2e8
+CFLAGS-files-hosts.c += -fno-strict-aliasing
b37e2e8
 
f7dfce4
 $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
f7dfce4
 
e1b411d
diff -Nrup a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
6ae22f0
--- a/nss/nss_files/files-XXX.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/nss/nss_files/files-XXX.c	2012-06-07 12:15:21.819318667 -0600
f7dfce4
@@ -189,7 +189,7 @@ internal_getent (struct STRUCTURE *resul
b37e2e8
 {
b37e2e8
   char *p;
b37e2e8
   struct parser_data *data = (void *) buffer;
b37e2e8
-  int linebuflen = buffer + buflen - data->linebuffer;
b37e2e8
+  size_t linebuflen = buffer + buflen - data->linebuffer;
b37e2e8
   int parse_result;
b37e2e8
 
b37e2e8
   if (buflen < sizeof *data + 2)
e1b411d
diff -Nrup a/posix/Makefile b/posix/Makefile
6ae22f0
--- a/posix/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/posix/Makefile	2012-06-07 12:15:21.820318664 -0600
f7dfce4
@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi
b37e2e8
 	  mv -f $@/$$spec.new $@/$$spec; \
b37e2e8
 	done < $(objpfx)getconf.speclist
b37e2e8
 
b37e2e8
-$(objpfx)getconf.speclist: $(objpfx)getconf
b37e2e8
-ifeq (no,$(cross-compiling))
b37e2e8
-	LC_ALL=C GETCONF_DIR=/dev/null \
b37e2e8
-	$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
b37e2e8
-	LC_ALL=C GETCONF_DIR=/dev/null \
b37e2e8
-	$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
b37e2e8
-	LC_ALL=C GETCONF_DIR=/dev/null \
b37e2e8
-	$(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
b37e2e8
-else
b37e2e8
-	> $@.new
b37e2e8
-endif
b37e2e8
+$(objpfx)getconf.speclist: getconf.speclist.h
b37e2e8
+	$(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
b37e2e8
+	  | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
b37e2e8
+	  > $@.new
b37e2e8
 	mv -f $@.new $@
e1b411d
diff -Nrup a/posix/gai.conf b/posix/gai.conf
6ae22f0
--- a/posix/gai.conf	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/posix/gai.conf	2012-06-07 12:15:21.820318664 -0600
b37e2e8
@@ -41,7 +41,7 @@
b37e2e8
 #
b37e2e8
 # precedence  <mask>   <value>
b37e2e8
 #    Add another rule to the RFC 3484 precedence table.  See section 2.1
b37e2e8
-#    and 10.3 in RFC 3484.  The default is:
b37e2e8
+#    and 10.3 in RFC 3484.  The RFC requires:
b37e2e8
 #
b37e2e8
 #precedence  ::1/128       50
b37e2e8
 #precedence  ::/0          40
b37e2e8
@@ -58,7 +58,7 @@
b37e2e8
 #    Add another rule to the RFC 3484 scope table for IPv4 addresses.
b37e2e8
 #    By default the scope IDs described in section 3.2 in RFC 3484 are
b37e2e8
 #    used.  Changing these defaults should hardly ever be necessary.
b37e2e8
-#    The defaults are equivalent to:
b37e2e8
+#    The definitions in RFC 1918 are equivalent to:
b37e2e8
 #
b37e2e8
 #scopev4 ::ffff:169.254.0.0/112  2
b37e2e8
 #scopev4 ::ffff:127.0.0.0/104    2
b37e2e8
@@ -75,3 +75,5 @@
b37e2e8
 #scopev4 ::ffff:169.254.0.0/112  2
b37e2e8
 #scopev4 ::ffff:127.0.0.0/104    2
b37e2e8
 #scopev4 ::ffff:0.0.0.0/96       14
b37e2e8
+#
b37e2e8
+#    This is what the Red Hat setting currently uses.
e1b411d
diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h
e1b411d
--- a/posix/getconf.speclist.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/posix/getconf.speclist.h	2012-06-07 12:15:21.820318664 -0600
b37e2e8
@@ -0,0 +1,39 @@
b37e2e8
+#include <unistd.h>
b37e2e8
+const char *START_OF_STRINGS =
b37e2e8
+#if _POSIX_V7_ILP32_OFF32 == 1
b37e2e8
+"POSIX_V7_ILP32_OFF32"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V7_ILP32_OFFBIG == 1
b37e2e8
+"POSIX_V7_ILP32_OFFBIG"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V7_LP64_OFF64 == 1
b37e2e8
+"POSIX_V7_LP64_OFF64"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V7_LPBIG_OFFBIG == 1
b37e2e8
+"POSIX_V7_LPBIG_OFFBIG"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V6_ILP32_OFF32 == 1
b37e2e8
+"POSIX_V6_ILP32_OFF32"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V6_ILP32_OFFBIG == 1
b37e2e8
+"POSIX_V6_ILP32_OFFBIG"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V6_LP64_OFF64 == 1
b37e2e8
+"POSIX_V6_LP64_OFF64"
b37e2e8
+#endif
b37e2e8
+#if _POSIX_V6_LPBIG_OFFBIG == 1
b37e2e8
+"POSIX_V6_LPBIG_OFFBIG"
b37e2e8
+#endif
b37e2e8
+#if _XBS5_ILP32_OFF32 == 1
b37e2e8
+"XBS5_ILP32_OFF32"
b37e2e8
+#endif
b37e2e8
+#if _XBS5_ILP32_OFFBIG == 1
b37e2e8
+"XBS5_ILP32_OFFBIG"
b37e2e8
+#endif
b37e2e8
+#if _XBS5_LP64_OFF64 == 1
b37e2e8
+"XBS5_LP64_OFF64"
b37e2e8
+#endif
b37e2e8
+#if _XBS5_LPBIG_OFFBIG == 1
b37e2e8
+"XBS5_LPBIG_OFFBIG"
b37e2e8
+#endif
b37e2e8
+"";
e1b411d
diff -Nrup a/posix/regcomp.c b/posix/regcomp.c
6ae22f0
--- a/posix/regcomp.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/posix/regcomp.c	2012-06-07 12:15:21.821318661 -0600
f7dfce4
@@ -2772,40 +2772,29 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 
b37e2e8
   /* Local function for parse_bracket_exp used in _LIBC environement.
b37e2e8
      Seek the collating symbol entry correspondings to NAME.
b37e2e8
-     Return the index of the symbol in the SYMB_TABLE.  */
b37e2e8
+     Return the index of the symbol in the SYMB_TABLE,
b37e2e8
+     or -1 if not found.  */
b37e2e8
 
b37e2e8
   auto inline int32_t
b37e2e8
   __attribute ((always_inline))
b37e2e8
-  seek_collating_symbol_entry (name, name_len)
b37e2e8
-	 const unsigned char *name;
b37e2e8
-	 size_t name_len;
b37e2e8
+  seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
b37e2e8
     {
b37e2e8
-      int32_t hash = elem_hash ((const char *) name, name_len);
b37e2e8
-      int32_t elem = hash % table_size;
b37e2e8
-      if (symb_table[2 * elem] != 0)
b37e2e8
-	{
b37e2e8
-	  int32_t second = hash % (table_size - 2) + 1;
b37e2e8
+      int32_t elem;
b37e2e8
 
b37e2e8
-	  do
b37e2e8
-	    {
b37e2e8
-	      /* First compare the hashing value.  */
b37e2e8
-	      if (symb_table[2 * elem] == hash
b37e2e8
-		  /* Compare the length of the name.  */
b37e2e8
-		  && name_len == extra[symb_table[2 * elem + 1]]
b37e2e8
-		  /* Compare the name.  */
b37e2e8
-		  && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
b37e2e8
-			     name_len) == 0)
b37e2e8
-		{
b37e2e8
-		  /* Yep, this is the entry.  */
b37e2e8
-		  break;
b37e2e8
-		}
b37e2e8
-
b37e2e8
-	      /* Next entry.  */
b37e2e8
-	      elem += second;
b37e2e8
-	    }
b37e2e8
-	  while (symb_table[2 * elem] != 0);
b37e2e8
-	}
b37e2e8
-      return elem;
b37e2e8
+      for (elem = 0; elem < table_size; elem++)
b37e2e8
+	if (symb_table[2 * elem] != 0)
b37e2e8
+	  {
b37e2e8
+	    int32_t idx = symb_table[2 * elem + 1];
b37e2e8
+	    /* Skip the name of collating element name.  */
b37e2e8
+	    idx += 1 + extra[idx];
b37e2e8
+	    if (/* Compare the length of the name.  */
b37e2e8
+		name_len == extra[idx]
b37e2e8
+		/* Compare the name.  */
b37e2e8
+		&& memcmp (name, &extra[idx + 1], name_len) == 0)
b37e2e8
+	      /* Yep, this is the entry.  */
b37e2e8
+	      return elem;
b37e2e8
+	  }
b37e2e8
+      return -1;
b37e2e8
     }
b37e2e8
 
b37e2e8
   /* Local function for parse_bracket_exp used in _LIBC environment.
f7dfce4
@@ -2814,8 +2803,7 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 
b37e2e8
   auto inline unsigned int
b37e2e8
   __attribute ((always_inline))
b37e2e8
-  lookup_collation_sequence_value (br_elem)
b37e2e8
-	 bracket_elem_t *br_elem;
b37e2e8
+  lookup_collation_sequence_value (bracket_elem_t *br_elem)
b37e2e8
     {
b37e2e8
       if (br_elem->type == SB_CHAR)
b37e2e8
 	{
f7dfce4
@@ -2843,7 +2831,7 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 	      int32_t elem, idx;
b37e2e8
 	      elem = seek_collating_symbol_entry (br_elem->opr.name,
b37e2e8
 						  sym_name_len);
b37e2e8
-	      if (symb_table[2 * elem] != 0)
b37e2e8
+	      if (elem != -1)
b37e2e8
 		{
b37e2e8
 		  /* We found the entry.  */
b37e2e8
 		  idx = symb_table[2 * elem + 1];
f7dfce4
@@ -2861,7 +2849,7 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 		  /* Return the collation sequence value.  */
b37e2e8
 		  return *(unsigned int *) (extra + idx);
b37e2e8
 		}
b37e2e8
-	      else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
b37e2e8
+	      else if (sym_name_len == 1)
b37e2e8
 		{
b37e2e8
 		  /* No valid character.  Match it as a single byte
b37e2e8
 		     character.  */
f7dfce4
@@ -2883,11 +2871,8 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 
b37e2e8
   auto inline reg_errcode_t
b37e2e8
   __attribute ((always_inline))
b37e2e8
-  build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
b37e2e8
-	 re_charset_t *mbcset;
b37e2e8
-	 int *range_alloc;
b37e2e8
-	 bitset_t sbcset;
b37e2e8
-	 bracket_elem_t *start_elem, *end_elem;
b37e2e8
+  build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
b37e2e8
+		   bracket_elem_t *start_elem, bracket_elem_t *end_elem)
b37e2e8
     {
b37e2e8
       unsigned int ch;
b37e2e8
       uint32_t start_collseq;
f7dfce4
@@ -2966,25 +2951,22 @@ parse_bracket_exp (re_string_t *regexp,
b37e2e8
 
b37e2e8
   auto inline reg_errcode_t
b37e2e8
   __attribute ((always_inline))
b37e2e8
-  build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
b37e2e8
-	 re_charset_t *mbcset;
b37e2e8
-	 int *coll_sym_alloc;
b37e2e8
-	 bitset_t sbcset;
b37e2e8
-	 const unsigned char *name;
b37e2e8
+  build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
b37e2e8
+			  int *coll_sym_alloc, const unsigned char *name)
b37e2e8
     {
b37e2e8
       int32_t elem, idx;
b37e2e8
       size_t name_len = strlen ((const char *) name);
b37e2e8
       if (nrules != 0)
b37e2e8
 	{
b37e2e8
 	  elem = seek_collating_symbol_entry (name, name_len);
b37e2e8
-	  if (symb_table[2 * elem] != 0)
b37e2e8
+	  if (elem != -1)
b37e2e8
 	    {
b37e2e8
 	      /* We found the entry.  */
b37e2e8
 	      idx = symb_table[2 * elem + 1];
b37e2e8
 	      /* Skip the name of collating element name.  */
b37e2e8
 	      idx += 1 + extra[idx];
b37e2e8
 	    }
b37e2e8
-	  else if (symb_table[2 * elem] == 0 && name_len == 1)
b37e2e8
+	  else if (name_len == 1)
b37e2e8
 	    {
b37e2e8
 	      /* No valid character, treat it as a normal
b37e2e8
 		 character.  */
e1b411d
diff -Nrup a/resolv/Makefile b/resolv/Makefile
6ae22f0
--- a/resolv/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/resolv/Makefile	2012-06-07 12:15:21.822318657 -0600
f7dfce4
@@ -80,6 +80,7 @@ ifeq (yes,$(have-ssp))
b37e2e8
 CFLAGS-libresolv += -fstack-protector
b37e2e8
 endif
b37e2e8
 CFLAGS-res_hconf.c = -fexceptions
b37e2e8
+CFLAGS-res_send.c += -fno-strict-aliasing
b37e2e8
 
b37e2e8
 # The BIND code elicits some harmless warnings.
b37e2e8
 +cflags += -Wno-strict-prototypes -Wno-write-strings
e1b411d
diff -Nrup a/resource/getrlimit.c b/resource/getrlimit.c
6ae22f0
--- a/resource/getrlimit.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/resource/getrlimit.c	2012-06-07 12:15:21.823318653 -0600
f7dfce4
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource reso
b37e2e8
   __set_errno (ENOSYS);
b37e2e8
   return -1;
b37e2e8
 }
b37e2e8
+libc_hidden_def (__getrlimit)
b37e2e8
 weak_alias (__getrlimit, getrlimit)
b37e2e8
 
b37e2e8
 stub_warning (getrlimit)
e1b411d
diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
6ae22f0
--- a/stdio-common/vfprintf.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/stdio-common/vfprintf.c	2012-06-07 12:15:21.823318653 -0600
f7dfce4
@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format,
b37e2e8
 	else if (!is_long && spec != L_('S'))				      \
b37e2e8
 	  {								      \
b37e2e8
 	    if (prec != -1)						      \
b37e2e8
-	      {								      \
b37e2e8
-		/* Search for the end of the string, but don't search past    \
b37e2e8
-		   the length (in bytes) specified by the precision.  Also    \
b37e2e8
-		   don't use incomplete characters.  */			      \
b37e2e8
-		if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1)   \
b37e2e8
-		  len = __strnlen (string, prec);			      \
b37e2e8
-		else							      \
b37e2e8
-		  {							      \
b37e2e8
-		    /* In case we have a multibyte character set the	      \
b37e2e8
-		       situation is more complicated.  We must not copy	      \
b37e2e8
-		       bytes at the end which form an incomplete character. */\
b37e2e8
-		    size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
b37e2e8
-		    wchar_t ignore[ignore_size];			      \
b37e2e8
-		    const char *str2 = string;				      \
b37e2e8
-		    const char *strend = string + prec;			      \
b37e2e8
-		    if (strend < string)				      \
b37e2e8
-		      strend = (const char *) UINTPTR_MAX;		      \
b37e2e8
-									      \
b37e2e8
-		    mbstate_t ps;					      \
b37e2e8
-		    memset (&ps, '\0', sizeof (ps));			      \
b37e2e8
-									      \
b37e2e8
-		    while (str2 != NULL && str2 < strend)		      \
b37e2e8
-		      if (__mbsnrtowcs (ignore, &str2, strend - str2,	      \
b37e2e8
-					ignore_size, &ps) == (size_t) -1)     \
b37e2e8
-			{						      \
f7dfce4
-			  /* Conversion function has set errno.  */	      \
b37e2e8
-			  done = -1;					      \
b37e2e8
-			  goto all_done;				      \
b37e2e8
-			}						      \
b37e2e8
-									      \
b37e2e8
-		    if (str2 == NULL)					      \
b37e2e8
-		      len = strlen (string);				      \
b37e2e8
-		    else						      \
b37e2e8
-		      len = str2 - string - (ps.__count & 7);		      \
b37e2e8
-		  }							      \
b37e2e8
-	      }								      \
f7dfce4
+	      /* Search for th eend of the string, but don't search past      \
f7dfce4
+		 the length (in bytes) specified by the precision.  */        \
f7dfce4
+	      len = __strnlen (string, prec);                                 \
b37e2e8
 	    else							      \
b37e2e8
 	      len = strlen (string);					      \
b37e2e8
 	  }								      \
e1b411d
diff -Nrup a/streams/Makefile b/streams/Makefile
6ae22f0
--- a/streams/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/streams/Makefile	2012-06-07 12:15:21.824318649 -0600
f7dfce4
@@ -20,7 +20,7 @@
b37e2e8
 #
b37e2e8
 subdir	:= streams
b37e2e8
 
b37e2e8
-headers		= stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
b37e2e8
+#headers		= stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
b37e2e8
 routines	= isastream getmsg getpmsg putmsg putpmsg fattach fdetach
b37e2e8
 
b37e2e8
 include ../Rules
e1b411d
diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile
6ae22f0
--- a/sunrpc/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sunrpc/Makefile	2012-06-07 12:15:21.825318645 -0600
f7dfce4
@@ -52,7 +52,7 @@ headers-in-tirpc = $(addprefix rpc/,auth
b37e2e8
 				    des_crypt.h)
b37e2e8
 headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
b37e2e8
 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
b37e2e8
-headers = rpc/netdb.h
b37e2e8
+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
b37e2e8
 install-others = $(inst_sysconfdir)/rpc
b37e2e8
 generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
b37e2e8
 	    $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
f7dfce4
@@ -150,6 +150,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
f7dfce4
 CPPFLAGS += $(sunrpc-CPPFLAGS)
f7dfce4
 BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
b37e2e8
 
b37e2e8
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
b37e2e8
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
b37e2e8
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
b37e2e8
+
b37e2e8
 $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
b37e2e8
 $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
b37e2e8
 $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
e1b411d
diff -Nrup a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
6ae22f0
--- a/sysdeps/generic/dl-cache.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/generic/dl-cache.h	2012-06-07 12:15:21.825318645 -0600
f7dfce4
@@ -35,6 +35,14 @@
b37e2e8
 # define add_system_dir(dir) add_dir (dir)
b37e2e8
 #endif
b37e2e8
 
b37e2e8
+#ifndef arch_startup
b37e2e8
+# define arch_startup(argc, argv) do { } while (0)
b37e2e8
+#endif
e72031f
+
b37e2e8
+#ifndef add_arch_dirs
b37e2e8
+# define add_arch_dirs(config_file) do { } while (0)
b37e2e8
+#endif
e72031f
+
b37e2e8
 #define CACHEMAGIC "ld.so-1.7.0"
b37e2e8
 
b37e2e8
 /* libc5 and glibc 2.0/2.1 use the same format.  For glibc 2.2 another
e1b411d
diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
6ae22f0
--- a/sysdeps/i386/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/i386/Makefile	2012-06-07 12:15:21.826318641 -0600
b37e2e8
@@ -2,6 +2,8 @@
b37e2e8
 # Every i386 port in use uses gas syntax (I think).
b37e2e8
 asm-CPPFLAGS += -DGAS_SYNTAX
b37e2e8
 
b37e2e8
+sysdep-ASFLAGS += -U__i686
e72031f
+
b37e2e8
 # The i386 `long double' is a distinct type we support.
b37e2e8
 long-double-fcts = yes
b37e2e8
 
f7dfce4
@@ -62,6 +64,14 @@ endif
b37e2e8
 
b37e2e8
 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
b37e2e8
 defines += -DNO_TLS_DIRECT_SEG_REFS
b37e2e8
+else
b37e2e8
+# .a libraries are not performance critical and so we
b37e2e8
+# build them without direct TLS segment references
b37e2e8
+# always.
b37e2e8
+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
b37e2e8
+CFLAGS-.o += -mno-tls-direct-seg-refs
b37e2e8
+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
b37e2e8
+CFLAGS-.oS += -mno-tls-direct-seg-refs
b37e2e8
 endif
b37e2e8
 
b37e2e8
 ifeq ($(subdir),elf)
e1b411d
diff -Nrup a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
6ae22f0
--- a/sysdeps/i386/i686/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/i386/i686/Makefile	2012-06-07 12:15:21.826318641 -0600
b37e2e8
@@ -9,19 +9,3 @@ stack-align-test-flags += -msse
b37e2e8
 ifeq ($(subdir),string)
b37e2e8
 sysdep_routines += cacheinfo
b37e2e8
 endif
b37e2e8
-
b37e2e8
-ifeq (yes,$(config-asflags-i686))
b37e2e8
-CFLAGS-.o += -Wa,-mtune=i686
b37e2e8
-CFLAGS-.os += -Wa,-mtune=i686
b37e2e8
-CFLAGS-.op += -Wa,-mtune=i686
b37e2e8
-CFLAGS-.og += -Wa,-mtune=i686
b37e2e8
-CFLAGS-.ob += -Wa,-mtune=i686
b37e2e8
-CFLAGS-.oS += -Wa,-mtune=i686
b37e2e8
-
b37e2e8
-ASFLAGS-.o += -Wa,-mtune=i686
b37e2e8
-ASFLAGS-.os += -Wa,-mtune=i686
b37e2e8
-ASFLAGS-.op += -Wa,-mtune=i686
b37e2e8
-ASFLAGS-.og += -Wa,-mtune=i686
b37e2e8
-ASFLAGS-.ob += -Wa,-mtune=i686
b37e2e8
-ASFLAGS-.oS += -Wa,-mtune=i686
b37e2e8
-endif
e1b411d
diff -Nrup a/sysdeps/ia64/libgcc-compat.c b/sysdeps/ia64/libgcc-compat.c
e1b411d
--- a/sysdeps/ia64/libgcc-compat.c	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/sysdeps/ia64/libgcc-compat.c	2012-06-07 12:15:21.826318641 -0600
b37e2e8
@@ -0,0 +1,84 @@
b37e2e8
+/* pre-.hidden libgcc compatibility
b37e2e8
+   Copyright (C) 2002 Free Software Foundation, Inc.
b37e2e8
+   This file is part of the GNU C Library.
e72031f
+
b37e2e8
+   The GNU C Library is free software; you can redistribute it and/or
b37e2e8
+   modify it under the terms of the GNU Lesser General Public
b37e2e8
+   License as published by the Free Software Foundation; either
b37e2e8
+   version 2.1 of the License, or (at your option) any later version.
f79eb1f
+
b37e2e8
+   The GNU C Library is distributed in the hope that it will be useful,
b37e2e8
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
b37e2e8
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b37e2e8
+   Lesser General Public License for more details.
71ecd3c
+
b37e2e8
+   You should have received a copy of the GNU Lesser General Public
b37e2e8
+   License along with the GNU C Library; if not, write to the Free
b37e2e8
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b37e2e8
+   02111-1307 USA.  */
71ecd3c
+
71ecd3c
+
b37e2e8
+#include <stdint.h>
b37e2e8
+#include <shlib-compat.h>
71ecd3c
+
b37e2e8
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
71ecd3c
+
b37e2e8
+typedef int int128_t __attribute__((__mode__(TI)));
71ecd3c
+
b37e2e8
+extern long double __divtf3 (long double, long double) attribute_hidden;
b37e2e8
+long double INTUSE (__divtf3) (long double x, long double y)
b37e2e8
+{
b37e2e8
+  return __divtf3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern double __divdf3 (double, double) attribute_hidden;
b37e2e8
+double INTUSE (__divdf3) (double x, double y)
b37e2e8
+{
b37e2e8
+  return __divdf3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern float __divsf3 (float, float) attribute_hidden;
b37e2e8
+float INTUSE (__divsf3) (float x, float y)
b37e2e8
+{
b37e2e8
+  return __divsf3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
b37e2e8
+int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
b37e2e8
+{
b37e2e8
+  return __divdi3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
b37e2e8
+int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
b37e2e8
+{
b37e2e8
+  return __moddi3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
b37e2e8
+uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
b37e2e8
+{
b37e2e8
+  return __udivdi3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
b37e2e8
+uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
b37e2e8
+{
b37e2e8
+  return __umoddi3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
b37e2e8
+int128_t INTUSE (__multi3) (int128_t x, int128_t y)
b37e2e8
+{
b37e2e8
+  return __multi3 (x, y);
b37e2e8
+}
b37e2e8
+symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
71ecd3c
+
b37e2e8
+#endif
e1b411d
diff -Nrup a/sysdeps/mach/hurd/getrlimit.c b/sysdeps/mach/hurd/getrlimit.c
6ae22f0
--- a/sysdeps/mach/hurd/getrlimit.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/mach/hurd/getrlimit.c	2012-06-07 12:15:21.826318641 -0600
f7dfce4
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource reso
9b5c867
 
b37e2e8
   return 0;
b37e2e8
 }
b37e2e8
+libc_hidden_def (__getrlimit)
b37e2e8
 weak_alias (__getrlimit, getrlimit)
e1b411d
diff -Nrup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
6ae22f0
--- a/sysdeps/posix/getaddrinfo.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/posix/getaddrinfo.c	2012-06-07 12:15:21.827318637 -0600
b37e2e8
@@ -565,8 +565,8 @@ gaih_inet (const char *name, const struc
Andreas Schwab c883c14
 
b37e2e8
 	  /* If we do not have to look for IPv6 addresses, use
b37e2e8
 	     the simple, old functions, which do not support
b37e2e8
-	     IPv6 scope ids. */
b37e2e8
-	  if (req->ai_family == AF_INET)
b37e2e8
+	     IPv6 scope ids, nor retrieving the canonical name.  */
b37e2e8
+	  if (req->ai_family == AF_INET && (req->ai_flags & AI_CANONNAME) == 0)
b37e2e8
 	    {
b37e2e8
 	      size_t tmpbuflen = 512;
b37e2e8
 	      assert (tmpbuf == NULL);
b37e2e8
@@ -1105,68 +1105,10 @@ gaih_inet (const char *name, const struc
b37e2e8
 	/* Only the first entry gets the canonical name.  */
b37e2e8
 	if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0)
b37e2e8
 	  {
b37e2e8
-	    char *tmpbuf2 = NULL;
b37e2e8
-	    bool malloc_tmpbuf2 = false;
b37e2e8
-
b37e2e8
 	    if (canon == NULL)
b37e2e8
-	      {
b37e2e8
-		struct hostent *h = NULL;
b37e2e8
-		int herrno;
b37e2e8
-		struct hostent th;
b37e2e8
-		size_t tmpbuf2len = 512;
b37e2e8
-
b37e2e8
-		do
b37e2e8
-		  {
b37e2e8
-		    if (__libc_use_alloca (alloca_used + 2 * tmpbuf2len))
b37e2e8
-		      tmpbuf2 = extend_alloca_account (tmpbuf2, tmpbuf2len,
b37e2e8
-						       tmpbuf2len * 2,
b37e2e8
-						       alloca_used);
b37e2e8
-		    else
b37e2e8
-		      {
b37e2e8
-			char *newp = realloc (malloc_tmpbuf2 ? tmpbuf2 : NULL,
b37e2e8
-					      2 * tmpbuf2len);
b37e2e8
-			if (newp == NULL)
b37e2e8
-			  {
b37e2e8
-			    if (malloc_tmpbuf2)
b37e2e8
-			      free (tmpbuf2);
b37e2e8
-			    result = -EAI_MEMORY;
b37e2e8
-			    goto free_and_return;
b37e2e8
-			  }
b37e2e8
-
b37e2e8
-			tmpbuf2 = newp;
b37e2e8
-			tmpbuf2len = 2 * tmpbuf2len;
b37e2e8
-			malloc_tmpbuf2 = true;
b37e2e8
-		      }
b37e2e8
-
b37e2e8
-		    rc = __gethostbyaddr_r (at2->addr,
b37e2e8
-					    ((at2->family == AF_INET6)
b37e2e8
-					     ? sizeof (struct in6_addr)
b37e2e8
-					     : sizeof (struct in_addr)),
b37e2e8
-					    at2->family, &th, tmpbuf2,
b37e2e8
-					    tmpbuf2len, &h, &herrno);
b37e2e8
-		  }
b37e2e8
-		while (rc == ERANGE && herrno == NETDB_INTERNAL);
b37e2e8
-
b37e2e8
-		if (rc != 0 && herrno == NETDB_INTERNAL)
b37e2e8
-		  {
b37e2e8
-		    if (malloc_tmpbuf2)
b37e2e8
-		      free (tmpbuf2);
b37e2e8
-
b37e2e8
-		    __set_h_errno (herrno);
b37e2e8
-		    result = -EAI_SYSTEM;
b37e2e8
-		    goto free_and_return;
b37e2e8
-		  }
b37e2e8
-
b37e2e8
-		if (h != NULL)
b37e2e8
-		  canon = h->h_name;
b37e2e8
-		else
b37e2e8
-		  {
b37e2e8
-		    assert (orig_name != NULL);
b37e2e8
-		    /* If the canonical name cannot be determined, use
b37e2e8
-		       the passed in string.  */
b37e2e8
-		    canon = orig_name;
b37e2e8
-		  }
b37e2e8
-	      }
b37e2e8
+	      /* If the canonical name cannot be determined, use
b37e2e8
+		 the passed in string.  */
b37e2e8
+	      canon = orig_name;
Andreas Schwab c883c14
 
b37e2e8
 #ifdef HAVE_LIBIDN
b37e2e8
 	    if (req->ai_flags & AI_CANONIDN)
b37e2e8
@@ -1181,9 +1123,6 @@ gaih_inet (const char *name, const struc
b37e2e8
 		int rc = __idna_to_unicode_lzlz (canon, &out, idn_flags);
b37e2e8
 		if (rc != IDNA_SUCCESS)
b37e2e8
 		  {
b37e2e8
-		    if (malloc_tmpbuf2)
b37e2e8
-		      free (tmpbuf2);
b37e2e8
-
b37e2e8
 		    if (rc == IDNA_MALLOC_ERROR)
b37e2e8
 		      result = -EAI_MEMORY;
b37e2e8
 		    else if (rc == IDNA_DLOPEN_ERROR)
b37e2e8
@@ -1213,17 +1152,11 @@ gaih_inet (const char *name, const struc
b37e2e8
 		    canon = strdup (canon);
b37e2e8
 		    if (canon == NULL)
b37e2e8
 		      {
b37e2e8
-			if (malloc_tmpbuf2)
b37e2e8
-			  free (tmpbuf2);
b37e2e8
-
b37e2e8
 			result = -EAI_MEMORY;
b37e2e8
 			goto free_and_return;
b37e2e8
 		      }
b37e2e8
 		  }
b37e2e8
 	      }
b37e2e8
-
b37e2e8
-	    if (malloc_tmpbuf2)
b37e2e8
-	      free (tmpbuf2);
b37e2e8
 	  }
Andreas Schwab c883c14
 
b37e2e8
 	family = at2->family;
b37e2e8
@@ -1360,10 +1293,12 @@ static const struct scopeentry
b37e2e8
     /* Link-local addresses: scope 2.  */
b37e2e8
     { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
b37e2e8
     { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
b37e2e8
+#if 0
b37e2e8
     /* Site-local addresses: scope 5.  */
b37e2e8
     { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
b37e2e8
     { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
b37e2e8
     { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
b37e2e8
+#endif
b37e2e8
     /* Default: scope 14.  */
b37e2e8
     { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
b37e2e8
   };
e1b411d
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
6ae22f0
--- a/sysdeps/powerpc/powerpc64/Makefile	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/powerpc/powerpc64/Makefile	2012-06-07 12:15:21.828318633 -0600
f7dfce4
@@ -35,6 +35,9 @@ CFLAGS-rtld-memmove.os = $(no-special-re
b37e2e8
 CFLAGS-rtld-memchr.os = $(no-special-regs)
b37e2e8
 CFLAGS-rtld-strnlen.os = $(no-special-regs)
f7dfce4
 
f7dfce4
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
b37e2e8
+CFLAGS-gmon-start.c = -fno-strict-aliasing
f7dfce4
+
f7dfce4
 ifeq ($(subdir),csu)
f7dfce4
 sysdep_routines += hp-timing
f7dfce4
 elide-routines.os += hp-timing
e1b411d
diff -Nrup a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c
6ae22f0
--- a/sysdeps/s390/s390-64/utf16-utf32-z9.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c	2012-06-07 12:15:21.829318630 -0600
f7dfce4
@@ -168,10 +168,7 @@ gconv_end (struct __gconv_step *data)
b37e2e8
     register unsigned long long outlen asm("11") = outend - outptr;	\
b37e2e8
     uint64_t cc = 0;							\
b37e2e8
 									\
b37e2e8
-    asm volatile (".machine push       \n\t"				\
b37e2e8
-                  ".machine \"z9-109\" \n\t"				\
b37e2e8
-		  "0: " INSTRUCTION "  \n\t"				\
b37e2e8
-                  ".machine pop        \n\t"				\
b37e2e8
+    asm volatile ("0: " INSTRUCTION "  \n\t"				\
b37e2e8
                   "   jo     0b        \n\t"				\
b37e2e8
 		  "   ipm    %2        \n"			        \
b37e2e8
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\
e1b411d
diff -Nrup a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c
6ae22f0
--- a/sysdeps/s390/s390-64/utf8-utf16-z9.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c	2012-06-07 12:15:21.829318630 -0600
f7dfce4
@@ -150,10 +150,7 @@ gconv_end (struct __gconv_step *data)
b37e2e8
     register unsigned long long outlen asm("11") = outend - outptr;	\
b37e2e8
     uint64_t cc = 0;							\
b37e2e8
 									\
b37e2e8
-    asm volatile (".machine push       \n\t"				\
b37e2e8
-                  ".machine \"z9-109\" \n\t"				\
b37e2e8
-		  "0: " INSTRUCTION "  \n\t"				\
b37e2e8
-                  ".machine pop        \n\t"				\
b37e2e8
+    asm volatile ("0: " INSTRUCTION "  \n\t"				\
b37e2e8
                   "   jo     0b        \n\t"				\
b37e2e8
 		  "   ipm    %2        \n"			        \
b37e2e8
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\
e1b411d
diff -Nrup a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c
6ae22f0
--- a/sysdeps/s390/s390-64/utf8-utf32-z9.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c	2012-06-07 12:15:21.829318630 -0600
f7dfce4
@@ -154,10 +154,7 @@ gconv_end (struct __gconv_step *data)
b37e2e8
     register unsigned long long outlen asm("11") = outend - outptr;	\
b37e2e8
     uint64_t cc = 0;							\
b37e2e8
 									\
b37e2e8
-    asm volatile (".machine push       \n\t"				\
b37e2e8
-                  ".machine \"z9-109\" \n\t"				\
b37e2e8
-		  "0: " INSTRUCTION "  \n\t"				\
b37e2e8
-                  ".machine pop        \n\t"				\
b37e2e8
+    asm volatile ("0: " INSTRUCTION "  \n\t"				\
b37e2e8
                   "   jo     0b        \n\t"				\
b37e2e8
 		  "   ipm    %2        \n"				\
b37e2e8
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\
e1b411d
diff -Nrup a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c
6ae22f0
--- a/sysdeps/unix/nice.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/nice.c	2012-06-07 12:15:21.829318630 -0600
f7dfce4
@@ -41,7 +41,12 @@ nice (int incr)
b37e2e8
 	__set_errno (save);
b37e2e8
     }
b37e2e8
 
b37e2e8
-  result = setpriority (PRIO_PROCESS, 0, prio + incr);
b37e2e8
+  prio += incr;
b37e2e8
+  if (prio < PRIO_MIN)
b37e2e8
+    prio = PRIO_MIN;
b37e2e8
+  else if (prio >= PRIO_MAX)
b37e2e8
+    prio = PRIO_MAX - 1;
b37e2e8
+  result = setpriority (PRIO_PROCESS, 0, prio);
b37e2e8
   if (result == -1)
b37e2e8
     {
b37e2e8
       if (errno == EACCES)
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
6ae22f0
--- a/sysdeps/unix/sysv/linux/check_pf.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/check_pf.c	2012-06-07 12:15:21.830318627 -0600
f7dfce4
@@ -26,16 +26,14 @@
b37e2e8
 #include <unistd.h>
b37e2e8
 #include <sys/socket.h>
b37e2e8
 
b37e2e8
-#include <asm/types.h>
b37e2e8
-#include <linux/netlink.h>
b37e2e8
-#include <linux/rtnetlink.h>
b37e2e8
-
b37e2e8
 #include <not-cancel.h>
b37e2e8
 #include <kernel-features.h>
b37e2e8
 #include <bits/libc-lock.h>
b37e2e8
 #include <atomic.h>
b37e2e8
 #include <nscd/nscd-client.h>
b37e2e8
 
b37e2e8
+#include "netlinkaccess.h"
71ecd3c
+
b37e2e8
 
b37e2e8
 #ifndef IFA_F_HOMEADDRESS
b37e2e8
 # define IFA_F_HOMEADDRESS 0
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c
6ae22f0
--- a/sysdeps/unix/sysv/linux/futimesat.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/futimesat.c	2012-06-07 12:15:21.830318627 -0600
f7dfce4
@@ -36,14 +36,14 @@ futimesat (fd, file, tvp)
b37e2e8
 {
b37e2e8
   int result;
b37e2e8
 
b37e2e8
+  if (file == NULL)
b37e2e8
+    return __futimes (fd, tvp);
b37e2e8
+
b37e2e8
 #ifdef __NR_futimesat
b37e2e8
 # ifndef __ASSUME_ATFCTS
b37e2e8
   if (__have_atfcts >= 0)
b37e2e8
 # endif
b37e2e8
     {
b37e2e8
-      if (file == NULL)
b37e2e8
-	return __futimes (fd, tvp);
b37e2e8
-
b37e2e8
       result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
b37e2e8
 # ifndef __ASSUME_ATFCTS
b37e2e8
       if (result == -1 && errno == ENOSYS)
f7dfce4
@@ -57,22 +57,7 @@ futimesat (fd, file, tvp)
b37e2e8
 #ifndef __ASSUME_ATFCTS
b37e2e8
   char *buf = NULL;
b37e2e8
 
b37e2e8
-  if (file == NULL)
b37e2e8
-    {
b37e2e8
-      static const char procfd[] = "/proc/self/fd/%d";
b37e2e8
-      /* Buffer for the path name we are going to use.  It consists of
b37e2e8
-	 - the string /proc/self/fd/
b37e2e8
-	 - the file descriptor number.
b37e2e8
-	 The final NUL is included in the sizeof.   A bit of overhead
b37e2e8
-	 due to the format elements compensates for possible negative
b37e2e8
-	 numbers.  */
b37e2e8
-      size_t buflen = sizeof (procfd) + sizeof (int) * 3;
b37e2e8
-      buf = alloca (buflen);
b37e2e8
-
b37e2e8
-      __snprintf (buf, buflen, procfd, fd);
b37e2e8
-      file = buf;
b37e2e8
-    }
b37e2e8
-  else if (fd != AT_FDCWD && file[0] != '/')
b37e2e8
+  if (fd != AT_FDCWD && file[0] != '/')
b37e2e8
     {
b37e2e8
       size_t filelen = strlen (file);
b37e2e8
       if (__builtin_expect (filelen == 0, 0))
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/i386/dl-cache.h b/sysdeps/unix/sysv/linux/i386/dl-cache.h
e1b411d
--- a/sysdeps/unix/sysv/linux/i386/dl-cache.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h	2012-06-07 12:15:21.830318627 -0600
b37e2e8
@@ -0,0 +1,59 @@
b37e2e8
+/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
b37e2e8
+   Copyright (C) 2004 Free Software Foundation, Inc.
b37e2e8
+   This file is part of the GNU C Library.
b37e2e8
+
b37e2e8
+   The GNU C Library is free software; you can redistribute it and/or
b37e2e8
+   modify it under the terms of the GNU Lesser General Public
b37e2e8
+   License as published by the Free Software Foundation; either
b37e2e8
+   version 2.1 of the License, or (at your option) any later version.
b37e2e8
+
b37e2e8
+   The GNU C Library is distributed in the hope that it will be useful,
b37e2e8
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
b37e2e8
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b37e2e8
+   Lesser General Public License for more details.
b37e2e8
+
b37e2e8
+   You should have received a copy of the GNU Lesser General Public
b37e2e8
+   License along with the GNU C Library; if not, write to the Free
b37e2e8
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b37e2e8
+   02111-1307 USA.  */
b37e2e8
+
b37e2e8
+static inline int
b37e2e8
+is_ia64 (void)
e72031f
+{
b37e2e8
+  unsigned int fl1, fl2;
b37e2e8
+
b37e2e8
+  /* See if we can use cpuid.  */
b37e2e8
+  __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
b37e2e8
+           "pushl %0; popfl; pushfl; popl %0; popfl"
b37e2e8
+           : "=&r" (fl1), "=&r" (fl2)
b37e2e8
+           : "i" (0x00200000));
b37e2e8
+  if (((fl1 ^ fl2) & 0x00200000) == 0)
b37e2e8
+    return 0;
b37e2e8
+
b37e2e8
+  /* Host supports cpuid.  See if cpuid gives capabilities, try
b37e2e8
+     CPUID(0).  Preserve %ebx and %ecx; cpuid insn clobbers these, we
b37e2e8
+     don't need their CPUID values here, and %ebx may be the PIC
b37e2e8
+     register.  */
b37e2e8
+  __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
b37e2e8
+           : "=a" (fl1) : "0" (0) : "edx", "cc");
b37e2e8
+  if (fl1 == 0)
b37e2e8
+    return 0;
b37e2e8
+
b37e2e8
+  /* Invoke CPUID(1), return %edx; caller can examine bits to
b37e2e8
+     determine what's supported.  */
b37e2e8
+  __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
b37e2e8
+           : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
b37e2e8
+  return (fl2 & (1 << 30)) != 0;
e72031f
+}
71ecd3c
+
b37e2e8
+#define arch_startup(argc, argv) \
b37e2e8
+  do {									\
b37e2e8
+    /* On IA-64, try to execute 64-bit ldconfig if possible.		\
b37e2e8
+       This is because the badly designed /emul/ia32-linux hack		\
b37e2e8
+       will cause 32-bit ldconfig to do all sorts of weird things.  */	\
b37e2e8
+    if (is_ia64 ())							\
b37e2e8
+      execv ("/emul/ia32-linux/../../sbin/ldconfig",			\
b37e2e8
+	     (char *const *) argv);					\
b37e2e8
+  } while (0)
b37e2e8
+
b37e2e8
+#include_next <dl-cache.h>
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c
6ae22f0
--- a/sysdeps/unix/sysv/linux/i386/getrlimit.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c	2012-06-07 12:15:21.830318627 -0600
e1b411d
@@ -35,4 +35,5 @@ __new_getrlimit (enum __rlimit_resource
b37e2e8
 }
Andreas Schwab c883c14
 
b37e2e8
 weak_alias (__new_getrlimit, __getrlimit);
b37e2e8
+libc_hidden_weak (__getrlimit)
b37e2e8
 versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
e1b411d
--- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c	2012-06-07 12:15:21.831318623 -0600
b37e2e8
@@ -0,0 +1,5 @@
b37e2e8
+#ifdef IS_IN_ldconfig
b37e2e8
+#include <sysdeps/i386/dl-procinfo.c>
b37e2e8
+#else
b37e2e8
+#include <sysdeps/generic/dl-procinfo.c>
b37e2e8
+#endif
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
e1b411d
--- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h	1969-12-31 17:00:00.000000000 -0700
6ae22f0
+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h	2012-06-07 12:15:21.831318623 -0600
b37e2e8
@@ -0,0 +1,5 @@
b37e2e8
+#ifdef IS_IN_ldconfig
b37e2e8
+#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
b37e2e8
+#else
b37e2e8
+#include <sysdeps/generic/dl-procinfo.h>
b37e2e8
+#endif
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h
6ae22f0
--- a/sysdeps/unix/sysv/linux/netlinkaccess.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/netlinkaccess.h	2012-06-07 12:15:21.831318623 -0600
f7dfce4
@@ -24,6 +24,24 @@
b37e2e8
 
b37e2e8
 #include <kernel-features.h>
b37e2e8
 
b37e2e8
+#ifndef IFA_MAX
b37e2e8
+/* 2.6.19 kernel headers helpfully removed some macros and
b37e2e8
+   moved lots of stuff into new headers, some of which aren't
b37e2e8
+   included by linux/rtnetlink.h.  */
b37e2e8
+#include <linux/if_addr.h>
b37e2e8
+#endif
b37e2e8
+
b37e2e8
+#ifndef IFA_RTA
b37e2e8
+# define IFA_RTA(r) \
b37e2e8
+  ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
b37e2e8
+# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
b37e2e8
+#endif
b37e2e8
+
b37e2e8
+#ifndef IFLA_RTA
b37e2e8
+# define IFLA_RTA(r) \
b37e2e8
+  ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
b37e2e8
+# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
b37e2e8
+#endif
b37e2e8
 
b37e2e8
 struct netlink_res
b37e2e8
 {
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h
6ae22f0
--- a/sysdeps/unix/sysv/linux/paths.h	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/paths.h	2012-06-07 12:15:21.831318623 -0600
b37e2e8
@@ -62,7 +62,7 @@
b37e2e8
 #define	_PATH_TTY	"/dev/tty"
b37e2e8
 #define	_PATH_UNIX	"/boot/vmlinux"
b37e2e8
 #define _PATH_UTMP	"/var/run/utmp"
b37e2e8
-#define	_PATH_VI	"/usr/bin/vi"
b37e2e8
+#define	_PATH_VI	"/bin/vi"
b37e2e8
 #define _PATH_WTMP	"/var/log/wtmp"
b37e2e8
 
b37e2e8
 /* Provide trailing slash, since mostly used for building pathnames. */
e1b411d
diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
6ae22f0
--- a/sysdeps/unix/sysv/linux/tcsetattr.c	2012-06-05 07:42:49.000000000 -0600
6ae22f0
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c	2012-06-07 12:15:21.831318623 -0600
f7dfce4
@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios
b37e2e8
 {
b37e2e8
   struct __kernel_termios k_termios;
b37e2e8
   unsigned long int cmd;
b37e2e8
+  int retval;
b37e2e8
 
b37e2e8
   switch (optional_actions)
b37e2e8
     {
f7dfce4
@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios
b37e2e8
   memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
b37e2e8
 	  __KERNEL_NCCS * sizeof (cc_t));
b37e2e8
 
b37e2e8
-  return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
b37e2e8
+  retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
b37e2e8
+
b37e2e8
+  if (retval == 0 && cmd == TCSETS)
b37e2e8
+    {
b37e2e8
+      /* The Linux kernel has a bug which silently ignore the invalid
b37e2e8
+        c_cflag on pty. We have to check it here. */
b37e2e8
+      int save = errno;
b37e2e8
+      retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
b37e2e8
+      if (retval)
b37e2e8
+       {
b37e2e8
+         /* We cannot verify if the setting is ok. We don't return
b37e2e8
+            an error (?). */
b37e2e8
+         __set_errno (save);
b37e2e8
+         retval = 0;
b37e2e8
+       }
b37e2e8
+      else if ((termios_p->c_cflag & (PARENB | CREAD))
b37e2e8
+              != (k_termios.c_cflag & (PARENB | CREAD))
b37e2e8
+              || ((termios_p->c_cflag & CSIZE)
b37e2e8
+                  && ((termios_p->c_cflag & CSIZE)
b37e2e8
+                      != (k_termios.c_cflag & CSIZE))))
b37e2e8
+       {
b37e2e8
+         /* It looks like the Linux kernel silently changed the
b37e2e8
+            PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
b37e2e8
+            error. */
b37e2e8
+         __set_errno (EINVAL);
b37e2e8
+         retval = -1;
b37e2e8
+       }
b37e2e8
+    }
b37e2e8
+
b37e2e8
+  return retval;
b37e2e8
 }
b37e2e8
 libc_hidden_def (tcsetattr)