Replies: 1 comment
-
Better Possible Fix? (less hack)After tinkering some more, I've discovered using nmake like desribed in the link below is better than the hack I've wrote above. https://github.com/universal-ctags/ctags/blob/master/docs/windows.rst#building-ctags-with-nmake Because when you build with nmake, you don't have to comment out Just edit ....Mostly. Because of code above in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
According to MSDN Windows now supports path longer than 260 characters.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
And it'd be nice if ctags supported paths longer than 260 characters on Windows.
According to MSDN from earlier, two conditions must be true for an application to support long paths.
The registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1
The application manifest must also include the longPathAware element.
In my machine, I've already edited the registry value and confirmed that released version of ctags on windows doesn't support long path using below script.
ctags-2026-06-18_p6.2.20260607.0-8-g7cef080-x64
ctags-2026-06-18_p6.2.20260607.0-8-g7cef080-clang-x64
Possible Fix? (hack)
I tried to make ctags long path aware and was somewhat successful.
First, you need to edit
win32/ctags.exe.manifestfile like msdn said.Then Follow the build steps in written in https://github.com/universal-ctags/ctags/blob/master/docs/windows.rst#gcc-1.
But before typing these commands,
just before doing make command, you need to comment out
#define HAVE_DIRENT_H 1inconfig.h.it forces ctags to use
_findfirst()when recursing at below code written in main.cWith these steps above, I have confirmed that ctags built with above steps passes the batch script test.
But how does this work? (no idea, honestly)
It is clear that whatever opendir implementation msys2 currently ships doesn't support long paths. But I have no clue why
_findfirstis okay with long paths. Couldn't find anything on msdn.In fact, according to mingw mailing list here https://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg23934.html,
_findfirstshould not work at all for paths longer than 260 characters. But for some reason_findfirsthappens to work well with long paths ON MY MACHINE.Beta Was this translation helpful? Give feedback.
All reactions