Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

win32.h
Go to the documentation of this file.
1 #ifndef RUBY_WIN32_H
2 #define RUBY_WIN32_H 1
3
4 #if defined(__cplusplus)
5 extern "C" {
6 #if 0
7 } /* satisfy cc-mode */
8 #endif
9 #endif
10
11 RUBY_SYMBOL_EXPORT_BEGIN
12
13 /*
14 * Copyright (c) 1993, Intergraph Corporation
15 *
16 * You may distribute under the terms of either the GNU General Public
17 * License or the Artistic License, as specified in the perl README file.
18 *
19 */
20
21 /*
22 * Definitions for NT port of Perl
23 */
24
25
26 /*
27 * Ok now we can include the normal include files.
28 */
29
30 /* #include <stdarg.h> conflict with varargs.h? */
31 #if !defined(WSAAPI)
32 #if defined(__cplusplus) && defined(_MSC_VER)
33 extern "C++" { /* template without extern "C++" */
34 #endif
35 #if !defined(_WIN64) && !defined(WIN32)
36 #define WIN32
37 #endif
38 #if defined(_MSC_VER) && _MSC_VER <= 1200
39 #include <windows.h>
40 #endif
41 #include <winsock2.h>
42 #include <ws2tcpip.h>
43 #if !defined(_MSC_VER) || _MSC_VER >= 1400
44 #include <iphlpapi.h>
45 #endif
46 #if defined(__cplusplus) && defined(_MSC_VER)
47 }
48 #endif
49 #endif
50
51 /*
52 * We're not using Microsoft's "extensions" to C for
53 * Structured Exception Handling (SEH) so we can nuke these
54 */
55 #undef try
56 #undef except
57 #undef finally
58 #undef leave
59
60 #include <stdio.h>
61 #include <stdlib.h>
62 #include <string.h>
63 #include <direct.h>
64 #include <process.h>
65 #include <time.h>
66 #if defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER == 1200
67 extern "C++" { /* template without extern "C++" */
68 #endif
69 #include <math.h>
70 #if defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER == 1200
71 }
72 #endif
73 #include <signal.h>
74 #include <sys/stat.h>
75 #include <sys/types.h>
76 #ifdef HAVE_SYS_UTIME_H
77 # include <sys/utime.h>
78 #else
79 # include <utime.h>
80 #endif
81 #include <io.h>
82 #include <malloc.h>
83 #if defined __MINGW32__
84 # include <stdint.h>
85 #else
86 # if !defined(_INTPTR_T_DEFINED)
87 # ifdef _WIN64
88 typedef __int64 intptr_t;
89 # else
90 typedef int intptr_t;
91 # endif
92 # define _INTPTR_T_DEFINED
93 # endif
94 # if !defined(INTPTR_MAX)
95 # ifdef _WIN64
96 # define INTPTR_MAX 9223372036854775807I64
97 # else
98 # define INTPTR_MAX 2147483647
99 # endif
100 # define INTPTR_MIN (-INTPTR_MAX-1)
101 # endif
102 # if !defined(_UINTPTR_T_DEFINED)
103 # ifdef _WIN64
104 typedef unsigned __int64 uintptr_t;
105 # else
106 typedef unsigned int uintptr_t;
107 # endif
108 # define _UINTPTR_T_DEFINED
109 # endif
110 # if !defined(UINTPTR_MAX)
111 # ifdef _WIN64
112 # define UINTPTR_MAX 18446744073709551615UI64
113 # else
114 # define UINTPTR_MAX 4294967295U
115 # endif
116 # endif
117 #endif
118 #ifndef __MINGW32__
119 # define mode_t int
120 #endif
121 #ifdef HAVE_UNISTD_H
122 # include <unistd.h>
123 #endif
124
125 #define rb_w32_iswinnt() TRUE
126 #define rb_w32_iswin95() FALSE
127
128 #define WNOHANG -1
129
130 #define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */
131
132 typedef int clockid_t;
133 #define CLOCK_REALTIME 0
134 #define CLOCK_MONOTONIC 1
135
136 #undef utime
137 #undef lseek
138 #undef stat
139 #undef fstat
140 #ifdef RUBY_EXPORT
141 #define utime(_p, _t) rb_w32_utime(_p, _t)
142 #undef HAVE_UTIMES
143 #define HAVE_UTIMES 1
144 #define utimes(_p, _t) rb_w32_utimes(_p, _t)
145 #undef HAVE_UTIMENSAT
146 #define HAVE_UTIMENSAT 1
147 #define AT_FDCWD -100
148 #define utimensat(_d, _p, _t, _f) rb_w32_utimensat(_d, _p, _t, _f)
149 #define lseek(_f, _o, _w) rb_w32_lseek(_f, _o, _w)
150
151 #define pipe(p) rb_w32_pipe(p)
152 #define open rb_w32_open
153 #define close(h) rb_w32_close(h)
154 #define fclose(f) rb_w32_fclose(f)
155 #define read(f, b, s) rb_w32_read(f, b, s)
156 #define write(f, b, s) rb_w32_write(f, b, s)
157 #define getpid() rb_w32_getpid()
158 #define getppid() rb_w32_getppid()
159 #define sleep(x) rb_w32_Sleep((x)*1000)
160 #define Sleep(msec) (void)rb_w32_Sleep(msec)
161
162 #undef execv
163 #define execv(path,argv) rb_w32_aspawn(P_OVERLAY,path,argv)
164 #undef isatty
165 #define isatty(h) rb_w32_isatty(h)
166
167 #undef mkdir
168 #define mkdir(p, m) rb_w32_mkdir(p, m)
169 #undef rmdir
170 #define rmdir(p) rb_w32_rmdir(p)
171 #undef unlink
172 #define unlink(p) rb_w32_unlink(p)
173 #endif /* RUBY_EXPORT */
174
175 /* same with stati64 except the size of st_ino and nanosecond timestamps */
176 struct stati128 {
177 _dev_t st_dev;
178 unsigned __int64 st_ino;
179 __int64 st_inohigh;
180 unsigned short st_mode;
181 short st_nlink;
182 short st_uid;
183 short st_gid;
184 _dev_t st_rdev;
185 __int64 st_size;
186 __time64_t st_atime;
187 long st_atimensec;
188 __time64_t st_mtime;
189 long st_mtimensec;
190 __time64_t st_ctime;
191 long st_ctimensec;
192 };
193
194 #if SIZEOF_OFF_T == 8
195 #define off_t __int64
196 #define stat stati128
197 #undef SIZEOF_STRUCT_STAT_ST_INO
198 #define SIZEOF_STRUCT_STAT_ST_INO sizeof(unsigned __int64)
199 #define HAVE_STRUCT_STAT_ST_INOHIGH
200 #define HAVE_STRUCT_STAT_ST_ATIMENSEC
201 #define HAVE_STRUCT_STAT_ST_MTIMENSEC
202 #define HAVE_STRUCT_STAT_ST_CTIMENSEC
203 #define fstat(fd,st) rb_w32_fstati128(fd,st)
204 #define stati128(path, st) rb_w32_stati128(path,st)
205 #else
206 #define stat(path,st) rb_w32_stat(path,st)
207 #define fstat(fd,st) rb_w32_fstat(fd,st)
208 extern int rb_w32_stat(const char *, struct stat *);
209 extern int rb_w32_fstat(int, struct stat *);
210 #endif
211 #define lstat(path,st) rb_w32_lstati128(path,st)
212 #define access(path,mode) rb_w32_access(path,mode)
213
214 #define strcasecmp _stricmp
215 #define strncasecmp _strnicmp
216 #define fsync _commit
217
218 struct timezone;
219
220 #ifdef __MINGW32__
221 #undef isascii
222 #define isascii __isascii
223 #endif
224
225 struct iovec {
226 void *iov_base;
227 size_t iov_len;
228 };
229 struct msghdr {
230 void *msg_name;
231 int msg_namelen;
232 struct iovec *msg_iov;
233 int msg_iovlen;
234 void *msg_control;
235 int msg_controllen;
236 int msg_flags;
237 };
238
239 /* for getifaddrs() and others */
240 struct ifaddrs {
241 struct ifaddrs *ifa_next;
242 char *ifa_name;
243 u_int ifa_flags;
244 struct sockaddr *ifa_addr;
245 struct sockaddr *ifa_netmask;
246 struct sockaddr *ifa_broadaddr;
247 struct sockaddr *ifa_dstaddr;
248 void *ifa_data;
249 };
250 #ifdef IF_NAMESIZE
251 #define IFNAMSIZ IF_NAMESIZE
252 #else
253 #define IFNAMSIZ 256
254 #endif
255 #ifdef IFF_POINTTOPOINT
256 #define IFF_POINTOPOINT IFF_POINTTOPOINT
257 #endif
258
259 extern void rb_w32_sysinit(int *, char ***);
260 extern DWORD rb_w32_osid(void);
261 extern rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *, int *);
262 extern int flock(int fd, int oper);
263 extern int rb_w32_io_cancelable_p(int);
264 extern int rb_w32_is_socket(int);
265 extern int WSAAPI rb_w32_accept(int, struct sockaddr *, int *);
266 extern int WSAAPI rb_w32_bind(int, const struct sockaddr *, int);
267 extern int WSAAPI rb_w32_connect(int, const struct sockaddr *, int);
268 extern void rb_w32_fdset(int, fd_set*);
269 extern void rb_w32_fdclr(int, fd_set*);
270 extern int rb_w32_fdisset(int, fd_set*);
271 extern int WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
272 extern int WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *);
273 extern int WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *);
274 extern int WSAAPI rb_w32_getsockopt(int, int, int, char *, int *);
275 extern int WSAAPI rb_w32_ioctlsocket(int, long, u_long *);
276 extern int WSAAPI rb_w32_listen(int, int);
277 extern int WSAAPI rb_w32_recv(int, char *, int, int);
278 extern int WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
279 extern int WSAAPI rb_w32_send(int, const char *, int, int);
280 extern int WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
281 extern int recvmsg(int, struct msghdr *, int);
282 extern int sendmsg(int, const struct msghdr *, int);
283 extern int WSAAPI rb_w32_setsockopt(int, int, int, const char *, int);
284 extern int WSAAPI rb_w32_shutdown(int, int);
285 extern int WSAAPI rb_w32_socket(int, int, int);
286 extern SOCKET rb_w32_get_osfhandle(int);
287 extern struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int);
288 extern struct hostent *WSAAPI rb_w32_gethostbyname(const char *);
289 extern int WSAAPI rb_w32_gethostname(char *, int);
290 extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
291 extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
292 extern struct servent *WSAAPI rb_w32_getservbyname(const char *, const char *);
293 extern struct servent *WSAAPI rb_w32_getservbyport(int, const char *);
294 extern int socketpair(int, int, int, int *);
295 extern int getifaddrs(struct ifaddrs **);
296 extern void freeifaddrs(struct ifaddrs *);
297 extern char * rb_w32_getcwd(char *, int);
298 extern char * rb_w32_ugetenv(const char *);
299 extern char * rb_w32_getenv(const char *);
300 extern int rb_w32_rename(const char *, const char *);
301 extern int rb_w32_urename(const char *, const char *);
302 extern char **rb_w32_get_environ(void);
303 extern void rb_w32_free_environ(char **);
304 extern int rb_w32_map_errno(DWORD);
305 extern const char *WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t);
306 extern int WSAAPI rb_w32_inet_pton(int,const char *,void *);
307 extern DWORD rb_w32_osver(void);
308
309 extern int chown(const char *, int, int);
310 extern int rb_w32_uchown(const char *, int, int);
311 extern int link(const char *, const char *);
312 extern int rb_w32_ulink(const char *, const char *);
313 extern ssize_t readlink(const char *, char *, size_t);
314 extern ssize_t rb_w32_ureadlink(const char *, char *, size_t);
315 extern ssize_t rb_w32_wreadlink(const WCHAR *, WCHAR *, size_t);
316 extern int symlink(const char *src, const char *link);
317 extern int rb_w32_usymlink(const char *src, const char *link);
318 extern int gettimeofday(struct timeval *, struct timezone *);
319 extern int clock_gettime(clockid_t, struct timespec *);
320 extern int clock_getres(clockid_t, struct timespec *);
321 extern rb_pid_t waitpid (rb_pid_t, int *, int);
322 extern rb_pid_t rb_w32_spawn(int, const char *, const char*);
323 extern rb_pid_t rb_w32_aspawn(int, const char *, char *const *);
324 extern rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD);
325 extern rb_pid_t rb_w32_uspawn(int, const char *, const char*);
326 extern rb_pid_t rb_w32_uaspawn(int, const char *, char *const *);
327 extern rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD);
328 extern int kill(int, int);
329 extern int fcntl(int, int, ...);
330 extern int rb_w32_set_nonblock(int);
331 extern rb_pid_t rb_w32_getpid(void);
332 extern rb_pid_t rb_w32_getppid(void);
333 extern int rb_w32_isatty(int);
334 extern int rb_w32_uchdir(const char *);
335 extern int rb_w32_mkdir(const char *, int);
336 extern int rb_w32_umkdir(const char *, int);
337 extern int rb_w32_rmdir(const char *);
338 extern int rb_w32_urmdir(const char *);
339 extern int rb_w32_unlink(const char *);
340 extern int rb_w32_uunlink(const char *);
341 extern int rb_w32_uchmod(const char *, int);
342 extern int rb_w32_stati128(const char *, struct stati128 *);
343 extern int rb_w32_ustati128(const char *, struct stati128 *);
344 extern int rb_w32_lstati128(const char *, struct stati128 *);
345 extern int rb_w32_ulstati128(const char *, struct stati128 *);
346 extern int rb_w32_access(const char *, int);
347 extern int rb_w32_uaccess(const char *, int);
348 extern char rb_w32_fd_is_text(int);
349 extern int rb_w32_fstati128(int, struct stati128 *);
350 extern int rb_w32_dup2(int, int);
351
352 #include <float.h>
353
354 #if defined _MSC_VER && _MSC_VER >= 1800 && defined INFINITY
355 #pragma warning(push)
356 #pragma warning(disable:4756)
357 static inline float
358 rb_infinity_float(void)
359 {
360 return INFINITY;
361 }
362 #pragma warning(pop)
363 #undef INFINITY
364 #define INFINITY rb_infinity_float()
365 #endif
366
367 #if !defined __MINGW32__ || defined __NO_ISOCEXT
368 #ifndef isnan
369 #define isnan(x) _isnan(x)
370 #endif
371 static inline int
372 finite(double x)
373 {
374 return _finite(x);
375 }
376 #ifndef copysign
377 #define copysign(a, b) _copysign(a, b)
378 #endif
379 static inline double
380 scalb(double a, long b)
381 {
382 return _scalb(a, b);
383 }
384 #else
385 __declspec(dllimport) extern int finite(double);
386 #endif
387
388 #if !defined S_IFIFO && defined _S_IFIFO
389 #define S_IFIFO _S_IFIFO
390 #endif
391
392 #if !defined S_IRUSR && !defined __MINGW32__
393 #define S_IRUSR 0400
394 #endif
395 #ifndef S_IRGRP
396 #define S_IRGRP 0040
397 #endif
398 #ifndef S_IROTH
399 #define S_IROTH 0004
400 #endif
401
402 #if !defined S_IWUSR && !defined __MINGW32__
403 #define S_IWUSR 0200
404 #endif
405 #ifndef S_IWGRP
406 #define S_IWGRP 0020
407 #endif
408 #ifndef S_IWOTH
409 #define S_IWOTH 0002
410 #endif
411
412 #if !defined S_IXUSR && !defined __MINGW32__
413 #define S_IXUSR 0100
414 #endif
415 #ifndef S_IXGRP
416 #define S_IXGRP 0010
417 #endif
418 #ifndef S_IXOTH
419 #define S_IXOTH 0001
420 #endif
421
422 #define S_IFLNK 0xa000
423
424 /*
425 * define this so we can do inplace editing
426 */
427
428 #define SUFFIX
429
430 extern int rb_w32_ftruncate(int fd, off_t length);
431 extern int rb_w32_truncate(const char *path, off_t length);
432 extern int rb_w32_utruncate(const char *path, off_t length);
433
434 #undef HAVE_FTRUNCATE
435 #define HAVE_FTRUNCATE 1
436 #if defined HAVE_FTRUNCATE64
437 #define ftruncate ftruncate64
438 #else
439 #define ftruncate rb_w32_ftruncate
440 #endif
441
442 #undef HAVE_TRUNCATE
443 #define HAVE_TRUNCATE 1
444 #if defined HAVE_TRUNCATE64
445 #define truncate truncate64
446 #else
447 #define truncate rb_w32_truncate
448 #endif
449
450 #if defined(_MSC_VER) && _MSC_VER >= 1400 && _MSC_VER < 1800
451 #define strtoll _strtoi64
452 #define strtoull _strtoui64
453 #endif
454
455 /*
456 * stubs
457 */
458 extern int ioctl (int, int, ...);
459 extern rb_uid_t getuid (void);
460 extern rb_uid_t geteuid (void);
461 extern rb_gid_t getgid (void);
462 extern rb_gid_t getegid (void);
463 extern int setuid (rb_uid_t);
464 extern int setgid (rb_gid_t);
465
466 extern char *rb_w32_strerror(int);
467
468 #ifdef RUBY_EXPORT
469 #define strerror(e) rb_w32_strerror(e)
470 #endif
471
472 #define PIPE_BUF 1024
473
474 #define LOCK_SH 1
475 #define LOCK_EX 2
476 #define LOCK_NB 4
477 #define LOCK_UN 8
478
479
480 #ifndef SIGINT
481 #define SIGINT 2
482 #endif
483 #ifndef SIGKILL
484 #define SIGKILL 9
485 #endif
486
487
488 /* #undef va_start */
489 /* #undef va_end */
490
491 /* winsock error map */
492 #include <errno.h>
493
494 #ifndef EWOULDBLOCK
495 # define EWOULDBLOCK WSAEWOULDBLOCK
496 #endif
497 #ifndef EINPROGRESS
498 # define EINPROGRESS WSAEINPROGRESS
499 #endif
500 #ifndef EALREADY
501 # define EALREADY WSAEALREADY
502 #endif
503 #ifndef ENOTSOCK
504 # define ENOTSOCK WSAENOTSOCK
505 #endif
506 #ifndef EDESTADDRREQ
507 # define EDESTADDRREQ WSAEDESTADDRREQ
508 #endif
509 #ifndef EMSGSIZE
510 # define EMSGSIZE WSAEMSGSIZE
511 #endif
512 #ifndef EPROTOTYPE
513 # define EPROTOTYPE WSAEPROTOTYPE
514 #endif
515 #ifndef ENOPROTOOPT
516 # define ENOPROTOOPT WSAENOPROTOOPT
517 #endif
518 #ifndef EPROTONOSUPPORT
519 # define EPROTONOSUPPORT WSAEPROTONOSUPPORT
520 #endif
521 #ifndef ESOCKTNOSUPPORT
522 # define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
523 #endif
524 #ifndef EOPNOTSUPP
525 # define EOPNOTSUPP WSAEOPNOTSUPP
526 #endif
527 #ifndef EPFNOSUPPORT
528 # define EPFNOSUPPORT WSAEPFNOSUPPORT
529 #endif
530 #ifndef EAFNOSUPPORT
531 # define EAFNOSUPPORT WSAEAFNOSUPPORT
532 #endif
533 #ifndef EADDRINUSE
534 # define EADDRINUSE WSAEADDRINUSE
535 #endif
536 #ifndef EADDRNOTAVAIL
537 # define EADDRNOTAVAIL WSAEADDRNOTAVAIL
538 #endif
539 #ifndef ENETDOWN
540 # define ENETDOWN WSAENETDOWN
541 #endif
542 #ifndef ENETUNREACH
543 # define ENETUNREACH WSAENETUNREACH
544 #endif
545 #ifndef ENETRESET
546 # define ENETRESET WSAENETRESET
547 #endif
548 #ifndef ECONNABORTED
549 # define ECONNABORTED WSAECONNABORTED
550 #endif
551 #ifndef ECONNRESET
552 # define ECONNRESET WSAECONNRESET
553 #endif
554 #ifndef ENOBUFS
555 # define ENOBUFS WSAENOBUFS
556 #endif
557 #ifndef EISCONN
558 # define EISCONN WSAEISCONN
559 #endif
560 #ifndef ENOTCONN
561 # define ENOTCONN WSAENOTCONN
562 #endif
563 #ifndef ESHUTDOWN
564 # define ESHUTDOWN WSAESHUTDOWN
565 #endif
566 #ifndef ETOOMANYREFS
567 # define ETOOMANYREFS WSAETOOMANYREFS
568 #endif
569 #ifndef ETIMEDOUT
570 # define ETIMEDOUT WSAETIMEDOUT
571 #endif
572 #ifndef ECONNREFUSED
573 # define ECONNREFUSED WSAECONNREFUSED
574 #endif
575 #ifndef ELOOP
576 # define ELOOP WSAELOOP
577 #endif
578 /*#define ENAMETOOLONG WSAENAMETOOLONG*/
579 #ifndef EHOSTDOWN
580 # define EHOSTDOWN WSAEHOSTDOWN
581 #endif
582 #ifndef EHOSTUNREACH
583 # define EHOSTUNREACH WSAEHOSTUNREACH
584 #endif
585 /*#define ENOTEMPTY WSAENOTEMPTY*/
586 #ifndef EPROCLIM
587 # define EPROCLIM WSAEPROCLIM
588 #endif
589 #ifndef EUSERS
590 # define EUSERS WSAEUSERS
591 #endif
592 #ifndef EDQUOT
593 # define EDQUOT WSAEDQUOT
594 #endif
595 #ifndef ESTALE
596 # define ESTALE WSAESTALE
597 #endif
598 #ifndef EREMOTE
599 # define EREMOTE WSAEREMOTE
600 #endif
601
602 #define F_DUPFD 0
603 #define F_GETFD 1
604 #define F_SETFD 2
605 #if 0
606 #define F_GETFL 3
607 #endif
608 #define F_SETFL 4
609 #define F_DUPFD_CLOEXEC 67
610 #define FD_CLOEXEC 1 /* F_GETFD, F_SETFD */
611 #define O_NONBLOCK 1
612
613 #undef FD_SET
614 #define FD_SET(fd, set) do {\
615 unsigned int i;\
616 SOCKET s = _get_osfhandle(fd);\
617 \
618 for (i = 0; i < (set)->fd_count; i++) {\
619 if ((set)->fd_array[i] == s) {\
620 break;\
621 }\
622 }\
623 if (i == (set)->fd_count) {\
624 if ((set)->fd_count < FD_SETSIZE) {\
625 (set)->fd_array[i] = s;\
626 (set)->fd_count++;\
627 }\
628 }\
629 } while(0)
630
631 #undef FD_CLR
632 #define FD_CLR(f, s) rb_w32_fdclr(f, s)
633
634 #undef FD_ISSET
635 #define FD_ISSET(f, s) rb_w32_fdisset(f, s)
636
637 #ifdef RUBY_EXPORT
638 #undef inet_ntop
639 #define inet_ntop(f,a,n,l) rb_w32_inet_ntop(f,a,n,l)
640
641 #undef inet_pton
642 #define inet_pton(f,s,d) rb_w32_inet_pton(f,s,d)
643
644 #undef accept
645 #define accept(s, a, l) rb_w32_accept(s, a, l)
646
647 #undef bind
648 #define bind(s, a, l) rb_w32_bind(s, a, l)
649
650 #undef connect
651 #define connect(s, a, l) rb_w32_connect(s, a, l)
652
653 #undef select
654 #define select(n, r, w, e, t) rb_w32_select(n, r, w, e, t)
655
656 #undef getpeername
657 #define getpeername(s, a, l) rb_w32_getpeername(s, a, l)
658
659 #undef getsockname
660 #define getsockname(s, a, l) rb_w32_getsockname(s, a, l)
661
662 #undef getsockopt
663 #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)
664
665 #undef ioctlsocket
666 #define ioctlsocket(s, c, a) rb_w32_ioctlsocket(s, c, a)
667
668 #undef listen
669 #define listen(s, b) rb_w32_listen(s, b)
670
671 #undef recv
672 #define recv(s, b, l, f) rb_w32_recv(s, b, l, f)
673
674 #undef recvfrom
675 #define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)
676
677 #undef send
678 #define send(s, b, l, f) rb_w32_send(s, b, l, f)
679
680 #undef sendto
681 #define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)
682
683 #undef setsockopt
684 #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
685
686 #undef shutdown
687 #define shutdown(s, h) rb_w32_shutdown(s, h)
688
689 #undef socket
690 #define socket(s, t, p) rb_w32_socket(s, t, p)
691
692 #undef gethostbyaddr
693 #define gethostbyaddr(a, l, t) rb_w32_gethostbyaddr(a, l, t)
694
695 #undef gethostbyname
696 #define gethostbyname(n) rb_w32_gethostbyname(n)
697
698 #undef gethostname
699 #define gethostname(n, l) rb_w32_gethostname(n, l)
700
701 #undef getprotobyname
702 #define getprotobyname(n) rb_w32_getprotobyname(n)
703
704 #undef getprotobynumber
705 #define getprotobynumber(n) rb_w32_getprotobynumber(n)
706
707 #undef getservbyname
708 #define getservbyname(n, p) rb_w32_getservbyname(n, p)
709
710 #undef getservbyport
711 #define getservbyport(p, pr) rb_w32_getservbyport(p, pr)
712
713 #undef get_osfhandle
714 #define get_osfhandle(h) rb_w32_get_osfhandle(h)
715
716 #undef getcwd
717 #define getcwd(b, s) rb_w32_getcwd(b, s)
718
719 #undef getenv
720 #define getenv(n) rb_w32_getenv(n)
721
722 #undef rename
723 #define rename(o, n) rb_w32_rename(o, n)
724
725 #undef times
726 #define times(t) rb_w32_times(t)
727
728 #undef dup2
729 #define dup2(o, n) rb_w32_dup2(o, n)
730 #endif
731
732 struct tms {
733 long tms_utime;
734 long tms_stime;
735 long tms_cutime;
736 long tms_cstime;
737 };
738
739 int rb_w32_times(struct tms *);
740
741 struct tm *gmtime_r(const time_t *, struct tm *);
742 struct tm *localtime_r(const time_t *, struct tm *);
743
744 /* thread stuff */
745 int rb_w32_sleep(unsigned long msec);
746 int rb_w32_open(const char *, int, ...);
747 int rb_w32_uopen(const char *, int, ...);
748 int rb_w32_wopen(const WCHAR *, int, ...);
749 int rb_w32_close(int);
750 int rb_w32_fclose(FILE*);
751 int rb_w32_pipe(int[2]);
752 ssize_t rb_w32_read(int, void *, size_t);
753 ssize_t rb_w32_write(int, const void *, size_t);
754 off_t rb_w32_lseek(int, off_t, int);
755 int rb_w32_utime(const char *, const struct utimbuf *);
756 int rb_w32_uutime(const char *, const struct utimbuf *);
757 int rb_w32_utimes(const char *, const struct timeval *);
758 int rb_w32_uutimes(const char *, const struct timeval *);
759 int rb_w32_utimensat(int /* must be AT_FDCWD */, const char *, const struct timespec *, int /* must be 0 */);
760 int rb_w32_uutimensat(int /* must be AT_FDCWD */, const char *, const struct timespec *, int /* must be 0 */);
761 long rb_w32_write_console(uintptr_t, int); /* use uintptr_t instead of VALUE because it's not defined yet here */
762 int WINAPI rb_w32_Sleep(unsigned long msec);
763 int rb_w32_wait_events_blocking(HANDLE *events, int num, DWORD timeout);
764 int rb_w32_time_subtract(struct timeval *rest, const struct timeval *wait);
765 int rb_w32_wrap_io_handle(HANDLE, int);
766 int rb_w32_unwrap_io_handle(int);
767 WCHAR *rb_w32_mbstr_to_wstr(UINT, const char *, int, long *);
768 char *rb_w32_wstr_to_mbstr(UINT, const WCHAR *, int, long *);
769
770 /*
771 == ***CAUTION***
772 Since this function is very dangerous, ((*NEVER*))
773 * lock any HANDLEs(i.e. Mutex, Semaphore, CriticalSection and so on) or,
774 * use anything like rb_thread_call_without_gvl,
775 in asynchronous_func_t.
776 */
777 typedef uintptr_t (*asynchronous_func_t)(uintptr_t self, int argc, uintptr_t* argv);
778 uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc, uintptr_t* argv, uintptr_t intrval);
779
780 RUBY_SYMBOL_EXPORT_END
781
782 #if (defined(__MINGW64_VERSION_MAJOR) || defined(__MINGW64__)) && !defined(__cplusplus)
783 #ifdef RUBY_MINGW64_BROKEN_FREXP_MODF
784 /* License: Ruby's */
785 /* get rid of bugs in math.h of mingw */
786 #define frexp(_X, _Y) __extension__ ({\
787 int intpart_frexp_bug = intpart_frexp_bug;\
788 double result_frexp_bug = frexp((_X), &intpart_frexp_bug);\
789 *(_Y) = intpart_frexp_bug;\
790 result_frexp_bug;\
791 })
792 /* License: Ruby's */
793 #define modf(_X, _Y) __extension__ ({\
794 double intpart_modf_bug = intpart_modf_bug;\
795 double result_modf_bug = modf((_X), &intpart_modf_bug);\
796 *(_Y) = intpart_modf_bug;\
797 result_modf_bug;\
798 })
799 #endif
800
801 #if defined(__MINGW64__)
802 /*
803 * Use powl() instead of broken pow() of x86_64-w64-mingw32.
804 * This workaround will fix test failures in test_bignum.rb,
805 * test_fixnum.rb and test_float.rb etc.
806 */
807 static inline double
808 rb_w32_pow(double x, double y)
809 {
810 return (double)powl(x, y);
811 }
812 #elif defined(__MINGW64_VERSION_MAJOR)
813 double rb_w32_pow(double x, double y);
814 #endif
815 #define pow rb_w32_pow
816 #endif
817
818 #if defined(__cplusplus)
819 #if 0
820 { /* satisfy cc-mode */
821 #endif
822 } /* extern "C" { */
823 #endif
824
825 #endif /* RUBY_WIN32_H */
rb_w32_map_errno
int rb_w32_map_errno(DWORD)
Definition: win32.c:273
rb_w32_getprotobyname
struct protoent *WSAAPI rb_w32_getprotobyname(const char *)
Definition: win32.c:3876
stati128::st_ctime
__time64_t st_ctime
Definition: win32.h:190
rb_w32_bind
int WSAAPI rb_w32_bind(int, const struct sockaddr *, int)
Definition: win32.c:3301
getifaddrs
int getifaddrs(struct ifaddrs **)
Definition: win32.c:4089
RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
rb_w32_spawn
rb_pid_t rb_w32_spawn(int, const char *, const char *)
Definition: win32.c:1460
fd_set
#define fd_set
Definition: rb_mjit_min_header-2.7.0.h:1271
stat
Definition: rb_mjit_min_header-2.7.0.h:2384
rb_w32_ulstati128
int rb_w32_ulstati128(const char *, struct stati128 *)
Definition: win32.c:5783
time_t
long time_t
Definition: rb_mjit_min_header-2.7.0.h:1236
powl
long double powl(long double, long double)
timezone
Definition: missing.h:67
rb_w32_aspawn
rb_pid_t rb_w32_aspawn(int, const char *, char *const *)
Definition: win32.c:1563
ifaddrs::ifa_broadaddr
struct sockaddr * ifa_broadaddr
Definition: win32.h:246
stati128::st_uid
short st_uid
Definition: win32.h:182
u_int
unsigned int u_int
Definition: rb_mjit_min_header-2.7.0.h:1291
rb_w32_asynchronize
uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc, uintptr_t *argv, uintptr_t intrval)
Definition: win32.c:5977
path
VALUE path
Definition: rb_mjit_min_header-2.7.0.h:7351
rb_w32_stat
int rb_w32_stat(const char *, struct stat *)
Definition: win32.c:5687
rb_w32_wopen
int rb_w32_wopen(const WCHAR *, int,...)
Definition: win32.c:6201
rb_w32_wstr_to_mbstr
char * rb_w32_wstr_to_mbstr(UINT, const WCHAR *, int, long *)
Definition: win32.c:2133
rb_w32_gethostname
int WSAAPI rb_w32_gethostname(char *, int)
Definition: win32.c:3861
rb_w32_pipe_exec
rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *, int *)
rb_w32_accept
int WSAAPI rb_w32_accept(int, struct sockaddr *, int *)
Definition: win32.c:3274
stati128::st_atimensec
long st_atimensec
Definition: win32.h:187
clock_getres
int clock_getres(clockid_t, struct timespec *)
Definition: win32.c:4652
rb_w32_mkdir
int rb_w32_mkdir(const char *, int)
Definition: win32.c:7503
rb_w32_getpid
rb_pid_t rb_w32_getpid(void)
Definition: win32.c:6087
rb_w32_rmdir
int rb_w32_rmdir(const char *)
Definition: win32.c:7538
rb_w32_strerror
char * rb_w32_strerror(int)
Definition: win32.c:2706
rb_w32_write_console
long rb_w32_write_console(uintptr_t, int)
Definition: win32.c:7225
rb_w32_getservbyname
struct servent *WSAAPI rb_w32_getservbyname(const char *, const char *)
Definition: win32.c:3906
tms::tms_stime
long tms_stime
Definition: win32.h:734
stati128
Definition: win32.h:176
rb_w32_fdisset
int rb_w32_fdisset(int, fd_set *)
Definition: win32.c:2845
rb_w32_open
int rb_w32_open(const char *, int,...)
Definition: win32.c:6181
rb_w32_uutimes
int rb_w32_uutimes(const char *, const struct timeval *)
Definition: win32.c:7401
INFINITY
#define INFINITY
Definition: missing.h:149
setuid
int setuid(rb_uid_t)
Definition: win32.c:2793
tms::tms_cutime
long tms_cutime
Definition: win32.h:735
stati128::st_dev
_dev_t st_dev
Definition: win32.h:177
rb_w32_wreadlink
ssize_t rb_w32_wreadlink(const WCHAR *, WCHAR *, size_t)
rb_w32_fdclr
void rb_w32_fdclr(int, fd_set *)
Definition: win32.c:2827
rb_w32_time_subtract
int rb_w32_time_subtract(struct timeval *rest, const struct timeval *wait)
Definition: win32.c:3074
rb_w32_free_environ
void rb_w32_free_environ(char **)
Definition: win32.c:6077
rb_w32_connect
int WSAAPI rb_w32_connect(int, const struct sockaddr *, int)
Definition: win32.c:3317
rb_w32_lstati128
int rb_w32_lstati128(const char *, struct stati128 *)
Definition: win32.c:5790
rb_w32_unlink
int rb_w32_unlink(const char *)
Definition: win32.c:7610
DWORD
IUnknown DWORD
Definition: win32ole.c:33
stati128::st_inohigh
__int64 st_inohigh
Definition: win32.h:179
msghdr::msg_namelen
int msg_namelen
Definition: win32.h:231
rb_w32_ioctlsocket
int WSAAPI rb_w32_ioctlsocket(int, long, u_long *)
Definition: win32.c:3398
rb_w32_send
int WSAAPI rb_w32_send(int, const char *, int, int)
Definition: win32.c:3570
stati128::st_mtimensec
long st_mtimensec
Definition: win32.h:189
uintptr_t
unsigned int uintptr_t
Definition: win32.h:106
ssize_t
_ssize_t ssize_t
Definition: rb_mjit_min_header-2.7.0.h:1329
msghdr::msg_iov
struct iovec * msg_iov
Definition: win32.h:232
chown
int chown(const char *, int, int)
Definition: win32.c:4763
stati128::st_ctimensec
long st_ctimensec
Definition: win32.h:191
rb_w32_recv
int WSAAPI rb_w32_recv(int, char *, int, int)
Definition: win32.c:3555
rb_w32_Sleep
int WINAPI rb_w32_Sleep(unsigned long msec)
rb_w32_uaspawn
rb_pid_t rb_w32_uaspawn(int, const char *, char *const *)
Definition: win32.c:1570
fcntl
int fcntl(int, int,...)
Definition: win32.c:4282
rb_w32_fclose
int rb_w32_fclose(FILE *)
Definition: win32.c:6389
rb_w32_fstati128
int rb_w32_fstati128(int, struct stati128 *)
Definition: win32.c:5415
stati128::st_rdev
_dev_t st_rdev
Definition: win32.h:184
recvmsg
int recvmsg(int, struct msghdr *, int)
Definition: win32.c:3621
rb_w32_isatty
int rb_w32_isatty(int)
Definition: win32.c:7679
getuid
rb_uid_t getuid(void)
Definition: win32.c:2765
rb_w32_uchown
int rb_w32_uchown(const char *, int, int)
Definition: win32.c:4770
rb_w32_rename
int rb_w32_rename(const char *, const char *)
Definition: win32.c:5333
sendmsg
int sendmsg(int, const struct msghdr *, int)
Definition: win32.c:3676
asynchronous_func_t
uintptr_t(* asynchronous_func_t)(uintptr_t self, int argc, uintptr_t *argv)
Definition: win32.h:777
rb_w32_inet_pton
int WSAAPI rb_w32_inet_pton(int, const char *, void *)
Definition: win32.c:7742
rb_w32_usymlink
int rb_w32_usymlink(const char *src, const char *link)
Definition: win32.c:5175
rb_w32_unwrap_io_handle
int rb_w32_unwrap_io_handle(int)
Definition: win32.c:7908
rb_w32_inet_ntop
const char *WSAAPI rb_w32_inet_ntop(int, const void *, char *, size_t)
Definition: win32.c:7723
ifaddrs::ifa_netmask
struct sockaddr * ifa_netmask
Definition: win32.h:245
ifaddrs::ifa_addr
struct sockaddr * ifa_addr
Definition: win32.h:244
rb_w32_getsockname
int WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *)
Definition: win32.c:3353
rb_w32_getppid
rb_pid_t rb_w32_getppid(void)
Definition: win32.c:6095
ifaddrs::ifa_name
char * ifa_name
Definition: win32.h:242
u_long
unsigned long u_long
Definition: rb_mjit_min_header-2.7.0.h:1293
rb_w32_pipe
int rb_w32_pipe(int[2])
Definition: win32.c:6412
wait
int wait(int *status)
Definition: win32.c:5189
rb_w32_truncate
int rb_w32_truncate(const char *path, off_t length)
Definition: win32.c:5897
rb_w32_uutimensat
int rb_w32_uutimensat(int, const char *, const struct timespec *, int)
Definition: win32.c:7427
rb_w32_sysinit
void rb_w32_sysinit(int *, char ***)
Definition: win32.c:847
rb_w32_shutdown
int WSAAPI rb_w32_shutdown(int, int)
Definition: win32.c:3740
rb_w32_utruncate
int rb_w32_utruncate(const char *path, off_t length)
Definition: win32.c:5890
rb_w32_gethostbyname
struct hostent *WSAAPI rb_w32_gethostbyname(const char *)
Definition: win32.c:3846
rb_w32_getpeername
int WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *)
Definition: win32.c:3338
rb_w32_umkdir
int rb_w32_umkdir(const char *, int)
Definition: win32.c:7489
msghdr::msg_control
void * msg_control
Definition: win32.h:234
rb_w32_sendto
int WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int)
Definition: win32.c:3577
rb_w32_uchdir
int rb_w32_uchdir(const char *)
Definition: win32.c:7455
msghdr
Definition: win32.h:229
rb_w32_lseek
off_t rb_w32_lseek(int, off_t, int)
Definition: win32.c:5797
rb_w32_gethostbyaddr
struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int)
Definition: win32.c:3831
rb_w32_uchmod
int rb_w32_uchmod(const char *, int)
Definition: win32.c:7624
rb_w32_getcwd
char * rb_w32_getcwd(char *, int)
Definition: win32.c:4731
rb_w32_setsockopt
int WSAAPI rb_w32_setsockopt(int, int, int, const char *, int)
Definition: win32.c:3725
rb_w32_io_cancelable_p
int rb_w32_io_cancelable_p(int)
Definition: win32.c:2602
rb_w32_aspawn_flags
rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD)
Definition: win32.c:1548
rb_w32_uaccess
int rb_w32_uaccess(const char *, int)
Definition: win32.c:5824
rb_w32_uutime
int rb_w32_uutime(const char *, const struct utimbuf *)
Definition: win32.c:7375
rb_w32_write
ssize_t rb_w32_write(int, const void *, size_t)
Definition: win32.c:7120
rb_w32_fstat
int rb_w32_fstat(int, struct stat *)
Definition: win32.c:5398
rb_w32_ureadlink
ssize_t rb_w32_ureadlink(const char *, char *, size_t)
Definition: win32.c:5092
localtime_r
struct tm * localtime_r(const time_t *, struct tm *)
Definition: win32.c:7862
rb_w32_sleep
int rb_w32_sleep(unsigned long msec)
iovec::iov_base
void * iov_base
Definition: win32.h:226
msghdr::msg_name
void * msg_name
Definition: win32.h:230
rb_w32_utimensat
int rb_w32_utimensat(int, const char *, const struct timespec *, int)
Definition: win32.c:7441
kill
int kill(int, int)
Definition: win32.c:4789
rb_gid_t
#define rb_gid_t
Definition: rb_mjit_min_header-2.7.0.h:111
waitpid
rb_pid_t waitpid(rb_pid_t, int *, int)
Definition: win32.c:4476
rb_w32_ugetenv
char * rb_w32_ugetenv(const char *)
Definition: win32.c:5230
ifaddrs::ifa_flags
u_int ifa_flags
Definition: win32.h:243
stati128::st_size
__int64 st_size
Definition: win32.h:185
msghdr::msg_flags
int msg_flags
Definition: win32.h:236
link
int link(const char *, const char *)
Definition: win32.c:4931
rb_w32_dup2
int rb_w32_dup2(int, int)
Definition: win32.c:6134
clockid_t
int clockid_t
Definition: win32.h:132
freeifaddrs
void freeifaddrs(struct ifaddrs *)
Definition: win32.c:4176
rb_w32_utimes
int rb_w32_utimes(const char *, const struct timeval *)
Definition: win32.c:7414
flock
int flock(int fd, int oper)
Definition: flock.c:125
src
__inline__ const void *__restrict src
Definition: rb_mjit_min_header-2.7.0.h:2836
rb_w32_get_osfhandle
SOCKET rb_w32_get_osfhandle(int)
Definition: win32.c:1078
ioctl
int ioctl(int, int,...)
Definition: win32.c:2811
stati128::st_mode
unsigned short st_mode
Definition: win32.h:180
rb_w32_urename
int rb_w32_urename(const char *, const char *)
Definition: win32.c:5314
iovec
Definition: win32.h:225
ifaddrs::ifa_dstaddr
struct sockaddr * ifa_dstaddr
Definition: win32.h:247
stati128::st_atime
__time64_t st_atime
Definition: win32.h:186
rb_w32_uopen
int rb_w32_uopen(const char *, int,...)
Definition: win32.c:6147
tms::tms_utime
long tms_utime
Definition: win32.h:733
argv
char ** argv
Definition: ruby.c:223
rb_w32_select
int WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
Definition: win32.c:3250
iovec::iov_len
size_t iov_len
Definition: win32.h:227
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
rb_w32_urmdir
int rb_w32_urmdir(const char *)
Definition: win32.c:7552
rb_w32_osver
DWORD rb_w32_osver(void)
Definition: win32.c:319
rb_w32_osid
DWORD rb_w32_osid(void)
getegid
rb_gid_t getegid(void)
Definition: win32.c:2786
geteuid
rb_uid_t geteuid(void)
Definition: win32.c:2772
finite
RUBY_EXTERN int finite(double)
Definition: finite.c:6
timeval
Definition: missing.h:53
rb_w32_getservbyport
struct servent *WSAAPI rb_w32_getservbyport(int, const char *)
Definition: win32.c:3921
rb_w32_wait_events_blocking
int rb_w32_wait_events_blocking(HANDLE *events, int num, DWORD timeout)
gmtime_r
struct tm * gmtime_r(const time_t *, struct tm *)
Definition: win32.c:7838
tms::tms_cstime
long tms_cstime
Definition: win32.h:736
msghdr::msg_iovlen
int msg_iovlen
Definition: win32.h:233
rb_w32_set_nonblock
int rb_w32_set_nonblock(int)
Definition: win32.c:4390
rb_w32_fdset
void rb_w32_fdset(int, fd_set *)
Definition: win32.c:2818
rb_w32_times
int rb_w32_times(struct tms *)
Definition: win32.c:5926
rb_w32_wrap_io_handle
int rb_w32_wrap_io_handle(HANDLE, int)
Definition: win32.c:7886
rb_w32_fd_is_text
char rb_w32_fd_is_text(int)
Definition: win32.c:7756
clock_gettime
int clock_gettime(clockid_t, struct timespec *)
Definition: win32.c:4612
rb_w32_ftruncate
int rb_w32_ftruncate(int fd, off_t length)
Definition: win32.c:5904
readlink
ssize_t readlink(const char *, char *, size_t)
Definition: win32.c:5099
io.h
argc
int argc
Definition: ruby.c:222
stati128::st_nlink
short st_nlink
Definition: win32.h:181
stati128::st_mtime
__time64_t st_mtime
Definition: win32.h:188
rb_w32_access
int rb_w32_access(const char *, int)
Definition: win32.c:5809
rb_w32_recvfrom
int WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *)
Definition: win32.c:3562
rb_w32_ustati128
int rb_w32_ustati128(const char *, struct stati128 *)
Definition: win32.c:5755
socketpair
int socketpair(int, int, int, int *)
Definition: win32.c:4022
tm
Definition: rb_mjit_min_header-2.7.0.h:1932
getgid
rb_gid_t getgid(void)
Definition: win32.c:2779
rb_w32_socket
int WSAAPI rb_w32_socket(int, int, int)
Definition: win32.c:3805
rb_w32_read
ssize_t rb_w32_read(int, void *, size_t)
Definition: win32.c:6981
ifaddrs
Definition: win32.h:240
msghdr::msg_controllen
int msg_controllen
Definition: win32.h:235
rb_w32_listen
int WSAAPI rb_w32_listen(int, int)
Definition: win32.c:3413
rb_w32_utime
int rb_w32_utime(const char *, const struct utimbuf *)
Definition: win32.c:7388
intptr_t
int intptr_t
Definition: win32.h:90
rb_w32_uspawn
rb_pid_t rb_w32_uspawn(int, const char *, const char *)
Definition: win32.c:1468
stati128::st_ino
unsigned __int64 st_ino
Definition: win32.h:178
timespec
Definition: missing.h:60
rb_w32_getsockopt
int WSAAPI rb_w32_getsockopt(int, int, int, char *, int *)
Definition: win32.c:3383
ifaddrs::ifa_next
struct ifaddrs * ifa_next
Definition: win32.h:241
rb_pid_t
#define rb_pid_t
Definition: rb_mjit_min_header-2.7.0.h:99
rb_w32_uaspawn_flags
rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD)
Definition: win32.c:1556
rb_w32_ulink
int rb_w32_ulink(const char *, const char *)
Definition: win32.c:4911
rb_uid_t
#define rb_uid_t
Definition: rb_mjit_min_header-2.7.0.h:105
rb_w32_uunlink
int rb_w32_uunlink(const char *)
Definition: win32.c:7596
rb_w32_getprotobynumber
struct protoent *WSAAPI rb_w32_getprotobynumber(int)
Definition: win32.c:3891
stati128::st_gid
short st_gid
Definition: win32.h:183
rb_w32_getenv
char * rb_w32_getenv(const char *)
Definition: win32.c:5237
rb_w32_close
int rb_w32_close(int)
Definition: win32.c:6910
utimbuf
Definition: file.c:2864
rb_w32_get_environ
char ** rb_w32_get_environ(void)
Definition: win32.c:6040
gettimeofday
int gettimeofday(struct timeval *, struct timezone *)
Definition: win32.c:4598
rb_w32_stati128
int rb_w32_stati128(const char *, struct stati128 *)
Definition: win32.c:5762
tms
Definition: win32.h:732
off_t
__off_t off_t
Definition: rb_mjit_min_header-2.7.0.h:1317
setgid
int setgid(rb_gid_t)
Definition: win32.c:2800
__sFILE
Definition: vsnprintf.c:169
symlink
int symlink(const char *src, const char *link)
Definition: win32.c:5182
ifaddrs::ifa_data
void * ifa_data
Definition: win32.h:248
rb_w32_mbstr_to_wstr
WCHAR * rb_w32_mbstr_to_wstr(UINT, const char *, int, long *)
Definition: win32.c:2149
rb_w32_is_socket
int rb_w32_is_socket(int)
Definition: win32.c:2691