OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
PlatformConfig.h
Go to the documentation of this file.
1 
16 /*
17 // Copyright 2014 Sensics, Inc.
18 //
19 // Licensed under the Apache License, Version 2.0 (the "License");
20 // you may not use this file except in compliance with the License.
21 // You may obtain a copy of the License at
22 //
23 // http://www.apache.org/licenses/LICENSE-2.0
24 //
25 // Unless required by applicable law or agreed to in writing, software
26 // distributed under the License is distributed on an "AS IS" BASIS,
27 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28 // See the License for the specific language governing permissions and
29 // limitations under the License.
30 */
31 
32 #ifndef INCLUDED_PlatformConfig_h_GUID_0D10E644_8114_4294_A839_699F39E1F0E0
33 #define INCLUDED_PlatformConfig_h_GUID_0D10E644_8114_4294_A839_699F39E1F0E0
34 
38 /* #undef OSVR_HAVE_STRUCT_TIMEVAL_IN_WINSOCK2_H */
39 
44 /*
45  MinGW and similar environments have both winsock and sys/time.h, so
46  we hide this define for disambiguation at the top level.
47 */
48 #ifndef OSVR_HAVE_STRUCT_TIMEVAL_IN_WINSOCK2_H
49 #define OSVR_HAVE_STRUCT_TIMEVAL_IN_SYS_TIME_H
50 #endif
51 
52 #if defined(OSVR_HAVE_STRUCT_TIMEVAL_IN_SYS_TIME_H) || \
53  defined(OSVR_HAVE_STRUCT_TIMEVAL_IN_WINSOCK2_H)
54 #define OSVR_HAVE_STRUCT_TIMEVAL
55 #endif
56 
66 #if defined(_AIX)
67 #define OSVR_AIX 1
68 #endif
69 
70 #if defined(__ANDROID__)
71 #define OSVR_ANDROID 1
72 #endif
73 
74 #if defined(__bsdi__)
75 #define OSVR_BSDOS 1
76 #endif
77 
78 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(BSD)
79 #define OSVR_FREEBSD 1
80 #endif
81 
82 #if defined(hpux) || defined(_hpux) || defined(__hpux)
83 #define OSVR_HPUX 1
84 #endif
85 
86 #if defined(sgi) || defined(__sgi)
87 #define OSVR_IRIX 1
88 #endif
89 
90 #if defined(linux) || defined(__linux__)
91 #define OSVR_LINUX 1
92 #endif
93 
94 #if defined(__FreeBSD_kernel__) && defined(__GLIBC__)
95 #define OSVR_KFREEBSD 1
96 #endif
97 
98 #if defined(__NetBSD__)
99 #define OSVR_NETBSD 1
100 #endif
101 
102 #if defined(__OpenBSD__)
103 #define OSVR_OPENBSD 1
104 #endif
105 
106 #if defined(sco) && defined(_UNIXWARE7)
107 #define OSVR_UNIXWARE 1
108 #endif
109 
110 #if defined(sun) || defined(__sun)
111 #if defined(__SVR4) || defined(__svr4__)
112 #define OSVR_SOLARIS 1
113 # else
114 #define OSVR_SUNOS 1
115 #endif
116 #endif
117 
118 #if defined(__osf) || defined(__osf__)
119 #define OSVR_TRU64 1
120 #endif
121 
122 #if defined(ultrix) || defined(__ultrix) || defined(__ultrix__) || (defined(unix) && defined(vax))
123 #define OSVR_ULTRIX 1
124 #endif
125 
126 #if defined(__CYGWIN__)
127 #define OSVR_CYGWIN 1
128 #endif
129 
130 #if (defined(__APPLE__) && defined(__MACH__))
131 #define OSVR_MACOSX 1
132 #endif
133 
134 #if defined(_WIN32) || defined(WIN32) || defined(__NT__) || defined(__WIN32__)
135 #define OSVR_WINDOWS 1
136 #if defined(_WIN64)
137 #define OSVR_WIN64 1
138 #else
139 #define OSVR_WIN32 1
140 #endif // _WIN64
141 #endif // OSVR_WINDOWS
142 
143 #if defined(_XBOX)
144 #define OSVR_XBOX 1
145 #endif
146 
147 
150 #if defined(unix) || defined(__unix__) || defined(__unix)
151 #define OSVR_UNIX 1
152 #endif
153 
154 #if defined(OSVR_UNIX) || defined(OSVR_MACOSX)
155 #include <unistd.h>
156 #if defined(_POSIX_VERSION)
157 #define OSVR_POSIX 1
158 #endif
159 #endif
160 
161 
166 #if defined(__clang__)
167 #define OSVR_COMPILER_CLANG 1
168 #elif defined(__ICC) || defined(__INTEL_COMPILER)
169 #define OSVR_COMPILER_INTEL 1
170 #elif defined(__GNUC__) || defined(__GNUG__)
171 /* The GCC branch must be placed after Clang and Intel. */
172 #define OSVR_COMPILER_GCC 1
173 #elif defined(__HP_cc) || defined(__HP_aCC)
174 #define OSVR_COMPILER_HP 1
175 #elif defined(__IBMC__) || defined(__IBMCPP__)
176 #define OSVR_COMPILER_IBM 1
177 #elif defined(_MSC_VER)
178 #define OSVR_COMPILER_MSVC 1
179 #elif defined(__PGI)
180 #define OSVR_COMPILER_PORTLAND 1
181 #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
182 #define OSVR_COMPILER_SOLARIS 1
183 #endif
184 
185 
190 #if defined(__cplusplus)
191 #define OSVR_LANGUAGE_CPLUSPLUS 1
192 #else
193 #define OSVR_LANGUAGE_C 1
194 #endif
195 
196 
197 #endif
198