summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2019-05-15 10:54:42 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2019-05-27 01:19:49 -0400
commit4b2287681e1610ad9fdc665c50f4f1476d856060 (patch)
tree4a2f3e6f3ff0db4fad25551430dd6709c43a17a1
parent2d0cf6252957b8980d89481ecd0b79891da4b14b (diff)
downloadhaskell-4b2287681e1610ad9fdc665c50f4f1476d856060.tar.gz
Lowercase windows imports
While windows and macOS are currently on case-insensitive file systems, this poses no issue on those. When cross compiling from linux with a case sensitive file system and mingw providing only lowercase headers, this in fact produces an issue. As such we just lowercase the import headers, which should still work fine on a case insensitive file system and also enable mingw's headers to be usable porperly.
-rw-r--r--driver/utils/dynwrapper.c4
-rw-r--r--rules/build-prog.mk4
2 files changed, 4 insertions, 4 deletions
diff --git a/driver/utils/dynwrapper.c b/driver/utils/dynwrapper.c
index 7fb06e5945..1e30ce9d00 100644
--- a/driver/utils/dynwrapper.c
+++ b/driver/utils/dynwrapper.c
@@ -9,8 +9,8 @@ int rtsOpts;
#include <stdarg.h>
#include <stdio.h>
-#include <Windows.h>
-#include <Shlwapi.h>
+#include <windows.h>
+#include <shlwapi.h>
#include "Rts.h"
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index bc37110bd5..5d5f0e3ca3 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -230,7 +230,7 @@ endif
$1/$2/build/tmp/$$($1_$2_PROG)-inplace-wrapper.c: driver/utils/dynwrapper.c | $$$$(dir $$$$@)/.
$$(call removeFiles,$$@)
- echo '#include <Windows.h>' >> $$@
+ echo '#include <windows.h>' >> $$@
echo '#include "Rts.h"' >> $$@
echo 'LPTSTR path_dirs[] = {' >> $$@
$$(foreach d,$$($1_$2_DEP_LIB_REL_DIRS),$$(call make-command,echo ' TEXT("/../../$$d")$$(comma)' >> $$@))
@@ -243,7 +243,7 @@ $1/$2/build/tmp/$$($1_$2_PROG)-inplace-wrapper.c: driver/utils/dynwrapper.c | $$
$1/$2/build/tmp/$$($1_$2_PROG)-wrapper.c: driver/utils/dynwrapper.c | $$$$(dir $$$$@)/.
$$(call removeFiles,$$@)
- echo '#include <Windows.h>' >> $$@
+ echo '#include <windows.h>' >> $$@
echo '#include "Rts.h"' >> $$@
echo 'LPTSTR path_dirs[] = {' >> $$@
$$(foreach p,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),$$(call make-command,echo ' TEXT("/../lib/$$p")$$(comma)' >> $$@))