diff options
author | Ken Dyck <ken.dyck@onsemi.com> | 2009-11-18 19:22:15 +0000 |
---|---|---|
committer | Ken Dyck <ken.dyck@onsemi.com> | 2009-11-18 19:22:15 +0000 |
commit | db57ce577108104a0ecacda2f9a9da5609ebd9d8 (patch) | |
tree | 7a0b1722e9ed8ab1a820b0859122e9f78a8d5545 /lib | |
parent | 33ced0b8550f3e7169f326944731ee02e9338659 (diff) |
Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros for
their corresponding exact-width type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Headers/stdint.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Headers/stdint.h b/lib/Headers/stdint.h index ecd1bbb5b9..2b89fa43f3 100644 --- a/lib/Headers/stdint.h +++ b/lib/Headers/stdint.h @@ -634,9 +634,9 @@ typedef __stdint_exjoin3(uint, __INTMAX_WIDTH__, _t) uintmax_t; #endif /* C99 7.18.2.5 Limits of greatest-width integer types. */ -#define INTMAX_MIN (-__INTMAX_MAX__-1) -#define INTMAX_MAX __INTMAX_MAX__ -#define UINTMAX_MAX (__INTMAX_MAX__*2ULL+1ULL) +#define INTMAX_MIN __stdint_exjoin3( INT, __INTMAX_WIDTH__, _MIN) +#define INTMAX_MAX __stdint_exjoin3( INT, __INTMAX_WIDTH__, _MAX) +#define UINTMAX_MAX __stdint_exjoin3(UINT, __INTMAX_WIDTH__, _MAX) /* C99 7.18.3 Limits of other integer types. */ #define SIG_ATOMIC_MIN INT32_MIN |