summaryrefslogtreecommitdiffstats
path: root/defines.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-01-26 05:09:15 +0100
committerDarren Tucker <dtucker@dtucker.net>2020-01-26 05:09:15 +0100
commit0d1144769151edf65f74aee9a4c8545c37861695 (patch)
treeb27585bea6cfa281e798498c678dffc22475afc3 /defines.h
parentupstream: unbreak unittests for recent API / source file changes (diff)
downloadopenssh-0d1144769151edf65f74aee9a4c8545c37861695.tar.xz
openssh-0d1144769151edf65f74aee9a4c8545c37861695.zip
Move definition of UINT32_MAX.
This allows us to always define it if needed not just if we also define the type ourself.
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/defines.h b/defines.h
index 03212de6f..86507ab67 100644
--- a/defines.h
+++ b/defines.h
@@ -244,9 +244,6 @@ typedef unsigned short int u_int16_t;
# endif
# if (SIZEOF_INT == 4)
typedef unsigned int u_int32_t;
-# if defined(HAVE_DECL_UINT32_MAX) && (HAVE_DECL_UINT32_MAX == 0)
-# define UINT32_MAX UINT_MAX
-# endif
# else
# error "32 bit int type not found."
# endif
@@ -254,6 +251,12 @@ typedef unsigned int u_int32_t;
#define __BIT_TYPES_DEFINED__
#endif
+#if defined(HAVE_DECL_UINT32_MAX) && (HAVE_DECL_UINT32_MAX == 0)
+# if (SIZEOF_INT == 4)
+# define UINT32_MAX UINT_MAX
+# endif
+#endif
+
/* 64-bit types */
#ifndef HAVE_INT64_T
# if (SIZEOF_LONG_INT == 8)