diff options
author | Brad King <brad.king@kitware.com> | 2009-11-04 21:31:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-11-04 21:31:40 (GMT) |
commit | f4b70b632302f8ff0d6d22e91e3bcc46d5bbb7e9 (patch) | |
tree | e5468d067a97de6c8defa6fc812b7a991abdcdf4 /Utilities | |
parent | e5075bb8e8c358789618bdccc2e4da3a59cf8e0c (diff) | |
download | CMake-f4b70b632302f8ff0d6d22e91e3bcc46d5bbb7e9.zip CMake-f4b70b632302f8ff0d6d22e91e3bcc46d5bbb7e9.tar.gz CMake-f4b70b632302f8ff0d6d22e91e3bcc46d5bbb7e9.tar.bz2 |
libarchive: Provide SetFilePointerEx for VS 6
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_windows.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.c b/Utilities/cmlibarchive/libarchive/archive_windows.c index ddd0352..e194d77 100644 --- a/Utilities/cmlibarchive/libarchive/archive_windows.c +++ b/Utilities/cmlibarchive/libarchive/archive_windows.c @@ -65,6 +65,20 @@ # define EPOC_TIME (116444736000000000ULL) #endif +#if defined(_MSC_VER) && _MSC_VER < 1300 +/* VS 6 does not provide SetFilePointerEx, so define it here. */ +static BOOL SetFilePointerEx(HANDLE hFile, + LARGE_INTEGER liDistanceToMove, + PLARGE_INTEGER lpNewFilePointer, + DWORD dwMoveMethod) +{ + LARGE_INTEGER li; + li.QuadPart = liDistanceToMove.QuadPart; + li.LowPart = SetFilePointer(hFile, li.LowPart, &li.HighPart, dwMoveMethod); + if(lpNewFilePointer) { lpNewFilePointer->QuadPart = li.QuadPart; } + return li.LowPart != -1 || GetLastError() == NO_ERROR; +} +#endif struct ustat { int64_t st_atime; |