X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fplatform.h;h=02513071f7988999d00ddbf1046dd5a4810a566a;hb=228a5718ede5ee00512ed2e333b3cee47baa124c;hp=903f1165012131a01990fab5fd5eec37c19a1478;hpb=4bca9bc5f299a9b287134b06e41b147f506792b4;p=rocksndiamonds.git diff --git a/src/platform.h b/src/platform.h index 903f1165..02513071 100644 --- a/src/platform.h +++ b/src/platform.h @@ -14,6 +14,8 @@ #ifndef PLATFORM_H #define PLATFORM_H +/* define keywords for supported main platforms */ + #if defined(MSDOS) #define PLATFORM_MSDOS #elif defined(WIN32) @@ -22,4 +24,24 @@ #define PLATFORM_UNIX #endif +/* define additional keywords for several Unix platforms */ + +#if defined(linux) +#define PLATFORM_LINUX +#endif + +#if defined(__FreeBSD__) +#define PLATFORM_FREEBSD +#endif + +/* detecting HP-UX by the following compiler keyword definitions: + - in K&R mode (the default), the HP C compiler defines "hpux" + - in ANSI mode (-Aa or -Ae), the HP C compiler defines "__hpux" + - the gcc (Gnu) C compiler defines "__hpux__" + Thanks to Jarkko Hietaniemi for this note. */ + +#if defined(__hpux__) || defined(__hpux) || defined(hpux) +#define PLATFORM_HPUX +#endif + #endif /* PLATFORM_H */