From 92a9bed39109f7e5f9a836976d328abc12c062a1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 9 Nov 2022 16:15:05 +0000 Subject: [PATCH] Remove strtoq() and strtouq(). These have been aliases for strtoll() and strtoull() since L, by accident. We've never exposed them in the headers, and they're unused by any apps. Let's fix the inconsistency between libc.so and its headers by removing the aliases. Bug: https://github.com/android/ndk/issues/1803 Test: treehugger Change-Id: I87de7831c04b3e450a44e9f0386cacb73793e393 --- libc/bionic/strtol.cpp | 10 ---------- libc/libc.map.txt | 2 -- 2 files changed, 12 deletions(-) diff --git a/libc/bionic/strtol.cpp b/libc/bionic/strtol.cpp index 63ac102b5..8a9262188 100644 --- a/libc/bionic/strtol.cpp +++ b/libc/bionic/strtol.cpp @@ -183,11 +183,6 @@ long long strtoll(const char* s, char** end, int base) { return StrToI(s, end, base); } -// Public API since L, but not in any header. -extern "C" long long strtoq(const char* s, char** end, int base) { - return strtoll(s, end, base); -} - unsigned long strtoul(const char* s, char** end, int base) { return StrToU(s, end, base); } @@ -199,8 +194,3 @@ unsigned long long strtoull(const char* s, char** end, int base) { uintmax_t strtoumax(const char* s, char** end, int base) { return StrToU(s, end, base); } - -// Public API since L, but not in any header. -extern "C" unsigned long long strtouq(const char* s, char** end, int base) { - return strtoull(s, end, base); -} diff --git a/libc/libc.map.txt b/libc/libc.map.txt index 4bfb8a232..78db8ec3c 100644 --- a/libc/libc.map.txt +++ b/libc/libc.map.txt @@ -1037,12 +1037,10 @@ LIBC { strtold_l; # introduced=21 strtoll; strtoll_l; # introduced=21 - strtoq; # introduced=21 strtoul; strtoull; strtoull_l; # introduced=21 strtoumax; - strtouq; # introduced=21 strxfrm; strxfrm_l; # introduced=21 swapoff; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21