From 8058fb1efc594a771ae7c356c33abbf4bac28ff6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 28 Mar 2009 05:26:39 +0000 Subject: Merged revisions 25821,25823-25824,25836 via svnmerge from svn+ssh://svn.uclibc.org/svn/trunk/uClibc ........ r25821 | aldot | 2009-03-25 12:27:56 -0700 (Wed, 25 Mar 2009) | 2 lines - do not pass -Wl with -shared in LDFLAGS_NOSTRIP (Peter S. Mazinger) ........ r25823 | aldot | 2009-03-25 13:28:19 -0700 (Wed, 25 Mar 2009) | 8 lines - Add strtouq alias (to strtoul) for 64bit The strtouq alias was only available on 32bit, breaking compilation of stuff using strtouq on 64bit machines. At the same time use the correct return type (u_quad_t). Signed-of-by: Peter Korsgaard ........ r25824 | aldot | 2009-03-26 01:51:47 -0700 (Thu, 26 Mar 2009) | 2 lines - ignore objects ........ r25836 | landley | 2009-03-26 21:03:20 -0700 (Thu, 26 Mar 2009) | 3 lines 32/64 bit sparc got unified in 2.6.29 the way x86/x86_64 did in 2.6.28. The new guard symbol is "__SPARC_POSIX_TYPES_H". ........ --- include/stdlib.h | 4 +++- libc/stdlib/stdlib.c | 3 +++ libc/sysdeps/linux/sparc/bits/kernel_types.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 124dc7329..52f02e4fd 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -209,6 +209,8 @@ libc_hidden_proto(strtoul) __END_NAMESPACE_STD #ifdef __USE_BSD +#include /* for u_quad_t */ + /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoq (__const char *__restrict __nptr, @@ -216,7 +218,7 @@ extern long long int strtoq (__const char *__restrict __nptr, __THROW __nonnull ((1)) __wur; /* Convert a string to an unsigned quadword integer. */ __extension__ -extern unsigned long long int strtouq (__const char *__restrict __nptr, +extern u_quad_t strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; #endif /* GCC and use BSD. */ diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c index ef92ea4fd..05cc68bdb 100644 --- a/libc/stdlib/stdlib.c +++ b/libc/stdlib/stdlib.c @@ -401,6 +401,9 @@ extern __typeof(__XL_NPP(strtoul)) __XL_NPP(strtoull); libc_hidden_proto(__XL_NPP(strtoull)) strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull)) libc_hidden_def(__XL_NPP(strtoull)) +#if !defined(L_strtoul_l) +strong_alias(strtoul,strtouq) +#endif #endif diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h index 1b2452446..0cc4bc214 100644 --- a/libc/sysdeps/linux/sparc/bits/kernel_types.h +++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h @@ -4,9 +4,10 @@ * our private content, and not the kernel header, will win. * -Erik */ -#if ! defined __ARCH_SPARC_POSIX_TYPES_H && ! defined __ARCH_SPARC64_POSIX_TYPES_H +#if ! defined __ARCH_SPARC_POSIX_TYPES_H && ! defined __ARCH_SPARC64_POSIX_TYPES_H && !defined __SPARC_POSIX_TYPES_H #define __ARCH_SPARC_POSIX_TYPES_H #define __ARCH_SPARC64_POSIX_TYPES_H +#define __SPARC_POSIX_TYPES_H # if __WORDSIZE == 64 typedef unsigned long __kernel_size_t; -- cgit v1.2.3