Lunchbox  1.6.0
os.h
00001  
00002 /* Copyright (c) 2005-2012, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00019 #ifndef LUNCHBOX_OS_H
00020 #define LUNCHBOX_OS_H
00021 
00022 #include <lunchbox/defines.h>
00023 #include <lunchbox/compiler.h>
00024 
00025 #ifdef _WIN32
00026 #  ifndef _MSC_VER
00027 #    define USE_SYS_TYPES_FD_SET
00028 #  endif
00029 #  ifndef _WIN32_WINNT // Hopefully to higher than 0x500...
00030 #     define _WIN32_WINNT 0x501 // => XP, for WM_XBUTTONDOWN and others
00031 #  endif
00032 #  define _USE_MATH_DEFINES
00033 #  define WIN32_LEAN_AND_MEAN
00034 #  ifndef NOMINMAX
00035 #    define NOMINMAX
00036 #  endif
00037 #  include <winsock2.h>
00038 #  include <windows.h>
00039 #  include <windef.h>
00040 #endif
00041 
00042 #include <cmath>
00043 #include <cstdio>
00044 #include <cstdlib>
00045 
00046 #ifndef _MSC_VER
00047 #  include <stdint.h>
00048 #  include <sys/param.h>  // for MIN/MAX
00049 #endif
00050 
00051 #ifdef __APPLE__
00052 #  include <crt_externs.h>
00053 #  define environ (*_NSGetEnviron())
00054 #elif !defined(_WIN32)
00055 extern "C" char **environ;
00056 #endif
00057 
00058 #endif //LUNCHBOX_OS_H