]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Define UINT32_MAX if needed.
authorDarren Tucker <dtucker@dtucker.net>
Mon, 28 Oct 2019 05:06:59 +0000 (16:06 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Mon, 28 Oct 2019 05:27:53 +0000 (16:27 +1100)
configure.ac
defines.h

index 8bc96bb45c067e8cb12acd6669e72c584f132274..268fe1a4b9466396fb1a523a066613b9f375f2b2 100644 (file)
@@ -3541,6 +3541,17 @@ fprint_ll(FILE *f, long long n)
        )
 fi
 
+AC_CHECK_DECLS([UINT32_MAX], , , [[
+#ifdef HAVE_SYS_LIMITS_H
+# include <sys/limits.h>
+#endif
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+]])
 
 # More checks for data types
 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
index 7855fbf90b0f66e41c6b06f4f99871c73a73e9ee..b3a2b43db422de6edbd61c8008bec54674b11323 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -244,6 +244,9 @@ 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