[openssh-commits] [openssh] 02/02: Define INT32_MAX and INT64_MAX if needed.
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon May 1 13:54:24 AEST 2017
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit d29ba6f45086703fdcb894532848ada3427dfde6
Author: Darren Tucker <dtucker at zip.com.au>
Date: Mon May 1 13:53:07 2017 +1000
Define INT32_MAX and INT64_MAX if needed.
---
defines.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/defines.h b/defines.h
index c89f85a8..0420a7e8 100644
--- a/defines.h
+++ b/defines.h
@@ -328,6 +328,28 @@ typedef unsigned int size_t;
#define SIZE_MAX SIZE_T_MAX
#endif
+#ifndef INT32_MAX
+# if (SIZEOF_INT == 4)
+# define INT32_MAX INT_MAX
+# elif (SIZEOF_LONG == 4)
+# define INT32_MAX LONG_MAX
+# else
+# error "need INT32_MAX"
+# endif
+#endif
+
+#ifndef INT64_MAX
+# if (SIZEOF_INT == 8)
+# define INT64_MAX INT_MAX
+# elif (SIZEOF_LONG == 8)
+# define INT64_MAX LONG_MAX
+# elif (SIZEOF_LONG_LONG_INT == 8)
+# define INT64_MAX LLONG_MAX
+# else
+# error "need INT64_MAX"
+# endif
+#endif
+
#ifndef HAVE_SSIZE_T
typedef int ssize_t;
# define HAVE_SSIZE_T
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list