mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
Fix char limits
By the standard CHAR_MIN and CHAR_MAX should be 0 and UCHAR_MAX respectively when char implementation is unsigned ( -fno-signed-char)
This commit is contained in:
parent
1073b379c8
commit
82611f5e6d
@ -23,8 +23,13 @@
|
|||||||
#define SCHAR_MAX 127
|
#define SCHAR_MAX 127
|
||||||
#define UCHAR_MAX 0xff
|
#define UCHAR_MAX 0xff
|
||||||
|
|
||||||
|
#ifndef __CHAR_UNSIGNED__
|
||||||
#define CHAR_MIN SCHAR_MIN
|
#define CHAR_MIN SCHAR_MIN
|
||||||
#define CHAR_MAX SCHAR_MAX
|
#define CHAR_MAX SCHAR_MAX
|
||||||
|
#else
|
||||||
|
#define CHAR_MIN 0
|
||||||
|
#define CHAR_MAX UCHAR_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MB_LEN_MAX 5
|
#define MB_LEN_MAX 5
|
||||||
#define SHRT_MIN (-32768)
|
#define SHRT_MIN (-32768)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user