summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-10 16:48:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:50:03 -0500
commit4d1c5a023cf6680474bd8d8be73f576d155cfe81 (patch)
tree4d317119eca7f5f273d4027c1f08fe5665ddbd1e /source4/lib/ldb/common
parent2b7d93265635f2e4cfc8b72f73a932d44821d371 (diff)
downloadsamba-4d1c5a023cf6680474bd8d8be73f576d155cfe81.tar.gz
samba-4d1c5a023cf6680474bd8d8be73f576d155cfe81.tar.bz2
samba-4d1c5a023cf6680474bd8d8be73f576d155cfe81.zip
r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/attrib_handlers.c4
-rw-r--r--source4/lib/ldb/common/ldb.c4
-rw-r--r--source4/lib/ldb/common/ldb_attributes.c3
-rw-r--r--source4/lib/ldb/common/ldb_controls.c4
-rw-r--r--source4/lib/ldb/common/ldb_debug.c4
-rw-r--r--source4/lib/ldb/common/ldb_dn.c4
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c7
-rw-r--r--source4/lib/ldb/common/ldb_match.c4
-rw-r--r--source4/lib/ldb/common/ldb_modules.c12
-rw-r--r--source4/lib/ldb/common/ldb_msg.c5
-rw-r--r--source4/lib/ldb/common/ldb_parse.c6
-rw-r--r--source4/lib/ldb/common/ldb_utf8.c4
-rw-r--r--source4/lib/ldb/common/qsort.c9
13 files changed, 17 insertions, 53 deletions
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c
index 4826ead946..2109e9b2da 100644
--- a/source4/lib/ldb/common/attrib_handlers.c
+++ b/source4/lib/ldb/common/attrib_handlers.c
@@ -27,9 +27,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include <ctype.h>
+#include "ldb/include/includes.h"
/*
default handler that just copies a ldb_val.
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 78e6a74425..41b1a3efb7 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -33,9 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_errors.h"
-#include "ldb/include/ldb_private.h"
+#include "ldb/include/includes.h"
/*
initialise a ldb context
diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c
index bf955ece3d..13e721a266 100644
--- a/source4/lib/ldb/common/ldb_attributes.c
+++ b/source4/lib/ldb/common/ldb_attributes.c
@@ -30,8 +30,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
+#include "ldb/include/includes.h"
/*
add to the list of ldif handlers for this ldb context
diff --git a/source4/lib/ldb/common/ldb_controls.c b/source4/lib/ldb/common/ldb_controls.c
index e4c4c64a6f..d2729c82ab 100644
--- a/source4/lib/ldb/common/ldb_controls.c
+++ b/source4/lib/ldb/common/ldb_controls.c
@@ -33,9 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_errors.h"
-#include "ldb/include/ldb_private.h"
+#include "ldb/include/includes.h"
/* check if a control with the specified "oid" exist and return it */
/* returns NULL if not found */
diff --git a/source4/lib/ldb/common/ldb_debug.c b/source4/lib/ldb/common/ldb_debug.c
index d046c8cd1f..21b02956b8 100644
--- a/source4/lib/ldb/common/ldb_debug.c
+++ b/source4/lib/ldb/common/ldb_debug.c
@@ -33,9 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-
+#include "ldb/include/includes.h"
/*
this allows the user to choose their own debug function
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 4164814f4f..e0c6f4a103 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -35,9 +35,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include <ctype.h>
+#include "ldb/include/includes.h"
#define LDB_DN_NULL_FAILED(x) if (!(x)) goto failed
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 7ba6a00147..53dadcc6fe 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -37,12 +37,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include <ctype.h>
-#ifdef _SAMBA_BUILD_
-#include "system/filesys.h"
-#endif
+#include "ldb/include/includes.h"
/*
diff --git a/source4/lib/ldb/common/ldb_match.c b/source4/lib/ldb/common/ldb_match.c
index 84f051f497..810191c5ec 100644
--- a/source4/lib/ldb/common/ldb_match.c
+++ b/source4/lib/ldb/common/ldb_match.c
@@ -34,9 +34,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-
+#include "ldb/include/includes.h"
/*
check if the scope matches in a search result
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index f83f0b06ef..804bd654f3 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -34,17 +34,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_errors.h"
-#include "ldb/include/ldb_private.h"
-#include "dlinklist.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#ifdef HAVE_DLOPEN_DISABLED
-#include <dlfcn.h>
-#endif
+#include "ldb/include/includes.h"
#define LDB_MODULE_PREFIX "modules:"
#define LDB_MODULE_PREFIX_LEN 8
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index deb32133c1..513a4de1f8 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -33,10 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_errors.h"
-#include "ldb/include/ldb_private.h"
-#include <time.h>
+#include "ldb/include/includes.h"
/*
create a new ldb_message in a given memory context (NULL for top level)
diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c
index 25e4b727df..52e7522b85 100644
--- a/source4/lib/ldb/common/ldb_parse.c
+++ b/source4/lib/ldb/common/ldb_parse.c
@@ -42,9 +42,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include <ctype.h>
-
+#include "ldb/include/includes.h"
/*
a filter is defined by:
@@ -135,7 +133,7 @@ char *ldb_binary_encode(void *mem_ctx, struct ldb_val val)
char *ldb_binary_encode_string(void *mem_ctx, const char *string)
{
struct ldb_val val;
- val.data = string;
+ val.data = discard_const(string);
val.length = strlen(string);
return ldb_binary_encode(mem_ctx, val);
}
diff --git a/source4/lib/ldb/common/ldb_utf8.c b/source4/lib/ldb/common/ldb_utf8.c
index a0aad12658..4a29ac45f7 100644
--- a/source4/lib/ldb/common/ldb_utf8.c
+++ b/source4/lib/ldb/common/ldb_utf8.c
@@ -33,9 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include <ctype.h>
+#include "ldb/include/includes.h"
/*
TODO:
diff --git a/source4/lib/ldb/common/qsort.c b/source4/lib/ldb/common/qsort.c
index 7b8dc55167..ef7be2c14e 100644
--- a/source4/lib/ldb/common/qsort.c
+++ b/source4/lib/ldb/common/qsort.c
@@ -26,11 +26,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
+#include "ldb/include/includes.h"
/* Byte-wise swap two items of size SIZE. */
#define SWAP(a, b, size) \
@@ -62,6 +58,9 @@ typedef struct
log(MAX_THRESH)). Since total_elements has type size_t, we get as
upper bound for log (total_elements):
bits per byte (CHAR_BIT) * sizeof(size_t). */
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
#define STACK_SIZE (CHAR_BIT * sizeof(size_t))
#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi)))