X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fplatform.h;h=7ac79f3bbeb2f43ab13376aa12b414a0e21abbe5;hb=dff0e0c8702770fe23992f07964ebe9ed54e9f7c;hp=94c5c4a8bc994d0785b49e359f4c46ed67fdf14d;hpb=c9433eab5c4317ed4f89164b386a7d33562e29be;p=rocksndiamonds.git diff --git a/src/libgame/platform.h b/src/libgame/platform.h index 94c5c4a8..7ac79f3b 100644 --- a/src/libgame/platform.h +++ b/src/libgame/platform.h @@ -1,7 +1,7 @@ /*********************************************************** * Artsoft Retro-Game Library * *----------------------------------------------------------* -* (c) 1994-2002 Artsoft Entertainment * +* (c) 1994-2006 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -20,12 +20,16 @@ #if defined(MSDOS) #define PLATFORM_MSDOS +#define PLATFORM_STRING "DOS" #elif defined(WIN32) #define PLATFORM_WIN32 +#define PLATFORM_STRING "Windows" #else #define PLATFORM_UNIX +#define PLATFORM_STRING "Unix" #endif + /* ========================================================================= */ /* define additional keywords for MS-DOS platform */ /* ========================================================================= */ @@ -42,6 +46,7 @@ #endif + /* ========================================================================= */ /* define additional keywords for several Unix platforms */ /* ========================================================================= */ @@ -52,26 +57,47 @@ #if defined(linux) #define PLATFORM_LINUX +#undef PLATFORM_STRING +#define PLATFORM_STRING "Linux" #endif #if defined(__FreeBSD__) #define PLATFORM_FREEBSD +#define PLATFORM_BSD +#undef PLATFORM_STRING +#define PLATFORM_STRING "FreeBSD" #endif #if defined(__NetBSD__) #define PLATFORM_NETBSD +#define PLATFORM_BSD +#undef PLATFORM_STRING +#define PLATFORM_STRING "NetBSD" #endif #if defined(__bsdi__) #define PLATFORM_BSDI +#define PLATFORM_BSD +#undef PLATFORM_STRING +#define PLATFORM_STRING "BSDI" #endif -#if defined(sparc) || defined(sun) -#define PLATFORM_SOLARIS +#if defined(sparc) && defined(sun) +#define PLATFORM_SUNOS +#undef PLATFORM_STRING +#define PLATFORM_STRING "Solaris" #endif #if defined(__APPLE__) && defined(__MACH__) #define PLATFORM_MACOSX +#undef PLATFORM_STRING +#define PLATFORM_STRING "Mac OS X" +#endif + +#if defined(NeXT) +#define PLATFORM_NEXT +#undef PLATFORM_STRING +#define PLATFORM_STRING "NeXT" #endif /* detecting HP-UX by the following compiler keyword definitions: @@ -82,6 +108,17 @@ #if defined(__hpux__) || defined(__hpux) || defined(hpux) #define PLATFORM_HPUX +#undef PLATFORM_STRING +#define PLATFORM_STRING "HP-UX" +#endif + + +/* ========================================================================= */ +/* this should better go into "system.h" or "features.h" (yet to be created) */ +/* ========================================================================= */ + +#if defined(PLATFORM_UNIX) || defined(TARGET_SDL) +#define NETWORK_AVALIABLE #endif #endif /* PLATFORM_H */