svn commit: [25823] trunk/uClibc: include libc/stdlib
aldot at uclibc.org
aldot at uclibc.org
Wed Mar 25 20:28:19 UTC 2009
Author: aldot
Date: 2009-03-25 20:28:19 +0000 (Wed, 25 Mar 2009)
New Revision: 25823
Log:
- 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 <jacmet at sunsite.dk>
Modified:
trunk/uClibc/include/stdlib.h
trunk/uClibc/libc/stdlib/stdlib.c
Changeset:
Modified: trunk/uClibc/include/stdlib.h
===================================================================
--- trunk/uClibc/include/stdlib.h 2009-03-25 19:33:56 UTC (rev 25822)
+++ trunk/uClibc/include/stdlib.h 2009-03-25 20:28:19 UTC (rev 25823)
@@ -209,6 +209,8 @@
__END_NAMESPACE_STD
#ifdef __USE_BSD
+#include <sys/types.h> /* 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 @@
__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. */
Modified: trunk/uClibc/libc/stdlib/stdlib.c
===================================================================
--- trunk/uClibc/libc/stdlib/stdlib.c 2009-03-25 19:33:56 UTC (rev 25822)
+++ trunk/uClibc/libc/stdlib/stdlib.c 2009-03-25 20:28:19 UTC (rev 25823)
@@ -401,7 +401,10 @@
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
#endif
More information about the uClibc-cvs
mailing list