2001-10-06 14:13:28 +00:00
|
|
|
#ifndef COMMON_H
|
|
|
|
#define COMMON_H
|
|
|
|
|
|
|
|
#if defined(__linux__)
|
|
|
|
|
|
|
|
#define CONFIG_PLATFORM_LINUX
|
|
|
|
#define CONFIG_PLATFORM_UNIX
|
|
|
|
#define CONFIG_TYPES_X11
|
|
|
|
#define CONFIG_PTHREADS
|
|
|
|
|
|
|
|
#elif defined(__sun__)
|
|
|
|
|
|
|
|
#define CONFIG_PLATFORM_SOLARIS
|
|
|
|
#define CONFIG_PLATFORM_UNIX
|
|
|
|
#define CONFIG_TYPES_X11
|
|
|
|
#define CONFIG_PTHREADS
|
|
|
|
|
2001-11-19 00:33:36 +00:00
|
|
|
#elif defined(_WIN32)
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
#define CONFIG_PLATFORM_WIN32
|
|
|
|
|
2001-11-19 00:33:36 +00:00
|
|
|
#if (_MSC_VER >= 1200)
|
2002-05-30 16:13:16 +00:00
|
|
|
// work around for statement scoping bug
|
|
|
|
#define for if (false) { } else for
|
|
|
|
|
2002-05-22 16:43:14 +00:00
|
|
|
// turn off bonehead warnings
|
2001-11-19 00:33:36 +00:00
|
|
|
#pragma warning(disable: 4786) // identifier truncated in debug info
|
2002-06-01 19:26:11 +00:00
|
|
|
#pragma warning(disable: 4514) // unreferenced inline function removed
|
2002-05-22 16:43:14 +00:00
|
|
|
|
2002-06-08 21:48:00 +00:00
|
|
|
// this one's a little too aggressive
|
|
|
|
#pragma warning(disable: 4127) // conditional expression is constant
|
|
|
|
|
2002-05-22 16:43:14 +00:00
|
|
|
#endif // (_MSC_VER >= 1200)
|
2001-11-19 00:33:36 +00:00
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
#error unsupported platform
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|