Commit bd90e97e by Richard Stallman

(INT_MAX, LONG_MAX, LONG_LONG_MAX): Delete parens.

(__glimits__evconcat__, __glimits__concat__): New macros.
(UINT_MAX, ULONG_MAX, ULONG_LONG_MAX): Use them.

From-SVN: r5518
parent e5687447
......@@ -54,11 +54,13 @@
#undef INT_MIN
#define INT_MIN (-INT_MAX-1)
#undef INT_MAX
#define INT_MAX (__INT_MAX__)
#define INT_MAX __INT_MAX__
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
#undef UINT_MAX
#define UINT_MAX ((unsigned) INT_MAX * 2 + 1)
#define __glimits__evconcat__(x, y) __glimits__concat__ (x, y)
#define __glimits__concat__(x, y) x##y
#define UINT_MAX (__glimits__evconcat__ (INT_MAX, U) * 2 + 1)
/* Minimum and maximum values a `signed long int' can hold.
(Same as `int'). */
......@@ -68,11 +70,11 @@
#undef LONG_MIN
#define LONG_MIN (-LONG_MAX-1)
#undef LONG_MAX
#define LONG_MAX (__LONG_MAX__)
#define LONG_MAX __LONG_MAX__
/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
#undef ULONG_MAX
#define ULONG_MAX ((unsigned long) LONG_MAX * 2 + 1)
#define ULONG_MAX (__glimits__evconcat__ (LONG_MAX, U) * 2 + 1)
#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
/* Minimum and maximum values a `signed long long int' can hold. */
......@@ -82,11 +84,11 @@
#undef LONG_LONG_MIN
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#undef LONG_LONG_MAX
#define LONG_LONG_MAX (__LONG_LONG_MAX__)
#define LONG_LONG_MAX __LONG_LONG_MAX__
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
#undef ULONG_LONG_MAX
#define ULONG_LONG_MAX ((unsigned long long) LONG_LONG_MAX * 2 + 1)
#define ULONG_LONG_MAX (__glimits__evconcat__ (LONG_LONG_MAX, U) * 2 + 1)
#endif
#endif /* _MACH_MACHLIMITS_H_ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment