115 #else |
115 #else |
116 #error Unknown pointer size or missing size macros! |
116 #error Unknown pointer size or missing size macros! |
117 #endif |
117 #endif |
118 |
118 |
119 // --------------------------------------------------------------------------- |
119 // --------------------------------------------------------------------------- |
|
120 // Missing Defines |
|
121 // --------------------------------------------------------------------------- |
|
122 |
|
123 #ifndef SSIZE_MAX // not defined in glibc since C23 and MSVC |
|
124 #if CX_WORDSIZE == 64 |
|
125 #define SSIZE_MAX 0x7fffffffffffffffll |
|
126 #else |
|
127 #define SSIZE_MAX 0x7fffffffl |
|
128 #endif |
|
129 #endif |
|
130 |
|
131 |
|
132 // --------------------------------------------------------------------------- |
120 // Attribute definitions |
133 // Attribute definitions |
121 // --------------------------------------------------------------------------- |
134 // --------------------------------------------------------------------------- |
122 |
135 |
123 #ifndef __GNUC__ |
136 #ifndef __GNUC__ |
124 /** |
137 /** |
363 |
376 |
364 #ifdef _MSC_VER |
377 #ifdef _MSC_VER |
365 // fix missing ssize_t definition |
378 // fix missing ssize_t definition |
366 #include <BaseTsd.h> |
379 #include <BaseTsd.h> |
367 typedef SSIZE_T ssize_t; |
380 typedef SSIZE_T ssize_t; |
368 #ifndef SSIZE_MAX |
|
369 #ifdef _WIN64 |
|
370 #define SSIZE_MAX 0x7fffffffffffffffi64 |
|
371 #else |
|
372 #define SSIZE_MAX 0x7fffffffi32 |
|
373 #endif |
|
374 #endif |
|
375 |
381 |
376 // fix missing _Thread_local support |
382 // fix missing _Thread_local support |
377 #define _Thread_local __declspec(thread) |
383 #define _Thread_local __declspec(thread) |
378 #endif // _MSC_VER |
384 #endif // _MSC_VER |
379 |
385 |