aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nt/inc/ms-w32.h1
-rw-r--r--nt/inc/sys/stat.h8
-rw-r--r--src/image.c17
3 files changed, 26 insertions, 0 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index d1534336c49..b4eb5622242 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -146,6 +146,7 @@ extern char *getenv ();
146 in its system headers, and is not really compatible with values 146 in its system headers, and is not really compatible with values
147 lower than 0x0500, so leave it alone. */ 147 lower than 0x0500, so leave it alone. */
148#ifndef MINGW_W64 148#ifndef MINGW_W64
149# undef _WIN32_WINNT
149# define _WIN32_WINNT 0x0400 150# define _WIN32_WINNT 0x0400
150#endif 151#endif
151 152
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index 45bc2ea1e0c..ea14f075471 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -30,6 +30,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30# define __MINGW_NOTHROW 30# define __MINGW_NOTHROW
31#endif 31#endif
32 32
33/* Prevent the MinGW stat.h header from being included, ever. */
34#ifndef _SYS_STAT_H
35# define _SYS_STAT_H
36#endif
37#ifndef _INC_STAT_H
38# define _INC_STAT_H
39#endif
40
33#include <sys/types.h> 41#include <sys/types.h>
34#include <time.h> 42#include <time.h>
35 43
diff --git a/src/image.c b/src/image.c
index a85d5149e7e..78539d91d2b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8994,10 +8994,27 @@ svg_image_p (Lisp_Object object)
8994 return fmt[SVG_FILE].count + fmt[SVG_DATA].count == 1; 8994 return fmt[SVG_FILE].count + fmt[SVG_DATA].count == 1;
8995} 8995}
8996 8996
8997/* Some versions of glib's gatomic.h define MemoryBarrier, but MinGW
8998 w32api 3.18 and later has its own definition. The following gross
8999 hack avoids the clash. */
9000# ifdef WINDOWSNT
9001# if (__W32API_MAJOR_VERSION + (__W32API_MINOR_VERSION >= 18)) >= 4
9002# define W32_SAVE_MINGW_VERSION __MINGW_MAJOR_VERSION
9003# undef __MINGW_MAJOR_VERSION
9004# define __MINGW_MAJOR_VERSION 4
9005# endif
9006# endif
9007
8997# include <librsvg/rsvg.h> 9008# include <librsvg/rsvg.h>
8998 9009
8999# ifdef WINDOWSNT 9010# ifdef WINDOWSNT
9000 9011
9012# ifdef W32_SAVE_MINGW_VERSION
9013# undef __MINGW_MAJOR_VERSION
9014# define __MINGW_MAJOR_VERSION W32_SAVE_MINGW_VERSION
9015# undef W32_SAVE_MINGW_VERSION
9016# endif
9017
9001/* SVG library functions. */ 9018/* SVG library functions. */
9002DEF_DLL_FN (RsvgHandle *, rsvg_handle_new, (void)); 9019DEF_DLL_FN (RsvgHandle *, rsvg_handle_new, (void));
9003DEF_DLL_FN (void, rsvg_handle_get_dimensions, 9020DEF_DLL_FN (void, rsvg_handle_get_dimensions,