Skip to content

win32 long path - #1147

Merged
Cyan4973 merged 37 commits into
devfrom
fix/win32-long-path
Sep 18, 2026
Merged

Cyan4973 merged 37 commits into
devfrom
fix/win32-long-path

Conversation

@Cyan4973

Copy link
Copy Markdown
Owner

This offers long path support, as well as support for complex characters, under Windows.
It builds upon #1061, that was started by @t-mat , and adds a few tests and minor complements and fixes to complete the diff.

closes #1060

t-mat and others added 13 commits September 17, 2026 14:26
Add XSUM_widenStringAsUncPath which converts UTF-8 path to absolute UNC path with "\\?\" prefix.
Note: So far it contains #pragma comment(lib) and pathcch.lib which only supports Windows 8+ or Windows Server 2012+.  This issue must be fixed.

This function supports 3 types of absolute path
- Classic DOS path (C:\...)
- Extended length path (\\?\...)
- UNC path (\\...)

Also relative path is properly converted to extended length path (\\?\...)
Now WIN32 CLI supports a file which ends with '.'.  E.g. "my_file."
test_trailing_period.bat tests it.
To keep compatibility, now CMakeFile.txt detects MSVC + Win10+ automatically.
If user want to use MinGW, set XXHASH_WIN_TARGET_WIN10 to cmake.
They set XXHSUM_WIN32_LONGPATH for C preprocessor.
@Cyan4973 Cyan4973 self-assigned this Sep 17, 2026
@Cyan4973
Cyan4973 merged commit e162a41 into dev Sep 18, 2026
88 checks passed
@Cyan4973
Cyan4973 deleted the fix/win32-long-path branch September 18, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xxhsum.exe Long MAX_PATH support over 260 characters in the path

2 participants