From 6886887bc86e99d4db9befb7881be804fa758312 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 25 Mar 2009 20:28:19 +0000 Subject: - 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 --- include/stdlib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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. */ -- cgit v1.2.3