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 2d9c3b031f..e6f3180e96 100644 --- a/src/common/torint.h +++ b/src/common/torint.h @@ -267,6 +267,16 @@ typedef uint32_t uintptr_t; #endif #endif +#ifndef SHORT_MAX +#if (SIZEOF_SHORT == 2) +#define SHORT_MAX 0x7fff +#elif (SIZEOF_SHORT == 4) +#define SHORT_MAX 0x7fffffff +#else +#error "Can't define SHORT_MAX" +#endif +#endif + #ifndef TIME_MAX #ifdef TIME_T_IS_SIGNED |