diff --git a/supportApp/GraphicsMagickSrc/Magick++/lib/Makefile b/supportApp/GraphicsMagickSrc/Magick++/lib/Makefile index 60d78e04..d3d26c27 100644 --- a/supportApp/GraphicsMagickSrc/Magick++/lib/Makefile +++ b/supportApp/GraphicsMagickSrc/Magick++/lib/Makefile @@ -26,6 +26,10 @@ ifeq ($(WITH_GRAPHICSMAGICK),YES) ifeq ($(GRAPHICSMAGICK_PREFIX_SYMBOLS),YES) USR_CXXFLAGS += -DPREFIX_MAGICK_SYMBOLS endif + ifeq (mingw, $(findstring mingw, $(T_A))) + # multiple definition of `_Unwind_Resume on Linux. I don't know how to fix it. + USR_LDFLAGS += -Wl,-allow-multiple-definition + endif USR_INCLUDES += -I$(TOP)/supportApp/GraphicsMagickSrc USR_INCLUDES += -I$(TOP)/supportApp/GraphicsMagickSrc/lcms/include diff --git a/supportApp/GraphicsMagickSrc/coders/Makefile b/supportApp/GraphicsMagickSrc/coders/Makefile index cdc95d7f..ebecc99d 100644 --- a/supportApp/GraphicsMagickSrc/coders/Makefile +++ b/supportApp/GraphicsMagickSrc/coders/Makefile @@ -204,7 +204,7 @@ ifeq ($(WITH_GRAPHICSMAGICK),YES) endif endif - LIB_SYS_LIBS_WIN32 += User32 Gdi32 OleAut32 + LIB_SYS_LIBS_WIN32 += user32 gdi32 oleaut32 endif # ($(GRAPHICSMAGICK_EXTERNAL),NO) endif # ($(WITH_GRAPHICSMAGICK),YES) diff --git a/supportApp/GraphicsMagickSrc/magick/Makefile b/supportApp/GraphicsMagickSrc/magick/Makefile index 952f26e9..819c917a 100644 --- a/supportApp/GraphicsMagickSrc/magick/Makefile +++ b/supportApp/GraphicsMagickSrc/magick/Makefile @@ -209,7 +209,7 @@ ifeq ($(WITH_GRAPHICSMAGICK),YES) endif endif - LIB_SYS_LIBS_WIN32 += Advapi32 User32 Gdi32 + LIB_SYS_LIBS_WIN32 += advapi32 user32 gdi32 LIB_SYS_LIBS_Linux += Xext endif # ($(GRAPHICSMAGICK_EXTERNAL),NO) diff --git a/supportApp/GraphicsMagickSrc/ttf/Makefile b/supportApp/GraphicsMagickSrc/ttf/Makefile index 12287669..7be94f10 100644 --- a/supportApp/GraphicsMagickSrc/ttf/Makefile +++ b/supportApp/GraphicsMagickSrc/ttf/Makefile @@ -1,7 +1,6 @@ TOP = ../../.. include $(TOP)/configure/CONFIG -DIRS += builds DIRS += src include $(TOP)/configure/RULES_DIRS diff --git a/supportApp/bloscSrc/blosc/blosc.c b/supportApp/bloscSrc/blosc/blosc.c index d858c517..6d82fb19 100644 --- a/supportApp/bloscSrc/blosc/blosc.c +++ b/supportApp/bloscSrc/blosc/blosc.c @@ -54,7 +54,7 @@ #include #endif /* _WIN32 */ -#if defined(_WIN32) && !defined(__GNUC__) +#if defined(_WIN32) #include "win32/pthread.h" #include "win32/pthread.c" #else diff --git a/supportApp/hdf5Src/H5win32defs.h b/supportApp/hdf5Src/H5win32defs.h index 0149faa9..6ead9217 100644 --- a/supportApp/hdf5Src/H5win32defs.h +++ b/supportApp/hdf5Src/H5win32defs.h @@ -78,13 +78,16 @@ typedef __int64 h5_stat_size_t; */ #define HDmemset(X,C,Z) memset((void*)(X),C,Z) +#ifndef _TIMEZONE_DEFINED +#define _TIMEZONE_DEFINED struct timezone { int tz_minuteswest; int tz_dsttime; }; +#endif /* time.h before VS2015 does not include timespec */ -#if (_MSC_VER < 1900) +#if defined (_MSC_VER) && (_MSC_VER < 1900) struct timespec { time_t tv_sec; /* Seconds - >= 0 */ diff --git a/supportApp/xml2Src/os/default/libxml/xmlexports.h b/supportApp/xml2Src/os/default/libxml/xmlexports.h index 2c79f814..99b1f317 100644 --- a/supportApp/xml2Src/os/default/libxml/xmlexports.h +++ b/supportApp/xml2Src/os/default/libxml/xmlexports.h @@ -51,7 +51,7 @@ /** DOC_DISABLE */ /* Windows platform with MS compiler */ -#if defined(_WIN32) && defined(_MSC_VER) +#if defined(_WIN32) && (defined(_MSC_VER) || defined(__MINGW32__)) #undef XMLPUBFUN #undef XMLPUBVAR #undef XMLCALL @@ -60,10 +60,11 @@ #define XMLPUBFUN __declspec(dllexport) #define XMLPUBVAR __declspec(dllexport) #else - #define XMLPUBFUN #if !defined(LIBXML_STATIC) #define XMLPUBVAR __declspec(dllimport) extern + #define XMLPUBFUN __declspec(dllimport) #else + #define XMLPUBFUN #define XMLPUBVAR extern #endif #endif @@ -102,35 +103,6 @@ #endif #endif -/* Windows platform with GNU compiler (Mingw) */ -#if defined(_WIN32) && defined(__MINGW32__) - #undef XMLPUBFUN - #undef XMLPUBVAR - #undef XMLCALL - #undef XMLCDECL - /* - * if defined(IN_LIBXML) this raises problems on mingw with msys - * _imp__xmlFree listed as missing. Try to workaround the problem - * by also making that declaration when compiling client code. - */ - #if defined(IN_LIBXML) && !defined(LIBXML_STATIC) - #define XMLPUBFUN __declspec(dllexport) - #define XMLPUBVAR __declspec(dllexport) extern - #else - #define XMLPUBFUN - #if !defined(LIBXML_STATIC) - #define XMLPUBVAR __declspec(dllimport) extern - #else - #define XMLPUBVAR extern - #endif - #endif - #define XMLCALL __cdecl - #define XMLCDECL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - /* Cygwin platform, GNU compiler */ #if defined(_WIN32) && defined(__CYGWIN__) #undef XMLPUBFUN diff --git a/supportApp/xml2Src/xmllint.c b/supportApp/xml2Src/xmllint.c index 67f7adb2..79ac0159 100644 --- a/supportApp/xml2Src/xmllint.c +++ b/supportApp/xml2Src/xmllint.c @@ -6,6 +6,7 @@ * daniel@veillard.com */ +#define IN_LIBXML #include "libxml.h" #include