]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Various Windows fixes
authorTim Kientzle <kientzle@gmail.com>
Mon, 29 Dec 2008 02:28:40 +0000 (21:28 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 29 Dec 2008 02:28:40 +0000 (21:28 -0500)
Submitted by: Michihiro NAKAJIMA

SVN-Revision: 332

libarchive/test/test.h

index fbbf10a8c3d6b0db1f4915ec54649b90e9537d40..18011fcffe56fd1eadbee85a407d6627aa22ad49 100644 (file)
 #error Oops: No config.h and no pre-built configuration in test.h.
 #endif
 
+#ifndef _WIN32
 #include <dirent.h>
+#else
+#include <direct.h>
+#endif
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
 #define        __FBSDID(a)     /* null */
 #endif
 
+#ifdef _WIN32
+extern char *optarg;
+extern int optind;
+extern int optopt;
+extern int opterr;
+extern int optreset;
+int getopt(int argc, char * const argv[], const char *optstring);
+#endif
+
+#ifdef _WIN32
+#define LOCALE_DE      "deu"
+#else
+#define LOCALE_DE      "de_DE.UTF-8"
+#endif
+
+#ifndef O_BINARY
+#define        O_BINARY 0
+#endif
+
 /*
  * Redefine DEFINE_TEST for use in defining the test functions.
  */