diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-05-07 17:09:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:49 -0500 |
commit | 63dacdf65acb21fc4034072bda3795ffda13f4ac (patch) | |
tree | 3366ddd0bf0ab975d58ac869ba55b298b480f534 /source3 | |
parent | 479fe39c177b8c64dbf253b06eb991f03503ec3d (diff) | |
download | samba-63dacdf65acb21fc4034072bda3795ffda13f4ac.tar.gz samba-63dacdf65acb21fc4034072bda3795ffda13f4ac.tar.bz2 samba-63dacdf65acb21fc4034072bda3795ffda13f4ac.zip |
r6651: 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
(This used to be commit 563275b35f76107e3d2a8b0b6e14394b20ecd81b)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 1 | ||||
-rw-r--r-- | source3/include/includes.h | 1 | ||||
-rw-r--r-- | source3/lib/talloc.c | 8 |
3 files changed, 9 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in index d84c543597..087c33a7a4 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/include/includes.h b/source3/include/includes.h index 1f2aa8baf9..1fabe44e0e 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -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" diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 18fa04034b..a55300d992 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -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> |