[openssh-commits] [openssh] 04/06: Define UINT32_MAX if needed.

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Oct 28 19:03:01 AEDT 2019


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 2912596aecfcf48e5115c7a906d1e664f7717a4b
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Mon Oct 28 16:06:59 2019 +1100

    Define UINT32_MAX if needed.
---
 configure.ac | 11 +++++++++++
 defines.h    |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8bc96bb4..268fe1a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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, [
diff --git a/defines.h b/defines.h
index 7855fbf9..b3a2b43d 100644
--- 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

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list