From e8182f97c49b75cd95e31557eff4a67afe8a1988 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 5 Nov 1999 22:49:26 +0000 Subject: [PATCH] Relocated the stubs function to avoid being dependent on HAVE_NT_SERVICE_MANAGER - when threads are disabled, HAVE_NT_SERVICE_MANAGER is not defined, but the stubs still must remain defined. --- servers/slapd/nt_svc.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/servers/slapd/nt_svc.c b/servers/slapd/nt_svc.c index 736c4653a8..efbcc411e7 100644 --- a/servers/slapd/nt_svc.c +++ b/servers/slapd/nt_svc.c @@ -2,24 +2,6 @@ // nt_main.c #include "portable.h" -#ifdef HAVE_NT_SERVICE_MANAGER - -#include -#include - -#include "slap.h" - -ldap_pvt_thread_cond_t started_event, stopped_event; -ldap_pvt_thread_t start_status_tid, stop_status_tid; - - -/* in main.c */ -void WINAPI ServiceMain( DWORD argc, LPTSTR *argv ); - -/* in ntservice.c */ -int srv_install( char* service, char* filename ); -int srv_remove ( char* service, char* filename ); - static void stubs() { ldap_add_s(NULL, NULL, NULL); @@ -40,6 +22,24 @@ static void stubs() ldap_unbind(NULL); } +#ifdef HAVE_NT_SERVICE_MANAGER + +#include +#include + +#include "slap.h" + +ldap_pvt_thread_cond_t started_event, stopped_event; +ldap_pvt_thread_t start_status_tid, stop_status_tid; + + +/* in main.c */ +void WINAPI ServiceMain( DWORD argc, LPTSTR *argv ); + +/* in ntservice.c */ +int srv_install( char* service, char* filename ); +int srv_remove ( char* service, char* filename ); + int main( int argc, LPTSTR *argv ) { int length; -- 2.39.5