diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f13efc8..6a631a87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,6 @@ if(WIN32) src/win/poll.c src/win/process.c src/win/process-stdio.c - src/win/req.c src/win/signal.c src/win/snprintf.c src/win/stream.c diff --git a/Makefile.am b/Makefile.am index 400a436b..23814254 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,7 +68,6 @@ libuv_la_SOURCES += src/win/async.c \ src/win/poll.c \ src/win/process-stdio.c \ src/win/process.c \ - src/win/req.c \ src/win/req-inl.h \ src/win/signal.c \ src/win/stream.c \ diff --git a/src/win/fs-event.c b/src/win/fs-event.c index 226e6e7a..25809ea4 100644 --- a/src/win/fs-event.c +++ b/src/win/fs-event.c @@ -83,7 +83,7 @@ static void uv_relative_path(const WCHAR* filename, static int uv_split_path(const WCHAR* filename, WCHAR** dir, WCHAR** file) { size_t len, i; - + if (filename == NULL) { if (dir != NULL) *dir = NULL; diff --git a/src/win/fs.c b/src/win/fs.c index 0886d799..812c1a6d 100644 --- a/src/win/fs.c +++ b/src/win/fs.c @@ -1517,10 +1517,10 @@ static void fs__fchmod(uv_fs_t* req) { SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); goto fchmod_cleanup; } - + /* Test if the Archive attribute is cleared */ if ((file_info.FileAttributes & FILE_ATTRIBUTE_ARCHIVE) == 0) { - /* Set Archive flag, otherwise setting or clearing the read-only + /* Set Archive flag, otherwise setting or clearing the read-only flag will not work */ file_info.FileAttributes |= FILE_ATTRIBUTE_ARCHIVE; nt_status = pNtSetInformationFile(handle, diff --git a/src/win/pipe.c b/src/win/pipe.c index 382290e6..9a3cbc8a 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -2347,7 +2347,7 @@ int uv_pipe_chmod(uv_pipe_t* handle, int mode) { error = GetLastError(); goto clean_sid; } - + memset(&ea, 0, sizeof(EXPLICIT_ACCESS)); if (mode & UV_READABLE) ea.grfAccessPermissions |= GENERIC_READ | FILE_WRITE_ATTRIBUTES; diff --git a/src/win/req.c b/src/win/req.c deleted file mode 100644 index 111cc5e2..00000000 --- a/src/win/req.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#include - -#include "uv.h" -#include "internal.h" diff --git a/src/win/thread.c b/src/win/thread.c index 6e41dcd8..56ca41aa 100644 --- a/src/win/thread.c +++ b/src/win/thread.c @@ -118,7 +118,7 @@ int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) { ctx->arg = arg; /* Create the thread in suspended state so we have a chance to pass - * its own creation handle to it */ + * its own creation handle to it */ thread = (HANDLE) _beginthreadex(NULL, 0, uv__thread_start, diff --git a/test/runner-win.c b/test/runner-win.c index ce972705..aa52d7cc 100644 --- a/test/runner-win.c +++ b/test/runner-win.c @@ -228,7 +228,7 @@ int process_copy_output(process_info_t* p, FILE* stream) { while (fgets(buf, sizeof(buf), f) != NULL) print_lines(buf, strlen(buf), stream); - + if (ferror(f)) return -1; diff --git a/test/test-fs.c b/test/test-fs.c index b4df5e3d..01f5a7b0 100644 --- a/test/test-fs.c +++ b/test/test-fs.c @@ -3551,7 +3551,7 @@ TEST_IMPL(fs_exclusive_sharing_mode) { int call_icacls(const char* command, ...) { char icacls_command[1024]; va_list args; - + va_start(args, command); vsnprintf(icacls_command, ARRAYSIZE(icacls_command), command, args); va_end(args); @@ -3573,7 +3573,7 @@ TEST_IMPL(fs_open_readonly_acl) { attrib -r test_file_icacls del test_file_icacls */ - + /* Setup - clear the ACL and remove the file */ loop = uv_default_loop(); r = uv_os_get_passwd(&pwd); @@ -3583,7 +3583,7 @@ TEST_IMPL(fs_open_readonly_acl) { uv_fs_chmod(loop, &req, "test_file_icacls", S_IWUSR, NULL); unlink("test_file_icacls"); - /* Create the file */ + /* Create the file */ r = uv_fs_open(loop, &open_req1, "test_file_icacls", @@ -3608,7 +3608,7 @@ TEST_IMPL(fs_open_readonly_acl) { if (r != 0) { goto acl_cleanup; } - + /* Try opening the file */ r = uv_fs_open(NULL, &open_req1, "test_file_icacls", O_RDONLY, 0, NULL); if (r < 0) { diff --git a/uv.gyp b/uv.gyp index 37dcb360..5148a850 100644 --- a/uv.gyp +++ b/uv.gyp @@ -116,7 +116,6 @@ 'src/win/poll.c', 'src/win/process.c', 'src/win/process-stdio.c', - 'src/win/req.c', 'src/win/req-inl.h', 'src/win/signal.c', 'src/win/snprintf.c',