tFixes for compilation under Windows with --disable-networking - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 9a65be3f629d873d05a446dace752df961283932
 (DIR) parent 3088bfbc9025eba238f99baf604f946717a24ff3
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Sun, 17 Jun 2001 23:16:00 +0000
       
       Fixes for compilation under Windows with --disable-networking
       
       
       Diffstat:
         M src/winmain.c                       |      16 +++++++++++++++-
       
       1 file changed, 15 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/winmain.c b/src/winmain.c
       t@@ -124,8 +124,11 @@ int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
                 HandleHelpTexts();
                 WindowPrintEnd();
              } else {
       +#ifdef NETWORKING
                 StartNetworking();
       +#endif
                 if (Server) {
       +#ifdef NETWORKING
        #ifdef GUI_SERVER
                    win32_init(hInstance,hPrevInstance);
                    GuiServerLoop();
       t@@ -138,7 +141,16 @@ int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
                    g_set_print_handler(ServerPrintFunc);
                    newterm(NULL,NULL,NULL);
                    ServerLoop();
       -#endif
       +#endif /* GUI_SERVER */
       +#else
       +            WindowPrintStart();
       +            g_set_print_handler(WindowPrintFunc);
       +            g_print(_("This binary has been compiled without networking "
       +                      "support, and thus cannot run\nin server mode. "
       +                      "Recompile passing --enable-networking to the "
       +                      "configure script.\n"));
       +            WindowPrintEnd();
       +#endif /* NETWORKING
                 } else if (AIPlayer) {
                    AllocConsole();
        
       t@@ -164,7 +176,9 @@ int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
                            "use the curses client (if available) instead!\n"));
        #endif
                 }
       +#ifdef NETWORKING
                 StopNetworking();
       +#endif
              }
           } else {
              LogFileEnd();