Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
|
#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 | stat(path, st) rb_w32_stat(path,st) |
#define | fstat(fd, st) rb_w32_fstat(fd,st) |
#define | lstat(path, st) rb_w32_lstati128(path,st) |
#define | access(path, mode) rb_w32_access(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_truncate |
#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) |
#define access | ( | path, | |
mode | |||
) | rb_w32_access(path,mode) |
#define FD_CLR | ( | f, | |
s | |||
) | rb_w32_fdclr(f, s) |
#define FD_ISSET | ( | f, | |
s | |||
) | rb_w32_fdisset(f, s) |
#define FD_SET | ( | fd, | |
set | |||
) |
#define fstat | ( | fd, | |
st | |||
) | rb_w32_fstat(fd,st) |
#define ftruncate rb_w32_ftruncate |
#define INTPTR_MIN (-INTPTR_MAX-1) |
#define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */ |
#define truncate rb_w32_truncate |
Definition at line 4312 of file win32.c.
References arg, EBADF, errno, F_SETFL, is_socket, TO_SOCKET, va_arg, va_end, and va_start.
Referenced by dup2(), rb_cloexec_fcntl_dupfd(), rb_maygvl_fd_fix_cloexec(), rsock_detect_cloexec(), and rsock_make_fd_nonblock().
Definition at line 4206 of file win32.c.
References ifaddrs::ifa_addr, ifaddrs::ifa_name, ifaddrs::ifa_next, and ruby_xfree().
Definition at line 4628 of file win32.c.
Referenced by rb_timespec_now(), and rb_w32_select_with_thread().
Definition at line 3304 of file win32.c.
References RUBY_CRITICAL, and TO_SOCKET.
Definition at line 5839 of file win32.c.
References EACCES, errno, path, rb_w32_stati128, and stat::st_mode.
Definition at line 1593 of file win32.c.
References argv, and rb_w32_aspawn_flags().
Definition at line 1578 of file win32.c.
Referenced by rb_w32_aspawn().
uintptr_t rb_w32_asynchronize | ( | asynchronous_func_t | func, |
uintptr_t | self, | ||
int | argc, | ||
uintptr_t * | argv, | ||
uintptr_t | intrval | ||
) |
Definition at line 6007 of file win32.c.
References arg, argc, argv, FALSE, asynchronous_arg_t::func, NULL, and RUBY_CRITICAL.
Definition at line 3347 of file win32.c.
References EINPROGRESS, err, errno, map_errno, RUBY_CRITICAL, and TO_SOCKET.
Definition at line 6164 of file win32.c.
References dup2(), and set_new_std_fd.
Definition at line 2875 of file win32.c.
References RUBY_CRITICAL, and TO_SOCKET.
Definition at line 3891 of file win32.c.
References errno, gethostname(), len, map_errno, name, and RUBY_CRITICAL.
Definition at line 6117 of file win32.c.
Referenced by rb_w32_pipe().
struct protoent *WSAAPI rb_w32_getprotobynumber | ( | int | num | ) |
Definition at line 3383 of file win32.c.
References RUBY_CRITICAL, and TO_SOCKET.
Definition at line 7543 of file win32.c.
References filecp_to_wstr, NULL, and path.
Definition at line 6442 of file win32.c.
References _set_osfhnd, _set_osflags, EMFILE, err, errno, FALSE, FNOINHERIT, FOPEN, FPIPE, h, int, map_errno, memcpy(), name, NULL, PRI_PIDT_PREFIX, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_pid_t, rb_w32_close(), rb_w32_getpid(), RUBY_CRITICAL, and snprintf().
Definition at line 7021 of file win32.c.
References _osfile, _set_osflags, buf, err, FALSE, FEOFLAG, FTEXT, is_socket, len, rb_acrt_lowio_lock_fh, rb_acrt_lowio_unlock_fh, rb_w32_recv(), read(), size, TO_SOCKET, and wait().
Definition at line 3585 of file win32.c.
Referenced by rb_w32_read().
Definition at line 5363 of file win32.c.
References filecp_to_wstr, free, and NULL.
Definition at line 7578 of file win32.c.
References filecp_to_wstr, NULL, and path.
int WSAAPI rb_w32_select | ( | int | nfds, |
fd_set * | rd, | ||
fd_set * | wr, | ||
fd_set * | ex, | ||
struct timeval * | timeout | ||
) |
Definition at line 3280 of file win32.c.
References rb_w32_select_with_thread().
Definition at line 3600 of file win32.c.
Referenced by rb_w32_write().
Definition at line 4420 of file win32.c.
References rb_w32_set_nonblock2(), and TRUE.
Definition at line 3835 of file win32.c.
References RUBY_CRITICAL.
Definition at line 2736 of file win32.c.
References EADDRINUSE, EWOULDBLOCK, i, int, and sys_nerr.
Definition at line 877 of file win32.c.
Referenced by ruby_sysinit().
Definition at line 3104 of file win32.c.
References timeval::tv_sec, timeval::tv_usec, and wait().
Definition at line 5956 of file win32.c.
References exit(), and tms::tms_utime.
Definition at line 5854 of file win32.c.
References EACCES, errno, path, rb_w32_ustati128(), and stat::st_mode.
Definition at line 1600 of file win32.c.
References argv, and rb_w32_uaspawn_flags().
Definition at line 1586 of file win32.c.
Referenced by rb_w32_uaspawn().
Definition at line 4941 of file win32.c.
References free, NULL, and utf8_to_wstr.
Definition at line 7529 of file win32.c.
References NULL, path, and utf8_to_wstr.
Definition at line 7650 of file win32.c.
References filecp_to_wstr, NULL, and path.
Definition at line 5344 of file win32.c.
References free, NULL, and utf8_to_wstr.
Definition at line 7592 of file win32.c.
References NULL, path, and utf8_to_wstr.
Definition at line 5785 of file win32.c.
Referenced by rb_w32_uaccess().
Definition at line 7428 of file win32.c.
References utimbuf::actime, AT_FDCWD, utimbuf::modtime, path, rb_w32_utimensat(), timespec::tv_nsec, and timespec::tv_sec.
Definition at line 7481 of file win32.c.
References filecp_to_wstr, NULL, and path.
Referenced by rb_w32_utime(), and rb_w32_utimes().
Definition at line 7454 of file win32.c.
References AT_FDCWD, path, rb_w32_utimensat(), timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.
Definition at line 7636 of file win32.c.
References NULL, path, and utf8_to_wstr.
Definition at line 7415 of file win32.c.
References utimbuf::actime, AT_FDCWD, utimbuf::modtime, path, rb_w32_uutimensat(), timespec::tv_nsec, and timespec::tv_sec.
Definition at line 7467 of file win32.c.
References NULL, path, and utf8_to_wstr.
Referenced by rb_w32_uutime(), and rb_w32_uutimes().
Definition at line 7441 of file win32.c.
References AT_FDCWD, path, rb_w32_uutimensat(), timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.