aboutsummaryrefslogtreecommitdiff
path: root/src/common/torint.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/torint.h')
-rw-r--r--src/common/torint.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/torint.h b/src/common/torint.h
index 8018fd889..aec8d686e 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -106,6 +106,9 @@ typedef signed int int32_t;
typedef unsigned int uint32_t;
#define HAVE_UINT32_T
#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX 0xffffffffu
+#endif
#endif
@@ -117,6 +120,9 @@ typedef signed long int32_t;
#ifndef HAVE_UINT32_T
typedef unsigned long uint32_t;
#define HAVE_UINT32_T
+#ifndef UINT32_MAX
+#define UINT32_MAX 0xfffffffful
+#endif
#endif
#elif (SIZEOF_LONG == 8)
#ifndef HAVE_INT64_T
@@ -127,6 +133,9 @@ typedef signed long int64_t;
typedef unsigned long uint64_t;
#define HAVE_UINT32_T
#endif
+#ifndef UINT64_MAX
+#define UINT64_MAX 0xfffffffffffffffful
+#endif
#endif
#if (SIZEOF_LONG_LONG == 8)
@@ -138,6 +147,9 @@ typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#define HAVE_UINT64_T
#endif
+#ifndef UINT64_MAX
+#define UINT64_MAX 0xffffffffffffffffull
+#endif
#endif
#if (SIZEOF___INT64 == 8)
@@ -149,6 +161,9 @@ typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define HAVE_UINT64_T
#endif
+#ifndef UINT64_MAX
+#define UINT64_MAX 0xffffffffffffffffui64
+#endif
#endif
#if (SIZEOF_VOID_P > 4 && SIZEOF_VOID_P <= 8)