summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-17 00:06:34 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-17 11:04:45 +0100
commit081f8883bafc11ca7c08f868ec19f1ea32071837 (patch)
tree2e190f34ba0cb18321e0581f5e3ac242ee93f03b /source4
parent675b363b712e0b91b9b7d1189a819a36853db539 (diff)
downloadsamba-081f8883bafc11ca7c08f868ec19f1ea32071837.tar.gz
samba-081f8883bafc11ca7c08f868ec19f1ea32071837.tar.bz2
samba-081f8883bafc11ca7c08f868ec19f1ea32071837.zip
s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it and prefer forward declarations of 'struct event_context' metze
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/gensec.h1
-rw-r--r--source4/auth/session.h3
-rw-r--r--source4/cluster/ctdb/common/ctdb_ltdb.c1
-rw-r--r--source4/cluster/ctdb/common/ctdb_message.c1
-rw-r--r--source4/cluster/ctdb/common/ctdb_util.c1
-rw-r--r--source4/cluster/ctdb/config.mk2
-rw-r--r--source4/cluster/ctdb/ctdb_cluster.c1
-rw-r--r--source4/lib/socket/socket.h3
-rw-r--r--source4/lib/stream/packet.h4
-rw-r--r--source4/libcli/composite/composite.h2
-rw-r--r--source4/libcli/ldap/ldap_ndr.c1
-rw-r--r--source4/libcli/resolve/resolve.c1
-rw-r--r--source4/libcli/resolve/resolve.h1
-rw-r--r--source4/ntvfs/posix/config.mk2
-rw-r--r--source4/ntvfs/sysdep/config.mk2
-rw-r--r--source4/ntvfs/sysdep/sys_lease.c1
-rw-r--r--source4/ntvfs/sysdep/sys_lease.h1
-rw-r--r--source4/rpc_server/config.mk2
-rw-r--r--source4/smb_server/smb_server.h3
-rw-r--r--source4/smbd/config.mk2
-rw-r--r--source4/smbd/process_model.mk3
-rw-r--r--source4/smbd/service_named_pipe.c1
22 files changed, 23 insertions, 16 deletions
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index cb7f3aec99..235d2008fb 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -65,6 +65,7 @@ enum gensec_role
struct auth_session_info;
struct cli_credentials;
struct gensec_settings;
+struct event_context;
struct gensec_update_request {
struct gensec_security *gensec_security;
diff --git a/source4/auth/session.h b/source4/auth/session.h
index e0805e1584..fd298b4401 100644
--- a/source4/auth/session.h
+++ b/source4/auth/session.h
@@ -29,7 +29,8 @@ struct auth_session_info {
};
#include "librpc/gen_ndr/netlogon.h"
-#include "lib/events/events.h"
+
+struct event_context;
/* Create a security token for a session SYSTEM (the most
* trusted/prvilaged account), including the local machine account as
diff --git a/source4/cluster/ctdb/common/ctdb_ltdb.c b/source4/cluster/ctdb/common/ctdb_ltdb.c
index e9ee55f6a7..1673368860 100644
--- a/source4/cluster/ctdb/common/ctdb_ltdb.c
+++ b/source4/cluster/ctdb/common/ctdb_ltdb.c
@@ -18,7 +18,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "../tdb/include/tdb.h"
#include "system/network.h"
#include "system/filesys.h"
diff --git a/source4/cluster/ctdb/common/ctdb_message.c b/source4/cluster/ctdb/common/ctdb_message.c
index 323e90c9e0..54f8e2ac1a 100644
--- a/source4/cluster/ctdb/common/ctdb_message.c
+++ b/source4/cluster/ctdb/common/ctdb_message.c
@@ -21,7 +21,6 @@
protocol design and packet details
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "../tdb/include/tdb.h"
#include "system/network.h"
#include "system/filesys.h"
diff --git a/source4/cluster/ctdb/common/ctdb_util.c b/source4/cluster/ctdb/common/ctdb_util.c
index 67eb32221a..f6389c449f 100644
--- a/source4/cluster/ctdb/common/ctdb_util.c
+++ b/source4/cluster/ctdb/common/ctdb_util.c
@@ -18,7 +18,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "../tdb/include/tdb.h"
#include "system/network.h"
#include "system/filesys.h"
diff --git a/source4/cluster/ctdb/config.mk b/source4/cluster/ctdb/config.mk
index 28b18c17ce..d164d710df 100644
--- a/source4/cluster/ctdb/config.mk
+++ b/source4/cluster/ctdb/config.mk
@@ -12,7 +12,7 @@ opendb_ctdb_OBJ_FILES = $(ctdbsrcdir)/opendb_ctdb.o
##################
[SUBSYSTEM::ctdb]
-PUBLIC_DEPENDENCIES = TDB_WRAP LIBTALLOC
+PUBLIC_DEPENDENCIES = TDB_WRAP LIBTALLOC LIBEVENTS
ctdb_OBJ_FILES = $(addprefix $(ctdbsrcdir)/, \
ctdb_cluster.o \
diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c
index 1c96319986..9b0c9a8aa4 100644
--- a/source4/cluster/ctdb/ctdb_cluster.c
+++ b/source4/cluster/ctdb/ctdb_cluster.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "cluster/cluster.h"
#include "system/filesys.h"
#include "cluster/cluster_private.h"
diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h
index ec3afe8f7f..8b1b65db92 100644
--- a/source4/lib/socket/socket.h
+++ b/source4/lib/socket/socket.h
@@ -20,8 +20,7 @@
#ifndef _SAMBA_SOCKET_H
#define _SAMBA_SOCKET_H
-#include "lib/events/events.h"
-
+struct event_context;
struct socket_context;
enum socket_type {
diff --git a/source4/lib/stream/packet.h b/source4/lib/stream/packet.h
index 45826c5f14..f7b10cd878 100644
--- a/source4/lib/stream/packet.h
+++ b/source4/lib/stream/packet.h
@@ -20,6 +20,10 @@
*/
+struct packet_context;
+struct event_context;
+struct fd_event;
+
typedef NTSTATUS (*packet_full_request_fn_t)(void *private,
DATA_BLOB blob, size_t *packet_size);
typedef NTSTATUS (*packet_callback_fn_t)(void *private, DATA_BLOB blob);
diff --git a/source4/libcli/composite/composite.h b/source4/libcli/composite/composite.h
index 28cd6a88dc..25799d6a94 100644
--- a/source4/libcli/composite/composite.h
+++ b/source4/libcli/composite/composite.h
@@ -24,6 +24,8 @@
#include "libcli/raw/interfaces.h"
+struct event_context;
+
/*
this defines the structures associated with "composite"
requests. Composite requests are libcli requests that are internally
diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c
index 5e938ea148..f0a11ba41f 100644
--- a/source4/libcli/ldap/ldap_ndr.c
+++ b/source4/libcli/ldap/ldap_ndr.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "libcli/ldap/ldap.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index 7d1c48cbee..12764e1084 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "libcli/composite/composite.h"
#include "libcli/resolve/resolve.h"
#include "librpc/gen_ndr/ndr_nbt.h"
diff --git a/source4/libcli/resolve/resolve.h b/source4/libcli/resolve/resolve.h
index 01fc930fce..942a0a0bd2 100644
--- a/source4/libcli/resolve/resolve.h
+++ b/source4/libcli/resolve/resolve.h
@@ -23,6 +23,7 @@
#define __RESOLVE_H__
struct socket_address;
+struct event_context;
#include "../libcli/nbt/libnbt.h"
typedef struct composite_context *(*resolve_name_send_fn)(TALLOC_CTX *mem_ctx,
diff --git a/source4/ntvfs/posix/config.mk b/source4/ntvfs/posix/config.mk
index 1ea4e8f97d..b38efba79b 100644
--- a/source4/ntvfs/posix/config.mk
+++ b/source4/ntvfs/posix/config.mk
@@ -29,7 +29,7 @@ pvfs_acl_nfs4_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_acl_nfs4.o
################################################
[SUBSYSTEM::pvfs_aio]
-PRIVATE_DEPENDENCIES = LIBAIO_LINUX
+PRIVATE_DEPENDENCIES = LIBEVENTS LIBAIO_LINUX
################################################
pvfs_aio_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_aio.o
diff --git a/source4/ntvfs/sysdep/config.mk b/source4/ntvfs/sysdep/config.mk
index 1122d5c39d..49ad70b95e 100644
--- a/source4/ntvfs/sysdep/config.mk
+++ b/source4/ntvfs/sysdep/config.mk
@@ -3,6 +3,7 @@
[MODULE::sys_notify_inotify]
SUBSYSTEM = sys_notify
INIT_FUNCTION = sys_notify_inotify_init
+PRIVATE_DEPENDENCIES = LIBEVENTS
# End MODULE sys_notify_inotify
################################################
@@ -17,6 +18,7 @@ sys_notify_inotify_OBJ_FILES = $(ntvfssrcdir)/sysdep/inotify.o
sys_notify_OBJ_FILES = $(ntvfssrcdir)/sysdep/sys_notify.o
[SUBSYSTEM::sys_lease_linux]
+PRIVATE_DEPENDENCIES = LIBEVENTS
sys_lease_linux_OBJ_FILES = $(ntvfssrcdir)/sysdep/sys_lease_linux.o
diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c
index 6e28b46550..64e993f395 100644
--- a/source4/ntvfs/sysdep/sys_lease.c
+++ b/source4/ntvfs/sysdep/sys_lease.c
@@ -25,7 +25,6 @@
#include "includes.h"
#include "system/filesys.h"
#include "ntvfs/sysdep/sys_lease.h"
-#include "lib/events/events.h"
#include "../lib/util/dlinklist.h"
#include "param/param.h"
diff --git a/source4/ntvfs/sysdep/sys_lease.h b/source4/ntvfs/sysdep/sys_lease.h
index e53760fb1e..6cda6398b2 100644
--- a/source4/ntvfs/sysdep/sys_lease.h
+++ b/source4/ntvfs/sysdep/sys_lease.h
@@ -22,6 +22,7 @@
struct sys_lease_context;
struct opendb_entry;
struct messaging_context;
+struct event_context;
typedef NTSTATUS (*sys_lease_send_break_fn)(struct messaging_context *,
struct opendb_entry *,
diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk
index 76aa6b938a..f7b3812b06 100644
--- a/source4/rpc_server/config.mk
+++ b/source4/rpc_server/config.mk
@@ -18,7 +18,7 @@ PUBLIC_HEADERS += $(rpc_serversrcdir)/common/common.h
[MODULE::dcerpc_rpcecho]
INIT_FUNCTION = dcerpc_server_rpcecho_init
SUBSYSTEM = dcerpc_server
-PRIVATE_DEPENDENCIES = NDR_ECHO
+PRIVATE_DEPENDENCIES = NDR_ECHO LIBEVENTS
# End MODULE dcerpc_rpcecho
################################################
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index 227c298008..d66286da2e 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -21,10 +21,11 @@
#include "libcli/raw/request.h"
#include "libcli/raw/interfaces.h"
-#include "lib/events/events.h"
#include "lib/socket/socket.h"
#include "../lib/util/dlinklist.h"
+struct event_context;
+
/*
this header declares the core context structures associated with smb
sockets, tree connects, requests etc
diff --git a/source4/smbd/config.mk b/source4/smbd/config.mk
index 63105d368c..a5f5aab65e 100644
--- a/source4/smbd/config.mk
+++ b/source4/smbd/config.mk
@@ -2,7 +2,7 @@
[SUBSYSTEM::service]
PRIVATE_DEPENDENCIES = \
- MESSAGING samba-socket NDR_NAMED_PIPE_AUTH
+ LIBEVENTS MESSAGING samba-socket NDR_NAMED_PIPE_AUTH
service_OBJ_FILES = $(addprefix $(smbdsrcdir)/, \
service.o \
diff --git a/source4/smbd/process_model.mk b/source4/smbd/process_model.mk
index 5ed8471a9d..d2ef048f40 100644
--- a/source4/smbd/process_model.mk
+++ b/source4/smbd/process_model.mk
@@ -15,7 +15,7 @@ process_model_single_OBJ_FILES = $(smbdsrcdir)/process_single.o
[MODULE::process_model_standard]
INIT_FUNCTION = process_model_standard_init
SUBSYSTEM = process_model
-PRIVATE_DEPENDENCIES = SETPROCTITLE
+PRIVATE_DEPENDENCIES = LIBEVENTS SETPROCTITLE
# End MODULE process_model_standard
################################################
@@ -37,6 +37,7 @@ process_model_thread_OBJ_FILES = $(smbdsrcdir)/process_thread.o
[MODULE::process_model_prefork]
INIT_FUNCTION = process_model_prefork_init
SUBSYSTEM = process_model
+PRIVATE_DEPENDENCIES = LIBEVENTS SETPROCTITLE
# End MODULE process_model_thread
################################################
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index b2b102c01f..ad7ba76b0d 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "lib/events/events.h"
#include "lib/socket/socket.h"
#include "smbd/service.h"
#include "param/param.h"