ack/lang/cem/libcc.ansi/headers/limits.h

38 lines
768 B
C
Raw Normal View History

1989-05-16 13:13:53 +00:00
/*
* limits.h - implementation limits
*/
/* $Header$ */
1989-09-29 15:46:33 +00:00
#if !defined(__LIMITS_HEADER__)
#define __LIMITS_HEADER__
1989-05-16 13:13:53 +00:00
#define CHAR_BIT 8
1989-09-29 15:46:33 +00:00
#define SCHAR_MIN (-128)
1989-05-16 13:13:53 +00:00
#define SCHAR_MAX (+127)
#define UCHAR_MAX 255
#define MB_LEN_MAX 1
1989-09-29 15:46:33 +00:00
#define SHRT_MIN (-32767 - 1)
1989-05-16 13:13:53 +00:00
#define SHRT_MAX (+32767)
1989-09-29 15:46:33 +00:00
#define USHRT_MAX 65535U
1989-05-16 13:13:53 +00:00
1989-09-29 15:46:33 +00:00
#define LONG_MIN (-2147483647L - 1L)
1989-05-16 13:13:53 +00:00
#define LONG_MAX (+2147483647L)
1989-09-29 15:46:33 +00:00
#define ULONG_MAX 4294967295U
1989-05-16 13:13:53 +00:00
1989-09-29 15:46:33 +00:00
/* Assume signed characters (yegh) */
1989-05-16 13:13:53 +00:00
#define CHAR_MAX SCHAR_MAX
#define CHAR_MIN SCHAR_MIN
1989-09-29 15:46:33 +00:00
#if _EM_WSIZE == 4
1989-05-16 13:13:53 +00:00
#define INT_MIN LONG_MIN
#define INT_MAX LONG_MAX
#define UINT_MAX ULONG_MAX
1989-09-29 15:46:33 +00:00
#else /* _EM_WSIZE == 2 */
1989-05-16 13:13:53 +00:00
#define INT_MIN SHRT_MIN
#define INT_MAX SHRT_MAX
#define UINT_MAX USHRT_MAX
1989-09-29 15:46:33 +00:00
#endif
1989-05-16 13:13:53 +00:00
1989-09-29 15:46:33 +00:00
#endif /* __LIMITS_HEADER__ */