[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r3068 - in /fsf/trunk/libc: ./ elf/ include/ scripts/data/ stdlib/ sysdeps/ieee754/ldbl-128ibm/ sysdeps/unix/sysv/linux/ sys...



Author: eglibc
Date: Tue Aug  7 00:03:16 2007
New Revision: 3068

Log:
Import glibc-mainline for 2007-08-07

Added:
    fsf/trunk/libc/scripts/data/localplt-generic.data
    fsf/trunk/libc/scripts/data/localplt-powerpc-linux-gnu.data
Removed:
    fsf/trunk/libc/scripts/data/localplt-x86_64-linux-gnu.data
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/Makefile
    fsf/trunk/libc/include/stdlib.h
    fsf/trunk/libc/include/wchar.h
    fsf/trunk/libc/stdlib/strtod.c
    fsf/trunk/libc/stdlib/strtod_l.c
    fsf/trunk/libc/stdlib/strtol.c
    fsf/trunk/libc/stdlib/strtol_l.c
    fsf/trunk/libc/stdlib/strtold.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h
    fsf/trunk/libc/sysdeps/wordsize-64/strtol.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Aug  7 00:03:16 2007
@@ -1,3 +1,29 @@
+2007-08-06  Roland McGrath  <roland@xxxxxxxxxx>
+
+	* include/stdlib.h: Add libc_hidden_proto for strto*, __strto*_l.
+	Remove __strto*_l inlines.
+	* include/wchar.h: Add libc_hidden_proto for wcsto*, __wcsto*_l.
+	* stdlib/strtod.c: Add libc_hidden_def.
+	* stdlib/strtod_l.c: Likewise.
+	* stdlib/strtold.c [__LONG_DOUBLE_MATH_OPTIONAL]: Add libc_hidden_proto
+	for __new_strtold and __new_wcstold.
+	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c: Add libc_hidden_proto for
+	__STRTOF, STRTOF.
+	* stdlib/strtol.c: Add libc_hidden_def.
+	* stdlib/strtol_l.c: Likewise.
+	* sysdeps/wordsize-64/strtol.c: Add libc_hidden_ver for strtoll and
+	strtoq.
+
+	* scripts/data/localplt-powerpc-linux-gnu.data: New file.
+
+	* scripts/data/localplt-x86_64-linux-gnu.data: File renamed to ...
+	* scripts/data/localplt-generic.data: ... here.
+	* elf/Makefile (check-data): Get generic file if no other.
+	($(objpfx)check-localplt.out): Make target unconditional.
+
+	* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion):
+	Use ElfW(Nhdr).
+
 2007-08-05  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* po/zh_CN.po: Updated translation from translation team.

Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Tue Aug  7 00:03:16 2007
@@ -837,27 +837,25 @@
 $(objpfx)tst-dlmodcount.out: $(test-modules)
 
 check-data := $(firstword $(wildcard \
-	        $(foreach M,$(config-machine) $(base-machine),\
-			  ../scripts/data/localplt-$M-$(config-os).data)))
-ifneq (,$(check-data))
+	        $(patsubst %,../scripts/data/localplt-%.data,\
+			   $(addsuffix -$(config-os),\
+			   	       $(config-machine) $(base-machine))\
+			   generic)))
 tests: $(objpfx)check-localplt.out
 
 ifeq ($(have-thread-library),yes)
 thread-dso := $(filter-out %_nonshared.a, $(shared-thread-library))
 endif
 
-$(objpfx)check-localplt.out: $(objpfx)check-localplt $(common-objpfx)libc.so \
-			     $(common-objpfx)math/libm.so $(thread-dso) \
-			     $(common-objpfx)rt/librt.so \
-			     $(common-objpfx)dlfcn/libdl.so \
+$(objpfx)check-localplt.out: $(objpfx)check-localplt \
+			     $(common-objpfx)libc.so \
+ 		    	     $(common-objpfx)math/libm.so $(thread-dso) \
+ 		    	     $(common-objpfx)rt/librt.so \
+ 		    	     $(common-objpfx)dlfcn/libdl.so \
 			     $(check-data)
-	$(objpfx)check-localplt $(common-objpfx)libc.so \
-				$(common-objpfx)math/libm.so $(thread-dso) \
-				$(common-objpfx)rt/librt.so \
-				$(common-objpfx)dlfcn/libdl.so | \
+	$(dir $<)$(notdir $<) $(filter-out $< $(check-data),$^) | \
 	  LC_ALL=C sort | \
 	  diff -u $(check-data) - > $@
-endif
 endif
 
 $(objpfx)tst-dlopenrpathmod.so: $(libdl)

Modified: fsf/trunk/libc/include/stdlib.h
==============================================================================
--- fsf/trunk/libc/include/stdlib.h (original)
+++ fsf/trunk/libc/include/stdlib.h Tue Aug  7 00:03:16 2007
@@ -19,6 +19,13 @@
 extern __typeof (strtod_l) __strtod_l;
 extern __typeof (strtof_l) __strtof_l;
 extern __typeof (strtold_l) __strtold_l;
+libc_hidden_proto (__strtol_l)
+libc_hidden_proto (__strtoul_l)
+libc_hidden_proto (__strtoll_l)
+libc_hidden_proto (__strtoull_l)
+libc_hidden_proto (__strtod_l)
+libc_hidden_proto (__strtof_l)
+libc_hidden_proto (__strtold_l)
 
 libc_hidden_proto (exit)
 libc_hidden_proto (abort)
@@ -170,48 +177,13 @@
 libc_hidden_proto (____strtoul_l_internal)
 libc_hidden_proto (____strtoull_l_internal)
 
-extern __inline double
-__NTH (__strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
-		   __locale_t __loc))
-{
-  return ____strtod_l_internal (__nptr, __endptr, 0, __loc);
-}
-extern __inline long int
-__NTH (__strtol_l (__const char *__restrict __nptr, char **__restrict __endptr,
-		   int __base, __locale_t __loc))
-{
-  return ____strtol_l_internal (__nptr, __endptr, __base, 0, __loc);
-}
-extern __inline unsigned long int
-__NTH (__strtoul_l (__const char *__restrict __nptr,
-		    char **__restrict __endptr, int __base, __locale_t __loc))
-{
-  return ____strtoul_l_internal (__nptr, __endptr, __base, 0, __loc);
-}
-extern __inline float
-__NTH (__strtof_l (__const char *__restrict __nptr, char **__restrict __endptr,
-		   __locale_t __loc))
-{
-  return ____strtof_l_internal (__nptr, __endptr, 0, __loc);
-}
-extern __inline long double
-__NTH (__strtold_l (__const char *__restrict __nptr,
-		    char **__restrict __endptr, __locale_t __loc))
-{
-  return ____strtold_l_internal (__nptr, __endptr, 0, __loc);
-}
-__extension__ extern __inline long long int
-__NTH (__strtoll_l (__const char *__restrict __nptr,
-		    char **__restrict __endptr, int __base, __locale_t __loc))
-{
-  return ____strtoll_l_internal (__nptr, __endptr, __base, 0, __loc);
-}
-__extension__ extern __inline unsigned long long int
-__NTH (__strtoull_l (__const char * __restrict __nptr,
-		     char **__restrict __endptr, int __base, __locale_t __loc))
-{
-  return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
-}
+libc_hidden_proto (strtof)
+libc_hidden_proto (strtod)
+libc_hidden_proto (strtold)
+libc_hidden_proto (strtol)
+libc_hidden_proto (strtoll)
+libc_hidden_proto (strtoul)
+libc_hidden_proto (strtoull)
 
 extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
 		     int *__restrict __sign);

Modified: fsf/trunk/libc/include/wchar.h
==============================================================================
--- fsf/trunk/libc/include/wchar.h (original)
+++ fsf/trunk/libc/include/wchar.h Tue Aug  7 00:03:16 2007
@@ -15,6 +15,13 @@
 extern __typeof (wcstof_l) __wcstof_l;
 extern __typeof (wcstold_l) __wcstold_l;
 extern __typeof (wcsftime_l) __wcsftime_l;
+libc_hidden_proto (__wcstol_l)
+libc_hidden_proto (__wcstoul_l)
+libc_hidden_proto (__wcstoll_l)
+libc_hidden_proto (__wcstoull_l)
+libc_hidden_proto (__wcstod_l)
+libc_hidden_proto (__wcstof_l)
+libc_hidden_proto (__wcstold_l)
 libc_hidden_proto (__wcsftime_l)
 
 
@@ -51,6 +58,13 @@
 libc_hidden_proto (__wcstoll_internal)
 libc_hidden_proto (__wcstoul_internal)
 libc_hidden_proto (__wcstoull_internal)
+libc_hidden_proto (wcstof)
+libc_hidden_proto (wcstod)
+libc_hidden_proto (wcstold)
+libc_hidden_proto (wcstol)
+libc_hidden_proto (wcstoll)
+libc_hidden_proto (wcstoul)
+libc_hidden_proto (wcstoull)
 
 libc_hidden_proto (__wcscasecmp_l)
 libc_hidden_proto (__wcsncasecmp_l)

Added: fsf/trunk/libc/scripts/data/localplt-generic.data
==============================================================================
--- fsf/trunk/libc/scripts/data/localplt-generic.data (added)
+++ fsf/trunk/libc/scripts/data/localplt-generic.data Tue Aug  7 00:03:16 2007
@@ -1,0 +1,6 @@
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr

Added: fsf/trunk/libc/scripts/data/localplt-powerpc-linux-gnu.data
==============================================================================
--- fsf/trunk/libc/scripts/data/localplt-powerpc-linux-gnu.data (added)
+++ fsf/trunk/libc/scripts/data/localplt-powerpc-linux-gnu.data Tue Aug  7 00:03:16 2007
@@ -1,0 +1,7 @@
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr

Modified: fsf/trunk/libc/stdlib/strtod.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtod.c (original)
+++ fsf/trunk/libc/stdlib/strtod.c Tue Aug  7 00:03:16 2007
@@ -1,6 +1,6 @@
 /* Read decimal floating point numbers.
    This file is part of the GNU C Library.
-   Copyright (C) 1995-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002,2003,2004,2006,2007 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -69,6 +69,9 @@
 {
   return INTERNAL(STRTOF_L) (nptr, endptr, 0, _NL_CURRENT_LOCALE);
 }
+#if defined _LIBC
+libc_hidden_def (STRTOF)
+#endif
 
 #ifdef LONG_DOUBLE_COMPAT
 # if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)

Modified: fsf/trunk/libc/stdlib/strtod_l.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtod_l.c (original)
+++ fsf/trunk/libc/stdlib/strtod_l.c Tue Aug  7 00:03:16 2007
@@ -1599,6 +1599,10 @@
 {
   return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
 }
+#if defined _LIBC
+libc_hidden_def (__STRTOF)
+libc_hidden_ver (__STRTOF, STRTOF)
+#endif
 weak_alias (__STRTOF, STRTOF)
 
 #ifdef LONG_DOUBLE_COMPAT

Modified: fsf/trunk/libc/stdlib/strtol.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtol.c (original)
+++ fsf/trunk/libc/stdlib/strtol.c Tue Aug  7 00:03:16 2007
@@ -1,5 +1,5 @@
 /* Convert string representation of a number into an integer value.
-   Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001,2002,2003,2004
+   Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001,2002,2003,2004,2007
    	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -109,3 +109,4 @@
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, _NL_CURRENT_LOCALE);
 }
+libc_hidden_def (strtol)

Modified: fsf/trunk/libc/stdlib/strtol_l.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtol_l.c (original)
+++ fsf/trunk/libc/stdlib/strtol_l.c Tue Aug  7 00:03:16 2007
@@ -1,5 +1,5 @@
 /* Convert string representing a number to integer value, using given locale.
-   Copyright (C) 1997, 2002, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
 
@@ -561,4 +561,5 @@
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
 }
+libc_hidden_def (__strtol_l)
 weak_alias (__strtol_l, strtol_l)

Modified: fsf/trunk/libc/stdlib/strtold.c
==============================================================================
--- fsf/trunk/libc/stdlib/strtold.c (original)
+++ fsf/trunk/libc/stdlib/strtold.c Tue Aug  7 00:03:16 2007
@@ -1,6 +1,6 @@
 /* Read decimal floating point numbers.
    This file is part of the GNU C Library.
-   Copyright (C) 1995-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002,2003,2004,2006,2007 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@xxxxxxx>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,8 @@
 long double __new_wcstold (const wchar_t *, wchar_t **);
 libc_hidden_proto (____new_strtold_internal)
 libc_hidden_proto (____new_wcstold_internal)
+libc_hidden_proto (__new_strtold)
+libc_hidden_proto (__new_wcstold)
 #else
 # define NEW(x) x
 #endif

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/strtold_l.c Tue Aug  7 00:03:16 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2006, 2007 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
@@ -37,6 +37,9 @@
 # define __STRTOF	____new_strtold_l
 # define ____STRTOF_INTERNAL ____strtold_l_internal
 #endif
+extern __typeof (__STRTOF) STRTOF;
+libc_hidden_proto (__STRTOF)
+libc_hidden_proto (STRTOF)
 #define MPN2FLOAT	__mpn_construct_long_double
 #define FLOAT_HUGE_VAL	HUGE_VALL
 # define SET_MANTISSA(flt, mant) \

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h Tue Aug  7 00:03:16 2007
@@ -1,5 +1,6 @@
 /* Operating system specific code for generic dynamic loader functions.  Linux.
-   Copyright (C) 2000,2001,2002,2004,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 2000,2001,2002,2004,2005,2006,2007
+	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
@@ -51,11 +52,9 @@
 
       static const struct
       {
-	ElfW(Word) vendorlen;
-	ElfW(Word) datalen;
-	ElfW(Word) type;
+	ElfW(Nhdr) hdr;
 	char vendor[8];
-      } expected_note = { sizeof "Linux", sizeof (ElfW(Word)), 0, "Linux" };
+      } expected_note = { { sizeof "Linux", sizeof (ElfW(Word)), 0 }, "Linux" };
       const ElfW(Phdr) *const phdr = GLRO(dl_sysinfo_map)->l_phdr;
       const ElfW(Word) phnum = GLRO(dl_sysinfo_map)->l_phnum;
       for (uint_fast16_t i = 0; i < phnum; ++i)
@@ -63,20 +62,15 @@
 	  {
 	    const ElfW(Addr) start = (phdr[i].p_vaddr
 				      + GLRO(dl_sysinfo_map)->l_addr);
-	    const struct
-	    {
-	      ElfW(Word) vendorlen;
-	      ElfW(Word) datalen;
-	      ElfW(Word) type;
-	    } *note = (const void *) start;
+	    const ElfW(Nhdr) *note = (const void *) start;
 	    while ((ElfW(Addr)) (note + 1) - start < phdr[i].p_memsz)
 	      {
 		if (!memcmp (note, &expected_note, sizeof expected_note))
 		  return *(const ElfW(Word) *) ((const void *) note
 						+ sizeof expected_note);
-#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
+#define ROUND(len) (((len) + sizeof note->n_type - 1) & -sizeof note->n_type)
 		note = ((const void *) (note + 1)
-			+ ROUND (note->vendorlen) + ROUND (note->datalen));
+			+ ROUND (note->n_namesz) + ROUND (note->n_descsz));
 	      }
 	  }
     }

Modified: fsf/trunk/libc/sysdeps/wordsize-64/strtol.c
==============================================================================
--- fsf/trunk/libc/sysdeps/wordsize-64/strtol.c (original)
+++ fsf/trunk/libc/sysdeps/wordsize-64/strtol.c Tue Aug  7 00:03:16 2007
@@ -11,4 +11,6 @@
 strong_alias (__strtol_internal, __strtoll_internal)
 libc_hidden_ver (__strtol_internal, __strtoll_internal)
 weak_alias (strtol, strtoll)
+libc_hidden_ver (strtol, strtoll)
 weak_alias (strtol, strtoq)
+libc_hidden_ver (strtol, strtoq)