CppCMS

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

config.h
1 //
2 // Copyright (C) 2009-2012 Artyom Beilis (Tonkikh)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 #ifndef BOOSTER_CONFIG_H
9 #define BOOSTER_CONFIG_H
10
11 #if defined(__WIN32) || defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
12 # define BOOSTER_SYMBOL_VISIBLE
13 # if defined(DLL_EXPORT)
14 # if defined(BOOSTER_SOURCE)
15 # define BOOSTER_API __declspec(dllexport)
16 # else
17 # define BOOSTER_API __declspec(dllimport)
18 # endif
19 # else
20 # define BOOSTER_API
21 # endif
22 #else // ELF BINARIES
23 # if defined(BOOSTER_SOURCE) && defined(BOOSTER_VISIBILITY_SUPPORT)
24 # define BOOSTER_API __attribute__ ((visibility("default")))
25 # define BOOSTER_SYMBOL_VISIBLE __attribute__ ((visibility("default")))
26 # else
27 # define BOOSTER_API
28 # define BOOSTER_SYMBOL_VISIBLE
29 # endif
30 #endif
31
32 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
33 #define BOOSTER_WIN_NATIVE
34 #endif
35
36 #if defined(__CYGWIN__)
37 #define BOOSTER_CYGWIN
38 #endif
39
40 #if defined(BOOSTER_WIN_NATIVE) || defined(BOOSTER_CYGWIN)
41 #define BOOSTER_WIN32
42 #endif
43
44 #if !defined(BOOSTER_WIN_NATIVE)
45 #define BOOSTER_POSIX
46 #endif
47
48 #if defined(_MSC_VER)
49 #define BOOSTER_MSVC
50 // This warning is really not revevant
51 #pragma warning (disable: 4275 4251)
52 #endif
53
54
55 #undef BOOSTER_HAS_CHAR16_T
56 #undef BOOSTER_HAS_CHAR32_T
57 #undef BOOSTER_NO_STD_WSTRING
58 #undef BOOSTER_NO_SWPRINTF
59
60 #ifdef __GNUC__
61 # define BOOSTER_GCC
62 #endif
63
64 #if defined(__GNUC__) && __GNUC__ < 4
65 # define BOOSTER_GCC3
66 #endif
67
68 #if defined(__CYGWIN__) || (defined(BOOSTER_WIN32) && defined(BOOSTER_GCC3))
69 # define BOOSTER_NO_STD_WSTRING
70 #endif
71
72 #if defined(BOOSTER_WIN32) && defined(BOOSTER_GCC)
73 # define BOOST_NO_SWPRINTF
74 #endif
75
76 #if defined __GNUC__ || defined __clang__
77 #define BOOSTER_UNUSED __attribute__((unused))
78 #else
79 #define BOOSTER_UNUSED
80 #endif
81
82 #if defined __clang__
83 #define BOOSTER_UNUSED_MEMBER __attribute__((unused))
84 #else
85 #define BOOSTER_UNUSED_MEMBER
86 #endif
87
88
89 #endif