From e8363ae23d090256b52d3317c41e1431148c1d24 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 19 Mar 2026 09:48:29 -0400 Subject: [PATCH] include limits.h in cstd.h Ensure the standard C99 values are available to the NetHack code base, so that code/macros to accomplish essentially the same thing are not necessary. CHAR_BIT Defines the number of bits in a byte. SCHAR_MIN Defines the minimum value for a signed char. SCHAR_MAX Defines the maximum value for a signed char. UCHAR_MAX Defines the maximum value for an unsigned char. CHAR_MIN Defines the minimum value for type char and its value will be equal to SCHAR_MIN if char represents negative values, otherwise zero. CHAR_MAX Defines the value for type char and its value will be equal to SCHAR_MAX if char represents negative values, otherwise UCHAR_MAX. MB_LEN_MAX Defines the maximum number of bytes in a multi-byte character. SHRT_MIN Defines the minimum value for a short int. SHRT_MAX Defines the maximum value for a short int. USHRT_MAX Defines the maximum value for an unsigned short int. INT_MIN Defines the minimum value for an int. INT_MAX Defines the maximum value for an int. UINT_MAX Defines the maximum value for an unsigned int. LONG_MIN Defines the minimum value for a long int. LONG_MAX Defines the maximum value for a long int. ULONG_MAX Defines the maximum value for an unsigned long int. --- include/cstd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cstd.h b/include/cstd.h index 3e4764b52..54c950a40 100644 --- a/include/cstd.h +++ b/include/cstd.h @@ -59,6 +59,7 @@ #include #include #include +#include #else /* !__cplusplus */ /* for FILE */