[libc-commits] [libc] [libc] implement getrandom for windows (PR #119438)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Tue Dec 10 11:36:10 PST 2024
================
@@ -9,6 +9,12 @@
#ifndef LLVM_LIBC_TYPES_SSIZE_T_H
#define LLVM_LIBC_TYPES_SSIZE_T_H
+// https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types
+#if __has_include(<BaseTsd.h>)
----------------
michaelrj-google wrote:
`__has_include` isn't the appropriate way to check if this is a windows target. I'd recommend doing `#ifdef WIN32` instead.
https://github.com/llvm/llvm-project/pull/119438
More information about the libc-commits
mailing list