COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coTypes.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 CO_TYPES_H
9 #define CO_TYPES_H
10 
11 /* ---------------------------------------------------------------------- //
12 // //
13 // //
14 // Description: DLL EXPORT/IMPORT specification and type definitions //
15 // //
16 // //
17 // //
18 // //
19 // //
20 // //
21 // (C)2003 HLRS //
22 // Author: Uwe Woessner, Ruth Lang //
23 // Date: 30.10.03 V1.0 */
24 
25 #define __STDC_FORMAT_MACROS
26 
27 #ifdef WIN32
28 #ifndef NOMINMAX
29 #define NOMINMAX
30 #endif
31 
32 #if (_MSC_VER > 1310)
33 /* && !(defined(MIDL_PASS) || defined(RC_INVOKED)) */
34 #ifndef _WIN32_WCE
35 #define POINTER_64 __ptr64
36 #endif
37 #endif
38 
39 #include <winsock2.h>
40 
41 #endif
42 #ifndef _WIN32_WCE
43 #include <sys/types.h>
44 #endif
45 #if !defined(_WIN32) || defined(__MINGW32__)
46 #include <stdint.h>
47 #include <inttypes.h>
48 #else
49 typedef unsigned long long uint64_t;
50 typedef long long int64_t;
51 #endif
52 
53 /* +++++++++++ System Thread support */
54 
55 #if defined(CO_sgi) || defined(CO_sgin32) || defined(CO_sgi64)
56 
57 /* coThreads library using SGI native threads instead of posix */
58 #define SGI_NATIVE_THREADS
59 /* #define POSIX_THREADS */
60 
61 /* comment this out for engine lib when using normal coThreads lib */
62 /* #define SGI_THREADS_LIBRARY */
63 
64 /*
65 #ifndef CERR
66 #define CERR cerr
67 #include <fstream.h>
68 ofstream myout("/dev/null");
69 #define CERR myout
70 #endif
71 */
72 #define SGIDLADD
73 #define SVR4_DYNAMIC_LINKING
74 #endif
75 
76 #ifdef __linux__
77 #define POSIX_THREADS
78 #define SVR4_DYNAMIC_LINKING
79 #endif
80 
81 #ifdef CO_hp
82 #define DCE_THREADS
83 #endif
84 
85 /* +++++++++++ Alignment: currently constant */
86 
87 #define CO_SIZEOF_ALIGNMENT 8
88 
89 #ifdef _WIN32
90 #ifdef pid_t
91 #undef pid_t
92 #endif
93 typedef int pid_t;
94 #endif
95 
96 /* +++++++++++ SGI type definitions : insure uses SGI compiler */
97 
98 #if defined(__sgi) || defined(__insure__)
99 
100 typedef unsigned char coUByte;
101 
102 typedef int coInt32;
103 typedef unsigned int coUInt32;
104 
105 #if (_MIPS_SZLONG == 64)
106 typedef long coInt64;
107 typedef unsigned long coUInt64;
108 #else
109 typedef long long coInt64;
110 typedef unsigned long long coUInt64;
111 #endif
112 
113 /* SGI compilers introduce Symbol _BOOL if boolean types available
114  * we have to use own symbol to prevent problems on other platforms
115  * (HP-UX)
116  */
117 #ifdef _BOOL
118 #define _BOOL_
119 #endif
120 #endif /* CO_sgi SGI type definitions */
121 
122 /* +++++++++++ Windows type definitions */
123 
124 #ifdef _WIN32
125 
126 typedef unsigned char coUByte;
127 typedef int coInt32;
128 typedef unsigned int coUInt32;
129 typedef long long coInt64;
130 typedef unsigned long long coUInt64;
131 typedef unsigned short ushort;
132 /* typedef long ssize_t; */
133 
134 /* code copied from extern_libs/ARCHSUFFIX/python/include/pyconfig.h
135 to avoid different definition of ssize_t */
136 #ifdef _WIN64
137 typedef __int64 ssize_t;
138 #else
139 #if !defined(_WIN32_WCE) && !defined(__MINGW32__)
140 typedef _W64 int ssize_t;
141 #endif
142 #endif
143 /* end copy */
144 
145 /* define the int types defined in inttypes.h on *ix systems */
146 /* the ifndef is necessary to avoid conflict with OpenInventor inttypes !
147  The Inventor includes should be made before coTypes.h is included!
148  */
149 
150 /* VisualStudio 2010 finally comes with stdint.h !!! */
151 #if (_MSC_VER >= 1600)
152 #include <stdint.h>
153 #else
154 #if !defined(_INVENTOR_INTTYPES_) && !defined(__MINGW32__)
155 #define _INVENTOR_INTTYPES_
156 typedef char int8_t;
157 typedef unsigned char uint8_t;
158 typedef short int16_t;
159 typedef unsigned short uint16_t;
160 typedef int int32_t;
161 typedef unsigned int uint32_t;
162 #endif
163 #endif
164 
165 #define _BOOL_
166 #endif /* _WIN32 */
167 
168 /* +++++++++++ Cray-T3E type definitions */
169 
170 #ifdef CO_t3e
171 
172 typedef unsigned char coUByte;
173 typedef short coInt32;
174 typedef unsigned short coUInt32;
175 typedef int coInt64;
176 typedef unsigned int coUInt64;
177 
178 #define PARALLEL
179 #endif /* CO_t3e */
180 
181 /* +++++++++++ Linux type definitions */
182 
183 #ifdef __linux__
184 
185 typedef unsigned char coUByte;
186 typedef int coInt32;
187 typedef unsigned int coUInt32;
188 typedef long long coInt64;
189 typedef unsigned long long coUInt64;
190 
191 #define _BOOL_
192 #endif /* LINUX */
193 
194 /* +++++++++++ HP-UX type definitions (IA-64, PA-RISC not tested!) */
195 
196 #ifdef __hpux
197 
198 typedef unsigned char coUByte;
199 typedef int coInt32;
200 typedef unsigned int coUInt32;
201 typedef long long coInt64;
202 typedef unsigned long long coUInt64;
203 
204 #define _BOOL_
205 #endif /* HP_UX */
206 
207 /* ++++++++++ Mac OS X type definitions */
208 #ifdef __APPLE__
209 
210 #ifdef __LITTLE_ENDIAN__
211 #ifndef BYTESWAP
212 #define BYTESWAP
213 #endif
214 #endif
215 typedef unsigned char coUByte;
216 typedef int coInt32;
217 typedef unsigned int coUInt32;
218 typedef long long coInt64;
219 typedef unsigned long long coUInt64;
220 
221 #define _BOOL_
222 #endif
223 
224 /* Our data Data types are int's ( @@@@ is that ok on T3E ) */
225 typedef int coDataType;
226 
227 /* Parallelisation styles */
228 
229 #include "coExport.h"
230 #endif
unsigned short ushort
Definition: cutil_math.h:36
int coDataType
Definition: coTypes.h:225