From 40df76418ab900446c009e79ab96c4b75c310925 Mon Sep 17 00:00:00 2001 From: brodsom Date: Sat, 1 Mar 2003 18:15:43 +0000 Subject: [PATCH] -Add IPSERVER define to window.cpp, now it is possible to do a server build without ipserver. -Add SERVER_SHUTDOWN define to window.cpp. -Move the setting of SERVER_SHUTDOWN when SUPERSERVER to firebird.h, previously a SUPERSERVER build fail if SERVER_SHUTDOWN is not defined in the command line. --- src/include/firebird.h | 7 ++++++- src/jrd/thd.h | 5 +---- src/remote/window.cpp | 19 +++++++++++-------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/include/firebird.h b/src/include/firebird.h index 07bbe11cf5..193c89046c 100644 --- a/src/include/firebird.h +++ b/src/include/firebird.h @@ -30,7 +30,7 @@ * John Bellardo * * - * $Id: firebird.h,v 1.9 2003-02-27 21:34:40 brodsom Exp $ + * $Id: firebird.h,v 1.10 2003-03-01 18:15:43 brodsom Exp $ * */ @@ -60,4 +60,9 @@ #include "fb_exception.h" #endif +// +#ifdef SUPERSERVER +#define SERVER_SHUTDOWN 1 +#endif + #endif /* INCLUDE_Firebird */ diff --git a/src/jrd/thd.h b/src/jrd/thd.h index 42e22dc2da..93f1d22700 100644 --- a/src/jrd/thd.h +++ b/src/jrd/thd.h @@ -26,7 +26,7 @@ * */ /* -$Id: thd.h,v 1.10 2002-10-30 06:40:49 seanleyne Exp $ +$Id: thd.h,v 1.11 2003-03-01 18:15:42 brodsom Exp $ */ #ifndef _JRD_THD_H_ @@ -108,9 +108,6 @@ struct IB_RTL_CRITICAL_SECTION }; #endif -#ifdef SUPERSERVER -#define SERVER_SHUTDOWN 1 -#endif #ifdef MULTI_THREAD #define ANY_THREADING 1 diff --git a/src/remote/window.cpp b/src/remote/window.cpp index 2d02956a3c..9f47b7d57f 100644 --- a/src/remote/window.cpp +++ b/src/remote/window.cpp @@ -34,16 +34,18 @@ #include "../remote/window.rh" #include "../remote/property.rh" #include "../remote/xnet.h" +#ifdef IPSERVER #include "../ipserver/ips.h" - +#endif #include "../jrd/svc_proto.h" #include "../jrd/sch_proto.h" #include "../jrd/thd.h" #include "../jrd/jrd_proto.h" #include "../remote/window_proto.h" #include "../remote/propty_proto.h" +#ifdef IPSERVER #include "../ipserver/ipsrv_proto.h" - +#endif #include "../jrd/gds_proto.h" #include "../remote/window.h" @@ -117,7 +119,7 @@ int WINDOW_main( HINSTANCE hThisInst, int nWndMode, USHORT usServerFlagMask) szClassName = "FB_Disabled"; } else { - +#ifdef IPSERVER if (!IPS_init(hWnd, 0, (USHORT) Config::getIpcMapSize(), 0)) { // The initialization failed. Check to see if there is another // server running. If so, bring up it's property sheet and quit @@ -145,7 +147,7 @@ int WINDOW_main( HINSTANCE hThisInst, int nWndMode, USHORT usServerFlagMask) } return 0; } - +#endif if (!XNET_init(hWnd, 0, 0, 0)) { char szMsgString[TMP_STRINGLEN]; hWnd = FindWindow(szClassName, APP_NAME); @@ -202,9 +204,9 @@ int WINDOW_main( HINSTANCE hThisInst, int nWndMode, USHORT usServerFlagMask) CW_USEDEFAULT, APP_HSIZE, APP_VSIZE, HWND_DESKTOP, NULL, hInstance, NULL); - +#ifdef SERVER_SHUTDOWN SVC_shutdown_init(WINDOW_shutdown, (ULONG) hWnd); - +#endif // Do the proper ShowWindow depending on if the app is an icon on // the desktop, or in the task bar. @@ -464,6 +466,7 @@ LRESULT CALLBACK WindowFunc(HWND hWnd, else SetFocus(hPSDlg); return TRUE; + } return DefWindowProc(hWnd, message, wParam, lParam); @@ -481,10 +484,10 @@ LRESULT CALLBACK WindowFunc(HWND hWnd, PostQuitMessage(0); break; - +#ifdef IPSERVER case IPI_CONNECT_MESSAGE: return IPS_start_thread(lParam); - +#endif case XPI_CONNECT_MESSAGE: return SRVR_xnet_start_thread(lParam);