summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-23 15:32:24 -0700
committerDan Albert <danalbert@google.com>2014-09-23 15:32:24 -0700
commit3c5037f1b3b747e79d17a5f717d9f9c365132d33 (patch)
tree73805e82ebef155bd7ffb45cf826f9624c47799b /libc
parent87b6906f6e0c17b2541535be8e054324cc2fef4a (diff)
downloadbionic-3c5037f1b3b747e79d17a5f717d9f9c365132d33.zip
bionic-3c5037f1b3b747e79d17a5f717d9f9c365132d33.tar.gz
bionic-3c5037f1b3b747e79d17a5f717d9f9c365132d33.tar.bz2
Fix incorrect parameter types for locale funcs.
strtoll(3), strtoull(3), wcstoll(3), and wcstoull(3) all take an _int_ as a base, not a size_t. This is an ABI compatibility issue. Bug: 17628622 Change-Id: I17f8eead34ce2112005899fc30162067573023ec
Diffstat (limited to 'libc')
-rw-r--r--libc/bionic/strtoll_l.cpp2
-rw-r--r--libc/bionic/strtoull_l.cpp2
-rw-r--r--libc/bionic/wchar.cpp4
-rw-r--r--libc/include/stdlib.h4
-rw-r--r--libc/include/wchar.h4
5 files changed, 8 insertions, 8 deletions
diff --git a/libc/bionic/strtoll_l.cpp b/libc/bionic/strtoll_l.cpp
index 05fb760..47b126e 100644
--- a/libc/bionic/strtoll_l.cpp
+++ b/libc/bionic/strtoll_l.cpp
@@ -28,6 +28,6 @@
#include <stdlib.h>
-long long strtoll_l(const char *nptr, char **endptr, size_t base, locale_t) {
+long long strtoll_l(const char *nptr, char **endptr, int base, locale_t) {
return strtoll(nptr, endptr, base);
}
diff --git a/libc/bionic/strtoull_l.cpp b/libc/bionic/strtoull_l.cpp
index ba0bc6a..398ba0e 100644
--- a/libc/bionic/strtoull_l.cpp
+++ b/libc/bionic/strtoull_l.cpp
@@ -28,7 +28,7 @@
#include <stdlib.h>
-unsigned long long strtoull_l(const char *nptr, char **endptr, size_t base,
+unsigned long long strtoull_l(const char *nptr, char **endptr, int base,
locale_t) {
return strtoull(nptr, endptr, base);
}
diff --git a/libc/bionic/wchar.cpp b/libc/bionic/wchar.cpp
index 524ba07..e0879b9 100644
--- a/libc/bionic/wchar.cpp
+++ b/libc/bionic/wchar.cpp
@@ -230,13 +230,13 @@ size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t n, locale_t) {
return wcsxfrm(dest, src, n);
}
-long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, size_t base,
+long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, int base,
locale_t) {
return wcstoll(nptr, endptr, base);
}
unsigned long long wcstoull_l(const wchar_t *nptr, wchar_t **endptr,
- size_t base, locale_t) {
+ int base, locale_t) {
return wcstoull(nptr, endptr, base);
}
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 52f71dd..52f371b 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -76,8 +76,8 @@ extern float strtof(const char*, char**) __LIBC_ABI_PUBLIC__;
extern long double strtold(const char*, char**) __LIBC_ABI_PUBLIC__;
extern long double strtold_l(const char *, char **, locale_t) __LIBC_ABI_PUBLIC__;
-extern long long strtoll_l(const char *, char **, size_t, locale_t) __LIBC_ABI_PUBLIC__;
-extern unsigned long long strtoull_l(const char *, char **, size_t, locale_t) __LIBC_ABI_PUBLIC__;
+extern long long strtoll_l(const char *, char **, int, locale_t) __LIBC_ABI_PUBLIC__;
+extern unsigned long long strtoull_l(const char *, char **, int, locale_t) __LIBC_ABI_PUBLIC__;
extern int atoi(const char*) __purefunc;
extern long atol(const char*) __purefunc;
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index ae10d93..10a78b8 100644
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
@@ -151,8 +151,8 @@ extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
extern int wprintf(const wchar_t *, ...);
extern int wscanf(const wchar_t *, ...);
-extern long long wcstoll_l(const wchar_t *, wchar_t **, size_t, locale_t);
-extern unsigned long long wcstoull_l(const wchar_t *, wchar_t **, size_t, locale_t);
+extern long long wcstoll_l(const wchar_t *, wchar_t **, int, locale_t);
+extern unsigned long long wcstoull_l(const wchar_t *, wchar_t **, int, locale_t);
extern long double wcstold_l(const wchar_t *, wchar_t **, locale_t );
extern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);