[libcxx-commits] [libcxx] [libc++] Add a thread-safe version of std::lgamma in the dylib (PR #153631)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 8 00:52:31 PDT 2025


================
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifdef __APPLE__
+#  define _REENTRANT
+#endif
+
+#include <cmath>
+#include <math.h> // for lgamma_r
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace __math {
----------------
philnik777 wrote:

Do we really want to enshrine the `__math` namespace forever in our ABI?

https://github.com/llvm/llvm-project/pull/153631


More information about the libcxx-commits mailing list