diff options
Diffstat (limited to 'programs/platform.h')
-rw-r--r-- | programs/platform.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/programs/platform.h b/programs/platform.h index c0b3840..ab8300d 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -77,16 +77,17 @@ extern "C" { * PLATFORM_POSIX_VERSION = -1 for non-Unix e.g. Windows * PLATFORM_POSIX_VERSION = 0 for Unix-like non-POSIX * PLATFORM_POSIX_VERSION >= 1 is equal to found _POSIX_VERSION -***************************************************************/ +************************************************************** */ #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) /* UNIX-like OS */ \ || defined(__midipix__) || defined(__VMS)) # if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) /* POSIX.1–2001 (SUSv3) conformant */ \ - || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MidnightBSD__) /* BSD distros */ + || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MidnightBSD__) /* BSD distros */ \ + || defined(__HAIKU__) # define PLATFORM_POSIX_VERSION 200112L # else # if defined(__linux__) || defined(__linux) # ifndef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 200112L /* use feature test macro */ +# define _POSIX_C_SOURCE 200809L /* use feature test macro */ # endif # endif # include <unistd.h> /* declares _POSIX_VERSION */ @@ -104,7 +105,7 @@ extern "C" { /*-********************************************* * Detect if isatty() and fileno() are available -************************************************/ +*********************************************** */ #if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) || (PLATFORM_POSIX_VERSION >= 200112L) || defined(__DJGPP__) # include <unistd.h> /* isatty */ # define IS_CONSOLE(stdStream) isatty(fileno(stdStream)) @@ -127,7 +128,7 @@ static __inline int IS_CONSOLE(FILE* stdStream) /****************************** * OS-specific Includes -******************************/ +***************************** */ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) # include <fcntl.h> /* _O_BINARY */ # include <io.h> /* _setmode, _fileno, _get_osfhandle */ |