diff options
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_windows.h')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_windows.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h index 620810c..9a19cdf 100644 --- a/Utilities/cmlibarchive/libarchive/archive_windows.h +++ b/Utilities/cmlibarchive/libarchive/archive_windows.h @@ -93,7 +93,7 @@ /* Alias the Windows _function to the POSIX equivalent. */ #define close _close -#define fcntl(fd, cmd, flg) /* No operation. */ +#define fcntl(fd, cmd, flg) /* No operation. */ #ifndef fileno #define fileno _fileno #endif @@ -113,13 +113,14 @@ #define lstat __la_stat #define open __la_open #define read __la_read -#if !defined(__BORLANDC__) +#if !defined(__BORLANDC__) && !defined(__WATCOMC__) #define setmode _setmode #endif #ifdef stat #undef stat #endif #define stat(path,stref) __la_stat(path,stref) +#if !defined(__WATCOMC__) #if !defined(__BORLANDC__) #define strdup _strdup #endif @@ -127,9 +128,12 @@ #if !defined(__BORLANDC__) #define umask _umask #endif +#endif #define waitpid __la_waitpid #define write __la_write +#if !defined(__WATCOMC__) + #ifndef O_RDONLY #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY @@ -188,6 +192,7 @@ #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* directory */ #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* regular file */ #endif + #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */ #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */ @@ -207,7 +212,7 @@ #define _S_IXGRP (_S_IXUSR >> 3) /* read permission, group */ #define _S_IWGRP (_S_IWUSR >> 3) /* write permission, group */ #define _S_IRGRP (_S_IRUSR >> 3) /* execute/search permission, group */ -#define _S_IRWXO (_S_IRWXG >> 3) +#define _S_IRWXO (_S_IRWXG >> 3) #define _S_IXOTH (_S_IXGRP >> 3) /* read permission, other */ #define _S_IWOTH (_S_IWGRP >> 3) /* write permission, other */ #define _S_IROTH (_S_IRGRP >> 3) /* execute/search permission, other */ @@ -227,6 +232,8 @@ #define S_IWOTH _S_IWOTH #define S_IROTH _S_IROTH +#endif + #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ |