8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 23:23:04 +01:00

Made the codebase ready for the win32 classic builds.

This commit is contained in:
dimitr 2002-10-12 11:16:54 +00:00
parent b65afe6f0e
commit 8857a9a961
5 changed files with 20 additions and 23 deletions

View File

@ -299,6 +299,7 @@ static void control_thread( DWORD action)
case SERVICE_CONTROL_INTERROGATE: case SERVICE_CONTROL_INTERROGATE:
break; break;
#if (defined SUPERCLIENT || defined SUPERSERVER)
case SERVICE_CREATE_GUARDIAN_MUTEX: case SERVICE_CREATE_GUARDIAN_MUTEX:
hMutex = OpenMutex(SYNCHRONIZE, FALSE, GUARDIAN_MUTEX); hMutex = OpenMutex(SYNCHRONIZE, FALSE, GUARDIAN_MUTEX);
if (hMutex) { if (hMutex) {
@ -309,6 +310,8 @@ static void control_thread( DWORD action)
WaitForSingleObject(hMutex, INFINITE); WaitForSingleObject(hMutex, INFINITE);
} }
break; break;
#endif
default: default:
break; break;
} }

View File

@ -28,6 +28,7 @@
#include "gen/codes.h" #include "gen/codes.h"
#include "../jrd/license.h" #include "../jrd/license.h"
#include "../jrd/thd.h" #include "../jrd/thd.h"
#include "../jrd/thd_proto.h"
#include "../utilities/install_nt.h" #include "../utilities/install_nt.h"
#include "../remote/cntl_proto.h" #include "../remote/cntl_proto.h"
#include "../remote/inet_proto.h" #include "../remote/inet_proto.h"
@ -268,11 +269,11 @@ static void THREAD_ROUTINE start_connections_thread( int flag)
gds__thread_enable(-1); gds__thread_enable(-1);
if (server_flag & SRVR_inet) if (server_flag & SRVR_inet)
gds__thread_start((FPTR_INT) inet_connect_wait_thread, 0, THREAD_high, gds__thread_start(reinterpret_cast<FPTR_INT_VOID_PTR>(inet_connect_wait_thread),
0, 0); 0, THREAD_high, 0, 0);
if (server_flag & SRVR_pipe) if (server_flag & SRVR_pipe)
gds__thread_start((FPTR_INT) wnet_connect_wait_thread, 0, THREAD_high, gds__thread_start(reinterpret_cast<FPTR_INT_VOID_PTR>(wnet_connect_wait_thread),
0, 0); 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); port = WNET_connect(protocol_wnet, 0, status_vector, server_flag);
THREAD_EXIT; THREAD_EXIT;
if (!port) { if (!port) {
if (status_vector[1] != gds__io_error || if (status_vector[1] != gds_io_error ||
status_vector[6] != gds_arg_win32 || status_vector[6] != gds_arg_win32 ||
status_vector[7] != ERROR_CALL_NOT_IMPLEMENTED) status_vector[7] != ERROR_CALL_NOT_IMPLEMENTED)
gds__log_status(0, status_vector); gds__log_status(0, status_vector);
break; break;
} }
gds__thread_start((FPTR_INT) process_connection_thread, port, 0, 0, gds__thread_start(reinterpret_cast<FPTR_INT_VOID_PTR>(process_connection_thread),
0); port, 0, 0, 0);
} }
if (!(server_flag & SRVR_non_service)) if (!(server_flag & SRVR_non_service))

View File

@ -520,21 +520,6 @@ static HANDLE parse_args( LPSTR lpszArgs, USHORT * pserver_flag)
*pserver_flag |= SRVR_no_icon; *pserver_flag |= SRVR_no_icon;
break; 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 #ifdef XNET
case 'X': case 'X':
*pserver_flag |= SRVR_xnet; *pserver_flag |= SRVR_xnet;

View File

@ -37,7 +37,7 @@
#else #else
#define REMOTE_SERVICE "InterBaseRemoteService" #define REMOTE_SERVICE "InterBaseRemoteService"
#define REMOTE_DISPLAY_NAME "Firebird Remote Service" #define REMOTE_DISPLAY_NAME "Firebird Remote Service"
#define REMOTE_EXECUTABLE "bin\\fbremote" #define REMOTE_EXECUTABLE "bin\\fb_inet_server"
#endif #endif
#define REMOTE_DEPENDENCIES "Tcpip\0\0" #define REMOTE_DEPENDENCIES "Tcpip\0\0"

View File

@ -159,6 +159,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
case COMMAND_INSTALL: case COMMAND_INSTALL:
/* First, lets do the Guardian, if it has been specified. */ /* First, lets do the Guardian, if it has been specified. */
#if (defined SUPERCLIENT || defined SUPERSERVER)
if (sw_guardian) { if (sw_guardian) {
status = status =
SERVICES_install(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, 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. */ knows it is configured correctly. */
guardian_setup(svc_error); guardian_setup(svc_error);
} }
#endif
/* do the install of IBServer */ /* do the install of IBServer */
status = status =
@ -195,6 +197,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
break; break;
case COMMAND_REMOVE: case COMMAND_REMOVE:
#if (defined SUPERCLIENT || defined SUPERSERVER)
if (sw_guardian) { if (sw_guardian) {
status = SERVICES_remove(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, status = SERVICES_remove(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME,
svc_error); svc_error);
@ -218,6 +221,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
else else
ib_printf ("Service \"%s\" not deleted.\n", ISCGUARD_DISPLAY_NAME); ib_printf ("Service \"%s\" not deleted.\n", ISCGUARD_DISPLAY_NAME);
} }
#endif
status = SERVICES_remove(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME, status = SERVICES_remove(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME,
svc_error); svc_error);
@ -246,6 +250,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
case COMMAND_START: case COMMAND_START:
/* Test for use of Guardian. If so, start the guardian else start ib-server */ /* Test for use of Guardian. If so, start the guardian else start ib-server */
if (using_guardian(svc_error) == 1) { if (using_guardian(svc_error) == 1) {
#if (defined SUPERCLIENT || defined SUPERSERVER)
status = SERVICES_start(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, status = SERVICES_start(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME,
sw_mode, svc_error); sw_mode, svc_error);
if (status == SUCCESS) if (status == SUCCESS)
@ -253,6 +258,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
ISCGUARD_DISPLAY_NAME); ISCGUARD_DISPLAY_NAME);
else else
ib_printf("Service \"%s\" not started.\n", ISCGUARD_DISPLAY_NAME); ib_printf("Service \"%s\" not started.\n", ISCGUARD_DISPLAY_NAME);
#endif
} }
else { else {
status = SERVICES_start(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME, status = SERVICES_start(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME,
@ -268,6 +274,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
case COMMAND_STOP: case COMMAND_STOP:
/* Test for use of Guardian. If so, stop the guardian else stop ib-server */ /* Test for use of Guardian. If so, stop the guardian else stop ib-server */
if (using_guardian(svc_error) == 1) { if (using_guardian(svc_error) == 1) {
#if (defined SUPERCLIENT || defined SUPERSERVER)
status = SERVICES_stop(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, status = SERVICES_stop(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME,
svc_error); svc_error);
@ -276,6 +283,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
ISCGUARD_DISPLAY_NAME); ISCGUARD_DISPLAY_NAME);
else else
ib_printf("Service \"%s\" not stopped.\n", ISCGUARD_DISPLAY_NAME); ib_printf("Service \"%s\" not stopped.\n", ISCGUARD_DISPLAY_NAME);
#endif
} }
else { else {
status = SERVICES_stop(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME, status = SERVICES_stop(manager, REMOTE_SERVICE, REMOTE_DISPLAY_NAME,