summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/WinAPI')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
index 681e519bf..cda8c1b36 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
@@ -39,6 +39,15 @@
#include <direct.h>
#include <io.h>
#include <fcntl.h>
+
+// We must define _WIN32_IE at least to 0x0500 before inclusion of 'shlobj.h' to enable
+// the declaration of SHGFP_TYPE_CURRENT for some older versions of MinGW, notably
+// header versions 5.3.0 and earlier, whereas 5.4.2 seems to define _WIN32_IE as needed.
+#if !(defined _WIN32_IE) || (_WIN32_IE < 0x0500)
+# undef _WIN32_IE
+# define _WIN32_IE 0x0500
+#endif /* _WIN32_WINNT checks */
+
#include <shlobj.h>
// function pointer for the UuidCreate Function