Fix limits.h constants to have correct type on MIPS
Use correctly typed constants to avoid bogus errors like https://lists.freebsd.org/pipermail/svn-src-all/2017-August/150400.html (like x86 _limits.h). Reported by: bde, asomers Reviewed by: mjoras, tinderbox Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
a9f6545f43
commit
70dd00d6c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322920
@ -75,17 +75,23 @@
|
||||
#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
|
||||
#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
|
||||
|
||||
#ifdef __mips_n64
|
||||
#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
|
||||
|
||||
#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */
|
||||
|
||||
#define __OFF_MAX __LLONG_MAX /* max value for an off_t */
|
||||
#define __OFF_MIN __LLONG_MIN /* min value for an off_t */
|
||||
|
||||
/* Quads and long longs are the same size. Ensure they stay in sync. */
|
||||
#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */
|
||||
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
|
||||
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
|
||||
#define __OFF_MAX __LONG_MAX /* max value for an off_t */
|
||||
#define __OFF_MIN __LONG_MIN /* min value for an off_t */
|
||||
#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */
|
||||
#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */
|
||||
#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */
|
||||
#else
|
||||
#define __SSIZE_MAX __INT_MAX
|
||||
#define __SIZE_T_MAX __UINT_MAX
|
||||
#define __OFF_MAX __LLONG_MAX
|
||||
#define __OFF_MIN __LLONG_MIN
|
||||
#define __UQUAD_MAX __ULLONG_MAX
|
||||
#define __QUAD_MAX __LLONG_MAX
|
||||
#define __QUAD_MIN __LLONG_MIN
|
||||
#endif
|
||||
|
||||
#define __WORD_BIT 32
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user