svn commit: samba r6651 - in branches/SAMBA_3_0/source: . include lib

vlendec at samba.org vlendec at samba.org
Sat May 7 17:09:17 GMT 2005


Author: vlendec
Date: 2005-05-07 17:09:16 +0000 (Sat, 07 May 2005)
New Revision: 6651

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6651

Log:
It's not the smartest thing in the world to #define _SAMBA_BUILD_ in a file
that is only included if _SAMBA_BUILD_ is defined...

Let's see how far this gets us.

Volker

Modified:
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0/source/lib/talloc.c


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in	2005-05-07 16:27:56 UTC (rev 6650)
+++ branches/SAMBA_3_0/source/configure.in	2005-05-07 17:09:16 UTC (rev 6651)
@@ -254,6 +254,7 @@
   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

Modified: branches/SAMBA_3_0/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0/source/include/includes.h	2005-05-07 16:27:56 UTC (rev 6650)
+++ branches/SAMBA_3_0/source/include/includes.h	2005-05-07 17:09:16 UTC (rev 6651)
@@ -804,7 +804,6 @@
 #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"

Modified: branches/SAMBA_3_0/source/lib/talloc.c
===================================================================
--- branches/SAMBA_3_0/source/lib/talloc.c	2005-05-07 16:27:56 UTC (rev 6650)
+++ branches/SAMBA_3_0/source/lib/talloc.c	2005-05-07 17:09:16 UTC (rev 6651)
@@ -29,6 +29,14 @@
 
 #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>



More information about the samba-cvs mailing list