Go to the documentation of this file.
39 #ifndef BLOCXX_TYPES_HPP_INCLUDE_GUARD_
40 #define BLOCXX_TYPES_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
45 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
55 #error "BLOCXX_Types.hpp can only be included by c++ files"
60 #include <sys/types.h>
63 namespace BLOCXX_NAMESPACE
68 #if BLOCXX_SIZEOF_SHORT_INT == 2
69 typedef unsigned short UInt16;
71 #define BLOCXX_INT16_IS_SHORT 1
72 #elif BLOCXX_SIZEOF_INT == 2
73 typedef unsigned int UInt16;
75 #define BLOCXX_INT16_IS_INT 1
77 #if BLOCXX_SIZEOF_INT == 4
78 typedef unsigned int UInt32;
80 #define BLOCXX_INT32_IS_INT 1
81 #elif BLOCXX_SIZEOF_LONG_INT == 4
82 typedef unsigned long UInt32;
84 #define BLOCXX_INT32_IS_LONG 1
86 #if BLOCXX_SIZEOF_LONG_INT == 8
87 typedef unsigned long UInt64;
89 #define BLOCXX_INT64_IS_LONG 1
90 #elif BLOCXX_SIZEOF_LONG_LONG_INT == 8
91 typedef unsigned long long UInt64;
92 typedef long long Int64;
93 #define BLOCXX_INT64_IS_LONG_LONG 1
95 #error "Compiler must support 64 bit long"
97 #if BLOCXX_SIZEOF_DOUBLE == 8
98 typedef double Real64;
99 #define BLOCXX_REAL64_IS_DOUBLE 1
100 #elif BLOCXX_SIZEOF_LONG_DOUBLE == 8
101 typedef long double Real64;
102 #define BLOCXX_REAL64_IS_LONG_DOUBLE 1
104 #if BLOCXX_SIZEOF_FLOAT == 4
105 typedef float Real32;
106 #define BLOCXX_REAL32_IS_FLOAT 1
107 #elif BLOCXX_SIZEOF_DOUBLE == 4
108 typedef double Real32;
109 #define BLOCXX_REAL32_IS_DOUBLE 1
116 #define BLOCXX_INVALID_HANDLE INVALID_HANDLE_VALUE
117 #define BLOCXX_INVALID_FILEHANDLE INVALID_HANDLE_VALUE
122 typedef long ssize_t;
123 typedef HANDLE pid_t;
125 typedef struct {} siginfo_t;
127 #define BLOCXX_SHAREDLIB_EXTENSION ".dll"
128 #define BLOCXX_FILENAME_SEPARATOR "\\"
129 #define BLOCXX_FILENAME_SEPARATOR_C '\\'
130 #define BLOCXX_PATHNAME_SEPARATOR ";"
132 #else //ifdef BLOCXX_WIN32
136 #define BLOCXX_INVALID_HANDLE -1
137 #define BLOCXX_INVALID_FILEHANDLE -1
141 #if defined BLOCXX_DARWIN
142 #define BLOCXX_SHAREDLIB_EXTENSION ".dylib.bundle"
143 #elif defined BLOCXX_HPUX && !defined(BLOCXX_ARCH_IA64)
144 #define BLOCXX_SHAREDLIB_EXTENSION ".sl"
145 #elif defined BLOCXX_HPUX
146 #define BLOCXX_SHAREDLIB_EXTENSION ".so"
147 #elif defined BLOCXX_NETWARE
148 #define BLOCXX_SHAREDLIB_EXTENSION ".nlm"
150 #define BLOCXX_SHAREDLIB_EXTENSION ".so"
153 #define BLOCXX_FILENAME_SEPARATOR "/"
154 #define BLOCXX_FILENAME_SEPARATOR_C '/'
155 #define BLOCXX_PATHNAME_SEPARATOR ":"
156 #endif //ifdef BLOCXX_WIN32