sprint 1-alpha
|
00001 /****************************************************************************** 00002 * sprint::platform 00003 * 00004 * Copyright (C) 2005-2011 Paolo Medici <www.pmx.it> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 *******************************************************************************/ 00021 00022 #ifndef _SPRINT_PLATFORM_H 00023 #define _SPRINT_PLATFORM_H 00024 00028 // linux/unix -> LINUX 00029 #if defined linux || defined unix || defined __unix__ 00030 # define LINUX 00031 #endif 00032 00033 #if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__ICL) && !defined (__COMO__) 00034 /**** WINDOWS: Microsoft Visual C ****/ 00035 00036 #define COMPILER_MS 00037 #define PLATFORM_WIN 00038 00039 // avoid winsock.h inclusion 00040 #define WIN32_LEAN_AND_MEAN 00041 00042 // avoid min max macros 00043 #define NOMINMAX 00044 00045 // avoid bogus warning 00046 #ifndef _CRT_SECURE_NO_WARNINGS 00047 # define _CRT_SECURE_NO_WARNINGS 00048 #endif 00049 00050 #elif defined(__DJGPP) 00051 /**** WINDOWS: DJGPP ****/ 00052 00053 #define COMPILER_DJGPP 00054 #define PLATFORM_WIN 00055 00056 #elif defined(__MINGW32__) 00057 /**** WINDOWS: MINGW32 ****/ 00058 00059 #define COMPILER_GCC 00060 #define PLATFORM_WIN 00061 00062 // avoid winsock.h inclusion 00063 #define WIN32_LEAN_AND_MEAN 00064 00065 #elif defined (__BORLANDC__) 00066 /**** WINDOWS: BORLANDC ****/ 00067 00068 #define COMPILER_BORLAND 00069 #define PLATFORM_WIN 00070 00071 #if ( __BORLANDC__ < 0x520 ) 00072 00073 #endif 00074 00075 #elif __CYGWIN__ 00076 /***** WINDOWS: CYGWIN ****/ 00077 00078 #define COMPILER_GCC 00079 #define PLATFORM_WIN 00080 00081 #endif 00082 00083 00084 #if !defined(PLATFORM_WIN) && ( (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) ) 00085 # define PLATFORM_WIN 00086 #endif 00087 00088 #endif