From ca73562e5470e9c9c43c018ff73e9b920c7feed5 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 2 Nov 2009 10:51:29 -0500 Subject: borland builds, but still has some link errors --- Utilities/cmlibarchive/libarchive/archive.h | 5 +++++ Utilities/cmlibarchive/libarchive/archive_entry.h | 4 ++++ Utilities/cmlibarchive/libarchive/archive_read_open_fd.c | 2 +- Utilities/cmlibarchive/libarchive/archive_read_open_file.c | 2 +- Utilities/cmlibarchive/libarchive/archive_read_open_filename.c | 2 +- Utilities/cmlibarchive/libarchive/archive_windows.h | 2 ++ Utilities/cmlibarchive/libarchive/archive_write_open_fd.c | 2 +- 7 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Utilities/cmlibarchive/libarchive/archive.h b/Utilities/cmlibarchive/libarchive/archive.h index ca150f5..23bdf9b 100644 --- a/Utilities/cmlibarchive/libarchive/archive.h +++ b/Utilities/cmlibarchive/libarchive/archive.h @@ -61,8 +61,13 @@ #else #include /* ssize_t, uid_t, and gid_t */ #endif +#if defined(__BORLANDC__) +#define __LA_INT64_T __int64 +#define __LA_SSIZE_T long +#else #define __LA_INT64_T int64_t #define __LA_SSIZE_T ssize_t +#endif #define __LA_UID_T uid_t #define __LA_GID_T gid_t #endif diff --git a/Utilities/cmlibarchive/libarchive/archive_entry.h b/Utilities/cmlibarchive/libarchive/archive_entry.h index c0b398c..10ca1e8 100644 --- a/Utilities/cmlibarchive/libarchive/archive_entry.h +++ b/Utilities/cmlibarchive/libarchive/archive_entry.h @@ -58,7 +58,11 @@ #else # include #endif +#if defined(__BORLANDC__) +#define __LA_INT64_T __int64 +#else #define __LA_INT64_T int64_t +#endif #define __LA_UID_T uid_t #define __LA_GID_T gid_t #define __LA_DEV_T dev_t diff --git a/Utilities/cmlibarchive/libarchive/archive_read_open_fd.c b/Utilities/cmlibarchive/libarchive/archive_read_open_fd.c index b02c1c6..d1421f8 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_open_fd.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_open_fd.c @@ -101,7 +101,7 @@ archive_read_open_fd(struct archive *a, int fd, size_t block_size) mine->can_skip = 1; } else mine->can_skip = 0; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__BORLANDC__) setmode(mine->fd, O_BINARY); #elif defined(_WIN32) _setmode(mine->fd, _O_BINARY); diff --git a/Utilities/cmlibarchive/libarchive/archive_read_open_file.c b/Utilities/cmlibarchive/libarchive/archive_read_open_file.c index a6d87b4..a4f66fc 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_open_file.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_open_file.c @@ -97,7 +97,7 @@ archive_read_open_FILE(struct archive *a, FILE *f) } else mine->can_skip = 0; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__BORLANDC__) setmode(fileno(mine->f), O_BINARY); #elif defined(_WIN32) _setmode(_fileno(mine->f), _O_BINARY); diff --git a/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c b/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c index bb681e5..6c4dcf7 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c @@ -99,7 +99,7 @@ archive_read_open_filename(struct archive *a, const char *filename, */ filename = ""; /* Normalize NULL to "" */ fd = 0; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__BORLANDC__) setmode(0, O_BINARY); #elif defined(_WIN32) _setmode(0, _O_BINARY); diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h index 2af421a..5a6ad7a 100644 --- a/Utilities/cmlibarchive/libarchive/archive_windows.h +++ b/Utilities/cmlibarchive/libarchive/archive_windows.h @@ -117,7 +117,9 @@ #define read __la_read #define rmdir __la_rmdir #define stat(path,stref) __la_stat(path,stref) +#ifndef __BORLANDC__ #define strdup _strdup +#endif #define tzset _tzset #define umask _umask #define unlink __la_unlink diff --git a/Utilities/cmlibarchive/libarchive/archive_write_open_fd.c b/Utilities/cmlibarchive/libarchive/archive_write_open_fd.c index 5e117d4..1e05bc5 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_open_fd.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_open_fd.c @@ -70,7 +70,7 @@ archive_write_open_fd(struct archive *a, int fd) return (ARCHIVE_FATAL); } mine->fd = fd; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__BORLANDC__) setmode(mine->fd, O_BINARY); #elif defined(_WIN32) _setmode(mine->fd, _O_BINARY); -- cgit v0.12