tdb2: use HAVE_LIBREPLACE instead of _SAMBA_BUILD_.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 31 Oct 2011 20:41:25 +0000 (07:11 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Nov 2011 02:19:58 +0000 (03:19 +0100)
This is what lib/tdb2 really wants: to know if it should use normal
headers or replace.h.  It currently uses _SAMBA_BUILD_, which is wrong
for ldb, for example.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Nov  1 03:19:58 CET 2011 on sn-devel-104

lib/tdb2/private.h
lib/tdb2/tdb.c
lib/tdb2/tdb2.h

index 93ceb5f4ec5990c0596339e2a329f0f4c9e757fd..87245a5970f10a49c6f954f8298c9873653530f6 100644 (file)
@@ -22,7 +22,7 @@
 #include <ccan/likely/likely.h>
 #include <ccan/endian/endian.h>
 
-#ifdef _SAMBA_BUILD_
+#ifdef HAVE_LIBREPLACE
 #include "replace.h"
 #include "system/filesys.h"
 #include "system/time.h"
index 6f38244352cd5665fbe3eb5286ea846e6dc7b246..5e965acabd1f8f9295f27cd9d22ad7d6a3d7d79a 100644 (file)
@@ -16,7 +16,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 #include "private.h"
-#ifndef _SAMBA_BUILD_
+#ifndef HAVE_LIBREPLACE
 #include <ccan/asprintf/asprintf.h>
 #include <stdarg.h>
 #endif
index 6a7cab617d1167f1e33580bd74fe9f8f5dcdc171..55ad30972259e0d42e40097cc3f22da34c07f248 100644 (file)
 extern "C" {
 #endif
 
-#ifndef _SAMBA_BUILD_
 #include "config.h"
+#ifdef HAVE_LIBREPLACE
+#include "replace.h"
+#else
 #if HAVE_FILE_OFFSET_BITS
 #define _FILE_OFFSET_BITS 64
 #endif
@@ -46,8 +48,6 @@ extern "C" {
 #include <stdbool.h>
 /* For memcmp */
 #include <string.h>
-#else
-#include "replace.h"
 #endif
 #include <ccan/compiler/compiler.h>
 #include <ccan/typesafe_cb/typesafe_cb.h>