From 38ed0ce5e6a34276ccbe6b583cb7006eed263be9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 5 Nov 2004 17:54:50 +0000 Subject: Unify tor_parse_(numeric); make sure MAX_UINT32 and MAX_UINT64 are defined svn:r2688 --- src/common/torint.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/common/torint.h') diff --git a/src/common/torint.h b/src/common/torint.h index 8018fd8894..aec8d686ea 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) -- cgit v1.2.3-54-g00ecf