r6651: It's not the smartest thing in the world to #define _SAMBA_BUILD_ in a file
authorVolker Lendecke <vlendec@samba.org>
Sat, 7 May 2005 17:09:16 +0000 (17:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:49 +0000 (10:56 -0500)
that is only included if _SAMBA_BUILD_ is defined...

Let's see how far this gets us.

Volker

source/configure.in
source/include/includes.h
source/lib/talloc.c

index d84c5435974eafc24cf7e74a72b9b4f7bf2f7b70..087c33a7a4ef7dae0e818e4a1e310d1d78f89912 100644 (file)
@@ -254,6 +254,7 @@ if test "x$CFLAGS" = x; then
   CFLAGS="-O"
 fi
 
+CFLAGS="${CFLAGS} -D_SAMBA_BUILD_"
 
 AC_ARG_ENABLE(developer, [  --enable-developer      Turn on developer warnings and debugging (default=no)],
     [if eval "test x$enable_developer = xyes"; then
index 1f2aa8baf9167275c063df4723dcc90c10786c27..1fabe44e0e74b4b759bac5d107ff0cd16659683f 100644 (file)
@@ -804,7 +804,6 @@ extern int errno;
 #include "tdb/tdb.h"
 #include "tdb/spinlock.h"
 #include "tdb/tdbutil.h"
-#define _SAMBA_BUILD_ 1
 #include "talloc.h"
 #include "nt_status.h"
 #include "ads.h"
index 18fa04034b4d283346ea2a48a993b321668f43e0..a55300d992285aaccfc3fceb3c955e96a2622ffa 100644 (file)
 
 #ifdef _SAMBA_BUILD_
 #include "includes.h"
+/* This is to circumvent SAMBA3's paranoid malloc checker. Here in this file
+ * we trust ourselves... */
+#ifdef malloc
+#undef malloc
+#endif
+#ifdef realloc
+#undef realloc
+#endif
 #else
 #include <stdio.h>
 #include <stdlib.h>