]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Include archive_windows.h directly via archive_platform.h, in preparation for removin...
authorTim Kientzle <kientzle@gmail.com>
Sun, 19 Jul 2009 19:49:44 +0000 (15:49 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 19 Jul 2009 19:49:44 +0000 (15:49 -0400)
SVN-Revision: 1244

libarchive/archive_platform.h
libarchive/archive_windows.h

index 763c296579d53ea61ff36777939a290d35d622d6..88bcfd505f8006048c57ec193cd8f13b88ab8d71 100644 (file)
 #error Oops: No config.h and no pre-built configuration in archive_platform.h.
 #endif
 
+/* It should be possible to get rid of this by extending the feature-test
+ * macros to cover Windows API functions, probably along with non-trivial
+ * refactoring of code to find structures that sit more cleanly on top of
+ * either Windows or Posix APIs. */
+#if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
+#include "archive_windows.h"
+#endif
+
 /*
  * The config files define a lot of feature macros.  The following
  * uses those macros to select/define replacements and include key
index 1a15a773d9ecdd18ea451113d5550fe34d8a76a1..c1bff32a847317f304f941278c153e1634730ba2 100644 (file)
@@ -309,8 +309,17 @@ extern "C" {
 /* Implementation POSIX function */
 extern int      link (const char *from, const char *to);
 extern int      symlink (const char *from, const char *to);
+#ifndef HAVE_FTRUNCATE
+#define HAVE_FTRUNCATE 1
+#endif
 extern int      ftruncate(int fd, off_t length);
+#ifndef HAVE_FUTIMES 
+#define HAVE_FUTIMES 1
+#endif
 extern int      futimes(int fd, const struct __timeval *times);
+#ifndef HAVE_UTIMES 
+#define HAVE_UTIMES 1
+#endif
 extern int      utimes(const char *name, const struct __timeval *times);
 
 /* Replacement POSIX function */