summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2004-04-10 06:10:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:11 -0500
commit177777b05534c86514f5ee79b67532537bfd99dd (patch)
tree9078e1df6b1f030d1caebf25a01847da00407434 /source4/include
parentfdcafdef0e1dc1215eec5d99b0c36cfca04ac055 (diff)
downloadsamba-177777b05534c86514f5ee79b67532537bfd99dd.tar.gz
samba-177777b05534c86514f5ee79b67532537bfd99dd.tar.bz2
samba-177777b05534c86514f5ee79b67532537bfd99dd.zip
r141: A number of changes to get things working on FreeBSD and reduce the breakage
caused by someone recently ... 1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I have not checked this on Linux yet, but will do so soon. 2. Add the definitions of malloc_p, realloc_p etc. 3. Check for LDAP and don't build stuff that depends on LDAP if we don't\ have it. It currently builds on FreeBSD but there is one warning printed out at the end. (This used to be commit 7b34fbe0f2ef175e5504e34e4f3cdf9a0563970f)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/includes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index be0f7baaf4..79fca5f7b4 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -741,6 +741,15 @@ struct functable {
int (*fn)(int argc, const char **argv);
};
+#define malloc_p(type) (type *)malloc(sizeof(type))
+#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
+#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
+
+#ifndef HAVE_COMPARISON_FN_T
+typedef int (*comparison_fn_t)(const void *, const void *);
+#endif
+
+#include "lib/ldb/include/ldb_parse.h"
#include "nsswitch/nss.h"