diff options
author | Brad King <brad.king@kitware.com> | 2011-12-20 19:20:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-23 21:04:58 (GMT) |
commit | ec48f10656758fd095ad8a25820fa66e923d90aa (patch) | |
tree | 85bf7015bd1c1ecf905f4fd0735dc9e7ad9056a7 /Utilities/cmlibarchive/libarchive/archive_windows.h | |
parent | c37c0c78971abf7fd83e04eb38c80ea092213718 (diff) | |
download | CMake-ec48f10656758fd095ad8a25820fa66e923d90aa.zip CMake-ec48f10656758fd095ad8a25820fa66e923d90aa.tar.gz CMake-ec48f10656758fd095ad8a25820fa66e923d90aa.tar.bz2 |
libarchive: Implement custom lseek for Borland
Restore Windows 64-bit lseek removed by upstream svn revision 3826
(Cast away __la_lseek(), use _lseeki64() instead, 2011-11-21). We
need it on Borland.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_windows.h')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_windows.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h index b26811e..51b4a86 100644 --- a/Utilities/cmlibarchive/libarchive/archive_windows.h +++ b/Utilities/cmlibarchive/libarchive/archive_windows.h @@ -95,7 +95,12 @@ #define fileno _fileno #endif #define fstat __la_fstat +#if !defined(__BORLANDC__) #define lseek _lseeki64 +#else +#define lseek __la_lseek +#define __LA_LSEEK_NEEDED +#endif #define lstat __la_stat #define open __la_open #define read __la_read @@ -246,6 +251,9 @@ extern int __la_fcntl(int fd, int cmd, int val); extern int __la_fstat(int fd, struct stat *st); extern int __la_lstat(const char *path, struct stat *st); +#if defined(__LA_LSEEK_NEEDED) +extern __int64 __la_lseek(int fd, __int64 offset, int whence); +#endif 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); |