summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_windows.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-24 19:31:45 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-24 19:31:45 (GMT)
commitaaa6c8a6cefff2fc8938453f09fb91523b9e87e4 (patch)
treefd186e3ee9ba0c4d514baa27d78b8553bcedcb70 /Utilities/cmlibarchive/libarchive/archive_windows.c
parentfaf291a9c41cc2a4ffa6797c1d35c7863118a4c4 (diff)
parentd64ee80d6bfb97a63953796074e792f4883e5fb2 (diff)
downloadCMake-aaa6c8a6cefff2fc8938453f09fb91523b9e87e4.zip
CMake-aaa6c8a6cefff2fc8938453f09fb91523b9e87e4.tar.gz
CMake-aaa6c8a6cefff2fc8938453f09fb91523b9e87e4.tar.bz2
Merge branch 'master' into doc-singlehtml
Resolve conflicts in Utilities/Sphinx/CMakeLists.txt by adding the help options from both sides.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_windows.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.c b/Utilities/cmlibarchive/libarchive/archive_windows.c
index d3bf758..d4e93fe 100644
--- a/Utilities/cmlibarchive/libarchive/archive_windows.c
+++ b/Utilities/cmlibarchive/libarchive/archive_windows.c
@@ -301,7 +301,7 @@ __la_open(const char *path, int flags, ...)
ws = NULL;
if ((flags & ~O_BINARY) == O_RDONLY) {
/*
- * When we open a directory, _open function returns
+ * When we open a directory, _open function returns
* "Permission denied" error.
*/
attr = GetFileAttributesA(path);
@@ -515,9 +515,9 @@ __hstat(HANDLE handle, struct ustat *st)
else
mode |= S_IFREG;
st->st_mode = mode;
-
+
fileTimeToUTC(&info.ftLastAccessTime, &t, &ns);
- st->st_atime = t;
+ st->st_atime = t;
st->st_atime_nsec = ns;
fileTimeToUTC(&info.ftLastWriteTime, &t, &ns);
st->st_mtime = t;
@@ -525,7 +525,7 @@ __hstat(HANDLE handle, struct ustat *st)
fileTimeToUTC(&info.ftCreationTime, &t, &ns);
st->st_ctime = t;
st->st_ctime_nsec = ns;
- st->st_size =
+ st->st_size =
((int64_t)(info.nFileSizeHigh) * ((int64_t)MAXDWORD + 1))
+ (int64_t)(info.nFileSizeLow);
#ifdef SIMULATE_WIN_STAT
@@ -599,7 +599,7 @@ __la_stat(const char *path, struct stat *st)
struct ustat u;
int ret;
- handle = la_CreateFile(path, 0, 0, NULL, OPEN_EXISTING,
+ handle = la_CreateFile(path, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);
if (handle == INVALID_HANDLE_VALUE) {