Merge branch 'v0.8'
Conflicts: src/unix/sunos.c
This commit is contained in:
commit
32da23988b
@ -476,15 +476,16 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
|
||||
int flags; \
|
||||
DWORD sys_errno_; \
|
||||
union { \
|
||||
wchar_t* pathw; \
|
||||
int file; \
|
||||
/* TODO: remove me in 0.9. */ \
|
||||
WCHAR* pathw; \
|
||||
int fd; \
|
||||
}; \
|
||||
union { \
|
||||
struct { \
|
||||
int mode; \
|
||||
wchar_t* new_pathw; \
|
||||
WCHAR* new_pathw; \
|
||||
int file_flags; \
|
||||
int file_out; \
|
||||
int fd_out; \
|
||||
void* buf; \
|
||||
size_t length; \
|
||||
int64_t offset; \
|
||||
|
||||
@ -1429,8 +1429,8 @@ struct uv_fs_s {
|
||||
uv_fs_cb cb;
|
||||
ssize_t result;
|
||||
void* ptr;
|
||||
char* path;
|
||||
int errorno;
|
||||
const char* path;
|
||||
uv_err_code errorno;
|
||||
UV_FS_PRIVATE_FIELDS
|
||||
};
|
||||
|
||||
|
||||
@ -86,6 +86,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
|
||||
case ERROR_INVALID_REPARSE_DATA: return UV_ENOENT;
|
||||
case ERROR_MOD_NOT_FOUND: return UV_ENOENT;
|
||||
case ERROR_PATH_NOT_FOUND: return UV_ENOENT;
|
||||
case WSANO_DATA: return UV_ENOENT;
|
||||
case ERROR_ACCESS_DENIED: return UV_EPERM;
|
||||
case ERROR_PRIVILEGE_NOT_HELD: return UV_EPERM;
|
||||
case ERROR_NOACCESS: return UV_EACCES;
|
||||
|
||||
1106
src/win/fs.c
1106
src/win/fs.c
File diff suppressed because it is too large
Load Diff
@ -330,6 +330,13 @@ int uv__stdio_create(uv_loop_t* loop, uv_process_options_t* options,
|
||||
|
||||
/* Make an inheritable duplicate of the handle. */
|
||||
if (uv__duplicate_fd(loop, fdopt.data.fd, &child_handle) < 0) {
|
||||
/* If fdopt.data.fd is not valid and fd fd <= 2, then ignore the */
|
||||
/* error. */
|
||||
if (fdopt.data.fd <= 2 && loop->last_err.code == UV_EBADF) {
|
||||
CHILD_STDIO_CRT_FLAGS(buffer, i) = 0;
|
||||
CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE;
|
||||
break;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
@ -4132,6 +4132,10 @@ typedef struct _FILE_BASIC_INFORMATION {
|
||||
DWORD FileAttributes;
|
||||
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _FILE_DISPOSITION_INFORMATION {
|
||||
BOOLEAN DeleteFile;
|
||||
} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
|
||||
|
||||
typedef struct _FILE_MODE_INFORMATION {
|
||||
ULONG Mode;
|
||||
} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
|
||||
@ -4375,6 +4379,11 @@ typedef NTSTATUS (NTAPI *sNtQuerySystemInformation)
|
||||
# define ENABLE_EXTENDED_FLAGS 0x80
|
||||
#endif
|
||||
|
||||
/* from winerror.h */
|
||||
#ifndef ERROR_SYMLINK_NOT_SUPPORTED
|
||||
# define ERROR_SYMLINK_NOT_SUPPORTED 1464
|
||||
#endif
|
||||
|
||||
typedef BOOL (WINAPI *sGetQueuedCompletionStatusEx)
|
||||
(HANDLE CompletionPort,
|
||||
LPOVERLAPPED_ENTRY lpCompletionPortEntries,
|
||||
|
||||
@ -49,6 +49,8 @@ static void timer_cb(uv_timer_t* handle, int status) {
|
||||
|
||||
static uv_buf_t alloc_cb(uv_handle_t* handle, size_t suggested_size) {
|
||||
ASSERT(0 && "alloc_cb should not have been called");
|
||||
/* Satisfy the compiler. */
|
||||
return uv_buf_init(NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user