Skip to content

Conversation

@philnik777
Copy link
Contributor

The patch has been committed without approval from the libc++ review group and is implementing the locale base API in a way it wasn't intended to be implemented. The commit also contains a no-reply github E-Mail, which is in conflict with the LLVM developer policy.

Reverts #167980

@philnik777 philnik777 requested a review from a team as a code owner November 28, 2025 08:55
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 28, 2025
@philnik777 philnik777 merged commit 26b82e5 into main Nov 28, 2025
13 of 18 checks passed
@philnik777 philnik777 deleted the revert-167980-libcxx-fix-167977 branch November 28, 2025 08:55
@llvmbot
Copy link
Member

llvmbot commented Nov 28, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

The patch has been committed without approval from the libc++ review group and is implementing the locale base API in a way it wasn't intended to be implemented. The commit also contains a no-reply github E-Mail, which is in conflict with the LLVM developer policy.

Reverts llvm/llvm-project#167980


Full diff: https://github.com/llvm/llvm-project/pull/169884.diff

1 Files Affected:

  • (modified) libcxx/include/__locale_dir/support/linux.h (-15)
diff --git a/libcxx/include/__locale_dir/support/linux.h b/libcxx/include/__locale_dir/support/linux.h
index deb657d4faced..1a589be49bf1d 100644
--- a/libcxx/include/__locale_dir/support/linux.h
+++ b/libcxx/include/__locale_dir/support/linux.h
@@ -83,30 +83,15 @@ inline _LIBCPP_HIDE_FROM_ABI __lconv_t* __localeconv(__locale_t& __loc) {
 // Strtonum functions
 //
 inline _LIBCPP_HIDE_FROM_ABI float __strtof(const char* __nptr, char** __endptr, __locale_t __loc) {
-#if !_LIBCPP_HAS_MUSL_LIBC || defined(_GNU_SOURCE)
   return ::strtof_l(__nptr, __endptr, __loc);
-#else
-  (void)__loc;
-  return ::strtof(__nptr, __endptr);
-#endif
 }
 
 inline _LIBCPP_HIDE_FROM_ABI double __strtod(const char* __nptr, char** __endptr, __locale_t __loc) {
-#if !_LIBCPP_HAS_MUSL_LIBC || defined(_GNU_SOURCE)
   return ::strtod_l(__nptr, __endptr, __loc);
-#else
-  (void)__loc;
-  return ::strtod(__nptr, __endptr);
-#endif
 }
 
 inline _LIBCPP_HIDE_FROM_ABI long double __strtold(const char* __nptr, char** __endptr, __locale_t __loc) {
-#if !_LIBCPP_HAS_MUSL_LIBC || defined(_GNU_SOURCE)
   return ::strtold_l(__nptr, __endptr, __loc);
-#else
-  (void)__loc;
-  return ::strtold(__nptr, __endptr);
-#endif
 }
 
 //

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants