[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 13:45:03 PDT 2025
================
@@ -13,7 +13,7 @@
#include <stdlib.h>
#ifdef _WIN32
-#include <malloc.h>
+#include <corecrt_malloc.h>
----------------
mstorsjo wrote:
mingw-w64 doesn't have `corecrt_malloc.h` (yet), so unfortunately we can't go this way in general. Perhaps we could for `!defined(__MINGW32__)` or `defined(_MSC_VER)` though.
Also, typo in the commit message `mordularising`.
https://github.com/llvm/llvm-project/pull/131668
More information about the cfe-commits
mailing list