win: remove req.c and other cleanup
PR-URL: https://github.com/libuv/libuv/pull/2018 Reviewed-By: Jameson Nash <vtjnash@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
5ecc97ee7d
commit
672b96fab4
@ -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
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 <assert.h>
|
||||
|
||||
#include "uv.h"
|
||||
#include "internal.h"
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user