about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-20 18:05:57 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-20 18:05:57 +0000
commit2bf037b4e8e189e910a41744d79404b94235ab8b (patch)
treeec0234c3f56396c982e3ed5a77780423502a111f
parent20a911071d1cfaf7d20d088efe9ede27c5809c09 (diff)
downloadglibc-2bf037b4e8e189e910a41744d79404b94235ab8b.tar.gz
glibc-2bf037b4e8e189e910a41744d79404b94235ab8b.tar.xz
glibc-2bf037b4e8e189e910a41744d79404b94235ab8b.zip
Updated to fedora-glibc-20051220T1751 cvs/fedora-glibc-2_3_90-21
-rw-r--r--ChangeLog24
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in12
-rw-r--r--iconv/gconv_cache.c15
-rw-r--r--iconv/gconv_conf.c4
-rw-r--r--iconv/gconv_open.c5
-rw-r--r--locale/loadlocale.c4
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/sysdeps/sh/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/sh/tls.h15
-rw-r--r--sysdeps/ia64/fpu/libm-test-ulps86
-rw-r--r--sysdeps/posix/Dist1
-rw-r--r--sysdeps/posix/gai_strerror-strs.h17
-rw-r--r--sysdeps/posix/gai_strerror.c70
-rw-r--r--sysdeps/posix/getaddrinfo.c5
-rw-r--r--sysdeps/sh/sh3/__longjmp.S12
-rw-r--r--sysdeps/sh/sh3/setjmp.S18
-rw-r--r--sysdeps/sh/sh4/__longjmp.S12
-rw-r--r--sysdeps/sh/sh4/setjmp.S18
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep.h24
-rw-r--r--sysdeps/unix/sysv/linux/time.c10
21 files changed, 273 insertions, 91 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a443f4ad2..e5003fb02b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2005-12-20  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih): Mark as const.
+	* locale/loadlocale.c (_nl_value_types): Likewise.
+	* iconv/gconv_conf.c (builtin_aliases): Likewise.
+	* iconv/gconv_open.c (internal_trans_names): Likewise.
+
+2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+	* sysdeps/unix/sysv/linux/sh/sysdep.h: Include tls.h.
+	(PTR_MANGLE, PTR_DEMANGLE): Define.
+	(SYSCALL_ERROR_HANDLER): Fix typo.
+	* sysdeps/sh/sh4/__longjmp.S: Use PTR_DEMANGLE if defined.
+	* sysdeps/sh/sh3/__longjmp.S: Likewise.
+	* sysdeps/sh/sh4/setjmp.S: Use PTR_MANGLE if defined.
+	* sysdeps/sh/sh3/setjmp.S: Likewise.
+
+2005-12-20  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/ia64/fpu/libm-test-ulps: Update for GCC 4.1 prerelease.
+
+	* sysdeps/unix/sysv/linux/time.c: If __NR_time is not defined,
+	use sysdeps/unix/time.c implementation.
+
 2005-12-20  Jakub Jelinek  <jakub@redhat.com>
 
 	* malloc/mtrace.c (__libc_malloc, __libc_free, __libc_realloc,
diff --git a/fedora/branch.mk b/fedora/branch.mk
index a8ee5fb21f..e40e93094d 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2005-12-20 10:28 UTC
-fedora-sync-tag := fedora-glibc-20051220T1028
+fedora-sync-date := 2005-12-20 17:51 UTC
+fedora-sync-tag := fedora-glibc-20051220T1751
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index 212376079e..ea7640684d 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 20
+%define glibcrelease 21
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define prelinkarches noarch
 %define xenarches i686 athlon
@@ -865,8 +865,8 @@ for f in `find $RPM_BUILD_ROOT/%{_lib} -type l`; do
 done
 
 echo Sorting source file lists. Might take a while...
-xargs -0 -n 1 echo < $sf | LC_ALL=C grep -v '/<internal>$' | LC_ALL=C sort -u > $sf.sorted
-xargs -0 -n 1 echo < $csf | LC_ALL=C grep -v '/<internal>$' | LC_ALL=C sort -u > $csf.sorted
+xargs -0 -n 1 echo < $sf | LC_ALL=C grep -v '/<internal>$\|\.gperf$' | LC_ALL=C sort -u > $sf.sorted
+xargs -0 -n 1 echo < $csf | LC_ALL=C grep -v '/<internal>$\|\.gperf$' | LC_ALL=C sort -u > $csf.sorted
 mkdir -p $RPM_BUILD_ROOT/usr/src/debug
 cat $sf.sorted $csf.sorted \
   | (cd $RPM_BUILD_DIR; LC_ALL=C sort -u | cpio -pdm ${RPM_BUILD_ROOT}/usr/src/debug)
@@ -1074,11 +1074,15 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-21
+- update from CVS
+  - fix pointer (de)mangling in gconv_cache.c
+
 * Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-20
 - update from CVS
   - time ((void *) 1) should segfault, not return -EFAULT (#174856, BZ#1952)
   - fix errlist generation
-- update ulps for GCC 4.1
+- update ulps for GCC 4.1 on IA-64
 
 * Mon Dec 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-19
 - update from CVS
diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c
index 9b695c377d..9a8a20816c 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -1,5 +1,5 @@
 /* Cache handling for iconv modules.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
 
@@ -209,7 +209,18 @@ find_module (const char *directory, const char *filename,
 
       /* Call the init function.  */
       if (result->__init_fct != NULL)
-	status = DL_CALL_FCT (result->__init_fct, (result));
+	{
+	  __gconv_init_fct init_fct = result->__init_fct;
+#ifdef PTR_DEMANGLE
+	  PTR_DEMANGLE (init_fct);
+#endif
+	  status = DL_CALL_FCT (init_fct, (result));
+
+#ifdef PTR_MANGLE
+	  if (result->__btowc_fct != NULL)
+	    PTR_MANGLE (result->__btowc_fct);
+#endif
+	}
     }
 
   return status;
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 858d40998b..37179518ba 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -1,5 +1,5 @@
 /* Handle configuration data.
-   Copyright (C) 1997,98,99,2000,2001,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -78,7 +78,7 @@ static struct gconv_module builtin_modules[] =
 #undef BUILTIN_ALIAS
 };
 
-static const char *builtin_aliases[] =
+static const char *const builtin_aliases[] =
 {
 #define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, BtowcFct, \
 			       MinF, MaxF, MinT, MaxT)
diff --git a/iconv/gconv_open.c b/iconv/gconv_open.c
index b23ab44e4e..95f3203394 100644
--- a/iconv/gconv_open.c
+++ b/iconv/gconv_open.c
@@ -71,7 +71,8 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
 		{
 		  /* It's the builtin transliteration handling.  We only
 		     support it for working on the internal encoding.  */
-		  static const char *internal_trans_names[1] = { "INTERNAL" };
+		  static const char *const internal_trans_names[1]
+		    = { "INTERNAL" };
 		  struct trans_struct *lastp = NULL;
 		  struct trans_struct *runp;
 
@@ -90,7 +91,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
 
 		      /* We leave the `name' field zero to signal that
 			 this is an internal transliteration step.  */
-		      newp->csnames = internal_trans_names;
+		      newp->csnames = (const char **) internal_trans_names;
 		      newp->ncsnames = 1;
 		      newp->trans_fct = __gconv_transliterate;
 
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 11ece50a22..2a5935087c 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
 /* Functions to read locale data files.
-   Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -52,7 +52,7 @@ static const enum value_type _nl_value_type_##category[] = { NO_PAREN items };
 #include "categories.def"
 #undef DEFINE_CATEGORY
 
-static const enum value_type *_nl_value_types[] =
+static const enum value_type *const _nl_value_types[] =
 {
 #define DEFINE_CATEGORY(category, category_name, items, a) \
   [category] = _nl_value_type_##category,
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 2b42d258c9..cc4fc0ec5d 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+	* sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
+	* sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
+	(THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
+	THREAD_COPY_POINTER_GUARD): Define.
+
 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
diff --git a/nptl/sysdeps/sh/tcb-offsets.sym b/nptl/sysdeps/sh/tcb-offsets.sym
index 539789a817..4ad866335b 100644
--- a/nptl/sysdeps/sh/tcb-offsets.sym
+++ b/nptl/sysdeps/sh/tcb-offsets.sym
@@ -9,3 +9,4 @@ CLEANUP_JMP_BUF		offsetof (struct pthread, cleanup_jmp_buf)
 MULTIPLE_THREADS_OFFSET	offsetof (struct pthread, header.multiple_threads)
 TLS_PRE_TCB_SIZE	sizeof (struct pthread)
 MUTEX_FUTEX		offsetof (pthread_mutex_t, __data.__lock)
+POINTER_GUARD		offsetof (tcbhead_t, pointer_guard)
diff --git a/nptl/sysdeps/sh/tls.h b/nptl/sysdeps/sh/tls.h
index e883bae993..49d105518a 100644
--- a/nptl/sysdeps/sh/tls.h
+++ b/nptl/sysdeps/sh/tls.h
@@ -41,7 +41,7 @@ typedef union dtv
 typedef struct
 {
   dtv_t *dtv;
-  void *private;
+  uintptr_t pointer_guard;
 } tcbhead_t;
 
 # define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -140,6 +140,19 @@ typedef struct
 # define THREAD_SETMEM_NC(descr, member, idx, value) \
     descr->member[idx] = (value)
 
+#define THREAD_GET_POINTER_GUARD() \
+  ({ tcbhead_t *__tcbp;							      \
+     __asm __volatile ("stc gbr,%0" : "=r" (__tcbp));			      \
+     __tcbp->pointer_guard;})
+ #define THREAD_SET_POINTER_GUARD(value) \
+  ({ tcbhead_t *__tcbp;							      \
+     __asm __volatile ("stc gbr,%0" : "=r" (__tcbp));			      \
+     __tcbp->pointer_guard = (value);})
+#define THREAD_COPY_POINTER_GUARD(descr) \
+  ({ tcbhead_t *__tcbp;							      \
+     __asm __volatile ("stc gbr,%0" : "=r" (__tcbp));			      \
+     ((tcbhead_t *) (descr + 1))->pointer_guard	= __tcbp->pointer_guard;})
+
 #endif /* __ASSEMBLER__ */
 
 #endif	/* tls.h */
diff --git a/sysdeps/ia64/fpu/libm-test-ulps b/sysdeps/ia64/fpu/libm-test-ulps
index 2f67d213b4..d0e801ac11 100644
--- a/sysdeps/ia64/fpu/libm-test-ulps
+++ b/sysdeps/ia64/fpu/libm-test-ulps
@@ -253,8 +253,8 @@ double: 1
 float: 4
 idouble: 1
 ifloat: 4
-ildouble: 1
-ldouble: 1
+ildouble: 6
+ldouble: 6
 Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
 ildouble: 1
 ldouble: 1
@@ -451,21 +451,26 @@ ifloat: 1
 # j0
 Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 Test "j0 (10.0) == -0.245935764451348335197760862485328754":
-double: 2
+double: 3
 float: 1
-idouble: 2
+idouble: 3
 ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 Test "j0 (8.0) == 0.171650807137553906090869407851972001":
@@ -488,21 +493,26 @@ idouble: 1
 # jn
 Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
-double: 2
+double: 3
 float: 1
-idouble: 2
+idouble: 3
 ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 2
 ldouble: 2
 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
@@ -543,8 +553,8 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
-float: 3
-ifloat: 3
+float: 4
+ifloat: 4
 ildouble: 1
 ldouble: 1
 Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083":
@@ -563,16 +573,16 @@ ildouble: 1
 ldouble: 1
 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
 double: 3
-float: 1
+float: 2
 idouble: 3
-ifloat: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
@@ -685,6 +695,8 @@ ldouble: 1
 
 # y1
 Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
 ildouble: 1
 ldouble: 1
 Test "y1 (10.0) == 0.249015424206953883923283474663222803":
@@ -692,6 +704,11 @@ double: 3
 float: 1
 idouble: 3
 ifloat: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323";
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "y1 (2.0) == -0.107032431540937546888370772277476637":
 double: 1
 float: 1
@@ -737,6 +754,8 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
 ildouble: 1
 ldouble: 1
 Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
@@ -744,6 +763,11 @@ double: 3
 float: 1
 idouble: 3
 ifloat: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323";
+float: 1
+ifloat: 1
+ldouble: 1
+ildouble: 1
 Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
 double: 1
 float: 1
@@ -757,6 +781,8 @@ float: 2
 idouble: 1
 ifloat: 2
 Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
 ildouble: 2
 ldouble: 2
 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
@@ -769,13 +795,17 @@ float: 2
 ifloat: 2
 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
 double: 2
+float: 2
 idouble: 2
+ifloat: 2
 Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
 double: 3
 float: 1
 idouble: 3
 ifloat: 1
 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
 ildouble: 1
 ldouble: 1
 Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
@@ -926,8 +956,8 @@ double: 2
 float: 5
 idouble: 2
 ifloat: 5
-ildouble: 3
-ldouble: 3
+ildouble: 6
+ldouble: 6
 
 Function: Imaginary part of "cpow":
 double: 2
@@ -1028,10 +1058,10 @@ float: 1
 ifloat: 1
 
 Function: "j0":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
 ildouble: 2
 ldouble: 2
 
@@ -1045,9 +1075,9 @@ ldouble: 1
 
 Function: "jn":
 double: 3
-float: 3
+float: 4
 idouble: 3
-ifloat: 3
+ifloat: 4
 ildouble: 2
 ldouble: 2
 
diff --git a/sysdeps/posix/Dist b/sysdeps/posix/Dist
new file mode 100644
index 0000000000..7f0fb706a7
--- /dev/null
+++ b/sysdeps/posix/Dist
@@ -0,0 +1 @@
+gai_strerror-strs.h
diff --git a/sysdeps/posix/gai_strerror-strs.h b/sysdeps/posix/gai_strerror-strs.h
new file mode 100644
index 0000000000..19040a5138
--- /dev/null
+++ b/sysdeps/posix/gai_strerror-strs.h
@@ -0,0 +1,17 @@
+_S(EAI_ADDRFAMILY, N_("Address family for hostname not supported"))
+_S(EAI_AGAIN, N_("Temporary failure in name resolution"))
+_S(EAI_BADFLAGS, N_("Bad value for ai_flags"))
+_S(EAI_FAIL, N_("Non-recoverable failure in name resolution"))
+_S(EAI_FAMILY, N_("ai_family not supported"))
+_S(EAI_MEMORY, N_("Memory allocation failure"))
+_S(EAI_NODATA, N_("No address associated with hostname"))
+_S(EAI_NONAME, N_("Name or service not known"))
+_S(EAI_SERVICE, N_("Servname not supported for ai_socktype"))
+_S(EAI_SOCKTYPE, N_("ai_socktype not supported"))
+_S(EAI_SYSTEM, N_("System error"))
+_S(EAI_INPROGRESS, N_("Processing request in progress"))
+_S(EAI_CANCELED, N_("Request canceled"))
+_S(EAI_NOTCANCELED, N_("Request not canceled"))
+_S(EAI_ALLDONE, N_("All requests done"))
+_S(EAI_INTR, N_("Interrupted by a signal"))
+_S(EAI_IDN_ENCODE, N_("Parameter string not correctly encoded"))
diff --git a/sysdeps/posix/gai_strerror.c b/sysdeps/posix/gai_strerror.c
index e2835a5674..cc13dd4dab 100644
--- a/sysdeps/posix/gai_strerror.c
+++ b/sysdeps/posix/gai_strerror.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
 
@@ -17,44 +17,54 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <stdio.h>
-#include <netdb.h>
 #include <libintl.h>
+#include <netdb.h>
+#include <stdint.h>
+#include <stdio.h>
+
 
-static struct
+#define MSGSTRFIELD(line) MSGSTRFIELD1 (line)
+#define MSGSTRFIELD1(line) str##line
+static const union msgstr_t
+{
+  struct
   {
-    int code;
-    const char *msg;
-  }
-values[] =
+#define _S(n, s) char MSGSTRFIELD(__LINE__)[sizeof (s)];
+#include "gai_strerror-strs.h"
+#undef _S
+  };
+  char str[0];
+} msgstr =
   {
-    { EAI_ADDRFAMILY, N_("Address family for hostname not supported") },
-    { EAI_AGAIN, N_("Temporary failure in name resolution") },
-    { EAI_BADFLAGS, N_("Bad value for ai_flags") },
-    { EAI_FAIL, N_("Non-recoverable failure in name resolution") },
-    { EAI_FAMILY, N_("ai_family not supported") },
-    { EAI_MEMORY, N_("Memory allocation failure") },
-    { EAI_NODATA, N_("No address associated with hostname") },
-    { EAI_NONAME, N_("Name or service not known") },
-    { EAI_SERVICE, N_("Servname not supported for ai_socktype") },
-    { EAI_SOCKTYPE, N_("ai_socktype not supported") },
-    { EAI_SYSTEM, N_("System error") },
-    { EAI_INPROGRESS, N_("Processing request in progress") },
-    { EAI_CANCELED, N_("Request canceled") },
-    { EAI_NOTCANCELED, N_("Request not canceled") },
-    { EAI_ALLDONE, N_("All requests done") },
-    { EAI_INTR, N_("Interrupted by a signal") },
-    { EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") }
+    {
+#define _S(n, s) s,
+#include "gai_strerror-strs.h"
+#undef _S
+    }
   };
+static const struct
+{
+  int16_t code;
+  uint16_t idx;
+} msgidx[] =
+  {
+#define _S(n, s) { n, offsetof (union msgstr_t, MSGSTRFIELD (__LINE__)) },
+#include "gai_strerror-strs.h"
+#undef _S
+  };
+
 
 const char *
 gai_strerror (int code)
 {
-  size_t i;
-  for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
-    if (values[i].code == code)
-      return _(values[i].msg);
+  const char *result = "Unknown error";
+  for (size_t i = 0; i < sizeof (msgidx) / sizeof (msgidx[0]); ++i)
+    if (msgidx[i].code == code)
+      {
+	result = msgstr.str + msgidx[i].idx;
+	break;
+      }
 
-  return _("Unknown error");
+  return _(result);
 }
 libc_hidden_def (gai_strerror)
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b9819bfc0a..46c66a8f7e 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1098,7 +1098,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
   return 0;
 }
 
-static struct gaih gaih[] =
+static const struct gaih gaih[] =
   {
     { PF_INET6, gaih_inet },
     { PF_INET, gaih_inet },
@@ -1461,7 +1461,8 @@ getaddrinfo (const char *name, const char *service,
   int i = 0, j = 0, last_i = 0;
   int nresults = 0;
   struct addrinfo *p = NULL, **end;
-  struct gaih *g = gaih, *pg = NULL;
+  const struct gaih *g = gaih;
+  const struct gaih *pg = NULL;
   struct gaih_service gaih_service, *pservice;
   struct addrinfo local_hints;
 
diff --git a/sysdeps/sh/sh3/__longjmp.S b/sysdeps/sh/sh3/__longjmp.S
index cd78cfe516..08d39d02dd 100644
--- a/sysdeps/sh/sh3/__longjmp.S
+++ b/sysdeps/sh/sh3/__longjmp.S
@@ -1,5 +1,5 @@
 /* longjmp for SH.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,13 +32,19 @@ ENTRY (__longjmp)
 	mov.l	@r4+, r12
 	mov.l	@r4+, r13
 	mov.l	@r4+, r14
-	mov.l	@r4+, r15
 	mov	r5, r0		/* get the return value in place */
 	tst	r0, r0
 	bf.s	1f
-	 lds.l	@r4+, pr
+	 mov.l	@r4+, r15
 	mov	#1,r0		/* can't let setjmp() return zero! */
 1:
+#ifdef PTR_DEMANGLE
+	mov.l	@r4+, r2
+	PTR_DEMANGLE (r2)
+	lds	r2, pr
+#else
+	lds.l	@r4+, pr
+#endif
 	rts
 	 ldc.l	@r4+, gbr
 END (__longjmp)
diff --git a/sysdeps/sh/sh3/setjmp.S b/sysdeps/sh/sh3/setjmp.S
index 819543a08c..f60ca874cf 100644
--- a/sysdeps/sh/sh3/setjmp.S
+++ b/sysdeps/sh/sh3/setjmp.S
@@ -1,5 +1,5 @@
 /* setjmp for SH3.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,13 @@ ENTRY (__sigsetjmp)
 	/* Save registers */
 	add	#(JB_SIZE - 4 * 5), r4
 	stc.l	gbr, @-r4
+#ifdef PTR_MANGLE
+	sts	pr, r2
+	PTR_MANGLE (r2)
+	mov.l	r2, @-r4
+#else
 	sts.l	pr, @-r4
+#endif
 	mov.l	r15, @-r4
 	mov.l	r14, @-r4
 	mov.l	r13, @-r4
@@ -36,8 +42,13 @@ ENTRY (__sigsetjmp)
 	mov.l	r9, @-r4
 	mov.l	r8, @-r4
 
+#if defined NOT_IN_libc && defined IS_IN_rtld
+	/* In ld.so we never save the signal mask.  */
+	rts
+	 mov	#0, r0
+#else
 	/* Make a tail call to __sigjmp_save; it takes the same args.  */
-#ifdef SHARED
+# ifdef SHARED
 	mov.l	1f, r1
 	mova	1f, r0
 	bra	2f
@@ -53,12 +64,13 @@ ENTRY (__sigsetjmp)
 	.align	2
 .L1:
 	.long	C_SYMBOL_NAME(__sigjmp_save@GOT)
-#else
+# else
 	mov.l	.L1, r1
 	jmp	@r1
 	 nop
 	.align	2
 .L1:
 	.long	C_SYMBOL_NAME(__sigjmp_save)
+# endif
 #endif
 END (__sigsetjmp)
diff --git a/sysdeps/sh/sh4/__longjmp.S b/sysdeps/sh/sh4/__longjmp.S
index 7cd83bfcc4..cc525952f7 100644
--- a/sysdeps/sh/sh4/__longjmp.S
+++ b/sysdeps/sh/sh4/__longjmp.S
@@ -1,5 +1,5 @@
 /* longjmp for SH.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,13 +32,19 @@ ENTRY (__longjmp)
 	mov.l	@r4+, r12
 	mov.l	@r4+, r13
 	mov.l	@r4+, r14
-	mov.l	@r4+, r15
 	mov	r5, r0		/* get the return value in place */
 	tst	r0, r0
 	bf.s	1f
-	 lds.l	@r4+, pr
+	 mov.l	@r4+, r15
 	mov	#1,r0		/* can't let setjmp() return zero! */
 1:
+#ifdef PTR_DEMANGLE
+	mov.l	@r4+, r2
+	PTR_DEMANGLE (r2)
+	lds	r2, pr
+#else
+	lds.l	@r4+, pr
+#endif
 	ldc.l	@r4+, gbr
 	lds.l	@r4+, fpscr
 	fmov.s	@r4+, fr12
diff --git a/sysdeps/sh/sh4/setjmp.S b/sysdeps/sh/sh4/setjmp.S
index c7b0aed0e7..b8853496f1 100644
--- a/sysdeps/sh/sh4/setjmp.S
+++ b/sysdeps/sh/sh4/setjmp.S
@@ -1,5 +1,5 @@
 /* setjmp for SH4.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,13 @@ ENTRY (__sigsetjmp)
 	fmov.s	fr12, @-r4
 	sts.l	fpscr, @-r4
 	stc.l	gbr, @-r4
+#ifdef PTR_MANGLE
+	sts	pr, r2
+	PTR_MANGLE (r2)
+	mov.l	r2, @-r4
+#else
 	sts.l	pr, @-r4
+#endif
 	mov.l	r15, @-r4
 	mov.l	r14, @-r4
 	mov.l	r13, @-r4
@@ -41,8 +47,13 @@ ENTRY (__sigsetjmp)
 	mov.l	r9, @-r4
 	mov.l	r8, @-r4
 
+#if defined NOT_IN_libc && defined IS_IN_rtld
+	/* In ld.so we never save the signal mask.  */
+	rts
+	 mov	#0, r0
+#else
 	/* Make a tail call to __sigjmp_save; it takes the same args.  */
-#ifdef SHARED
+# ifdef SHARED
 	mov.l	1f, r1
 	mova	1f, r0
 	bra	2f
@@ -58,12 +69,13 @@ ENTRY (__sigsetjmp)
 	.align	2
 .L1:
 	.long	C_SYMBOL_NAME(__sigjmp_save@GOT)
-#else
+# else
 	mov.l	.L1, r1
 	jmp	@r1
 	 nop
 	.align	2
 .L1:
 	.long	C_SYMBOL_NAME(__sigjmp_save)
+# endif
 #endif
 END (__sigsetjmp)
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index d56ec454f9..1a412e53db 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004
-	Free Software Foundation, Inc.
+/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,
+   2005	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
@@ -24,6 +24,7 @@
 
 /* There is some commonality.  */
 #include <sysdeps/unix/sh/sysdep.h>
+#include <tls.h>
 
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
@@ -104,7 +105,7 @@
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
-	mov.l r1,@(r0,r12)
+	mov.l r1,@(r0,r12); \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \
 	.align 2; \
@@ -359,4 +360,21 @@
 
 #endif	/* __ASSEMBLER__ */
 
+/* Pointer mangling support.  */
+#if defined NOT_IN_libc && defined IS_IN_rtld
+/* We cannot use the thread descriptor because in ld.so we use setjmp
+   earlier than the descriptor is initialized.  Using a global variable
+   is too complicated here since we have no PC-relative addressing mode.  */
+#else
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(reg) \
+     stc gbr,r1; mov.l @(POINTER_GUARD,r1),r1; xor r1,reg
+#  define PTR_DEMANGLE(reg)	PTR_MANGLE (reg)
+# else
+#  define PTR_MANGLE(var) \
+     (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
+#  define PTR_DEMANGLE(var)	PTR_MANGLE (var)
+# endif
+#endif
+
 #endif /* linux/sh/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time.c
index 1698c91d7d..83667906dd 100644
--- a/sysdeps/unix/sysv/linux/time.c
+++ b/sysdeps/unix/sysv/linux/time.c
@@ -21,9 +21,11 @@
 
 #include <sysdep.h>
 
+#ifdef __NR_time
 
 time_t
-time (time_t *t)
+time (t)
+     time_t *t;
 {
   INTERNAL_SYSCALL_DECL (err);
   time_t res = INTERNAL_SYSCALL (time, err, 1, NULL);
@@ -33,3 +35,9 @@ time (time_t *t)
   return res;
 }
 libc_hidden_def (time)
+
+#else
+
+# include <sysdeps/unix/time.c>
+
+#endif