From 8857a9a961b10bad8f8109aebd5a0e8a44a44e62 Mon Sep 17 00:00:00 2001 From: dimitr Date: Sat, 12 Oct 2002 11:16:54 +0000 Subject: [PATCH] Made the codebase ready for the win32 classic builds. --- src/remote/cntl.cpp | 3 +++ src/remote/nt_server.cpp | 15 ++++++++------- src/remote/srvr_w32.cpp | 15 --------------- src/utilities/install_nt.h | 2 +- src/utilities/install_svc.cpp | 8 ++++++++ 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/remote/cntl.cpp b/src/remote/cntl.cpp index 72e13fa7d2..02a2bbf571 100644 --- a/src/remote/cntl.cpp +++ b/src/remote/cntl.cpp @@ -299,6 +299,7 @@ static void control_thread( DWORD action) case SERVICE_CONTROL_INTERROGATE: break; +#if (defined SUPERCLIENT || defined SUPERSERVER) case SERVICE_CREATE_GUARDIAN_MUTEX: hMutex = OpenMutex(SYNCHRONIZE, FALSE, GUARDIAN_MUTEX); if (hMutex) { @@ -309,6 +310,8 @@ static void control_thread( DWORD action) WaitForSingleObject(hMutex, INFINITE); } break; +#endif + default: break; } diff --git a/src/remote/nt_server.cpp b/src/remote/nt_server.cpp index 1fa07d7b80..d9aa4628be 100644 --- a/src/remote/nt_server.cpp +++ b/src/remote/nt_server.cpp @@ -28,6 +28,7 @@ #include "gen/codes.h" #include "../jrd/license.h" #include "../jrd/thd.h" +#include "../jrd/thd_proto.h" #include "../utilities/install_nt.h" #include "../remote/cntl_proto.h" #include "../remote/inet_proto.h" @@ -268,11 +269,11 @@ static void THREAD_ROUTINE start_connections_thread( int flag) gds__thread_enable(-1); if (server_flag & SRVR_inet) - gds__thread_start((FPTR_INT) inet_connect_wait_thread, 0, THREAD_high, - 0, 0); + gds__thread_start(reinterpret_cast(inet_connect_wait_thread), + 0, THREAD_high, 0, 0); if (server_flag & SRVR_pipe) - gds__thread_start((FPTR_INT) wnet_connect_wait_thread, 0, THREAD_high, - 0, 0); + gds__thread_start(reinterpret_cast(wnet_connect_wait_thread), + 0, THREAD_high, 0, 0); } @@ -299,14 +300,14 @@ static void THREAD_ROUTINE wnet_connect_wait_thread( void *dummy) port = WNET_connect(protocol_wnet, 0, status_vector, server_flag); THREAD_EXIT; if (!port) { - if (status_vector[1] != gds__io_error || + if (status_vector[1] != gds_io_error || status_vector[6] != gds_arg_win32 || status_vector[7] != ERROR_CALL_NOT_IMPLEMENTED) gds__log_status(0, status_vector); break; } - gds__thread_start((FPTR_INT) process_connection_thread, port, 0, 0, - 0); + gds__thread_start(reinterpret_cast(process_connection_thread), + port, 0, 0, 0); } if (!(server_flag & SRVR_non_service)) diff --git a/src/remote/srvr_w32.cpp b/src/remote/srvr_w32.cpp index 978726ca4f..edb734011d 100644 --- a/src/remote/srvr_w32.cpp +++ b/src/remote/srvr_w32.cpp @@ -520,21 +520,6 @@ static HANDLE parse_args( LPSTR lpszArgs, USHORT * pserver_flag) *pserver_flag |= SRVR_no_icon; break; -#ifndef SUPERSERVER -/* Remove this because we are now conrtolling this by the LICENSE file */ - case 'I': - *pserver_flag |= SRVR_inet; - break; - - case 'N': - *pserver_flag |= SRVR_pipe; - break; - - case 'L': - *pserver_flag |= SRVR_ipc; - break; -#endif /* SUPERSERVER */ - #ifdef XNET case 'X': *pserver_flag |= SRVR_xnet; diff --git a/src/utilities/install_nt.h b/src/utilities/install_nt.h index e3fec4b7ea..041f2517d6 100644 --- a/src/utilities/install_nt.h +++ b/src/utilities/install_nt.h @@ -37,7 +37,7 @@ #else #define REMOTE_SERVICE "InterBaseRemoteService" #define REMOTE_DISPLAY_NAME "Firebird Remote Service" -#define REMOTE_EXECUTABLE "bin\\fbremote" +#define REMOTE_EXECUTABLE "bin\\fb_inet_server" #endif #define REMOTE_DEPENDENCIES "Tcpip\0\0" diff --git a/src/utilities/install_svc.cpp b/src/utilities/install_svc.cpp index 75d9d90367..e6bac371cb 100644 --- a/src/utilities/install_svc.cpp +++ b/src/utilities/install_svc.cpp @@ -159,6 +159,7 @@ int CLIB_ROUTINE main( int argc, char **argv) case COMMAND_INSTALL: /* First, lets do the Guardian, if it has been specified. */ +#if (defined SUPERCLIENT || defined SUPERSERVER) if (sw_guardian) { status = SERVICES_install(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, @@ -179,6 +180,7 @@ int CLIB_ROUTINE main( int argc, char **argv) knows it is configured correctly. */ guardian_setup(svc_error); } +#endif /* do the install of IBServer */ status = @@ -195,6 +197,7 @@ int CLIB_ROUTINE main( int argc, char **argv) break; case COMMAND_REMOVE: +#if (defined SUPERCLIENT || defined SUPERSERVER) if (sw_guardian) { status = SERVICES_remove(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, svc_error); @@ -218,6 +221,7 @@ int CLIB_ROUTINE main( int argc, char **argv) else ib_printf ("Service \"%s\" not deleted.\n", ISCGUARD_DISPLAY_NAME); } +#endif status = SERVICES_remove(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME, svc_error); @@ -246,6 +250,7 @@ int CLIB_ROUTINE main( int argc, char **argv) case COMMAND_START: /* Test for use of Guardian. If so, start the guardian else start ib-server */ if (using_guardian(svc_error) == 1) { +#if (defined SUPERCLIENT || defined SUPERSERVER) status = SERVICES_start(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, sw_mode, svc_error); if (status == SUCCESS) @@ -253,6 +258,7 @@ int CLIB_ROUTINE main( int argc, char **argv) ISCGUARD_DISPLAY_NAME); else ib_printf("Service \"%s\" not started.\n", ISCGUARD_DISPLAY_NAME); +#endif } else { status = SERVICES_start(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME, @@ -268,6 +274,7 @@ int CLIB_ROUTINE main( int argc, char **argv) case COMMAND_STOP: /* Test for use of Guardian. If so, stop the guardian else stop ib-server */ if (using_guardian(svc_error) == 1) { +#if (defined SUPERCLIENT || defined SUPERSERVER) status = SERVICES_stop(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, svc_error); @@ -276,6 +283,7 @@ int CLIB_ROUTINE main( int argc, char **argv) ISCGUARD_DISPLAY_NAME); else ib_printf("Service \"%s\" not stopped.\n", ISCGUARD_DISPLAY_NAME); +#endif } else { status = SERVICES_stop(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME,