Browse Source

portability: make z/OS a flavour of Unix

Now the platform files for Unix and z/OS are no longer mutually exclusive.
IOSAD-230
Luca Saiu 6 months ago
parent
commit
f83479f7e5
2 changed files with 13 additions and 5 deletions
  1. +2
    -0
      Makefile.conf
  2. +11
    -5
      src/platform.h

+ 2
- 0
Makefile.conf View File

@ -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.


+ 11
- 5
src/platform.h View File

@ -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


Loading…
Cancel
Save