CppCMS

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

- File List
- File Members

defs.h
1 //
3 // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
4 //
5 // See accompanying file COPYING.TXT file for licensing details.
6 //
8 #ifndef CPPCMS_DEFS_H
9 #define CPPCMS_DEFS_H
10
11 #if defined(__WIN32) || defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
12 # if defined(DLL_EXPORT)
13 # if defined(CPPCMS_SOURCE) || defined(CPPCMS_LOCALE_SOURCE)
14 # define CPPCMS_API __declspec(dllexport)
15 # else
16 # define CPPCMS_API __declspec(dllimport)
17 # endif
18 # else
19 # define CPPCMS_API
20 # endif
21 #else // ELF BINARIES
22 # define CPPCMS_API
23 #endif
24
25 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
26 #define CPPCMS_WIN_NATIVE
27 #endif
28 #if defined(__CYGWIN__)
29 #define CPPCMS_CYGWIN
30 #endif
31
32 #if defined(CPPCMS_WIN_NATIVE) || defined(CPPCMS_CYGWIN)
33 #define CPPCMS_WIN32
34 #endif
35
36 #if !defined(CPPCMS_WIN_NATIVE)
37 #define CPPCMS_POSIX
38 #endif
39
40 #if defined __GNUC__ || defined __clang__
41 #define CPPCMS_DEPRECATED __attribute__((deprecated))
42 #elif defined _MSC_VER
43 #define CPPCMS_DEPRECATED __declspec(deprecated)
44 #else
45 #define CPPCMS_DEPRECATED
46 #endif
47
48 #if defined __GNUC__ || defined __clang__
49 #define CPPCMS_UNUSED __attribute__((unused))
50 #else
51 #define CPPCMS_UNUSED
52 #endif
53
54 #if defined __clang__
55 #define CPPCMS_UNUSED_MEMBER __attribute__((unused))
56 #else
57 #define CPPCMS_UNUSED_MEMBER
58 #endif
59
60
61 #endif