summaryrefslogtreecommitdiff
path: root/Utilities/cmlibarchive/libarchive/archive_windows.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-26 16:08:54 -0400
committerBrad King <brad.king@kitware.com>2013-07-31 08:19:13 -0400
commit102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6 (patch)
treedb05ed527f04506957049a7b087be6c038d98435 /Utilities/cmlibarchive/libarchive/archive_windows.h
parent87402c995ed2460deb2f39e02acf77a0bb57f263 (diff)
parent35df7c8ba8854e97bd6994c4d1143f57535ed6f2 (diff)
downloadcmake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.gz
Merge branch 'libarchive-upstream' into update-libarchive
Conflicts: Utilities/cmlibarchive/CMakeLists.txt Utilities/cmlibarchive/libarchive/archive.h Utilities/cmlibarchive/libarchive/archive_entry.h Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c Utilities/cmlibarchive/libarchive/archive_windows.h Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_windows.h')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h
index c581af317f..620810c1cf 100644
--- a/Utilities/cmlibarchive/libarchive/archive_windows.h
+++ b/Utilities/cmlibarchive/libarchive/archive_windows.h
@@ -49,6 +49,9 @@
#define LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED
/* Start of configuration for native Win32 */
+#ifndef MINGW_HAS_SECURE_API
+#define MINGW_HAS_SECURE_API 1
+#endif
#include <errno.h>
#define set_errno(val) ((errno)=val)
@@ -72,7 +75,6 @@
//#define EFTYPE 7
#if defined(_MSC_VER)
-/* TODO: Fix the code, don't suppress the warnings. */
#pragma warning(push,1)
#pragma warning(disable:4761) /* integral size mismatch in argument; conversion supplied */
#endif
@@ -95,8 +97,14 @@
#ifndef fileno
#define fileno _fileno
#endif
+#ifdef fstat
+#undef fstat
+#endif
#define fstat __la_fstat
#if !defined(__BORLANDC__)
+#ifdef lseek
+#undef lseek
+#endif
#define lseek _lseeki64
#else
#define lseek __la_lseek
@@ -108,6 +116,9 @@
#if !defined(__BORLANDC__)
#define setmode _setmode
#endif
+#ifdef stat
+#undef stat
+#endif
#define stat(path,stref) __la_stat(path,stref)
#if !defined(__BORLANDC__)
#define strdup _strdup
@@ -257,7 +268,7 @@ extern __int64 __la_lseek(int fd, __int64 offset, int whence);
extern int __la_open(const char *path, int flags, ...);
extern ssize_t __la_read(int fd, void *buf, size_t nbytes);
extern int __la_stat(const char *path, struct stat *st);
-extern pid_t __la_waitpid(pid_t wpid, int *status, int option);
+extern pid_t __la_waitpid(HANDLE child, int *status, int option);
extern ssize_t __la_write(int fd, const void *buf, size_t nbytes);
#define _stat64i32(path, st) __la_stat(path, st)
@@ -270,6 +281,8 @@ extern wchar_t *__la_win_permissive_name(const char *name);
extern wchar_t *__la_win_permissive_name_w(const wchar_t *wname);
extern void __la_dosmaperr(unsigned long e);
#define la_dosmaperr(e) __la_dosmaperr(e)
+extern struct archive_entry *__la_win_entry_in_posix_pathseparator(
+ struct archive_entry *);
#if defined(HAVE_WCRTOMB) && defined(__BORLANDC__)
typedef int mbstate_t;
@@ -278,14 +291,14 @@ size_t wcrtomb(char *, wchar_t, mbstate_t *);
#if defined(_MSC_VER) && _MSC_VER < 1300
WINBASEAPI BOOL WINAPI GetVolumePathNameW(
- LPCWSTR lpszFileName,
- LPWSTR lpszVolumePathName,
- DWORD cchBufferLength
- );
+ LPCWSTR lpszFileName,
+ LPWSTR lpszVolumePathName,
+ DWORD cchBufferLength
+ );
# if _WIN32_WINNT < 0x0500 /* windows.h not providing 0x500 API */
typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
- LARGE_INTEGER FileOffset;
- LARGE_INTEGER Length;
+ LARGE_INTEGER FileOffset;
+ LARGE_INTEGER Length;
} FILE_ALLOCATED_RANGE_BUFFER, *PFILE_ALLOCATED_RANGE_BUFFER;
# define FSCTL_SET_SPARSE \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)