about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
-rw-r--r--elf/Makefile22
-rw-r--r--include/stdlib.h56
-rw-r--r--include/wchar.h14
-rw-r--r--scripts/data/localplt-generic.data (renamed from scripts/data/localplt-x86_64-linux-gnu.data)0
-rw-r--r--scripts/data/localplt-powerpc-linux-gnu.data7
-rw-r--r--stdlib/strtod.c5
-rw-r--r--stdlib/strtod_l.c4
-rw-r--r--stdlib/strtol.c3
-rw-r--r--stdlib/strtol_l.c3
-rw-r--r--stdlib/strtold.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/strtold_l.c5
-rw-r--r--sysdeps/wordsize-64/strtol.c2
13 files changed, 87 insertions, 59 deletions
diff --git a/ChangeLog b/ChangeLog
index e46390ad25..02518348d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2007-08-06  Roland McGrath  <roland@redhat.com>
 
+	* 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).
 
diff --git a/elf/Makefile b/elf/Makefile
index 1c5b16908a..d1b3c5a1f5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -837,28 +837,26 @@ $(objpfx)tst-dlmodcount: $(libdl)
 $(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)
 $(objpfx)tst-dlopenrpath: $(objpfx)tst-dlopenrpathmod.so $(libdl)
diff --git a/include/stdlib.h b/include/stdlib.h
index d5c3751013..a9754b71dd 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -19,6 +19,13 @@ extern __typeof (strtoull_l) __strtoull_l;
 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 (____strtoll_l_internal)
 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);
diff --git a/include/wchar.h b/include/wchar.h
index b3cf373d9e..b5f74da0f0 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -15,6 +15,13 @@ extern __typeof (wcstod_l) __wcstod_l;
 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 (__wcstol_internal)
 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)
diff --git a/scripts/data/localplt-x86_64-linux-gnu.data b/scripts/data/localplt-generic.data
index 2219aa9048..2219aa9048 100644
--- a/scripts/data/localplt-x86_64-linux-gnu.data
+++ b/scripts/data/localplt-generic.data
diff --git a/scripts/data/localplt-powerpc-linux-gnu.data b/scripts/data/localplt-powerpc-linux-gnu.data
new file mode 100644
index 0000000000..8fb56b6086
--- /dev/null
+++ b/scripts/data/localplt-powerpc-linux-gnu.data
@@ -0,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
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index d124bcdcd9..0921724dbc 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -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@gnu.org>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -69,6 +69,9 @@ STRTOF (nptr, endptr)
 {
   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)
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 939440f364..86b408e1fe 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1599,6 +1599,10 @@ __STRTOF (nptr, endptr, loc)
 {
   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
diff --git a/stdlib/strtol.c b/stdlib/strtol.c
index 02ec19aabe..e90c51cc5a 100644
--- a/stdlib/strtol.c
+++ b/stdlib/strtol.c
@@ -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 @@ strtol (nptr, endptr, base)
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, _NL_CURRENT_LOCALE);
 }
+libc_hidden_def (strtol)
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index e02a2747d0..ba0aba7919 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -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@cygnus.com>, 1997.
 
@@ -561,4 +561,5 @@ __strtol_l (nptr, endptr, base, loc)
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
 }
+libc_hidden_def (__strtol_l)
 weak_alias (__strtol_l, strtol_l)
diff --git a/stdlib/strtold.c b/stdlib/strtold.c
index 1f56deaa01..da9f92797b 100644
--- a/stdlib/strtold.c
+++ b/stdlib/strtold.c
@@ -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@gnu.org>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,8 @@ long double ____new_wcstold_internal (const wchar_t *, wchar_t **, int);
 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
diff --git a/sysdeps/ieee754/ldbl-128ibm/strtold_l.c b/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
index d558b00d4a..d84c0aee24 100644
--- a/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
@@ -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 @@ extern long double ____new_strtold_l (const char *, char **, __locale_t);
 # 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) \
diff --git a/sysdeps/wordsize-64/strtol.c b/sysdeps/wordsize-64/strtol.c
index 2e1b229349..ac17bbe4c8 100644
--- a/sysdeps/wordsize-64/strtol.c
+++ b/sysdeps/wordsize-64/strtol.c
@@ -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)