Ruby
1.9.3p551(2014-11-13revision48407)
|
#include "ruby/ruby.h"
#include "ruby/encoding.h"
#include "dln.h"
#include <fcntl.h>
#include <process.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
#include <share.h>
#include <shlobj.h>
#include <mbstring.h>
#include "ruby/win32.h"
#include "win32/dir.h"
#include <sys/timeb.h>
Go to the source code of this file.
Data Structures | |
struct | ChildRecord |
struct | _NtCmdLineElement |
struct | ioinfo |
struct | WSAMSG |
struct | asynchronous_arg_t |
Macros | |
#define | isdirsep(x) ((x) == '/' || (x) == '\\') |
#define | enough_to_get(n) (--(n) >= 0) |
#define | enough_to_put(n) (--(n) >= 0) |
#define | Debug(something) /* nothing */ |
#define | TO_SOCKET(x) _get_osfhandle(x) |
#define | RUBY_CRITICAL(expr) do { expr; } while (0) |
#define | ERROR_PIPE_LOCAL 229L |
#define | map_errno rb_w32_map_errno |
#define | IsWinNT() rb_w32_iswinnt() |
#define | IsWin95() rb_w32_iswin95() |
#define | IfWin95(win95, winnt) (winnt) |
#define | LK_ERR(f, i) |
#define | LK_LEN ULONG_MAX |
#define | CSIDL_LOCAL_APPDATA 28 |
#define | CSIDL_COMMON_APPDATA 35 |
#define | CSIDL_WINDOWS 36 |
#define | CSIDL_SYSTEM 37 |
#define | CSIDL_PROFILE 40 |
#define | numberof(array) (sizeof(array) / sizeof(*array)) |
#define | env wk.val |
#define | set_env_val(vname) |
#define | MAXCHILDNUM 256 /* max num of child processes */ |
#define | FOREACH_CHILD(v) |
#define | END_FOREACH_CHILD } while (0) |
#define | MAXPATHLEN 512 |
#define | STRNDUPV(ptr, v, src, len) (((char *)memcpy(((ptr) = ALLOCV((v), (len) + 1)), (src), (len)))[len] = 0) |
#define | acp_to_wstr(str, plen) mbstr_to_wstr(CP_ACP, str, -1, plen) |
#define | wstr_to_acp(str, plen) wstr_to_mbstr(CP_ACP, str, -1, plen) |
#define | filecp_to_wstr(str, plen) mbstr_to_wstr(filecp(), str, -1, plen) |
#define | wstr_to_filecp(str, plen) wstr_to_mbstr(filecp(), str, -1, plen) |
#define | utf8_to_wstr(str, plen) mbstr_to_wstr(CP_UTF8, str, -1, plen) |
#define | wstr_to_utf8(str, plen) wstr_to_mbstr(CP_UTF8, str, -1, plen) |
#define | NTGLOB 0x1 |
#define | NTMALLOC 0x2 |
#define | NTSTRING 0x4 |
#define | PATHLEN 1024 |
#define | GetBit(bits, i) ((bits)[(i) / CHAR_BIT] & (1 << (i) % CHAR_BIT)) |
#define | SetBit(bits, i) ((bits)[(i) / CHAR_BIT] |= (1 << (i) % CHAR_BIT)) |
#define | BitOfIsDir(n) ((n) * 2) |
#define | BitOfIsRep(n) ((n) * 2 + 1) |
#define | DIRENT_PER_CHAR (CHAR_BIT / 2) |
#define | MTHREAD_ONLY(x) |
#define | STHREAD_ONLY(x) x |
#define | _CRTIMP __declspec(dllimport) |
#define | IOINFO_L2E 5 |
#define | IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) |
#define | _pioinfo(i) ((ioinfo*)((char*)(__pioinfo[i >> IOINFO_L2E]) + (i & (IOINFO_ARRAY_ELTS - 1)) * (sizeof(ioinfo) + pioinfo_extra))) |
#define | _osfhnd(i) (_pioinfo(i)->osfhnd) |
#define | _osfile(i) (_pioinfo(i)->osfile) |
#define | _pipech(i) (_pioinfo(i)->pipech) |
#define | pioinfo_extra 0 |
#define | _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = osfh) |
#define | _set_osflags(fh, flags) (_osfile(fh) = (flags)) |
#define | FOPEN 0x01 /* file handle open */ |
#define | FEOFLAG 0x02 /* end of file has been encountered */ |
#define | FPIPE 0x08 /* file handle refers to a pipe */ |
#define | FNOINHERIT 0x10 /* file handle opened O_NOINHERIT */ |
#define | FAPPEND 0x20 /* file handle opened O_APPEND */ |
#define | FDEV 0x40 /* file handle refers to device */ |
#define | FTEXT 0x80 /* file handle is in text mode */ |
#define | open_null(fd) |
#define | ROOT_UID 0 |
#define | ROOT_GID 0 |
#define | WSAID_WSARECVMSG {0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}} |
#define | WSAID_WSASENDMSG {0xa441e712,0x754f,0x43ca,{0x84,0xa7,0x0d,0xee,0x44,0xcf,0x60,0x6d}} |
#define | msghdr_to_wsamsg(msg, wsamsg) |
#define | WNOHANG -1 |
#define | COPY_STAT(src, dest, size_cast) |
#define | win95_stat(path, st) -1 |
#define | yield_once() Sleep(0) |
#define | yield_until(condition) do yield_once(); while (!(condition)) |
#define | INVALID_SET_FILE_POINTER ((DWORD)-1) |
Typedefs | |
typedef BOOL(WINAPI * | cancel_io_t )(HANDLE) |
typedef struct _NtCmdLineElement | NtCmdLineElement |
Variables | |
struct { | |
DWORD winerr | |
int err | |
} | errmap [] |
static const char * | NTLoginName |
static OSVERSIONINFO | osver |
static cancel_io_t | cancel_io = NULL |
static CRITICAL_SECTION | select_mutex |
static int | NtSocketsInitialized = 0 |
static st_table * | socklist = NULL |
static char * | envarea |
static struct ChildRecord | ChildRecord [MAXCHILDNUM] |
static const char *const | szInternalCmds [] |
EXTERN_C _CRTIMP ioinfo * | __pioinfo [] |
#define _CRTIMP __declspec(dllimport) |
Definition at line 2046 of file win32.c.
Referenced by finish_overlapped(), rb_w32_isatty(), rb_w32_read(), rb_w32_write(), rb_w32_write_console(), and setup_overlapped().
Definition at line 2047 of file win32.c.
Referenced by finish_overlapped(), rb_w32_fd_is_text(), rb_w32_read(), rb_w32_wopen(), rb_w32_write(), and setup_overlapped().
#define _pioinfo | ( | i | ) | ((ioinfo*)((char*)(__pioinfo[i >> IOINFO_L2E]) + (i & (IOINFO_ARRAY_ELTS - 1)) * (sizeof(ioinfo) + pioinfo_extra))) |
Definition at line 2045 of file win32.c.
Referenced by rb_w32_accept(), rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), rb_w32_wopen(), and rb_w32_write().
Definition at line 2075 of file win32.c.
Referenced by rb_w32_accept(), rb_w32_close(), rb_w32_fclose(), rb_w32_open_osfhandle(), rb_w32_pipe(), and rb_w32_wopen().
Definition at line 2076 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), and rb_w32_wopen().
#define acp_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(CP_ACP, str, -1, plen) |
Definition at line 1104 of file win32.c.
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
Definition at line 1658 of file win32.c.
Referenced by opendir_internal(), and readdir_internal().
Definition at line 1659 of file win32.c.
Referenced by opendir_internal(), and readdir_internal().
#define COPY_STAT | ( | src, | |
dest, | |||
size_cast | |||
) |
Definition at line 4116 of file win32.c.
Referenced by rb_w32_fstati64(), and rb_w32_stat().
#define CSIDL_COMMON_APPDATA 35 |
Definition at line 416 of file win32.c.
Referenced by etc_sysconfdir().
#define CSIDL_LOCAL_APPDATA 28 |
Definition at line 413 of file win32.c.
Referenced by rb_w32_system_tmpdir().
#define CSIDL_PROFILE 40 |
Definition at line 425 of file win32.c.
Referenced by init_env().
#define Debug | ( | something | ) | /* nothing */ |
Definition at line 61 of file win32.c.
Referenced by rb_w32_asynchronize().
#define DIRENT_PER_CHAR (CHAR_BIT / 2) |
Definition at line 1660 of file win32.c.
Referenced by opendir_internal().
#define END_FOREACH_CHILD } while (0) |
Definition at line 718 of file win32.c.
Referenced by FindChildSlot(), FindChildSlotByHandle(), FindFreeChildSlot(), and waitpid().
Definition at line 54 of file win32.c.
Referenced by rb_w32_getc().
Definition at line 55 of file win32.c.
Referenced by rb_w32_putc().
#define env wk.val |
Referenced by CC_DUP_WARN(), check_env_value(), check_exec_env_i(), env_alloc(), env_each_pair(), env_empty_p(), env_fetch(), env_free(), env_has_value(), env_inspect(), env_key(), env_keys(), env_mark(), env_memsize(), env_rassoc(), env_replace(), env_select(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_update(), env_values(), envix(), eval_string_with_cref(), i_apply_case_fold(), init_env(), parse_exp(), process_options(), rb_check_exec_env(), rb_exec_arg_init(), rb_f_getenv(), rb_vmdebug_proc_dump_raw(), rb_w32_free_environ(), rb_w32_get_environ(), rb_w32_getenv(), save_env(), set_optimize_info_from_tree(), vm_collect_local_variables_in_heap(), vm_make_env_each(), and vm_set_main_stack().
#define ERROR_PIPE_LOCAL 229L |
#define FAPPEND 0x20 /* file handle opened O_APPEND */ |
Definition at line 2082 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_wopen(), and setup_overlapped().
#define FDEV 0x40 /* file handle refers to device */ |
Definition at line 2083 of file win32.c.
Referenced by finish_overlapped(), rb_w32_open_osfhandle(), rb_w32_wopen(), rb_w32_write(), and setup_overlapped().
#define FEOFLAG 0x02 /* end of file has been encountered */ |
Definition at line 2079 of file win32.c.
Referenced by rb_w32_read(), and rb_w32_write().
#define filecp_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(filecp(), str, -1, plen) |
Definition at line 1106 of file win32.c.
Referenced by link(), rb_w32_mkdir(), rb_w32_open(), rb_w32_opendir(), rb_w32_rename(), rb_w32_rmdir(), rb_w32_stati64(), rb_w32_unlink(), and rb_w32_utime().
#define FNOINHERIT 0x10 /* file handle opened O_NOINHERIT */ |
Definition at line 2081 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), and rb_w32_wopen().
#define FOPEN 0x01 /* file handle open */ |
Definition at line 2078 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), and rb_w32_wopen().
#define FOREACH_CHILD | ( | v | ) |
Definition at line 715 of file win32.c.
Referenced by FindChildSlot(), FindChildSlotByHandle(), FindFreeChildSlot(), and waitpid().
#define FPIPE 0x08 /* file handle refers to a pipe */ |
Definition at line 2080 of file win32.c.
Referenced by finish_overlapped(), rb_w32_pipe(), rb_w32_wopen(), rb_w32_write(), and setup_overlapped().
#define FTEXT 0x80 /* file handle is in text mode */ |
Definition at line 2084 of file win32.c.
Referenced by rb_w32_fd_is_text(), rb_w32_open_osfhandle(), rb_w32_read(), and rb_w32_write().
Definition at line 1655 of file win32.c.
Referenced by readdir_internal().
#define IfWin95 | ( | win95, | |
winnt | |||
) | (winnt) |
Definition at line 266 of file win32.c.
Referenced by kill(), and rb_w32_getpid().
#define INVALID_SET_FILE_POINTER ((DWORD)-1) |
Referenced by setup_overlapped().
#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) |
#define isdirsep | ( | x | ) | ((x) == '/' || (x) == '\\') |
Definition at line 41 of file win32.c.
Referenced by is_command_com().
#define IsWin95 | ( | ) | rb_w32_iswin95() |
Definition at line 262 of file win32.c.
Referenced by rb_w32_ftruncate(), rb_w32_getppid(), rb_w32_truncate(), and wutime().
#define IsWinNT | ( | ) | rb_w32_iswinnt() |
Definition at line 261 of file win32.c.
Referenced by CreateChild(), flock(), wrename(), and wstati64().
#define LK_ERR | ( | f, | |
i | |||
) |
Definition at line 287 of file win32.c.
Referenced by flock_winnt().
#define LK_LEN ULONG_MAX |
Definition at line 301 of file win32.c.
Referenced by flock_winnt(), rb_w32_close(), and rb_w32_fclose().
#define map_errno rb_w32_map_errno |
Definition at line 233 of file win32.c.
Referenced by CreateChild(), do_select(), fcntl(), finish_overlapped_socket(), kill(), open_dir_handle(), overlapped_socket_io(), poll_child_status(), rb_chsize(), rb_w32_accept(), rb_w32_bind(), rb_w32_close(), rb_w32_connect(), rb_w32_fclose(), rb_w32_getcwd(), rb_w32_getenv(), rb_w32_gethostbyaddr(), rb_w32_gethostbyname(), rb_w32_gethostname(), rb_w32_getpeername(), rb_w32_getprotobyname(), rb_w32_getprotobynumber(), rb_w32_getservbyname(), rb_w32_getservbyport(), rb_w32_getsockname(), rb_w32_getsockopt(), rb_w32_ioctlsocket(), rb_w32_listen(), rb_w32_pipe(), rb_w32_read(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_truncate(), rb_w32_wopen(), rb_w32_write(), recvmsg(), sendmsg(), setup_overlapped(), socketpair_internal(), waitpid(), winnt_stat(), wlink(), wmkdir(), wrename(), wrmdir(), wunlink(), and wutime().
#define MAXCHILDNUM 256 /* max num of child processes */ |
#define MAXPATHLEN 512 |
Definition at line 964 of file win32.c.
Referenced by cmdglob(), rb_w32_aspawn_flags(), and rb_w32_spawn().
#define msghdr_to_wsamsg | ( | msg, | |
wsamsg | |||
) |
#define MTHREAD_ONLY | ( | x | ) |
Definition at line 2017 of file win32.c.
Referenced by rb_w32_accept(), rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), rb_w32_wopen(), and rb_w32_write().
#define NTMALLOC 0x2 |
Definition at line 1298 of file win32.c.
Referenced by cmdglob(), insert(), and rb_w32_cmdvector().
Definition at line 487 of file win32.c.
Referenced by init_env(), and rb_w32_system_tmpdir().
#define open_null | ( | fd | ) |
Referenced by init_stdhandle().
#define ROOT_GID 0 |
#define ROOT_UID 0 |
Definition at line 73 of file win32.c.
Referenced by catch_interrupt(), CreateChild(), do_select(), fcntl(), finish_overlapped_socket(), is_console(), is_pipe(), is_readable_console(), is_readable_pipe(), kill(), overlapped_socket_io(), rb_w32_accept(), rb_w32_asynchronize(), rb_w32_bind(), rb_w32_connect(), rb_w32_fdisset(), rb_w32_gethostbyaddr(), rb_w32_gethostbyname(), rb_w32_gethostname(), rb_w32_getpeername(), rb_w32_getprotobyname(), rb_w32_getprotobynumber(), rb_w32_getservbyname(), rb_w32_getservbyport(), rb_w32_getsockname(), rb_w32_getsockopt(), rb_w32_ioctlsocket(), rb_w32_listen(), rb_w32_pipe(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_wopen(), recvmsg(), sendmsg(), socketpair_internal(), wmkdir(), wrename(), wrmdir(), wunlink(), and wutime().
#define set_env_val | ( | vname | ) |
Referenced by init_env().
Definition at line 1656 of file win32.c.
Referenced by opendir_internal().
#define STRNDUPV | ( | ptr, | |
v, | |||
src, | |||
len | |||
) | (((char *)memcpy(((ptr) = ALLOCV((v), (len) + 1)), (src), (len)))[len] = 0) |
Definition at line 967 of file win32.c.
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
#define TO_SOCKET | ( | x | ) | _get_osfhandle(x) |
Definition at line 64 of file win32.c.
Referenced by fcntl(), overlapped_socket_io(), rb_w32_accept(), rb_w32_bind(), rb_w32_close(), rb_w32_connect(), rb_w32_fclose(), rb_w32_fdclr(), rb_w32_fdisset(), rb_w32_getpeername(), rb_w32_getsockname(), rb_w32_getsockopt(), rb_w32_io_cancelable_p(), rb_w32_ioctlsocket(), rb_w32_is_socket(), rb_w32_listen(), rb_w32_read(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_write(), recvmsg(), and sendmsg().
#define utf8_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(CP_UTF8, str, -1, plen) |
Definition at line 1108 of file win32.c.
Referenced by rb_w32_uchdir(), rb_w32_uchmod(), rb_w32_ulink(), rb_w32_umkdir(), rb_w32_uopen(), rb_w32_uopendir(), rb_w32_urename(), rb_w32_urmdir(), rb_w32_ustati64(), rb_w32_uunlink(), and rb_w32_uutime().
Definition at line 4323 of file win32.c.
Referenced by wstati64().
#define WSAID_WSARECVMSG {0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}} |
#define WSAID_WSASENDMSG {0xa441e712,0x754f,0x43ca,{0x84,0xa7,0x0d,0xee,0x44,0xcf,0x60,0x6d}} |
#define wstr_to_acp | ( | str, | |
plen | |||
) | wstr_to_mbstr(CP_ACP, str, -1, plen) |
#define wstr_to_filecp | ( | str, | |
plen | |||
) | wstr_to_mbstr(filecp(), str, -1, plen) |
Definition at line 1107 of file win32.c.
Referenced by rb_w32_conv_from_wstr(), and win32_direct_conv().
#define wstr_to_utf8 | ( | str, | |
plen | |||
) | wstr_to_mbstr(CP_UTF8, str, -1, plen) |
#define yield_once | ( | ) | Sleep(0) |
Definition at line 4606 of file win32.c.
Referenced by catch_interrupt(), and rb_w32_asynchronize().
#define yield_until | ( | condition | ) | do yield_once(); while (!(condition)) |
Definition at line 4607 of file win32.c.
Referenced by rb_w32_asynchronize().
typedef struct _NtCmdLineElement NtCmdLineElement |
|
static |
Definition at line 4678 of file win32.c.
References arg, asynchronous_arg_t::argc, asynchronous_arg_t::argv, errno, asynchronous_arg_t::errnum, asynchronous_arg_t::func, ret, asynchronous_arg_t::self, and asynchronous_arg_t::stackaddr.
Referenced by rb_w32_asynchronize().
Definition at line 4610 of file win32.c.
References NULL, rb_w32_wait_events(), RUBY_CRITICAL, and yield_once.
Referenced by rb_w32_getc(), and rb_w32_putc().
Definition at line 971 of file win32.c.
References errno, and P_NOWAIT.
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
Definition at line 4235 of file win32.c.
References NULL, and open_dir_handle().
Referenced by winnt_stat().
|
static |
Definition at line 984 of file win32.c.
References CloseChildHandle(), ChildRecord::hProcess, P_NOWAIT, and ChildRecord::pid.
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
Definition at line 3796 of file win32.c.
Referenced by argf_next_argv(), chown_internal(), get_device_once(), and rb_file_chown().
|
static |
Definition at line 745 of file win32.c.
References ChildRecord::hProcess, NULL, and ChildRecord::pid.
Referenced by child_result(), and poll_child_status().
|
static |
Definition at line 1322 of file win32.c.
References buf, CharNext, _NtCmdLineElement::flags, free, insert(), last, _NtCmdLineElement::len, malloc, MAXPATHLEN, NTMALLOC, p, ruby_brace_glob(), status, _NtCmdLineElement::str, and strlcpy().
Referenced by rb_w32_cmdvector().
Definition at line 2587 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2439 of file win32.c.
References d, FD_SETSIZE, and s.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 1006 of file win32.c.
References errno, FindFreeChildSlot(), ChildRecord::hProcess, if(), IsWinNT, map_errno, memset(), NULL, ChildRecord::pid, RUBY_CRITICAL, and TRUE.
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
|
static |
Definition at line 2538 of file win32.c.
References errno, map_errno, r, rb_w32_sleep(), RUBY_CRITICAL, timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
Definition at line 622 of file win32.c.
References NULL, and st_free_table.
Referenced by rb_w32_sysinit().
|
static |
Definition at line 2398 of file win32.c.
References d, FD_SETSIZE, func, m, memmove(), s, and xrealloc.
Referenced by rb_w32_select_with_thread().
Definition at line 3579 of file win32.c.
References arg, data, errno, F_SETFL, flag, int, is_socket(), map_errno, O_NONBLOCK, ret, RUBY_CRITICAL, st_insert, st_lookup, TO_SOCKET, u_long, and va_end().
Referenced by dup2(), make_fd_nonblock(), rb_cloexec_fcntl_dupfd(), rb_io_initialize(), rb_io_set_nonblock(), rb_maygvl_fd_fix_cloexec(), run_exec_dup2(), and wsplit_p().
|
static |
Definition at line 4577 of file win32.c.
Referenced by rb_w32_times().
Definition at line 3723 of file win32.c.
References long, lt, timeval::tv_sec, and timeval::tv_usec.
Referenced by filetime_to_unixtime(), and gettimeofday().
|
static |
Definition at line 4183 of file win32.c.
References filetime_to_timeval(), and timeval::tv_sec.
Referenced by rb_w32_fstat(), rb_w32_fstati64(), and winnt_stat().
|
static |
Definition at line 721 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
|
static |
Definition at line 733 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
Referenced by waitpid().
|
static |
Definition at line 754 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
Referenced by CreateChild().
Definition at line 5213 of file win32.c.
References _osfhnd, _osfile, FDEV, FPIPE, and size.
Referenced by rb_w32_read(), and rb_w32_write().
|
static |
Definition at line 2932 of file win32.c.
References cancel_io, err, errno, map_errno, rb_w32_wait_events_blocking(), result, RUBY_CRITICAL, size, and TRUE.
Referenced by overlapped_socket_io(), recvmsg(), and sendmsg().
Definition at line 371 of file win32.c.
References flock_winnt(), IsWinNT, NULL, and rb_w32_asynchronize().
Referenced by rb_thread_flock().
Definition at line 454 of file win32.c.
Referenced by get_system_directory(), init_func(), rb_w32_getppid(), rb_w32_inet_ntop(), and wlink().
|
static |
Definition at line 429 of file win32.c.
References alloc, FALSE, and NULL.
Referenced by init_env(), rb_w32_special_folder(), and rb_w32_system_tmpdir().
|
static |
Definition at line 477 of file win32.c.
References get_proc_address(), len, NULL, path, and ptr.
Referenced by rb_w32_system_tmpdir().
Definition at line 240 of file win32.c.
References memset(), and osver.
Referenced by rb_w32_sysinit().
|
static |
HANDLE GetCurrentThreadHandle | ( | void | ) |
rb_gid_t getegid | ( | void | ) |
Definition at line 2297 of file win32.c.
References ROOT_GID.
Referenced by init_ids(), Init_process(), p_gid_change_privilege(), p_gid_exchange(), p_gid_switch(), proc_getegid(), and rb_group_member().
rb_uid_t geteuid | ( | void | ) |
Definition at line 2285 of file win32.c.
References ROOT_UID.
Referenced by eaccess(), init_ids(), Init_process(), p_gid_change_privilege(), p_uid_change_privilege(), p_uid_exchange(), p_uid_switch(), proc_geteuid(), rb_file_owned_p(), rb_setegid_core(), rb_seteuid_core(), rb_stat_owned(), rb_stat_r(), rb_stat_w(), and rb_stat_x().
rb_gid_t getgid | ( | void | ) |
Definition at line 2291 of file win32.c.
References ROOT_GID.
Referenced by etc_getgrgid(), get_device_once(), init_ids(), p_gid_change_privilege(), p_gid_exchange(), p_gid_switch(), proc_getgid(), rb_group_member(), and rb_setegid_core().
char* getlogin | ( | void | ) |
struct netent* getnetbyname | ( | const char * | name | ) |
Definition at line 3746 of file win32.c.
References filetime_to_timeval().
Referenced by datetime_s_now(), do_select(), fill_random_seed(), getclockofday(), rb_w32_select_with_thread(), time_init_0(), and timeofday().
rb_uid_t getuid | ( | void | ) |
Definition at line 2279 of file win32.c.
References ROOT_UID.
Referenced by argf_next_argv(), chfunc(), establishShell(), etc_getpwuid(), get_device_once(), init_ids(), p_uid_change_privilege(), p_uid_exchange(), p_uid_switch(), proc_getuid(), rb_file_rowned_p(), rb_seteuid_core(), rb_stat_R(), rb_stat_rowned(), rb_stat_W(), and rb_stat_X().
Definition at line 516 of file win32.c.
References CSIDL_PROFILE, env, eq(), FALSE, get_special_folder(), len, name, NTLoginName, numberof, rb_w32_getenv(), rb_w32_system_tmpdir(), regulate_path(), set_env_val, strdup, TRUE, and val.
Referenced by rb_w32_sysinit().
Definition at line 582 of file win32.c.
References get_proc_address(), and NULL.
Referenced by rb_w32_sysinit().
Definition at line 1302 of file win32.c.
References _NtCmdLineElement::flags, _NtCmdLineElement::len, malloc, MEMZERO, _NtCmdLineElement::next, NTMALLOC, _NtCmdLineElement::str, strdup, and strlen().
Referenced by cmdglob().
Definition at line 874 of file win32.c.
References internal_match().
Referenced by is_internal_cmd(), and rb_w32_aspawn_flags().
Definition at line 826 of file win32.c.
Referenced by internal_cmd_match().
Definition at line 2319 of file win32.c.
References errno.
Referenced by chfunc(), get_device_once(), io_nread(), io_ready_p(), io_wait(), and nogvl_ioctl().
Definition at line 1090 of file win32.c.
References len, strcasecmp, and strlen().
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
Definition at line 832 of file win32.c.
References isdirsep, strcasecmp, and strlen().
Referenced by rb_w32_aspawn_flags(), and rb_w32_spawn().
|
static |
Definition at line 2496 of file win32.c.
References n, ret, and RUBY_CRITICAL.
Referenced by rb_w32_io_cancelable_p(), rb_w32_read(), and rb_w32_select_with_thread().
Definition at line 846 of file win32.c.
References b, c, cmd, and internal_cmd_match().
Referenced by rb_w32_spawn().
|
static |
Definition at line 2532 of file win32.c.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2460 of file win32.c.
References is_socket().
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2466 of file win32.c.
References ret, and RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2510 of file win32.c.
References n, ret, and RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2478 of file win32.c.
References n, NULL, ret, and RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2189 of file win32.c.
References FALSE, NULL, st_lookup, and TRUE.
Referenced by fcntl(), is_not_socket(), rb_w32_close(), rb_w32_fclose(), rb_w32_io_cancelable_p(), rb_w32_is_socket(), rb_w32_read(), and rb_w32_write().
Definition at line 3808 of file win32.c.
References EPERM, err, errno, FALSE, FindChildSlot(), ChildRecord::hProcess, IfWin95, map_errno, NULL, ret, RUBY_CRITICAL, SIGINT, SIGKILL, status, and void.
Referenced by raise_from_check(), and rb_f_kill().
Definition at line 3962 of file win32.c.
References filecp_to_wstr, free, NULL, ret, and wlink().
Referenced by r_object0(), rb_exec_end_proc(), rb_mark_end_proc(), rb_set_end_proc(), and realpath_rec().
Definition at line 1837 of file win32.c.
References DIR::curr, DIR::loc, NULL, DIR::size, and DIR::start.
Referenced by rb_w32_seekdir(), and readdir_internal().
|
static |
Definition at line 1663 of file win32.c.
References ALLOCV_END, ALLOCV_N, errno, len, map_errno, p, and v.
Referenced by check_valid_dir(), and opendir_internal().
Definition at line 3243 of file win32.c.
References AF_UNSPEC, free, i, malloc, NULL, and out.
Referenced by rb_w32_socket(), and socketpair_internal().
Definition at line 1696 of file win32.c.
References BitOfIsDir, BitOfIsRep, DIR::bits, calloc, DIR::curr, DIRENT_PER_CHAR, errno, idx, ISALPHA, len, memcpy(), DIR::nfiles, NULL, open_dir_handle(), p, rb_w32_closedir(), realloc, SetBit, DIR::size, DIR::start, and wstati64().
Referenced by rb_w32_opendir(), and rb_w32_uopendir().
|
static |
Definition at line 2970 of file win32.c.
References buf, data, errno, FALSE, finish_overlapped_socket(), flags, int, len, map_errno, memset(), mode, NULL, O_NONBLOCK, r, ret, RUBY_CRITICAL, s, size, st_lookup, StartSockets(), TO_SOCKET, and TRUE.
Referenced by rb_w32_recv(), rb_w32_recvfrom(), rb_w32_send(), and rb_w32_sendto().
|
static |
Definition at line 3627 of file win32.c.
References CloseChildHandle(), err, errno, ChildRecord::hProcess, map_errno, ChildRecord::pid, and rb_w32_wait_events_blocking().
Referenced by waitpid().
Definition at line 2770 of file win32.c.
References _pioinfo, _set_osfhnd, errno, map_errno, MTHREAD_ONLY, NULL, O_BINARY, r, rb_w32_open_osfhandle(), RUBY_CRITICAL, st_insert, StartSockets(), and TO_SOCKET.
Definition at line 4411 of file win32.c.
References errno, and rb_w32_stati64().
Definition at line 1280 of file win32.c.
References rb_w32_aspawn_flags().
Referenced by pipe_open().
Definition at line 1214 of file win32.c.
References acp_to_wstr, ALLOCV, ALLOCV_END, argv, check_spawn_mode(), child_result(), cmd, CreateChild(), dln_find_exe_r(), FALSE, fbuf, free, getenv(), internal_cmd_match(), is_batch(), is_command_com(), join_argv(), len, MAXPATHLEN, NULL, ret, shell, strchr(), strlcat(), strlcpy(), strlen(), STRNDUPV, translate_char(), and v.
Referenced by rb_w32_aspawn().
uintptr_t rb_w32_asynchronize | ( | asynchronous_func_t | func, |
uintptr_t | self, | ||
int | argc, | ||
uintptr_t * | argv, | ||
uintptr_t | intrval | ||
) |
Definition at line 4689 of file win32.c.
References argc, asynchronous_arg_t::argc, argv, asynchronous_arg_t::argv, call_asynchronous(), Debug, errno, asynchronous_arg_t::errnum, FALSE, func, asynchronous_arg_t::func, m, memset(), NULL, rb_fatal(), rb_w32_wait_events_blocking(), RUBY_CRITICAL, asynchronous_arg_t::self, asynchronous_arg_t::stackaddr, TRUE, val, yield_once, and yield_until.
Referenced by flock().
Definition at line 2805 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Referenced by rb_w32_select_with_thread().
Definition at line 5160 of file win32.c.
References _set_osfhnd, errno, is_socket(), key, LK_LEN, map_errno, NULL, st_delete, and TO_SOCKET.
Referenced by rb_w32_pipe(), and rb_w32_socketpair().
Definition at line 1994 of file win32.c.
References DIR::bits, direct::d_name, DIR::dirstr, free, and DIR::start.
Referenced by opendir_internal().
Definition at line 1410 of file win32.c.
References c, calloc, CharNext, cmdglob(), done, _NtCmdLineElement::flags, free, ISSPACE, _NtCmdLineElement::len, len, malloc, memcpy(), _NtCmdLineElement::next, NTMALLOC, NULL, p, ptr, skipspace(), _NtCmdLineElement::str, strdup, and strlcpy().
Referenced by rb_w32_sysinit().
Definition at line 2823 of file win32.c.
References EINPROGRESS, err, errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
VALUE rb_w32_conv_from_wchar | ( | const WCHAR * | wstr, |
rb_encoding * | enc | ||
) |
Definition at line 1861 of file win32.c.
References ECONV_UNDEF_REPLACE, NULL, Qnil, rb_ascii8bit_encoding(), rb_enc_find(), rb_enc_from_encoding(), rb_enc_str_new(), rb_str_encode(), and src.
Referenced by etc_systmpdir(), rb_w32_conv_from_wstr(), and rb_w32_special_folder().
char* rb_w32_conv_from_wstr | ( | const WCHAR * | wstr, |
long * | lenp, | ||
rb_encoding * | enc | ||
) |
Definition at line 1880 of file win32.c.
References len, malloc, memcpy(), NIL_P, ptr, rb_w32_conv_from_wchar(), RSTRING_LEN, RSTRING_PTR, and wstr_to_filecp.
Referenced by ruby_direct_conv().
Definition at line 5046 of file win32.c.
References _set_osfhnd, errno, fileno, is_socket(), LK_LEN, map_errno, and TO_SOCKET.
void rb_w32_fd_copy | ( | rb_fdset_t * | dst, |
const fd_set * | src, | ||
int | max | ||
) |
Definition at line 2362 of file win32.c.
References FD_SETSIZE, memcpy(), and xrealloc.
void rb_w32_fd_dup | ( | rb_fdset_t * | dst, |
const rb_fdset_t * | src | ||
) |
Definition at line 2377 of file win32.c.
References FD_SETSIZE, memcpy(), and xrealloc.
char rb_w32_fd_is_text | ( | int | fd | ) |
void rb_w32_free_environ | ( | char ** | env | ) |
Definition at line 4496 of file win32.c.
References IsWin95, and rb_chsize().
char** rb_w32_get_environ | ( | void | ) |
SOCKET rb_w32_get_osfhandle | ( | int | fh | ) |
Definition at line 888 of file win32.c.
Referenced by rb_io_flush(), and rb_io_rewind().
Definition at line 4633 of file win32.c.
References c, catch_interrupt(), clearerr, enough_to_get, EOF, and errno.
char* rb_w32_getcwd | ( | char * | buffer, |
int | size | ||
) |
char* rb_w32_getenv | ( | const char * | name | ) |
Definition at line 3987 of file win32.c.
References env, len, map_errno, NULL, strlen(), and strncasecmp.
Referenced by init_env().
Definition at line 3320 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
struct hostent* WSAAPI rb_w32_gethostbyname | ( | const char * | name | ) |
Definition at line 3337 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
Definition at line 3354 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, and StartSockets().
Definition at line 2846 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
rb_pid_t rb_w32_getpid | ( | void | ) |
rb_pid_t rb_w32_getppid | ( | void | ) |
Definition at line 4808 of file win32.c.
References get_proc_address(), int, IsWin95, len, long, NULL, rb_w32_osver(), and ULONG().
struct protoent* WSAAPI rb_w32_getprotobyname | ( | const char * | name | ) |
Definition at line 3371 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
struct protoent* WSAAPI rb_w32_getprotobynumber | ( | int | num | ) |
Definition at line 3388 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
Definition at line 3405 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
Definition at line 3422 of file win32.c.
References errno, map_errno, NULL, r, RUBY_CRITICAL, and StartSockets().
Definition at line 2863 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Definition at line 2878 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Definition at line 2090 of file win32.c.
References is_console(), is_socket(), NULL, and TO_SOCKET.
Definition at line 2895 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Definition at line 2198 of file win32.c.
References is_socket(), and TO_SOCKET.
Referenced by rsock_init_sock().
Definition at line 2912 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Definition at line 4857 of file win32.c.
References arg, filecp_to_wstr, free, NULL, O_BINARY, rb_w32_wopen(), ret, and va_end().
Definition at line 2096 of file win32.c.
References _pioinfo, _set_osfhnd, _set_osflags, errno, FAPPEND, FDEV, FNOINHERIT, FOPEN, FTEXT, MTHREAD_ONLY, and NULL.
Referenced by rb_w32_accept(), rb_w32_socket(), and rb_w32_socketpair().
Definition at line 1809 of file win32.c.
References filecp_to_wstr, free, NULL, opendir_internal(), and ret.
Definition at line 5068 of file win32.c.
References _pioinfo, _set_osfhnd, _set_osflags, err, errno, FALSE, FNOINHERIT, FOPEN, FPIPE, map_errno, MTHREAD_ONLY, name, NULL, p, rb_w32_close(), rb_w32_getpid(), ret, RUBY_CRITICAL, snprintf, strchr(), and strlen().
Definition at line 4653 of file win32.c.
References c, catch_interrupt(), and enough_to_put.
Definition at line 5228 of file win32.c.
References _osfhnd, _osfile, _pioinfo, _set_osflags, cancel_io, err, errno, FALSE, FEOFLAG, finish_overlapped(), FTEXT, is_console(), is_socket(), len, map_errno, mode, MTHREAD_ONLY, NULL, osver, rb_w32_recv(), rb_w32_wait_events_blocking(), ret, setup_overlapped(), size, start, TO_SOCKET, TRUE, and wait.
Definition at line 1940 of file win32.c.
References NULL, readdir_internal(), and win32_direct_conv().
struct direct* rb_w32_readdir_with_enc | ( | DIR * | dirp, |
rb_encoding * | enc | ||
) |
Definition at line 1946 of file win32.c.
References NULL, rb_ascii8bit_encoding(), readdir_internal(), ruby_direct_conv(), and win32_direct_conv().
Definition at line 3039 of file win32.c.
References NULL, overlapped_socket_io(), and TRUE.
Referenced by rb_w32_read().
int WSAAPI rb_w32_recvfrom | ( | int | fd, |
char * | buf, | ||
int | len, | ||
int | flags, | ||
struct sockaddr * | from, | ||
int * | fromlen | ||
) |
Definition at line 3045 of file win32.c.
References overlapped_socket_io(), and TRUE.
Definition at line 1983 of file win32.c.
References DIR::curr, DIR::loc, and DIR::start.
Referenced by rb_w32_seekdir().
Definition at line 1969 of file win32.c.
References DIR::curr, DIR::loc, move_to_next_entry(), and rb_w32_rewinddir().
int WSAAPI rb_w32_select | ( | int | nfds, |
fd_set * | rd, | ||
fd_set * | wr, | ||
fd_set * | ex, | ||
struct timeval * | timeout | ||
) |
Definition at line 2748 of file win32.c.
References rb_w32_select_with_thread().
int rb_w32_select_with_thread | ( | int | nfds, |
fd_set * | rd, | ||
fd_set * | wr, | ||
fd_set * | ex, | ||
struct timeval * | timeout, | ||
void * | th | ||
) |
Definition at line 2606 of file win32.c.
References compare(), copy_fd(), do_select(), errno, extract_fd(), gettimeofday(), if(), int, is_console(), is_invalid_handle(), is_not_socket(), is_pipe(), is_readable_console(), is_readable_pipe(), NULL, r, rb_fd_init, rb_fd_term, rb_w32_check_interrupt(), rb_w32_time_subtract(), StartSockets(), timeval::tv_sec, timeval::tv_usec, and wait.
Referenced by rb_w32_select().
Definition at line 3052 of file win32.c.
References FALSE, NULL, and overlapped_socket_io().
Referenced by rb_w32_write().
int WSAAPI rb_w32_sendto | ( | int | fd, |
const char * | buf, | ||
int | len, | ||
int | flags, | ||
const struct sockaddr * | to, | ||
int | tolen | ||
) |
Definition at line 3058 of file win32.c.
References FALSE, and overlapped_socket_io().
Definition at line 3211 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
Definition at line 3228 of file win32.c.
References errno, map_errno, r, RUBY_CRITICAL, shutdown, StartSockets(), and TO_SOCKET.
Definition at line 3292 of file win32.c.
References errno, map_errno, O_BINARY, open_ifs_socket(), rb_w32_open_osfhandle(), RUBY_CRITICAL, s, st_insert, and StartSockets().
Definition at line 3527 of file win32.c.
References O_BINARY, pair, rb_w32_close(), rb_w32_open_osfhandle(), socketpair_internal(), and st_insert.
Definition at line 1112 of file win32.c.
References acp_to_wstr, ALLOCV, ALLOCV_END, CharNext, check_spawn_mode(), child_result(), cmd, CreateChild(), dln_find_exe_r(), fbuf, free, getenv(), has_redirection(), is_batch(), is_command_com(), is_internal_cmd(), ISSPACE, len, MAXPATHLEN, memcpy(), NULL, p, ret, shell, strchr(), strlen(), STRNDUPV, translate_char(), and v.
Referenced by pipe_open(), and rb_proc_exec().
Definition at line 490 of file win32.c.
References get_special_folder(), path, Qnil, rb_filesystem_encoding(), rb_w32_conv_from_wchar(), and regulate_path().
Referenced by etc_sysconfdir().
Definition at line 4327 of file win32.c.
References COPY_STAT, and rb_w32_stati64().
Definition at line 4398 of file win32.c.
References filecp_to_wstr, free, NULL, ret, and wstati64().
Referenced by rb_w32_access(), and rb_w32_stat().
char* rb_w32_strerror | ( | int | e | ) |
Definition at line 662 of file win32.c.
References exit_handler(), get_version(), init_env(), init_func(), init_stdhandle(), rb_w32_cmdvector(), and StartSockets().
Referenced by ruby_sysinit().
UINT rb_w32_system_tmpdir | ( | WCHAR * | path, |
UINT | len | ||
) |
Definition at line 500 of file win32.c.
References CSIDL_LOCAL_APPDATA, get_special_folder(), get_system_directory(), memcpy(), numberof, p, and translate_wchar().
Referenced by etc_systmpdir(), and init_env().
Definition at line 2569 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
Definition at line 4587 of file win32.c.
References filetime_to_clock(), tms::tms_cstime, tms::tms_cutime, tms::tms_stime, and tms::tms_utime.
Definition at line 4425 of file win32.c.
References errno, and rb_w32_ustati64().
Definition at line 4838 of file win32.c.
References arg, free, NULL, rb_w32_wopen(), ret, utf8_to_wstr, and va_end().
Definition at line 1821 of file win32.c.
References free, NULL, opendir_internal(), ret, and utf8_to_wstr.
Definition at line 4385 of file win32.c.
References free, NULL, ret, utf8_to_wstr, and wstati64().
Referenced by rb_w32_uaccess().
Referenced by catch_interrupt().
Definition at line 4879 of file win32.c.
References _osfile, _pioinfo, _set_osfhnd, _set_osflags, access, arg, errno, FALSE, FAPPEND, FDEV, FNOINHERIT, FOPEN, FPIPE, map_errno, MTHREAD_ONLY, NULL, O_BINARY, RUBY_CRITICAL, TRUE, and va_end().
Referenced by rb_w32_open(), and rb_w32_uopen().
Definition at line 5358 of file win32.c.
References _osfhnd, _osfile, _pioinfo, cancel_io, err, errno, FDEV, FEOFLAG, fileno, finish_overlapped(), FPIPE, FTEXT, is_socket(), len, map_errno, MTHREAD_ONLY, NULL, rb_w32_send(), rb_w32_wait_events_blocking(), ret, setup_overlapped(), size, TO_SOCKET, TRUE, and wait.
Definition at line 5458 of file win32.c.
References _osfhnd, ECONV_INVALID_REPLACE, ECONV_UNDEF_REPLACE, NULL, Qnil, rb_econv_has_convpath_p(), rb_enc_find(), rb_enc_from_encoding(), rb_enc_get(), rb_enc_name, rb_str_encode(), RSTRING_LEN, RSTRING_PTR, and TRUE.
Referenced by io_fwrite().
|
static |
Definition at line 1902 of file win32.c.
References BitOfIsDir, BitOfIsRep, DIR::bits, DIR::curr, direct::d_ino, direct::d_isdir, direct::d_isrep, direct::d_name, DIR::dirstr, dummy, free, GetBit, DIR::loc, move_to_next_entry(), and NULL.
Referenced by rb_w32_readdir(), and rb_w32_readdir_with_enc().
Definition at line 3099 of file win32.c.
References data, WSAMSG::dwFlags, errno, FALSE, finish_overlapped_socket(), flags, get_wsa_extension_function(), int, len, map_errno, memset(), mode, msghdr::msg_flags, msghdr::msg_name, msghdr::msg_namelen, msghdr_to_wsamsg, WSAMSG::name, WSAMSG::namelen, NULL, O_NONBLOCK, ret, RUBY_CRITICAL, s, size, st_lookup, StartSockets(), TO_SOCKET, TRUE, and WSAID_WSARECVMSG.
|
static |
Definition at line 444 of file win32.c.
References p, and translate_wchar().
Referenced by init_env(), and rb_w32_special_folder().
|
static |
Definition at line 1894 of file win32.c.
References direct::d_name, direct::d_namlen, FALSE, rb_w32_conv_from_wstr(), and TRUE.
Referenced by rb_w32_readdir_with_enc().
Definition at line 3158 of file win32.c.
References data, errno, FALSE, finish_overlapped_socket(), get_wsa_extension_function(), int, len, map_errno, memset(), mode, msghdr_to_wsamsg, NULL, O_NONBLOCK, ret, RUBY_CRITICAL, s, size, st_lookup, StartSockets(), TO_SOCKET, TRUE, and WSAID_WSASENDMSG.
int setgid | ( | rb_gid_t | gid | ) |
Definition at line 2309 of file win32.c.
References ROOT_GID.
Referenced by p_gid_change_privilege(), and rb_setegid_core().
int setuid | ( | rb_uid_t | uid | ) |
Definition at line 2303 of file win32.c.
References ROOT_UID.
Referenced by p_uid_change_privilege(), and rb_seteuid_core().
int signbit | ( | double | x | ) |
Definition at line 5817 of file win32.c.
References ip.
Referenced by f_signbit(), math_atan2(), math_gamma(), and math_lgamma().
|
inlinestatic |
Definition at line 1402 of file win32.c.
Referenced by rb_w32_cmdvector().
Definition at line 3437 of file win32.c.
References EAFNOSUPPORT, EPROTOTYPE, errno, len, map_errno, memset(), open_ifs_socket(), PF_INET, r, ret, RUBY_CRITICAL, and StartSockets().
Referenced by rb_w32_socketpair().
Definition at line 638 of file win32.c.
References rb_fatal(), st_init_numtable, and version().
Referenced by overlapped_socket_io(), rb_w32_accept(), rb_w32_bind(), rb_w32_connect(), rb_w32_gethostbyaddr(), rb_w32_gethostbyname(), rb_w32_gethostname(), rb_w32_getpeername(), rb_w32_getprotobyname(), rb_w32_getprotobynumber(), rb_w32_getservbyname(), rb_w32_getservbyport(), rb_w32_getsockname(), rb_w32_getsockopt(), rb_w32_ioctlsocket(), rb_w32_listen(), rb_w32_select_with_thread(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_sysinit(), recvmsg(), sendmsg(), and socketpair_internal().
Definition at line 402 of file win32.c.
Referenced by rb_w32_aspawn_flags(), rb_w32_getcwd(), and rb_w32_spawn().
Definition at line 392 of file win32.c.
References p.
Referenced by rb_w32_system_tmpdir(), and regulate_path().
|
static |
Definition at line 3662 of file win32.c.
References count, END_FOREACH_CHILD, errno, FindChildSlot(), FindChildSlotByHandle(), FOREACH_CHILD, ChildRecord::hProcess, map_errno, MAXCHILDNUM, ChildRecord::pid, poll_child_status(), rb_w32_wait_events_blocking(), ret, and WNOHANG.
Referenced by rb_waitpid_blocking(), and wait().
|
static |
Definition at line 1853 of file win32.c.
References direct::d_name, direct::d_namlen, FALSE, TRUE, and wstr_to_filecp.
Referenced by rb_w32_readdir(), and rb_w32_readdir_with_enc().
Definition at line 4253 of file win32.c.
References check_valid_dir(), errno, fileattr_to_unixmode(), filetime_to_unixtime(), map_errno, and memset().
Referenced by wstati64().
Definition at line 3918 of file win32.c.
References errno, get_proc_address(), map_errno, and NULL.
Referenced by link(), and rb_w32_ulink().
Definition at line 5582 of file win32.c.
References errno, FALSE, map_errno, NULL, ret, and RUBY_CRITICAL.
Referenced by rb_w32_mkdir(), and rb_w32_umkdir().
Definition at line 4008 of file win32.c.
References errno, IsWinNT, map_errno, res, and RUBY_CRITICAL.
Referenced by rb_w32_rename(), and rb_w32_urename().
Definition at line 5627 of file win32.c.
References errno, FALSE, map_errno, ret, and RUBY_CRITICAL.
Referenced by rb_w32_rmdir(), and rb_w32_urmdir().
Definition at line 4337 of file win32.c.
References ALLOCV_END, ALLOCV_N, end, errno, isUNCRoot(), IsWinNT, len, p, ret, s, S_IWGRP, S_IWOTH, size, v, win95_stat, and winnt_stat().
Referenced by opendir_internal(), rb_w32_stati64(), rb_w32_ustati64(), and wutime().
Definition at line 5673 of file win32.c.
References errno, map_errno, ret, and RUBY_CRITICAL.
Referenced by rb_w32_unlink(), and rb_w32_uunlink().
Definition at line 5494 of file win32.c.
References utimbuf::actime, errno, IsWin95, map_errno, utimbuf::modtime, mtime, NULL, ret, RUBY_CRITICAL, unixtime_to_filetime(), and wstati64().
Referenced by rb_w32_utime(), and rb_w32_uutime().
|
static |
Definition at line 579 of file win32.c.
Referenced by finish_overlapped_socket(), rb_w32_read(), and rb_w32_write().
|
static |
int err |
Definition at line 78 of file win32.c.
Referenced by argf_next_argv(), BSD__sprint(), cleanup_iseq_build(), clsid_from_remote(), date_strftime_with_tmx(), dlhandle_sym(), err_append(), errat_getter(), errat_setter(), expand_case_fold_string(), fetch_name(), fetch_name_with_level(), finish_overlapped_socket(), foletype_s_progids(), foletypelib_s_typelibs(), fptr_finalize(), Init_syslog(), inspect_errno(), kill(), lock_func(), make_econv_exception(), mutex_free(), oletypelib_path(), oletypelib_search_registry(), oletypelib_search_registry2(), onig_compile(), onig_new(), onig_new_with_source(), ossl_exc_new(), ossl_pkcs12_initialize(), ossl_pkcs7_add_data(), ossl_raise(), ossl_x509stctx_get_err_string(), ossl_x509stctx_set_error(), parse_char_class(), parse_subexp(), poll_child_status(), rb_check_backtrace(), rb_deflate_init_copy(), rb_deflate_initialize(), rb_deflate_params(), rb_deflate_s_deflate(), rb_deflate_set_dictionary(), rb_dlhandle_initialize(), rb_enc_reg_new(), rb_f_raise(), rb_gzreader_initialize(), rb_gzwriter_initialize(), rb_inflate_initialize(), rb_inflate_s_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync_point_p(), rb_iterate(), rb_mutex_unlock(), rb_mutex_unlock_th(), rb_reg_check_preprocess(), rb_reg_compile(), rb_reg_init_copy(), rb_reg_init_str(), rb_reg_initialize_m(), rb_reg_prepare_re(), rb_reg_preprocess_dregexp(), rb_reg_search(), rb_reg_to_s(), rb_set_errinfo(), rb_strftime_with_timespec(), rb_threadptr_execute_interrupts_common(), rb_threadptr_unlock_all_locking_mutexes(), rb_w32_connect(), rb_w32_pipe(), rb_w32_read(), rb_w32_strerror(), rb_w32_write(), reg_compile_gen(), reg_enum_key(), reg_fragment_check_gen(), reg_get_val(), reg_get_val2(), ruby_cleanup(), ruby_close(), ruby_float_step(), ruby_getpeername(), ruby_getsockname(), ruby_shutdown(), setup_overlapped(), syserr_initialize(), thread_create_core(), thread_join(), typelib_file_from_clsid(), typelib_file_from_typelib(), vm_exec(), vm_throw(), zstream_end(), zstream_finalize(), zstream_reset(), zstream_run(), and zstream_sync().
struct { ... } errmap[] |
Referenced by rb_w32_map_errno(), and rb_w32_strerror().
|
static |
Definition at line 235 of file win32.c.
Referenced by getlogin(), and init_env().
|
static |
Definition at line 237 of file win32.c.
Referenced by get_version(), rb_w32_osver(), and rb_w32_read().
DWORD winerr |
Definition at line 77 of file win32.c.
Referenced by rb_w32_map_errno(), and rb_w32_strerror().