source: qutecom-coip/libs/owutil/cutil/global.h @ 125:d648f4cb122f

Last change on this file since 125:d648f4cb122f was 125:d648f4cb122f, checked in by laurent, 3 years ago

wengo => qutecom

File size: 3.9 KB
Line 
1/*
2 * QuteCom, a voice over Internet phone
3 * Copyright (C) 2010 Mbdsys
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 */
19
20#ifndef OWGLOBAL_H
21#define OWGLOBAL_H
22
23/**
24 * OS and compilers detection via defines (preprocessor).
25 *
26 * Most of this defines are from Qt (Trolltech).
27 * In each category (OS_ and CC_) one define exludes the others.
28 * Warning: if you want to add a define to this file, the order is very important.
29 *
30 * Operating systems:
31 * - OS_WINDOWS
32 *   - OS_WIN32
33 *   - OS_WIN64
34 *   - OS_WINCE_POCKETPC (Windows CE for PocketPC)
35 *   - OS_WINCE_SMARTPHONE (Windows CE for smartphone)
36 * - OS_POSIX
37 *   - OS_MACOSX
38 *   - OS_LINUX
39 *   - OS_HURD
40 *   - OS_BSD
41 *     - OS_FREEBSD
42 *     - OS_NETBSD
43 *     - OS_OPENBSD
44 *
45 * Compilers:
46 * - CC_MSVC (Microsoft Visual C++)
47 *   - CC_MSVC6 (Visual C++ 6)
48 *   - CC_MSVC7 (Visual C++ .NET)
49 *   - CC_MSVC71 (Visual C++ 2003)
50 *   - CC_MSVC8 (Visual C++ 2005)
51 * - CC_WINCE (Microsoft Visual C++ Embedded for Windows CE)
52 *   - CC_WINCE1 (Windows CE 1.x)
53 *   - CC_WINCE2 (Windows CE 2.x)
54 *   - CC_WINCE3 (Windows CE 3.x)
55 *   - CC_WINCE4 (Windows CE 4.x)
56 *   - CC_WINCE5 (Windows CE 5.x)
57 * - CC_GCC
58 *   - CC_MINGW (Native GCC under Windows)
59 *   - CC_GCC3 (GNU GCC 3.x)
60 *   - CC_GCC4 (GNU GCC 4.x)
61 * - CC_INTEL (Intel C++)
62 * - CC_BORLAND (Borland C++)
63 *
64 * @file global.h
65 * @see qglobal.h from Qt4
66 * @author Tanguy Krotoff
67 */
68
69/* OS */
70#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
71        #define OS_MACOSX
72#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
73        #define OS_WIN32
74#elif defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
75        #define OS_WIN64
76#elif defined(__linux__) || defined(__linux)
77        #define OS_LINUX
78#elif defined(__FreeBSD__) || defined(__DragonFly__)
79        #define OS_FREEBSD
80#elif defined(__NetBSD__)
81        #define OS_NETBSD
82#elif defined(__OpenBSD__)
83        #define OS_OPENBSD
84#elif defined(__GNU_HURD__)
85        #define OS_HURD
86#elif defined(WIN32_PLATFORM_PSPC)
87        #define OS_WINCE_POCKETPC
88#elif defined(WIN32_PLATFORM_WFSP)
89        #define OS_WINCE_SMARTPHONE
90#else
91        #error This OS has not been tested
92#endif
93
94#if defined(OS_WIN32) || defined(OS_WIN64) || defined(OS_WINCE_POCKETPC) || defined(OS_WINCE_SMARTPHONE)
95        #define OS_WINDOWS
96#endif
97
98#if defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD)
99        #define OS_BSD
100#endif
101
102#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_HURD) || defined(OS_BSD)
103        #define OS_POSIX
104#endif
105
106
107/* Compilers */
108#if defined(__INTEL_COMPILER)
109        #define CC_INTEL
110#elif defined(_MSC_VER)
111        #define CC_MSVC
112        #if _MSC_VER <= 1200
113                #define CC_MSVC6
114        #elif _MSC_VER <= 1300
115                #define CC_MSVC7
116        #elif _MSC_VER <= 1310
117                #define CC_MSVC71
118        #elif _MSC_VER <= 1400
119                #define CC_MSVC8
120        #endif
121#elif defined(_WIN32_WCE)
122        #define CC_WINCE
123        #if _WIN32_WCE <= 101
124                #define CC_WINCE1
125        #elif _WIN32_WCE <= 211
126                #define CC_WINCE2
127        #elif _WIN32_WCE <= 300
128                #define CC_WINCE3
129        #elif _WIN32_WCE <= 400
130                #define CC_WINCE4
131        #elif _WIN32_WCE <= 500
132                #define CC_WINCE5
133        #endif
134#elif defined(__GNUC__)
135        #define CC_GCC
136        #if __GNUC__ == 3
137                #define CC_GCC3
138        #elif _MSC_VER == 4
139                #define CC_GCC4
140        #endif
141        #if defined(__MINGW32__)
142                #define CC_MINGW
143        #endif
144#elif defined(__BORLANDC__) || defined(__TURBOC__)
145        #define CC_BORLAND
146#else
147        #error This compiler has not been tested
148#endif
149
150#endif  /* OWGLOBAL_H */
Note: See TracBrowser for help on using the repository browser.