Download tools/node-v22.19.0-linux-x64/include/node/uv/win.h from SitongGong/gst-code-collection: direct link, hf CLI and curl.
- Browser
- Download file 33.8 kB
-
https://huggingface.co/datasets/SitongGong/gst-code-collection/resolve/main/tools/node-v22.19.0-linux-x64/include/node/uv/win.h
- Command line
-
hf download hf://datasets/SitongGong/gst-code-collection/tools/node-v22.19.0-linux-x64/include/node/uv/win.h
-
curl -L -o win.h https://huggingface.co/datasets/SitongGong/gst-code-collection/resolve/main/tools/node-v22.19.0-linux-x64/include/node/uv/win.h
33.8 kB
| /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to | |
| * deal in the Software without restriction, including without limitation the | |
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| * sell copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * | |
| * The above copyright notice and this permission notice shall be included in | |
| * all copies or substantial portions of the Software. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | |
| * IN THE SOFTWARE. | |
| */ | |
| typedef intptr_t ssize_t; | |
| /* Disable the typedef in mstcpip.h of MinGW. */ | |
| /* Define missing in Windows Kit Include\{VERSION}\ucrt\sys\stat.h */ | |
| /* Additional signals supported by uv_signal and or uv_kill. The CRT defines | |
| * the following signals already: | |
| * | |
| * #define SIGINT 2 | |
| * #define SIGILL 4 | |
| * #define SIGABRT_COMPAT 6 | |
| * #define SIGFPE 8 | |
| * #define SIGSEGV 11 | |
| * #define SIGTERM 15 | |
| * #define SIGBREAK 21 | |
| * #define SIGABRT 22 | |
| * | |
| * The additional signals have values that are common on other Unix | |
| * variants (Linux and Darwin) | |
| */ | |
| /* Redefine NSIG to take SIGWINCH into consideration */ | |
| /* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many unix-like | |
| * platforms. However MinGW doesn't define it, so we do. */ | |
| /* | |
| * Guids and typedefs for winsock extension functions | |
| * Mingw32 doesn't have these :-( | |
| */ | |
| typedef BOOL (PASCAL *LPFN_ACCEPTEX) | |
| (SOCKET sListenSocket, | |
| SOCKET sAcceptSocket, | |
| PVOID lpOutputBuffer, | |
| DWORD dwReceiveDataLength, | |
| DWORD dwLocalAddressLength, | |
| DWORD dwRemoteAddressLength, | |
| LPDWORD lpdwBytesReceived, | |
| LPOVERLAPPED lpOverlapped); | |
| typedef BOOL (PASCAL *LPFN_CONNECTEX) | |
| (SOCKET s, | |
| const struct sockaddr* name, | |
| int namelen, | |
| PVOID lpSendBuffer, | |
| DWORD dwSendDataLength, | |
| LPDWORD lpdwBytesSent, | |
| LPOVERLAPPED lpOverlapped); | |
| typedef void (PASCAL *LPFN_GETACCEPTEXSOCKADDRS) | |
| (PVOID lpOutputBuffer, | |
| DWORD dwReceiveDataLength, | |
| DWORD dwLocalAddressLength, | |
| DWORD dwRemoteAddressLength, | |
| LPSOCKADDR* LocalSockaddr, | |
| LPINT LocalSockaddrLength, | |
| LPSOCKADDR* RemoteSockaddr, | |
| LPINT RemoteSockaddrLength); | |
| typedef BOOL (PASCAL *LPFN_DISCONNECTEX) | |
| (SOCKET hSocket, | |
| LPOVERLAPPED lpOverlapped, | |
| DWORD dwFlags, | |
| DWORD reserved); | |
| typedef BOOL (PASCAL *LPFN_TRANSMITFILE) | |
| (SOCKET hSocket, | |
| HANDLE hFile, | |
| DWORD nNumberOfBytesToWrite, | |
| DWORD nNumberOfBytesPerSend, | |
| LPOVERLAPPED lpOverlapped, | |
| LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, | |
| DWORD dwFlags); | |
| typedef PVOID RTL_SRWLOCK; | |
| typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; | |
| typedef int (WSAAPI* LPFN_WSARECV) | |
| (SOCKET socket, | |
| LPWSABUF buffers, | |
| DWORD buffer_count, | |
| LPDWORD bytes, | |
| LPDWORD flags, | |
| LPWSAOVERLAPPED overlapped, | |
| LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); | |
| typedef 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); | |
| typedef LONG NTSTATUS; | |
| typedef NTSTATUS *PNTSTATUS; | |
| typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE; | |
| typedef struct _AFD_POLL_HANDLE_INFO { | |
| HANDLE Handle; | |
| ULONG Events; | |
| NTSTATUS Status; | |
| } AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO; | |
| typedef struct _AFD_POLL_INFO { | |
| LARGE_INTEGER Timeout; | |
| ULONG NumberOfHandles; | |
| ULONG Exclusive; | |
| AFD_POLL_HANDLE_INFO Handles[1]; | |
| } AFD_POLL_INFO, *PAFD_POLL_INFO; | |
| /** | |
| * It should be possible to cast uv_buf_t[] to WSABUF[] | |
| * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx | |
| */ | |
| typedef struct uv_buf_t { | |
| ULONG len; | |
| char* base; | |
| } uv_buf_t; | |
| typedef int uv_file; | |
| typedef SOCKET uv_os_sock_t; | |
| typedef HANDLE uv_os_fd_t; | |
| typedef int uv_pid_t; | |
| typedef HANDLE uv_thread_t; | |
| typedef HANDLE uv_sem_t; | |
| typedef CRITICAL_SECTION uv_mutex_t; | |
| /* This condition variable implementation is based on the SetEvent solution | |
| * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html | |
| * We could not use the SignalObjectAndWait solution (section 3.4) because | |
| * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and | |
| * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs. | |
| */ | |
| typedef union { | |
| CONDITION_VARIABLE cond_var; | |
| struct { | |
| unsigned int waiters_count; | |
| CRITICAL_SECTION waiters_count_lock; | |
| HANDLE signal_event; | |
| HANDLE broadcast_event; | |
| } unused_; /* TODO: retained for ABI compatibility; remove me in v2.x. */ | |
| } uv_cond_t; | |
| typedef struct { | |
| SRWLOCK read_write_lock_; | |
| /* TODO: retained for ABI compatibility; remove me in v2.x */ | |
| unsigned char padding_[72]; | |
| unsigned char padding_[44]; | |
| } uv_rwlock_t; | |
| typedef struct { | |
| unsigned threshold; | |
| unsigned in; | |
| uv_mutex_t mutex; | |
| /* TODO: in v2 make this a uv_cond_t, without unused_ */ | |
| CONDITION_VARIABLE cond; | |
| unsigned out; | |
| } uv_barrier_t; | |
| typedef struct { | |
| DWORD tls_index; | |
| } uv_key_t; | |
| typedef struct uv_once_s { | |
| unsigned char unused; | |
| INIT_ONCE init_once; | |
| } uv_once_t; | |
| /* Platform-specific definitions for uv_spawn support. */ | |
| typedef unsigned char uv_uid_t; | |
| typedef unsigned char uv_gid_t; | |
| typedef struct uv__dirent_s { | |
| int d_type; | |
| char d_name[1]; | |
| } uv__dirent_t; | |
| /* Platform-specific definitions for uv_dlopen support. */ | |
| typedef struct { | |
| HMODULE handle; | |
| char* errmsg; | |
| } uv_lib_t; | |
| /* TODO: put the parser states in a union - TTY handles are always half-duplex | |
| * so read-state can safely overlap write-state. */ | |
| /* fs open() flags supported on this platform: */ | |
| /* fs open() flags supported on other platforms (or mapped on this platform): */ | |