[flang-commits] [flang] [flang][runtime] Implement SLEEP intrinsic (PR #79074)

Yi Wu via flang-commits flang-commits at lists.llvm.org
Tue Jan 23 02:01:34 PST 2024


================
@@ -39,8 +40,10 @@ inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time,
 #endif
 
 #if _REENTRANT || _POSIX_C_SOURCE >= 199506L
-// System is posix-compliant and has getlogin_r
+// System is posix-compliant and has getlogin_r and sleep
 #include <unistd.h>
+#elif _WIN32
+#include <windows.h> // for sleep
----------------
yi-wu-arm wrote:

LGTM, you can add nominmax  WIN32_LEAN_AND_MEAN to reduce the header included by windows.h

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


More information about the flang-commits mailing list