s4: fix LIBEVENTS dependencies and use more forward declarations
authorStefan Metzmacher <metze@samba.org>
Tue, 16 Dec 2008 23:06:34 +0000 (00:06 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Dec 2008 10:04:45 +0000 (11:04 +0100)
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze

22 files changed:
source4/auth/gensec/gensec.h
source4/auth/session.h
source4/cluster/ctdb/common/ctdb_ltdb.c
source4/cluster/ctdb/common/ctdb_message.c
source4/cluster/ctdb/common/ctdb_util.c
source4/cluster/ctdb/config.mk
source4/cluster/ctdb/ctdb_cluster.c
source4/lib/socket/socket.h
source4/lib/stream/packet.h
source4/libcli/composite/composite.h
source4/libcli/ldap/ldap_ndr.c
source4/libcli/resolve/resolve.c
source4/libcli/resolve/resolve.h
source4/ntvfs/posix/config.mk
source4/ntvfs/sysdep/config.mk
source4/ntvfs/sysdep/sys_lease.c
source4/ntvfs/sysdep/sys_lease.h
source4/rpc_server/config.mk
source4/smb_server/smb_server.h
source4/smbd/config.mk
source4/smbd/process_model.mk
source4/smbd/service_named_pipe.c

index cb7f3aec9972a987470e0d37558ba0693eddea77..235d2008fb253128877e89ccf09a04a56525982d 100644 (file)
@@ -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;
index e0805e1584348e79c15253571e3ce287acfb1a7f..fd298b44010f71ad7a095379e88e02cc6bc89065 100644 (file)
@@ -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
index e9ee55f6a731186ef92bc84af02db5bf127011df..1673368860372ef74584393e07b8712d3098e3a4 100644 (file)
@@ -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"
index 323e90c9e0120ec865a988840a1738cc4f623ab4..54f8e2ac1aeed37be804af47d4f7359a165282df 100644 (file)
@@ -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"
index 67eb32221ae72a29fc129f1b48a7c8991af273a5..f6389c449f09ce08d9e64aa7c43b88db52410971 100644 (file)
@@ -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"
index 28b18c17ce979be81d4e0db7b28bbea6852a62dd..d164d710df6f8b0c188f81e071404d47c0500082 100644 (file)
@@ -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 \
index 1c9631998698d3c54c4c2fcdc366d0cd2b97d127..9b0c9a8aa4564a885a709b59ee4d4596b3698b82 100644 (file)
@@ -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"
index ec3afe8f7fc978512e283ef82904d3f59b484cba..8b1b65db92c62ac7016dd1cd3b2912b877899cd0 100644 (file)
@@ -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 {
index 45826c5f14491e7bfca6439eb21a12e1db57d213..f7b10cd87803a33381a779ce63ddfa546a5287b2 100644 (file)
    
 */
 
+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);
index 28cd6a88dc04147b674b54e98f4afc12bb0228fe..25799d6a94c4b6c020cc602cccfdea0ffc1d84d7 100644 (file)
@@ -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
index 5e938ea1488414d97005af54521cf0bee0c66a76..f0a11ba41fd0e632e3576889e51b015d36f123bc 100644 (file)
@@ -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"
index 7d1c48cbeecb223c74be56942881e21236685ef4..12764e1084c44b07e809b4d8238112cf3b7c558a 100644 (file)
@@ -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"
index 01fc930fce85bcb7f7410bed68f6a9bd22d0df4c..942a0a0bd2ed6ddb9f9ccae72120a242eaa72638 100644 (file)
@@ -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,
index 1ea4e8f97d8bc7df7964691a30b1f9581a3a6908..b38efba79ba22d35b9000043d3379a56a962cc00 100644 (file)
@@ -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
index 1122d5c39dc9fcc9459ac5d4bc8f1db114a9f071..49ad70b95edc278c16ec4b57a2be645c7ab42397 100644 (file)
@@ -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
 
index 6e28b46550146cb8dd734169bd73244c6016981c..64e993f395cf301f2f0b83beb86715274aeebf54 100644 (file)
@@ -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"
 
index e53760fb1eb9d5fdb316550f4bedf0627e1fd5fd..6cda6398b2995a3ea28a46cede65cad97548b8dd 100644 (file)
@@ -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 *,
index 76aa6b938aac4e08cacefde46d2588fcaaaa42e0..f7b3812b06cbc412ba4d9f199903447742fb8688 100644 (file)
@@ -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
 ################################################
 
index 227c298008e42e6fe1816facbc7054ad6a94cfe0..d66286da2e12adfd6f46bfea715808833b6753a9 100644 (file)
 
 #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
index 63105d368c5549439c289e720fca67fd0fad11af..a5f5aab65e64e947fc938970b24ddbb1da54b1a9 100644 (file)
@@ -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 \
index 5ed8471a9d265cd1e9f4c621329d39d937de59a2..d2ef048f4096eb0d2d38cb023d3e24b65a47f530 100644 (file)
@@ -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
 ################################################
 
index b2b102c01fcb44c7c100aff35bbad43603a152bf..ad7ba76b0debc6c354c92e91cfe1b72b656208b3 100644 (file)
@@ -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"