118 #else |
118 #else |
119 #error Unknown pointer size or missing size macros! |
119 #error Unknown pointer size or missing size macros! |
120 #endif |
120 #endif |
121 |
121 |
122 // --------------------------------------------------------------------------- |
122 // --------------------------------------------------------------------------- |
123 // Missing Defines |
|
124 // --------------------------------------------------------------------------- |
|
125 |
|
126 #ifndef SSIZE_MAX // not defined in glibc since C23 and MSVC |
|
127 #if CX_WORDSIZE == 64 |
|
128 /** |
|
129 * The maximum representable value in ssize_t. |
|
130 */ |
|
131 #define SSIZE_MAX 0x7fffffffffffffffll |
|
132 #else |
|
133 #define SSIZE_MAX 0x7fffffffl |
|
134 #endif |
|
135 #endif |
|
136 |
|
137 |
|
138 // --------------------------------------------------------------------------- |
|
139 // Attribute definitions |
123 // Attribute definitions |
140 // --------------------------------------------------------------------------- |
124 // --------------------------------------------------------------------------- |
141 |
125 |
142 #ifndef __GNUC__ |
126 #ifndef __GNUC__ |
143 /** |
127 /** |
363 // --------------------------------------------------------------------------- |
347 // --------------------------------------------------------------------------- |
364 // Fixes for MSVC incompatibilities |
348 // Fixes for MSVC incompatibilities |
365 // --------------------------------------------------------------------------- |
349 // --------------------------------------------------------------------------- |
366 |
350 |
367 #ifdef _MSC_VER |
351 #ifdef _MSC_VER |
368 // fix missing ssize_t definition |
|
369 #include <BaseTsd.h> |
|
370 typedef SSIZE_T ssize_t; |
|
371 |
|
372 // fix missing _Thread_local support |
352 // fix missing _Thread_local support |
373 #define _Thread_local __declspec(thread) |
353 #define _Thread_local __declspec(thread) |
374 #endif // _MSC_VER |
354 #endif // _MSC_VER |
375 |
355 |
376 #endif // UCX_COMMON_H |
356 #endif // UCX_COMMON_H |