Skip to content

Commit

Permalink
Remove strtoq() and strtouq().
Browse files Browse the repository at this point in the history
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: android/ndk#1803
Test: treehugger
Change-Id: I87de7831c04b3e450a44e9f0386cacb73793e393
  • Loading branch information
enh-google authored and Ghosuto committed Jul 1, 2023
1 parent b5eff79 commit 7f1bcbb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions libc/bionic/strtol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ long long wcstoll(const wchar_t* s, wchar_t** end, int base) {
return StrToI<long long, LLONG_MIN, LLONG_MAX, wchar_t>(s, end, base);
}

// Public API since L, but not in any header.
__strong_alias(strtoq, strtoll);

unsigned long strtoul(const char* s, char** end, int base) {
return StrToU<unsigned long, ULONG_MAX, char>(s, end, base);
}
Expand All @@ -234,6 +231,3 @@ uintmax_t strtoumax(const char* s, char** end, int base) {
uintmax_t wcstoumax(const wchar_t* s, wchar_t** end, int base) {
return StrToU<uintmax_t, UINTMAX_MAX, wchar_t>(s, end, base);
}

// Public API since L, but not in any header.
__strong_alias(strtouq, strtoull);
2 changes: 0 additions & 2 deletions libc/libc.map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f1bcbb

Please sign in to comment.