[libcxx-commits] [libcxx] [libcxx] avoid include Uppercase windows headers (PR #208903)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 11 03:38:06 PDT 2026


https://github.com/trcrsired created https://github.com/llvm/llvm-project/pull/208903

We should use unknwn.h and windows.h instead of Unknwn.h and Windows.h because Linux and other non‑Windows systems treat filenames as case‑sensitive. Windows does not, so mixed‑case includes work there but break elsewhere. Both mingw‑w64‑crt and windows‑msvc‑sysroot provide all Windows headers in fully lowercase, so using the lowercase forms ensures consistent cross‑platform builds.

#208901

>From 29e0da2e4cd1045d597bfbee91ca4812fdb74b32 Mon Sep 17 00:00:00 2001
From: trcrsired <oyzawqgcfc at gmail.com>
Date: Sat, 11 Jul 2026 18:34:47 +0800
Subject: [PATCH] [libcxx] avoid include Uppercase windows headers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We should use unknwn.h and windows.h instead of Unknwn.h and Windows.h because Linux and other non‑Windows systems treat filenames as case‑sensitive. Windows does not, so mixed‑case includes work there but break elsewhere. Both mingw‑w64‑crt and windows‑msvc‑sysroot provide all Windows headers in fully lowercase, so using the lowercase forms ensures consistent cross‑platform builds.
---
 libcxx/src/support/runtime/exception_pointer_msvc.ipp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/src/support/runtime/exception_pointer_msvc.ipp b/libcxx/src/support/runtime/exception_pointer_msvc.ipp
index 72360a2d791bd..3102d1ee93db2 100644
--- a/libcxx/src/support/runtime/exception_pointer_msvc.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_msvc.ipp
@@ -14,8 +14,8 @@ _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wmultichar")
 #include <cstdlib>
 #include <cstring>
 
-#include <Unknwn.h>
-#include <Windows.h>
+#include <unknwn.h>
+#include <windows.h>
 struct _ThrowInfo;
 #include <eh.h>
 #include <ehdata.h>



More information about the libcxx-commits mailing list