From 276e557f9ce5d462ceb1b135d6d51ff0d231b165 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Tue, 1 Mar 2016 11:43:36 +0000 Subject: [PATCH] tweaks git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39433 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Headers/GNUstepBase/GSConfig.h.in | 30 ++++++++++++++++++++++++++---- Source/win32/GSFileHandle.m | 2 +- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 971c766ad..d9b25af9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-03-01 Richard Frith-Macdonald + + Modifications to last batch of changes in order to get the code to + build again on 32bit msys/mingw + 2016-03-01 Seong Gu Lee * Headers/GNUstepBase/GSConfig.h.in: diff --git a/Headers/GNUstepBase/GSConfig.h.in b/Headers/GNUstepBase/GSConfig.h.in index b46e16c00..2ff6c1f32 100644 --- a/Headers/GNUstepBase/GSConfig.h.in +++ b/Headers/GNUstepBase/GSConfig.h.in @@ -29,21 +29,43 @@ #ifndef included_GSConfig_h #define included_GSConfig_h -#if defined(__WIN32__) || defined(_WIN32) || defined(__MS_WIN32__) +/* Check the compiler to see if we are building on/for ms-windows. + * Whatever the compiler uses, we want a standard setting of __WIN32__ + * for a windows build. + */ +#if defined(__WIN32__) \ + || defined(_WIN32) \ + || defined(__MS_WIN32__) \ + || defined(__MINGW64__) # if !defined(__WIN32__) # define __WIN32__ # endif #endif -#if defined(__MINGW32__) || defined(__MINGW64__) -# if !defined(__MINGW__) -# define __MINGW__ +/* Check the compiler to see if we are building on/for 64bit ms-windows. + * Whatever the compiler uses, we want a standard setting of __WIN64__ + * to indicate 64bit AND __WIN32__ to indicate ms-windows. + */ +#if defined(__WIN64__) \ + || defined(_WIN64) \ + || defined(__MS_WIN64__) \ + || defined(__MINGW64__) +# if !defined(__WIN64__) +# define __WIN64__ # endif # if !defined(__WIN32__) # define __WIN32__ # endif #endif +/* Check to see if this is a MINGW build (all we currently support) + */ +#if defined(__MINGW32__) || defined(__MINGW64__) +# if !defined(__MINGW__) +# define __MINGW__ +# endif +#endif + // Make sure we expose the constants that we use in ObjC++ mode #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS 1 diff --git a/Source/win32/GSFileHandle.m b/Source/win32/GSFileHandle.m index 4aab1f9ef..fc9f06db0 100644 --- a/Source/win32/GSFileHandle.m +++ b/Source/win32/GSFileHandle.m @@ -23,8 +23,8 @@ */ /* mingw wants winsock2.h before windows.h */ -#include #include +#include #include "common.h"