1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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!
This commit is contained in:
Eli Zaretskii 2016-10-06 18:08:31 +03:00
parent 4ef9ea2b2a
commit 34b6df19a4
3 changed files with 26 additions and 0 deletions

View file

@ -30,6 +30,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
# define __MINGW_NOTHROW
#endif
/* Prevent the MinGW stat.h header from being included, ever. */
#ifndef _SYS_STAT_H
# define _SYS_STAT_H
#endif
#ifndef _INC_STAT_H
# define _INC_STAT_H
#endif
#include <sys/types.h>
#include <time.h>