[flang-commits] [flang] [flang] Fix POSIX.1/XPG checks in intrinsics-library.cpp (PR #201072)

Fangrui Song via flang-commits flang-commits at lists.llvm.org
Sat Jul 25 16:03:38 PDT 2026


================
@@ -440,7 +440,8 @@ struct HostRuntimeLibrary<std::complex<double>, LibraryVersion::Libm> {
 //    clang libc++ (ok in GNU libstdc++). Instead, the Posix libm
 //    extensions are used when available below.
 
-#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
+#if _POSIX_C_SOURCE >= 200112L || _POSIX_VERSION >= 200112L || \
----------------
MaskRay wrote:

This file doesn't include unistd.h, `_POSIX_VERSION` and `_XOPEN_VERSION` feel dead to me.

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


More information about the flang-commits mailing list