patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@1282
     1
[PATCH]: Add strtouq alias (to strtoul) for 64bit
yann@1282
     2
yann@1282
     3
The strtouq alias was only available on 32bit, breaking compilation of stuff
yann@1282
     4
using strtouq on 64bit machines. At the same time use the correct return
yann@1282
     5
type (u_quad_t).
yann@1282
     6
yann@1282
     7
Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk>
yann@1282
     8
---
yann@1282
     9
 include/stdlib.h     |    4 +++-
yann@1282
    10
 libc/stdlib/stdlib.c |    1 +
yann@1282
    11
 2 files changed, 4 insertions(+), 1 deletion(-)
yann@1282
    12
yann@1282
    13
Index: uClibc-0.9.30.1/libc/stdlib/stdlib.c
yann@1282
    14
===================================================================
yann@1282
    15
--- uClibc-0.9.30.1.orig/libc/stdlib/stdlib.c
yann@1282
    16
+++ uClibc-0.9.30.1/libc/stdlib/stdlib.c
yann@1282
    17
@@ -401,6 +401,9 @@
yann@1282
    18
 libc_hidden_proto(__XL_NPP(strtoull))
yann@1282
    19
 strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
yann@1282
    20
 libc_hidden_def(__XL_NPP(strtoull))
yann@1282
    21
+#if !defined(L_strtoul_l)
yann@1282
    22
+strong_alias(strtoul,strtouq)
yann@1282
    23
+#endif
yann@1282
    24
 #endif
yann@1282
    25
 
yann@1282
    26
 
yann@1282
    27
Index: uClibc-0.9.30.1/include/stdlib.h
yann@1282
    28
===================================================================
yann@1282
    29
--- uClibc-0.9.30.1.orig/include/stdlib.h
yann@1282
    30
+++ uClibc-0.9.30.1/include/stdlib.h
yann@1282
    31
@@ -203,6 +203,8 @@
yann@1282
    32
 __END_NAMESPACE_STD
yann@1282
    33
 
yann@1282
    34
 #ifdef __USE_BSD
yann@1282
    35
+#include <sys/types.h> /* for u_quad_t */
yann@1282
    36
+
yann@1282
    37
 /* Convert a string to a quadword integer.  */
yann@1282
    38
 __extension__
yann@1282
    39
 extern long long int strtoq (__const char *__restrict __nptr,
yann@1282
    40
@@ -210,7 +212,7 @@
yann@1282
    41
      __THROW __nonnull ((1)) __wur;
yann@1282
    42
 /* Convert a string to an unsigned quadword integer.  */
yann@1282
    43
 __extension__
yann@1282
    44
-extern unsigned long long int strtouq (__const char *__restrict __nptr,
yann@1282
    45
+extern u_quad_t strtouq (__const char *__restrict __nptr,
yann@1282
    46
 				       char **__restrict __endptr, int __base)
yann@1282
    47
      __THROW __nonnull ((1)) __wur;
yann@1282
    48
 #endif /* GCC and use BSD.  */