← Back to team overview

cuneiform team mailing list archive

Re: FreeBSD port, take 2

 

On Thu, 2009-02-19 at 17:01 +0200, Jussi Pakkanen wrote:

> In this case you should just get rid of the useless #elif clause entirely.

OK, thank you for your comment. I did it that way because every "else"
clause had the directive to include malloc.h while on FreeBSD no file
needs to be included, as those functions are moved to stdlib.h.
 
-- 
Sincerely yours,
Yury V. Zaytsev
=== modified file 'cuneiform_src/Kern/rbal/src/statsearchbl.cpp'
--- cuneiform_src/Kern/rbal/src/statsearchbl.cpp	2009-01-21 14:52:06 +0000
+++ cuneiform_src/Kern/rbal/src/statsearchbl.cpp	2009-02-19 15:34:08 +0000
@@ -66,15 +66,11 @@
 #include <malloc/malloc.h>
 #define malloc_usable_size(a) malloc_size(a)
 
-#elif defined(__FreeBSD__)
-/* freebsd system malloc don`t work correctly with malloc_usable_size in c++ */
-#include <dlmalloc/malloc.h>
-
 #elif defined(WIN32)
 #include<malloc.h>
 #define malloc_usable_size(a) _msize(a)
 
-#else
+#elif !defined(__FreeBSD__)
 #include <malloc.h>
 #endif
 

=== modified file 'cuneiform_src/Kern/windummy.c'
--- cuneiform_src/Kern/windummy.c	2009-02-02 17:08:58 +0000
+++ cuneiform_src/Kern/windummy.c	2009-02-19 15:33:00 +0000
@@ -55,10 +55,7 @@
 #if defined(__APPLE__) && defined(__MACH__)
 #include <malloc/malloc.h>
 #define malloc_usable_size(a) malloc_size(a)
-#elif defined(__FreeBSD__)
-/* freebsd system malloc don`t work correctly with malloc_usable_size in c++ */
-#include <dlmalloc/malloc.h>
-#else
+#elif !defined(__FreeBSD__)
 #include <malloc.h>
 #endif
 


Follow ups

References