[or-cvs] r14000: Have OpenBSD_malloc_Linux.c use SIZE_T_MAX from torint.h, in (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Thu Mar 13 15:06:27 UTC 2008


Author: nickm
Date: 2008-03-13 11:06:26 -0400 (Thu, 13 Mar 2008)
New Revision: 14000

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/common/OpenBSD_malloc_Linux.c
Log:
 r18781 at 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.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r18781] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-03-13 14:09:01 UTC (rev 13999)
+++ tor/trunk/ChangeLog	2008-03-13 15:06:26 UTC (rev 14000)
@@ -18,6 +18,8 @@
       (sometimes) to buffer data for the network.  Looking at different BIOs
       could result in write counts on the order of ULONG_MAX.  Fix for bug
       614.  Bugfix on 0.1.2.x.
+    - Make --enable-openbsd-malloc work correctly on Linux with alpha CPUs.
+      Bugfix on 0.2.0.x.
 
   o Minor features:
     - Allow separate log levels to be configured for different logging

Modified: tor/trunk/src/common/OpenBSD_malloc_Linux.c
===================================================================
--- tor/trunk/src/common/OpenBSD_malloc_Linux.c	2008-03-13 14:09:01 UTC (rev 13999)
+++ tor/trunk/src/common/OpenBSD_malloc_Linux.c	2008-03-13 15:06:26 UTC (rev 14000)
@@ -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 @@
 	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)



More information about the tor-commits mailing list