/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* Steve McClure, 1996, 1998
* Doug Hay, 1998
* Ron Koenderink, 2004-2009
- * Markus Armbruster, 2005-2008
+ * Markus Armbruster, 2005-2009
*/
#include <config.h>
#if defined(_WIN32)
#include <process.h>
#include "service.h"
+#include "sys/socket.h"
#endif
#include "empio.h"
#if defined(_WIN32)
static void loc_NTInit(void);
-static void loc_NTTerm(void);
#endif
/*
" -e CONFIG-FILE configuration file\n"
" (default %s)\n"
" -E ACTION what to do on oops: abort, crash-dump, nothing (default)\n"
- " -h display this help and exit\n"
#ifdef _WIN32
" -i install service `%s'\n"
" -I NAME install service NAME\n"
#endif
" -s enable stack checking\n"
" -R RANDOM-SEED random seed\n"
+ " -h display this help and exit\n"
" -v display version information and exit\n",
program_name, dflt_econfig
#ifdef _WIN32
}
}
+ /* silently ignore operands for backward compatibility */
+
#if defined(_WIN32)
if ((!daemonize || flags || config_file != NULL) &&
remove_service_set) {
finish_server(void)
{
ef_fin_srv();
-#if defined(_WIN32)
- loc_NTTerm();
-#endif
journal_shutdown();
remove(pidfname);
}
loc_NTInit(void)
{
int rc;
- WORD wVersionRequested;
- WSADATA wsaData;
- wVersionRequested = MAKEWORD(2, 0);
- rc = WSAStartup(wVersionRequested, &wsaData);
+ rc = w32_socket_init();
if (rc != 0) {
- logerror("WSAStartup failed. %d", rc);
+ logerror("WSAStartup Failed, error code %d\n", rc);
exit(1);
}
}
-
-static void
-loc_NTTerm(void)
-{
- WSACleanup();
-}
#endif