diff options
Diffstat (limited to 'main/libc0.9.32/0001-libc-fix-strtoq.patch')
-rw-r--r-- | main/libc0.9.32/0001-libc-fix-strtoq.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/main/libc0.9.32/0001-libc-fix-strtoq.patch b/main/libc0.9.32/0001-libc-fix-strtoq.patch new file mode 100644 index 000000000..52696630b --- /dev/null +++ b/main/libc0.9.32/0001-libc-fix-strtoq.patch @@ -0,0 +1,44 @@ +From cb7474c898b4c3aaee898231b1ea968adc2ad95e Mon Sep 17 00:00:00 2001 +From: Natanael Copa <natanael.copa@gmail.com> +Date: Fri, 26 Nov 2010 14:43:12 +0000 +Subject: [PATCH] libc: fix strtoq + +strtoq should always return a quad_t and be an alias of strtol on +64 bit and strtoll on 32 bit. + +Signed-off-by: Natanael Copa <natanael.copa@gmail.com> +--- + include/stdlib.h | 2 +- + libc/stdlib/stdlib.c | 3 +++ + 2 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/include/stdlib.h b/include/stdlib.h +index ce92ccd..300edf0 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -214,7 +214,7 @@ __END_NAMESPACE_STD + + /* Convert a string to a quadword integer. */ + __extension__ +-extern long long int strtoq (__const char *__restrict __nptr, ++extern quad_t strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW __nonnull ((1)) __wur; + /* Convert a string to an unsigned quadword integer. */ +diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c +index ad0c4aa..4d608ee 100644 +--- a/libc/stdlib/stdlib.c ++++ b/libc/stdlib/stdlib.c +@@ -342,6 +342,9 @@ extern __typeof(__XL_NPP(strtol)) __XL_NPP(strtoll); + libc_hidden_proto(__XL_NPP(strtoll)) + strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll)) + libc_hidden_def(__XL_NPP(strtoll)) ++#if !defined(L_strtol_l) ++strong_alias(strtol,strtoq) ++#endif + #endif + + #endif +-- +1.7.3.2 + |