Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
commit34b6df19a4dafe0227ab663c971079e68e17f393
authorEli Zaretskii <eliz@gnu.org>
Thu, 6 Oct 2016 15:08:31 +0000 (6 18:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 6 Oct 2016 15:08:31 +0000 (6 18:08 +0300)
tree0de552eb621d62e870215cab1b0c2db9530b649f
parent4ef9ea2b2ad0db53d674ce6c691b605d894ae558
Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2

* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.

* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc.  This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.

* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier.  (Bug#24613)

Do not merge to master!
nt/inc/ms-w32.h
nt/inc/sys/stat.h
src/image.c