Blame SOURCES/glibc-fedora.patch

b40826
--- glibc-2.12-2-gc4ccff1/ChangeLog
b40826
+++ glibc-2.12-1/ChangeLog
b40826
@@ -241,6 +241,12 @@
b40826
 
b40826
 	* Makerules (libc-abis): Fix search for libc-abis in add-ons.
b40826
 
b40826
+2010-04-06  Ulrich Drepper  <drepper@redhat.com>
b40826
+
b40826
+	* sysdeps/posix/getaddrinfo.c (default_scopes): Assign global
b40826
+	scope to RFC 1918 addresses.
b40826
+	* posix/gai.conf: Document difference from RFC 3484.
b40826
+
b40826
 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
b40826
 
b40826
 	* sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/.
b40826
@@ -995,6 +1001,19 @@
b40826
 	* sysdeps/x86_64/fpu/fegetenv.c: Likewise
b40826
 	* sysdeps/s390/fpu/fegetenv.c: Likewise.  Remove unused headers.
b40826
 
b40826
+2009-10-27  Aurelien Jarno  <aurelien@aurel32.net>
b40826
+
b40826
+	[BZ #10855]
b40826
+	* locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
b40826
+	used later with MMAP_FIXED | MMAP_SHARED to cope with different
b40826
+	alignment restrictions.
b40826
+
b40826
+2010-02-08  Andreas Schwab  <schwab@redhat.com>
b40826
+
b40826
+	[BZ #11155]
b40826
+	* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c: Include i386
b40826
+	version.
b40826
+
b40826
 2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>
b40826
 
b40826
 	[BZ #11230]
b40826
@@ -2938,6 +2957,11 @@ d2009-10-30  Ulrich Drepper  
b40826
 	* sysdeps/generic/ldsodefs.h (struct rtld_global): The map element in
b40826
 	the unique symbol hash table should not be const.
b40826
 
b40826
+2009-07-22  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS).
b40826
+	* sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686.
b40826
+
b40826
 2009-07-21  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	* sysdeps/x86_64/multiarch/strstr.c: Minor cleanups.  Remove
b40826
@@ -3203,6 +3227,11 @@ d2009-10-30  Ulrich Drepper  
b40826
 	out common code into new function get_common_indeces. Determine
b40826
 	extended family and model for Intel processors.
b40826
 
b40826
+2009-06-26  Andreas Schwab  <aschwab@redhat.com>
b40826
+
b40826
+	* timezone/zic.c (stringzone): Don't try to generate a POSIX TZ
b40826
+	string when the timezone ends in DST.
b40826
+
b40826
 2009-06-26  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	* resolv/resolv.h: Define RES_SNGLKUPREOP.
b40826
@@ -11896,6 +11925,10 @@ d2009-10-30  Ulrich Drepper  
b40826
 	[BZ #4368]
b40826
 	* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
b40826
 
b40826
+2007-04-16  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* locale/programs/locarchive.c (add_alias, insert_name): Remove static.
b40826
+
b40826
 2007-04-16  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	[BZ #4364]
b40826
@@ -13153,6 +13186,15 @@ d2009-10-30  Ulrich Drepper  
b40826
 	separators also if no non-zero digits found.
b40826
 	* stdlib/Makefile (tests): Add tst-strtod3.
b40826
 
b40826
+2006-12-10  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h
b40826
+	if IFA_MAX is not defined.
b40826
+	(IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not
b40826
+	defined.
b40826
+	* sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h
b40826
+	instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h.
b40826
+
b40826
 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	[BZ #3632]
b40826
--- glibc-2.12-2-gc4ccff1/ChangeLog.15
b40826
+++ glibc-2.12-1/ChangeLog.15
b40826
@@ -477,6 +477,14 @@
b40826
 
b40826
 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
b40826
 
b40826
+	* posix/Makefile (generated: Add getconf.speclist.
b40826
+	($(inst_libexecdir)/getconf): Use getconf.speclist instead of
b40826
+	getconf output.
b40826
+	($(objpfx)getconf.speclist): New rule.
b40826
+	* posix/getconf.speclist.h: New file.
b40826
+
b40826
+2004-11-26  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
 	* sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR.
b40826
 
b40826
 2004-11-26  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
b40826
@@ -1103,6 +1111,13 @@
b40826
 	* sysdeps/generic/tempname.c (__path_search): Add missing argument
b40826
 	TRY_TMPDIR.
b40826
 
b40826
+2004-11-02  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* include/features.h (__USE_FORTIFY_LEVEL): Also set for Red Hat
b40826
+	GCC 3.4.x-RH >= 3.4.2-8.
b40826
+	* debug/tst-chk1.c (do_test): Deal with GCC 3.4.x-RH not
b40826
+	being able to recognize subobjects.
b40826
+
b40826
 2004-10-31  Mariusz Mazur <mmazur@kernel.pl>
b40826
 
b40826
 	* sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
b40826
@@ -1443,6 +1458,11 @@
b40826
 	* sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ...
b40826
 	(__readonly_area): ... this.
b40826
 
b40826
+2004-10-19  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* include/features.h (__USE_FORTIFY_LEVEL): Enable even with
b40826
+	Red Hat gcc4 4.0.0 and above.
b40826
+
b40826
 2004-10-18  Jakub Jelinek  <jakub@redhat.com>
b40826
 
b40826
 	* sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking
b40826
@@ -3182,6 +3202,23 @@
b40826
 	before return type.
b40826
 	* locale/localename.c (__current_locale_name): Likewise.
b40826
 
b40826
+2004-08-31  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* elf/ldconfig.c (parse_conf): Add prefix argument, prepend it
b40826
+	before arguments to add_dir and pass to parse_conf_include.
b40826
+	(parse_conf_include): Add prefix argument, pass it down to
b40826
+	parse_conf.
b40826
+	(main): Call arch_startup.  Adjust parse_conf caller.
b40826
+	Call add_arch_dirs.
b40826
+	* sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define.
b40826
+	* sysdeps/unix/sysv/linux/i386/dl-cache.h: New file.
b40826
+	* sysdeps/unix/sysv/linux/ia64/dl-cache.h (EMUL_HACK, arch_startup,
b40826
+	add_arch_dirs): Define.
b40826
+	* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Prepend
b40826
+	/emul/ia32-linux before the 32-bit ld.so pathname.
b40826
+	* sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
b40826
+	* sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
b40826
+
b40826
 2004-08-30  Roland McGrath  <roland@frob.com>
b40826
 
b40826
 	* scripts/extract-abilist.awk: If `lastversion' variable defined, omit
b40826
--- glibc-2.12-2-gc4ccff1/ChangeLog.16
b40826
+++ glibc-2.12-1/ChangeLog.16
b40826
@@ -2042,6 +2042,9 @@
b40826
 	(__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT
b40826
 	followed by __THROW.
b40826
 
b40826
+	* sysdeps/unix/sysv/linux/futimesat.c (futimesat): If
b40826
+	file == NULL, use __futimes unconditionally.
b40826
+
b40826
 2006-02-02  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	* sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat]
b40826
@@ -2101,6 +2104,11 @@
b40826
 	* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo.
b40826
 	* sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps.
b40826
 
b40826
+2006-01-30  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* include/bits/stdlib-ldbl.h: New file.
b40826
+	* include/bits/wchar-ldbl.h: New file.
b40826
+
b40826
 2006-01-19  Thomas Schwinge  <tschwinge@gnu.org>
b40826
 
b40826
 	* libio/genops.c: Include <stdbool.h>.
b40826
@@ -8922,6 +8930,12 @@
b40826
 	* argp/argp-help.c (__argp_error): __asprintf -> vasprintf.
b40826
 	(__argp_failure): Likewise.
b40826
 
b40826
+2005-08-08  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
b40826
+	Shift marked &errno down on big-endian instead of up.
b40826
+	* elf/tst-stackguard1.c (do_test): Fix a typo.
b40826
+
b40826
 2005-08-08  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	* nscd/cache.c (cache_add): Commit hash table and header to disk.
b40826
@@ -9046,6 +9060,17 @@
b40826
 	__syslog_chk.
b40826
 	* misc/Versions: Export __syslog_chk and __vsyslog_chk.
b40826
 
b40826
+2005-07-29  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* sysdeps/unix/sysv/linux/dl-osinfo.h: Include errno.h, hp-timing.h,
b40826
+	endian.h.
b40826
+	(_dl_setup_stack_chk_guard): Even without
b40826
+	--enable-stackguard-randomization attempt to do some guard
b40826
+	randomization using hp-timing (if available) and kernel stack and
b40826
+	mmap randomization.
b40826
+	* elf/tst-stackguard1.c (do_test): Don't fail if the poor man's
b40826
+	randomization doesn't work well enough.
b40826
+
b40826
 2005-07-28  Thomas Schwinge  <schwinge@nic-nac-project.de>
b40826
 
b40826
 	[BZ #1137]
b40826
--- glibc-2.12-2-gc4ccff1/Makeconfig
b40826
+++ glibc-2.12-1/Makeconfig
b40826
@@ -789,12 +789,12 @@ endif
b40826
 # The assembler can generate debug information too.
b40826
 ifndef ASFLAGS
b40826
 ifeq ($(have-cpp-asm-debuginfo),yes)
b40826
-ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
b40826
+ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
b40826
 else
b40826
-ASFLAGS :=
b40826
+ASFLAGS =
b40826
 endif
b40826
 endif
b40826
-ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
b40826
+ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS)
b40826
 
b40826
 ifndef BUILD_CC
b40826
 BUILD_CC = $(CC)
b40826
--- glibc-2.12-2-gc4ccff1/csu/Makefile
b40826
+++ glibc-2.12-1/csu/Makefile
b40826
@@ -93,7 +93,8 @@ omit-deps += $(crtstuff)
b40826
 $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
b40826
 	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
b40826
 
b40826
-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
b40826
+CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
b40826
+		    -fno-asynchronous-unwind-tables
b40826
 
b40826
 vpath initfini.c $(sysdirs)
b40826
 
b40826
--- glibc-2.12-2-gc4ccff1/csu/elf-init.c
b40826
+++ glibc-2.12-1/csu/elf-init.c
b40826
@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int,
b40826
 extern void (*__fini_array_start []) (void) attribute_hidden;
b40826
 extern void (*__fini_array_end []) (void) attribute_hidden;
b40826
 
b40826
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
b40826
+    && (defined SHARED || defined LIBC_NONSHARED)
b40826
+# define hidden_undef_2(x) #x
b40826
+# define hidden_undef_1(x) hidden_undef_2 (x)
b40826
+# define hidden_undef(x) \
b40826
+  __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
b40826
+  __asm (".hidden " #x);
b40826
+#else
b40826
+# define hidden_undef(x)
b40826
+#endif
b40826
+
b40826
+hidden_undef (__preinit_array_start)
b40826
+hidden_undef (__preinit_array_end)
b40826
+hidden_undef (__init_array_start)
b40826
+hidden_undef (__init_array_end)
b40826
+hidden_undef (__fini_array_start)
b40826
+hidden_undef (__fini_array_end)
b40826
 
b40826
 /* These function symbols are provided for the .init/.fini section entry
b40826
    points automagically by the linker.  */
b40826
--- glibc-2.12-2-gc4ccff1/debug/tst-chk1.c
b40826
+++ glibc-2.12-1/debug/tst-chk1.c
b40826
@@ -17,6 +17,9 @@
b40826
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b40826
    02111-1307 USA.  */
b40826
 
b40826
+/* Hack: make sure GCC doesn't know __chk_fail () will not return.  */
b40826
+#define __noreturn__
b40826
+
b40826
 #include <assert.h>
b40826
 #include <fcntl.h>
b40826
 #include <locale.h>
b40826
@@ -242,7 +245,7 @@ do_test (void)
b40826
   if (memcmp (a.buf1, "aabcdabcjj", 10))
b40826
     FAIL ();
b40826
 
b40826
-#if __USE_FORTIFY_LEVEL < 2
b40826
+#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0)
b40826
   /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2
b40826
      and sufficient GCC support, as the string operations overflow
b40826
      from a.buf1 into a.buf2.  */
b40826
@@ -357,7 +360,7 @@ do_test (void)
b40826
   memset (a.buf1 + 9, 'j', l0 + 2);
b40826
   CHK_FAIL_END
b40826
 
b40826
-# if __USE_FORTIFY_LEVEL >= 2
b40826
+# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0)
b40826
 #  define O 0
b40826
 # else
b40826
 #  define O 1
b40826
--- glibc-2.12-2-gc4ccff1/elf/ldconfig.c
b40826
+++ glibc-2.12-1/elf/ldconfig.c
b40826
@@ -1031,17 +1031,19 @@ search_dirs (void)
b40826
 
b40826
 
b40826
 static void parse_conf_include (const char *config_file, unsigned int lineno,
b40826
-				bool do_chroot, const char *pattern);
b40826
+				const char *prefix, bool do_chroot,
b40826
+				const char *pattern);
b40826
 
b40826
 /* Parse configuration file.  */
b40826
 static void
b40826
-parse_conf (const char *filename, bool do_chroot)
b40826
+parse_conf (const char *filename, const char *prefix, bool do_chroot)
b40826
 {
b40826
   FILE *file = NULL;
b40826
   char *line = NULL;
b40826
   const char *canon;
b40826
   size_t len = 0;
b40826
   unsigned int lineno;
b40826
+  size_t prefix_len = prefix ? strlen (prefix) : 0;
b40826
 
b40826
   if (do_chroot && opt_chroot)
b40826
     {
b40826
@@ -1102,7 +1104,14 @@ parse_conf (const char *filename, bool d
b40826
 	  cp += 8;
b40826
 	  while ((dir = strsep (&cp, " \t")) != NULL)
b40826
 	    if (dir[0] != '\0')
b40826
-	      parse_conf_include (filename, lineno, do_chroot, dir);
b40826
+	      parse_conf_include (filename, lineno, prefix, do_chroot, dir);
b40826
+	}
b40826
+      else if (prefix != NULL)
b40826
+	{
b40826
+	  size_t cp_len = strlen (cp);
b40826
+	  char new_cp [prefix_len + cp_len + 1];
b40826
+	  memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1);
b40826
+	  add_dir (new_cp);
b40826
 	}
b40826
       else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5]))
b40826
 	{
b40826
@@ -1165,7 +1174,7 @@ parse_conf (const char *filename, bool d
b40826
    config files to read.  */
b40826
 static void
b40826
 parse_conf_include (const char *config_file, unsigned int lineno,
b40826
-		    bool do_chroot, const char *pattern)
b40826
+		    const char *prefix, bool do_chroot, const char *pattern)
b40826
 {
b40826
   if (opt_chroot && pattern[0] != '/')
b40826
     error (EXIT_FAILURE, 0,
b40826
@@ -1197,7 +1206,7 @@ parse_conf_include (const char *config_f
b40826
     {
b40826
     case 0:
b40826
       for (size_t i = 0; i < gl.gl_pathc; ++i)
b40826
-	parse_conf (gl.gl_pathv[i], false);
b40826
+	parse_conf (gl.gl_pathv[i], prefix, false);
b40826
       globfree64 (&gl);
b40826
       break;
b40826
 
b40826
@@ -1240,6 +1249,8 @@ main (int argc, char **argv)
b40826
   /* Set the text message domain.  */
b40826
   textdomain (_libc_intl_domainname);
b40826
 
b40826
+  arch_startup (argc, argv);
b40826
+
b40826
   /* Parse and process arguments.  */
b40826
   int remaining;
b40826
   argp_parse (&argp, argc, argv, 0, &remaining, NULL);
b40826
@@ -1349,12 +1360,14 @@ main (int argc, char **argv)
b40826
 
b40826
   if (!opt_only_cline)
b40826
     {
b40826
-      parse_conf (config_file, true);
b40826
+      parse_conf (config_file, NULL, true);
b40826
 
b40826
       /* Always add the standard search paths.  */
b40826
       add_system_dir (SLIBDIR);
b40826
       if (strcmp (SLIBDIR, LIBDIR))
b40826
 	add_system_dir (LIBDIR);
b40826
+
b40826
+      add_arch_dirs (config_file);
b40826
     }
b40826
 
b40826
   char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
b40826
--- glibc-2.12-2-gc4ccff1/elf/tst-stackguard1.c
b40826
+++ glibc-2.12-1/elf/tst-stackguard1.c
b40826
@@ -160,17 +160,21 @@ do_test (void)
b40826
      the 16 runs, something is very wrong.  */
b40826
   int ndifferences = 0;
b40826
   int ndefaults = 0;
b40826
+  int npartlyrandomized = 0;
b40826
   for (i = 0; i < N; ++i) 
b40826
     {
b40826
       if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
b40826
 	ndifferences++;
b40826
       else if (child_stack_chk_guards[i] == default_guard)
b40826
 	ndefaults++;
b40826
+      else if (*(char *) &child_stack_chk_guards[i] == 0)
b40826
+	npartlyrandomized++;
b40826
     }
b40826
 
b40826
-  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
b40826
+  printf ("differences %d defaults %d partly randomized %d\n",
b40826
+	  ndifferences, ndefaults, npartlyrandomized);
b40826
 
b40826
-  if (ndifferences < N / 2 && ndefaults < N / 2)
b40826
+  if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
b40826
     {
b40826
       puts ("stack guard canaries are not randomized enough");
b40826
       puts ("nor equal to the default canary value");
b40826
--- glibc-2.12-2-gc4ccff1/include/bits/stdlib-ldbl.h
b40826
+++ glibc-2.12-1/include/bits/stdlib-ldbl.h
b40826
@@ -0,0 +1 @@
b40826
+#include <stdlib/bits/stdlib-ldbl.h>
b40826
--- glibc-2.12-2-gc4ccff1/include/bits/wchar-ldbl.h
b40826
+++ glibc-2.12-1/include/bits/wchar-ldbl.h
b40826
@@ -0,0 +1 @@
b40826
+#include <wcsmbs/bits/wchar-ldbl.h>
b40826
--- glibc-2.12-2-gc4ccff1/include/features.h
b40826
+++ glibc-2.12-1/include/features.h
b40826
@@ -308,8 +308,13 @@
b40826
 #endif
b40826
 
b40826
 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
b40826
-    && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
b40826
-# if _FORTIFY_SOURCE > 1
b40826
+    && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
b40826
+# if !__GNUC_PREREQ (4, 1)
b40826
+#  ifdef __GNUC_RH_RELEASE__
b40826
+#   warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
b40826
+#  endif
b40826
+#  define __USE_FORTIFY_LEVEL 0
b40826
+# elif _FORTIFY_SOURCE > 1
b40826
 #  define __USE_FORTIFY_LEVEL 2
b40826
 # else
b40826
 #  define __USE_FORTIFY_LEVEL 1
b40826
--- glibc-2.12-2-gc4ccff1/intl/locale.alias
b40826
+++ glibc-2.12-1/intl/locale.alias
b40826
@@ -57,8 +57,6 @@ korean		ko_KR.eucKR
b40826
 korean.euc 	ko_KR.eucKR
b40826
 ko_KR		ko_KR.eucKR
b40826
 lithuanian      lt_LT.ISO-8859-13
b40826
-no_NO		nb_NO.ISO-8859-1
b40826
-no_NO.ISO-8859-1 nb_NO.ISO-8859-1
b40826
 norwegian       nb_NO.ISO-8859-1
b40826
 nynorsk		nn_NO.ISO-8859-1
b40826
 polish          pl_PL.ISO-8859-2
b40826
--- glibc-2.12-2-gc4ccff1/libio/stdio.h
b40826
+++ glibc-2.12-1/libio/stdio.h
b40826
@@ -165,10 +165,12 @@ typedef _G_fpos64_t fpos64_t;
b40826
 extern struct _IO_FILE *stdin;		/* Standard input stream.  */
b40826
 extern struct _IO_FILE *stdout;		/* Standard output stream.  */
b40826
 extern struct _IO_FILE *stderr;		/* Standard error output stream.  */
b40826
+#ifdef __STDC__
b40826
 /* C89/C99 say they're macros.  Make them happy.  */
b40826
 #define stdin stdin
b40826
 #define stdout stdout
b40826
 #define stderr stderr
b40826
+#endif
b40826
 
b40826
 __BEGIN_NAMESPACE_STD
b40826
 /* Remove file FILENAME.  */
b40826
--- glibc-2.12-2-gc4ccff1/locale/iso-4217.def
b40826
+++ glibc-2.12-1/locale/iso-4217.def
b40826
@@ -8,6 +8,7 @@
b40826
  *
b40826
  * !!! The list has to be sorted !!!
b40826
  */
b40826
+DEFINE_INT_CURR("ADP")		/* Andorran Peseta -> EUR  */
b40826
 DEFINE_INT_CURR("AED")		/* United Arab Emirates Dirham  */
b40826
 DEFINE_INT_CURR("AFN")		/* Afghanistan Afgani  */
b40826
 DEFINE_INT_CURR("ALL")		/* Albanian Lek  */
b40826
@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD")		/* Armenia Dram 
b40826
 DEFINE_INT_CURR("ANG")		/* Netherlands Antilles  */
b40826
 DEFINE_INT_CURR("AOA")		/* Angolan Kwanza  */
b40826
 DEFINE_INT_CURR("ARS")		/* Argentine Peso  */
b40826
+DEFINE_INT_CURR("ATS")		/* Austrian Schilling -> EUR  */
b40826
 DEFINE_INT_CURR("AUD")		/* Australian Dollar  */
b40826
 DEFINE_INT_CURR("AWG")		/* Aruba Guilder  */
b40826
 DEFINE_INT_CURR("AZM")		/* Azerbaijan Manat  */
b40826
 DEFINE_INT_CURR("BAM")		/* Bosnian and Herzegovina Convertible Mark  */
b40826
 DEFINE_INT_CURR("BBD")		/* Barbados Dollar  */
b40826
 DEFINE_INT_CURR("BDT")		/* Bangladesh Taka  */
b40826
+DEFINE_INT_CURR("BEF")		/* Belgian Franc -> EUR  */
b40826
 DEFINE_INT_CURR("BGN")		/* Bulgarian Lev  */
b40826
 DEFINE_INT_CURR("BHD")		/* Bahraini Dinar  */
b40826
 DEFINE_INT_CURR("BIF")		/* Burundi Franc  */
b40826
@@ -44,6 +47,7 @@ DEFINE_INT_CURR("CUP")		/* Cuban Peso  *
b40826
 DEFINE_INT_CURR("CVE")		/* Cape Verde Escudo  */
b40826
 DEFINE_INT_CURR("CYP")		/* Cypriot Pound  */
b40826
 DEFINE_INT_CURR("CZK")		/* Czech Koruna  */
b40826
+DEFINE_INT_CURR("DEM")		/* German Mark -> EUR  */
b40826
 DEFINE_INT_CURR("DJF")		/* Djibouti Franc  */
b40826
 DEFINE_INT_CURR("DKK")		/* Danish Krone (Faroe Islands, Greenland)  */
b40826
 DEFINE_INT_CURR("DOP")		/* Dominican Republic  */
b40826
@@ -51,16 +55,20 @@ DEFINE_INT_CURR("DZD")		/* Algerian Dina
b40826
 DEFINE_INT_CURR("EEK")		/* Estonian Kroon  */
b40826
 DEFINE_INT_CURR("EGP")		/* Egyptian Pound  */
b40826
 DEFINE_INT_CURR("ERN")		/* Eritrean Nakfa  */
b40826
+DEFINE_INT_CURR("ESP")		/* Spanish Peseta -> EUR  */
b40826
 DEFINE_INT_CURR("ETB")		/* Ethiopian Birr  */
b40826
 DEFINE_INT_CURR("EUR")		/* European Union Euro  */
b40826
+DEFINE_INT_CURR("FIM")		/* Finnish Markka -> EUR  */
b40826
 DEFINE_INT_CURR("FJD")		/* Fiji Dollar  */
b40826
 DEFINE_INT_CURR("FKP")		/* Falkland Islands Pound (Malvinas)  */
b40826
+DEFINE_INT_CURR("FRF")		/* French Franc -> EUR  */
b40826
 DEFINE_INT_CURR("GBP")		/* British Pound  */
b40826
 DEFINE_INT_CURR("GEL")		/* Georgia Lari  */
b40826
 DEFINE_INT_CURR("GHC")		/* Ghana Cedi  */
b40826
 DEFINE_INT_CURR("GIP")		/* Gibraltar Pound  */
b40826
 DEFINE_INT_CURR("GMD")		/* Gambian Dalasi  */
b40826
 DEFINE_INT_CURR("GNF")		/* Guinea Franc  */
b40826
+DEFINE_INT_CURR("GRD")		/* Greek Drachma -> EUR  */
b40826
 DEFINE_INT_CURR("GTQ")		/* Guatemala Quetzal  */
b40826
 DEFINE_INT_CURR("GYD")		/* Guyana Dollar  */
b40826
 DEFINE_INT_CURR("HKD")		/* Hong Kong Dollar  */
b40826
@@ -69,12 +77,14 @@ DEFINE_INT_CURR("HRK")		/* Croatia Kuna 
b40826
 DEFINE_INT_CURR("HTG")		/* Haiti Gourde  */
b40826
 DEFINE_INT_CURR("HUF")		/* Hungarian Forint  */
b40826
 DEFINE_INT_CURR("IDR")		/* Indonesia Rupiah  */
b40826
+DEFINE_INT_CURR("IEP")		/* Irish Pound -> EUR  */
b40826
 DEFINE_INT_CURR("ILS")		/* Israeli Shekel  */
b40826
 DEFINE_INT_CURR("IMP")		/* Isle of Man Pounds  */
b40826
 DEFINE_INT_CURR("INR")		/* Indian Rupee (Bhutan)  */
b40826
 DEFINE_INT_CURR("IQD")		/* Iraqi Dinar  */
b40826
 DEFINE_INT_CURR("IRR")		/* Iranian Rial  */
b40826
 DEFINE_INT_CURR("ISK")		/* Iceland Krona  */
b40826
+DEFINE_INT_CURR("ITL")		/* Italian Lira -> EUR  */
b40826
 DEFINE_INT_CURR("JEP")		/* Jersey Pound  */
b40826
 DEFINE_INT_CURR("JMD")		/* Jamaican Dollar  */
b40826
 DEFINE_INT_CURR("JOD")		/* Jordanian Dinar  */
b40826
@@ -94,6 +104,7 @@ DEFINE_INT_CURR("LKR")		/* Sri Lankan Ru
b40826
 DEFINE_INT_CURR("LRD")		/* Liberian Dollar  */
b40826
 DEFINE_INT_CURR("LSL")		/* Lesotho Maloti  */
b40826
 DEFINE_INT_CURR("LTL")		/* Lithuanian Litas  */
b40826
+DEFINE_INT_CURR("LUF")		/* Luxembourg Franc -> EUR  */
b40826
 DEFINE_INT_CURR("LVL")		/* Latvia Lat  */
b40826
 DEFINE_INT_CURR("LYD")		/* Libyan Arab Jamahiriya Dinar  */
b40826
 DEFINE_INT_CURR("MAD")		/* Moroccan Dirham  */
b40826
@@ -114,6 +125,7 @@ DEFINE_INT_CURR("MZM")		/* Mozambique Me
b40826
 DEFINE_INT_CURR("NAD")		/* Namibia Dollar  */
b40826
 DEFINE_INT_CURR("NGN")		/* Nigeria Naira  */
b40826
 DEFINE_INT_CURR("NIO")		/* Nicaragua Cordoba Oro  */
b40826
+DEFINE_INT_CURR("NLG")		/* Netherlands Guilder -> EUR  */
b40826
 DEFINE_INT_CURR("NOK")		/* Norwegian Krone  */
b40826
 DEFINE_INT_CURR("NPR")		/* Nepalese Rupee  */
b40826
 DEFINE_INT_CURR("NZD")		/* New Zealand Dollar  */
b40826
@@ -124,6 +136,7 @@ DEFINE_INT_CURR("PGK")		/* Papau New Gui
b40826
 DEFINE_INT_CURR("PHP")		/* Philippines Peso  */
b40826
 DEFINE_INT_CURR("PKR")		/* Pakistan Rupee  */
b40826
 DEFINE_INT_CURR("PLN")		/* Polish Zloty  */
b40826
+DEFINE_INT_CURR("PTE")		/* Portugese Escudo -> EUR  */
b40826
 DEFINE_INT_CURR("PYG")		/* Paraguay Guarani  */
b40826
 DEFINE_INT_CURR("QAR")		/* Qatar Rial  */
b40826
 DEFINE_INT_CURR("ROL")		/* Romanian Leu  */
b40826
--- glibc-2.12-2-gc4ccff1/locale/programs/locarchive.c
b40826
+++ glibc-2.12-1/locale/programs/locarchive.c
b40826
@@ -134,7 +134,7 @@ create_archive (const char *archivefname
b40826
   size_t reserved = RESERVE_MMAP_SIZE;
b40826
   int xflags = 0;
b40826
   if (total < reserved
b40826
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
b40826
+      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
b40826
 		       -1, 0)) != MAP_FAILED))
b40826
     xflags = MAP_FIXED;
b40826
   else
b40826
@@ -241,9 +241,9 @@ oldlocrecentcmp (const void *a, const vo
b40826
 /* forward decls for below */
b40826
 static uint32_t add_locale (struct locarhandle *ah, const char *name,
b40826
 			    locale_data_t data, bool replace);
b40826
-static void add_alias (struct locarhandle *ah, const char *alias,
b40826
-		       bool replace, const char *oldname,
b40826
-		       uint32_t *locrec_offset_p);
b40826
+void add_alias (struct locarhandle *ah, const char *alias,
b40826
+		bool replace, const char *oldname,
b40826
+		uint32_t *locrec_offset_p);
b40826
 
b40826
 
b40826
 static bool
b40826
@@ -396,7 +396,7 @@ enlarge_archive (struct locarhandle *ah,
b40826
   size_t reserved = RESERVE_MMAP_SIZE;
b40826
   int xflags = 0;
b40826
   if (total < reserved
b40826
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
b40826
+      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
b40826
 		       -1, 0)) != MAP_FAILED))
b40826
     xflags = MAP_FIXED;
b40826
   else
b40826
@@ -614,7 +614,7 @@ open_archive (struct locarhandle *ah, bo
b40826
   int xflags = 0;
b40826
   void *p;
b40826
   if (st.st_size < reserved
b40826
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
b40826
+      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
b40826
 		       -1, 0)) != MAP_FAILED))
b40826
     xflags = MAP_FIXED;
b40826
   else
b40826
@@ -649,7 +649,7 @@ close_archive (struct locarhandle *ah)
b40826
 #include "../../intl/explodename.c"
b40826
 #include "../../intl/l10nflist.c"
b40826
 
b40826
-static struct namehashent *
b40826
+struct namehashent *
b40826
 insert_name (struct locarhandle *ah,
b40826
 	     const char *name, size_t name_len, bool replace)
b40826
 {
b40826
@@ -707,7 +707,7 @@ insert_name (struct locarhandle *ah,
b40826
   return &namehashtab[idx];
b40826
 }
b40826
 
b40826
-static void
b40826
+void
b40826
 add_alias (struct locarhandle *ah, const char *alias, bool replace,
b40826
 	   const char *oldname, uint32_t *locrec_offset_p)
b40826
 {
b40826
--- glibc-2.12-2-gc4ccff1/localedata/Makefile
b40826
+++ glibc-2.12-1/localedata/Makefile
b40826
@@ -227,6 +227,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
b40826
 	echo -n '...'; \
b40826
 	input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
b40826
 	$(LOCALEDEF) --alias-file=../intl/locale.alias \
b40826
+		     --no-archive \
b40826
 		     -i locales/$$input -c -f charmaps/$$charset \
b40826
 		     $(addprefix --prefix=,$(install_root)) $$locale; \
b40826
 	echo ' done'; \
b40826
--- glibc-2.12-2-gc4ccff1/localedata/SUPPORTED
b40826
+++ glibc-2.12-1/localedata/SUPPORTED
b40826
@@ -85,6 +85,7 @@ cy_GB.UTF-8/UTF-8 \
b40826
 cy_GB/ISO-8859-14 \
b40826
 da_DK.UTF-8/UTF-8 \
b40826
 da_DK/ISO-8859-1 \
b40826
+da_DK.ISO-8859-15/ISO-8859-15 \
b40826
 de_AT.UTF-8/UTF-8 \
b40826
 de_AT/ISO-8859-1 \
b40826
 de_AT@euro/ISO-8859-15 \
b40826
@@ -116,6 +117,7 @@ en_DK.UTF-8/UTF-8 \
b40826
 en_DK/ISO-8859-1 \
b40826
 en_GB.UTF-8/UTF-8 \
b40826
 en_GB/ISO-8859-1 \
b40826
+en_GB.ISO-8859-15/ISO-8859-15 \
b40826
 en_HK.UTF-8/UTF-8 \
b40826
 en_HK/ISO-8859-1 \
b40826
 en_IE.UTF-8/UTF-8 \
b40826
@@ -131,6 +133,7 @@ en_SG.UTF-8/UTF-8 \
b40826
 en_SG/ISO-8859-1 \
b40826
 en_US.UTF-8/UTF-8 \
b40826
 en_US/ISO-8859-1 \
b40826
+en_US.ISO-8859-15/ISO-8859-15 \
b40826
 en_ZA.UTF-8/UTF-8 \
b40826
 en_ZA/ISO-8859-1 \
b40826
 en_ZW.UTF-8/UTF-8 \
b40826
@@ -307,6 +310,8 @@ nl_NL/ISO-8859-1 \
b40826
 nl_NL@euro/ISO-8859-15 \
b40826
 nn_NO.UTF-8/UTF-8 \
b40826
 nn_NO/ISO-8859-1 \
b40826
+no_NO.UTF-8/UTF-8 \
b40826
+no_NO/ISO-8859-1 \
b40826
 nr_ZA/UTF-8 \
b40826
 nso_ZA/UTF-8 \
b40826
 oc_FR.UTF-8/UTF-8 \
b40826
@@ -367,6 +372,7 @@ sv_FI/ISO-8859-1 \
b40826
 sv_FI@euro/ISO-8859-15 \
b40826
 sv_SE.UTF-8/UTF-8 \
b40826
 sv_SE/ISO-8859-1 \
b40826
+sv_SE.ISO-8859-15/ISO-8859-15 \
b40826
 ta_IN/UTF-8 \
b40826
 te_IN/UTF-8 \
b40826
 tg_TJ.UTF-8/UTF-8 \
b40826
--- glibc-2.12-2-gc4ccff1/localedata/locales/cy_GB
b40826
+++ glibc-2.12-1/localedata/locales/cy_GB
b40826
@@ -248,8 +248,11 @@ mon         "<U0049><U006F><U006E>
b40826
 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>"
b40826
 d_fmt       "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
b40826
 t_fmt       "<U0025><U0054>"
b40826
-am_pm       "";""
b40826
-t_fmt_ampm  ""
b40826
+am_pm       "<U0041><U004D>";"<U0050><U004D>"
b40826
+t_fmt_ampm  "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
b40826
+date_fmt    "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
b40826
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
b40826
+<U0025><U005A><U0020><U0025><U0059>"
b40826
 END LC_TIME
b40826
 
b40826
 LC_MESSAGES
b40826
--- glibc-2.12-2-gc4ccff1/localedata/locales/en_GB
b40826
+++ glibc-2.12-1/localedata/locales/en_GB
b40826
@@ -116,8 +116,8 @@ mon         "<U004A><U0061><U006E>
b40826
 d_t_fmt     "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
b40826
 d_fmt       "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
b40826
 t_fmt       "<U0025><U0054>"
b40826
-am_pm       "";""
b40826
-t_fmt_ampm  ""
b40826
+am_pm       "<U0041><U004D>";"<U0050><U004D>"
b40826
+t_fmt_ampm  "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
b40826
 date_fmt	"<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
b40826
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
b40826
 <U0025><U005A><U0020><U0025><U0059>"
b40826
--- glibc-2.12-2-gc4ccff1/localedata/locales/no_NO
b40826
+++ glibc-2.12-1/localedata/locales/no_NO
b40826
@@ -0,0 +1,69 @@
b40826
+escape_char	/
b40826
+comment_char    %
b40826
+
b40826
+% Norwegian language locale for Norway
b40826
+% Source: Norsk Standardiseringsforbund
b40826
+% Address: University Library,
b40826
+%   Drammensveien 41, N-9242 Oslo, Norge
b40826
+% Contact: Kolbjoern Aamboe
b40826
+% Tel: +47 - 22859109
b40826
+% Fax: +47 - 22434497
b40826
+% Email: kolbjorn.aambo@usit.uio.no
b40826
+% Language: no
b40826
+% Territory: NO
b40826
+% Revision: 4.3
b40826
+% Date: 1996-10-15
b40826
+% Application: general
b40826
+% Users: general
b40826
+% Repertoiremap: mnemonic.ds
b40826
+% Charset: ISO-8859-1
b40826
+% Distribution and use is free, also
b40826
+% for commercial purposes.
b40826
+
b40826
+LC_IDENTIFICATION
b40826
+copy "nb_NO"
b40826
+END LC_IDENTIFICATION
b40826
+
b40826
+LC_COLLATE
b40826
+copy "nb_NO"
b40826
+END LC_COLLATE
b40826
+
b40826
+LC_CTYPE
b40826
+copy "nb_NO"
b40826
+END LC_CTYPE
b40826
+
b40826
+LC_MONETARY
b40826
+copy "nb_NO"
b40826
+END LC_MONETARY
b40826
+
b40826
+LC_NUMERIC
b40826
+copy "nb_NO"
b40826
+END LC_NUMERIC
b40826
+
b40826
+LC_TIME
b40826
+copy "nb_NO"
b40826
+END LC_TIME
b40826
+
b40826
+LC_MESSAGES
b40826
+copy "nb_NO"
b40826
+END LC_MESSAGES
b40826
+
b40826
+LC_PAPER
b40826
+copy "nb_NO"
b40826
+END LC_PAPER
b40826
+
b40826
+LC_TELEPHONE
b40826
+copy "nb_NO"
b40826
+END LC_TELEPHONE
b40826
+
b40826
+LC_MEASUREMENT
b40826
+copy "nb_NO"
b40826
+END LC_MEASUREMENT
b40826
+
b40826
+LC_NAME
b40826
+copy "nb_NO"
b40826
+END LC_NAME
b40826
+
b40826
+LC_ADDRESS
b40826
+copy "nb_NO"
b40826
+END LC_ADDRESS
b40826
--- glibc-2.12-2-gc4ccff1/localedata/locales/zh_TW
b40826
+++ glibc-2.12-1/localedata/locales/zh_TW
b40826
@@ -1,7 +1,7 @@
b40826
 comment_char %
b40826
 escape_char /
b40826
 %
b40826
-% Chinese language locale for Taiwan R.O.C.
b40826
+% Chinese language locale for Taiwan
b40826
 % charmap: BIG5-CP950
b40826
 %
b40826
 % Original Author:
b40826
@@ -17,7 +17,7 @@ escape_char /
b40826
 % Reference:	http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
b40826
 
b40826
 LC_IDENTIFICATION
b40826
-title      "Chinese locale for Taiwan R.O.C."
b40826
+title      "Chinese locale for Taiwan"
b40826
 source     ""
b40826
 address    ""
b40826
 contact    ""
b40826
@@ -25,7 +25,7 @@ email      "bug-glibc-locales@gnu.org"
b40826
 tel        ""
b40826
 fax        ""
b40826
 language   "Chinese"
b40826
-territory  "Taiwan R.O.C."
b40826
+territory  "Taiwan"
b40826
 revision   "0.2"
b40826
 date       "2000-08-02"
b40826
 %
b40826
--- glibc-2.12-2-gc4ccff1/malloc/mcheck.c
b40826
+++ glibc-2.12-1/malloc/mcheck.c
b40826
@@ -24,9 +24,25 @@
b40826
 # include <mcheck.h>
b40826
 # include <stdint.h>
b40826
 # include <stdio.h>
b40826
+# include <stdlib.h>
b40826
 # include <libintl.h>
b40826
 #endif
b40826
 
b40826
+#ifdef _LIBC
b40826
+extern __typeof (malloc) __libc_malloc;
b40826
+extern __typeof (free) __libc_free;
b40826
+extern __typeof (realloc) __libc_realloc;
b40826
+libc_hidden_proto (__libc_malloc)
b40826
+libc_hidden_proto (__libc_realloc)
b40826
+libc_hidden_proto (__libc_free)
b40826
+libc_hidden_proto (__libc_memalign)
b40826
+#else
b40826
+# define __libc_malloc(sz) malloc (sz)
b40826
+# define __libc_free(ptr) free (ptr)
b40826
+# define __libc_realloc(ptr, sz) realloc (ptr, sz)
b40826
+# define __libc_memalign(al, sz) memalign (al, sz)
b40826
+#endif
b40826
+
b40826
 /* Old hook values.  */
b40826
 static void (*old_free_hook) (__ptr_t ptr, __const __ptr_t);
b40826
 static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t);
b40826
@@ -197,7 +213,7 @@ freehook (__ptr_t ptr, const __ptr_t cal
b40826
   if (old_free_hook != NULL)
b40826
     (*old_free_hook) (ptr, caller);
b40826
   else
b40826
-    free (ptr);
b40826
+    __libc_free (ptr);
b40826
   __free_hook = freehook;
b40826
 }
b40826
 
b40826
@@ -214,7 +230,7 @@ mallochook (__malloc_size_t size, const 
b40826
     hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
b40826
 					     caller);
b40826
   else
b40826
-    hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
b40826
+    hdr = (struct hdr *) __libc_malloc (sizeof (struct hdr) + size + 1);
b40826
   __malloc_hook = mallochook;
b40826
   if (hdr == NULL)
b40826
     return NULL;
b40826
@@ -245,7 +261,7 @@ memalignhook (__malloc_size_t alignment,
b40826
   if (old_memalign_hook != NULL)
b40826
     block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
b40826
   else
b40826
-    block = memalign (alignment, slop + size + 1);
b40826
+    block = __libc_memalign (alignment, slop + size + 1);
b40826
   __memalign_hook = memalignhook;
b40826
   if (block == NULL)
b40826
     return NULL;
b40826
@@ -300,8 +316,8 @@ reallochook (__ptr_t ptr, __malloc_size_
b40826
 					      sizeof (struct hdr) + size + 1,
b40826
 					      caller);
b40826
   else
b40826
-    hdr = (struct hdr *) realloc ((__ptr_t) hdr,
b40826
-				  sizeof (struct hdr) + size + 1);
b40826
+    hdr = (struct hdr *) __libc_realloc ((__ptr_t) hdr,
b40826
+					 sizeof (struct hdr) + size + 1);
b40826
   __free_hook = freehook;
b40826
   __malloc_hook = mallochook;
b40826
   __memalign_hook = memalignhook;
b40826
@@ -361,8 +377,8 @@ mcheck (func)
b40826
   if (__malloc_initialized <= 0 && !mcheck_used)
b40826
     {
b40826
       /* We call malloc() once here to ensure it is initialized.  */
b40826
-      void *p = malloc (0);
b40826
-      free (p);
b40826
+      void *p = __libc_malloc (0);
b40826
+      __libc_free (p);
b40826
 
b40826
       old_free_hook = __free_hook;
b40826
       __free_hook = freehook;
b40826
--- glibc-2.12-2-gc4ccff1/manual/libc.texinfo
b40826
+++ glibc-2.12-1/manual/libc.texinfo
b40826
@@ -5,7 +5,7 @@
b40826
 @c setchapternewpage odd
b40826
 
b40826
 @comment Tell install-info what to do.
b40826
-@dircategory Software libraries
b40826
+@dircategory Libraries
b40826
 @direntry
b40826
 * Libc: (libc).                 C library.
b40826
 @end direntry
b40826
--- glibc-2.12-2-gc4ccff1/misc/sys/cdefs.h
b40826
+++ glibc-2.12-1/misc/sys/cdefs.h
b40826
@@ -132,7 +132,10 @@
b40826
 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
b40826
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
b40826
 
b40826
-#if __GNUC_PREREQ (4,3)
b40826
+#if __GNUC_PREREQ (4,3) \
b40826
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b40826
+	&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b40826
+	&& __GNUC_RH_RELEASE__ >= 31)
b40826
 # define __warndecl(name, msg) \
b40826
   extern void name (void) __attribute__((__warning__ (msg)))
b40826
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
b40826
@@ -291,10 +294,16 @@
b40826
 
b40826
 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
b40826
    inline semantics, unless -fgnu89-inline is used.  */
b40826
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
b40826
+#if !defined __cplusplus || __GNUC_PREREQ (4,3) \
b40826
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b40826
+	&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b40826
+	&& __GNUC_RH_RELEASE__ >= 31)
b40826
 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
b40826
 #  define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
b40826
-#  if __GNUC_PREREQ (4,3)
b40826
+#  if __GNUC_PREREQ (4,3) \
b40826
+	|| (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b40826
+	    && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b40826
+	    && __GNUC_RH_RELEASE__ >= 31)
b40826
 #   define __extern_always_inline \
b40826
   extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
b40826
 #  else
b40826
@@ -314,7 +323,10 @@
b40826
 
b40826
 /* GCC 4.3 and above allow passing all anonymous arguments of an
b40826
    __extern_always_inline function to some other vararg function.  */
b40826
-#if __GNUC_PREREQ (4,3)
b40826
+#if __GNUC_PREREQ (4,3) \
b40826
+    || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \
b40826
+	&& __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \
b40826
+	&& __GNUC_RH_RELEASE__ >= 31)
b40826
 # define __va_arg_pack() __builtin_va_arg_pack ()
b40826
 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
b40826
 #endif
b40826
--- glibc-2.12-2-gc4ccff1/nis/nss
b40826
+++ glibc-2.12-1/nis/nss
b40826
@@ -25,7 +25,7 @@
b40826
 #  memory with every getXXent() call.  Otherwise each getXXent() call
b40826
 #  might result into a network communication with the server to get
b40826
 #  the next entry.
b40826
-#SETENT_BATCH_READ=TRUE
b40826
+SETENT_BATCH_READ=TRUE
b40826
 #
b40826
 # ADJUNCT_AS_SHADOW
b40826
 #  If set to TRUE, the passwd routines in the NIS NSS module will not
b40826
--- glibc-2.12-2-gc4ccff1/nptl/ChangeLog
b40826
+++ glibc-2.12-1/nptl/ChangeLog
b40826
@@ -3884,6 +3884,15 @@
b40826
 	Use __sigfillset.  Document that sigfillset does the right thing wrt
b40826
 	to SIGSETXID.
b40826
 
b40826
+2005-08-08  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* tst-stackguard1.c (do_test): Likewise.
b40826
+
b40826
+2005-07-29  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* tst-stackguard1.c (do_test): Don't fail if the poor man's
b40826
+	randomization doesn't work well enough.
b40826
+
b40826
 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
b40826
 
b40826
 	[BZ #1102]
b40826
@@ -4620,6 +4629,11 @@
b40826
 	Move definition inside libpthread, libc, librt check.  Provide
b40826
 	definition for rtld.
b40826
 
b40826
+2004-09-02  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* pthread_cond_destroy.c (__pthread_cond_destroy): If there are
b40826
+	waiters, awake all waiters on the associated mutex.
b40826
+
b40826
 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
b40826
 
b40826
 	* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
b40826
@@ -6694,6 +6708,11 @@
b40826
 
b40826
 	* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
b40826
 
b40826
+2003-07-22  Jakub Jelinek  <jakub@redhat.com>
b40826
+
b40826
+	* descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
b40826
+	if __need_struct_pthread_size, instead define lll_lock_t.
b40826
+
b40826
 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
b40826
 
b40826
 	* tst-cancel17.c (do_test): Check if aio_cancel failed.
b40826
--- glibc-2.12-2-gc4ccff1/nptl/Makefile
b40826
+++ glibc-2.12-1/nptl/Makefile
b40826
@@ -341,7 +341,8 @@ endif
b40826
 extra-objs += $(crti-objs) $(crtn-objs)
b40826
 omit-deps += crti crtn
b40826
 
b40826
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
b40826
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
b40826
+		       -fno-asynchronous-unwind-tables
b40826
 endif
b40826
 
b40826
 CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
b40826
@@ -527,15 +528,19 @@ $(addprefix $(objpfx), \
b40826
     $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
b40826
 				       $(objpfx)libpthread_nonshared.a
b40826
 $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
b40826
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
b40826
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
b40826
 # since otherwise libpthread.so comes before libc.so when linking.
b40826
 $(addprefix $(objpfx), $(tests-reverse)): \
b40826
-  $(objpfx)../libc.so $(objpfx)libpthread.so \
b40826
+  $(objpfx)linklibc.so $(objpfx)libpthread.so \
b40826
   $(objpfx)libpthread_nonshared.a
b40826
 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
b40826
 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
b40826
 
b40826
 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
b40826
+
b40826
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
b40826
+	ln -s ../libc.so $@
b40826
+generated += libclink.so
b40826
 else
b40826
 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
b40826
 endif
b40826
--- glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
b40826
+++ glibc-2.12-1/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
b40826
@@ -189,4 +189,7 @@
b40826
 /* Typed memory objects are not available.  */
b40826
 #define _POSIX_TYPED_MEMORY_OBJECTS	-1
b40826
 
b40826
+/* Streams are not available.  */
b40826
+#define _XOPEN_STREAMS	-1
b40826
+
b40826
 #endif /* bits/posix_opt.h */
b40826
--- glibc-2.12-2-gc4ccff1/nptl/sysdeps/unix/sysv/linux/kernel-features.h
b40826
+++ glibc-2.12-1/nptl/sysdeps/unix/sysv/linux/kernel-features.h
b40826
@@ -0,0 +1,6 @@
b40826
+#include_next <kernel-features.h>
b40826
+
b40826
+/* NPTL can always assume all clone thread flags work.  */
b40826
+#ifndef __ASSUME_CLONE_THREAD_FLAGS
b40826
+# define __ASSUME_CLONE_THREAD_FLAGS	1
b40826
+#endif
b40826
--- glibc-2.12-2-gc4ccff1/nptl/tst-stackguard1.c
b40826
+++ glibc-2.12-1/nptl/tst-stackguard1.c
b40826
@@ -190,17 +190,21 @@ do_test (void)
b40826
      the 16 runs, something is very wrong.  */
b40826
   int ndifferences = 0;
b40826
   int ndefaults = 0;
b40826
+  int npartlyrandomized = 0;
b40826
   for (i = 0; i < N; ++i) 
b40826
     {
b40826
       if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
b40826
 	ndifferences++;
b40826
       else if (child_stack_chk_guards[i] == default_guard)
b40826
 	ndefaults++;
b40826
+      else if (*(char *) &child_stack_chk_guards[i] == 0)
b40826
+	npartlyrandomized++;
b40826
     }
b40826
 
b40826
-  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
b40826
+  printf ("differences %d defaults %d partly randomized %d\n",
b40826
+	  ndifferences, ndefaults, npartlyrandomized);
b40826
 
b40826
-  if (ndifferences < N / 2 && ndefaults < N / 2)
b40826
+  if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
b40826
     {
b40826
       puts ("stack guard canaries are not randomized enough");
b40826
       puts ("nor equal to the default canary value");
b40826
--- glibc-2.12-2-gc4ccff1/nscd/nscd.conf
b40826
+++ glibc-2.12-1/nscd/nscd.conf
b40826
@@ -33,7 +33,7 @@
b40826
 #	logfile			/var/log/nscd.log
b40826
 #	threads			4
b40826
 #	max-threads		32
b40826
-#	server-user		nobody
b40826
+	server-user		nscd
b40826
 #	stat-user		somebody
b40826
 	debug-level		0
b40826
 #	reload-count		5
b40826
--- glibc-2.12-2-gc4ccff1/nscd/nscd.init
b40826
+++ glibc-2.12-1/nscd/nscd.init
b40826
@@ -9,6 +9,7 @@
b40826
 #		slow naming services like NIS, NIS+, LDAP, or hesiod.
b40826
 # processname: /usr/sbin/nscd
b40826
 # config: /etc/nscd.conf
b40826
+# config: /etc/sysconfig/nscd
b40826
 #
b40826
 ### BEGIN INIT INFO
b40826
 # Provides: nscd
b40826
@@ -28,20 +29,8 @@
b40826
 # Source function library.
b40826
 . /etc/init.d/functions
b40826
 
b40826
-# nscd does not run on any kernel lower than 2.2.0 because of threading
b40826
-# problems, so we require that in first place.
b40826
-case $(uname -r) in
b40826
-    2.[2-9].*)
b40826
-	# this is okay
b40826
-	;;
b40826
-    [3-9]*)
b40826
-	# these are of course also okay
b40826
-	;;
b40826
-    *)
b40826
-	#this is not
b40826
-	exit 1
b40826
-	;;
b40826
-esac
b40826
+# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS.
b40826
+[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd
b40826
 
b40826
 RETVAL=0
b40826
 prog=nscd
b40826
@@ -50,7 +39,7 @@ start () {
b40826
     [ -d /var/run/nscd ] || mkdir /var/run/nscd
b40826
     [ -d /var/db/nscd ] || mkdir /var/db/nscd
b40826
     echo -n $"Starting $prog: "
b40826
-    daemon /usr/sbin/nscd
b40826
+    daemon /usr/sbin/nscd $NSCD_OPTIONS
b40826
     RETVAL=$?
b40826
     echo
b40826
     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
b40826
@@ -83,7 +72,7 @@ restart() {
b40826
 # See how we were called.
b40826
 case "$1" in
b40826
     start)
b40826
-	start
b40826
+	[ -e /var/lock/subsys/nscd ] || start
b40826
 	RETVAL=$?
b40826
 	;;
b40826
     stop)
b40826
@@ -99,14 +88,17 @@ case "$1" in
b40826
 	RETVAL=$?
b40826
 	;;
b40826
     try-restart | condrestart)
b40826
-	[ -e /var/lock/subsys/nscd ] && restart
b40826
+	[ ! -e /var/lock/subsys/nscd ] || restart
b40826
 	RETVAL=$?
b40826
 	;;
b40826
     force-reload | reload)
b40826
     	echo -n $"Reloading $prog: "
b40826
-	killproc /usr/sbin/nscd -HUP
b40826
-	RETVAL=$?
b40826
-	echo
b40826
+    	RETVAL=0
b40826
+    	/usr/sbin/nscd -i passwd || RETVAL=$?
b40826
+    	/usr/sbin/nscd -i group || RETVAL=$?
b40826
+    	/usr/sbin/nscd -i hosts || RETVAL=$?
b40826
+    	/usr/sbin/nscd -i services || RETVAL=$?
b40826
+    	echo
b40826
 	;;
b40826
     *)
b40826
 	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
b40826
--- glibc-2.12-2-gc4ccff1/posix/Makefile
b40826
+++ glibc-2.12-1/posix/Makefile
b40826
@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi
b40826
 	  mv -f $@/$$spec.new $@/$$spec; \
b40826
 	done < $(objpfx)getconf.speclist
b40826
 
b40826
-$(objpfx)getconf.speclist: $(objpfx)getconf
b40826
-ifeq (no,$(cross-compiling))
b40826
-	LC_ALL=C GETCONF_DIR=/dev/null \
b40826
-	$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
b40826
-	LC_ALL=C GETCONF_DIR=/dev/null \
b40826
-	$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
b40826
-	LC_ALL=C GETCONF_DIR=/dev/null \
b40826
-	$(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
b40826
-else
b40826
-	> $@.new
b40826
-endif
b40826
+$(objpfx)getconf.speclist: getconf.speclist.h
b40826
+	$(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
b40826
+	  | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|_XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
b40826
+	  > $@.new
b40826
 	mv -f $@.new $@
b40826
--- glibc-2.12-2-gc4ccff1/posix/gai.conf
b40826
+++ glibc-2.12-1/posix/gai.conf
b40826
@@ -41,7 +41,7 @@
b40826
 #
b40826
 # precedence  <mask>   <value>
b40826
 #    Add another rule to the RFC 3484 precedence table.  See section 2.1
b40826
-#    and 10.3 in RFC 3484.  The default is:
b40826
+#    and 10.3 in RFC 3484.  The RFC requires:
b40826
 #
b40826
 #precedence  ::1/128       50
b40826
 #precedence  ::/0          40
b40826
@@ -58,7 +58,7 @@
b40826
 #    Add another rule to the RFC 3484 scope table for IPv4 addresses.
b40826
 #    By default the scope IDs described in section 3.2 in RFC 3484 are
b40826
 #    used.  Changing these defaults should hardly ever be necessary.
b40826
-#    The defaults are equivalent to:
b40826
+#    The definitions in RFC 1918 are equivalent to:
b40826
 #
b40826
 #scopev4 ::ffff:169.254.0.0/112  2
b40826
 #scopev4 ::ffff:127.0.0.0/104    2
b40826
@@ -75,3 +75,5 @@
b40826
 #scopev4 ::ffff:169.254.0.0/112  2
b40826
 #scopev4 ::ffff:127.0.0.0/104    2
b40826
 #scopev4 ::ffff:0.0.0.0/96       14
b40826
+#
b40826
+#    This is what the Red Hat setting currently uses.
b40826
--- glibc-2.12-2-gc4ccff1/posix/getconf.speclist.h
b40826
+++ glibc-2.12-1/posix/getconf.speclist.h
b40826
@@ -0,0 +1,39 @@
b40826
+#include <unistd.h>
b40826
+const char *START_OF_STRINGS =
b40826
+#if _POSIX_V7_ILP32_OFF32 == 1
b40826
+"POSIX_V7_ILP32_OFF32"
b40826
+#endif
b40826
+#if _POSIX_V7_ILP32_OFFBIG == 1
b40826
+"POSIX_V7_ILP32_OFFBIG"
b40826
+#endif
b40826
+#if _POSIX_V7_LP64_OFF64 == 1
b40826
+"POSIX_V7_LP64_OFF64"
b40826
+#endif
b40826
+#if _POSIX_V7_LPBIG_OFFBIG == 1
b40826
+"POSIX_V7_LPBIG_OFFBIG"
b40826
+#endif
b40826
+#if _POSIX_V6_ILP32_OFF32 == 1
b40826
+"POSIX_V6_ILP32_OFF32"
b40826
+#endif
b40826
+#if _POSIX_V6_ILP32_OFFBIG == 1
b40826
+"POSIX_V6_ILP32_OFFBIG"
b40826
+#endif
b40826
+#if _POSIX_V6_LP64_OFF64 == 1
b40826
+"POSIX_V6_LP64_OFF64"
b40826
+#endif
b40826
+#if _POSIX_V6_LPBIG_OFFBIG == 1
b40826
+"POSIX_V6_LPBIG_OFFBIG"
b40826
+#endif
b40826
+#if _XBS5_ILP32_OFF32 == 1
b40826
+"XBS5_ILP32_OFF32"
b40826
+#endif
b40826
+#if _XBS5_ILP32_OFFBIG == 1
b40826
+"XBS5_ILP32_OFFBIG"
b40826
+#endif
b40826
+#if _XBS5_LP64_OFF64 == 1
b40826
+"XBS5_LP64_OFF64"
b40826
+#endif
b40826
+#if _XBS5_LPBIG_OFFBIG == 1
b40826
+"XBS5_LPBIG_OFFBIG"
b40826
+#endif
b40826
+"";
b40826
--- glibc-2.12-2-gc4ccff1/streams/Makefile
b40826
+++ glibc-2.12-1/streams/Makefile
b40826
@@ -21,7 +21,7 @@
b40826
 #
b40826
 subdir	:= streams
b40826
 
b40826
-headers		= stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
b40826
+#headers		= stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
b40826
 routines	= isastream getmsg getpmsg putmsg putpmsg fattach fdetach
b40826
 
b40826
 include ../Rules
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/generic/dl-cache.h
b40826
+++ glibc-2.12-1/sysdeps/generic/dl-cache.h
b40826
@@ -36,6 +36,14 @@
b40826
 # define add_system_dir(dir) add_dir (dir)
b40826
 #endif
b40826
 
b40826
+#ifndef arch_startup
b40826
+# define arch_startup(argc, argv) do { } while (0)
b40826
+#endif
b40826
+
b40826
+#ifndef add_arch_dirs
b40826
+# define add_arch_dirs(config_file) do { } while (0)
b40826
+#endif
b40826
+
b40826
 #define CACHEMAGIC "ld.so-1.7.0"
b40826
 
b40826
 /* libc5 and glibc 2.0/2.1 use the same format.  For glibc 2.2 another
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/i386/Makefile
b40826
+++ glibc-2.12-1/sysdeps/i386/Makefile
b40826
@@ -2,6 +2,8 @@
b40826
 # Every i386 port in use uses gas syntax (I think).
b40826
 asm-CPPFLAGS += -DGAS_SYNTAX
b40826
 
b40826
+sysdep-ASFLAGS += -U__i686
b40826
+
b40826
 # The i386 `long double' is a distinct type we support.
b40826
 long-double-fcts = yes
b40826
 
b40826
@@ -64,6 +66,14 @@ endif
b40826
 
b40826
 ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
b40826
 defines += -DNO_TLS_DIRECT_SEG_REFS
b40826
+else
b40826
+# .a libraries are not performance critical and so we
b40826
+# build them without direct TLS segment references
b40826
+# always.
b40826
+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS
b40826
+CFLAGS-.o += -mno-tls-direct-seg-refs
b40826
+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS
b40826
+CFLAGS-.oS += -mno-tls-direct-seg-refs
b40826
 endif
b40826
 
b40826
 ifeq ($(subdir),elf)
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/ia64/Makefile
b40826
+++ glibc-2.12-1/sysdeps/ia64/Makefile
b40826
@@ -12,8 +12,8 @@ elide-routines.os += hp-timing
b40826
 
b40826
 ifeq (yes,$(build-shared))
b40826
 # Compatibility
b40826
-sysdep_routines += ia64libgcc
b40826
-shared-only-routines += ia64libgcc
b40826
+sysdep_routines += libgcc-compat
b40826
+shared-only-routines += libgcc-compat
b40826
 endif
b40826
 endif
b40826
 
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/ia64/ia64libgcc.S
b40826
+++ glibc-2.12-1/sysdeps/ia64/ia64libgcc.S
b40826
@@ -1,350 +0,0 @@
b40826
-/* From the Intel IA-64 Optimization Guide, choose the minimum latency
b40826
-   alternative.  */
b40826
-
b40826
-#include <sysdep.h>
b40826
-#undef ret
b40826
-
b40826
-#include <shlib-compat.h>
b40826
-
b40826
-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
b40826
-
b40826
-/* __divtf3
b40826
-   Compute a 80-bit IEEE double-extended quotient.
b40826
-   farg0 holds the dividend.  farg1 holds the divisor.  */
b40826
-
b40826
-ENTRY(___divtf3)
b40826
-	cmp.eq p7, p0 = r0, r0
b40826
-	frcpa.s0 f10, p6 = farg0, farg1
b40826
-	;;
b40826
-(p6)	cmp.ne p7, p0 = r0, r0
b40826
-	.pred.rel.mutex p6, p7
b40826
-(p6)	fnma.s1 f11 = farg1, f10, f1
b40826
-(p6)	fma.s1 f12 = farg0, f10, f0
b40826
-	;;
b40826
-(p6)	fma.s1 f13 = f11, f11, f0
b40826
-(p6)	fma.s1 f14 = f11, f11, f11
b40826
-	;;
b40826
-(p6)	fma.s1 f11 = f13, f13, f11
b40826
-(p6)	fma.s1 f13 = f14, f10, f10
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f13, f11, f10
b40826
-(p6)	fnma.s1 f11 = farg1, f12, farg0
b40826
-	;;
b40826
-(p6)	fma.s1 f11 = f11, f10, f12
b40826
-(p6)	fnma.s1 f12 = farg1, f10, f1
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f12, f10, f10
b40826
-(p6)	fnma.s1 f12 = farg1, f11, farg0
b40826
-	;;
b40826
-(p6)	fma.s0 fret0 = f12, f10, f11
b40826
-(p7)	mov fret0 = f10
b40826
-	br.ret.sptk rp
b40826
-END(___divtf3)
b40826
-	.symver ___divtf3, __divtf3@GLIBC_2.2
b40826
-
b40826
-/* __divdf3
b40826
-   Compute a 64-bit IEEE double quotient.
b40826
-   farg0 holds the dividend.  farg1 holds the divisor.  */
b40826
-
b40826
-ENTRY(___divdf3)
b40826
-	cmp.eq p7, p0 = r0, r0
b40826
-	frcpa.s0 f10, p6 = farg0, farg1
b40826
-	;;
b40826
-(p6)	cmp.ne p7, p0 = r0, r0
b40826
-	.pred.rel.mutex p6, p7
b40826
-(p6)	fmpy.s1 f11 = farg0, f10
b40826
-(p6)	fnma.s1 f12 = farg1, f10, f1
b40826
-	;;
b40826
-(p6)	fma.s1 f11 = f12, f11, f11
b40826
-(p6)	fmpy.s1 f13 = f12, f12
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f12, f10, f10
b40826
-(p6)	fma.s1 f11 = f13, f11, f11
b40826
-	;;
b40826
-(p6)	fmpy.s1 f12 = f13, f13
b40826
-(p6)	fma.s1 f10 = f13, f10, f10
b40826
-	;;
b40826
-(p6)	fma.d.s1 f11 = f12, f11, f11
b40826
-(p6)	fma.s1 f10 = f12, f10, f10
b40826
-	;;
b40826
-(p6)	fnma.d.s1 f8 = farg1, f11, farg0
b40826
-	;;
b40826
-(p6)	fma.d fret0 = f8, f10, f11
b40826
-(p7)	mov fret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___divdf3)
b40826
-	.symver	___divdf3, __divdf3@GLIBC_2.2
b40826
-
b40826
-/* __divsf3
b40826
-   Compute a 32-bit IEEE float quotient.
b40826
-   farg0 holds the dividend.  farg1 holds the divisor.  */
b40826
-
b40826
-ENTRY(___divsf3)
b40826
-	cmp.eq p7, p0 = r0, r0
b40826
-	frcpa.s0 f10, p6 = farg0, farg1
b40826
-	;;
b40826
-(p6)	cmp.ne p7, p0 = r0, r0
b40826
-	.pred.rel.mutex p6, p7
b40826
-(p6)	fmpy.s1 f8 = farg0, f10
b40826
-(p6)	fnma.s1 f9 = farg1, f10, f1
b40826
-	;;
b40826
-(p6)	fma.s1 f8 = f9, f8, f8
b40826
-(p6)	fmpy.s1 f9 = f9, f9
b40826
-	;;
b40826
-(p6)	fma.s1 f8 = f9, f8, f8
b40826
-(p6)	fmpy.s1 f9 = f9, f9
b40826
-	;;
b40826
-(p6)	fma.d.s1 f10 = f9, f8, f8
b40826
-	;;
b40826
-(p6)	fnorm.s.s0 fret0 = f10
b40826
-(p7)	mov fret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___divsf3)
b40826
-	.symver	___divsf3, __divsf3@GLIBC_2.2
b40826
-
b40826
-/* __divdi3
b40826
-   Compute a 64-bit integer quotient.
b40826
-   in0 holds the dividend.  in1 holds the divisor.  */
b40826
-
b40826
-ENTRY(___divdi3)
b40826
-	.regstk 2,0,0,0
b40826
-	/* Transfer inputs to FP registers.  */
b40826
-	setf.sig f8 = in0
b40826
-	setf.sig f9 = in1
b40826
-	;;
b40826
-	/* Convert the inputs to FP, so that they won't be treated as
b40826
-	   unsigned.  */
b40826
-	fcvt.xf f8 = f8
b40826
-	fcvt.xf f9 = f9
b40826
-	;;
b40826
-	/* Compute the reciprocal approximation.  */
b40826
-	frcpa.s1 f10, p6 = f8, f9
b40826
-	;;
b40826
-	/* 3 Newton-Raphson iterations.  */
b40826
-(p6)	fnma.s1 f11 = f9, f10, f1
b40826
-(p6)	fmpy.s1 f12 = f8, f10
b40826
-	;;
b40826
-(p6)	fmpy.s1 f13 = f11, f11
b40826
-(p6)	fma.s1 f12 = f11, f12, f12
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f11, f10, f10
b40826
-(p6)	fma.s1 f11 = f13, f12, f12
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f13, f10, f10
b40826
-(p6)	fnma.s1 f12 = f9, f11, f8
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f12, f10, f11
b40826
-	;;
b40826
-	/* Round quotient to an integer.  */
b40826
-	fcvt.fx.trunc.s1 f10 = f10
b40826
-	;;
b40826
-	/* Transfer result to GP registers.  */
b40826
-	getf.sig ret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___divdi3)
b40826
-	.symver	___divdi3, __divdi3@GLIBC_2.2
b40826
-
b40826
-/* __moddi3
b40826
-   Compute a 64-bit integer modulus.
b40826
-   in0 holds the dividend (a).  in1 holds the divisor (b).  */
b40826
-
b40826
-ENTRY(___moddi3)
b40826
-	.regstk 2,0,0,0
b40826
-	/* Transfer inputs to FP registers.  */
b40826
-	setf.sig f14 = in0
b40826
-	setf.sig f9 = in1
b40826
-	;;
b40826
-	/* Convert the inputs to FP, so that they won't be treated as
b40826
-	   unsigned.  */
b40826
-	fcvt.xf f8 = f14
b40826
-	fcvt.xf f9 = f9
b40826
-	;;
b40826
-	/* Compute the reciprocal approximation.  */
b40826
-	frcpa.s1 f10, p6 = f8, f9
b40826
-	;;
b40826
-	/* 3 Newton-Raphson iterations.  */
b40826
-(p6)	fmpy.s1 f12 = f8, f10
b40826
-(p6)	fnma.s1 f11 = f9, f10, f1
b40826
-	;;
b40826
-(p6)	fma.s1 f12 = f11, f12, f12
b40826
-(p6)	fmpy.s1 f13 = f11, f11
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f11, f10, f10
b40826
-(p6)	fma.s1 f11 = f13, f12, f12
b40826
-	;;
b40826
-	sub in1 = r0, in1
b40826
-(p6)	fma.s1 f10 = f13, f10, f10
b40826
-(p6)	fnma.s1 f12 = f9, f11, f8
b40826
-	;;
b40826
-	setf.sig f9 = in1
b40826
-(p6)	fma.s1 f10 = f12, f10, f11
b40826
-	;;
b40826
-	fcvt.fx.trunc.s1 f10 = f10
b40826
-	;;
b40826
-	/* r = q * (-b) + a  */
b40826
-	xma.l f10 = f10, f9, f14
b40826
-	;;
b40826
-	/* Transfer result to GP registers.  */
b40826
-	getf.sig ret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___moddi3)
b40826
-	.symver ___moddi3, __moddi3@GLIBC_2.2
b40826
-
b40826
-/* __udivdi3
b40826
-   Compute a 64-bit unsigned integer quotient.
b40826
-   in0 holds the dividend.  in1 holds the divisor.  */
b40826
-
b40826
-ENTRY(___udivdi3)
b40826
-	.regstk 2,0,0,0
b40826
-	/* Transfer inputs to FP registers.  */
b40826
-	setf.sig f8 = in0
b40826
-	setf.sig f9 = in1
b40826
-	;;
b40826
-	/* Convert the inputs to FP, to avoid FP software-assist faults.  */
b40826
-	fcvt.xuf.s1 f8 = f8
b40826
-	fcvt.xuf.s1 f9 = f9
b40826
-	;;
b40826
-	/* Compute the reciprocal approximation.  */
b40826
-	frcpa.s1 f10, p6 = f8, f9
b40826
-	;;
b40826
-	/* 3 Newton-Raphson iterations.  */
b40826
-(p6)	fnma.s1 f11 = f9, f10, f1
b40826
-(p6)	fmpy.s1 f12 = f8, f10
b40826
-	;;
b40826
-(p6)	fmpy.s1 f13 = f11, f11
b40826
-(p6)	fma.s1 f12 = f11, f12, f12
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f11, f10, f10
b40826
-(p6)	fma.s1 f11 = f13, f12, f12
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f13, f10, f10
b40826
-(p6)	fnma.s1 f12 = f9, f11, f8
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f12, f10, f11
b40826
-	;;
b40826
-	/* Round quotient to an unsigned integer.  */
b40826
-	fcvt.fxu.trunc.s1 f10 = f10
b40826
-	;;
b40826
-	/* Transfer result to GP registers.  */
b40826
-	getf.sig ret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___udivdi3)
b40826
-	.symver	___udivdi3, __udivdi3@GLIBC_2.2
b40826
-
b40826
-/* __umoddi3
b40826
-   Compute a 64-bit unsigned integer modulus.
b40826
-   in0 holds the dividend (a).  in1 holds the divisor (b).  */
b40826
-
b40826
-ENTRY(___umoddi3)
b40826
-	.regstk 2,0,0,0
b40826
-	/* Transfer inputs to FP registers.  */
b40826
-	setf.sig f14 = in0
b40826
-	setf.sig f9 = in1
b40826
-	;;
b40826
-	/* Convert the inputs to FP, to avoid FP software assist faults.  */
b40826
-	fcvt.xuf.s1 f8 = f14
b40826
-	fcvt.xuf.s1 f9 = f9
b40826
-	;;
b40826
-	/* Compute the reciprocal approximation.  */
b40826
-	frcpa.s1 f10, p6 = f8, f9
b40826
-	;;
b40826
-	/* 3 Newton-Raphson iterations.  */
b40826
-(p6)	fmpy.s1 f12 = f8, f10
b40826
-(p6)	fnma.s1 f11 = f9, f10, f1
b40826
-	;;
b40826
-(p6)	fma.s1 f12 = f11, f12, f12
b40826
-(p6)	fmpy.s1 f13 = f11, f11
b40826
-	;;
b40826
-(p6)	fma.s1 f10 = f11, f10, f10
b40826
-(p6)	fma.s1 f11 = f13, f12, f12
b40826
-	;;
b40826
-	sub in1 = r0, in1
b40826
-(p6)	fma.s1 f10 = f13, f10, f10
b40826
-(p6)	fnma.s1 f12 = f9, f11, f8
b40826
-	;;
b40826
-	setf.sig f9 = in1
b40826
-(p6)	fma.s1 f10 = f12, f10, f11
b40826
-	;;
b40826
-	/* Round quotient to an unsigned integer.  */
b40826
-	fcvt.fxu.trunc.s1 f10 = f10
b40826
-	;;
b40826
-	/* r = q * (-b) + a  */
b40826
-	xma.l f10 = f10, f9, f14
b40826
-	;;
b40826
-	/* Transfer result to GP registers.  */
b40826
-	getf.sig ret0 = f10
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___umoddi3)
b40826
-	.symver	___umoddi3, __umoddi3@GLIBC_2.2
b40826
-
b40826
-/* __multi3
b40826
-   Compute a 128-bit multiply of 128-bit multiplicands.
b40826
-   in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b).  */
b40826
-
b40826
-ENTRY(___multi3)
b40826
-	.regstk 4,0,0,0
b40826
-	setf.sig f6 = in1
b40826
-	movl r19 = 0xffffffff
b40826
-	setf.sig f7 = in2
b40826
-	;;
b40826
-	and r14 = r19, in0
b40826
-	;;
b40826
-	setf.sig f10 = r14
b40826
-	and r14 = r19, in2
b40826
-	xmpy.l f9 = f6, f7
b40826
-	;;
b40826
-	setf.sig f6 = r14
b40826
-	shr.u r14 = in0, 32
b40826
-	;;
b40826
-	setf.sig f7 = r14
b40826
-	shr.u r14 = in2, 32
b40826
-	;;
b40826
-	setf.sig f8 = r14
b40826
-	xmpy.l f11 = f10, f6
b40826
-	xmpy.l f6 = f7, f6
b40826
-	;;
b40826
-	getf.sig r16 = f11
b40826
-	xmpy.l f7 = f7, f8
b40826
-	;;
b40826
-	shr.u r14 = r16, 32
b40826
-	and r16 = r19, r16
b40826
-	getf.sig r17 = f6
b40826
-	setf.sig f6 = in0
b40826
-	;;
b40826
-	setf.sig f11 = r14
b40826
-	getf.sig r21 = f7
b40826
-	setf.sig f7 = in3
b40826
-	;;
b40826
-	xma.l f11 = f10, f8, f11
b40826
-	xma.l f6 = f6, f7, f9
b40826
-	;;
b40826
-	getf.sig r18 = f11
b40826
-	;;
b40826
-	add r18 = r18, r17
b40826
-	;;
b40826
-	and r15 = r19, r18
b40826
-	cmp.ltu p7, p6 = r18, r17
b40826
-	;;
b40826
-	getf.sig r22 = f6
b40826
-(p7)	adds r14 = 1, r19
b40826
-	;;
b40826
-(p7)	add r21 = r21, r14
b40826
-	shr.u r14 = r18, 32
b40826
-	shl r15 = r15, 32
b40826
-	;;
b40826
-	add r20 = r21, r14
b40826
-	;;
b40826
-	add ret0 = r15, r16
b40826
-	add ret1 = r22, r20
b40826
-	br.ret.sptk rp
b40826
-	;;
b40826
-END(___multi3)
b40826
-	.symver	___multi3, __multi3@GLIBC_2.2
b40826
-
b40826
-#endif
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/ia64/libgcc-compat.c
b40826
+++ glibc-2.12-1/sysdeps/ia64/libgcc-compat.c
b40826
@@ -0,0 +1,84 @@
b40826
+/* pre-.hidden libgcc compatibility
b40826
+   Copyright (C) 2002 Free Software Foundation, Inc.
b40826
+   This file is part of the GNU C Library.
b40826
+
b40826
+   The GNU C Library is free software; you can redistribute it and/or
b40826
+   modify it under the terms of the GNU Lesser General Public
b40826
+   License as published by the Free Software Foundation; either
b40826
+   version 2.1 of the License, or (at your option) any later version.
b40826
+
b40826
+   The GNU C Library is distributed in the hope that it will be useful,
b40826
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
b40826
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b40826
+   Lesser General Public License for more details.
b40826
+
b40826
+   You should have received a copy of the GNU Lesser General Public
b40826
+   License along with the GNU C Library; if not, write to the Free
b40826
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b40826
+   02111-1307 USA.  */
b40826
+
b40826
+
b40826
+#include <stdint.h>
b40826
+#include <shlib-compat.h>
b40826
+
b40826
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
b40826
+
b40826
+typedef int int128_t __attribute__((__mode__(TI)));
b40826
+
b40826
+extern long double __divtf3 (long double, long double) attribute_hidden;
b40826
+long double INTUSE (__divtf3) (long double x, long double y)
b40826
+{
b40826
+  return __divtf3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
b40826
+
b40826
+extern double __divdf3 (double, double) attribute_hidden;
b40826
+double INTUSE (__divdf3) (double x, double y)
b40826
+{
b40826
+  return __divdf3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
b40826
+
b40826
+extern float __divsf3 (float, float) attribute_hidden;
b40826
+float INTUSE (__divsf3) (float x, float y)
b40826
+{
b40826
+  return __divsf3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
b40826
+
b40826
+extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
b40826
+int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
b40826
+{
b40826
+  return __divdi3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
b40826
+
b40826
+extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
b40826
+int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
b40826
+{
b40826
+  return __moddi3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
b40826
+
b40826
+extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
b40826
+uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
b40826
+{
b40826
+  return __udivdi3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
b40826
+
b40826
+extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
b40826
+uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
b40826
+{
b40826
+  return __umoddi3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
b40826
+
b40826
+extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
b40826
+int128_t INTUSE (__multi3) (int128_t x, int128_t y)
b40826
+{
b40826
+  return __multi3 (x, y);
b40826
+}
b40826
+symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
b40826
+
b40826
+#endif
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/posix/getaddrinfo.c
b40826
+++ glibc-2.12-1/sysdeps/posix/getaddrinfo.c
b40826
@@ -1099,10 +1099,12 @@ static const struct scopeentry
b40826
     /* Link-local addresses: scope 2.  */
b40826
     { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
b40826
     { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
b40826
+#if 0
b40826
     /* Site-local addresses: scope 5.  */
b40826
     { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
b40826
     { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
b40826
     { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
b40826
+#endif
b40826
     /* Default: scope 14.  */
b40826
     { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
b40826
   };
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/powerpc/powerpc64/Makefile
b40826
+++ glibc-2.12-1/sysdeps/powerpc/powerpc64/Makefile
b40826
@@ -30,6 +30,7 @@ ifneq ($(elf),no)
b40826
 # we use -fpic instead which is much better.
b40826
 CFLAGS-initfini.s += -fpic -O1
b40826
 endif
b40826
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
b40826
 endif
b40826
 
b40826
 ifeq ($(subdir),elf)
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/nice.c
b40826
+++ glibc-2.12-1/sysdeps/unix/nice.c
b40826
@@ -42,7 +42,12 @@ nice (int incr)
b40826
 	__set_errno (save);
b40826
     }
b40826
 
b40826
-  result = setpriority (PRIO_PROCESS, 0, prio + incr);
b40826
+  prio += incr;
b40826
+  if (prio < PRIO_MIN)
b40826
+    prio = PRIO_MIN;
b40826
+  else if (prio >= PRIO_MAX)
b40826
+    prio = PRIO_MAX - 1;
b40826
+  result = setpriority (PRIO_PROCESS, 0, prio);
b40826
   if (result == -1)
b40826
     {
b40826
       if (errno == EACCES)
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/check_pf.c
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/check_pf.c
b40826
@@ -27,13 +27,10 @@
b40826
 #include <unistd.h>
b40826
 #include <sys/socket.h>
b40826
 
b40826
-#include <asm/types.h>
b40826
-#include <linux/netlink.h>
b40826
-#include <linux/rtnetlink.h>
b40826
-
b40826
 #include <not-cancel.h>
b40826
 #include <kernel-features.h>
b40826
 
b40826
+#include "netlinkaccess.h"
b40826
 
b40826
 #ifndef IFA_F_HOMEADDRESS
b40826
 # define IFA_F_HOMEADDRESS 0
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/dl-osinfo.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/dl-osinfo.h
b40826
@@ -17,10 +17,13 @@
b40826
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b40826
    02111-1307 USA.  */
b40826
 
b40826
+#include <errno.h>
b40826
 #include <kernel-features.h>
b40826
 #include <dl-sysdep.h>
b40826
 #include <fcntl.h>
b40826
 #include <stdint.h>
b40826
+#include <hp-timing.h>
b40826
+#include <endian.h>
b40826
 
b40826
 #ifndef MIN
b40826
 # define MIN(a,b) (((a)<(b))?(a):(b))
b40826
@@ -80,6 +83,32 @@ _dl_setup_stack_chk_guard (void *dl_rand
b40826
       unsigned char *p = (unsigned char *) &ret;
b40826
       p[sizeof (ret) - 1] = 255;
b40826
       p[sizeof (ret) - 2] = '\n';
b40826
+#ifdef HP_TIMING_NOW
b40826
+      hp_timing_t hpt;
b40826
+      HP_TIMING_NOW (hpt);
b40826
+      hpt = (hpt & 0xffff) << 8;
b40826
+      ret ^= hpt;
b40826
+#endif
b40826
+      uintptr_t stk;
b40826
+      /* Avoid GCC being too smart.  */
b40826
+      asm ("" : "=r" (stk) : "r" (p));
b40826
+      stk &= 0x7ffff0;
b40826
+#if __BYTE_ORDER == __LITTLE_ENDIAN
b40826
+      stk <<= (__WORDSIZE - 23);
b40826
+#elif __WORDSIZE == 64
b40826
+      stk <<= 31;
b40826
+#endif
b40826
+      ret ^= stk;
b40826
+      /* Avoid GCC being too smart.  */
b40826
+      p = (unsigned char *) &errno;
b40826
+      asm ("" : "=r" (stk) : "r" (p));
b40826
+      stk &= 0x7fff00;
b40826
+#if __BYTE_ORDER == __LITTLE_ENDIAN
b40826
+      stk <<= (__WORDSIZE - 29);
b40826
+#else
b40826
+      stk >>= 8;
b40826
+#endif
b40826
+      ret ^= stk;
b40826
     }
b40826
   else
b40826
 #endif
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/futimesat.c
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/futimesat.c
b40826
@@ -37,14 +37,14 @@ futimesat (fd, file, tvp)
b40826
 {
b40826
   int result;
b40826
 
b40826
+  if (file == NULL)
b40826
+    return __futimes (fd, tvp);
b40826
+
b40826
 #ifdef __NR_futimesat
b40826
 # ifndef __ASSUME_ATFCTS
b40826
   if (__have_atfcts >= 0)
b40826
 # endif
b40826
     {
b40826
-      if (file == NULL)
b40826
-	return __futimes (fd, tvp);
b40826
-
b40826
       result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
b40826
 # ifndef __ASSUME_ATFCTS
b40826
       if (result == -1 && errno == ENOSYS)
b40826
@@ -58,22 +58,7 @@ futimesat (fd, file, tvp)
b40826
 #ifndef __ASSUME_ATFCTS
b40826
   char *buf = NULL;
b40826
 
b40826
-  if (file == NULL)
b40826
-    {
b40826
-      static const char procfd[] = "/proc/self/fd/%d";
b40826
-      /* Buffer for the path name we are going to use.  It consists of
b40826
-	 - the string /proc/self/fd/
b40826
-	 - the file descriptor number.
b40826
-	 The final NUL is included in the sizeof.   A bit of overhead
b40826
-	 due to the format elements compensates for possible negative
b40826
-	 numbers.  */
b40826
-      size_t buflen = sizeof (procfd) + sizeof (int) * 3;
b40826
-      buf = alloca (buflen);
b40826
-
b40826
-      __snprintf (buf, buflen, procfd, fd);
b40826
-      file = buf;
b40826
-    }
b40826
-  else if (fd != AT_FDCWD && file[0] != '/')
b40826
+  if (fd != AT_FDCWD && file[0] != '/')
b40826
     {
b40826
       size_t filelen = strlen (file);
b40826
       if (__builtin_expect (filelen == 0, 0))
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/i386/dl-cache.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/i386/dl-cache.h
b40826
@@ -0,0 +1,59 @@
b40826
+/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
b40826
+   Copyright (C) 2004 Free Software Foundation, Inc.
b40826
+   This file is part of the GNU C Library.
b40826
+
b40826
+   The GNU C Library is free software; you can redistribute it and/or
b40826
+   modify it under the terms of the GNU Lesser General Public
b40826
+   License as published by the Free Software Foundation; either
b40826
+   version 2.1 of the License, or (at your option) any later version.
b40826
+
b40826
+   The GNU C Library is distributed in the hope that it will be useful,
b40826
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
b40826
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b40826
+   Lesser General Public License for more details.
b40826
+
b40826
+   You should have received a copy of the GNU Lesser General Public
b40826
+   License along with the GNU C Library; if not, write to the Free
b40826
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
b40826
+   02111-1307 USA.  */
b40826
+
b40826
+static inline int
b40826
+is_ia64 (void)
b40826
+{
b40826
+  unsigned int fl1, fl2;
b40826
+
b40826
+  /* See if we can use cpuid.  */
b40826
+  __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
b40826
+           "pushl %0; popfl; pushfl; popl %0; popfl"
b40826
+           : "=&r" (fl1), "=&r" (fl2)
b40826
+           : "i" (0x00200000));
b40826
+  if (((fl1 ^ fl2) & 0x00200000) == 0)
b40826
+    return 0;
b40826
+
b40826
+  /* Host supports cpuid.  See if cpuid gives capabilities, try
b40826
+     CPUID(0).  Preserve %ebx and %ecx; cpuid insn clobbers these, we
b40826
+     don't need their CPUID values here, and %ebx may be the PIC
b40826
+     register.  */
b40826
+  __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
b40826
+           : "=a" (fl1) : "0" (0) : "edx", "cc");
b40826
+  if (fl1 == 0)
b40826
+    return 0;
b40826
+
b40826
+  /* Invoke CPUID(1), return %edx; caller can examine bits to
b40826
+     determine what's supported.  */
b40826
+  __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx"
b40826
+           : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc");
b40826
+  return (fl2 & (1 << 30)) != 0;
b40826
+}
b40826
+
b40826
+#define arch_startup(argc, argv) \
b40826
+  do {									\
b40826
+    /* On IA-64, try to execute 64-bit ldconfig if possible.		\
b40826
+       This is because the badly designed /emul/ia32-linux hack		\
b40826
+       will cause 32-bit ldconfig to do all sorts of weird things.  */	\
b40826
+    if (is_ia64 ())							\
b40826
+      execv ("/emul/ia32-linux/../../sbin/ldconfig",			\
b40826
+	     (char *const *) argv);					\
b40826
+  } while (0)
b40826
+
b40826
+#include_next <dl-cache.h>
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/ia64/dl-cache.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/ia64/dl-cache.h
b40826
@@ -22,4 +22,31 @@
b40826
 #define _dl_cache_check_flags(flags) \
b40826
   ((flags) == _DL_CACHE_DEFAULT_ID)
b40826
 
b40826
+#define EMUL_HACK "/emul/ia32-linux"
b40826
+
b40826
+#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE)
b40826
+
b40826
+#define add_arch_dirs(config_file) \
b40826
+  do {							\
b40826
+    int save_verbose = opt_verbose;			\
b40826
+    opt_verbose = 0;					\
b40826
+							\
b40826
+    parse_conf (config_file, EMUL_HACK, true);		\
b40826
+							\
b40826
+    /* Always add the standard search paths.  */	\
b40826
+    add_system_dir (EMUL_HACK SLIBDIR);			\
b40826
+    if (strcmp (SLIBDIR, LIBDIR))			\
b40826
+      add_system_dir (EMUL_HACK LIBDIR);		\
b40826
+							\
b40826
+    char emul_config_file[strlen (config_file)		\
b40826
+			  + sizeof EMUL_HACK];		\
b40826
+    strcpy (mempcpy (emul_config_file, EMUL_HACK,	\
b40826
+		     strlen (EMUL_HACK)), config_file);	\
b40826
+							\
b40826
+    if (! access (emul_config_file, R_OK))		\
b40826
+      parse_conf (emul_config_file, EMUL_HACK, true);	\
b40826
+							\
b40826
+    opt_verbose = save_verbose;				\
b40826
+  } while (0)
b40826
+
b40826
 #include_next <dl-cache.h>
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
b40826
@@ -0,0 +1,5 @@
b40826
+#ifdef IS_IN_ldconfig
b40826
+#include <sysdeps/i386/dl-procinfo.c>
b40826
+#else
b40826
+#include <sysdeps/generic/dl-procinfo.c>
b40826
+#endif
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
b40826
@@ -0,0 +1,5 @@
b40826
+#ifdef IS_IN_ldconfig
b40826
+#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
b40826
+#else
b40826
+#include <sysdeps/generic/dl-procinfo.h>
b40826
+#endif
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
b40826
@@ -1 +1 @@
b40826
-s_^\(RTLDLIST=\)\([^ 	]*\)-ia64\(\.so\.[0-9.]*\)[ 	]*$_\1"\2-ia64\3 \2\3"_
b40826
+s_^\(RTLDLIST=\)\([^ 	]*\)-ia64\(\.so\.[0-9.]*\)[ 	]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/netlinkaccess.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/netlinkaccess.h
b40826
@@ -25,6 +25,24 @@
b40826
 
b40826
 #include <kernel-features.h>
b40826
 
b40826
+#ifndef IFA_MAX
b40826
+/* 2.6.19 kernel headers helpfully removed some macros and
b40826
+   moved lots of stuff into new headers, some of which aren't
b40826
+   included by linux/rtnetlink.h.  */
b40826
+#include <linux/if_addr.h>
b40826
+#endif
b40826
+
b40826
+#ifndef IFA_RTA
b40826
+# define IFA_RTA(r) \
b40826
+  ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
b40826
+# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
b40826
+#endif
b40826
+
b40826
+#ifndef IFLA_RTA
b40826
+# define IFLA_RTA(r) \
b40826
+  ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
b40826
+# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
b40826
+#endif
b40826
 
b40826
 struct netlink_res
b40826
 {
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/paths.h
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/paths.h
b40826
@@ -62,7 +62,7 @@
b40826
 #define	_PATH_TTY	"/dev/tty"
b40826
 #define	_PATH_UNIX	"/boot/vmlinux"
b40826
 #define _PATH_UTMP	"/var/run/utmp"
b40826
-#define	_PATH_VI	"/usr/bin/vi"
b40826
+#define	_PATH_VI	"/bin/vi"
b40826
 #define _PATH_WTMP	"/var/log/wtmp"
b40826
 
b40826
 /* Provide trailing slash, since mostly used for building pathnames. */
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c
b40826
@@ -1 +1 @@
b40826
-#include "../../fxstat.c"
b40826
+#include "../../i386/fxstat.c"
b40826
--- glibc-2.12-2-gc4ccff1/sysdeps/unix/sysv/linux/tcsetattr.c
b40826
+++ glibc-2.12-1/sysdeps/unix/sysv/linux/tcsetattr.c
b40826
@@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios
b40826
 {
b40826
   struct __kernel_termios k_termios;
b40826
   unsigned long int cmd;
b40826
+  int retval;
b40826
 
b40826
   switch (optional_actions)
b40826
     {
b40826
@@ -80,6 +81,35 @@ tcsetattr (fd, optional_actions, termios
b40826
   memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
b40826
 	  __KERNEL_NCCS * sizeof (cc_t));
b40826
 
b40826
-  return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
b40826
+  retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
b40826
+
b40826
+  if (retval == 0 && cmd == TCSETS)
b40826
+    {
b40826
+      /* The Linux kernel has a bug which silently ignore the invalid
b40826
+        c_cflag on pty. We have to check it here. */
b40826
+      int save = errno;
b40826
+      retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
b40826
+      if (retval)
b40826
+       {
b40826
+         /* We cannot verify if the setting is ok. We don't return
b40826
+            an error (?). */
b40826
+         __set_errno (save);
b40826
+         retval = 0;
b40826
+       }
b40826
+      else if ((termios_p->c_cflag & (PARENB | CREAD))
b40826
+              != (k_termios.c_cflag & (PARENB | CREAD))
b40826
+              || ((termios_p->c_cflag & CSIZE)
b40826
+                  && ((termios_p->c_cflag & CSIZE)
b40826
+                      != (k_termios.c_cflag & CSIZE))))
b40826
+       {
b40826
+         /* It looks like the Linux kernel silently changed the
b40826
+            PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
b40826
+            error. */
b40826
+         __set_errno (EINVAL);
b40826
+         retval = -1;
b40826
+       }
b40826
+    }
b40826
+
b40826
+  return retval;
b40826
 }
b40826
 libc_hidden_def (tcsetattr)
b40826
--- glibc-2.12-2-gc4ccff1/timezone/zic.c
b40826
+++ glibc-2.12-1/timezone/zic.c
b40826
@@ -1921,7 +1921,7 @@ const int			zonecount;
b40826
 		if (stdrp != NULL && stdrp->r_hiyear == 2037)
b40826
 			return;
b40826
 	}
b40826
-	if (stdrp == NULL && zp->z_nrules != 0)
b40826
+	if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
b40826
 		return;
b40826
 	abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
b40826
 	doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);