2001-10-06 18:13:28 +04: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 03:33:36 +03:00
|
|
|
#elif defined(_WIN32)
|
2001-10-06 18:13:28 +04:00
|
|
|
|
|
|
|
#define CONFIG_PLATFORM_WIN32
|
|
|
|
|
2001-11-19 03:33:36 +03:00
|
|
|
#if (_MSC_VER >= 1200)
|
2002-05-22 20:43:14 +04:00
|
|
|
// turn off bonehead warnings
|
2001-11-19 03:33:36 +03:00
|
|
|
#pragma warning(disable: 4786) // identifier truncated in debug info
|
2002-05-22 20:43:14 +04:00
|
|
|
|
|
|
|
//
|
|
|
|
// ignore warnings inside microsoft's standard C++ library
|
|
|
|
//
|
|
|
|
// bonehead bugs/warnings
|
|
|
|
#pragma warning(disable: 4097) // typedef-name used as synonym
|
|
|
|
#pragma warning(disable: 4511) // copy constructor can't be generated
|
|
|
|
#pragma warning(disable: 4512) // assignment operator can't be generated
|
|
|
|
|
|
|
|
// we'd really rather have these enabled to check our code
|
|
|
|
#pragma warning(disable: 4100) // unreferenced formal parameter
|
|
|
|
#endif // (_MSC_VER >= 1200)
|
2001-11-19 03:33:36 +03:00
|
|
|
|
2001-10-06 18:13:28 +04:00
|
|
|
#else
|
|
|
|
|
|
|
|
#error unsupported platform
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|