Commit 51da3560 by Vladimir Makarov Committed by Vladimir Makarov

glimits.h (USHRT_MAX): Use unsigned suffix if int can not hold it.

2001-06-26  Vladimir Makarov  <vmakarov@toke.toronto.redhat.com>

	* glimits.h (USHRT_MAX): Use unsigned suffix if int can not hold
	it.

From-SVN: r43584
parent 17e7554f
2001-06-26 Vladimir Makarov <vmakarov@toke.toronto.redhat.com>
* glimits.h (USHRT_MAX): Use unsigned suffix if int can not hold
it.
2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.h (struct diagnostic_context): Add new field. * diagnostic.h (struct diagnostic_context): Add new field.
......
...@@ -44,10 +44,6 @@ ...@@ -44,10 +44,6 @@
#undef SHRT_MAX #undef SHRT_MAX
#define SHRT_MAX 32767 #define SHRT_MAX 32767
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
#undef USHRT_MAX
#define USHRT_MAX 65535
/* Minimum and maximum values a `signed int' can hold. */ /* Minimum and maximum values a `signed int' can hold. */
#ifndef __INT_MAX__ #ifndef __INT_MAX__
#define __INT_MAX__ 2147483647 #define __INT_MAX__ 2147483647
...@@ -57,6 +53,14 @@ ...@@ -57,6 +53,14 @@
#undef INT_MAX #undef INT_MAX
#define INT_MAX __INT_MAX__ #define INT_MAX __INT_MAX__
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
#undef USHRT_MAX
#if INT_MAX < 65535
#define USHRT_MAX 65535U
#else
#define USHRT_MAX 65535
#endif
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */ /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
#undef UINT_MAX #undef UINT_MAX
#define UINT_MAX (INT_MAX * 2U + 1) #define UINT_MAX (INT_MAX * 2U + 1)
......
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