summaryrefslogtreecommitdiff
path: root/patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-31 06:39:03 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-31 06:39:03 (GMT)
commit4110f78888a8899290aba136a4772f4a48812891 (patch)
tree040f7b89aa36909b327570a8bf81014451ab1cb3 /patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
parent529d2f6cbe81bcd22ab6e02b9dcc1d3d86dec759 (diff)
Add three new uClibc-0.9.30.1, vampirised from buildroot.
/trunk/patches/uClibc/0.9.30.1/170-dl-sysdep-inline.patch | 371 371 0 0 ++++++++++++++++ /trunk/patches/uClibc/0.9.30.1/160-c99-ldbl-math.patch | 474 474 0 0 +++++++++++++++++++++ /trunk/patches/uClibc/0.9.30.1/150-64bit-strtouq.patch | 48 48 0 0 ++ 3 files changed, 893 insertions(+)
Diffstat (limited to 'patches/uClibc/0.9.30.1/150-64bit-strtouq.patch')
-rw-r--r--patches/uClibc/0.9.30.1/150-64bit-strtouq.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/patches/uClibc/0.9.30.1/150-64bit-strtouq.patch b/patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
new file mode 100644
index 0000000..bd4ecaa
--- /dev/null
+++ b/patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
@@ -0,0 +1,48 @@
+[PATCH]: 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@sunsite.dk>
+---
+ include/stdlib.h | 4 +++-
+ libc/stdlib/stdlib.c | 1 +
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+Index: uClibc-0.9.30.1/libc/stdlib/stdlib.c
+===================================================================
+--- uClibc-0.9.30.1.orig/libc/stdlib/stdlib.c
++++ uClibc-0.9.30.1/libc/stdlib/stdlib.c
+@@ -401,6 +401,9 @@
+ 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
+
+
+Index: uClibc-0.9.30.1/include/stdlib.h
+===================================================================
+--- uClibc-0.9.30.1.orig/include/stdlib.h
++++ uClibc-0.9.30.1/include/stdlib.h
+@@ -203,6 +203,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,
+@@ -210,7 +212,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. */