diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-05 10:31:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-05 10:31:00 -0400 |
commit | 7f45ea5c41bd076accd3720c021e6d3b512fb2b2 (patch) | |
tree | af409914df269d50de5bfb6d75b63e91d10f24e5 /src/common/torint.h | |
parent | b4bd4964eba5b0dae811a5c28c664b8f78a0672c (diff) | |
parent | f35271bf3eceadd03bff26d34c1d020892d6c6f0 (diff) | |
download | tor-7f45ea5c41bd076accd3720c021e6d3b512fb2b2.tar.gz tor-7f45ea5c41bd076accd3720c021e6d3b512fb2b2.zip |
Merge remote-tracking branch 'public/bug3894'
Diffstat (limited to 'src/common/torint.h')
-rw-r--r-- | src/common/torint.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/torint.h b/src/common/torint.h index 09495ac588..8771802d70 100644 --- a/src/common/torint.h +++ b/src/common/torint.h @@ -191,6 +191,16 @@ typedef unsigned __int64 uint64_t; #endif #endif +#ifndef SIZE_MAX +#if SIZEOF_SIZE_T == 8 +#define SIZE_MAX UINT64_MAX +#elif SIZEOF_SIZE_T == 4 +#define SIZE_MAX UINT32_MAX +#else +#error "Can't define SIZE_MAX" +#endif +#endif + #ifndef HAVE_SSIZE_T #if SIZEOF_SIZE_T == 8 typedef int64_t ssize_t; |