Ruby: include/ruby/win32.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Functions
win32.h File Reference
`#include <winsock2.h>`
`#include <ws2tcpip.h>`
`#include <iphlpapi.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <direct.h>`
`#include <process.h>`
`#include <time.h>`
`#include <math.h>`
`#include <signal.h>`
`#include <sys/stat.h>`
`#include <sys/types.h>`
`#include <utime.h>`
`#include <io.h>`
`#include <malloc.h>`
`#include <float.h>`
`#include <errno.h>`

Go to the source code of this file.

## Data Structures
struct | stati128
struct | iovec
struct | msghdr
struct | ifaddrs
struct | tms

## Macros
#define | WIN32
#define | _INTPTR_T_DEFINED
#define | INTPTR_MAX 2147483647
#define | INTPTR_MIN (-INTPTR_MAX-1)
#define | _UINTPTR_T_DEFINED
#define | UINTPTR_MAX 4294967295U
#define | mode_t int
#define | rb_w32_iswinnt() TRUE
#define | rb_w32_iswin95() FALSE
#define | WNOHANG -1
#define | O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */
#define | CLOCK_REALTIME 0
#define | CLOCK_MONOTONIC 1
#define | off_t __int64
#define | stat stati128
#define | SIZEOF_STRUCT_STAT_ST_INO sizeof(unsigned __int64)
#define | HAVE_STRUCT_STAT_ST_INOHIGH
#define | HAVE_STRUCT_STAT_ST_ATIMENSEC
#define | HAVE_STRUCT_STAT_ST_MTIMENSEC
#define | HAVE_STRUCT_STAT_ST_CTIMENSEC
#define | fstat(fd, st) rb_w32_fstati128(fd,st)
#define | stati128(path, st) rb_w32_ustati128(path,st)
#define | lstat(path, st) rb_w32_ulstati128(path,st)
#define | access(path, mode) rb_w32_uaccess(path,mode)
#define | strcasecmp _stricmp
#define | strncasecmp _strnicmp
#define | fsync _commit
#define | IFNAMSIZ 256
#define | isnan(x) _isnan(x)
#define | copysign(a, b) _copysign(a, b)
#define | S_IRUSR 0400
#define | S_IRGRP 0040
#define | S_IROTH 0004
#define | S_IWUSR 0200
#define | S_IWGRP 0020
#define | S_IWOTH 0002
#define | S_IXUSR 0100
#define | S_IXGRP 0010
#define | S_IXOTH 0001
#define | S_IFLNK 0xa000
#define | SUFFIX
#define | HAVE_FTRUNCATE 1
#define | ftruncate rb_w32_ftruncate
#define | HAVE_TRUNCATE 1
#define | truncate rb_w32_utruncate
#define | PIPE_BUF 1024
#define | LOCK_SH 1
#define | LOCK_EX 2
#define | LOCK_NB 4
#define | LOCK_UN 8
#define | SIGINT 2
#define | SIGKILL 9
#define | EWOULDBLOCK WSAEWOULDBLOCK
#define | EINPROGRESS WSAEINPROGRESS
#define | EALREADY WSAEALREADY
#define | ENOTSOCK WSAENOTSOCK
#define | EDESTADDRREQ WSAEDESTADDRREQ
#define | EMSGSIZE WSAEMSGSIZE
#define | EPROTOTYPE WSAEPROTOTYPE
#define | ENOPROTOOPT WSAENOPROTOOPT
#define | EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define | ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define | EOPNOTSUPP WSAEOPNOTSUPP
#define | EPFNOSUPPORT WSAEPFNOSUPPORT
#define | EAFNOSUPPORT WSAEAFNOSUPPORT
#define | EADDRINUSE WSAEADDRINUSE
#define | EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define | ENETDOWN WSAENETDOWN
#define | ENETUNREACH WSAENETUNREACH
#define | ENETRESET WSAENETRESET
#define | ECONNABORTED WSAECONNABORTED
#define | ECONNRESET WSAECONNRESET
#define | ENOBUFS WSAENOBUFS
#define | EISCONN WSAEISCONN
#define | ENOTCONN WSAENOTCONN
#define | ESHUTDOWN WSAESHUTDOWN
#define | ETOOMANYREFS WSAETOOMANYREFS
#define | ETIMEDOUT WSAETIMEDOUT
#define | ECONNREFUSED WSAECONNREFUSED
#define | ELOOP WSAELOOP
#define | EHOSTDOWN WSAEHOSTDOWN
#define | EHOSTUNREACH WSAEHOSTUNREACH
#define | EPROCLIM WSAEPROCLIM
#define | EUSERS WSAEUSERS
#define | EDQUOT WSAEDQUOT
#define | ESTALE WSAESTALE
#define | EREMOTE WSAEREMOTE
#define | F_DUPFD 0
#define | F_GETFD 1
#define | F_SETFD 2
#define | F_SETFL 4
#define | F_DUPFD_CLOEXEC 67
#define | FD_CLOEXEC 1 /* F_GETFD, F_SETFD */
#define | O_NONBLOCK 1
#define | FD_SET(fd, set)
#define | FD_CLR(f, s) rb_w32_fdclr(f, s)
#define | FD_ISSET(f, s) rb_w32_fdisset(f, s)

## Typedefs
typedef int | intptr_t
typedef unsigned int | uintptr_t
typedef int | clockid_t
typedef uintptr_t(* | asynchronous_func_t) (uintptr_t self, int argc, uintptr_t *argv)

## Functions
void | rb_w32_sysinit (int *, char ***)
DWORD | rb_w32_osid (void)
int | flock (int fd, int oper)
int | rb_w32_io_cancelable_p (int)
int | rb_w32_is_socket (int)
int WSAAPI | rb_w32_accept (int, struct sockaddr *, int *)
int WSAAPI | rb_w32_bind (int, const struct sockaddr *, int)
int WSAAPI | rb_w32_connect (int, const struct sockaddr *, int)
void | rb_w32_fdset (int, fd_set *)
void | rb_w32_fdclr (int, fd_set *)
int | rb_w32_fdisset (int, fd_set *)
int WSAAPI | rb_w32_select (int, fd_set *, fd_set *, fd_set *, struct timeval *)
int WSAAPI | rb_w32_getpeername (int, struct sockaddr *, int *)
int WSAAPI | rb_w32_getsockname (int, struct sockaddr *, int *)
int WSAAPI | rb_w32_getsockopt (int, int, int, char *, int *)
int WSAAPI | rb_w32_ioctlsocket (int, long, u_long *)
int WSAAPI | rb_w32_listen (int, int)
int WSAAPI | rb_w32_recv (int, char *, int, int)
int WSAAPI | rb_w32_recvfrom (int, char *, int, int, struct sockaddr *, int *)
int WSAAPI | rb_w32_send (int, const char *, int, int)
int WSAAPI | rb_w32_sendto (int, const char *, int, int, const struct sockaddr *, int)
int | recvmsg (int, struct msghdr *, int)
int | sendmsg (int, const struct msghdr *, int)
int WSAAPI | rb_w32_setsockopt (int, int, int, const char *, int)
int WSAAPI | rb_w32_shutdown (int, int)
int WSAAPI | rb_w32_socket (int, int, int)
SOCKET | rb_w32_get_osfhandle (int)
struct hostent *WSAAPI | rb_w32_gethostbyaddr (const char *, int, int)
struct hostent *WSAAPI | rb_w32_gethostbyname (const char *)
int WSAAPI | rb_w32_gethostname (char *, int)
struct protoent *WSAAPI | rb_w32_getprotobyname (const char *)
struct protoent *WSAAPI | rb_w32_getprotobynumber (int)
struct servent *WSAAPI | rb_w32_getservbyname (const char *, const char *)
struct servent *WSAAPI | rb_w32_getservbyport (int, const char *)
int | socketpair (int, int, int, int *)
int | getifaddrs (struct ifaddrs **)
void | freeifaddrs (struct ifaddrs *)
char * | rb_w32_ugetcwd (char *, int)
char * | rb_w32_ugetenv (const char *)
int | rb_w32_urename (const char *, const char *)
char ** | rb_w32_get_environ (void)
void | rb_w32_free_environ (char **)
int | rb_w32_map_errno (DWORD)
const char *WSAAPI | rb_w32_inet_ntop (int, const void *, char *, size_t)
int WSAAPI | rb_w32_inet_pton (int, const char *, void *)
DWORD | rb_w32_osver (void)
int | rb_w32_uchown (const char *, int, int)
int | rb_w32_ulink (const char *, const char *)
ssize_t | rb_w32_ureadlink (const char *, char *, size_t)
ssize_t | rb_w32_wreadlink (const WCHAR *, WCHAR *, size_t)
int | rb_w32_usymlink (const char *src, const char *link)
int | gettimeofday (struct timeval *, struct timezone *)
int | clock_gettime (clockid_t, struct timespec *)
int | clock_getres (clockid_t, struct timespec *)
rb_pid_t | waitpid (rb_pid_t, int *, int)
rb_pid_t | rb_w32_uspawn (int, const char *, const char *)
rb_pid_t | rb_w32_uaspawn (int, const char *, char *const *)
rb_pid_t | rb_w32_uaspawn_flags (int, const char *, char *const *, DWORD)
int | kill (int, int)
int | fcntl (int, int,...)
int | rb_w32_set_nonblock (int)
rb_pid_t | rb_w32_getpid (void)
rb_pid_t | rb_w32_getppid (void)
int | rb_w32_isatty (int)
int | rb_w32_uchdir (const char *)
int | rb_w32_umkdir (const char *, int)
int | rb_w32_urmdir (const char *)
int | rb_w32_uunlink (const char *)
int | rb_w32_uchmod (const char *, int)
int | rb_w32_ustati128 (const char *, struct stati128 *)
int | rb_w32_ulstati128 (const char *, struct stati128 *)
int | rb_w32_uaccess (const char *, int)
char | rb_w32_fd_is_text (int)
int | rb_w32_fstati128 (int, struct stati128 *)
int | rb_w32_dup2 (int, int)
int | rb_w32_ftruncate (int fd, off_t length)
int | rb_w32_truncate (const char *path, off_t length)
int | rb_w32_utruncate (const char *path, off_t length)
int | ioctl (int, int,...)
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)
int | setgid (rb_gid_t)
char * | rb_w32_strerror (int)
int | rb_w32_times (struct tms *)
struct tm * | gmtime_r (const time_t *, struct tm *)
struct tm * | localtime_r (const time_t *, struct tm *)
int | rb_w32_sleep (unsigned long msec)
int | rb_w32_uopen (const char *, int,...)
int | rb_w32_wopen (const WCHAR *, int,...)
int | rb_w32_close (int)
int | rb_w32_fclose (FILE *)
int | rb_w32_pipe (int[2])
ssize_t | rb_w32_read (int, void *, size_t)
ssize_t | rb_w32_write (int, const void *, size_t)
off_t | rb_w32_lseek (int, off_t, int)
int | rb_w32_uutime (const char *, const struct utimbuf *)
int | rb_w32_uutimes (const char *, const struct timeval *)
int | rb_w32_uutimensat (int, const char *, const struct timespec *, int)
long | rb_w32_write_console (uintptr_t, int)
int WINAPI | rb_w32_Sleep (unsigned long msec)
int | rb_w32_wait_events_blocking (HANDLE *events, int num, DWORD timeout)
int | rb_w32_time_subtract (struct timeval *rest, const struct timeval *wait)
int | rb_w32_wrap_io_handle (HANDLE, int)
int | rb_w32_unwrap_io_handle (int)
WCHAR * | rb_w32_mbstr_to_wstr (UINT, const char *, int, long *)
char * | rb_w32_wstr_to_mbstr (UINT, const WCHAR *, int, long *)
char * | rb_w32_getcwd (char *, int)
char * | rb_w32_getenv (const char *)
int | rb_w32_rename (const char *, const char *)
int | rb_w32_open (const char *, int,...)
int | chown (const char *, int, int)
int | link (const char *, const char *)
ssize_t | readlink (const char *, char *, size_t)
int | symlink (const char *src, const char *link)
int | rb_w32_mkdir (const char *, int)
int | rb_w32_rmdir (const char *)
int | rb_w32_unlink (const char *)
int | rb_w32_utime (const char *, const struct utimbuf *)
int | rb_w32_utimes (const char *, const struct timeval *)
int | rb_w32_utimensat (int, const char *, const struct timespec *, int)
int | rb_w32_stati128 (const char *, struct stati128 *)
int | rb_w32_lstati128 (const char *, struct stati128 *)
int | rb_w32_access (const char *, int)
rb_pid_t | rb_w32_spawn (int, const char *, const char *)
rb_pid_t | rb_w32_aspawn (int, const char *, char *const *)
rb_pid_t | rb_w32_aspawn_flags (int, const char *, char *const *, DWORD)
uintptr_t | rb_w32_asynchronize (asynchronous_func_t func, uintptr_t self, int argc, uintptr_t *argv, uintptr_t intrval)

## Macro Definition Documentation

## ◆ _INTPTR_T_DEFINED

#define _INTPTR_T_DEFINED

Definition at line 92 of file win32.h.

## ◆ _UINTPTR_T_DEFINED

#define _UINTPTR_T_DEFINED

Definition at line 108 of file win32.h.

## ◆ access

#define access | ( |  | path,
|  |  | mode
| ) |  | rb_w32_uaccess(path,mode)

Definition at line 205 of file win32.h.

## ◆ CLOCK_MONOTONIC

#define CLOCK_MONOTONIC 1

Definition at line 134 of file win32.h.

## ◆ CLOCK_REALTIME

#define CLOCK_REALTIME 0

Definition at line 133 of file win32.h.

## ◆ copysign

#define copysign | ( |  | a,
|  |  | b
| ) |  | _copysign(a, b)

Definition at line 354 of file win32.h.

## ◆ EADDRINUSE

#define EADDRINUSE WSAEADDRINUSE

Definition at line 507 of file win32.h.

## ◆ EADDRNOTAVAIL

#define EADDRNOTAVAIL WSAEADDRNOTAVAIL

Definition at line 510 of file win32.h.

## ◆ EAFNOSUPPORT

#define EAFNOSUPPORT WSAEAFNOSUPPORT

Definition at line 504 of file win32.h.

## ◆ EALREADY

#define EALREADY WSAEALREADY

Definition at line 474 of file win32.h.

## ◆ ECONNABORTED

#define ECONNABORTED WSAECONNABORTED

Definition at line 522 of file win32.h.

## ◆ ECONNREFUSED

#define ECONNREFUSED WSAECONNREFUSED

Definition at line 546 of file win32.h.

## ◆ ECONNRESET

#define ECONNRESET WSAECONNRESET

Definition at line 525 of file win32.h.

## ◆ EDESTADDRREQ

#define EDESTADDRREQ WSAEDESTADDRREQ

Definition at line 480 of file win32.h.

## ◆ EDQUOT

#define EDQUOT WSAEDQUOT

Definition at line 566 of file win32.h.

## ◆ EHOSTDOWN

#define EHOSTDOWN WSAEHOSTDOWN

Definition at line 553 of file win32.h.

## ◆ EHOSTUNREACH

#define EHOSTUNREACH WSAEHOSTUNREACH

Definition at line 556 of file win32.h.

## ◆ EINPROGRESS

#define EINPROGRESS WSAEINPROGRESS

Definition at line 471 of file win32.h.

## ◆ EISCONN

#define EISCONN WSAEISCONN

Definition at line 531 of file win32.h.

## ◆ ELOOP

#define ELOOP WSAELOOP

Definition at line 549 of file win32.h.

## ◆ EMSGSIZE

#define EMSGSIZE WSAEMSGSIZE

Definition at line 483 of file win32.h.

## ◆ ENETDOWN

#define ENETDOWN WSAENETDOWN

Definition at line 513 of file win32.h.

## ◆ ENETRESET

#define ENETRESET WSAENETRESET

Definition at line 519 of file win32.h.

## ◆ ENETUNREACH

#define ENETUNREACH WSAENETUNREACH

Definition at line 516 of file win32.h.

## ◆ ENOBUFS

#define ENOBUFS WSAENOBUFS

Definition at line 528 of file win32.h.

## ◆ ENOPROTOOPT

#define ENOPROTOOPT WSAENOPROTOOPT

Definition at line 489 of file win32.h.

## ◆ ENOTCONN

#define ENOTCONN WSAENOTCONN

Definition at line 534 of file win32.h.

## ◆ ENOTSOCK

#define ENOTSOCK WSAENOTSOCK

Definition at line 477 of file win32.h.

## ◆ EOPNOTSUPP

#define EOPNOTSUPP WSAEOPNOTSUPP

Definition at line 498 of file win32.h.

## ◆ EPFNOSUPPORT

#define EPFNOSUPPORT WSAEPFNOSUPPORT

Definition at line 501 of file win32.h.

## ◆ EPROCLIM

#define EPROCLIM WSAEPROCLIM

Definition at line 560 of file win32.h.

## ◆ EPROTONOSUPPORT

#define EPROTONOSUPPORT WSAEPROTONOSUPPORT

Definition at line 492 of file win32.h.

## ◆ EPROTOTYPE

#define EPROTOTYPE WSAEPROTOTYPE

Definition at line 486 of file win32.h.

## ◆ EREMOTE

#define EREMOTE WSAEREMOTE

Definition at line 572 of file win32.h.

## ◆ ESHUTDOWN

#define ESHUTDOWN WSAESHUTDOWN

Definition at line 537 of file win32.h.

## ◆ ESOCKTNOSUPPORT

#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT

Definition at line 495 of file win32.h.

## ◆ ESTALE

#define ESTALE WSAESTALE

Definition at line 569 of file win32.h.

## ◆ ETIMEDOUT

#define ETIMEDOUT WSAETIMEDOUT

Definition at line 543 of file win32.h.

## ◆ ETOOMANYREFS

#define ETOOMANYREFS WSAETOOMANYREFS

Definition at line 540 of file win32.h.

## ◆ EUSERS

#define EUSERS WSAEUSERS

Definition at line 563 of file win32.h.

## ◆ EWOULDBLOCK

#define EWOULDBLOCK WSAEWOULDBLOCK

Definition at line 468 of file win32.h.

## ◆ F_DUPFD

#define F_DUPFD 0

Definition at line 575 of file win32.h.

## ◆ F_DUPFD_CLOEXEC

#define F_DUPFD_CLOEXEC 67

Definition at line 582 of file win32.h.

## ◆ F_GETFD

#define F_GETFD 1

Definition at line 576 of file win32.h.

## ◆ F_SETFD

#define F_SETFD 2

Definition at line 577 of file win32.h.

## ◆ F_SETFL

#define F_SETFL 4

Definition at line 581 of file win32.h.

## ◆ FD_CLOEXEC

#define FD_CLOEXEC 1 /* F_GETFD, F_SETFD */

Definition at line 583 of file win32.h.

## ◆ FD_CLR

#define FD_CLR | ( |  | f,
|  |  | s
| ) |  | rb_w32_fdclr(f, s)

Definition at line 605 of file win32.h.

## ◆ FD_ISSET

#define FD_ISSET | ( |  | f,
|  |  | s
| ) |  | rb_w32_fdisset(f, s)

Definition at line 608 of file win32.h.

## ◆ FD_SET

#define FD_SET | ( |  | fd,
|  |  | set
| ) |  |

Value:
do {\
unsigned int i;\
SOCKET s = _get_osfhandle(fd);\
\
for (i = 0; i < (set)->fd_count; i++) {\
if ((set)->fd_array[i] == s) {\
break;\
}\
}\
if (i == (set)->fd_count) {\
if ((set)->fd_count < FD_SETSIZE) {\
(set)->fd_array[i] = s;\
(set)->fd_count++;\
}\
}\
} while(0)

Definition at line 587 of file win32.h.

## ◆ fstat

#define fstat | ( |  | fd,
|  |  | st
| ) |  | rb_w32_fstati128(fd,st)

Definition at line 202 of file win32.h.

## ◆ fsync

#define fsync _commit

Definition at line 209 of file win32.h.

## ◆ ftruncate

#define ftruncate rb_w32_ftruncate

Definition at line 416 of file win32.h.

## ◆ HAVE_FTRUNCATE

#define HAVE_FTRUNCATE 1

Definition at line 412 of file win32.h.

## ◆ HAVE_STRUCT_STAT_ST_ATIMENSEC

#define HAVE_STRUCT_STAT_ST_ATIMENSEC

Definition at line 199 of file win32.h.

## ◆ HAVE_STRUCT_STAT_ST_CTIMENSEC

#define HAVE_STRUCT_STAT_ST_CTIMENSEC

Definition at line 201 of file win32.h.

## ◆ HAVE_STRUCT_STAT_ST_INOHIGH

#define HAVE_STRUCT_STAT_ST_INOHIGH

Definition at line 198 of file win32.h.

## ◆ HAVE_STRUCT_STAT_ST_MTIMENSEC

#define HAVE_STRUCT_STAT_ST_MTIMENSEC

Definition at line 200 of file win32.h.

## ◆ HAVE_TRUNCATE

#define HAVE_TRUNCATE 1

Definition at line 420 of file win32.h.

## ◆ IFNAMSIZ

#define IFNAMSIZ 256

Definition at line 246 of file win32.h.

## ◆ INTPTR_MAX

#define INTPTR_MAX 2147483647

Definition at line 98 of file win32.h.

## ◆ INTPTR_MIN

#define INTPTR_MIN (-INTPTR_MAX-1)

Definition at line 100 of file win32.h.

## ◆ isnan

#define isnan | ( |  | x | ) | _isnan(x)

Definition at line 346 of file win32.h.

## ◆ LOCK_EX

#define LOCK_EX 2

Definition at line 448 of file win32.h.

## ◆ LOCK_NB

#define LOCK_NB 4

Definition at line 449 of file win32.h.

## ◆ LOCK_SH

#define LOCK_SH 1

Definition at line 447 of file win32.h.

## ◆ LOCK_UN

#define LOCK_UN 8

Definition at line 450 of file win32.h.

## ◆ lstat

#define lstat | ( |  | path,
|  |  | st
| ) |  | rb_w32_ulstati128(path,st)

Definition at line 204 of file win32.h.

## ◆ mode_t

#define mode_t int

Definition at line 119 of file win32.h.

## ◆ O_NONBLOCK

#define O_NONBLOCK 1

Definition at line 584 of file win32.h.

## ◆ O_SHARE_DELETE

#define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */

Definition at line 130 of file win32.h.

## ◆ off_t

#define off_t __int64

Definition at line 194 of file win32.h.

## ◆ PIPE_BUF

#define PIPE_BUF 1024

Definition at line 445 of file win32.h.

## ◆ rb_w32_iswin95

#define rb_w32_iswin95 | ( |  | ) | FALSE

Definition at line 126 of file win32.h.

## ◆ rb_w32_iswinnt

#define rb_w32_iswinnt | ( |  | ) | TRUE

Definition at line 125 of file win32.h.

## ◆ S_IFLNK

#define S_IFLNK 0xa000

Definition at line 399 of file win32.h.

## ◆ S_IRGRP

#define S_IRGRP 0040

Definition at line 373 of file win32.h.

## ◆ S_IROTH

#define S_IROTH 0004

Definition at line 376 of file win32.h.

## ◆ S_IRUSR

#define S_IRUSR 0400

Definition at line 370 of file win32.h.

## ◆ S_IWGRP

#define S_IWGRP 0020

Definition at line 383 of file win32.h.

## ◆ S_IWOTH

#define S_IWOTH 0002

Definition at line 386 of file win32.h.

## ◆ S_IWUSR

#define S_IWUSR 0200

Definition at line 380 of file win32.h.

## ◆ S_IXGRP

#define S_IXGRP 0010

Definition at line 393 of file win32.h.

## ◆ S_IXOTH

#define S_IXOTH 0001

Definition at line 396 of file win32.h.

## ◆ S_IXUSR

#define S_IXUSR 0100

Definition at line 390 of file win32.h.

## ◆ SIGINT

#define SIGINT 2

Definition at line 454 of file win32.h.

## ◆ SIGKILL

#define SIGKILL 9

Definition at line 457 of file win32.h.

## ◆ SIZEOF_STRUCT_STAT_ST_INO

#define SIZEOF_STRUCT_STAT_ST_INO sizeof(unsigned __int64)

Definition at line 197 of file win32.h.

## ◆ stat

#define stat stati128

Definition at line 195 of file win32.h.

## ◆ stati128

#define stati128 | ( |  | path,
|  |  | st
| ) |  | rb_w32_ustati128(path,st)

Definition at line 203 of file win32.h.

## ◆ strcasecmp

#define strcasecmp _stricmp

Definition at line 207 of file win32.h.

## ◆ strncasecmp

#define strncasecmp _strnicmp

Definition at line 208 of file win32.h.

## ◆ SUFFIX

#define SUFFIX

Definition at line 405 of file win32.h.

## ◆ truncate

#define truncate rb_w32_utruncate

Definition at line 421 of file win32.h.

## ◆ UINTPTR_MAX

#define UINTPTR_MAX 4294967295U

Definition at line 114 of file win32.h.

## ◆ WIN32

#define WIN32

Definition at line 36 of file win32.h.

## ◆ WNOHANG

#define WNOHANG -1

Definition at line 128 of file win32.h.

## Typedef Documentation

## ◆ asynchronous_func_t

typedef uintptr_t(* asynchronous_func_t) (uintptr_t self, int argc, uintptr_t *argv)

Definition at line 767 of file win32.h.

## ◆ clockid_t

typedef int clockid_t

Definition at line 132 of file win32.h.

## ◆ intptr_t

typedef int intptr_t

Definition at line 90 of file win32.h.

## ◆ uintptr_t

typedef unsigned int uintptr_t

Definition at line 106 of file win32.h.

## Function Documentation

## ◆ chown()

int chown | ( | const char * | path,
|  | int | owner,
|  | int | group
| ) |  |

Definition at line 4819 of file win32.c.

Referenced by copymeta().

## ◆ clock_getres()

int clock_getres | ( | clockid_t | clock_id,
|  | struct timespec * | sp
| ) |  |

Definition at line 4708 of file win32.c.

References CLOCK_MONOTONIC, CLOCK_REALTIME, long(), map_errno, timespec::tv_nsec, and timespec::tv_sec.

## ◆ clock_gettime()

int clock_gettime | ( | clockid_t | clock_id,
|  | struct timespec * | sp
| ) |  |

Definition at line 4668 of file win32.c.

References CLOCK_MONOTONIC, CLOCK_REALTIME, count, map_errno, timespec::tv_nsec, and timespec::tv_sec.

Referenced by rb_timespec_now().

## ◆ fcntl()

int fcntl | ( | int | fd,
|  | int | cmd,
|  |  | ...
| ) |  |

Definition at line 4338 of file win32.c.

References _osfile, F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD, F_SETFD, F_SETFL, FD_CLOEXEC, FNOINHERIT, is_socket, L, map_errno, SIGNED_VALUE, and TO_SOCKET.

Referenced by dup2(), rb_cloexec_fcntl_dupfd(), rb_maygvl_fd_fix_cloexec(), rb_update_max_fd(), and rsock_make_fd_nonblock().

## ◆ flock()

int flock | ( | int | fd,
|  | int | oper
| ) |  |

Definition at line 125 of file flock.c.

References NULL, and rb_w32_asynchronize().

## ◆ freeifaddrs()

void freeifaddrs | ( | struct ifaddrs * | ifp | ) |

Definition at line 4232 of file win32.c.

References ifaddrs::ifa_addr, ifaddrs::ifa_name, ifaddrs::ifa_next, and ruby_xfree().

## ◆ getegid()

rb_gid_t getegid | ( | void |  | ) |

Definition at line 2842 of file win32.c.

References ROOT_GID.

Referenced by eaccess(), and InitVM_process().

## ◆ geteuid()

rb_uid_t geteuid | ( | void |  | ) |

Definition at line 2828 of file win32.c.

References ROOT_UID.

Referenced by eaccess(), and InitVM_process().

## ◆ getgid()

rb_gid_t getgid | ( | void |  | ) |

Definition at line 2835 of file win32.c.

References ROOT_GID.

Referenced by eaccess().

## ◆ getifaddrs()

int getifaddrs | ( | struct ifaddrs ** | ifap | ) |

Definition at line 4145 of file win32.c.

References added, AF_UNSPEC, ifaddrs::ifa_addr, ifaddrs::ifa_flags, ifaddrs::ifa_name, ifaddrs::ifa_next, IFNAMSIZ, map_errno, memcpy, name, NULL, root, ruby_strdup(), ruby_xcalloc(), ruby_xfree(), and ruby_xmalloc().

## ◆ gettimeofday()

int gettimeofday | ( | struct timeval * | tv,
|  | struct timezone * | tz
| ) |  |

Definition at line 4654 of file win32.c.

References timeval::tv_sec, and timeval::tv_usec.

Referenced by rb_timespec_now(), and rb_w32_select_with_thread().

## ◆ getuid()

rb_uid_t getuid | ( | void |  | ) |

Definition at line 2821 of file win32.c.

References ROOT_UID.

Referenced by eaccess(), and rb_default_home_dir().

## ◆ gmtime_r()

struct tm * gmtime_r | ( | const time_t * | tp,
|  | struct tm * | rp
| ) |  |

Definition at line 7913 of file win32.c.

References error(), NULL, and rp.

## ◆ ioctl()

int ioctl | ( | int | i,
|  | int | u,
|  |  | ...
| ) |  |

Definition at line 2867 of file win32.c.

## ◆ kill()

int kill | ( | int | pid,
|  | int | sig
| ) |  |

Definition at line 4845 of file win32.c.

References err, FALSE, INVALID_HANDLE_VALUE, map_errno, NULL, RUBY_CRITICAL, SIGINT, and SIGKILL.

Referenced by rb_f_kill().

## ◆ link()

int link | ( | const char * | from,
|  | const char * | to
| ) |  |

Definition at line 4987 of file win32.c.

References filecp_to_wstr, free, and NULL.

Referenced by rb_mark_end_proc(), rb_set_end_proc(), rb_w32_usymlink(), and symlink().

## ◆ localtime_r()

struct tm * localtime_r | ( | const time_t * | tp,
|  | struct tm * | rp
| ) |  |

Definition at line 7937 of file win32.c.

References error(), NULL, and rp.

## ◆ rb_w32_accept()

int WSAAPI rb_w32_accept | ( | int | s,
|  | struct sockaddr * | addr,
|  | int * | addrlen
| ) |  |

Definition at line 3330 of file win32.c.

References map_errno, O_BINARY, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_access()

int rb_w32_access | ( | const char * | path,
|  | int | mode
| ) |  |

Definition at line 5890 of file win32.c.

References filecp.

## ◆ rb_w32_aspawn()

rb_pid_t rb_w32_aspawn | ( | int | mode,
|  | const char * | prog,
|  | char *const * | argv
| ) |  |

Definition at line 1600 of file win32.c.

References argv, filecp, and prog.

## ◆ rb_w32_aspawn_flags()

rb_pid_t rb_w32_aspawn_flags | ( | int | mode,
|  | const char * | prog,
|  | char *const * | argv,
|  | DWORD | flags
| ) |  |

Definition at line 1585 of file win32.c.

References argv, filecp, and prog.

## ◆ rb_w32_asynchronize()

uintptr_t rb_w32_asynchronize | ( | asynchronous_func_t | func,
|  | uintptr_t | self,
|  | int | argc,
|  | uintptr_t * | argv,
|  | uintptr_t | intrval
| ) |  |

Definition at line 6042 of file win32.c.

References argc, asynchronous_arg_t::argc, argv, asynchronous_arg_t::argv, Debug, asynchronous_arg_t::errnum, FALSE, asynchronous_arg_t::func, NULL, rb_fatal(), rb_w32_wait_events_blocking(), RUBY_CRITICAL, asynchronous_arg_t::self, asynchronous_arg_t::stackaddr, TRUE, yield_once, and yield_until.

Referenced by flock().

## ◆ rb_w32_bind()

int WSAAPI rb_w32_bind | ( | int | s,
|  | const struct sockaddr * | addr,
|  | int | addrlen
| ) |  |

Definition at line 3357 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_close()

int rb_w32_close | ( | int | fd | ) |

Definition at line 6985 of file win32.c.

References _set_osfhnd, INVALID_HANDLE_VALUE, is_socket, LK_LEN, map_errno, NULL, and TO_SOCKET.

Referenced by rb_w32_pipe(), and socketpair().

## ◆ rb_w32_connect()

int WSAAPI rb_w32_connect | ( | int | s,
|  | const struct sockaddr * | addr,
|  | int | addrlen
| ) |  |

Definition at line 3373 of file win32.c.

References EINPROGRESS, err, map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_dup2()

int rb_w32_dup2 | ( | int | oldfd,
|  | int | newfd
| ) |  |

Definition at line 6199 of file win32.c.

References dup2(), and set_new_std_fd.

## ◆ rb_w32_fclose()

int rb_w32_fclose | ( | FILE * | fp | ) |

Definition at line 6454 of file win32.c.

References _set_osfhnd, fileno, INVALID_HANDLE_VALUE, is_socket, LK_LEN, map_errno, and TO_SOCKET.

## ◆ rb_w32_fd_is_text()

char rb_w32_fd_is_text | ( | int | fd | ) |

Definition at line 7831 of file win32.c.

References _osfile, and FTEXT.

## ◆ rb_w32_fdclr()

void rb_w32_fdclr | ( | int | fd,
|  | fd_set * | set
| ) |  |

Definition at line 2883 of file win32.c.

References memmove(), and TO_SOCKET.

## ◆ rb_w32_fdisset()

int rb_w32_fdisset | ( | int | fd,
|  | fd_set * | set
| ) |  |

Definition at line 2901 of file win32.c.

References INVALID_HANDLE_VALUE, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_fdset()

void rb_w32_fdset | ( | int | fd,
|  | fd_set * | set
| ) |  |

Definition at line 2874 of file win32.c.

References FD_SET.

## ◆ rb_w32_free_environ()

void rb_w32_free_environ | ( | char ** | env | ) |

Definition at line 6142 of file win32.c.

References env, free, and t.

## ◆ rb_w32_fstati128()

int rb_w32_fstati128 | ( | int | fd,
|  | struct stati128 * | st
| ) |  |

Definition at line 5471 of file win32.c.

References COPY_STAT, fstat, and stat.

## ◆ rb_w32_ftruncate()

int rb_w32_ftruncate | ( | int | fd,
|  | off_t | length
| ) |  |

Definition at line 5969 of file win32.c.

## ◆ rb_w32_get_environ()

char ** rb_w32_get_environ | ( | void |  | ) |

Definition at line 6105 of file win32.c.

References env, malloc, NULL, num, and wstr_to_utf8.

## ◆ rb_w32_get_osfhandle()

SOCKET rb_w32_get_osfhandle | ( | int | fh | ) |

Definition at line 1115 of file win32.c.

Referenced by rb_w32_start_process().

## ◆ rb_w32_getcwd()

char * rb_w32_getcwd | ( | char * | buffer,
|  | int | size
| ) |  |

Definition at line 4787 of file win32.c.

References filecp, and NULL.

## ◆ rb_w32_getenv()

char * rb_w32_getenv | ( | const char * | name | ) |

Definition at line 5293 of file win32.c.

References name.

## ◆ rb_w32_gethostbyaddr()

struct hostent *WSAAPI rb_w32_gethostbyaddr | ( | const char * | addr,
|  | int | len,
|  | int | type
| ) |  |

Definition at line 3887 of file win32.c.

References len, map_errno, NULL, and RUBY_CRITICAL.

## ◆ rb_w32_gethostbyname()

struct hostent *WSAAPI rb_w32_gethostbyname | ( | const char * | name | ) |

Definition at line 3902 of file win32.c.

References map_errno, name, NULL, and RUBY_CRITICAL.

## ◆ rb_w32_gethostname()

int WSAAPI rb_w32_gethostname | ( | char * | name,
|  | int | len
| ) |  |

Definition at line 3917 of file win32.c.

References len, map_errno, name, and RUBY_CRITICAL.

## ◆ rb_w32_getpeername()

int WSAAPI rb_w32_getpeername | ( | int | s,
|  | struct sockaddr * | addr,
|  | int * | addrlen
| ) |  |

Definition at line 3394 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_getpid()

rb_pid_t rb_w32_getpid | ( | void |  | ) |

Definition at line 6152 of file win32.c.

Referenced by rb_w32_pipe().

## ◆ rb_w32_getppid()

rb_pid_t rb_w32_getppid | ( | void |  | ) |

Definition at line 6160 of file win32.c.

References int(), len, long(), and NULL.

## ◆ rb_w32_getprotobyname()

struct protoent *WSAAPI rb_w32_getprotobyname | ( | const char * | name | ) |

Definition at line 3932 of file win32.c.

References map_errno, name, NULL, and RUBY_CRITICAL.

## ◆ rb_w32_getprotobynumber()

struct protoent *WSAAPI rb_w32_getprotobynumber | ( | int | num | ) |

Definition at line 3947 of file win32.c.

References map_errno, NULL, num, and RUBY_CRITICAL.

## ◆ rb_w32_getservbyname()

struct servent *WSAAPI rb_w32_getservbyname | ( | const char * | name,
|  | const char * | proto
| ) |  |

Definition at line 3962 of file win32.c.

References map_errno, name, NULL, and RUBY_CRITICAL.

## ◆ rb_w32_getservbyport()

struct servent *WSAAPI rb_w32_getservbyport | ( | int | port,
|  | const char * | proto
| ) |  |

Definition at line 3977 of file win32.c.

References map_errno, NULL, and RUBY_CRITICAL.

## ◆ rb_w32_getsockname()

int WSAAPI rb_w32_getsockname | ( | int | fd,
|  | struct sockaddr * | addr,
|  | int * | addrlen
| ) |  |

Definition at line 3409 of file win32.c.

References GET_FAMILY, map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_getsockopt()

int WSAAPI rb_w32_getsockopt | ( | int | s,
|  | int | level,
|  | int | optname,
|  | char * | optval,
|  | int * | optlen
| ) |  |

Definition at line 3439 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_inet_ntop()

const char *WSAAPI rb_w32_inet_ntop | ( | int | af,
|  | const void * | addr,
|  | char * | numaddr,
|  | size_t | numaddr_len
| ) |  |

Definition at line 7798 of file win32.c.

References in(), memcpy, NULL, and snprintf.

## ◆ rb_w32_inet_pton()

int WSAAPI rb_w32_inet_pton | ( | int | af,
|  | const char * | src,
|  | void * | dst
| ) |  |

Definition at line 7817 of file win32.c.

References int(), and NULL.

## ◆ rb_w32_io_cancelable_p()

int rb_w32_io_cancelable_p | ( | int | fd | ) |

Definition at line 2647 of file win32.c.

References is_socket, and TO_SOCKET.

## ◆ rb_w32_ioctlsocket()

int WSAAPI rb_w32_ioctlsocket | ( | int | s,
|  | long | cmd,
|  | u_long * | argp
| ) |  |

Definition at line 3454 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_is_socket()

int rb_w32_is_socket | ( | int | fd | ) |

Definition at line 2747 of file win32.c.

References is_socket, and TO_SOCKET.

## ◆ rb_w32_isatty()

int rb_w32_isatty | ( | int | fd | ) |

Definition at line 7754 of file win32.c.

References _osfhnd.

## ◆ rb_w32_listen()

int WSAAPI rb_w32_listen | ( | int | s,
|  | int | backlog
| ) |  |

Definition at line 3469 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_lseek()

off_t rb_w32_lseek | ( | int | fd,
|  | off_t | ofs,
|  | int | whence
| ) |  |

Definition at line 5863 of file win32.c.

References is_socket, and TO_SOCKET.

## ◆ rb_w32_lstati128()

int rb_w32_lstati128 | ( | const char * | path,
|  | struct stati128 * | st
| ) |  |

Definition at line 5856 of file win32.c.

References filecp, and TRUE.

## ◆ rb_w32_map_errno()

int rb_w32_map_errno | ( | DWORD | winerr | ) |

Definition at line 280 of file win32.c.

References int(), and winerr.

Referenced by rb_readlink().

## ◆ rb_w32_mbstr_to_wstr()

WCHAR * rb_w32_mbstr_to_wstr | ( | UINT | cp,
|  | const char * | str,
|  | int | clen,
|  | long * | plen
| ) |  |

Definition at line 2186 of file win32.c.

References len, malloc, NULL, ptr, and str.

Referenced by dln_load().

## ◆ rb_w32_mkdir()

int rb_w32_mkdir | ( | const char * | path,
|  | int | mode
| ) |  |

Definition at line 7578 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_open()

int rb_w32_open | ( | const char * | file,
|  | int | oflag,
|  |  | ...
| ) |  |

Definition at line 6246 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_osid()

DWORD rb_w32_osid | ( | void |  | ) |

## ◆ rb_w32_osver()

DWORD rb_w32_osver | ( | void |  | ) |

Definition at line 326 of file win32.c.

## ◆ rb_w32_pipe()

int rb_w32_pipe | ( | int | fds[2] | ) |

Definition at line 6477 of file win32.c.

References _set_osfhnd, _set_osflags, err, FALSE, FNOINHERIT, FOPEN, FPIPE, int(), INVALID_HANDLE_VALUE, map_errno, memcpy, name, NULL, prefix, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_close(), rb_w32_getpid(), RUBY_CRITICAL, and snprintf.

## ◆ rb_w32_read()

ssize_t rb_w32_read | ( | int | fd,
|  | void * | buf,
|  | size_t | size
| ) |  |

Definition at line 7056 of file win32.c.

References _osfhnd, _osfile, _set_osflags, err, EWOULDBLOCK, FALSE, FEOFLAG, FPIPE, FTEXT, is_socket, len, map_errno, NULL, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_recv(), rb_w32_wait_events_blocking(), read(), constat::state, TO_SOCKET, TRUE, and wait().

## ◆ rb_w32_recv()

int WSAAPI rb_w32_recv | ( | int | fd,
|  | char * | buf,
|  | int | len,
|  | int | flags
| ) |  |

Definition at line 3611 of file win32.c.

References len, NULL, and TRUE.

Referenced by rb_w32_read().

## ◆ rb_w32_recvfrom()

int WSAAPI rb_w32_recvfrom | ( | int | fd,
|  | char * | buf,
|  | int | len,
|  | int | flags,
|  | struct sockaddr * | from,
|  | int * | fromlen
| ) |  |

Definition at line 3618 of file win32.c.

References len, and TRUE.

## ◆ rb_w32_rename()

int rb_w32_rename | ( | const char * | from,
|  | const char * | to
| ) |  |

Definition at line 5389 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_rmdir()

int rb_w32_rmdir | ( | const char * | path | ) |

Definition at line 7613 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_select()

int WSAAPI rb_w32_select | ( | int | nfds,
|  | fd_set * | rd,
|  | fd_set * | wr,
|  | fd_set * | ex,
|  | struct timeval * | timeout
| ) |  |

Definition at line 3306 of file win32.c.

References rb_w32_select_with_thread().

## ◆ rb_w32_send()

int WSAAPI rb_w32_send | ( | int | fd,
|  | const char * | buf,
|  | int | len,
|  | int | flags
| ) |  |

Definition at line 3626 of file win32.c.

References FALSE, len, and NULL.

Referenced by rb_w32_write().

## ◆ rb_w32_sendto()

int WSAAPI rb_w32_sendto | ( | int | fd,
|  | const char * | buf,
|  | int | len,
|  | int | flags,
|  | const struct sockaddr * | to,
|  | int | tolen
| ) |  |

Definition at line 3633 of file win32.c.

References FALSE, and len.

## ◆ rb_w32_set_nonblock()

int rb_w32_set_nonblock | ( | int | fd | ) |

Definition at line 4446 of file win32.c.

References rb_w32_set_nonblock2(), and TRUE.

## ◆ rb_w32_setsockopt()

int WSAAPI rb_w32_setsockopt | ( | int | s,
|  | int | level,
|  | int | optname,
|  | const char * | optval,
|  | int | optlen
| ) |  |

Definition at line 3781 of file win32.c.

References map_errno, RUBY_CRITICAL, and TO_SOCKET.

## ◆ rb_w32_shutdown()

int WSAAPI rb_w32_shutdown | ( | int | s,
|  | int | how
| ) |  |

Definition at line 3796 of file win32.c.

References map_errno, RUBY_CRITICAL, shutdown, and TO_SOCKET.

## ◆ rb_w32_sleep()

int rb_w32_sleep | ( | unsigned long | msec | ) |

## ◆ rb_w32_Sleep()

int WINAPI rb_w32_Sleep | ( | unsigned long | msec | ) |

## ◆ rb_w32_socket()

int WSAAPI rb_w32_socket | ( | int | af,
|  | int | type,
|  | int | protocol
| ) |  |

Definition at line 3861 of file win32.c.

References MAKE_SOCKDATA, map_errno, O_BINARY, and RUBY_CRITICAL.

## ◆ rb_w32_spawn()

rb_pid_t rb_w32_spawn | ( | int | mode,
|  | const char * | cmd,
|  | const char * | prog
| ) |  |

Definition at line 1497 of file win32.c.

References filecp, and prog.

## ◆ rb_w32_stati128()

int rb_w32_stati128 | ( | const char * | path,
|  | struct stati128 * | st
| ) |  |

Definition at line 5828 of file win32.c.

References FALSE, and filecp.

## ◆ rb_w32_strerror()

char * rb_w32_strerror | ( | int | e | ) |

Definition at line 2762 of file win32.c.

References EADDRINUSE, err, EWOULDBLOCK, int(), memmove(), NULL, strerror(), strlcpy(), strlen(), sys_nerr, and winerr.

## ◆ rb_w32_sysinit()

void rb_w32_sysinit | ( | int * | argc,
|  | char *** | argv
| ) |  |

Definition at line 884 of file win32.c.

References argc, argv, and OnigEncodingUTF_8.

Referenced by ruby_sysinit().

## ◆ rb_w32_time_subtract()

int rb_w32_time_subtract | ( | struct timeval * | rest,
|  | const struct timeval * | wait
| ) |  |

Definition at line 3130 of file win32.c.

References timeval::tv_sec, timeval::tv_usec, and wait().

Referenced by rb_w32_select_with_thread().

## ◆ rb_w32_times()

int rb_w32_times | ( | struct tms * | tmbuf | ) |

Definition at line 5991 of file win32.c.

References tms::tms_cstime, tms::tms_cutime, tms::tms_stime, and tms::tms_utime.

## ◆ rb_w32_truncate()

int rb_w32_truncate | ( | const char * | path,
|  | off_t | length
| ) |  |

Definition at line 5962 of file win32.c.

References filecp.

## ◆ rb_w32_uaccess()

int rb_w32_uaccess | ( | const char * | path,
|  | int | mode
| ) |  |

Definition at line 5897 of file win32.c.

## ◆ rb_w32_uaspawn()

rb_pid_t rb_w32_uaspawn | ( | int | mode,
|  | const char * | prog,
|  | char *const * | argv
| ) |  |

Definition at line 1607 of file win32.c.

References argv, prog, and rb_w32_uaspawn_flags().

## ◆ rb_w32_uaspawn_flags()

rb_pid_t rb_w32_uaspawn_flags | ( | int | mode,
|  | const char * | prog,
|  | char *const * | argv,
|  | DWORD | flags
| ) |  |

Definition at line 1593 of file win32.c.

References argv, and prog.

Referenced by rb_w32_uaspawn().

## ◆ rb_w32_uchdir()

int rb_w32_uchdir | ( | const char * | path | ) |

Definition at line 7530 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_uchmod()

int rb_w32_uchmod | ( | const char * | path,
|  | int | mode
| ) |  |

Definition at line 7699 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_uchown()

int rb_w32_uchown | ( | const char * | path,
|  | int | owner,
|  | int | group
| ) |  |

Definition at line 4826 of file win32.c.

## ◆ rb_w32_ugetcwd()

char * rb_w32_ugetcwd | ( | char * | buffer,
|  | int | size
| ) |  |

Definition at line 4794 of file win32.c.

References NULL.

## ◆ rb_w32_ugetenv()

char * rb_w32_ugetenv | ( | const char * | name | ) |

Definition at line 5286 of file win32.c.

References name.

## ◆ rb_w32_ulink()

int rb_w32_ulink | ( | const char * | from,
|  | const char * | to
| ) |  |

Definition at line 4967 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_ulstati128()

int rb_w32_ulstati128 | ( | const char * | path,
|  | struct stati128 * | st
| ) |  |

Definition at line 5849 of file win32.c.

References TRUE.

## ◆ rb_w32_umkdir()

int rb_w32_umkdir | ( | const char * | path,
|  | int | mode
| ) |  |

Definition at line 7564 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_unlink()

int rb_w32_unlink | ( | const char * | path | ) |

Definition at line 7685 of file win32.c.

References filecp_to_wstr, free, and NULL.

## ◆ rb_w32_unwrap_io_handle()

int rb_w32_unwrap_io_handle | ( | int | fd | ) |

Definition at line 7983 of file win32.c.

References _set_osfhnd, INVALID_HANDLE_VALUE, is_socket, LK_LEN, NULL, and TO_SOCKET.

## ◆ rb_w32_uopen()

int rb_w32_uopen | ( | const char * | file,
|  | int | oflag,
|  |  | ...
| ) |  |

Definition at line 6212 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_ureadlink()

ssize_t rb_w32_ureadlink | ( | const char * | path,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Definition at line 5148 of file win32.c.

## ◆ rb_w32_urename()

int rb_w32_urename | ( | const char * | from,
|  | const char * | to
| ) |  |

Definition at line 5370 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_urmdir()

int rb_w32_urmdir | ( | const char * | path | ) |

Definition at line 7627 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_uspawn()

rb_pid_t rb_w32_uspawn | ( | int | mode,
|  | const char * | cmd,
|  | const char * | prog
| ) |  |

Definition at line 1505 of file win32.c.

References prog.

## ◆ rb_w32_ustati128()

int rb_w32_ustati128 | ( | const char * | path,
|  | struct stati128 * | st
| ) |  |

Definition at line 5821 of file win32.c.

References FALSE.

## ◆ rb_w32_usymlink()

int rb_w32_usymlink | ( | const char * | src,
|  | const char * | link
| ) |  |

Definition at line 5231 of file win32.c.

References link().

## ◆ rb_w32_utime()

int rb_w32_utime | ( | const char * | path,
|  | const struct utimbuf * | times
| ) |  |

Definition at line 7477 of file win32.c.

References utimbuf::actime, AT_FDCWD, filecp, utimbuf::modtime, timespec::tv_nsec, and timespec::tv_sec.

## ◆ rb_w32_utimensat()

int rb_w32_utimensat | ( | int | dirfd,
|  | const char * | path,
|  | const struct timespec * | times,
|  | int | flags
| ) |  |

Definition at line 7523 of file win32.c.

References filecp.

## ◆ rb_w32_utimes()

int rb_w32_utimes | ( | const char * | path,
|  | const struct timeval * | times
| ) |  |

Definition at line 7503 of file win32.c.

References AT_FDCWD, filecp, timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.

## ◆ rb_w32_utruncate()

int rb_w32_utruncate | ( | const char * | path,
|  | off_t | length
| ) |  |

Definition at line 5955 of file win32.c.

## ◆ rb_w32_uunlink()

int rb_w32_uunlink | ( | const char * | path | ) |

Definition at line 7671 of file win32.c.

References free, NULL, and utf8_to_wstr.

## ◆ rb_w32_uutime()

int rb_w32_uutime | ( | const char * | path,
|  | const struct utimbuf * | times
| ) |  |

Definition at line 7464 of file win32.c.

References utimbuf::actime, AT_FDCWD, utimbuf::modtime, timespec::tv_nsec, and timespec::tv_sec.

## ◆ rb_w32_uutimensat()

int rb_w32_uutimensat | ( | int | dirfd,
|  | const char * | path,
|  | const struct timespec * | times,
|  | int | flags
| ) |  |

Definition at line 7516 of file win32.c.

## ◆ rb_w32_uutimes()

int rb_w32_uutimes | ( | const char * | path,
|  | const struct timeval * | times
| ) |  |

Definition at line 7490 of file win32.c.

References AT_FDCWD, timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.

## ◆ rb_w32_wait_events_blocking()

int rb_w32_wait_events_blocking | ( | HANDLE * | events,
|  | int | num,
|  | DWORD | timeout
| ) |  |

Referenced by rb_w32_asynchronize(), rb_w32_read(), rb_w32_write(), and waitpid().

## ◆ rb_w32_wopen()

int rb_w32_wopen | ( | const WCHAR * | file,
|  | int | oflag,
|  |  | ...
| ) |  |

Definition at line 6266 of file win32.c.

## ◆ rb_w32_wrap_io_handle()

int rb_w32_wrap_io_handle | ( | HANDLE | h,
|  | int | flags
| ) |  |

Definition at line 7961 of file win32.c.

References f, len, and O_NONBLOCK.

## ◆ rb_w32_wreadlink()

ssize_t rb_w32_wreadlink | ( | const WCHAR * | ,
|  | WCHAR * | ,
|  | size_t |
| ) |  |

## ◆ rb_w32_write()

ssize_t rb_w32_write | ( | int | fd,
|  | const void * | buf,
|  | size_t | size
| ) |  |

Definition at line 7195 of file win32.c.

References _osfhnd, _osfile, err, EWOULDBLOCK, FDEV, FEOFLAG, fileno, 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(), TO_SOCKET, TRUE, and wait().

## ◆ rb_w32_write_console()

long rb_w32_write_console | ( | uintptr_t | strarg,
|  | int | fd
| ) |  |

Definition at line 7300 of file win32.c.

References _osfhnd, ECONV_INVALID_REPLACE, ECONV_UNDEF_REPLACE, ENABLE_VIRTUAL_TERMINAL_PROCESSING, ENCINDEX_ASCII, ENCINDEX_US_ASCII, ENCINDEX_UTF_16LE, ENCINDEX_UTF_8, ENCODING_GET, free, len, mbstr_to_wstr, NULL, ptr, Qnil, rb_econv_has_convpath_p(), rb_enc_from_index(), rb_enc_name, RB_GC_GUARD, rb_str_conv_enc_opts(), RSTRING_LEN, RSTRING_PTR, and str.

Referenced by rb_write_error2(), and rb_write_error_str().

## ◆ rb_w32_wstr_to_mbstr()

char * rb_w32_wstr_to_mbstr | ( | UINT | cp,
|  | const WCHAR * | wstr,
|  | int | clen,
|  | long * | plen
| ) |  |

Definition at line 2170 of file win32.c.

References len, malloc, NULL, and ptr.

## ◆ readlink()

ssize_t readlink | ( | const char * | path,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Definition at line 5155 of file win32.c.

References filecp.

## ◆ recvmsg()

int recvmsg | ( | int | fd,
|  | struct msghdr * | msg,
|  | int | flags
| ) |  |

Definition at line 3677 of file win32.c.

References WSAMSG::dwFlags, FALSE, GET_FLAGS, int(), len, map_errno, msghdr::msg_flags, msghdr::msg_name, msghdr::msg_namelen, msghdr_to_wsamsg, WSAMSG::name, WSAMSG::namelen, NULL, O_NONBLOCK, RUBY_CRITICAL, TO_SOCKET, TRUE, and WSAID_WSARECVMSG.

## ◆ sendmsg()

int sendmsg | ( | int | fd,
|  | const struct msghdr * | msg,
|  | int | flags
| ) |  |

Definition at line 3732 of file win32.c.

References FALSE, GET_FLAGS, int(), len, map_errno, msghdr_to_wsamsg, NULL, O_NONBLOCK, RUBY_CRITICAL, TO_SOCKET, TRUE, and WSAID_WSASENDMSG.

## ◆ setgid()

int setgid | ( | rb_gid_t | gid | ) |

Definition at line 2856 of file win32.c.

References ROOT_GID.

Referenced by rb_execarg_run_options().

## ◆ setuid()

int setuid | ( | rb_uid_t | uid | ) |

Definition at line 2849 of file win32.c.

References ROOT_UID.

Referenced by rb_execarg_run_options().

## ◆ socketpair()

int socketpair | ( | int | af,
|  | int | type,
|  | int | protocol,
|  | int * | sv
| ) |  |

Definition at line 4078 of file win32.c.

References MAKE_SOCKDATA, O_BINARY, and rb_w32_close().

## ◆ symlink()

int symlink | ( | const char * | src,
|  | const char * | link
| ) |  |

Definition at line 5238 of file win32.c.

References filecp, and link().

## ◆ waitpid()

rb_pid_t waitpid | ( | rb_pid_t | pid,
|  | int * | stat_loc,
|  | int | options
| ) |  |

Definition at line 4532 of file win32.c.

References count, END_FOREACH_CHILD, FOREACH_CHILD, map_errno, MAXCHILDNUM, rb_w32_wait_events_blocking(), and WNOHANG.

Referenced by wait().