diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-13 15:06:26 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-13 15:06:26 +0000 |
commit | ac6cc430473f6a43c2b26cf88131a0339c67b66a (patch) | |
tree | b5ae870443b25da0e5d1fe9c455fab430ef8e09f /src | |
parent | 3a92e3f15f23466c5d12f95a5bdbc98b2837e02b (diff) | |
download | tor-ac6cc430473f6a43c2b26cf88131a0339c67b66a.tar tor-ac6cc430473f6a43c2b26cf88131a0339c67b66a.tar.gz |
r18781@catbus: nickm | 2008-03-13 11:00:51 -0400
Have OpenBSD_malloc_Linux.c use SIZE_T_MAX from torint.h, instead of checking cpu macros. There is always one more cpu you havent checked for.
svn:r14000
Diffstat (limited to 'src')
-rw-r--r-- | src/common/OpenBSD_malloc_Linux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/OpenBSD_malloc_Linux.c b/src/common/OpenBSD_malloc_Linux.c index b04323173..a0817a7a0 100644 --- a/src/common/OpenBSD_malloc_Linux.c +++ b/src/common/OpenBSD_malloc_Linux.c @@ -54,6 +54,8 @@ #include <limits.h> #include <errno.h> #include <err.h> +/* For SIZE_T_MAX */ +#include "torint.h" //#include "thread_private.h" @@ -1926,12 +1928,16 @@ realloc(void *ptr, size_t size) return (r); } +#if 0 #if defined(__i386__)||defined(__arm__)||defined(__powerpc__) #define SIZE_MAX 0xffffffff #endif #if defined(__x86_64__) #define SIZE_MAX 0xffffffffffffffff #endif +#else +#define SIZE_MAX SIZE_T_MAX +#endif void * calloc(size_t num, size_t size) |