Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ruby/ruby.h"
#include "ruby/encoding.h"
#include "ruby/util.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 <shlwapi.h>
#include "ruby/win32.h"
#include "win32/dir.h"
#include "win32/file.h"
#include "internal.h"
#include "encindex.h"
#include "dln.h"
#include "dln_find.c"
#include <sys/timeb.h>
#include "missing/nextafter.c"
Go to the source code of this file.
Data Structures | |
struct | constat |
struct | ChildRecord |
struct | _NtCmdLineElement |
struct | ioinfo |
struct | WSAMSG |
struct | NET_LUID |
struct | asynchronous_arg_t |
Macros | |
#define | isdirsep(x) ((x) == '/' || (x) == '\\') |
#define | DLN_FIND_EXTRA_ARG_DECL ,UINT cp |
#define | DLN_FIND_EXTRA_ARG ,cp |
#define | rb_w32_stati64(path, st) w32_stati64(path, st, cp) |
#define | getenv(name) w32_getenv(name, cp) |
#define | CharNext(p) CharNextExA(cp, (p), 0) |
#define | dln_find_exe_r rb_w32_udln_find_exe_r |
#define | dln_find_file_r rb_w32_udln_find_file_r |
#define | dln_find_exe_r(fname, path, buf, size) rb_w32_udln_find_exe_r(fname, path, buf, size, cp) |
#define | dln_find_file_r(fname, path, buf, size) rb_w32_udln_find_file_r(fname, path, buf, size, cp) |
#define | ENV_MAX 512 |
#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 if (0) {} else /* just remark */ |
#define | ERROR_PIPE_LOCAL 229L |
#define | map_errno rb_w32_map_errno |
#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 | env wk.val |
#define | set_env_val(vname) |
#define | conlist_disabled ((st_table *)-1) |
#define | MAKE_SOCKDATA(af, fl) ((int)((((int)af)<<4)|((fl)&0xFFFF))) |
#define | GET_FAMILY(v) ((int)(((v)>>4)&0xFFFF)) |
#define | GET_FLAGS(v) ((int)((v)&0xFFFF)) |
#define | MAXCHILDNUM 256 /* max num of child processes */ |
#define | FOREACH_CHILD(v) |
#define | END_FOREACH_CHILD } while (0) |
#define | InternalCmdsMax 8 |
#define | STRNDUPV(ptr, v, src, len) (((char *)memcpy(((ptr) = ALLOCV((v), (len) + 1)), (src), (len)))[len] = 0) |
#define | filecp rb_w32_filecp |
#define | mbstr_to_wstr rb_w32_mbstr_to_wstr |
#define | wstr_to_mbstr rb_w32_wstr_to_mbstr |
#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 | 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 | FILE_COUNT(stream) stream->_cnt |
#define | FILE_READPTR(stream) stream->_ptr |
#define | FILE_FILENO(stream) stream->_file |
#define | _CRTIMP __declspec(dllimport) |
#define | IOINFO_L2E 5 |
#define | IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) |
#define | _osfhnd(i) (_pioinfo(i)->osfhnd) |
#define | _osfile(i) (_pioinfo(i)->osfile) |
#define | rb_acrt_lowio_lock_fh(i) EnterCriticalSection(&_pioinfo(i)->lock) |
#define | rb_acrt_lowio_unlock_fh(i) LeaveCriticalSection(&_pioinfo(i)->lock) |
#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 | hex2byte(str) ((isdigit(*(str)) ? *(str) - '0' : toupper(*(str)) - 'A' + 10) << 4 | (isdigit(*((str) + 1)) ? *((str) + 1) - '0' : toupper(*((str) + 1)) - 'A' + 10)) |
#define | FILE_DEVICE_FILE_SYSTEM 0x00000009 |
#define | FSCTL_GET_REPARSE_POINT ((0x9<<16)|(42<<2)) |
#define | IO_REPARSE_TAG_SYMLINK 0xA000000CL |
#define | SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
#define | COPY_STAT(src, dest, size_cast) |
#define | yield_once() Sleep(0) |
#define | yield_until(condition) do yield_once(); while (!(condition)) |
#define | set_new_std_handle(newfd, handle) |
#define | set_new_std_fd(newfd) set_new_std_handle(newfd, (HANDLE)rb_w32_get_osfhandle(newfd)) |
#define | FOREGROUND_MASK (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY) |
#define | BACKGROUND_MASK (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY) |
#define | constat_attr_color_reverse(attr) |
#define | COMMON_LVB_UNDERSCORE 0x8000 |
#define | INVALID_SET_FILE_POINTER ((DWORD)-1) |
Typedefs | |
typedef struct _NtCmdLineElement | NtCmdLineElement |
typedef DWORD(WINAPI * | get_final_path_func) (HANDLE, WCHAR *, DWORD, DWORD) |
typedef DWORD(WINAPI * | cigl_t) (const GUID *, NET_LUID *) |
typedef DWORD(WINAPI * | cilnA_t) (const NET_LUID *, char *, size_t) |
Enumerations | |
enum | { constat_init = -2, constat_esc = -1, constat_seq = 0 } |
Functions | |
static int | w32_wopen (const WCHAR *file, int oflag, int perm) |
static int | w32_stati64 (const char *path, struct stati64 *st, UINT cp) |
static int | w32_lstati64 (const char *path, struct stati64 *st, UINT cp) |
static char * | w32_getenv (const char *name, UINT cp) |
int | rb_w32_reparse_symlink_p (const WCHAR *path) |
static struct ChildRecord * | CreateChild (const WCHAR *, const WCHAR *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE, DWORD) |
static int | has_redirection (const char *, UINT) |
int | rb_w32_wait_events (HANDLE *events, int num, DWORD timeout) |
static int | rb_w32_open_osfhandle (intptr_t osfhandle, int flags) |
static int | wstati64 (const WCHAR *path, struct stati64 *st) |
static int | wlstati64 (const WCHAR *path, struct stati64 *st) |
VALUE | rb_w32_conv_from_wchar (const WCHAR *wstr, rb_encoding *enc) |
int | ruby_brace_glob_with_enc (const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc) |
static FARPROC | get_proc_address (const char *module, const char *func, HANDLE *mh) |
int | rb_w32_map_errno (DWORD winerr) |
static void | get_version (void) |
DWORD | rb_w32_osver (void) |
static uintptr_t | flock_winnt (uintptr_t self, int argc, uintptr_t *argv) |
int | flock (int fd, int oper) |
static WCHAR * | translate_wchar (WCHAR *p, int from, int to) |
static char * | translate_char (char *p, int from, int to, UINT cp) |
static BOOL | get_special_folder (int n, WCHAR *buf, size_t len) |
static void | regulate_path (WCHAR *path) |
VALUE | rb_w32_special_folder (int type) |
UINT | rb_w32_system_tmpdir (WCHAR *path, UINT len) |
WCHAR * | rb_w32_home_dir (void) |
static void | init_env (void) |
static void | init_stdhandle (void) |
static int | free_conlist (st_data_t key, st_data_t val, st_data_t arg) |
static void | constat_delete (HANDLE h) |
static void | exit_handler (void) |
static void | StartSockets (void) |
static int | socklist_insert (SOCKET sock, int flag) |
static int | socklist_lookup (SOCKET sock, int *flagp) |
static int | socklist_delete (SOCKET *sockp, int *flagp) |
static int | w32_cmdvector (const WCHAR *, char ***, UINT, rb_encoding *) |
void | rb_w32_sysinit (int *argc, char ***argv) |
char * | getlogin (void) |
static struct ChildRecord * | FindChildSlot (rb_pid_t pid) |
static struct ChildRecord * | FindChildSlotByHandle (HANDLE h) |
static void | CloseChildHandle (struct ChildRecord *child) |
static struct ChildRecord * | FindFreeChildSlot (void) |
static int | internal_match (const void *key, const void *elem) |
static int | is_command_com (const char *interp) |
static int | internal_cmd_match (const char *cmdname, int nt) |
static int | is_internal_cmd (const char *cmd, int nt) |
SOCKET | rb_w32_get_osfhandle (int fh) |
static int | join_argv (char *cmd, char *const *argv, BOOL escape, UINT cp, int backslash) |
static int | check_spawn_mode (int mode) |
static rb_pid_t | child_result (struct ChildRecord *child, int mode) |
static int | is_batch (const char *cmd) |
static rb_pid_t | w32_spawn (int mode, const char *cmd, const char *prog, UINT cp) |
rb_pid_t | rb_w32_spawn (int mode, const char *cmd, const char *prog) |
rb_pid_t | rb_w32_uspawn (int mode, const char *cmd, const char *prog) |
static rb_pid_t | w32_aspawn_flags (int mode, const char *prog, char *const *argv, DWORD flags, UINT cp) |
rb_pid_t | rb_w32_aspawn_flags (int mode, const char *prog, char *const *argv, DWORD flags) |
rb_pid_t | rb_w32_uaspawn_flags (int mode, const char *prog, char *const *argv, DWORD flags) |
rb_pid_t | rb_w32_aspawn (int mode, const char *prog, char *const *argv) |
rb_pid_t | rb_w32_uaspawn (int mode, const char *prog, char *const *argv) |
static int | insert (const char *path, VALUE vinfo, void *enc) |
static NtCmdLineElement ** | cmdglob (NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp, rb_encoding *enc) |
static WCHAR * | skipspace (WCHAR *ptr) |
static DWORD WINAPI | get_final_path_fail (HANDLE f, WCHAR *buf, DWORD len, DWORD flag) |
static DWORD WINAPI | get_final_path_unknown (HANDLE f, WCHAR *buf, DWORD len, DWORD flag) |
static HANDLE | open_special (const WCHAR *path, DWORD access, DWORD flags) |
static HANDLE | open_dir_handle (const WCHAR *filename, WIN32_FIND_DATAW *fd) |
static DIR * | w32_wopendir (const WCHAR *wpath) |
UINT | filecp (void) |
char * | rb_w32_wstr_to_mbstr (UINT cp, const WCHAR *wstr, int clen, long *plen) |
WCHAR * | rb_w32_mbstr_to_wstr (UINT cp, const char *str, int clen, long *plen) |
DIR * | rb_w32_opendir (const char *filename) |
DIR * | rb_w32_uopendir (const char *filename) |
static void | move_to_next_entry (DIR *dirp) |
static BOOL | win32_direct_conv (const WCHAR *file, const WCHAR *alt, struct direct *entry, const void *enc) |
char * | rb_w32_conv_from_wstr (const WCHAR *wstr, long *lenp, rb_encoding *enc) |
static BOOL | ruby_direct_conv (const WCHAR *file, const WCHAR *alt, struct direct *entry, const void *enc) |
static struct direct * | readdir_internal (DIR *dirp, BOOL(*conv)(const WCHAR *, const WCHAR *, struct direct *, const void *), const void *enc) |
struct direct * | rb_w32_readdir (DIR *dirp, rb_encoding *enc) |
long | rb_w32_telldir (DIR *dirp) |
void | rb_w32_seekdir (DIR *dirp, long loc) |
void | rb_w32_rewinddir (DIR *dirp) |
void | rb_w32_closedir (DIR *dirp) |
static ioinfo * | _pioinfo (int) |
static int | is_socket (SOCKET) |
static int | is_console (SOCKET) |
int | rb_w32_io_cancelable_p (int fd) |
int | rb_w32_is_socket (int fd) |
char * | rb_w32_strerror (int e) |
rb_uid_t | getuid (void) |
rb_uid_t | geteuid (void) |
rb_gid_t | getgid (void) |
rb_gid_t | getegid (void) |
int | setuid (rb_uid_t uid) |
int | setgid (rb_gid_t gid) |
int | ioctl (int i, int u,...) |
void | rb_w32_fdset (int fd, fd_set *set) |
void | rb_w32_fdclr (int fd, fd_set *set) |
int | rb_w32_fdisset (int fd, fd_set *set) |
void | rb_w32_fd_copy (rb_fdset_t *dst, const fd_set *src, int max) |
void | rb_w32_fd_dup (rb_fdset_t *dst, const rb_fdset_t *src) |
static int | extract_fd (rb_fdset_t *dst, fd_set *src, int(*func)(SOCKET)) |
static int | copy_fd (fd_set *dst, fd_set *src) |
static int | is_not_socket (SOCKET sock) |
static int | is_pipe (SOCKET sock) |
static int | is_readable_pipe (SOCKET sock) |
static int | is_readable_console (SOCKET sock) |
static int | is_invalid_handle (SOCKET sock) |
static int | do_select (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *timeout) |
int | rb_w32_time_subtract (struct timeval *rest, const struct timeval *wait) |
static int | compare (const struct timeval *t1, const struct timeval *t2) |
int | rb_w32_check_interrupt (void *) |
int | rb_w32_select_with_thread (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *timeout, void *th) |
int WSAAPI | rb_w32_select (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *timeout) |
static FARPROC | get_wsa_extension_function (SOCKET s, GUID *guid) |
int WSAAPI | rb_w32_accept (int s, struct sockaddr *addr, int *addrlen) |
int WSAAPI | rb_w32_bind (int s, const struct sockaddr *addr, int addrlen) |
int WSAAPI | rb_w32_connect (int s, const struct sockaddr *addr, int addrlen) |
int WSAAPI | rb_w32_getpeername (int s, struct sockaddr *addr, int *addrlen) |
int WSAAPI | rb_w32_getsockname (int fd, struct sockaddr *addr, int *addrlen) |
int WSAAPI | rb_w32_getsockopt (int s, int level, int optname, char *optval, int *optlen) |
int WSAAPI | rb_w32_ioctlsocket (int s, long cmd, u_long *argp) |
int WSAAPI | rb_w32_listen (int s, int backlog) |
static int | finish_overlapped_socket (BOOL input, SOCKET s, WSAOVERLAPPED *wol, int result, DWORD *len, DWORD size) |
static int | overlapped_socket_io (BOOL input, int fd, char *buf, int len, int flags, struct sockaddr *addr, int *addrlen) |
int WSAAPI | rb_w32_recv (int fd, char *buf, int len, int flags) |
int WSAAPI | rb_w32_recvfrom (int fd, char *buf, int len, int flags, struct sockaddr *from, int *fromlen) |
int WSAAPI | rb_w32_send (int fd, const char *buf, int len, int flags) |
int WSAAPI | rb_w32_sendto (int fd, const char *buf, int len, int flags, const struct sockaddr *to, int tolen) |
int | recvmsg (int fd, struct msghdr *msg, int flags) |
int | sendmsg (int fd, const struct msghdr *msg, int flags) |
int WSAAPI | rb_w32_setsockopt (int s, int level, int optname, const char *optval, int optlen) |
int WSAAPI | rb_w32_shutdown (int s, int how) |
static SOCKET | open_ifs_socket (int af, int type, int protocol) |
int WSAAPI | rb_w32_socket (int af, int type, int protocol) |
struct hostent *WSAAPI | rb_w32_gethostbyaddr (const char *addr, int len, int type) |
struct hostent *WSAAPI | rb_w32_gethostbyname (const char *name) |
int WSAAPI | rb_w32_gethostname (char *name, int len) |
struct protoent *WSAAPI | rb_w32_getprotobyname (const char *name) |
struct protoent *WSAAPI | rb_w32_getprotobynumber (int num) |
struct servent *WSAAPI | rb_w32_getservbyname (const char *name, const char *proto) |
struct servent *WSAAPI | rb_w32_getservbyport (int port, const char *proto) |
static int | socketpair_internal (int af, int type, int protocol, SOCKET *sv) |
int | socketpair (int af, int type, int protocol, int *sv) |
static void | str2guid (const char *str, GUID *guid) |
int | getifaddrs (struct ifaddrs **ifap) |
void | freeifaddrs (struct ifaddrs *ifp) |
void | endhostent (void) |
void | endnetent (void) |
void | endprotoent (void) |
void | endservent (void) |
struct netent * | getnetent (void) |
struct netent * | getnetbyaddr (long net, int type) |
struct netent * | getnetbyname (const char *name) |
struct protoent * | getprotoent (void) |
struct servent * | getservent (void) |
void | sethostent (int stayopen) |
void | setnetent (int stayopen) |
void | setprotoent (int stayopen) |
void | setservent (int stayopen) |
static int | setfl (SOCKET sock, int arg) |
static int | dupfd (HANDLE hDup, int flags, int minfd) |
int | fcntl (int fd, int cmd,...) |
int | rb_w32_set_nonblock (int fd) |
static rb_pid_t | poll_child_status (struct ChildRecord *child, int *stat_loc) |
rb_pid_t | waitpid (rb_pid_t pid, int *stat_loc, int options) |
static int | filetime_to_timeval (const FILETIME *ft, struct timeval *tv) |
int __cdecl | gettimeofday (struct timeval *tv, struct timezone *tz) |
int | clock_gettime (clockid_t clock_id, struct timespec *sp) |
int | clock_getres (clockid_t clock_id, struct timespec *sp) |
char * | rb_w32_getcwd (char *buffer, int size) |
int | chown (const char *path, int owner, int group) |
int | rb_w32_uchown (const char *path, int owner, int group) |
int | lchown (const char *path, int owner, int group) |
int | rb_w32_ulchown (const char *path, int owner, int group) |
int | kill (int pid, int sig) |
static int | wlink (const WCHAR *from, const WCHAR *to) |
int | rb_w32_ulink (const char *from, const char *to) |
int | link (const char *from, const char *to) |
static int | reparse_symlink (const WCHAR *path, rb_w32_reparse_buffer_t *rp, size_t size) |
int | rb_w32_read_reparse_point (const WCHAR *path, rb_w32_reparse_buffer_t *rp, size_t bufsize, WCHAR **result, DWORD *len) |
static ssize_t | w32_readlink (UINT cp, const char *path, char *buf, size_t bufsize) |
ssize_t | rb_w32_ureadlink (const char *path, char *buf, size_t bufsize) |
ssize_t | readlink (const char *path, char *buf, size_t bufsize) |
static int | w32_symlink (UINT cp, const char *src, const char *link) |
int | rb_w32_usymlink (const char *src, const char *link) |
int | symlink (const char *src, const char *link) |
int | wait (int *status) |
char * | rb_w32_ugetenv (const char *name) |
char * | rb_w32_getenv (const char *name) |
static DWORD | get_attr_vsn (const WCHAR *path, DWORD *atts, DWORD *vsn) |
static int | wrename (const WCHAR *oldpath, const WCHAR *newpath) |
int | rb_w32_urename (const char *from, const char *to) |
int | rb_w32_rename (const char *from, const char *to) |
static int | isUNCRoot (const WCHAR *path) |
static time_t | filetime_to_unixtime (const FILETIME *ft) |
static WCHAR * | name_for_stat (WCHAR *buf, const WCHAR *path) |
static DWORD | stati64_handle (HANDLE h, struct stati64 *st) |
static void | stati64_set_inode (BY_HANDLE_FILE_INFORMATION *pinfo, struct stati64 *st) |
static DWORD | stati64_set_inode_handle (HANDLE h, struct stati64 *st) |
int | rb_w32_fstat (int fd, struct stat *st) |
int | rb_w32_fstati64 (int fd, struct stati64 *st) |
static unsigned | fileattr_to_unixmode (DWORD attr, const WCHAR *path) |
static int | check_valid_dir (const WCHAR *path) |
static int | stat_by_find (const WCHAR *path, struct stati64 *st) |
static int | path_drive (const WCHAR *path) |
static int | winnt_stat (const WCHAR *path, struct stati64 *st) |
static int | winnt_lstat (const WCHAR *path, struct stati64 *st) |
int | rb_w32_stat (const char *path, struct stat *st) |
int | rb_w32_ustati64 (const char *path, struct stati64 *st) |
int | rb_w32_stati64 (const char *path, struct stati64 *st) |
int | rb_w32_ulstati64 (const char *path, struct stati64 *st) |
int | rb_w32_lstati64 (const char *path, struct stati64 *st) |
int | rb_w32_access (const char *path, int mode) |
int | rb_w32_uaccess (const char *path, int mode) |
static int | rb_chsize (HANDLE h, off_t size) |
static int | w32_truncate (const char *path, off_t length, UINT cp) |
int | rb_w32_utruncate (const char *path, off_t length) |
int | rb_w32_truncate (const char *path, off_t length) |
int | rb_w32_ftruncate (int fd, off_t length) |
static long | filetime_to_clock (FILETIME *ft) |
int | rb_w32_times (struct tms *tmbuf) |
static DWORD WINAPI | call_asynchronous (PVOID argp) |
uintptr_t | rb_w32_asynchronize (asynchronous_func_t func, uintptr_t self, int argc, uintptr_t *argv, uintptr_t intrval) |
char ** | rb_w32_get_environ (void) |
void | rb_w32_free_environ (char **env) |
rb_pid_t | rb_w32_getpid (void) |
rb_pid_t | rb_w32_getppid (void) |
STATIC_ASSERT (std_handle,(STD_OUTPUT_HANDLE-STD_INPUT_HANDLE)==(STD_ERROR_HANDLE-STD_OUTPUT_HANDLE)) | |
int | rb_w32_dup2 (int oldfd, int newfd) |
int | rb_w32_uopen (const char *file, int oflag,...) |
static int | check_if_wdir (const WCHAR *wfile) |
int | rb_w32_open (const char *file, int oflag,...) |
int | rb_w32_wopen (const WCHAR *file, int oflag,...) |
int | rb_w32_fclose (FILE *fp) |
int | rb_w32_pipe (int fds[2]) |
static int | console_emulator_p (void) |
static struct constat * | constat_handle (HANDLE h) |
static void | constat_reset (HANDLE h) |
static WORD | constat_attr (int count, const int *seq, WORD attr, WORD default_attr, int *reverse) |
static void | constat_apply (HANDLE handle, struct constat *s, WCHAR w) |
static long | constat_parse (HANDLE h, struct constat *s, const WCHAR **ptrp, long *lenp) |
int | rb_w32_close (int fd) |
static int | setup_overlapped (OVERLAPPED *ol, int fd, int iswrite) |
static void | finish_overlapped (OVERLAPPED *ol, int fd, DWORD size) |
ssize_t | rb_w32_read (int fd, void *buf, size_t size) |
ssize_t | rb_w32_write (int fd, const void *buf, size_t size) |
long | rb_w32_write_console (uintptr_t strarg, int fd) |
static int | unixtime_to_filetime (time_t time, FILETIME *ft) |
static int | wutime (const WCHAR *path, const struct utimbuf *times) |
int | rb_w32_uutime (const char *path, const struct utimbuf *times) |
int | rb_w32_utime (const char *path, const struct utimbuf *times) |
int | rb_w32_uchdir (const char *path) |
static int | wmkdir (const WCHAR *wpath, int mode) |
int | rb_w32_umkdir (const char *path, int mode) |
int | rb_w32_mkdir (const char *path, int mode) |
static int | wrmdir (const WCHAR *wpath) |
int | rb_w32_rmdir (const char *path) |
int | rb_w32_urmdir (const char *path) |
static int | wunlink (const WCHAR *path) |
int | rb_w32_uunlink (const char *path) |
int | rb_w32_unlink (const char *path) |
int | rb_w32_uchmod (const char *path, int mode) |
int | fchmod (int fd, int mode) |
int | rb_w32_isatty (int fd) |
int | signbit (double x) |
const char *WSAAPI | rb_w32_inet_ntop (int af, const void *addr, char *numaddr, size_t numaddr_len) |
int WSAAPI | rb_w32_inet_pton (int af, const char *src, void *dst) |
char | rb_w32_fd_is_text (int fd) |
static int | unixtime_to_systemtime (const time_t t, SYSTEMTIME *st) |
static void | systemtime_to_tm (const SYSTEMTIME *st, struct tm *t) |
static int | systemtime_to_localtime (TIME_ZONE_INFORMATION *tz, SYSTEMTIME *gst, SYSTEMTIME *lst) |
struct tm * | gmtime_r (const time_t *tp, struct tm *rp) |
struct tm * | localtime_r (const time_t *tp, struct tm *rp) |
int | rb_w32_wrap_io_handle (HANDLE h, int flags) |
int | rb_w32_unwrap_io_handle (int fd) |
Variables | |
struct { | |
DWORD winerr | |
int err | |
} | errmap [] |
static const char * | NTLoginName |
static OSVERSIONINFO | osver |
static CRITICAL_SECTION | select_mutex |
static int | NtSocketsInitialized = 0 |
static st_table * | socklist = NULL |
static st_table * | conlist = NULL |
static char * | uenvarea |
static struct ChildRecord | ChildRecord [MAXCHILDNUM] |
static const char | szInternalCmds [][InternalCmdsMax+2] |
static get_final_path_func | get_final_path = get_final_path_unknown |
EXTERN_C _CRTIMP ioinfo * | __pioinfo [] |
static cigl_t | pConvertInterfaceGuidToLuid = (cigl_t)-1 |
static cilnA_t | pConvertInterfaceLuidToNameA = (cilnA_t)-1 |
static const WCHAR | namespace_prefix [] = {L'\\', L'\\', L'?', L'\\'} |
VALUE(*const | rb_f_notimplement_ )(int, const VALUE *, VALUE) = rb_f_notimplement |
#define _CRTIMP __declspec(dllimport) |
Definition at line 2415 of file win32.c.
Referenced by systemtime_to_localtime().
#define _osfhnd | ( | i | ) | (_pioinfo(i)->osfhnd) |
Definition at line 2428 of file win32.c.
Referenced by finish_overlapped(), rb_w32_isatty(), rb_w32_read(), rb_w32_write(), rb_w32_write_console(), and setup_overlapped().
#define _osfile | ( | i | ) | (_pioinfo(i)->osfile) |
Definition at line 2429 of file win32.c.
Referenced by fcntl(), finish_overlapped(), rb_w32_fd_is_text(), rb_w32_read(), rb_w32_write(), and setup_overlapped().
#define _set_osfhnd | ( | fh, | |
osfh | |||
) | (void)(_osfhnd(fh) = osfh) |
Definition at line 2530 of file win32.c.
Referenced by dupfd(), rb_w32_close(), rb_w32_fclose(), rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_unwrap_io_handle(), and w32_wopen().
#define _set_osflags | ( | fh, | |
flags | |||
) | (_osfile(fh) = (flags)) |
Definition at line 2531 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), and w32_wopen().
#define acp_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(CP_ACP, str, -1, plen) |
#define BACKGROUND_MASK (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY) |
#define BitOfIsDir | ( | n | ) | ((n) * 2) |
Definition at line 1926 of file win32.c.
Referenced by readdir_internal(), and w32_wopendir().
#define BitOfIsRep | ( | n | ) | ((n) * 2 + 1) |
Definition at line 1927 of file win32.c.
Referenced by readdir_internal(), and w32_wopendir().
#define COMMON_LVB_UNDERSCORE 0x8000 |
Referenced by constat_attr().
#define conlist_disabled ((st_table *)-1) |
Definition at line 695 of file win32.c.
Referenced by constat_delete(), constat_handle(), constat_reset(), and exit_handler().
#define constat_attr_color_reverse | ( | attr | ) |
Definition at line 6538 of file win32.c.
Referenced by constat_attr().
#define COPY_STAT | ( | src, | |
dest, | |||
size_cast | |||
) |
Definition at line 5288 of file win32.c.
Referenced by rb_w32_fstati64(), and rb_w32_stat().
#define CSIDL_COMMON_APPDATA 35 |
Definition at line 420 of file win32.c.
Referenced by etc_sysconfdir().
#define CSIDL_LOCAL_APPDATA 28 |
Definition at line 417 of file win32.c.
Referenced by rb_w32_system_tmpdir().
#define CSIDL_PROFILE 40 |
Definition at line 429 of file win32.c.
Referenced by init_env(), and rb_w32_home_dir().
#define Debug | ( | something | ) | /* nothing */ |
Definition at line 113 of file win32.c.
Referenced by rb_w32_asynchronize().
#define DIRENT_PER_CHAR (CHAR_BIT / 2) |
Definition at line 1928 of file win32.c.
Referenced by w32_wopendir().
#define dln_find_exe_r rb_w32_udln_find_exe_r |
Definition at line 82 of file win32.c.
Referenced by proc_exec_sh(), rb_exec_fillarg(), w32_aspawn_flags(), and w32_spawn().
#define dln_find_file_r rb_w32_udln_find_file_r |
Definition at line 83 of file win32.c.
Referenced by process_options().
#define END_FOREACH_CHILD } while (0) |
Definition at line 884 of file win32.c.
Referenced by FindChildSlot(), FindChildSlotByHandle(), FindFreeChildSlot(), and waitpid().
#define env wk.val |
Referenced by bind_local_variable_defined_p(), bind_local_variable_get(), bind_local_variable_set(), bind_local_variables(), cclass_case_fold(), check_env_value(), check_exec_env_i(), env_each_pair(), env_empty_p(), env_fetch(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_replace(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_update(), env_values(), envix(), expand_case_fold_string(), gc_mark_imemo(), get_local_variable_ptr(), i_apply_case_fold(), init_env(), onig_set_verb_warn_func(), proc_binding(), rb_binding_add_dynavars(), rb_check_exec_env(), rb_env_path_tainted(), rb_env_size(), rb_exec_fillarg(), rb_execarg_init(), rb_execarg_setenv(), rb_f_getenv(), rb_io_s_popen(), rb_raw_obj_info(), rb_vm_frame_block_handler(), rb_vmdebug_proc_dump_raw(), rb_w32_free_environ(), rb_w32_get_environ(), ruby_vm_run_at_exit_hooks(), save_env(), set_optimize_info_from_tree(), vm_bind_update_env(), vm_env_new(), vm_make_env_each(), and w32_getenv().
#define ENV_MAX 512 |
Definition at line 94 of file win32.c.
Referenced by init_env().
#define ERROR_PIPE_LOCAL 229L |
#define FAPPEND 0x20 /* file handle opened O_APPEND */ |
Definition at line 2537 of file win32.c.
Referenced by rb_w32_open_osfhandle(), setup_overlapped(), and w32_wopen().
#define FDEV 0x40 /* file handle refers to device */ |
Definition at line 2538 of file win32.c.
Referenced by finish_overlapped(), rb_w32_open_osfhandle(), rb_w32_write(), setup_overlapped(), and w32_wopen().
#define FEOFLAG 0x02 /* end of file has been encountered */ |
Definition at line 2534 of file win32.c.
Referenced by rb_w32_read(), and rb_w32_write().
#define FILE_FILENO | ( | stream | ) | stream->_file |
Definition at line 2378 of file win32.c.
Referenced by init_stdhandle().
#define filecp rb_w32_filecp |
Definition at line 1273 of file win32.c.
Referenced by rb_w32_aspawn_flags(), rb_w32_getcwd(), rb_w32_lstati64(), rb_w32_readdir(), rb_w32_spawn(), rb_w32_stati64(), rb_w32_truncate(), readlink(), and symlink().
#define filecp_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(filecp(), str, -1, plen) |
Definition at line 1278 of file win32.c.
Referenced by link(), rb_w32_mkdir(), rb_w32_open(), rb_w32_opendir(), rb_w32_rename(), rb_w32_rmdir(), rb_w32_unlink(), and rb_w32_utime().
#define FNOINHERIT 0x10 /* file handle opened O_NOINHERIT */ |
Definition at line 2536 of file win32.c.
Referenced by fcntl(), rb_w32_open_osfhandle(), rb_w32_pipe(), and w32_wopen().
#define FOPEN 0x01 /* file handle open */ |
Definition at line 2533 of file win32.c.
Referenced by dupfd(), rb_w32_open_osfhandle(), rb_w32_pipe(), and w32_wopen().
#define FOREACH_CHILD | ( | v | ) |
Definition at line 881 of file win32.c.
Referenced by FindChildSlot(), FindChildSlotByHandle(), FindFreeChildSlot(), and waitpid().
#define FOREGROUND_MASK (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY) |
#define FPIPE 0x08 /* file handle refers to a pipe */ |
Definition at line 2535 of file win32.c.
Referenced by finish_overlapped(), rb_w32_pipe(), rb_w32_read(), rb_w32_write(), setup_overlapped(), and w32_wopen().
#define FSCTL_GET_REPARSE_POINT ((0x9<<16)|(42<<2)) |
Definition at line 4889 of file win32.c.
Referenced by reparse_symlink().
#define FTEXT 0x80 /* file handle is in text mode */ |
Definition at line 2539 of file win32.c.
Referenced by rb_w32_fd_is_text(), rb_w32_open_osfhandle(), rb_w32_read(), and rb_w32_write().
#define GET_FAMILY | ( | v | ) | ((int)(((v)>>4)&0xFFFF)) |
Definition at line 774 of file win32.c.
Referenced by rb_w32_getsockname(), and setfl().
#define GET_FLAGS | ( | v | ) | ((int)((v)&0xFFFF)) |
Definition at line 1923 of file win32.c.
Referenced by readdir_internal().
#define getenv | ( | name | ) | w32_getenv(name, cp) |
Definition at line 71 of file win32.c.
Referenced by env_assoc(), env_delete(), env_fetch(), env_has_key(), env_shift(), establishShell(), get_envparam_double(), get_envparam_size(), get_param(), getaddrinfo(), Init_Method(), main(), nl_langinfo_codeset(), rb_default_home_dir(), rb_env_path_tainted(), rb_f_getenv(), rb_home_dir_of(), st_init_table_with_size(), w32_aspawn_flags(), and w32_spawn().
#define hex2byte | ( | str | ) | ((isdigit(*(str)) ? *(str) - '0' : toupper(*(str)) - 'A' + 10) << 4 | (isdigit(*((str) + 1)) ? *((str) + 1) - '0' : toupper(*((str) + 1)) - 'A' + 10)) |
Referenced by str2guid().
#define InternalCmdsMax 8 |
Definition at line 943 of file win32.c.
Referenced by internal_match().
#define INVALID_SET_FILE_POINTER ((DWORD)-1) |
Referenced by setup_overlapped().
#define IO_REPARSE_TAG_SYMLINK 0xA000000CL |
Definition at line 4892 of file win32.c.
Referenced by rb_w32_read_reparse_point(), and reparse_symlink().
#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) |
Definition at line 2427 of file win32.c.
Referenced by _pioinfo().
#define IOINFO_L2E 5 |
Definition at line 2423 of file win32.c.
Referenced by _pioinfo().
#define isdirsep | ( | x | ) | ((x) == '/' || (x) == '\\') |
Definition at line 56 of file win32.c.
Referenced by is_command_com(), and open_dir_handle().
#define LK_ERR | ( | f, | |
i | |||
) |
Definition at line 327 of file win32.c.
Referenced by flock_winnt().
#define LK_LEN ULONG_MAX |
Definition at line 341 of file win32.c.
Referenced by flock_winnt(), rb_w32_close(), rb_w32_fclose(), and rb_w32_unwrap_io_handle().
#define MAKE_SOCKDATA | ( | af, | |
fl | |||
) | ((int)((((int)af)<<4)|((fl)&0xFFFF))) |
Definition at line 773 of file win32.c.
Referenced by rb_w32_socket(), setfl(), and socketpair().
#define map_errno rb_w32_map_errno |
Definition at line 293 of file win32.c.
Referenced by check_valid_dir(), clock_getres(), clock_gettime(), CreateChild(), do_select(), fchmod(), fcntl(), finish_overlapped_socket(), getifaddrs(), 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_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_set_nonblock(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_write(), recvmsg(), sendmsg(), setfl(), setup_overlapped(), socketpair_internal(), stat_by_find(), w32_getenv(), w32_readlink(), w32_symlink(), w32_truncate(), w32_wopen(), waitpid(), wlink(), wmkdir(), wrename(), wrmdir(), wunlink(), and wutime().
#define MAXCHILDNUM 256 /* max num of child processes */ |
#define mbstr_to_wstr rb_w32_mbstr_to_wstr |
Definition at line 1274 of file win32.c.
Referenced by rb_w32_write_console(), w32_aspawn_flags(), w32_lstati64(), w32_spawn(), w32_stati64(), and w32_truncate().
#define msghdr_to_wsamsg | ( | msg, | |
wsamsg | |||
) |
#define NTMALLOC 0x2 |
Definition at line 1534 of file win32.c.
Referenced by cmdglob(), insert(), and w32_cmdvector().
#define open_null | ( | fd | ) |
Referenced by init_stdhandle().
#define rb_acrt_lowio_lock_fh | ( | i | ) | EnterCriticalSection(&_pioinfo(i)->lock) |
Definition at line 2430 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), rb_w32_write(), and w32_wopen().
#define rb_acrt_lowio_unlock_fh | ( | i | ) | LeaveCriticalSection(&_pioinfo(i)->lock) |
Definition at line 2431 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), rb_w32_read(), rb_w32_write(), and w32_wopen().
#define rb_w32_stati64 | ( | path, | |
st | |||
) | w32_stati64(path, st, cp) |
Definition at line 70 of file win32.c.
Referenced by rb_w32_access(), and rb_w32_stat().
#define ROOT_GID 0 |
#define ROOT_UID 0 |
#define RUBY_CRITICAL if (0) {} else /* just remark */ |
Definition at line 130 of file win32.c.
Referenced by CreateChild(), do_select(), 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(), recvmsg(), sendmsg(), setfl(), socketpair_internal(), w32_wopen(), wmkdir(), wrename(), wrmdir(), wunlink(), and wutime().
#define set_env_val | ( | vname | ) |
Referenced by init_env().
#define set_new_std_fd | ( | newfd | ) | set_new_std_handle(newfd, (HANDLE)rb_w32_get_osfhandle(newfd)) |
Definition at line 6092 of file win32.c.
Referenced by rb_w32_dup2().
#define set_new_std_handle | ( | newfd, | |
handle | |||
) |
Definition at line 1924 of file win32.c.
Referenced by w32_wopendir().
#define STRNDUPV | ( | ptr, | |
v, | |||
src, | |||
len | |||
) | (((char *)memcpy(((ptr) = ALLOCV((v), (len) + 1)), (src), (len)))[len] = 0) |
Definition at line 1144 of file win32.c.
Referenced by w32_aspawn_flags(), and w32_spawn().
#define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) |
Definition at line 5037 of file win32.c.
Referenced by w32_symlink().
#define TO_SOCKET | ( | x | ) | _get_osfhandle(x) |
Definition at line 116 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_set_nonblock(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_unwrap_io_handle(), rb_w32_write(), recvmsg(), and sendmsg().
#define utf8_to_wstr | ( | str, | |
plen | |||
) | mbstr_to_wstr(CP_UTF8, str, -1, plen) |
Definition at line 1280 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_uunlink(), and rb_w32_uutime().
#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 1279 of file win32.c.
Referenced by rb_w32_conv_from_wstr().
#define wstr_to_mbstr rb_w32_wstr_to_mbstr |
Definition at line 1275 of file win32.c.
Referenced by w32_getenv(), and win32_direct_conv().
#define wstr_to_utf8 | ( | str, | |
plen | |||
) | wstr_to_mbstr(CP_UTF8, str, -1, plen) |
Definition at line 1281 of file win32.c.
Referenced by rb_w32_get_environ().
#define yield_once | ( | ) | Sleep(0) |
Definition at line 5909 of file win32.c.
Referenced by rb_w32_asynchronize().
#define yield_until | ( | condition | ) | do yield_once(); while (!(condition)) |
Definition at line 5910 of file win32.c.
Referenced by rb_w32_asynchronize().
typedef struct _NtCmdLineElement NtCmdLineElement |
anonymous enum |
|
inlinestatic |
Definition at line 2523 of file win32.c.
References IOINFO_ARRAY_ELTS, and IOINFO_L2E.
|
static |
Definition at line 5927 of file win32.c.
References asynchronous_arg_t::argc, asynchronous_arg_t::argv, errno, asynchronous_arg_t::errnum, asynchronous_arg_t::func, asynchronous_arg_t::self, and asynchronous_arg_t::stackaddr.
Referenced by rb_w32_asynchronize().
|
static |
Definition at line 6129 of file win32.c.
References check_valid_dir(), errno, FALSE, and TRUE.
Referenced by w32_wopen().
|
static |
Definition at line 1149 of file win32.c.
References errno, and P_NOWAIT.
Referenced by w32_aspawn_flags(), and w32_spawn().
|
static |
Definition at line 5468 of file win32.c.
References errno, L, map_errno, open_dir_handle(), and PATH_MAX.
Referenced by check_if_wdir(), winnt_lstat(), and winnt_stat().
|
static |
Definition at line 1163 of file win32.c.
References CloseChildHandle(), ChildRecord::hProcess, and ChildRecord::pid.
Referenced by w32_aspawn_flags(), and w32_spawn().
int chown | ( | const char * | path, |
int | owner, | ||
int | group | ||
) |
Definition at line 4698 of file win32.c.
Referenced by argf_next_argv(), chown_internal(), get_device_once(), and rb_file_chown().
Definition at line 4630 of file win32.c.
References CLOCK_MONOTONIC, CLOCK_REALTIME, errno, map_errno, timespec::tv_nsec, and timespec::tv_sec.
Referenced by rb_clock_getres().
Definition at line 4592 of file win32.c.
References CLOCK_MONOTONIC, CLOCK_REALTIME, count, errno, gettimeofday(), map_errno, NULL, timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.
Referenced by datetime_s_now(), getclockofday(), getrusage_time(), rb_clock_gettime(), rb_timespec_now(), and timeofday().
|
static |
Definition at line 914 of file win32.c.
References ChildRecord::hProcess, NULL, and ChildRecord::pid.
Referenced by child_result(), and poll_child_status().
|
static |
Definition at line 1559 of file win32.c.
References buf, _NtCmdLineElement::flags, free(), insert(), last, _NtCmdLineElement::len, malloc, NTMALLOC, PATH_MAX, ruby_brace_glob_with_enc(), _NtCmdLineElement::str, strlcpy(), and translate_char().
Referenced by w32_cmdvector().
Definition at line 3040 of file win32.c.
References rb_w32_check_interrupt(), timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 6470 of file win32.c.
Referenced by constat_handle().
|
static |
Definition at line 6641 of file win32.c.
References constat::attr, constat_attr(), count, FALSE, constat::reverse, constat::saved, constat::seq, constat::state, TRUE, and constat::vt100.
Referenced by constat_parse().
|
static |
Definition at line 6545 of file win32.c.
References constat::attr, COMMON_LVB_UNDERSCORE, constat_attr_color_reverse, and constat::reverse.
Referenced by constat_apply().
|
static |
Definition at line 718 of file win32.c.
References conlist_disabled, key, st_data_t, st_delete, val, and xfree().
Referenced by rb_w32_close(), and rb_w32_unwrap_io_handle().
|
static |
Definition at line 6491 of file win32.c.
References ALLOC, constat::attr, conlist_disabled, console_emulator_p(), constat_init, NULL, constat::reverse, constat::saved, st_data_t, st_init_numtable, st_insert, st_lookup, constat::state, and constat::vt100.
Referenced by rb_w32_write_console().
Definition at line 6766 of file win32.c.
References constat_apply(), constat_esc, constat_init, constat_seq, len, numberof, constat::seq, constat::state, and constat::vt100.
Referenced by rb_w32_write_console().
|
static |
Definition at line 6525 of file win32.c.
References conlist_disabled, constat_init, st_data_t, st_lookup, constat::state, and constat::vt100.
Referenced by rb_w32_read().
|
static |
Definition at line 2880 of file win32.c.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 1182 of file win32.c.
References errno, FindFreeChildSlot(), ChildRecord::hProcess, map_errno, NULL, ChildRecord::pid, RUBY_CRITICAL, and TRUE.
Referenced by w32_aspawn_flags(), and w32_spawn().
|
static |
Definition at line 2986 of file win32.c.
References errno, map_errno, NtSocketsInitialized, rb_w32_sleep(), RUBY_CRITICAL, select(), select_mutex, StartSockets(), timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
|
static |
|
static |
Definition at line 729 of file win32.c.
References conlist_disabled, free(), free_conlist(), NtSocketsInitialized, NULL, select_mutex, st_foreach, st_free_table, and uenvarea.
Referenced by rb_w32_sysinit().
|
static |
int fchmod | ( | int | fd, |
int | mode | ||
) |
Definition at line 7481 of file win32.c.
References errno, get_proc_address(), if(), map_errno, and NULL.
Referenced by argf_next_argv(), and rb_file_chmod().
int fcntl | ( | int | fd, |
int | cmd, | ||
... | |||
) |
Definition at line 4296 of file win32.c.
References _osfile, dupfd(), errno, F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD, F_SETFD, F_SETFL, FD_CLOEXEC, FNOINHERIT, is_socket(), L, map_errno, setfl(), SIGNED_VALUE, and TO_SOCKET.
Referenced by dup2(), fd_clear_cloexec(), fd_get_cloexec(), fd_set_cloexec(), make_fd_nonblock(), open_load_file(), rb_cloexec_fcntl_dupfd(), rb_fix_detect_o_cloexec(), rb_io_initialize(), rb_io_isatty(), rb_io_set_nonblock(), rb_maygvl_fd_fix_cloexec(), rb_pipe(), and rsock_detect_cloexec().
Definition at line 5419 of file win32.c.
References L, rb_w32_reparse_symlink_p(), S_IFLNK, and S_IWUSR.
Referenced by stat_by_find(), winnt_lstat(), and winnt_stat().
|
static |
Definition at line 5877 of file win32.c.
Referenced by rb_w32_times().
Definition at line 4556 of file win32.c.
References lt, timeval::tv_sec, and timeval::tv_usec.
Referenced by filetime_to_unixtime(), and gettimeofday().
|
static |
Definition at line 5407 of file win32.c.
References filetime_to_timeval(), and timeval::tv_sec.
Referenced by rb_w32_fstat(), stat_by_find(), stati64_handle(), and winnt_lstat().
|
static |
Definition at line 888 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
|
static |
Definition at line 901 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
Referenced by waitpid().
|
static |
Definition at line 924 of file win32.c.
References END_FOREACH_CHILD, FOREACH_CHILD, and NULL.
Referenced by CreateChild().
|
static |
Definition at line 6889 of file win32.c.
References _osfhnd, _osfile, FDEV, FPIPE, and size.
Referenced by rb_w32_read(), and rb_w32_write().
|
static |
Definition at line 3402 of file win32.c.
References err, errno, map_errno, rb_w32_wait_events_blocking(), result, RUBY_CRITICAL, size, and TRUE.
Referenced by overlapped_socket_io(), recvmsg(), and sendmsg().
int flock | ( | int | fd, |
int | oper | ||
) |
Definition at line 384 of file win32.c.
References flock_winnt(), NULL, and rb_w32_asynchronize().
Referenced by ioctl_narg_len(), and rb_thread_flock().
Definition at line 710 of file win32.c.
References ST_DELETE, and xfree().
Referenced by exit_handler().
void freeifaddrs | ( | struct ifaddrs * | ifp | ) |
Definition at line 4190 of file win32.c.
References ifaddrs::ifa_addr, ifaddrs::ifa_name, ifaddrs::ifa_next, and ruby_xfree().
Referenced by sock_s_unpack_sockaddr_in().
Definition at line 5156 of file win32.c.
References ASSUME, and open_special().
Referenced by wrename().
Definition at line 1888 of file win32.c.
Referenced by get_final_path_unknown().
Definition at line 1894 of file win32.c.
References func, get_final_path, get_final_path_fail(), get_proc_address(), and NULL.
Definition at line 475 of file win32.c.
References NULL.
Referenced by fchmod(), get_final_path_unknown(), get_special_folder(), getifaddrs(), rb_w32_getppid(), rb_w32_inet_ntop(), rb_w32_inet_pton(), and w32_symlink().
|
static |
Definition at line 434 of file win32.c.
References f, FALSE, func, get_proc_address(), and NULL.
Referenced by init_env(), rb_w32_home_dir(), rb_w32_special_folder(), and rb_w32_system_tmpdir().
|
static |
Definition at line 301 of file win32.c.
References osver, and rb_w32_osid().
Referenced by rb_w32_sysinit().
|
static |
rb_gid_t getegid | ( | void | ) |
Definition at line 2730 of file win32.c.
References ROOT_GID.
Referenced by eaccess(), init_ids(), InitVM_process(), p_gid_change_privilege(), p_gid_exchange(), p_gid_have_saved_id(), p_gid_switch(), proc_getegid(), proc_getgid(), rb_exec_async_signal_safe(), and rb_group_member().
rb_uid_t geteuid | ( | void | ) |
Definition at line 2716 of file win32.c.
References ROOT_UID.
Referenced by eaccess(), init_ids(), InitVM_process(), p_gid_change_privilege(), p_uid_change_privilege(), p_uid_exchange(), p_uid_have_saved_id(), p_uid_switch(), proc_geteuid(), proc_getuid(), rb_exec_async_signal_safe(), 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 2723 of file win32.c.
References ROOT_GID.
Referenced by eaccess(), etc_getgrgid(), get_device_once(), init_ids(), p_gid_change_privilege(), p_gid_exchange(), p_gid_have_saved_id(), p_gid_switch(), proc_getegid(), proc_getgid(), rb_exec_async_signal_safe(), rb_group_member(), and rb_setegid_core().
int getifaddrs | ( | struct ifaddrs ** | ifap | ) |
Definition at line 4103 of file win32.c.
References added, AF_UNSPEC, errno, get_proc_address(), ifaddrs::ifa_addr, ifaddrs::ifa_flags, ifaddrs::ifa_name, ifaddrs::ifa_next, IFNAMSIZ, map_errno, memcpy, name, NULL, pConvertInterfaceGuidToLuid, pConvertInterfaceLuidToNameA, ruby_strdup(), ruby_xcalloc(), ruby_xfree(), ruby_xmalloc(), size, str2guid(), and ULONG().
Referenced by sock_s_unpack_sockaddr_in().
char* getlogin | ( | void | ) |
Definition at line 867 of file win32.c.
References NTLoginName.
Referenced by establishShell(), etc_getlogin(), rb_default_home_dir(), and rb_home_dir_of().
struct netent* getnetbyaddr | ( | long | net, |
int | type | ||
) |
struct netent* getnetbyname | ( | const char * | name | ) |
Definition at line 4580 of file win32.c.
References filetime_to_timeval().
Referenced by clock_gettime(), datetime_s_now(), fill_random_seed(), getclockofday(), rb_clock_gettime(), rb_timespec_now(), rb_w32_select_with_thread(), and timeofday().
rb_uid_t getuid | ( | void | ) |
Definition at line 2709 of file win32.c.
References ROOT_UID.
Referenced by argf_next_argv(), chfunc(), eaccess(), etc_getpwuid(), get_device_once(), init_ids(), p_uid_change_privilege(), p_uid_exchange(), p_uid_have_saved_id(), p_uid_switch(), proc_geteuid(), proc_getuid(), rb_exec_async_signal_safe(), rb_file_rowned_p(), rb_seteuid_core(), rb_stat_R(), rb_stat_rowned(), rb_stat_W(), and rb_stat_X().
struct tm* gmtime_r | ( | const time_t * | tp, |
struct tm * | rp | ||
) |
Definition at line 7681 of file win32.c.
References errno, NULL, systemtime_to_tm(), and unixtime_to_systemtime().
|
static |
|
static |
Definition at line 596 of file win32.c.
References CSIDL_PROFILE, env, ENV_MAX, eq(), f, FALSE, func, get_special_folder(), init_stdhandle(), L, len, name, NTLoginName, NULL, numberof, rb_sprintf(), rb_str_cat(), rb_str_vcatf(), rb_w32_system_tmpdir(), rb_w32_wstr_to_mbstr(), rb_write_error2(), regulate_path(), RSTRING_LEN, RSTRING_PTR, set_env_val, TRUE, and val.
Referenced by rb_w32_sysinit().
|
static |
Definition at line 2595 of file win32.c.
References FILE_FILENO, fileno, NULL, O_BINARY, and open_null.
Referenced by init_env(), and rb_w32_sysinit().
Definition at line 1539 of file win32.c.
References _NtCmdLineElement::flags, _NtCmdLineElement::len, malloc, MEMZERO, _NtCmdLineElement::next, NTMALLOC, _NtCmdLineElement::str, strdup, and strlen().
Referenced by cmdglob().
|
static |
Definition at line 1049 of file win32.c.
References internal_match(), and szInternalCmds.
Referenced by is_command_com(), is_internal_cmd(), and w32_aspawn_flags().
Definition at line 998 of file win32.c.
References InternalCmdsMax.
Referenced by internal_cmd_match().
int ioctl | ( | int | i, |
int | u, | ||
... | |||
) |
Definition at line 2755 of file win32.c.
References errno.
Referenced by chfunc(), get_device_once(), io_nread(), and sock_s_unpack_sockaddr_in().
|
static |
Definition at line 1262 of file win32.c.
References len, strcasecmp, and strlen().
Referenced by w32_aspawn_flags(), and w32_spawn().
|
static |
Definition at line 1005 of file win32.c.
References internal_cmd_match(), isdirsep, strcasecmp, and strlen().
Referenced by w32_aspawn_flags(), and w32_spawn().
|
static |
Definition at line 2941 of file win32.c.
References RUBY_CRITICAL.
Referenced by rb_w32_io_cancelable_p(), rb_w32_read(), and rb_w32_select_with_thread().
|
static |
Definition at line 1020 of file win32.c.
References internal_cmd_match().
Referenced by w32_spawn().
|
static |
Definition at line 2979 of file win32.c.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2902 of file win32.c.
References is_socket().
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2909 of file win32.c.
References RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread(), and rb_w32_set_nonblock().
|
static |
Definition at line 2956 of file win32.c.
References RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2922 of file win32.c.
References NULL, and RUBY_CRITICAL.
Referenced by rb_w32_select_with_thread().
|
static |
Definition at line 2625 of file win32.c.
References FALSE, NULL, socklist_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(), rb_w32_set_nonblock(), rb_w32_unwrap_io_handle(), and rb_w32_write().
|
static |
|
static |
Definition at line 1071 of file win32.c.
References len, memcpy, and translate_char().
Referenced by w32_aspawn_flags().
int kill | ( | int | pid, |
int | sig | ||
) |
Definition at line 4724 of file win32.c.
References EPERM, err, errno, FALSE, FindChildSlot(), ChildRecord::hProcess, map_errno, NULL, RUBY_CRITICAL, SIGINT, and SIGKILL.
Referenced by raise_from_check(), rb_f_kill(), and ruby_kill().
int lchown | ( | const char * | path, |
int | owner, | ||
int | group | ||
) |
Definition at line 4711 of file win32.c.
Referenced by rb_file_chown().
Definition at line 4866 of file win32.c.
References filecp_to_wstr, free(), NULL, and wlink().
Referenced by exec_end_procs_chain(), r_object0(), rb_mark_end_proc(), rb_set_end_proc(), realpath_rec(), and syserr_fail2_in().
struct tm* localtime_r | ( | const time_t * | tp, |
struct tm * | rp | ||
) |
Definition at line 7705 of file win32.c.
References errno, NULL, systemtime_to_localtime(), systemtime_to_tm(), and unixtime_to_systemtime().
|
static |
Definition at line 2140 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 5681 of file win32.c.
References errno, isUNCRoot(), len, and NULL.
Referenced by wlstati64(), and wstati64().
|
static |
Definition at line 1932 of file win32.c.
References errno, get_final_path, isdirsep, L, len, map_errno, MEMCPY, open_special(), PATH_MAX, and rb_strlen_lit.
Referenced by check_valid_dir(), and w32_wopendir().
|
static |
Definition at line 3739 of file win32.c.
References AF_UNSPEC, free(), malloc, and NULL.
Referenced by rb_w32_socket(), and socketpair_internal().
Definition at line 1908 of file win32.c.
References NULL.
Referenced by get_attr_vsn(), open_dir_handle(), reparse_symlink(), winnt_stat(), wrename(), and wutime().
|
static |
Definition at line 3454 of file win32.c.
References buf, err, errno, FALSE, finish_overlapped_socket(), GET_FLAGS, len, map_errno, NtSocketsInitialized, NULL, O_NONBLOCK, RUBY_CRITICAL, size, socklist_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 5536 of file win32.c.
References L.
Referenced by rb_file_expand_path_internal(), winnt_lstat(), and winnt_stat().
|
static |
Definition at line 4404 of file win32.c.
References CloseChildHandle(), err, errno, ChildRecord::hProcess, map_errno, numberof, ChildRecord::pid, rb_w32_wait_events_blocking(), and SIGINT.
Referenced by waitpid().
|
static |
Definition at line 5801 of file win32.c.
References errno, map_errno, SEEK_CUR, and SEEK_SET.
Referenced by rb_w32_ftruncate(), and w32_truncate().
int WSAAPI rb_w32_accept | ( | int | s, |
struct sockaddr * | addr, | ||
int * | addrlen | ||
) |
Definition at line 3221 of file win32.c.
References errno, map_errno, NtSocketsInitialized, O_BINARY, rb_w32_open_osfhandle(), RUBY_CRITICAL, socklist_insert(), StartSockets(), and TO_SOCKET.
int rb_w32_access | ( | const char * | path, |
int | mode | ||
) |
Definition at line 5771 of file win32.c.
References errno, and rb_w32_stati64.
Definition at line 1509 of file win32.c.
References rb_w32_aspawn_flags().
Definition at line 1494 of file win32.c.
References filecp, and w32_aspawn_flags().
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 5939 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, 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().
int WSAAPI rb_w32_bind | ( | int | s, |
const struct sockaddr * | addr, | ||
int | addrlen | ||
) |
Definition at line 3251 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_check_interrupt | ( | void * | ) |
Referenced by compare(), and rb_w32_select_with_thread().
int rb_w32_close | ( | int | fd | ) |
Definition at line 6834 of file win32.c.
References _set_osfhnd, constat_delete(), errno, is_socket(), LK_LEN, map_errno, NULL, socklist_delete(), and TO_SOCKET.
Referenced by rb_w32_pipe(), and socketpair().
void rb_w32_closedir | ( | DIR * | dirp | ) |
Definition at line 2340 of file win32.c.
References DIR::bits, direct::d_altname, direct::d_name, DIR::dirstr, free(), and DIR::start.
Referenced by w32_wopendir().
int WSAAPI rb_w32_connect | ( | int | s, |
const struct sockaddr * | addr, | ||
int | addrlen | ||
) |
Definition at line 3270 of file win32.c.
References EINPROGRESS, err, errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
VALUE rb_w32_conv_from_wchar | ( | const WCHAR * | wstr, |
rb_encoding * | enc | ||
) |
Definition at line 2173 of file win32.c.
References ECONV_UNDEF_REPLACE, ENCINDEX_ASCII, ENCINDEX_US_ASCII, ENCINDEX_UTF_16LE, ENCINDEX_UTF_8, len, NULL, Qnil, rb_enc_from_index(), rb_enc_str_new(), rb_enc_to_index(), rb_long2int, rb_str_conv_enc_opts(), and RSTRING_PTR.
Referenced by etc_systmpdir(), join_path(), 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 2204 of file win32.c.
References len, malloc, memcpy, NIL_P, rb_w32_conv_from_wchar(), RSTRING_LEN, RSTRING_PTR, and wstr_to_filecp.
Referenced by ruby_direct_conv().
int rb_w32_dup2 | ( | int | oldfd, |
int | newfd | ||
) |
Definition at line 6096 of file win32.c.
References dup2(), and set_new_std_fd.
int rb_w32_fclose | ( | FILE * | fp | ) |
Definition at line 6351 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 | ||
) |
void rb_w32_fd_dup | ( | rb_fdset_t * | dst, |
const rb_fdset_t * | src | ||
) |
char rb_w32_fd_is_text | ( | int | fd | ) |
void rb_w32_fdclr | ( | int | fd, |
fd_set * | set | ||
) |
int rb_w32_fdisset | ( | int | fd, |
fd_set * | set | ||
) |
Definition at line 2789 of file win32.c.
References RUBY_CRITICAL, and TO_SOCKET.
void rb_w32_fdset | ( | int | fd, |
fd_set * | set | ||
) |
void rb_w32_free_environ | ( | char ** | env | ) |
int rb_w32_fstat | ( | int | fd, |
struct stat * | st | ||
) |
int rb_w32_fstati64 | ( | int | fd, |
struct stati64 * | st | ||
) |
Definition at line 5368 of file win32.c.
References COPY_STAT, fstat, L, NULL, stat, stati64_handle(), and stati64_set_inode_handle().
int rb_w32_ftruncate | ( | int | fd, |
off_t | length | ||
) |
Definition at line 5866 of file win32.c.
References rb_chsize().
char** rb_w32_get_environ | ( | void | ) |
SOCKET rb_w32_get_osfhandle | ( | int | fh | ) |
Definition at line 1064 of file win32.c.
Referenced by console_beep(), console_echo_p(), rb_io_addstr(), rb_io_set_sync(), rb_stat(), and rb_thread_priority_set().
char* rb_w32_getcwd | ( | char * | buffer, |
int | size | ||
) |
char* rb_w32_getenv | ( | const char * | name | ) |
Definition at line 5149 of file win32.c.
References w32_getenv().
struct hostent* WSAAPI rb_w32_gethostbyaddr | ( | const char * | addr, |
int | len, | ||
int | type | ||
) |
Definition at line 3820 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
struct hostent* WSAAPI rb_w32_gethostbyname | ( | const char * | name | ) |
Definition at line 3838 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_gethostname | ( | char * | name, |
int | len | ||
) |
Definition at line 3856 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_getpeername | ( | int | s, |
struct sockaddr * | addr, | ||
int * | addrlen | ||
) |
Definition at line 3294 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
rb_pid_t rb_w32_getpid | ( | void | ) |
Definition at line 6049 of file win32.c.
Referenced by rb_w32_pipe().
rb_pid_t rb_w32_getppid | ( | void | ) |
Definition at line 6057 of file win32.c.
References get_proc_address(), len, NULL, STATIC_ASSERT(), and ULONG().
struct protoent* WSAAPI rb_w32_getprotobyname | ( | const char * | name | ) |
Definition at line 3874 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
struct protoent* WSAAPI rb_w32_getprotobynumber | ( | int | num | ) |
Definition at line 3892 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
Definition at line 3910 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
struct servent* WSAAPI rb_w32_getservbyport | ( | int | port, |
const char * | proto | ||
) |
Definition at line 3928 of file win32.c.
References errno, map_errno, NtSocketsInitialized, NULL, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_getsockname | ( | int | fd, |
struct sockaddr * | addr, | ||
int * | addrlen | ||
) |
Definition at line 3312 of file win32.c.
References errno, GET_FAMILY, map_errno, NtSocketsInitialized, RUBY_CRITICAL, socklist_lookup(), StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_getsockopt | ( | int | s, |
int | level, | ||
int | optname, | ||
char * | optval, | ||
int * | optlen | ||
) |
Definition at line 3345 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
WCHAR* rb_w32_home_dir | ( | void | ) |
Definition at line 540 of file win32.c.
References ALLOC_N, CSIDL_PROFILE, get_special_folder(), L, len, NULL, REALLOC_N, regulate_path(), and xfree().
Referenced by rb_default_home_dir(), and rb_file_expand_path_internal().
int WSAAPI rb_w32_inet_pton | ( | int | af, |
const char * | src, | ||
void * | dst | ||
) |
Definition at line 7585 of file win32.c.
References get_proc_address(), and NULL.
int rb_w32_io_cancelable_p | ( | int | fd | ) |
Definition at line 2546 of file win32.c.
References is_console(), is_socket(), and TO_SOCKET.
int WSAAPI rb_w32_ioctlsocket | ( | int | s, |
long | cmd, | ||
u_long * | argp | ||
) |
Definition at line 3363 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_is_socket | ( | int | fd | ) |
Definition at line 2635 of file win32.c.
References is_socket(), and TO_SOCKET.
int WSAAPI rb_w32_listen | ( | int | s, |
int | backlog | ||
) |
Definition at line 3381 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_lstati64 | ( | const char * | path, |
struct stati64 * | st | ||
) |
Definition at line 5750 of file win32.c.
References filecp, and w32_lstati64().
int rb_w32_map_errno | ( | DWORD | winerr | ) |
Definition at line 273 of file win32.c.
References errmap, and winerr.
Referenced by join_path(), rb_readlink(), and sock_s_unpack_sockaddr_in().
WCHAR* rb_w32_mbstr_to_wstr | ( | UINT | cp, |
const char * | str, | ||
int | clen, | ||
long * | plen | ||
) |
Definition at line 2094 of file win32.c.
References len, malloc, and NULL.
Referenced by dln_load(), and join_path().
int rb_w32_mkdir | ( | const char * | path, |
int | mode | ||
) |
int rb_w32_open | ( | const char * | file, |
int | oflag, | ||
... | |||
) |
Definition at line 6143 of file win32.c.
References filecp_to_wstr, free(), NULL, and w32_wopen().
|
static |
Definition at line 2553 of file win32.c.
References _set_osfhnd, _set_osflags, errno, FAPPEND, FDEV, FNOINHERIT, FOPEN, FTEXT, L, NULL, rb_acrt_lowio_lock_fh, and rb_acrt_lowio_unlock_fh.
Referenced by rb_w32_accept(), rb_w32_socket(), rb_w32_wrap_io_handle(), and socketpair().
Definition at line 2110 of file win32.c.
References filecp_to_wstr, free(), NULL, and w32_wopendir().
int rb_w32_pipe | ( | int | fds[2] | ) |
Definition at line 6374 of file win32.c.
References _set_osfhnd, _set_osflags, err, errno, FALSE, FNOINHERIT, FOPEN, FPIPE, map_errno, memcpy, name, NULL, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_close(), rb_w32_getpid(), RUBY_CRITICAL, and snprintf.
ssize_t rb_w32_read | ( | int | fd, |
void * | buf, | ||
size_t | size | ||
) |
Definition at line 6905 of file win32.c.
References _osfhnd, _osfile, _set_osflags, constat_reset(), err, errno, EWOULDBLOCK, FALSE, FEOFLAG, finish_overlapped(), FPIPE, FTEXT, is_console(), is_socket(), len, map_errno, NULL, osver, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_recv(), rb_w32_wait_events_blocking(), setup_overlapped(), size, constat::state, TO_SOCKET, TRUE, and wait().
int rb_w32_read_reparse_point | ( | const WCHAR * | path, |
rb_w32_reparse_buffer_t * | rp, | ||
size_t | bufsize, | ||
WCHAR ** | result, | ||
DWORD * | len | ||
) |
Definition at line 4947 of file win32.c.
References IO_REPARSE_TAG_SYMLINK, L, memcmp(), rb_w32_reparse_buffer_t::MountPointReparseBuffer, name, rb_strlen_lit, reparse_symlink(), rb_w32_reparse_buffer_t::ReparseTag, rb_w32_reparse_buffer_t::SymbolicLinkReparseBuffer, and translate_wchar().
Referenced by rb_readlink(), rb_w32_reparse_symlink_p(), and w32_readlink().
struct direct* rb_w32_readdir | ( | DIR * | dirp, |
rb_encoding * | enc | ||
) |
Definition at line 2281 of file win32.c.
References ENCINDEX_ASCII, ENCINDEX_UTF_8, filecp, rb_enc_to_index(), readdir_internal(), ruby_direct_conv(), and win32_direct_conv().
int WSAAPI rb_w32_recv | ( | int | fd, |
char * | buf, | ||
int | len, | ||
int | flags | ||
) |
Definition at line 3529 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 3536 of file win32.c.
References overlapped_socket_io(), and TRUE.
int rb_w32_reparse_symlink_p | ( | const WCHAR * | path | ) |
Definition at line 4922 of file win32.c.
References ALLOCV, ALLOCV_END, FALSE, len, rb_w32_read_reparse_point(), rb_w32_reparse_buffer_size, size, and TRUE.
Referenced by fileattr_to_unixmode(), join_path(), w32_wopendir(), and winnt_lstat().
void rb_w32_rewinddir | ( | DIR * | dirp | ) |
Definition at line 2328 of file win32.c.
References DIR::curr, DIR::loc, and DIR::start.
Referenced by rb_w32_seekdir().
int rb_w32_rmdir | ( | const char * | path | ) |
void rb_w32_seekdir | ( | DIR * | dirp, |
long | loc | ||
) |
Definition at line 2313 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 3197 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 3060 of file win32.c.
References compare(), copy_fd(), do_select(), errno, extract_fd(), gettimeofday(), if(), is_console(), is_invalid_handle(), is_not_socket(), is_pipe(), is_readable_console(), is_readable_pipe(), NULL, rb_fd_init, rb_fd_term, rb_w32_check_interrupt(), rb_w32_time_subtract(), timeval::tv_sec, timeval::tv_usec, and wait().
Referenced by rb_w32_select().
int WSAAPI rb_w32_send | ( | int | fd, |
const char * | buf, | ||
int | len, | ||
int | flags | ||
) |
Definition at line 3544 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 3551 of file win32.c.
References FALSE, and overlapped_socket_io().
int rb_w32_set_nonblock | ( | int | fd | ) |
Definition at line 4373 of file win32.c.
References errno, is_pipe(), is_socket(), map_errno, NULL, O_NONBLOCK, setfl(), and TO_SOCKET.
Referenced by rb_io_set_nonblock().
int WSAAPI rb_w32_setsockopt | ( | int | s, |
int | level, | ||
int | optname, | ||
const char * | optval, | ||
int | optlen | ||
) |
Definition at line 3705 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_shutdown | ( | int | s, |
int | how | ||
) |
Definition at line 3723 of file win32.c.
References errno, map_errno, NtSocketsInitialized, RUBY_CRITICAL, shutdown, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_socket | ( | int | af, |
int | type, | ||
int | protocol | ||
) |
Definition at line 3791 of file win32.c.
References errno, MAKE_SOCKDATA, map_errno, NtSocketsInitialized, O_BINARY, open_ifs_socket(), rb_w32_open_osfhandle(), RUBY_CRITICAL, socklist_insert(), and StartSockets().
Definition at line 1409 of file win32.c.
References filecp, and w32_spawn().
VALUE rb_w32_special_folder | ( | int | type | ) |
Definition at line 499 of file win32.c.
References get_special_folder(), numberof, PATH_MAX, Qnil, rb_filesystem_encoding(), rb_w32_conv_from_wchar(), and regulate_path().
Referenced by etc_sysconfdir().
Definition at line 5624 of file win32.c.
References COPY_STAT, and rb_w32_stati64.
int rb_w32_stati64 | ( | const char * | path, |
struct stati64 * | st | ||
) |
Definition at line 5722 of file win32.c.
References filecp, and w32_stati64().
char* rb_w32_strerror | ( | int | e | ) |
Definition at line 2650 of file win32.c.
References EADDRINUSE, err, errmap, EWOULDBLOCK, memmove(), NULL, strerror(), strlcpy(), strlen(), sys_nerr, and winerr.
void rb_w32_sysinit | ( | int * | argc, |
char *** | argv | ||
) |
Definition at line 831 of file win32.c.
References exit_handler(), get_version(), init_env(), init_stdhandle(), OnigEncodingUTF_8, StartSockets(), and w32_cmdvector().
Referenced by ruby_sysinit().
UINT rb_w32_system_tmpdir | ( | WCHAR * | path, |
UINT | len | ||
) |
Definition at line 515 of file win32.c.
References CSIDL_LOCAL_APPDATA, get_special_folder(), L, memcpy, numberof, and translate_wchar().
Referenced by etc_systmpdir(), and init_env().
Definition at line 3021 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select_with_thread().
int rb_w32_times | ( | struct tms * | tmbuf | ) |
Definition at line 5888 of file win32.c.
References filetime_to_clock(), tms::tms_cstime, tms::tms_cutime, tms::tms_stime, and tms::tms_utime.
Definition at line 5859 of file win32.c.
References filecp, and w32_truncate().
int rb_w32_uaccess | ( | const char * | path, |
int | mode | ||
) |
Definition at line 5786 of file win32.c.
References errno, and rb_w32_ustati64().
Definition at line 1516 of file win32.c.
References rb_w32_uaspawn_flags().
Referenced by proc_exec_cmd().
Definition at line 1502 of file win32.c.
References w32_aspawn_flags().
Referenced by rb_w32_uaspawn().
int rb_w32_uchdir | ( | const char * | path | ) |
Definition at line 7298 of file win32.c.
References free(), NULL, and utf8_to_wstr.
int rb_w32_uchmod | ( | const char * | path, |
int | mode | ||
) |
Definition at line 7467 of file win32.c.
References free(), NULL, and utf8_to_wstr.
int rb_w32_uchown | ( | const char * | path, |
int | owner, | ||
int | group | ||
) |
char* rb_w32_ugetenv | ( | const char * | name | ) |
Definition at line 5142 of file win32.c.
References w32_getenv().
int rb_w32_ulchown | ( | const char * | path, |
int | owner, | ||
int | group | ||
) |
int rb_w32_ulstati64 | ( | const char * | path, |
struct stati64 * | st | ||
) |
Definition at line 5743 of file win32.c.
References w32_lstati64().
int rb_w32_umkdir | ( | const char * | path, |
int | mode | ||
) |
int rb_w32_unlink | ( | const char * | path | ) |
int rb_w32_unwrap_io_handle | ( | int | fd | ) |
Definition at line 7751 of file win32.c.
References _set_osfhnd, constat_delete(), is_socket(), LK_LEN, NULL, socklist_delete(), and TO_SOCKET.
int rb_w32_uopen | ( | const char * | file, |
int | oflag, | ||
... | |||
) |
Definition at line 6109 of file win32.c.
References free(), NULL, utf8_to_wstr, and w32_wopen().
Definition at line 2123 of file win32.c.
References free(), NULL, utf8_to_wstr, and w32_wopendir().
ssize_t rb_w32_ureadlink | ( | const char * | path, |
char * | buf, | ||
size_t | bufsize | ||
) |
Definition at line 5024 of file win32.c.
References w32_readlink().
int rb_w32_urmdir | ( | const char * | path | ) |
int rb_w32_ustati64 | ( | const char * | path, |
struct stati64 * | st | ||
) |
Definition at line 5087 of file win32.c.
References w32_symlink().
Definition at line 5852 of file win32.c.
References w32_truncate().
int rb_w32_uunlink | ( | const char * | path | ) |
int rb_w32_wait_events | ( | HANDLE * | events, |
int | num, | ||
DWORD | timeout | ||
) |
Referenced by mustbe_callable().
int rb_w32_wopen | ( | const WCHAR * | file, |
int | oflag, | ||
... | |||
) |
Definition at line 6163 of file win32.c.
References w32_wopen().
int rb_w32_wrap_io_handle | ( | HANDLE | h, |
int | flags | ||
) |
Definition at line 7729 of file win32.c.
References errno, f, len, O_NONBLOCK, rb_w32_open_osfhandle(), and socklist_insert().
ssize_t rb_w32_write | ( | int | fd, |
const void * | buf, | ||
size_t | size | ||
) |
Definition at line 7044 of file win32.c.
References _osfhnd, _osfile, err, errno, EWOULDBLOCK, FDEV, FEOFLAG, fileno, finish_overlapped(), FPIPE, FTEXT, is_socket(), len, map_errno, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_send(), rb_w32_wait_events_blocking(), setup_overlapped(), size, TO_SOCKET, TRUE, and wait().
long rb_w32_write_console | ( | uintptr_t | strarg, |
int | fd | ||
) |
Definition at line 7146 of file win32.c.
References _osfhnd, constat_handle(), constat_parse(), ECONV_INVALID_REPLACE, ECONV_UNDEF_REPLACE, ENCINDEX_ASCII, ENCINDEX_US_ASCII, ENCINDEX_UTF_16LE, ENCINDEX_UTF_8, ENCODING_GET, free(), L, len, mbstr_to_wstr, NULL, Qnil, rb_econv_has_convpath_p(), rb_enc_from_index(), rb_enc_name, RB_GC_GUARD, rb_str_conv_enc_opts(), RSTRING_LEN, and RSTRING_PTR.
Referenced by io_fwrite(), and rb_write_error_str().
char* rb_w32_wstr_to_mbstr | ( | UINT | cp, |
const WCHAR * | wstr, | ||
int | clen, | ||
long * | plen | ||
) |
Definition at line 2078 of file win32.c.
References len, malloc, and NULL.
Referenced by init_env(), and w32_cmdvector().
|
static |
Definition at line 2233 of file win32.c.
References BitOfIsDir, BitOfIsRep, DIR::bits, DIR::curr, direct::d_altlen, direct::d_altname, direct::d_ino, direct::d_name, direct::d_type, DIR::dirstr, DT_DIR, DT_LNK, DT_REG, free(), GetBit, DIR::loc, move_to_next_entry(), and NULL.
Referenced by rb_w32_readdir().
ssize_t readlink | ( | const char * | path, |
char * | buf, | ||
size_t | bufsize | ||
) |
Definition at line 5031 of file win32.c.
References filecp, and w32_readlink().
Referenced by stub_options().
int recvmsg | ( | int | fd, |
struct msghdr * | msg, | ||
int | flags | ||
) |
Definition at line 3595 of file win32.c.
References WSAMSG::dwFlags, errno, FALSE, finish_overlapped_socket(), GET_FLAGS, get_wsa_extension_function(), len, map_errno, msghdr::msg_flags, msghdr::msg_name, msghdr::msg_namelen, msghdr_to_wsamsg, WSAMSG::name, WSAMSG::namelen, NtSocketsInitialized, NULL, O_NONBLOCK, RUBY_CRITICAL, size, socklist_lookup(), StartSockets(), TO_SOCKET, TRUE, and WSAID_WSARECVMSG.
|
static |
Definition at line 464 of file win32.c.
References L, and translate_wchar().
Referenced by init_env(), rb_w32_home_dir(), and rb_w32_special_folder().
|
static |
Definition at line 4897 of file win32.c.
References f, FSCTL_GET_REPARSE_POINT, IO_REPARSE_TAG_SYMLINK, NULL, open_special(), and rb_w32_reparse_buffer_t::ReparseTag.
Referenced by rb_w32_read_reparse_point().
int ruby_brace_glob_with_enc | ( | const char * | str, |
int | flags, | ||
ruby_glob_func * | func, | ||
VALUE | arg, | ||
rb_encoding * | enc | ||
) |
Definition at line 2160 of file dir.c.
References brace_args::flags, func, brace_args::func, glob_brace(), GLOB_VERBOSE, ruby_brace_expand(), and brace_args::value.
Referenced by cmdglob(), and ruby_brace_glob().
|
static |
Definition at line 2219 of file win32.c.
References direct::d_altlen, direct::d_altname, direct::d_name, direct::d_namlen, FALSE, rb_w32_conv_from_wstr(), and TRUE.
Referenced by rb_w32_readdir().
Definition at line 3653 of file win32.c.
References errno, FALSE, finish_overlapped_socket(), GET_FLAGS, get_wsa_extension_function(), len, map_errno, msghdr_to_wsamsg, NtSocketsInitialized, NULL, O_NONBLOCK, RUBY_CRITICAL, size, socklist_lookup(), StartSockets(), TO_SOCKET, TRUE, and WSAID_WSASENDMSG.
|
static |
Definition at line 4231 of file win32.c.
References errno, GET_FAMILY, GET_FLAGS, MAKE_SOCKDATA, map_errno, O_NONBLOCK, RUBY_CRITICAL, socklist_insert(), socklist_lookup(), and u_long.
Referenced by fcntl(), and rb_w32_set_nonblock().
int setgid | ( | rb_gid_t | gid | ) |
Definition at line 2744 of file win32.c.
References ROOT_GID.
Referenced by p_gid_change_privilege(), p_uid_change_privilege(), proc_getegid(), proc_getgid(), rb_execarg_run_options(), and rb_setegid_core().
int setuid | ( | rb_uid_t | uid | ) |
Definition at line 2737 of file win32.c.
References ROOT_UID.
Referenced by check_gid_switch(), p_uid_change_privilege(), proc_geteuid(), proc_getuid(), rb_execarg_run_options(), and rb_seteuid_core().
|
static |
Definition at line 6856 of file win32.c.
References _osfhnd, _osfile, err, errno, FAPPEND, FDEV, FPIPE, INVALID_SET_FILE_POINTER, map_errno, NULL, and TRUE.
Referenced by rb_w32_read(), and rb_w32_write().
int signbit | ( | double | x | ) |
Definition at line 7557 of file win32.c.
Referenced by f_signbit(), flo_truncate(), lgamma_r(), math_atan2(), math_erfc(), math_gamma(), math_lgamma(), num_step(), and safe_mul().
|
inlinestatic |
Definition at line 1638 of file win32.c.
Referenced by w32_cmdvector().
int socketpair | ( | int | af, |
int | type, | ||
int | protocol, | ||
int * | sv | ||
) |
Definition at line 4036 of file win32.c.
References MAKE_SOCKDATA, O_BINARY, rb_w32_close(), rb_w32_open_osfhandle(), socketpair_internal(), and socklist_insert().
Referenced by sock_initialize().
|
static |
Definition at line 3944 of file win32.c.
References EAFNOSUPPORT, EPROTOTYPE, errno, INADDR_LOOPBACK, len, map_errno, NtSocketsInitialized, open_ifs_socket(), PF_INET, RUBY_CRITICAL, and StartSockets().
Referenced by socketpair().
|
inlinestatic |
Definition at line 804 of file win32.c.
References key, st_data_t, st_delete, and w32_cmdvector().
Referenced by rb_w32_close(), and rb_w32_unwrap_io_handle().
|
inlinestatic |
Definition at line 779 of file win32.c.
References st_data_t, st_init_numtable, and st_insert.
Referenced by rb_w32_accept(), rb_w32_socket(), rb_w32_wrap_io_handle(), setfl(), and socketpair().
|
inlinestatic |
Definition at line 788 of file win32.c.
References st_data_t, and st_lookup.
Referenced by is_socket(), overlapped_socket_io(), rb_w32_getsockname(), recvmsg(), sendmsg(), and setfl().
|
static |
Definition at line 753 of file win32.c.
References NtSocketsInitialized, rb_fatal(), select_mutex, and version.
Referenced by do_select(), 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_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_sysinit(), recvmsg(), sendmsg(), and socketpair_internal().
|
static |
Definition at line 5505 of file win32.c.
References errno, fileattr_to_unixmode(), filetime_to_unixtime(), and map_errno.
Referenced by winnt_lstat(), and winnt_stat().
|
static |
Definition at line 5388 of file win32.c.
References filetime_to_unixtime(), and stati64_set_inode().
Referenced by rb_w32_fstati64(), and winnt_stat().
|
static |
Definition at line 5308 of file win32.c.
Referenced by stati64_handle(), and stati64_set_inode_handle().
|
static |
Definition at line 5337 of file win32.c.
References stati64_set_inode().
Referenced by rb_w32_fstati64().
STATIC_ASSERT | ( | std_handle | , |
(STD_OUTPUT_HANDLE-STD_INPUT_HANDLE) | = =(STD_ERROR_HANDLE-STD_OUTPUT_HANDLE) |
||
) |
Referenced by rb_w32_getppid().
|
static |
Definition at line 5094 of file win32.c.
References filecp, and w32_symlink().
|
static |
|
static |
Definition at line 7617 of file win32.c.
Referenced by gmtime_r(), and localtime_r().
|
inlinestatic |
Definition at line 406 of file win32.c.
Referenced by cmdglob(), join_argv(), rb_w32_getcwd(), w32_aspawn_flags(), and w32_spawn().
|
inlinestatic |
Definition at line 395 of file win32.c.
Referenced by rb_w32_read_reparse_point(), rb_w32_system_tmpdir(), regulate_path(), and w32_symlink().
|
static |
Definition at line 7209 of file win32.c.
Referenced by unixtime_to_systemtime(), and wutime().
|
static |
Definition at line 7607 of file win32.c.
References unixtime_to_filetime().
Referenced by gmtime_r(), and localtime_r().
|
static |
Definition at line 1424 of file win32.c.
References ALLOCV, ALLOCV_END, argv, check_spawn_mode(), child_result(), CreateChild(), dln_find_exe_r, errno, FALSE, free(), getenv, internal_cmd_match(), is_batch(), is_command_com(), join_argv(), len, mbstr_to_wstr, NULL, PATH_MAX, strchr(), strlcat(), strlcpy(), strlen(), STRNDUPV, and translate_char().
Referenced by rb_w32_aspawn_flags(), and rb_w32_uaspawn_flags().
|
static |
Definition at line 1647 of file win32.c.
References calloc, cmdglob(), _NtCmdLineElement::flags, free(), L, len, _NtCmdLineElement::len, malloc, memcpy, _NtCmdLineElement::next, NTMALLOC, NULL, rb_w32_wstr_to_mbstr(), skipspace(), _NtCmdLineElement::str, and strlcpy().
Referenced by rb_w32_sysinit(), and socklist_delete().
|
static |
Definition at line 5108 of file win32.c.
References env, free(), len, map_errno, NULL, strlen(), strncasecmp, uenvarea, and wstr_to_mbstr.
Referenced by rb_w32_getenv(), and rb_w32_ugetenv().
|
static |
Definition at line 5757 of file win32.c.
References free(), mbstr_to_wstr, NULL, and wlstati64().
Referenced by rb_w32_lstati64(), and rb_w32_ulstati64().
|
static |
Definition at line 4991 of file win32.c.
References ALLOCV, ALLOCV_END, errno, len, map_errno, NULL, rb_w32_read_reparse_point(), rb_w32_reparse_buffer_size, and size.
Referenced by rb_w32_ureadlink(), and readlink().
Definition at line 1285 of file win32.c.
References ALLOCV, ALLOCV_END, check_spawn_mode(), child_result(), CreateChild(), dln_find_exe_r, errno, free(), getenv, has_redirection(), is_batch(), is_command_com(), is_internal_cmd(), ISSPACE, len, mbstr_to_wstr, memcpy, NULL, PATH_MAX, strchr(), strlen(), STRNDUPV, and translate_char().
Referenced by rb_w32_spawn(), and rb_w32_uspawn().
|
static |
Definition at line 5729 of file win32.c.
References free(), mbstr_to_wstr, NULL, and wstati64().
Referenced by rb_w32_stati64(), and rb_w32_ustati64().
Definition at line 5042 of file win32.c.
References ALLOCV_END, ALLOCV_N, buf, errno, get_proc_address(), L, map_errno, NULL, SYMBOLIC_LINK_FLAG_DIRECTORY, translate_wchar(), and wlink().
Referenced by rb_w32_usymlink(), and symlink().
Definition at line 5830 of file win32.c.
References errno, free(), map_errno, mbstr_to_wstr, NULL, and rb_chsize().
Referenced by rb_w32_truncate(), and rb_w32_utruncate().
|
static |
Definition at line 6178 of file win32.c.
References _set_osfhnd, _set_osflags, access, check_if_wdir(), errno, FALSE, FAPPEND, FDEV, FNOINHERIT, FOPEN, FPIPE, map_errno, NULL, O_BINARY, O_SHARE_DELETE, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, RUBY_CRITICAL, and TRUE.
Referenced by rb_w32_open(), rb_w32_uopen(), and rb_w32_wopen().
Definition at line 1973 of file win32.c.
References BitOfIsDir, BitOfIsRep, DIR::bits, calloc, DIR::curr, DIRENT_PER_CHAR, errno, free(), ISALPHA, L, len, malloc, memcpy, DIR::nfiles, NULL, open_dir_handle(), rb_w32_closedir(), rb_w32_reparse_symlink_p(), realloc, SetBit, DIR::size, DIR::start, and wstati64().
Referenced by rb_w32_opendir(), and rb_w32_uopendir().
int wait | ( | int * | status | ) |
Definition at line 5101 of file win32.c.
References waitpid().
Referenced by rb_w32_read(), rb_w32_select_with_thread(), and rb_w32_write().
rb_pid_t waitpid | ( | rb_pid_t | pid, |
int * | stat_loc, | ||
int | options | ||
) |
Definition at line 4479 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(), and WNOHANG.
Referenced by do_waitpid(), and wait().
|
static |
Definition at line 2158 of file win32.c.
References direct::d_altlen, direct::d_altname, direct::d_name, direct::d_namlen, FALSE, TRUE, and wstr_to_mbstr.
Referenced by rb_w32_readdir().
|
static |
Definition at line 5579 of file win32.c.
References check_valid_dir(), errno, fileattr_to_unixmode(), filetime_to_unixtime(), numberof, path_drive(), rb_w32_reparse_symlink_p(), and stat_by_find().
Referenced by wlstati64().
|
static |
Definition at line 5546 of file win32.c.
References check_valid_dir(), f, fileattr_to_unixmode(), get_final_path, len, numberof, open_special(), path_drive(), PATH_MAX, stat_by_find(), and stati64_handle().
Referenced by wstati64().
Definition at line 4834 of file win32.c.
References errno, map_errno, and NULL.
Referenced by link(), rb_w32_ulink(), and w32_symlink().
|
static |
Definition at line 5658 of file win32.c.
References ALLOCV_END, ALLOCV_N, errno, name_for_stat(), size, and winnt_lstat().
Referenced by w32_lstati64().
|
static |
Definition at line 7312 of file win32.c.
References errno, FALSE, map_errno, NULL, and RUBY_CRITICAL.
Referenced by rb_w32_mkdir(), and rb_w32_umkdir().
Definition at line 5179 of file win32.c.
References ELOOP, errno, get_attr_vsn(), map_errno, open_special(), and RUBY_CRITICAL.
Referenced by rb_w32_rename(), and rb_w32_urename().
|
static |
Definition at line 7360 of file win32.c.
References errno, FALSE, map_errno, and RUBY_CRITICAL.
Referenced by rb_w32_rmdir(), and rb_w32_urmdir().
|
static |
Definition at line 5635 of file win32.c.
References ALLOCV_END, ALLOCV_N, errno, name_for_stat(), size, and winnt_stat().
Referenced by w32_stati64(), w32_wopendir(), and wutime().
|
static |
Definition at line 7409 of file win32.c.
References errno, map_errno, and RUBY_CRITICAL.
Referenced by rb_w32_unlink(), and rb_w32_uunlink().
Definition at line 7221 of file win32.c.
References utimbuf::actime, errno, map_errno, utimbuf::modtime, NULL, open_special(), RUBY_CRITICAL, unixtime_to_filetime(), and wstati64().
Referenced by rb_w32_utime(), and rb_w32_uutime().
|
static |
int err |
Definition at line 135 of file win32.c.
Referenced by append_compile_error(), argf_next_argv(), BSD__sprint(), cleanup_iseq_build(), clsid_from_remote(), date_strftime_with_tmx(), errat_getter(), errat_setter(), execarg_parent_end(), expand_case_fold_string(), fetch_name(), fetch_name_with_level(), fiddle_handle_sym(), finish_overlapped_socket(), foletype_s_progids(), foletypelib_s_typelibs(), fptr_finalize_flush(), init_libraries(), init_libraries_if_necessary(), Init_syslog(), inspect_errno(), kill(), lock_func(), make_econv_exception(), Messaging_HandleMessage(), mustbe_callable(), mutex_free(), new_xstring_gen(), node_extended_grapheme_cluster(), node_linebreak(), oletypelib_path(), oletypelib_search_registry(), oletypelib_search_registry2(), onig_compile_ruby(), onig_new(), onig_new_with_source(), ossl_ocspbres_add_status(), ossl_pkcs12_initialize(), ossl_pkcs7_add_data(), ossl_raise(), ossl_x509stctx_get_err_string(), ossl_x509stctx_set_error(), overlapped_socket_io(), parse_char_class(), parse_enclose(), parse_subexp(), poll_child_status(), raise_loaderror(), rb_check_backtrace(), rb_deflate_init_copy(), rb_deflate_initialize(), rb_deflate_params(), rb_deflate_s_deflate(), rb_deflate_set_dictionary(), rb_enc_reg_new(), rb_exec_async_signal_safe(), rb_exec_fail(), rb_f_exec(), rb_f_raise(), rb_f_spawn(), rb_fiber_start(), rb_fiddle_handle_initialize(), rb_gzreader_initialize(), rb_gzwriter_initialize(), rb_inflate_initialize(), rb_inflate_s_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync_point_p(), rb_io_reopen(), rb_iterate0(), rb_mutex_unlock(), rb_mutex_unlock_th(), rb_notify_fd_close(), rb_pipe(), rb_reg_check_preprocess(), rb_reg_compile(), rb_reg_fixed_encoding_p(), rb_reg_init_str(), rb_reg_init_str_enc(), rb_reg_match_p(), rb_reg_prepare_re(), rb_reg_preprocess_dregexp(), rb_reg_search0(), rb_reg_to_s(), rb_set_errinfo(), rb_strftime_with_timespec(), rb_thread_pending_interrupt_p(), rb_threadptr_execute_interrupts(), rb_threadptr_pending_interrupt_deque(), rb_threadptr_unlock_all_locking_mutexes(), rb_vm_get_insns_address_table(), 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_size(), ruby_getpeername(), ruby_getsockname(), ruby_kill(), ruby_shutdown(), sdbm_prep(), setup_overlapped(), syserr_initialize(), thread_create_core(), thread_join(), typelib_file_from_clsid(), typelib_file_from_typelib(), vm_exec(), vm_throw_continue(), zlib_gunzip(), zlib_s_gzip(), zstream_end(), zstream_finalize(), zstream_reset(), zstream_run(), zstream_run_func(), and zstream_sync().
struct { ... } errmap[] |
Referenced by rb_w32_map_errno(), and rb_w32_strerror().
|
static |
Definition at line 1885 of file win32.c.
Referenced by get_final_path_unknown(), open_dir_handle(), and winnt_stat().
|
static |
Definition at line 295 of file win32.c.
Referenced by getlogin(), and init_env().
|
static |
Definition at line 692 of file win32.c.
Referenced by do_select(), exit_handler(), 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_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), recvmsg(), sendmsg(), socketpair_internal(), and StartSockets().
|
static |
Definition at line 297 of file win32.c.
Referenced by get_version(), rb_w32_osver(), and rb_w32_read().
Definition at line 4099 of file win32.c.
Referenced by getifaddrs().
Definition at line 4100 of file win32.c.
Referenced by getifaddrs().
|
static |
Definition at line 691 of file win32.c.
Referenced by do_select(), exit_handler(), and StartSockets().
|
static |
Definition at line 944 of file win32.c.
Referenced by internal_cmd_match().
|
static |
Definition at line 696 of file win32.c.
Referenced by exit_handler(), and w32_getenv().
DWORD winerr |
Definition at line 134 of file win32.c.
Referenced by rb_w32_map_errno(), and rb_w32_strerror().