diff --git a/Makefile.conf b/Makefile.conf index 16bbd5f7..f19639ec 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -103,6 +103,8 @@ else ifeq ($(BUILD_FOR),Darwin) CPPFLAGS+= -DUNIX -DDARWIN else ifeq ($(BUILD_FOR),OS/390) CPPFLAGS+= -DZOS + # z/OS, the way we use it, is a flavour of Unix. + CPPFLAGS+= -DUNIX endif # Add platform-specific compilation options. diff --git a/src/platform.h b/src/platform.h index bcef6e84..4efb51f7 100644 --- a/src/platform.h +++ b/src/platform.h @@ -11,12 +11,18 @@ extern "C" { #endif -#if defined (_WIN32) -# include "platform_windows.h" -#elif defined (UNIX) -# include "platform_unix.h" -#elif defined (ZOS) +/* Right now z/OS is not mutually exclusive with the other platforms: the way we + use it, it is a flavour of Unix... */ +#if defined (ZOS) # include "platform_zos.h" +#endif + +/* ...However the other platforms are indeed mutually exclusive. */ +#if defined (UNIX) +# include "platform_unix.h" +#elif defined (_WIN32) +# include "platform_windows.h" +/* In case of need we might add Darwin or Android here. */ #else # error "unknown platform" #endif