]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Avoid redefinition warnings for INT32_MIN, INT32_MAX, U_INT32_MAX.
authorDave Hart <hart@ntp.org>
Sat, 26 Nov 2011 19:43:12 +0000 (19:43 +0000)
committerDave Hart <hart@ntp.org>
Sat, 26 Nov 2011 19:43:12 +0000 (19:43 +0000)
bk: 4ed14150dvHP3zlC_H7ta3F61d-f-g

include/ntp_types.h

index cbc0c1c1693d8cce6ca2c69c23ec380f4a1dc2a3..c975a08163cce58d5606abb083f492cb116e155f 100644 (file)
@@ -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?"