mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
add support for the LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX limits.h GNU extensions.
rdar://6740292 llvm-svn: 68169
This commit is contained in:
@@ -96,4 +96,19 @@
|
||||
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
|
||||
that we don't have something like #pragma poison that could be used to
|
||||
deprecate a macro - the code should just use LLONG_MAX and friends.
|
||||
*/
|
||||
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
|
||||
|
||||
#undef LONG_LONG_MIN
|
||||
#undef LONG_LONG_MAX
|
||||
#undef ULONG_LONG_MAX
|
||||
|
||||
#define LONG_LONG_MAX __LONG_LONG_MAX__
|
||||
#define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||
#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_LIMITS_H */
|
||||
|
||||
Reference in New Issue
Block a user