borland builds, but still has some link errors

This commit is contained in:
Bill Hoffman 2009-11-02 10:51:29 -05:00
parent ff0ff68967
commit ca73562e54
7 changed files with 15 additions and 4 deletions

View File

@ -61,8 +61,13 @@
#else #else
#include <unistd.h> /* ssize_t, uid_t, and gid_t */ #include <unistd.h> /* ssize_t, uid_t, and gid_t */
#endif #endif
#if defined(__BORLANDC__)
#define __LA_INT64_T __int64
#define __LA_SSIZE_T long
#else
#define __LA_INT64_T int64_t #define __LA_INT64_T int64_t
#define __LA_SSIZE_T ssize_t #define __LA_SSIZE_T ssize_t
#endif
#define __LA_UID_T uid_t #define __LA_UID_T uid_t
#define __LA_GID_T gid_t #define __LA_GID_T gid_t
#endif #endif

View File

@ -58,7 +58,11 @@
#else #else
# include <unistd.h> # include <unistd.h>
#endif #endif
#if defined(__BORLANDC__)
#define __LA_INT64_T __int64
#else
#define __LA_INT64_T int64_t #define __LA_INT64_T int64_t
#endif
#define __LA_UID_T uid_t #define __LA_UID_T uid_t
#define __LA_GID_T gid_t #define __LA_GID_T gid_t
#define __LA_DEV_T dev_t #define __LA_DEV_T dev_t

View File

@ -101,7 +101,7 @@ archive_read_open_fd(struct archive *a, int fd, size_t block_size)
mine->can_skip = 1; mine->can_skip = 1;
} else } else
mine->can_skip = 0; mine->can_skip = 0;
#if defined(__CYGWIN__) #if defined(__CYGWIN__) || defined(__BORLANDC__)
setmode(mine->fd, O_BINARY); setmode(mine->fd, O_BINARY);
#elif defined(_WIN32) #elif defined(_WIN32)
_setmode(mine->fd, _O_BINARY); _setmode(mine->fd, _O_BINARY);

View File

@ -97,7 +97,7 @@ archive_read_open_FILE(struct archive *a, FILE *f)
} else } else
mine->can_skip = 0; mine->can_skip = 0;
#if defined(__CYGWIN__) #if defined(__CYGWIN__) || defined(__BORLANDC__)
setmode(fileno(mine->f), O_BINARY); setmode(fileno(mine->f), O_BINARY);
#elif defined(_WIN32) #elif defined(_WIN32)
_setmode(_fileno(mine->f), _O_BINARY); _setmode(_fileno(mine->f), _O_BINARY);

View File

@ -99,7 +99,7 @@ archive_read_open_filename(struct archive *a, const char *filename,
*/ */
filename = ""; /* Normalize NULL to "" */ filename = ""; /* Normalize NULL to "" */
fd = 0; fd = 0;
#if defined(__CYGWIN__) #if defined(__CYGWIN__) || defined(__BORLANDC__)
setmode(0, O_BINARY); setmode(0, O_BINARY);
#elif defined(_WIN32) #elif defined(_WIN32)
_setmode(0, _O_BINARY); _setmode(0, _O_BINARY);

View File

@ -117,7 +117,9 @@
#define read __la_read #define read __la_read
#define rmdir __la_rmdir #define rmdir __la_rmdir
#define stat(path,stref) __la_stat(path,stref) #define stat(path,stref) __la_stat(path,stref)
#ifndef __BORLANDC__
#define strdup _strdup #define strdup _strdup
#endif
#define tzset _tzset #define tzset _tzset
#define umask _umask #define umask _umask
#define unlink __la_unlink #define unlink __la_unlink

View File

@ -70,7 +70,7 @@ archive_write_open_fd(struct archive *a, int fd)
return (ARCHIVE_FATAL); return (ARCHIVE_FATAL);
} }
mine->fd = fd; mine->fd = fd;
#if defined(__CYGWIN__) #if defined(__CYGWIN__) || defined(__BORLANDC__)
setmode(mine->fd, O_BINARY); setmode(mine->fd, O_BINARY);
#elif defined(_WIN32) #elif defined(_WIN32)
_setmode(mine->fd, _O_BINARY); _setmode(mine->fd, _O_BINARY);