diff options
Diffstat (limited to 'src/common/torint.h')
-rw-r--r-- | src/common/torint.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/torint.h b/src/common/torint.h index 6f515495d1..9004773221 100644 --- a/src/common/torint.h +++ b/src/common/torint.h @@ -316,6 +316,16 @@ typedef uint32_t uintptr_t; #endif #endif +#ifndef SSIZE_T_MAX +#if (SIZEOF_SIZE_T == 4) +#define SSIZE_T_MAX INT32_MAX +#elif (SIZEOF_SIZE_T == 8) +#define SSIZE_T_MAX INT64_MAX +#else +#error "Can't define SSIZE_T_MAX" +#endif +#endif + /* Any size_t larger than this amount is likely to be an underflow. */ #define SIZE_T_CEILING (sizeof(char)<<(sizeof(size_t)*8 - 1)) |