patches/uClibc/0.9.30.1/150-64bit-strtouq.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Mar 31 06:39:03 2009 +0000 (2009-03-31)
changeset 1282 3370f421e1b9
permissions -rw-r--r--
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(+)
     1 [PATCH]: Add strtouq alias (to strtoul) for 64bit
     2 
     3 The strtouq alias was only available on 32bit, breaking compilation of stuff
     4 using strtouq on 64bit machines. At the same time use the correct return
     5 type (u_quad_t).
     6 
     7 Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk>
     8 ---
     9  include/stdlib.h     |    4 +++-
    10  libc/stdlib/stdlib.c |    1 +
    11  2 files changed, 4 insertions(+), 1 deletion(-)
    12 
    13 Index: uClibc-0.9.30.1/libc/stdlib/stdlib.c
    14 ===================================================================
    15 --- uClibc-0.9.30.1.orig/libc/stdlib/stdlib.c
    16 +++ uClibc-0.9.30.1/libc/stdlib/stdlib.c
    17 @@ -401,6 +401,9 @@
    18  libc_hidden_proto(__XL_NPP(strtoull))
    19  strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
    20  libc_hidden_def(__XL_NPP(strtoull))
    21 +#if !defined(L_strtoul_l)
    22 +strong_alias(strtoul,strtouq)
    23 +#endif
    24  #endif
    25  
    26  
    27 Index: uClibc-0.9.30.1/include/stdlib.h
    28 ===================================================================
    29 --- uClibc-0.9.30.1.orig/include/stdlib.h
    30 +++ uClibc-0.9.30.1/include/stdlib.h
    31 @@ -203,6 +203,8 @@
    32  __END_NAMESPACE_STD
    33  
    34  #ifdef __USE_BSD
    35 +#include <sys/types.h> /* for u_quad_t */
    36 +
    37  /* Convert a string to a quadword integer.  */
    38  __extension__
    39  extern long long int strtoq (__const char *__restrict __nptr,
    40 @@ -210,7 +212,7 @@
    41       __THROW __nonnull ((1)) __wur;
    42  /* Convert a string to an unsigned quadword integer.  */
    43  __extension__
    44 -extern unsigned long long int strtouq (__const char *__restrict __nptr,
    45 +extern u_quad_t strtouq (__const char *__restrict __nptr,
    46  				       char **__restrict __endptr, int __base)
    47       __THROW __nonnull ((1)) __wur;
    48  #endif /* GCC and use BSD.  */