/* This file is part of Pazpar2.
- Copyright (C) 2006-2011 Index Data
+ Copyright (C) 2006-2012 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#endif
#ifdef WIN32
#include <winsock.h>
+#include <direct.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
#endif
#include <signal.h>
switch (ret)
{
case 'd':
- global_parameters.dump_records = 1;
+ global_parameters.dump_records++;
break;
case 'D':
daemon = 1;
show_version();
break;
case 'w':
- if (chdir(arg))
+ if (
+#ifdef WIN32
+ _chdir
+#else
+ chdir
+#endif
+ (arg))
{
yaz_log(YLOG_FATAL|YLOG_ERRNO, "chdir %s", arg);
return 1;