From: Dave Hart Date: Sat, 26 Nov 2011 19:43:12 +0000 (+0000) Subject: Avoid redefinition warnings for INT32_MIN, INT32_MAX, U_INT32_MAX. X-Git-Tag: NTP_4_2_6P5_RC2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6065e8f33fbeaf9ee7ee5e7979febc0d08448ca1;p=thirdparty%2Fntp.git Avoid redefinition warnings for INT32_MIN, INT32_MAX, U_INT32_MAX. bk: 4ed14150dvHP3zlC_H7ta3F61d-f-g --- diff --git a/include/ntp_types.h b/include/ntp_types.h index cbc0c1c16..c975a0816 100644 --- a/include/ntp_types.h +++ b/include/ntp_types.h @@ -57,23 +57,35 @@ typedef unsigned int u_int; #if (SIZEOF_INT == 4) # ifndef int32 # define int32 int -# define INT32_MIN INT_MIN -# define INT32_MAX INT_MAX +# ifndef INT32_MIN +# define INT32_MIN INT_MIN +# endif +# ifndef INT32_MAX +# define INT32_MAX INT_MAX +# endif # endif # ifndef u_int32 # define u_int32 unsigned int -# define U_INT32_MAX UINT_MAX +# ifndef U_INT32_MAX +# define U_INT32_MAX UINT_MAX +# endif # endif #else /* not sizeof(int) == 4 */ # if (SIZEOF_LONG == 4) # ifndef int32 # define int32 long -# define INT32_MIN LONG_MIN -# define INT32_MAX LONG_MAX +# ifndef INT32_MIN +# define INT32_MIN LONG_MIN +# endif +# ifndef INT32_MAX +# define INT32_MAX LONG_MAX +# endif # endif # ifndef u_int32 # define u_int32 unsigned long -# define U_INT32_MAX ULONG_MAX +# ifndef U_INT32_MAX +# define U_INT32_MAX ULONG_MAX +# endif # endif # else /* not sizeof(long) == 4 */ # include "Bletch: what's 32 bits on this machine?"