dougbinks / enkiTS

A permissively licensed C and C++ Task Scheduler for creating parallel programs. Requires C++11 support.
zlib License
1.66k stars 138 forks source link

Change `Windows.h` to `windows.h` to help with cross-compilation. #123

Closed HolyBlackCat closed 2 months ago

HolyBlackCat commented 2 months ago

Hello!

Currently this library can't be cross-compiled to Windows from e.g. Linux, because the header names are case-sensitive there, and you're using #include <Windows.h>, while mingw has this file named windows.h (lowercase).

I've changed it to lowercase everywhere.

dougbinks commented 2 months ago

The Windows.h header supplied by Microsoft has an upper case first letter (at least for a couple of decades), so the real issue is that the windows.h header used for cross compilation has an incorrect first letter. It may be worth filing an issue with the cross compilation toolkit.

As for this workaround, Windows NTFS can be case-sensitive, but since this is per-folder I believe it's unlikely that the SDK folders will have this set, and thus it should be safe to use this workaround. I will test and merge when I get some time.

dougbinks commented 2 months ago

Merged, many thanks for the PR!