rnd-20001130-1-src
[rocksndiamonds.git] / src / platform.h
index 903f1165012131a01990fab5fd5eec37c19a1478..02513071f7988999d00ddbf1046dd5a4810a566a 100644 (file)
@@ -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)
 #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 */