mirror of
https://github.com/json-c/json-c.git
synced 2026-03-21 14:09:06 +08:00
Use constants referring to the signed integer types when setting SSIZE_T_MAX.
In practice, the sizes of the signed and unsigned integer types will almost cetainly be the same, but this is more correct. Pointed out in issue #638.
This commit is contained in:
@@ -41,11 +41,11 @@
|
||||
|
||||
#ifndef SSIZE_T_MAX
|
||||
#if SIZEOF_SSIZE_T == SIZEOF_INT
|
||||
#define SSIZE_T_MAX UINT_MAX
|
||||
#define SSIZE_T_MAX INT_MAX
|
||||
#elif SIZEOF_SSIZE_T == SIZEOF_LONG
|
||||
#define SSIZE_T_MAX ULONG_MAX
|
||||
#define SSIZE_T_MAX LONG_MAX
|
||||
#elif SIZEOF_SSIZE_T == SIZEOF_LONG_LONG
|
||||
#define SSIZE_T_MAX ULLONG_MAX
|
||||
#define SSIZE_T_MAX LLONG_MAX
|
||||
#else
|
||||
#error Unable to determine size of ssize_t
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user