Skip to content

Commit

Permalink
libc: 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
Signed-off-by: Jason Edson <jaysonedson@gmail.com>
  • Loading branch information
enh-google authored and mydongistiny committed Dec 6, 2022
1 parent 389ddb7 commit ebef61a
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 @@ -183,9 +183,6 @@ long long strtoll(const char* s, char** end, int base) {
return StrToI<long long, LLONG_MIN, LLONG_MAX>(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>(s, end, base);
}
Expand All @@ -197,6 +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<uintmax_t, UINTMAX_MAX>(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 ebef61a

Please sign in to comment.