在 2026-1-9 00:40, Jonathan Yong 写道:
On 12/19/25 10:34 AM, Senthil Kumar wrote:
Hello,

     In Win 10 and later, Windows removed MAX_PATH path length limitations
     but made it so that applications would have to opt-in by shipping a
     manifest with "longPathAware" set to true.

     gcc already ships with a manifest, sourced from
     gcc/config/i386/winnt-utf8.manifest when built for MinGW host. The
     manifest currently enables UTF-8 code page, 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.

     This patch fixes that and also adds longPathAware to the
     settings. Verified by inspecting the PEB on a Windows machine with the
     registry settings also configured to turn on long path support.

     Ok for master?


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.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to