tronkko / dirent

C/C++ library for retrieving information on files and directories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include other common unix headers that are also included in git?

AraHaan opened this issue · comments

It would be nice if this also included the headers ported to windows that are conveniently in this tar.gz file. (Note these was ripped from, a friend's linux install and I definitely need these to compile git with Visual Studio so that way it would become standalone and would not require cygwin or mingw to work and so I can easily drop the compiled git.exe in the windows directory and use it just fine.) I need it like this so I can do just that so I can use subprocess in python to open up git to get an lazy changelog to stuff. Also it would allow me to uninstall git for windows, mingw (trash), Github Desktop (trash gui), and also cygwin (also trash). The command line tool is by far the least trashy so I want to be able to build a pure windows build using MSVC.

to_port.tar.gz

By far your header helped on it as well.

I understand that you are looking for a way to compile Git in MSVC but have you tried building Git statically in mingw or cygwin? Perhaps there is a way to use cygwin/mingw and still combine everything into a single executable file.

AraHaan's comment from another thread seems more suited here:

I need to use this to compile git in Visual Studio 2015 so I can make git.exe only to make an installer that just drops git in %SystemDrive%\Windows and/or %SystemDrive%\Windows\SysWOW64 (if 64 bit windows) so it can add git to the path on Window 7's command prompt without requiring mingw or cygwin installed to make the most of git. (So a pure windows build of git for windows basically). This unfortunately means an absolute need for things like this and to hopefully minimize the patching for it as much as possible.I do however need other headers for it to build it. (I just already had to bypass the unistd.hissue on it because of my needs for it to only import Windows DLL's that are only present on fresh and clean windows installs) I perfer this because there are many times I have to install Windows clean from Windows updates breaking Windows completely on me (which happens at a 99.999999999% chance).So, instead of just shipping dirent.h it would be nice if this also ships the other common headers so that way people can build any unix programs in Visual Studio perfectly without the need for cygwin or mingw to begin with. But then people would use it to build gcc / g++ using Visual Studio as well (and it would make it easy to do so tbh).

Note to self. Git has an internal compatibility layer which implements dirent.h, unistd.h and a couple of other headers for Visual Studio. See vcbuild and win32 directories at https://github.com/git/git/tree/master/compat

At least unistd.h would be an interesting addition as it contains file handling functions and macros that are often used with dirent.

My opinion: This issue should not be the scope of this repository (which is called "dirent" after all). It should therefore be closed.

If necessary, create a new repository for "unix-compatibility" or something. But in my opinion there are other projects which already fill that niche too (msys / cygwin / mingw for example).

Thanks for your comments! You have a valid point and I am closing this issue as you suggest.

Full-blown Linux compatibility on top of Visual Studio's standard headers might be impossible anyway and companion headers like unistd.h and stat.h which are often used with dirent.h might be better implemented as separate projects in GitHub.