COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
common.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COMMON_INCLUDE_FILES_AND_DEFINES_FOR_COVISE_AND_YAC
9 #define COMMON_INCLUDE_FILES_AND_DEFINES_FOR_COVISE_AND_YAC
10 
11 #if defined(__linux__) && !defined(_POSIX_SOURCE)
12 #define _POSIX_SOURCE
13 #endif
14 
15 #if defined(__APPLE__) && defined(__LITTLE_ENDIAN__)
16 #ifndef BYTESWAP
17 #define BYTESWAP
18 #endif
19 #endif
20 
21 #ifdef _WIN32
22 
23 #ifndef _WIN32_WINNT
24 #define _WIN32_WINNT 0x501 // This specifies WinXP or later - it is needed to access rawmouse from the user32.dll
25 #endif
26 
27 #if (_MSC_VER > 1310) && !(defined(MIDL_PASS) || defined(RC_INVOKED))
28 #ifndef _WIN32_WCE
29 #define POINTER_64 __ptr64
30 #endif
31 #else
32 #define POINTER_64
33 #endif
34 /* windows.h would include winsock.h, so be faster */
35 #include <winsock2.h>
36 #include <windows.h>
37 #ifndef _WIN32_WCE
38 #include <process.h>
39 #include "unixcompat.h"
40 #endif
41 #else
42 #include <unistd.h>
43 #endif
44 #if !defined(_USE_MATH_DEFINES) && !defined(__MINGW32__)
45 #define _USE_MATH_DEFINES
46 #endif
47 
48 #ifndef _WIN32_WCE
49 #include <sysdep/net.h>
50 #include "coExport.h"
51 #include <sys/types.h>
52 #endif
53 
54 #if defined __cplusplus && defined(_STANDARD_C_PLUS_PLUS) && !defined(__sgi)
55 #include <cassert>
56 #include <cctype>
57 #include <cerrno>
58 #include <cfloat>
59 #include <climits>
60 #include <cmath>
61 #include <csignal>
62 #include <cstdarg>
63 #include <cstddef>
64 #include <cstdio>
65 #include <cstring>
66 #include <ctime>
67 #else
68 #include <assert.h>
69 #include <ctype.h>
70 #ifndef _WIN32_WCE
71 #include <errno.h>
72 #include <signal.h>
73 #endif
74 #include <float.h>
75 #include <limits.h>
76 #include <math.h>
77 #include <stdarg.h>
78 #include <stddef.h>
79 #include <stdio.h>
80 #include <stdlib.h>
81 #include <string.h>
82 #include <time.h>
83 #endif
84 
85 #ifdef _WIN32
86 #ifndef _WIN32_WCE
87 #include <io.h>
88 #endif
89 #else
90 #include <unistd.h>
91 #ifndef __hpux
92 #include <sys/select.h>
93 #endif
94 #if defined(__sgi) || defined(__hpux) || defined(_SX) || defined(__linux__) || defined(__APPLE__)
95 #include <fcntl.h>
96 #endif
97 #endif
98 
99 #ifdef __cplusplus
100 
101 #include <iostream>
102 #include <sstream>
103 #include <fstream>
104 #include <iomanip>
105 
106 using std::cout;
107 using std::cerr;
108 using std::cin;
109 using std::endl;
110 using std::flush;
111 using std::ostream;
112 using std::ofstream;
113 using std::fstream;
114 using std::istream;
115 using std::ios;
116 using std::ifstream;
117 using std::istringstream;
118 using std::ostringstream;
119 using std::stringstream;
120 
121 #include <set>
122 using std::set;
123 
124 #include <map>
125 using std::map;
126 using std::multimap;
127 
128 #include <list>
129 using std::list;
130 
131 #include <vector>
132 using std::vector;
133 using std::allocator;
134 
135 #include <string>
136 using std::string;
137 
138 #include <memory>
139 using std::pair;
140 
141 #include <stack>
142 using std::stack;
143 
144 #include <algorithm>
145 using std::find;
146 
147 #endif /* __cplusplus */
148 
149 #ifdef __hpux
150 #include "unixcompat.h" /* for strtok_r */
151 #endif
152 
153 #if defined(__linux__) || defined(__MINGW32__)
154 #include <stdint.h>
155 #endif
156 
157 #ifdef _MSC_VER
158 typedef unsigned __int16 uint16_t;
159 typedef unsigned __int32 uint32_t;
160 typedef unsigned __int64 uint64_t;
161 typedef __int16 int16_t;
162 typedef __int32 int32_t;
163 typedef __int64 int64_t;
164 /* #define memcpy(a,b,c) memcpy_s(a,c,b,c) */
165 #endif
166 #endif /* COVISE_H */
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750