On Fri, Jan 9, 2026 at 8:07 PM Jonathan Yong <[email protected]> wrote: > > >> Sorry, I missed this email due to bad sorting. Can you please split > >> this into 2 commits? > >> > >> LH, any comments? > >> > > > > The change looks good to me. > > > > BTW, on Windows 11 (I'm using 25H2 dev) a manifest doesn't seem to be > > necessary any more. All ANSI Windows APIs also take very long UNC paths. > > The constant `MAX_PATH` is hard-coded in a number of places which may > > need updating. > > > > > > Senthil, please split the commits and send them as attachments, your > email client munged the line endings. >
Apologies for the messed up patch diff. I've split the change into two patches (attached) - namespace.patch fixes only the XML namespace, and longPathAware.patch adds the longPathAware element on top of that. Ok for master? Regards Senthil
commit 92cfb57a505206f790f5e4b163ce3a7e3c33861b Author: Senthil Kumar Selvaraj <[email protected]> Date: Mon Jan 12 11:43:14 2026 +0530 Fix XML namespaces in winnt-utf8 manifest When built for MinGW host, gcc embeds winnt-utf8.manifest to set the code page to UTF-8, but the XML namespaces don't line up with Microsoft's documentation (see https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#activeCodePage) and also https://gcc.gnu.org/pipermail/gcc-patches/2025-December/702559.html. Fix by modifying the namespaces to match the documentation. gcc/ChangeLog: * config/i386/winnt-utf8.manifest: Fix namespaces. diff --git gcc/config/i386/winnt-utf8.manifest gcc/config/i386/winnt-utf8.manifest index dab929e1515..de9cd566087 100644 --- gcc/config/i386/winnt-utf8.manifest +++ gcc/config/i386/winnt-utf8.manifest @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> - <application> - <windowsSettings> +<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> + <asmv3:application> + <asmv3:windowsSettings> <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> - </windowsSettings> - </application> + </asmv3:windowsSettings> + </asmv3:application> </assembly>
commit d6619fa39d5d8412f62b231922082531336719af Author: Senthil Kumar Selvaraj <[email protected]> Date: Mon Jan 12 11:44:06 2026 +0530 Add longPathAware to winnt-utf8 manifest Windows 10 (and higher) support paths that exceed MAX_PATH in length, provided the executable ships with a manifest file declaring longPathAware support and LongPathsEnabled is set to 1 in the registry. See https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#longPathAware and https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry. Add the longPathAware element to winnt-utf8.manifest to enable gcc to deal with paths longer than MAX_PATH on Windows. gcc/ChangeLog: * config/i386/winnt-utf8.manifest: Set longPathAware to true. diff --git gcc/config/i386/winnt-utf8.manifest gcc/config/i386/winnt-utf8.manifest index de9cd566087..9be36fb4b4b 100644 --- gcc/config/i386/winnt-utf8.manifest +++ gcc/config/i386/winnt-utf8.manifest @@ -3,6 +3,7 @@ <asmv3:application> <asmv3:windowsSettings> <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> + <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> </asmv3:windowsSettings> </asmv3:application> </assembly>
