CppCMS
booster/config.h
00001 //
00002 //  Copyright (C) 2009-2012 Artyom Beilis (Tonkikh)
00003 //
00004 //  Distributed under the Boost Software License, Version 1.0. (See
00005 //  accompanying file LICENSE_1_0.txt or copy at
00006 //  http://www.boost.org/LICENSE_1_0.txt)
00007 //
00008 #ifndef BOOSTER_CONFIG_H
00009 #define BOOSTER_CONFIG_H
00010 
00011 #if defined(__WIN32) || defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
00012 #       define BOOSTER_SYMBOL_VISIBLE
00013 #       if defined(DLL_EXPORT)
00014 #               if defined(BOOSTER_SOURCE)
00015 #                       define BOOSTER_API __declspec(dllexport)
00016 #               else
00017 #                       define BOOSTER_API __declspec(dllimport)
00018 #               endif
00019 #       else
00020 #               define BOOSTER_API
00021 #       endif
00022 #else // ELF BINARIES
00023 #       if defined(BOOSTER_SOURCE) && defined(BOOSTER_VISIBILITY_SUPPORT)
00024 #               define BOOSTER_API __attribute__ ((visibility("default")))
00025 #               define BOOSTER_SYMBOL_VISIBLE __attribute__ ((visibility("default")))
00026 #       else
00027 #               define BOOSTER_API
00028 #               define BOOSTER_SYMBOL_VISIBLE
00029 #       endif
00030 #endif
00031 
00032 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
00033 #define BOOSTER_WIN_NATIVE
00034 #endif
00035 
00036 #if defined(__CYGWIN__)
00037 #define BOOSTER_CYGWIN
00038 #endif
00039 
00040 #if defined(BOOSTER_WIN_NATIVE) || defined(BOOSTER_CYGWIN)
00041 #define BOOSTER_WIN32
00042 #endif
00043 
00044 #if !defined(BOOSTER_WIN_NATIVE)
00045 #define BOOSTER_POSIX
00046 #endif
00047 
00048 #if defined(_MSC_VER)
00049 #define BOOSTER_MSVC
00050 // This warning is really not revevant
00051 #pragma warning (disable: 4275 4251) 
00052 #endif
00053 
00054 
00055 #undef BOOSTER_HAS_CHAR16_T
00056 #undef BOOSTER_HAS_CHAR32_T
00057 #undef BOOSTER_NO_STD_WSTRING
00058 #undef BOOSTER_NO_SWPRINTF
00059 
00060 #ifdef __GNUC__ 
00061 #  define BOOSTER_GCC
00062 #endif
00063 
00064 #if defined(__GNUC__) && __GNUC__ < 4
00065 #  define BOOSTER_GCC3
00066 #endif
00067 
00068 #if defined(__CYGWIN__) || (defined(BOOSTER_WIN32) && defined(BOOSTER_GCC3))
00069 #  define BOOSTER_NO_STD_WSTRING
00070 #endif
00071 
00072 #if defined(BOOSTER_WIN32) && defined(BOOSTER_GCC)
00073 #  define BOOST_NO_SWPRINTF 
00074 #endif
00075 
00076 
00077 #endif /// BOOSTER_CONFIG_H