patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:26:53 2011 +0200 (2011-08-02)
changeset 2592 4908eb2b6f17
permissions -rw-r--r--
scripts/functions: cvs retrieval first tries the mirror for tarballs

The cvs download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via cvs.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard cvs retrieval will kick in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.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.  */