lib/util: consolidate module loading into common code
[samba.git] / source3 / include / includes.h
index 7ebb81e6df87ce2672fa43fe843c6eef8b032c32..786fb4e574a1f79f5a0a4e9eeb85e60d1bd83934 100644 (file)
 
 #include "../replace/replace.h"
 
-#if _SAMBA_BUILD_ == 4
-# undef _SAMBA_BUILD_
-# define _SAMBA_BUILD_ 3
-#endif
-
 /* make sure we have included the correct config.h */
 #ifndef NO_CONFIG_H /* for some tests */
 #ifndef CONFIG_H_IS_FROM_SAMBA
 #include <aio.h>
 #endif
 
-#ifdef WITH_MADVISE_PROTECTED
-#include <sys/mman.h>
-#endif
-
 /* Special macros that are no-ops except when run under Valgrind on
  * x86.  They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
 #if HAVE_VALGRIND_MEMCHECK_H
@@ -507,15 +498,13 @@ typedef char fstring[FSTRING_LEN];
 #endif
 
 /* Lists, trees, caching, database... */
-#include "../lib/util/util.h"
+#include "../lib/util/samba_util.h"
 #include "../lib/util/util_net.h"
 #include "../lib/util/xfile.h"
 #include "../lib/util/memory.h"
 #include "../lib/util/attr.h"
 #include "../lib/util/tsort.h"
 #include "../lib/util/dlinklist.h"
-#include <tdb.h>
-#include "util_tdb.h"
 
 #include <talloc.h>
 
@@ -526,7 +515,7 @@ typedef char fstring[FSTRING_LEN];
 #include "../lib/util/debug.h"
 #include "../lib/util/debug_s3.h"
 
-#include "libads/ads_status.h"
+#include "../libcli/util/ntstatus.h"
 #include "../libcli/util/error.h"
 #include "../lib/util/charset/charset.h"
 #include "dynconfig/dynconfig.h"
@@ -535,29 +524,11 @@ typedef char fstring[FSTRING_LEN];
 #include "smb.h"
 #include "../lib/util/byteorder.h"
 
-#include "client.h"
-
-#include "module.h"
+#include "../lib/util/samba_modules.h"
 #include "../lib/util/talloc_stack.h"
 #include "../lib/util/smb_threads.h"
 #include "../lib/util/smb_threads_internal.h"
 
-/*
- * Reasons for cache flush.
- */
-
-enum flush_reason_enum {
-    SEEK_FLUSH,
-    READ_FLUSH,
-    WRITE_FLUSH,
-    READRAW_FLUSH,
-    OPLOCK_RELEASE_FLUSH,
-    CLOSE_FLUSH,
-    SYNC_FLUSH,
-    SIZECHANGE_FLUSH,
-    /* NUM_FLUSH_REASONS must remain the last value in the enumeration. */
-    NUM_FLUSH_REASONS};
-
 /***** prototypes *****/
 #ifndef NO_PROTO_H
 #include "proto.h"
@@ -632,8 +603,6 @@ void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,
 /* PRINTFLIKE2 */
 int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
-int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
-
 int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
 
 int asprintf_strupper_m(char **strp, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
@@ -672,20 +641,11 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATT
 #undef HAVE_MMAP
 #endif
 
-#ifndef CONST_DISCARD
-#define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
-#endif
-
 void dump_core(void) _NORETURN_;
 void exit_server(const char *const reason) _NORETURN_;
 void exit_server_cleanly(const char *const reason) _NORETURN_;
 void exit_server_fault(void) _NORETURN_;
 
-#if defined(HAVE_IPV6)
-void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
-                                 struct in6_addr ip);
-#endif
-
 /* samba3 doesn't use uwrap yet */
 #define uwrap_enabled() 0