[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r14002: Backport: Have OpenBSD_malloc_Linux.c use SIZE_T_MAX from to (in tor/branches/tor-0_2_0-patches: . src/common)



Author: nickm
Date: 2008-03-13 11:07:21 -0400 (Thu, 13 Mar 2008)
New Revision: 14002

Modified:
   tor/branches/tor-0_2_0-patches/
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/common/OpenBSD_malloc_Linux.c
Log:
 r18785@catbus:  nickm | 2008-03-13 11:07:18 -0400
 Backport: 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. fixes bug 625.



Property changes on: tor/branches/tor-0_2_0-patches
___________________________________________________________________
 svk:merge ticket from /tor/020 [r18785] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-13 15:06:49 UTC (rev 14001)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-13 15:07:21 UTC (rev 14002)
@@ -21,6 +21,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.
+      Fixes bug 625.  Bugfix on 0.2.0.x.
 
 
 Changes in version 0.2.0.21-rc - 2008-03-02

Modified: tor/branches/tor-0_2_0-patches/src/common/OpenBSD_malloc_Linux.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/common/OpenBSD_malloc_Linux.c	2008-03-13 15:06:49 UTC (rev 14001)
+++ tor/branches/tor-0_2_0-patches/src/common/OpenBSD_malloc_Linux.c	2008-03-13 15:07:21 UTC (rev 14002)
@@ -54,6 +54,7 @@
 #include <limits.h>
 #include <errno.h>
 #include <err.h>
+#include "torint.h"
 
 //#include "thread_private.h"
 
@@ -1926,12 +1927,15 @@
 	return (r);
 }
 
-#if defined(__i386__)||defined(__arm__)||defined(__powerpc__)
-#define SIZE_MAX 0xffffffff
+#ifndef SIZE_MAX
+//#if defined(__i386__)||defined(__arm__)||defined(__powerpc__)
+//#define SIZE_MAX 0xffffffff
+//#endif
+//#if defined(__x86_64__)
+//#define SIZE_MAX 0xffffffffffffffff
+//#endif
+#define SIZE_MAX SIZE_T_MAX
 #endif
-#if defined(__x86_64__)
-#define SIZE_MAX 0xffffffffffffffff
-#endif
 
 void *
 calloc(size_t num, size_t size)