23 # define _WIN32_WINNT 0x0600
26 #if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
28 # define SSIZE_MAX INTPTR_MAX
30 # define _SSIZE_T_DEFINED
35 #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
40 } WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
43 #ifndef LOCALE_INVARIANT
44 # define LOCALE_INVARIANT 0x007f
56 #if defined(_MSC_VER) && _MSC_VER < 1600
65 #define MAX_PIPENAME_LEN 256
68 # define S_IFLNK 0xA000
91 #if defined(NSIG) && NSIG <= SIGWINCH
95 # define NSIG SIGWINCH + 1
100 #ifndef SIGABRT_COMPAT
101 # define SIGABRT_COMPAT 6
108 #ifndef WSAID_ACCEPTEX
109 # define WSAID_ACCEPTEX \
110 {0xb5367df1, 0xcbac, 0x11cf, \
111 {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
113 # define WSAID_CONNECTEX \
114 {0x25a207b9, 0xddf3, 0x4660, \
115 {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}}
117 # define WSAID_GETACCEPTEXSOCKADDRS \
118 {0xb5367df2, 0xcbac, 0x11cf, \
119 {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
121 # define WSAID_DISCONNECTEX \
122 {0x7fda2e11, 0x8630, 0x436f, \
123 {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}
125 # define WSAID_TRANSMITFILE \
126 {0xb5367df0, 0xcbac, 0x11cf, \
127 {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
130 (SOCKET sListenSocket,
131 SOCKET sAcceptSocket,
132 PVOID lpOutputBuffer,
133 DWORD dwReceiveDataLength,
134 DWORD dwLocalAddressLength,
135 DWORD dwRemoteAddressLength,
136 LPDWORD lpdwBytesReceived,
137 LPOVERLAPPED lpOverlapped);
144 DWORD dwSendDataLength,
145 LPDWORD lpdwBytesSent,
146 LPOVERLAPPED lpOverlapped);
149 (
PVOID lpOutputBuffer,
150 DWORD dwReceiveDataLength,
151 DWORD dwLocalAddressLength,
152 DWORD dwRemoteAddressLength,
153 LPSOCKADDR* LocalSockaddr,
154 LPINT LocalSockaddrLength,
155 LPSOCKADDR* RemoteSockaddr,
156 LPINT RemoteSockaddrLength);
160 LPOVERLAPPED lpOverlapped,
167 DWORD nNumberOfBytesToWrite,
168 DWORD nNumberOfBytesPerSend,
169 LPOVERLAPPED lpOverlapped,
170 LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
183 LPWSAOVERLAPPED overlapped,
184 LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
194 LPWSAOVERLAPPED overlapped,
195 LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
202 #ifndef RTL_CONDITION_VARIABLE_INIT
219 #define UV_MSAFD_PROVIDER_COUNT 3
288 #define UV_ONCE_INIT { 0, NULL }
304 #define UV_DIR_PRIVATE_FIELDS \
306 WIN32_FIND_DATAW find_data; \
309 #define HAVE_DIRENT_TYPES
310 #define UV__DT_DIR UV_DIRENT_DIR
311 #define UV__DT_FILE UV_DIRENT_FILE
312 #define UV__DT_LINK UV_DIRENT_LINK
313 #define UV__DT_FIFO UV_DIRENT_FIFO
314 #define UV__DT_SOCKET UV_DIRENT_SOCKET
315 #define UV__DT_CHAR UV_DIRENT_CHAR
316 #define UV__DT_BLOCK UV_DIRENT_BLOCK
319 #define UV_DYNAMIC FAR WINAPI
325 #define UV_LOOP_PRIVATE_FIELDS \
333 uv_req_t* pending_reqs_tail; \
335 uv_handle_t* endgame_handles; \
339 uv_prepare_t* prepare_handles; \
340 uv_check_t* check_handles; \
341 uv_idle_t* idle_handles; \
346 uv_prepare_t* next_prepare_handle; \
347 uv_check_t* next_check_handle; \
348 uv_idle_t* next_idle_handle; \
350 SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT]; \
352 unsigned int active_tcp_streams; \
354 unsigned int active_udp_streams; \
356 uint64_t timer_counter; \
359 uv_mutex_t wq_mutex; \
362 #define UV_REQ_TYPE_PRIVATE \
373 #define UV_REQ_PRIVATE_FIELDS \
377 OVERLAPPED overlapped; \
378 size_t queued_bytes; \
381 struct uv_req_s* next_req;
383 #define UV_WRITE_PRIVATE_FIELDS \
385 uv_buf_t write_buffer; \
386 HANDLE event_handle; \
389 #define UV_CONNECT_PRIVATE_FIELDS \
392 #define UV_SHUTDOWN_PRIVATE_FIELDS \
395 #define UV_UDP_SEND_PRIVATE_FIELDS \
398 #define UV_PRIVATE_REQ_TYPES \
399 typedef struct uv_pipe_accept_s { \
402 struct uv_pipe_accept_s* next_pending; \
403 } uv_pipe_accept_t; \
405 typedef struct uv_tcp_accept_s { \
407 SOCKET accept_socket; \
408 char accept_buffer[sizeof(struct sockaddr_storage) * 2 + 32]; \
409 HANDLE event_handle; \
410 HANDLE wait_handle; \
411 struct uv_tcp_accept_s* next_pending; \
414 typedef struct uv_read_s { \
416 HANDLE event_handle; \
417 HANDLE wait_handle; \
420 #define uv_stream_connection_fields \
421 unsigned int write_reqs_pending; \
422 uv_shutdown_t* shutdown_req;
424 #define uv_stream_server_fields \
425 uv_connection_cb connection_cb;
427 #define UV_STREAM_PRIVATE_FIELDS \
428 unsigned int reqs_pending; \
430 uv_read_t read_req; \
432 struct { uv_stream_connection_fields } conn; \
433 struct { uv_stream_server_fields } serv; \
436 #define uv_tcp_server_fields \
437 uv_tcp_accept_t* accept_reqs; \
438 unsigned int processed_accepts; \
439 uv_tcp_accept_t* pending_accepts; \
440 LPFN_ACCEPTEX func_acceptex;
442 #define uv_tcp_connection_fields \
443 uv_buf_t read_buffer; \
444 LPFN_CONNECTEX func_connectex;
446 #define UV_TCP_PRIVATE_FIELDS \
450 struct { uv_tcp_server_fields } serv; \
451 struct { uv_tcp_connection_fields } conn; \
454 #define UV_UDP_PRIVATE_FIELDS \
456 unsigned int reqs_pending; \
459 uv_buf_t recv_buffer; \
460 struct sockaddr_storage recv_from; \
462 uv_udp_recv_cb recv_cb; \
463 uv_alloc_cb alloc_cb; \
464 LPFN_WSARECV func_wsarecv; \
465 LPFN_WSARECVFROM func_wsarecvfrom;
467 #define uv_pipe_server_fields \
468 int pending_instances; \
469 uv_pipe_accept_t* accept_reqs; \
470 uv_pipe_accept_t* pending_accepts;
472 #define uv_pipe_connection_fields \
473 uv_timer_t* eof_timer; \
475 DWORD ipc_remote_pid; \
477 uint32_t payload_remaining; \
480 void* ipc_xfer_queue[2]; \
481 int ipc_xfer_queue_length; \
482 uv_write_t* non_overlapped_writes_tail; \
483 CRITICAL_SECTION readfile_thread_lock; \
484 volatile HANDLE readfile_thread_handle;
486 #define UV_PIPE_PRIVATE_FIELDS \
490 struct { uv_pipe_server_fields } serv; \
491 struct { uv_pipe_connection_fields } conn; \
496 #define UV_TTY_PRIVATE_FIELDS \
503 uv_buf_t read_line_buffer; \
504 HANDLE read_raw_wait; \
507 unsigned char last_key_offset; \
508 unsigned char last_key_len; \
509 WCHAR last_utf16_high_surrogate; \
510 INPUT_RECORD last_input_record; \
515 unsigned int utf8_codepoint; \
516 unsigned char utf8_bytes_left; \
518 unsigned char previous_eol; \
520 unsigned short ansi_parser_state; \
521 unsigned char ansi_csi_argc; \
522 unsigned short ansi_csi_argv[4]; \
523 COORD saved_position; \
524 WORD saved_attributes; \
528 #define UV_POLL_PRIVATE_FIELDS \
531 SOCKET peer_socket; \
532 AFD_POLL_INFO afd_poll_info_1; \
533 AFD_POLL_INFO afd_poll_info_2; \
535 uv_req_t poll_req_1; \
536 uv_req_t poll_req_2; \
537 unsigned char submitted_events_1; \
538 unsigned char submitted_events_2; \
539 unsigned char mask_events_1; \
540 unsigned char mask_events_2; \
541 unsigned char events;
543 #define UV_TIMER_PRIVATE_FIELDS \
544 void* heap_node[3]; \
549 uv_timer_cb timer_cb;
551 #define UV_ASYNC_PRIVATE_FIELDS \
552 struct uv_req_s async_req; \
553 uv_async_cb async_cb; \
555 char volatile async_sent;
557 #define UV_PREPARE_PRIVATE_FIELDS \
558 uv_prepare_t* prepare_prev; \
559 uv_prepare_t* prepare_next; \
560 uv_prepare_cb prepare_cb;
562 #define UV_CHECK_PRIVATE_FIELDS \
563 uv_check_t* check_prev; \
564 uv_check_t* check_next; \
565 uv_check_cb check_cb;
567 #define UV_IDLE_PRIVATE_FIELDS \
568 uv_idle_t* idle_prev; \
569 uv_idle_t* idle_next; \
572 #define UV_HANDLE_PRIVATE_FIELDS \
573 uv_handle_t* endgame_next; \
576 #define UV_GETADDRINFO_PRIVATE_FIELDS \
577 struct uv__work work_req; \
578 uv_getaddrinfo_cb getaddrinfo_cb; \
585 struct addrinfoW* addrinfow; \
586 struct addrinfo* addrinfo; \
589 #define UV_GETNAMEINFO_PRIVATE_FIELDS \
590 struct uv__work work_req; \
591 uv_getnameinfo_cb getnameinfo_cb; \
592 struct sockaddr_storage storage; \
594 char host[NI_MAXHOST]; \
595 char service[NI_MAXSERV]; \
598 #define UV_PROCESS_PRIVATE_FIELDS \
599 struct uv_process_exit_s { \
602 BYTE* child_stdio_buffer; \
604 HANDLE wait_handle; \
605 HANDLE process_handle; \
606 volatile char exit_cb_pending;
608 #define UV_FS_PRIVATE_FIELDS \
609 struct uv__work work_req; \
623 unsigned int nbufs; \
626 uv_buf_t bufsml[4]; \
634 #define UV_WORK_PRIVATE_FIELDS \
635 struct uv__work work_req;
637 #define UV_FS_EVENT_PRIVATE_FIELDS \
638 struct uv_fs_event_req_s { \
645 WCHAR* short_filew; \
649 #define UV_SIGNAL_PRIVATE_FIELDS \
650 RB_ENTRY(uv_signal_s) tree_entry; \
651 struct uv_req_s signal_req; \
652 unsigned long pending_signum;
668 #define UV_FS_O_APPEND _O_APPEND
669 #define UV_FS_O_CREAT _O_CREAT
670 #define UV_FS_O_EXCL _O_EXCL
671 #define UV_FS_O_FILEMAP 0x20000000
672 #define UV_FS_O_RANDOM _O_RANDOM
673 #define UV_FS_O_RDONLY _O_RDONLY
674 #define UV_FS_O_RDWR _O_RDWR
675 #define UV_FS_O_SEQUENTIAL _O_SEQUENTIAL
676 #define UV_FS_O_SHORT_LIVED _O_SHORT_LIVED
677 #define UV_FS_O_TEMPORARY _O_TEMPORARY
678 #define UV_FS_O_TRUNC _O_TRUNC
679 #define UV_FS_O_WRONLY _O_WRONLY
682 #define UV_FS_O_DIRECT 0x02000000
683 #define UV_FS_O_DIRECTORY 0
684 #define UV_FS_O_DSYNC 0x04000000
685 #define UV_FS_O_EXLOCK 0x10000000
686 #define UV_FS_O_NOATIME 0
687 #define UV_FS_O_NOCTTY 0
688 #define UV_FS_O_NOFOLLOW 0
689 #define UV_FS_O_NONBLOCK 0
690 #define UV_FS_O_SYMLINK 0
691 #define UV_FS_O_SYNC 0x08000000
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd socket
static struct sockaddr static addrlen static backlog const void static flags void flags
AFD_POLL_HANDLE_INFO Handles[1]
CONDITION_VARIABLE cond_var
CRITICAL_SECTION waiters_count_lock
unsigned int waiters_count
unsigned int num_readers_
CRITICAL_SECTION num_readers_lock_
UV_PLATFORM_SEM_T uv_sem_t
pthread_rwlock_t uv_rwlock_t
pthread_mutex_t uv_mutex_t
BOOL(PASCAL * LPFN_DISCONNECTEX)(SOCKET hSocket, LPOVERLAPPED lpOverlapped, DWORD dwFlags, DWORD reserved)
struct _AFD_POLL_HANDLE_INFO AFD_POLL_HANDLE_INFO
void(PASCAL * LPFN_GETACCEPTEXSOCKADDRS)(PVOID lpOutputBuffer, DWORD dwReceiveDataLength, DWORD dwLocalAddressLength, DWORD dwRemoteAddressLength, LPSOCKADDR *LocalSockaddr, LPINT LocalSockaddrLength, LPSOCKADDR *RemoteSockaddr, LPINT RemoteSockaddrLength)
struct _AFD_POLL_INFO * PAFD_POLL_INFO
BOOL(PASCAL * LPFN_TRANSMITFILE)(SOCKET hSocket, HANDLE hFile, DWORD nNumberOfBytesToWrite, DWORD nNumberOfBytesPerSend, LPOVERLAPPED lpOverlapped, LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, DWORD dwFlags)
BOOL(PASCAL * LPFN_ACCEPTEX)(SOCKET sListenSocket, SOCKET sAcceptSocket, PVOID lpOutputBuffer, DWORD dwReceiveDataLength, DWORD dwLocalAddressLength, DWORD dwRemoteAddressLength, LPDWORD lpdwBytesReceived, LPOVERLAPPED lpOverlapped)
BOOL(PASCAL * LPFN_CONNECTEX)(SOCKET s, const struct sockaddr *name, int namelen, PVOID lpSendBuffer, DWORD dwSendDataLength, LPDWORD lpdwBytesSent, LPOVERLAPPED lpOverlapped)
struct _AFD_POLL_INFO AFD_POLL_INFO
int(WSAAPI * LPFN_WSARECV)(SOCKET socket, LPWSABUF buffers, DWORD buffer_count, LPDWORD bytes, LPDWORD flags, LPWSAOVERLAPPED overlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine)
CRITICAL_SECTION uv_mutex_t
struct uv_once_s uv_once_t
int(WSAAPI * LPFN_WSARECVFROM)(SOCKET socket, LPWSABUF buffers, DWORD buffer_count, LPDWORD bytes, LPDWORD flags, struct sockaddr *addr, LPINT addr_len, LPWSAOVERLAPPED overlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine)
struct uv__dirent_s uv__dirent_t
struct _AFD_POLL_HANDLE_INFO * PAFD_POLL_HANDLE_INFO
PVOID * PCONDITION_VARIABLE
static const z80_opcode fd[]