summaryrefslogtreecommitdiff
path: root/Utilities/cmlibarchive/libarchive/archive_windows.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-03 14:37:54 -0400
committerBrad King <brad.king@kitware.com>2014-04-03 15:02:49 -0400
commit2f1978632b709a9370b3cb1137375c05351d149c (patch)
tree85980710818211b8188709643e6714e8839feee9 /Utilities/cmlibarchive/libarchive/archive_windows.h
parent23e4666cf57c31c719472debba83a43f54d351d8 (diff)
parent64713ae3ffddf6fbbfa7ea762c3d756cb245a066 (diff)
downloadcmake-2f1978632b709a9370b3cb1137375c05351d149c.tar.gz
Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in favor of the upstream side where possible. Resolve a logical conflict in archive_windows.h where the upstream port to Watcom was done slightly differently from ours.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_windows.h')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h
index 1dd61b64eb..9a19cdf585 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
@@ -189,8 +193,6 @@
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* regular file */
#endif
-#if !defined(__WATCOMC__)
-
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */
@@ -210,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 */