libarchive: Fix compliation with Open Watcom
This commit is contained in:
parent
ad9f0d831e
commit
52285a993b
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
/* Get appropriate definitions of standard POSIX-style types. */
|
/* Get appropriate definitions of standard POSIX-style types. */
|
||||||
/* These should match the types used in 'struct stat' */
|
/* These should match the types used in 'struct stat' */
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
|
||||||
# define __LA_INT64_T __int64
|
# define __LA_INT64_T __int64
|
||||||
# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
|
# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
|
||||||
# define __LA_SSIZE_T ssize_t
|
# define __LA_SSIZE_T ssize_t
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get a suitable 64-bit integer type. */
|
/* Get a suitable 64-bit integer type. */
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
|
||||||
# define __LA_INT64_T __int64
|
# define __LA_INT64_T __int64
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
#if ARCHIVE_VERSION_NUMBER >= 3999000
|
#if ARCHIVE_VERSION_NUMBER >= 3999000
|
||||||
/* Switch to plain 'int' for libarchive 4.0. It's less broken than 'mode_t' */
|
/* Switch to plain 'int' for libarchive 4.0. It's less broken than 'mode_t' */
|
||||||
# define __LA_MODE_T int
|
# define __LA_MODE_T int
|
||||||
#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
|
#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
|
||||||
# define __LA_MODE_T unsigned short
|
# define __LA_MODE_T unsigned short
|
||||||
#else
|
#else
|
||||||
# define __LA_MODE_T mode_t
|
# define __LA_MODE_T mode_t
|
||||||
|
|
|
@ -188,6 +188,9 @@
|
||||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* directory */
|
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* directory */
|
||||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* regular file */
|
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* regular file */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__WATCOMC__)
|
||||||
|
|
||||||
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */
|
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */
|
||||||
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */
|
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */
|
||||||
|
|
||||||
|
@ -227,6 +230,8 @@
|
||||||
#define S_IWOTH _S_IWOTH
|
#define S_IWOTH _S_IWOTH
|
||||||
#define S_IROTH _S_IROTH
|
#define S_IROTH _S_IROTH
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#define F_DUPFD 0 /* Duplicate file descriptor. */
|
#define F_DUPFD 0 /* Duplicate file descriptor. */
|
||||||
#define F_GETFD 1 /* Get file descriptor flags. */
|
#define F_GETFD 1 /* Get file descriptor flags. */
|
||||||
#define F_SETFD 2 /* Set file descriptor flags. */
|
#define F_SETFD 2 /* Set file descriptor flags. */
|
||||||
|
|
Loading…
Reference in New Issue