#if HAVE_CONFIG_H
#include <config.h>
#endif
+#ifdef WIN32
+#include <winsock.h>
+#endif
#include <signal.h>
#include <assert.h>
exit(0);
}
+#ifdef WIN32
+static int tcpip_init (void)
+{
+ WORD requested;
+ WSADATA wd;
+
+ requested = MAKEWORD(1, 1);
+ if (WSAStartup(requested, &wd))
+ return 0;
+ return 1;
+}
+#endif
+
+
int main(int argc, char **argv)
{
int daemon = 0;
#ifndef WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
yaz_log(YLOG_WARN|YLOG_ERRNO, "signal");
+#else
+ tcpip_init();
#endif
yaz_log_init_prefix("pazpar2");
yaz_log_xml_errors(0, YLOG_WARN);
#endif
+
while ((ret = options("dDf:h:l:p:t:u:VX", argv, argc, &arg)) != -2)
{
switch (ret)