COVISE Core
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
49typedef unsigned long long uint64_t;
50typedef 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>
68ofstream 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
93typedef int pid_t;
94#endif
95
96/* +++++++++++ SGI type definitions : insure uses SGI compiler */
97
98
99/* +++++++++++ Windows type definitions */
100
101#ifdef _WIN32
102
103typedef unsigned short ushort;
104/* typedef long ssize_t; */
105
106/* code copied from extern_libs/ARCHSUFFIX/python/include/pyconfig.h
107to avoid different definition of ssize_t */
108#ifdef _WIN64
109typedef __int64 ssize_t;
110#else
111#if !defined(_WIN32_WCE) && !defined(__MINGW32__)
112typedef _W64 int ssize_t;
113#endif
114#endif
115/* end copy */
116
117/* define the int types defined in inttypes.h on *ix systems */
118/* the ifndef is necessary to avoid conflict with OpenInventor inttypes !
119 The Inventor includes should be made before coTypes.h is included!
120 */
121
122/* VisualStudio 2010 finally comes with stdint.h !!! */
123#if (_MSC_VER >= 1600)
124#include <stdint.h>
125#else
126#if !defined(_INVENTOR_INTTYPES_) && !defined(__MINGW32__)
127#define _INVENTOR_INTTYPES_
128typedef char int8_t;
129typedef unsigned char uint8_t;
130typedef short int16_t;
131typedef unsigned short uint16_t;
132typedef int int32_t;
133typedef unsigned int uint32_t;
134#endif
135#endif
136
137#endif /* _WIN32 */
138
139typedef unsigned char coUByte;
140typedef int32_t coInt32;
141typedef uint32_t coUInt32;
142typedef int64_t coInt64;
143typedef uint64_t coUInt64;
144
145/* +++++++++++ Cray-T3E type definitions */
146
147#ifdef CO_t3e
148
149#define PARALLEL
150#endif /* CO_t3e */
151
152/* ++++++++++ Mac OS X type definitions */
153#ifdef __APPLE__
154
155#ifdef __LITTLE_ENDIAN__
156#ifndef BYTESWAP
157#define BYTESWAP
158#endif
159#endif
160
161#endif
162
163/* ++++++++++ FreeBSD */
164#ifdef __FreeBSD__
165
166#include <sys/endian.h>
167#if _BYTE_ORDER == _LITTLE_ENDIAN
168#ifndef BYTESWAP
169#define BYTESWAP
170#endif
171#endif
172
173#endif
174
175/* Our data Data types are int's ( @@@@ is that ok on T3E ) */
176typedef int coDataType;
177
178/* Parallelisation styles */
179
180#include "coExport.h"
181#endif
uint32_t coUInt32
Definition: coTypes.h:141
unsigned char coUByte
Definition: coTypes.h:139
int coDataType
Definition: coTypes.h:176
int32_t coInt32
Definition: coTypes.h:140
int64_t coInt64
Definition: coTypes.h:142
uint64_t coUInt64
Definition: coTypes.h:143
unsigned short ushort
Definition: cutil_math.h:36