#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 |
Defines | |
#define | isdirsep(x) ((x) == '/' || (x) == '\\') |
#define | enough_to_get(n) (--(n) >= 0) |
#define | enough_to_put(n) (--(n) >= 0) |
#define | Debug(something) |
#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 |
#define | FOREACH_CHILD(v) |
#define | END_FOREACH_CHILD } while (0) |
#define | MAXPATHLEN 512 |
#define | STRNDUPA(ptr, src, len) (((char *)memcpy(((ptr) = ALLOCA_N(char, (len) + 1)), (src), (len)))[len] = 0) |
#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 |
#define | FEOFLAG 0x02 |
#define | FPIPE 0x08 |
#define | FNOINHERIT 0x10 |
#define | FAPPEND 0x20 |
#define | FDEV 0x40 |
#define | FTEXT 0x80 |
#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 | 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 |
Functions | |
static struct ChildRecord * | CreateChild (const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE) |
static int | has_redirection (const char *) |
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) |
VALUE | rb_w32_conv_from_wchar (const WCHAR *wstr, rb_encoding *enc) |
int | rb_w32_map_errno (DWORD winerr) |
static void | get_version (void) |
static DWORD | rb_w32_osver (void) |
HANDLE | GetCurrentThreadHandle (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) |
static BOOL | get_special_folder (int n, WCHAR *env) |
static void | regulate_path (WCHAR *path) |
static UINT | get_system_directory (WCHAR *path, UINT len) |
VALUE | rb_w32_special_folder (int type) |
UINT | rb_w32_system_tmpdir (WCHAR *path, UINT len) |
static void | init_env (void) |
int | rb_w32_has_cancel_io (void) |
static void | init_func (void) |
static void | init_stdhandle (void) |
static void | exit_handler (void) |
static void | StartSockets (void) |
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) |
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) |
rb_pid_t | rb_w32_spawn (int mode, const char *cmd, const char *prog) |
rb_pid_t | rb_w32_aspawn (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) |
static char * | skipspace (char *ptr) |
int | rb_w32_cmdvector (const char *cmd, char ***vec) |
static HANDLE | open_dir_handle (const WCHAR *filename, WIN32_FIND_DATAW *fd) |
static DIR * | opendir_internal (HANDLE fh, WIN32_FIND_DATAW *fd) |
static char * | wstr_to_filecp (const WCHAR *wstr, long *plen) |
static WCHAR * | filecp_to_wstr (const char *str, long *plen) |
static char * | wstr_to_utf8 (const WCHAR *wstr, long *plen) |
static WCHAR * | utf8_to_wstr (const char *str, long *plen) |
DIR * | rb_w32_opendir (const char *filename) |
static void | move_to_next_entry (DIR *dirp) |
static BOOL | win32_direct_conv (const WCHAR *file, struct direct *entry, rb_encoding *dummy) |
char * | rb_w32_conv_from_wstr (const WCHAR *wstr, long *lenp, rb_encoding *enc) |
static BOOL | ruby_direct_conv (const WCHAR *file, struct direct *entry, rb_encoding *enc) |
static struct direct * | readdir_internal (DIR *dirp, BOOL(*conv)(const WCHAR *, struct direct *, rb_encoding *), rb_encoding *enc) |
struct direct * | rb_w32_readdir (DIR *dirp) |
struct direct * | rb_w32_readdir_with_enc (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 int | is_socket (SOCKET sock) |
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) |
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_console (SOCKET sock) |
static int | is_readable_console (SOCKET sock) |
static int | do_select (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *timeout) |
static int | subtract (struct timeval *rest, const struct timeval *wait) |
static int | compare (const struct timeval *t1, const struct timeval *t2) |
int WSAAPI | rb_w32_select (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *timeout) |
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 s, 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 | 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 | rb_w32_socketpair (int af, int type, int protocol, int *sv) |
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) |
int | fcntl (int fd, int cmd,...) |
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) |
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 | 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) |
int | wait (int *status) |
char * | rb_w32_getenv (const char *name) |
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 unsigned | fileattr_to_unixmode (DWORD attr, const WCHAR *path) |
static int | check_valid_dir (const WCHAR *path) |
static int | winnt_stat (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_access (const char *path, int mode) |
int | rb_w32_uaccess (const char *path, int mode) |
static int | rb_chsize (HANDLE h, off_t size) |
int | truncate (const char *path, off_t length) |
int | ftruncate (int fd, off_t length) |
int | fseeko (FILE *stream, off_t offset, int whence) |
off_t | ftello (FILE *stream) |
static long | filetime_to_clock (FILETIME *ft) |
int | rb_w32_times (struct tms *tmbuf) |
static void | catch_interrupt (void) |
int | rb_w32_getc (FILE *stream) |
int | rb_w32_putc (int c, FILE *stream) |
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) |
int | rb_w32_uopen (const char *file, int oflag,...) |
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]) |
int | rb_w32_close (int fd) |
size_t | rb_w32_read (int fd, void *buf, size_t size) |
size_t | rb_w32_write (int fd, const void *buf, size_t size) |
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 | rb_w32_isatty (int fd) |
int | signbit (double x) |
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 _osfhnd | ( | i | ) | (_pioinfo(i)->osfhnd) |
Definition at line 1996 of file win32.c.
Referenced by rb_w32_read(), and rb_w32_write().
#define _osfile | ( | i | ) | (_pioinfo(i)->osfile) |
Definition at line 1997 of file win32.c.
Referenced by rb_w32_isatty(), rb_w32_read(), rb_w32_wopen(), and rb_w32_write().
#define _pioinfo | ( | i | ) | ((ioinfo*)((char*)(__pioinfo[i >> IOINFO_L2E]) + (i & (IOINFO_ARRAY_ELTS - 1)) * (sizeof(ioinfo) + pioinfo_extra))) |
Definition at line 1995 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 _set_osfhnd | ( | fh, | ||
osfh | ||||
) | (void)(_osfhnd(fh) = osfh) |
Definition at line 2025 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().
#define _set_osflags | ( | fh, | ||
flags | ||||
) | (_osfile(fh) = (flags)) |
Definition at line 2026 of file win32.c.
Referenced by rb_w32_open_osfhandle(), rb_w32_pipe(), and rb_w32_wopen().
#define BitOfIsDir | ( | n | ) | ((n) * 2) |
Definition at line 1596 of file win32.c.
Referenced by opendir_internal(), and readdir_internal().
#define BitOfIsRep | ( | n | ) | ((n) * 2 + 1) |
Definition at line 1597 of file win32.c.
Referenced by opendir_internal(), and readdir_internal().
#define COPY_STAT | ( | src, | ||
dest, | ||||
size_cast | ||||
) |
do { \ (dest).st_dev = (src).st_dev; \ (dest).st_ino = (src).st_ino; \ (dest).st_mode = (src).st_mode; \ (dest).st_nlink = (src).st_nlink; \ (dest).st_uid = (src).st_uid; \ (dest).st_gid = (src).st_gid; \ (dest).st_rdev = (src).st_rdev; \ (dest).st_size = size_cast(src).st_size; \ (dest).st_atime = (src).st_atime; \ (dest).st_mtime = (src).st_mtime; \ (dest).st_ctime = (src).st_ctime; \ } while (0)
Definition at line 4002 of file win32.c.
Referenced by 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 | ) |
Definition at line 61 of file win32.c.
Referenced by rb_w32_asynchronize().
#define DIRENT_PER_CHAR (CHAR_BIT / 2) |
Definition at line 1598 of file win32.c.
Referenced by opendir_internal().
#define enough_to_get | ( | n | ) | (--(n) >= 0) |
Definition at line 54 of file win32.c.
Referenced by rb_w32_getc().
#define enough_to_put | ( | n | ) | (--(n) >= 0) |
Definition at line 55 of file win32.c.
Referenced by rb_w32_putc().
#define env wk.val |
Referenced by check_exec_env_i(), env_free(), env_mark(), env_memsize(), eval_string_with_cref(), init_env(), process_options(), rb_exec_arg_init(), and save_env().
#define ERROR_PIPE_LOCAL 229L |
#define FAPPEND 0x20 |
Definition at line 2032 of file win32.c.
Referenced by rb_w32_write().
#define FDEV 0x40 |
Definition at line 2033 of file win32.c.
Referenced by rb_w32_isatty(), rb_w32_read(), rb_w32_wopen(), and rb_w32_write().
#define FEOFLAG 0x02 |
Definition at line 2029 of file win32.c.
Referenced by rb_w32_read(), and rb_w32_write().
#define FNOINHERIT 0x10 |
Definition at line 2031 of file win32.c.
Referenced by rb_w32_pipe().
#define FOPEN 0x01 |
Definition at line 2028 of file win32.c.
Referenced by rb_w32_pipe().
#define FOREACH_CHILD | ( | v | ) |
do { \ struct ChildRecord* v; \ for (v = ChildRecord; v < ChildRecord + sizeof(ChildRecord) / sizeof(ChildRecord[0]); ++v)
Definition at line 701 of file win32.c.
Referenced by FindChildSlot(), FindChildSlotByHandle(), FindFreeChildSlot(), and waitpid().
#define FPIPE 0x08 |
Definition at line 2030 of file win32.c.
Referenced by rb_w32_pipe(), rb_w32_read(), rb_w32_wopen(), and rb_w32_write().
#define FTEXT 0x80 |
Definition at line 2034 of file win32.c.
Referenced by rb_w32_read(), and rb_w32_write().
#define GetBit | ( | bits, | ||
i | ||||
) | ((bits)[(i) / CHAR_BIT] & (1 << (i) % CHAR_BIT)) |
Definition at line 1593 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 rb_w32_read(), and rb_w32_write().
#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 ftruncate(), rb_w32_getppid(), 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 | ||||
) |
do { \ if (f) \ i = 0; \ else { \ DWORD err = GetLastError(); \ if (err == ERROR_LOCK_VIOLATION || err == ERROR_IO_PENDING) \ errno = EWOULDBLOCK; \ else if (err == ERROR_NOT_LOCKED) \ i = 0; \ else \ errno = map_errno(err); \ } \ } while (0)
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(), 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_wopen(), rb_w32_write(), recvmsg(), sendmsg(), socketpair_internal(), truncate(), unixtime_to_filetime(), waitpid(), winnt_stat(), wlink(), wmkdir(), wrename(), wrmdir(), wunlink(), and wutime().
#define msghdr_to_wsamsg | ( | msg, | ||
wsamsg | ||||
) |
do { \ int i; \ (wsamsg)->name = (msg)->msg_name; \ (wsamsg)->namelen = (msg)->msg_namelen; \ (wsamsg)->lpBuffers = ALLOCA_N(WSABUF, (msg)->msg_iovlen); \ (wsamsg)->dwBufferCount = (msg)->msg_iovlen; \ for (i = 0; i < (msg)->msg_iovlen; ++i) { \ (wsamsg)->lpBuffers[i].buf = (msg)->msg_iov[i].iov_base; \ (wsamsg)->lpBuffers[i].len = (msg)->msg_iov[i].iov_len; \ } \ (wsamsg)->Control.buf = (msg)->msg_control; \ (wsamsg)->Control.len = (msg)->msg_controllen; \ (wsamsg)->dwFlags = (msg)->msg_flags; \ } while (0)
#define MTHREAD_ONLY | ( | x | ) |
Definition at line 1967 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 1237 of file win32.c.
Referenced by cmdglob(), and rb_w32_cmdvector().
#define numberof | ( | array | ) | (sizeof(array) / sizeof(*array)) |
Definition at line 468 of file win32.c.
Referenced by init_env(), and rb_w32_system_tmpdir().
#define open_null | ( | fd | ) |
(((nullfd < 0) ? \ (nullfd = open("NUL", O_RDWR|O_BINARY)) : 0), \ ((nullfd == (fd)) ? (keep = 1) : dup2(nullfd, fd)), \ (fd))
Referenced by init_stdhandle().
#define RUBY_CRITICAL | ( | expr | ) | do { expr; } while (0) |
Definition at line 73 of file win32.c.
Referenced by catch_interrupt(), CreateChild(), do_select(), fcntl(), 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 | ) |
#define SetBit | ( | bits, | ||
i | ||||
) | ((bits)[(i) / CHAR_BIT] |= (1 << (i) % CHAR_BIT)) |
Definition at line 1594 of file win32.c.
Referenced by opendir_internal().
#define STRNDUPA | ( | ptr, | ||
src, | ||||
len | ||||
) | (((char *)memcpy(((ptr) = ALLOCA_N(char, (len) + 1)), (src), (len)))[len] = 0) |
Definition at line 951 of file win32.c.
Referenced by rb_w32_aspawn(), 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_fdset(), rb_w32_getpeername(), rb_w32_getsockname(), rb_w32_getsockopt(), 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 win95_stat | ( | path, | ||
st | ||||
) | -1 |
Definition at line 4170 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 yield_once | ( | ) | Sleep(0) |
Definition at line 4449 of file win32.c.
Referenced by catch_interrupt(), and rb_w32_asynchronize().
#define yield_until | ( | condition | ) | do yield_once(); while (!(condition)) |
Definition at line 4450 of file win32.c.
Referenced by rb_w32_asynchronize().
typedef BOOL(WINAPI * cancel_io_t)(HANDLE) |
typedef struct _NtCmdLineElement NtCmdLineElement |
static DWORD WINAPI call_asynchronous | ( | PVOID | argp | ) | [static] |
Definition at line 4523 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 void catch_interrupt | ( | void | ) | [static] |
Definition at line 4453 of file win32.c.
References NULL, rb_w32_wait_events(), RUBY_CRITICAL, and yield_once.
Referenced by rb_w32_getc(), and rb_w32_putc().
static int check_spawn_mode | ( | int | mode | ) | [static] |
Definition at line 955 of file win32.c.
References errno.
Referenced by rb_w32_aspawn(), and rb_w32_spawn().
static int check_valid_dir | ( | const WCHAR * | path | ) | [static] |
static rb_pid_t child_result | ( | struct ChildRecord * | child, | |
int | mode | |||
) | [static] |
Definition at line 968 of file win32.c.
References CloseChildHandle(), ChildRecord::hProcess, and ChildRecord::pid.
Referenced by rb_w32_aspawn(), and rb_w32_spawn().
int chown | ( | const char * | path, | |
int | owner, | |||
int | group | |||
) |
Definition at line 3701 of file win32.c.
Referenced by argf_next_argv(), chown_internal(), get_device_once(), and rb_file_chown().
static void CloseChildHandle | ( | struct ChildRecord * | child | ) | [static] |
Definition at line 731 of file win32.c.
References ChildRecord::hProcess, and ChildRecord::pid.
Referenced by child_result(), and poll_child_status().
static NtCmdLineElement** cmdglob | ( | NtCmdLineElement * | patt, | |
NtCmdLineElement ** | tail | |||
) | [static] |
Definition at line 1261 of file win32.c.
References buf, CharNext, _NtCmdLineElement::flags, free, insert(), last, _NtCmdLineElement::len, malloc, MAXPATHLEN, NTMALLOC, ruby_brace_glob(), _NtCmdLineElement::str, and strlcpy().
Referenced by rb_w32_cmdvector().
Definition at line 2485 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select().
static int copy_fd | ( | fd_set * | dst, | |
fd_set * | src | |||
) | [static] |
Definition at line 2347 of file win32.c.
Referenced by rb_w32_select().
static struct ChildRecord * CreateChild | ( | const char * | cmd, | |
const char * | prog, | |||
SECURITY_ATTRIBUTES * | psa, | |||
HANDLE | hInput, | |||
HANDLE | hOutput, | |||
HANDLE | hError | |||
) | [static, read] |
Definition at line 990 of file win32.c.
References errno, FindFreeChildSlot(), ChildRecord::hProcess, if(), IsWinNT, map_errno, NULL, ChildRecord::pid, and RUBY_CRITICAL.
Referenced by rb_w32_aspawn(), and rb_w32_spawn().
static int do_select | ( | int | nfds, | |
fd_set * | rd, | |||
fd_set * | wr, | |||
fd_set * | ex, | |||
struct timeval * | timeout | |||
) | [static] |
Definition at line 2440 of file win32.c.
References errno, map_errno, rb_w32_sleep(), RUBY_CRITICAL, timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select().
static void exit_handler | ( | void | ) | [static] |
static int extract_fd | ( | rb_fdset_t * | dst, | |
fd_set * | src, | |||
int(*)(SOCKET) | func | |||
) | [static] |
int fcntl | ( | int | fd, | |
int | cmd, | |||
... | ||||
) |
Definition at line 3490 of file win32.c.
References errno, F_SETFL, is_socket(), map_errno, O_NONBLOCK, RUBY_CRITICAL, st_insert(), st_lookup(), TO_SOCKET, and u_long.
Referenced by dup2(), io_cntl(), make_fd_nonblock(), rb_io_initialize(), rb_io_set_nonblock(), run_exec_dup2(), and wsplit_p().
static unsigned fileattr_to_unixmode | ( | DWORD | attr, | |
const WCHAR * | path | |||
) | [static] |
Definition at line 4065 of file win32.c.
Referenced by winnt_stat().
static WCHAR* filecp_to_wstr | ( | const char * | str, | |
long * | plen | |||
) | [static] |
Definition at line 1712 of file win32.c.
References len, malloc, and NULL.
Referenced by link(), rb_w32_mkdir(), rb_w32_open(), rb_w32_opendir(), rb_w32_rename(), rb_w32_rmdir(), rb_w32_stati64(), rb_w32_uchmod(), rb_w32_unlink(), and rb_w32_utime().
static long filetime_to_clock | ( | FILETIME * | ft | ) | [static] |
Definition at line 4420 of file win32.c.
Referenced by rb_w32_times().
static int filetime_to_timeval | ( | const FILETIME * | ft, | |
struct timeval * | tv | |||
) | [static] |
Definition at line 3628 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by filetime_to_unixtime(), and gettimeofday().
static time_t filetime_to_unixtime | ( | const FILETIME * | ft | ) | [static] |
Definition at line 4054 of file win32.c.
References filetime_to_timeval(), time_t, and timeval::tv_sec.
Referenced by winnt_stat().
static struct ChildRecord* FindChildSlot | ( | rb_pid_t | pid | ) | [static, read] |
static struct ChildRecord* FindChildSlotByHandle | ( | HANDLE | h | ) | [static, read] |
static struct ChildRecord* FindFreeChildSlot | ( | void | ) | [static, read] |
int flock | ( | int | fd, | |
int | oper | |||
) |
Definition at line 371 of file win32.c.
References IsWinNT, NULL, and rb_w32_asynchronize().
Referenced by rb_thread_flock().
int fseeko | ( | FILE * | stream, | |
off_t | offset, | |||
int | whence | |||
) |
int ftruncate | ( | int | fd, | |
off_t | length | |||
) |
Definition at line 4339 of file win32.c.
References IsWin95, and rb_chsize().
static BOOL get_special_folder | ( | int | n, | |
WCHAR * | env | |||
) | [static] |
Definition at line 429 of file win32.c.
References NULL.
Referenced by init_env(), rb_w32_special_folder(), and rb_w32_system_tmpdir().
static UINT get_system_directory | ( | WCHAR * | path, | |
UINT | len | |||
) | [static] |
Definition at line 454 of file win32.c.
Referenced by rb_w32_system_tmpdir().
static void get_version | ( | void | ) | [static] |
rb_gid_t getegid | ( | void | ) |
Definition at line 2225 of file win32.c.
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 2213 of file win32.c.
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 2219 of file win32.c.
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 | ) |
Definition at line 3651 of file win32.c.
References filetime_to_timeval().
Referenced by do_select(), fill_random_seed(), getclockofday(), rb_strftime_with_timespec(), rb_w32_select(), time_init_0(), and timeofday().
rb_uid_t getuid | ( | void | ) |
Definition at line 2207 of file win32.c.
Referenced by 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().
static int has_redirection | ( | const char * | cmd | ) | [static] |
static void init_env | ( | void | ) | [static] |
Definition at line 497 of file win32.c.
References CSIDL_PROFILE, env, get_special_folder(), len, name, NTLoginName, numberof, rb_w32_getenv(), rb_w32_system_tmpdir(), regulate_path(), set_env_val, and strdup.
Referenced by rb_w32_sysinit().
static void init_func | ( | void | ) | [static] |
Definition at line 569 of file win32.c.
Referenced by rb_w32_sysinit().
static void init_stdhandle | ( | void | ) | [static] |
static int insert | ( | const char * | path, | |
VALUE | vinfo, | |||
void * | enc | |||
) | [static] |
Definition at line 1241 of file win32.c.
References _NtCmdLineElement::flags, _NtCmdLineElement::len, malloc, MEMZERO, _NtCmdLineElement::next, _NtCmdLineElement::str, and strdup.
Referenced by cmdglob().
static int internal_cmd_match | ( | const char * | cmdname, | |
int | nt | |||
) | [static] |
Definition at line 858 of file win32.c.
References internal_match().
Referenced by is_internal_cmd(), and rb_w32_aspawn().
static int internal_match | ( | const void * | key, | |
const void * | elem | |||
) | [static] |
Definition at line 812 of file win32.c.
Referenced by internal_cmd_match().
int ioctl | ( | int | i, | |
int | u, | |||
... | ||||
) |
Definition at line 2247 of file win32.c.
References errno.
Referenced by chfunc(), get_device_once(), io_cntl(), io_nread(), io_ready_p(), and io_wait().
static int is_batch | ( | const char * | cmd | ) | [static] |
Definition at line 1069 of file win32.c.
References len, and strcasecmp.
Referenced by rb_w32_aspawn(), and rb_w32_spawn().
static int is_command_com | ( | const char * | interp | ) | [static] |
Definition at line 818 of file win32.c.
References isdirsep, and strcasecmp.
Referenced by rb_w32_aspawn(), and rb_w32_spawn().
static int is_console | ( | SOCKET | sock | ) | [static] |
Definition at line 2404 of file win32.c.
References RUBY_CRITICAL.
Referenced by rb_w32_read(), and rb_w32_select().
static int is_internal_cmd | ( | const char * | cmd, | |
int | nt | |||
) | [static] |
Definition at line 832 of file win32.c.
References internal_cmd_match().
Referenced by rb_w32_spawn().
static int is_not_socket | ( | SOCKET | sock | ) | [static] |
static int is_pipe | ( | SOCKET | sock | ) | [static] |
static int is_readable_console | ( | SOCKET | sock | ) | [static] |
static int is_readable_pipe | ( | SOCKET | sock | ) | [static] |
Definition at line 2386 of file win32.c.
References NULL, and RUBY_CRITICAL.
Referenced by rb_w32_select().
static int is_socket | ( | SOCKET | sock | ) | [static] |
Definition at line 2136 of file win32.c.
References NULL, and st_lookup().
Referenced by fcntl(), is_not_socket(), rb_w32_close(), rb_w32_fclose(), rb_w32_is_socket(), rb_w32_read(), and rb_w32_write().
static int isUNCRoot | ( | const WCHAR * | path | ) | [static] |
Definition at line 3982 of file win32.c.
Referenced by wstati64().
static int join_argv | ( | char * | cmd, | |
char *const * | argv, | |||
BOOL | escape | |||
) | [static] |
Definition at line 878 of file win32.c.
Referenced by rb_w32_aspawn().
int kill | ( | int | pid, | |
int | sig | |||
) |
Definition at line 3713 of file win32.c.
References EPERM, err, errno, FALSE, IfWin95, map_errno, NULL, RUBY_CRITICAL, SIGINT, and SIGKILL.
Referenced by raise_from_check(), and rb_f_kill().
int link | ( | const char * | from, | |
const char * | to | |||
) |
Definition at line 3849 of file win32.c.
References filecp_to_wstr(), free, NULL, and wlink().
Referenced by rb_set_end_proc().
static void move_to_next_entry | ( | DIR * | dirp | ) | [static] |
Definition at line 1781 of file win32.c.
References DIR::curr, DIR::loc, DIR::size, and DIR::start.
Referenced by rb_w32_seekdir(), and readdir_internal().
static HANDLE open_dir_handle | ( | const WCHAR * | filename, | |
WIN32_FIND_DATAW * | fd | |||
) | [static] |
Definition at line 1601 of file win32.c.
References ALLOCA_N, errno, len, and map_errno.
Referenced by check_valid_dir(), and rb_w32_opendir().
static SOCKET open_ifs_socket | ( | int | af, | |
int | type, | |||
int | protocol | |||
) | [static] |
Definition at line 3156 of file win32.c.
References AF_UNSPEC, free, malloc, and NULL.
Referenced by rb_w32_socket(), and socketpair_internal().
static DIR* opendir_internal | ( | HANDLE | fh, | |
WIN32_FIND_DATAW * | fd | |||
) | [static] |
Definition at line 1632 of file win32.c.
References BitOfIsDir, BitOfIsRep, DIR::bits, calloc, DIR::curr, DIRENT_PER_CHAR, errno, len, DIR::nfiles, NULL, rb_w32_closedir(), realloc, SetBit, DIR::size, and DIR::start.
Referenced by rb_w32_opendir().
static int overlapped_socket_io | ( | BOOL | input, | |
int | fd, | |||
char * | buf, | |||
int | len, | |||
int | flags, | |||
struct sockaddr * | addr, | |||
int * | addrlen | |||
) | [static] |
Definition at line 2788 of file win32.c.
References cancel_io, err, errno, FALSE, map_errno, NULL, O_NONBLOCK, rb_w32_wait_events_blocking(), RUBY_CRITICAL, size, st_lookup(), StartSockets(), TO_SOCKET, and TRUE.
Referenced by rb_w32_recv(), rb_w32_recvfrom(), rb_w32_send(), and rb_w32_sendto().
static rb_pid_t poll_child_status | ( | struct ChildRecord * | child, | |
int * | stat_loc | |||
) | [static] |
Definition at line 3538 of file win32.c.
References CloseChildHandle(), err, errno, ChildRecord::hProcess, map_errno, and ChildRecord::pid.
Referenced by waitpid().
static int rb_chsize | ( | HANDLE | h, | |
off_t | size | |||
) | [static] |
Definition at line 4282 of file win32.c.
References errno, map_errno, off_t, SEEK_CUR, and SEEK_SET.
Referenced by ftruncate(), and truncate().
int WSAAPI rb_w32_accept | ( | int | s, | |
struct sockaddr * | addr, | |||
int * | addrlen | |||
) |
Definition at line 2626 of file win32.c.
References _pioinfo, _set_osfhnd, errno, map_errno, MTHREAD_ONLY, NULL, O_BINARY, rb_w32_open_osfhandle(), RUBY_CRITICAL, st_insert(), StartSockets(), and TO_SOCKET.
int rb_w32_access | ( | const char * | path, | |
int | mode | |||
) |
Definition at line 4254 of file win32.c.
References errno, and rb_w32_stati64().
rb_pid_t rb_w32_aspawn | ( | int | mode, | |
const char * | prog, | |||
char *const * | argv | |||
) |
Definition at line 1171 of file win32.c.
References ALLOCA_N, check_spawn_mode(), child_result(), CreateChild(), dln_find_exe_r(), FALSE, fbuf, getenv(), internal_cmd_match(), is_batch(), is_command_com(), join_argv(), len, NULL, strchr(), strlcat(), strlcpy(), STRNDUPA, and translate_char().
Referenced by pipe_open().
uintptr_t rb_w32_asynchronize | ( | asynchronous_func_t | func, | |
uintptr_t | self, | |||
int | argc, | |||
uintptr_t * | argv, | |||
uintptr_t | intrval | |||
) |
Definition at line 4534 of file win32.c.
References asynchronous_arg_t::argc, asynchronous_arg_t::argv, call_asynchronous(), Debug, errno, asynchronous_arg_t::errnum, asynchronous_arg_t::func, NULL, rb_fatal(), rb_w32_wait_events_blocking(), RUBY_CRITICAL, asynchronous_arg_t::self, asynchronous_arg_t::stackaddr, yield_once, and yield_until.
Referenced by flock().
int WSAAPI rb_w32_bind | ( | int | s, | |
const struct sockaddr * | addr, | |||
int | addrlen | |||
) |
Definition at line 2661 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_close | ( | int | fd | ) |
Definition at line 5008 of file win32.c.
References _set_osfhnd, errno, is_socket(), LK_LEN, map_errno, NULL, st_delete(), and TO_SOCKET.
Referenced by rb_w32_pipe(), and rb_w32_socketpair().
void rb_w32_closedir | ( | DIR * | dirp | ) |
Definition at line 1944 of file win32.c.
References DIR::bits, direct::d_name, DIR::dirstr, free, and DIR::start.
Referenced by opendir_internal().
int rb_w32_cmdvector | ( | const char * | cmd, | |
char *** | vec | |||
) |
Definition at line 1348 of file win32.c.
References calloc, CharNext, cmdglob(), _NtCmdLineElement::flags, free, ISSPACE, _NtCmdLineElement::len, len, malloc, _NtCmdLineElement::next, NTMALLOC, skipspace(), _NtCmdLineElement::str, strdup, and strlcpy().
Referenced by rb_w32_sysinit().
int WSAAPI rb_w32_connect | ( | int | s, | |
const struct sockaddr * | addr, | |||
int | addrlen | |||
) |
Definition at line 2679 of file win32.c.
References err, errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
VALUE rb_w32_conv_from_wchar | ( | const WCHAR * | wstr, | |
rb_encoding * | enc | |||
) |
Definition at line 1805 of file win32.c.
References ID2SYM, rb_ascii8bit_encoding(), rb_econv_prepare_opts(), rb_enc_find(), rb_enc_from_encoding(), rb_enc_str_new(), rb_hash_aset(), rb_hash_new(), rb_intern, and rb_str_encode().
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 1831 of file win32.c.
References len, malloc, NIL_P, rb_w32_conv_from_wchar(), RSTRING_LEN, RSTRING_PTR, and wstr_to_filecp().
Referenced by ruby_direct_conv().
int rb_w32_fclose | ( | FILE * | fp | ) |
Definition at line 4894 of file win32.c.
References _set_osfhnd, errno, fileno, is_socket(), LK_LEN, map_errno, and TO_SOCKET.
void rb_w32_fdclr | ( | int | fd, | |
fd_set * | set | |||
) |
int rb_w32_fdisset | ( | int | fd, | |
fd_set * | set | |||
) |
Definition at line 2294 of file win32.c.
References RUBY_CRITICAL, and TO_SOCKET.
void rb_w32_fdset | ( | int | fd, | |
fd_set * | set | |||
) |
char** rb_w32_get_environ | ( | void | ) |
int rb_w32_getc | ( | FILE * | stream | ) |
Definition at line 4476 of file win32.c.
References 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 3874 of file win32.c.
References len, map_errno, and strncasecmp.
Referenced by init_env().
struct hostent* WSAAPI rb_w32_gethostbyaddr | ( | const char * | addr, | |
int | len, | |||
int | type | |||
) | [read] |
Definition at line 3233 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
struct hostent* WSAAPI rb_w32_gethostbyname | ( | const char * | name | ) | [read] |
Definition at line 3250 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_gethostname | ( | char * | name, | |
int | len | |||
) |
Definition at line 3267 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_getpeername | ( | int | s, | |
struct sockaddr * | addr, | |||
int * | addrlen | |||
) |
Definition at line 2702 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
rb_pid_t rb_w32_getpid | ( | void | ) |
rb_pid_t rb_w32_getppid | ( | void | ) |
struct protoent* WSAAPI rb_w32_getprotobyname | ( | const char * | name | ) | [read] |
Definition at line 3284 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
struct protoent* WSAAPI rb_w32_getprotobynumber | ( | int | num | ) | [read] |
Definition at line 3301 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
struct servent* WSAAPI rb_w32_getservbyname | ( | const char * | name, | |
const char * | proto | |||
) | [read] |
Definition at line 3318 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
struct servent* WSAAPI rb_w32_getservbyport | ( | int | port, | |
const char * | proto | |||
) | [read] |
Definition at line 3335 of file win32.c.
References errno, map_errno, NULL, RUBY_CRITICAL, and StartSockets().
int WSAAPI rb_w32_getsockname | ( | int | s, | |
struct sockaddr * | addr, | |||
int * | addrlen | |||
) |
Definition at line 2719 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_getsockopt | ( | int | s, | |
int | level, | |||
int | optname, | |||
char * | optval, | |||
int * | optlen | |||
) |
Definition at line 2734 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_ioctlsocket | ( | int | s, | |
long | cmd, | |||
u_long * | argp | |||
) |
Definition at line 2751 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_is_socket | ( | int | fd | ) |
Definition at line 2145 of file win32.c.
References is_socket(), and TO_SOCKET.
Referenced by rsock_init_sock().
int rb_w32_isatty | ( | int | fd | ) |
int WSAAPI rb_w32_listen | ( | int | s, | |
int | backlog | |||
) |
Definition at line 2768 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int rb_w32_mkdir | ( | const char * | path, | |
int | mode | |||
) |
int rb_w32_open | ( | const char * | file, | |
int | oflag, | |||
... | ||||
) |
Definition at line 4705 of file win32.c.
References filecp_to_wstr(), free, NULL, O_BINARY, and rb_w32_wopen().
static int rb_w32_open_osfhandle | ( | intptr_t | osfhandle, | |
int | flags | |||
) | [static] |
Definition at line 2037 of file win32.c.
References _pioinfo, _set_osfhnd, _set_osflags, errno, MTHREAD_ONLY, and NULL.
Referenced by rb_w32_accept(), rb_w32_socket(), and rb_w32_socketpair().
DIR* rb_w32_opendir | ( | const char * | filename | ) |
Definition at line 1746 of file win32.c.
References errno, filecp_to_wstr(), free, ISALPHA, NULL, open_dir_handle(), opendir_internal(), and wstati64().
static DWORD rb_w32_osver | ( | void | ) | [static] |
int rb_w32_pipe | ( | int | fds[2] | ) |
Definition at line 4916 of file win32.c.
References _pioinfo, _set_osfhnd, _set_osflags, err, errno, FNOINHERIT, FOPEN, FPIPE, map_errno, MTHREAD_ONLY, name, NULL, rb_w32_close(), rb_w32_getpid(), RUBY_CRITICAL, snprintf, and strchr().
int rb_w32_putc | ( | int | c, | |
FILE * | stream | |||
) |
Definition at line 4497 of file win32.c.
References catch_interrupt(), and enough_to_put.
size_t rb_w32_read | ( | int | fd, | |
void * | buf, | |||
size_t | size | |||
) |
Definition at line 5033 of file win32.c.
References _osfhnd, _osfile, _pioinfo, cancel_io, err, errno, FDEV, FEOFLAG, FPIPE, FTEXT, INVALID_SET_FILE_POINTER, is_console(), is_socket(), len, map_errno, MTHREAD_ONLY, NULL, rb_w32_recv(), rb_w32_wait_events_blocking(), TO_SOCKET, and TRUE.
Definition at line 1890 of file win32.c.
References NULL, readdir_internal(), and win32_direct_conv().
struct direct* rb_w32_readdir_with_enc | ( | DIR * | dirp, | |
rb_encoding * | enc | |||
) | [read] |
Definition at line 1896 of file win32.c.
References NULL, rb_ascii8bit_encoding(), 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 2884 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 2890 of file win32.c.
References overlapped_socket_io(), and TRUE.
int rb_w32_rename | ( | const char * | from, | |
const char * | to | |||
) |
void rb_w32_rewinddir | ( | DIR * | dirp | ) |
Definition at line 1933 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 1919 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 2500 of file win32.c.
References compare(), copy_fd(), do_select(), errno, extract_fd(), gettimeofday(), if(), is_console(), is_not_socket(), is_pipe(), is_readable_console(), is_readable_pipe(), NULL, rb_fd_init, rb_fd_term, StartSockets(), subtract(), timeval::tv_sec, and timeval::tv_usec.
int WSAAPI rb_w32_send | ( | int | fd, | |
const char * | buf, | |||
int | len, | |||
int | flags | |||
) |
Definition at line 2897 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 2903 of file win32.c.
References FALSE, and overlapped_socket_io().
int WSAAPI rb_w32_setsockopt | ( | int | s, | |
int | level, | |||
int | optname, | |||
const char * | optval, | |||
int | optlen | |||
) |
Definition at line 3124 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_shutdown | ( | int | s, | |
int | how | |||
) |
Definition at line 3141 of file win32.c.
References errno, map_errno, RUBY_CRITICAL, shutdown, StartSockets(), and TO_SOCKET.
int WSAAPI rb_w32_socket | ( | int | af, | |
int | type, | |||
int | protocol | |||
) |
Definition at line 3205 of file win32.c.
References errno, map_errno, O_BINARY, open_ifs_socket(), rb_w32_open_osfhandle(), RUBY_CRITICAL, st_insert(), and StartSockets().
int rb_w32_socketpair | ( | int | af, | |
int | type, | |||
int | protocol, | |||
int * | sv | |||
) |
Definition at line 3438 of file win32.c.
References O_BINARY, rb_w32_close(), rb_w32_open_osfhandle(), socketpair_internal(), and st_insert().
rb_pid_t rb_w32_spawn | ( | int | mode, | |
const char * | cmd, | |||
const char * | prog | |||
) |
Definition at line 1081 of file win32.c.
References ALLOCA_N, CharNext, check_spawn_mode(), child_result(), CreateChild(), dln_find_exe_r(), fbuf, getenv(), has_redirection(), is_batch(), is_command_com(), is_internal_cmd(), ISSPACE, len, NULL, strchr(), STRNDUPA, and translate_char().
Referenced by pipe_open(), and rb_proc_exec().
VALUE rb_w32_special_folder | ( | int | type | ) |
Definition at line 471 of file win32.c.
References get_special_folder(), rb_filesystem_encoding(), rb_w32_conv_from_wchar(), and regulate_path().
Referenced by etc_sysconfdir().
int rb_w32_stat | ( | const char * | path, | |
struct stat * | st | |||
) |
Definition at line 4174 of file win32.c.
References COPY_STAT, and rb_w32_stati64().
int rb_w32_stati64 | ( | const char * | path, | |
struct stati64 * | st | |||
) |
Definition at line 4241 of file win32.c.
References filecp_to_wstr(), free, NULL, and wstati64().
Referenced by rb_w32_access(), and rb_w32_stat().
char* rb_w32_strerror | ( | int | e | ) |
void rb_w32_sysinit | ( | int * | argc, | |
char *** | argv | |||
) |
Definition at line 650 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 481 of file win32.c.
References CSIDL_LOCAL_APPDATA, get_special_folder(), get_system_directory(), numberof, and translate_wchar().
Referenced by etc_systmpdir(), and init_env().
int rb_w32_times | ( | struct tms * | tmbuf | ) |
Definition at line 4430 of file win32.c.
References filetime_to_clock(), tms::tms_cstime, tms::tms_cutime, tms::tms_stime, and tms::tms_utime.
int rb_w32_uaccess | ( | const char * | path, | |
int | mode | |||
) |
Definition at line 4268 of file win32.c.
References errno, and rb_w32_ustati64().
int rb_w32_uchdir | ( | const char * | path | ) |
Definition at line 5401 of file win32.c.
References free, NULL, and utf8_to_wstr().
int rb_w32_uchmod | ( | const char * | path, | |
int | mode | |||
) |
Definition at line 5551 of file win32.c.
References filecp_to_wstr(), free, and NULL.
int rb_w32_uchown | ( | const char * | path, | |
int | owner, | |||
int | group | |||
) |
int rb_w32_ulink | ( | const char * | from, | |
const char * | to | |||
) |
int rb_w32_umkdir | ( | const char * | path, | |
int | mode | |||
) |
int rb_w32_unlink | ( | const char * | path | ) |
int rb_w32_uopen | ( | const char * | file, | |
int | oflag, | |||
... | ||||
) |
Definition at line 4686 of file win32.c.
References free, NULL, rb_w32_wopen(), and utf8_to_wstr().
int rb_w32_urename | ( | const char * | from, | |
const char * | to | |||
) |
int rb_w32_urmdir | ( | const char * | path | ) |
int rb_w32_ustati64 | ( | const char * | path, | |
struct stati64 * | st | |||
) |
Definition at line 4228 of file win32.c.
References free, NULL, utf8_to_wstr(), and wstati64().
Referenced by rb_w32_uaccess().
int rb_w32_utime | ( | const char * | path, | |
const struct utimbuf * | times | |||
) |
int rb_w32_uunlink | ( | const char * | path | ) |
int rb_w32_uutime | ( | const char * | path, | |
const struct utimbuf * | times | |||
) |
int rb_w32_wait_events | ( | HANDLE * | events, | |
int | num, | |||
DWORD | timeout | |||
) |
Referenced by catch_interrupt().
int rb_w32_wopen | ( | const WCHAR * | file, | |
int | oflag, | |||
... | ||||
) |
Definition at line 4727 of file win32.c.
References _osfile, _pioinfo, _set_osfhnd, _set_osflags, errno, FDEV, FPIPE, map_errno, MTHREAD_ONLY, NULL, O_BINARY, and RUBY_CRITICAL.
Referenced by rb_w32_open(), and rb_w32_uopen().
size_t rb_w32_write | ( | int | fd, | |
const void * | buf, | |||
size_t | size | |||
) |
Definition at line 5177 of file win32.c.
References _osfhnd, _osfile, _pioinfo, cancel_io, err, errno, FAPPEND, FDEV, FEOFLAG, FPIPE, FTEXT, INVALID_SET_FILE_POINTER, is_socket(), len, map_errno, MTHREAD_ONLY, NULL, rb_w32_send(), rb_w32_wait_events_blocking(), TO_SOCKET, and TRUE.
static struct direct* readdir_internal | ( | DIR * | dirp, | |
BOOL(*)(const WCHAR *, struct direct *, rb_encoding *) | conv, | |||
rb_encoding * | enc | |||
) | [static, read] |
Definition at line 1853 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, free, GetBit, DIR::loc, and move_to_next_entry().
Referenced by rb_w32_readdir(), and rb_w32_readdir_with_enc().
int recvmsg | ( | int | fd, | |
struct msghdr * | msg, | |||
int | flags | |||
) |
Definition at line 2944 of file win32.c.
References cancel_io, WSAMSG::dwFlags, err, errno, FALSE, len, map_errno, msghdr::msg_flags, msghdr::msg_name, msghdr::msg_namelen, msghdr_to_wsamsg, WSAMSG::name, WSAMSG::namelen, NULL, O_NONBLOCK, rb_w32_wait_events_blocking(), RUBY_CRITICAL, size, st_lookup(), StartSockets(), TO_SOCKET, and TRUE.
static void regulate_path | ( | WCHAR * | path | ) | [static] |
Definition at line 444 of file win32.c.
References translate_wchar().
Referenced by init_env(), and rb_w32_special_folder().
static BOOL ruby_direct_conv | ( | const WCHAR * | file, | |
struct direct * | entry, | |||
rb_encoding * | enc | |||
) | [static] |
Definition at line 1845 of file win32.c.
References direct::d_name, direct::d_namlen, and rb_w32_conv_from_wstr().
Referenced by rb_w32_readdir_with_enc().
int sendmsg | ( | int | fd, | |
const struct msghdr * | msg, | |||
int | flags | |||
) |
Definition at line 3037 of file win32.c.
References cancel_io, err, errno, FALSE, len, map_errno, msghdr_to_wsamsg, NULL, O_NONBLOCK, rb_w32_wait_events_blocking(), RUBY_CRITICAL, size, st_lookup(), StartSockets(), TO_SOCKET, and TRUE.
int setgid | ( | rb_gid_t | gid | ) |
Definition at line 2237 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 2231 of file win32.c.
References ROOT_UID.
Referenced by p_uid_change_privilege(), and rb_seteuid_core().
int signbit | ( | double | x | ) |
Definition at line 5647 of file win32.c.
Referenced by f_signbit(), math_gamma(), and math_lgamma().
static char* skipspace | ( | char * | ptr | ) | [inline, static] |
static int socketpair_internal | ( | int | af, | |
int | type, | |||
int | protocol, | |||
SOCKET * | sv | |||
) | [static] |
Definition at line 3350 of file win32.c.
References errno, INADDR_LOOPBACK, len, map_errno, open_ifs_socket(), PF_INET, RUBY_CRITICAL, and StartSockets().
Referenced by rb_w32_socketpair().
static void StartSockets | ( | void | ) | [static] |
Definition at line 626 of file win32.c.
References rb_fatal(), and st_init_numtable().
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(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_socket(), rb_w32_sysinit(), recvmsg(), sendmsg(), and socketpair_internal().
Definition at line 2467 of file win32.c.
References timeval::tv_sec, and timeval::tv_usec.
Referenced by rb_w32_select().
static char* translate_char | ( | char * | p, | |
int | from, | |||
int | to | |||
) | [inline, static] |
Definition at line 402 of file win32.c.
References CharNext.
Referenced by rb_w32_aspawn(), rb_w32_getcwd(), and rb_w32_spawn().
static WCHAR* translate_wchar | ( | WCHAR * | p, | |
int | from, | |||
int | to | |||
) | [inline, static] |
Definition at line 392 of file win32.c.
Referenced by rb_w32_system_tmpdir(), and regulate_path().
int truncate | ( | const char * | path, | |
off_t | length | |||
) |
static int unixtime_to_filetime | ( | time_t | time, | |
FILETIME * | ft | |||
) | [static] |
static WCHAR* utf8_to_wstr | ( | const char * | str, | |
long * | plen | |||
) | [static] |
Definition at line 1735 of file win32.c.
References len, malloc, and NULL.
Referenced by rb_w32_uchdir(), rb_w32_ulink(), rb_w32_umkdir(), rb_w32_uopen(), rb_w32_urename(), rb_w32_urmdir(), rb_w32_ustati64(), rb_w32_uunlink(), and rb_w32_uutime().
int wait | ( | int * | status | ) |
Definition at line 3868 of file win32.c.
References waitpid().
Referenced by proc_waitall(), and rb_waitpid_blocking().
rb_pid_t waitpid | ( | rb_pid_t | pid, | |
int * | stat_loc, | |||
int | options | |||
) |
Definition at line 3568 of file win32.c.
References count, errno, FindChildSlot(), FindChildSlotByHandle(), FOREACH_CHILD, ChildRecord::hProcess, map_errno, poll_child_status(), rb_w32_wait_events_blocking(), and WNOHANG.
Referenced by rb_waitpid_blocking(), and wait().
static BOOL win32_direct_conv | ( | const WCHAR * | file, | |
struct direct * | entry, | |||
rb_encoding * | dummy | |||
) | [static] |
Definition at line 1797 of file win32.c.
References direct::d_name, direct::d_namlen, and wstr_to_filecp().
Referenced by rb_w32_readdir(), and rb_w32_readdir_with_enc().
static int winnt_stat | ( | const WCHAR * | path, | |
struct stati64 * | st | |||
) | [static] |
Definition at line 4117 of file win32.c.
References check_valid_dir(), errno, fileattr_to_unixmode(), filetime_to_unixtime(), and map_errno.
Referenced by wstati64().
static int wlink | ( | const WCHAR * | from, | |
const WCHAR * | to | |||
) | [static] |
static int wmkdir | ( | const WCHAR * | wpath, | |
int | mode | |||
) | [static] |
Definition at line 5414 of file win32.c.
References errno, FALSE, map_errno, NULL, and RUBY_CRITICAL.
Referenced by rb_w32_mkdir(), and rb_w32_umkdir().
static int wrename | ( | const WCHAR * | oldpath, | |
const WCHAR * | newpath | |||
) | [static] |
Definition at line 3895 of file win32.c.
References errno, IsWinNT, map_errno, and RUBY_CRITICAL.
Referenced by rb_w32_rename(), and rb_w32_urename().
static int wrmdir | ( | const WCHAR * | wpath | ) | [static] |
Definition at line 5459 of file win32.c.
References errno, FALSE, map_errno, and RUBY_CRITICAL.
Referenced by rb_w32_rmdir(), and rb_w32_urmdir().
static int wstati64 | ( | const WCHAR * | path, | |
struct stati64 * | st | |||
) | [static] |
Definition at line 4184 of file win32.c.
References ALLOCA_N, errno, isUNCRoot(), IsWinNT, len, S_IWGRP, size, win95_stat, and winnt_stat().
Referenced by rb_w32_opendir(), rb_w32_stati64(), rb_w32_ustati64(), and wutime().
static char* wstr_to_filecp | ( | const WCHAR * | wstr, | |
long * | plen | |||
) | [static] |
Definition at line 1700 of file win32.c.
References len, malloc, and NULL.
Referenced by rb_w32_conv_from_wstr(), and win32_direct_conv().
static char* wstr_to_utf8 | ( | const WCHAR * | wstr, | |
long * | plen | |||
) | [static] |
static int wunlink | ( | const WCHAR * | path | ) | [static] |
Definition at line 5505 of file win32.c.
References errno, FALSE, map_errno, and RUBY_CRITICAL.
Referenced by rb_w32_unlink(), and rb_w32_uunlink().
static int wutime | ( | const WCHAR * | path, | |
const struct utimbuf * | times | |||
) | [static] |
Definition at line 5326 of file win32.c.
References utimbuf::actime, errno, IsWin95, map_errno, utimbuf::modtime, NULL, RUBY_CRITICAL, unixtime_to_filetime(), and wstati64().
Referenced by rb_w32_utime(), and rb_w32_uutime().
cancel_io_t cancel_io = NULL [static] |
Definition at line 560 of file win32.c.
Referenced by overlapped_socket_io(), rb_w32_read(), rb_w32_write(), recvmsg(), and sendmsg().
struct ChildRecord ChildRecord[MAXCHILDNUM] [static] |
int err |
Definition at line 78 of file win32.c.
Referenced by BSD__sprint(), cleanup_iseq_build(), clsid_from_remote(), dlhandle_sym(), err_append(), errat_getter(), errat_setter(), expand_case_fold_string(), fetch_name(), fetch_name_with_level(), foletype_s_progids(), foletypelib_s_typelibs(), fptr_finalize(), Init_syslog(), inspect_errno(), kill(), make_econv_exception(), mutex_free(), mutex_unlock(), 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(), overlapped_socket_io(), 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_inflate_initialize(), rb_inflate_s_inflate(), rb_inflate_set_dictionary(), rb_inflate_sync_point_p(), rb_iterate(), rb_mutex_unlock(), rb_mutex_unlock_all(), 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_strftime_with_timespec(), rb_threadptr_execute_interrupts_rec(), rb_w32_connect(), rb_w32_pipe(), rb_w32_read(), rb_w32_write(), recvmsg(), 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(), sendmsg(), 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[] [static] |
Referenced by rb_w32_map_errno().
const char* NTLoginName [static] |
Definition at line 235 of file win32.c.
Referenced by getlogin(), and init_env().
int NtSocketsInitialized = 0 [static] |
OSVERSIONINFO osver [static] |
Definition at line 237 of file win32.c.
Referenced by get_version(), and rb_w32_osver().
CRITICAL_SECTION select_mutex [static] |
const char* const szInternalCmds[] [static] |