#include <ctype.h>
#include <yaz/tpath.h>
#include <yaz/log.h>
+#if HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if WIN32
#include <sys/stat.h>
+#endif
+
#if HAVE_UNISTD_H
#include <unistd.h>
#endif