visaljs 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +3 -1
  2. package/cli.js +155 -27
  3. package/node/include/js_node.h +2 -0
  4. package/node/prelude/async_hooks.js +0 -0
  5. package/node/prelude/buffer.js +0 -0
  6. package/node/prelude/events.js +0 -0
  7. package/node/prelude/fs.js +0 -0
  8. package/node/prelude/http2.js +0 -0
  9. package/node/prelude/internal/crypto/asym.js +0 -0
  10. package/node/prelude/internal/crypto/cipher.js +0 -0
  11. package/node/prelude/internal/crypto/kdf.js +0 -0
  12. package/node/prelude/internal/crypto/keys.js +0 -0
  13. package/node/prelude/internal/crypto/random.js +0 -0
  14. package/node/prelude/internal/crypto/util.js +0 -0
  15. package/node/prelude/internal/errors.js +0 -0
  16. package/node/prelude/internal/querystring.js +0 -0
  17. package/node/prelude/internal/tls/wrap.js +5 -2
  18. package/node/prelude/module.js +0 -0
  19. package/node/prelude/net.js +1 -2
  20. package/node/prelude/os.js +2 -2
  21. package/node/prelude/path.js +0 -0
  22. package/node/prelude/process.js +0 -0
  23. package/node/prelude/querystring.js +0 -0
  24. package/node/prelude/stream.js +0 -0
  25. package/node/prelude/stream_promises.js +0 -0
  26. package/node/prelude/stream_web.js +0 -0
  27. package/node/prelude/string_decoder.js +0 -0
  28. package/node/prelude/tty.js +0 -0
  29. package/node/prelude/url.js +0 -0
  30. package/node/prelude/util.js +0 -0
  31. package/node/prelude/zlib.js +0 -0
  32. package/node/src/host_fs.c +10 -2
  33. package/node/src/host_os.c +0 -0
  34. package/node/src/host_sys.c +44 -32
  35. package/node/third_party/libuv/LICENSE +0 -0
  36. package/node/third_party/libuv/include/uv/aix.h +0 -0
  37. package/node/third_party/libuv/include/uv/bsd.h +0 -0
  38. package/node/third_party/libuv/include/uv/darwin.h +0 -0
  39. package/node/third_party/libuv/include/uv/errno.h +0 -0
  40. package/node/third_party/libuv/include/uv/linux.h +0 -0
  41. package/node/third_party/libuv/include/uv/os390.h +0 -0
  42. package/node/third_party/libuv/include/uv/posix.h +0 -0
  43. package/node/third_party/libuv/include/uv/sunos.h +0 -0
  44. package/node/third_party/libuv/include/uv/threadpool.h +0 -0
  45. package/node/third_party/libuv/include/uv/tree.h +0 -0
  46. package/node/third_party/libuv/include/uv/unix.h +0 -0
  47. package/node/third_party/libuv/include/uv/version.h +0 -0
  48. package/node/third_party/libuv/include/uv/win.h +0 -0
  49. package/node/third_party/libuv/include/uv.h +0 -0
  50. package/node/third_party/libuv/src/fs-poll.c +0 -0
  51. package/node/third_party/libuv/src/heap-inl.h +0 -0
  52. package/node/third_party/libuv/src/idna.c +0 -0
  53. package/node/third_party/libuv/src/idna.h +0 -0
  54. package/node/third_party/libuv/src/inet.c +0 -0
  55. package/node/third_party/libuv/src/queue.h +0 -0
  56. package/node/third_party/libuv/src/random.c +0 -0
  57. package/node/third_party/libuv/src/strscpy.c +0 -0
  58. package/node/third_party/libuv/src/strscpy.h +0 -0
  59. package/node/third_party/libuv/src/strtok.c +0 -0
  60. package/node/third_party/libuv/src/strtok.h +0 -0
  61. package/node/third_party/libuv/src/thread-common.c +0 -0
  62. package/node/third_party/libuv/src/threadpool.c +0 -0
  63. package/node/third_party/libuv/src/timer.c +0 -0
  64. package/node/third_party/libuv/src/unix/async.c +0 -0
  65. package/node/third_party/libuv/src/unix/bsd-ifaddrs.c +0 -0
  66. package/node/third_party/libuv/src/unix/core.c +0 -0
  67. package/node/third_party/libuv/src/unix/darwin-proctitle.c +0 -0
  68. package/node/third_party/libuv/src/unix/darwin-stub.h +0 -0
  69. package/node/third_party/libuv/src/unix/darwin-syscalls.h +0 -0
  70. package/node/third_party/libuv/src/unix/darwin.c +0 -0
  71. package/node/third_party/libuv/src/unix/dl.c +0 -0
  72. package/node/third_party/libuv/src/unix/fs.c +0 -0
  73. package/node/third_party/libuv/src/unix/fsevents.c +0 -0
  74. package/node/third_party/libuv/src/unix/getaddrinfo.c +0 -0
  75. package/node/third_party/libuv/src/unix/getnameinfo.c +0 -0
  76. package/node/third_party/libuv/src/unix/internal.h +0 -0
  77. package/node/third_party/libuv/src/unix/kqueue.c +0 -0
  78. package/node/third_party/libuv/src/unix/linux.c +0 -0
  79. package/node/third_party/libuv/src/unix/loop-watcher.c +0 -0
  80. package/node/third_party/libuv/src/unix/loop.c +0 -0
  81. package/node/third_party/libuv/src/unix/pipe.c +0 -0
  82. package/node/third_party/libuv/src/unix/poll.c +0 -0
  83. package/node/third_party/libuv/src/unix/process.c +0 -0
  84. package/node/third_party/libuv/src/unix/procfs-exepath.c +0 -0
  85. package/node/third_party/libuv/src/unix/proctitle.c +0 -0
  86. package/node/third_party/libuv/src/unix/random-devurandom.c +0 -0
  87. package/node/third_party/libuv/src/unix/random-getentropy.c +0 -0
  88. package/node/third_party/libuv/src/unix/random-getrandom.c +0 -0
  89. package/node/third_party/libuv/src/unix/random-sysctl-linux.c +0 -0
  90. package/node/third_party/libuv/src/unix/signal.c +0 -0
  91. package/node/third_party/libuv/src/unix/stream.c +0 -0
  92. package/node/third_party/libuv/src/unix/tcp.c +0 -0
  93. package/node/third_party/libuv/src/unix/thread.c +0 -0
  94. package/node/third_party/libuv/src/unix/tty.c +0 -0
  95. package/node/third_party/libuv/src/unix/udp.c +0 -0
  96. package/node/third_party/libuv/src/uv-common.c +0 -0
  97. package/node/third_party/libuv/src/uv-common.h +0 -0
  98. package/node/third_party/libuv/src/uv-data-getter-setters.c +0 -0
  99. package/node/third_party/libuv/src/version.c +0 -0
  100. package/node/third_party/libuv/src/win/async.c +98 -0
  101. package/node/third_party/libuv/src/win/atomicops-inl.h +61 -0
  102. package/node/third_party/libuv/src/win/core.c +683 -0
  103. package/node/third_party/libuv/src/win/detect-wakeup.c +56 -0
  104. package/node/third_party/libuv/src/win/dl.c +135 -0
  105. package/node/third_party/libuv/src/win/error.c +183 -0
  106. package/node/third_party/libuv/src/win/fs-event.c +620 -0
  107. package/node/third_party/libuv/src/win/fs-fd-hash-inl.h +200 -0
  108. package/node/third_party/libuv/src/win/fs.c +3774 -0
  109. package/node/third_party/libuv/src/win/getaddrinfo.c +388 -0
  110. package/node/third_party/libuv/src/win/getnameinfo.c +146 -0
  111. package/node/third_party/libuv/src/win/handle-inl.h +180 -0
  112. package/node/third_party/libuv/src/win/handle.c +162 -0
  113. package/node/third_party/libuv/src/win/internal.h +335 -0
  114. package/node/third_party/libuv/src/win/loop-watcher.c +122 -0
  115. package/node/third_party/libuv/src/win/pipe.c +2725 -0
  116. package/node/third_party/libuv/src/win/poll.c +586 -0
  117. package/node/third_party/libuv/src/win/process-stdio.c +419 -0
  118. package/node/third_party/libuv/src/win/process.c +1407 -0
  119. package/node/third_party/libuv/src/win/req-inl.h +214 -0
  120. package/node/third_party/libuv/src/win/signal.c +282 -0
  121. package/node/third_party/libuv/src/win/snprintf.c +42 -0
  122. package/node/third_party/libuv/src/win/stream-inl.h +54 -0
  123. package/node/third_party/libuv/src/win/stream.c +252 -0
  124. package/node/third_party/libuv/src/win/tcp.c +1674 -0
  125. package/node/third_party/libuv/src/win/thread.c +568 -0
  126. package/node/third_party/libuv/src/win/tty.c +2460 -0
  127. package/node/third_party/libuv/src/win/udp.c +1162 -0
  128. package/node/third_party/libuv/src/win/util.c +1750 -0
  129. package/node/third_party/libuv/src/win/winapi.c +144 -0
  130. package/node/third_party/libuv/src/win/winapi.h +4831 -0
  131. package/node/third_party/libuv/src/win/winsock.c +575 -0
  132. package/node/third_party/libuv/src/win/winsock.h +160 -0
  133. package/node/third_party/llhttp/LICENSE +0 -0
  134. package/node/third_party/llhttp/api.c +0 -0
  135. package/node/third_party/llhttp/http.c +0 -0
  136. package/node/third_party/llhttp/llhttp.c +0 -0
  137. package/node/third_party/llhttp/llhttp.h +0 -0
  138. package/package.json +1 -1
  139. package/runtime/include/js_atoms.gen.h +0 -0
  140. package/runtime/include/js_atoms.h +0 -0
  141. package/runtime/include/js_bigint.h +0 -0
  142. package/runtime/include/js_buffer.h +0 -0
  143. package/runtime/include/js_builtins.h +0 -0
  144. package/runtime/include/js_console.h +0 -0
  145. package/runtime/include/js_convert.h +0 -0
  146. package/runtime/include/js_core.def +0 -0
  147. package/runtime/include/js_error.h +0 -0
  148. package/runtime/include/js_exception.h +0 -0
  149. package/runtime/include/js_function.h +0 -0
  150. package/runtime/include/js_gc.h +0 -0
  151. package/runtime/include/js_generator.h +0 -0
  152. package/runtime/include/js_host.h +0 -0
  153. package/runtime/include/js_jobs.h +0 -0
  154. package/runtime/include/js_module.h +0 -0
  155. package/runtime/include/js_object.h +0 -0
  156. package/runtime/include/js_ops.h +0 -0
  157. package/runtime/include/js_promise.h +0 -0
  158. package/runtime/include/js_regexp.h +0 -0
  159. package/runtime/include/js_runtime.h +0 -0
  160. package/runtime/include/js_symbol.h +0 -0
  161. package/runtime/include/js_web.h +0 -0
  162. package/runtime/include/jscell.h +0 -0
  163. package/runtime/include/jscontext.h +0 -0
  164. package/runtime/include/jsnum.h +0 -0
  165. package/runtime/include/jsstring.h +0 -0
  166. package/runtime/include/jsvalue.h +0 -0
  167. package/runtime/src/arguments.c +0 -0
  168. package/runtime/src/array.c +0 -0
  169. package/runtime/src/arraybuffer.c +0 -0
  170. package/runtime/src/async_iter.c +0 -0
  171. package/runtime/src/atoms.c +0 -0
  172. package/runtime/src/base64.c +0 -0
  173. package/runtime/src/bigint.c +0 -0
  174. package/runtime/src/blob.c +0 -0
  175. package/runtime/src/boringssl_support.cc +4 -1
  176. package/runtime/src/buffer.c +0 -0
  177. package/runtime/src/builtin_table.c +0 -0
  178. package/runtime/src/builtins.c +0 -0
  179. package/runtime/src/builtins_util.h +0 -0
  180. package/runtime/src/collections.c +0 -0
  181. package/runtime/src/components.c +0 -0
  182. package/runtime/src/console.c +0 -0
  183. package/runtime/src/convert.c +0 -0
  184. package/runtime/src/core_all.c +0 -0
  185. package/runtime/src/crypto.c +0 -0
  186. package/runtime/src/crypto_host.c +0 -0
  187. package/runtime/src/crypto_kdf.c +0 -0
  188. package/runtime/src/crypto_key.c +0 -0
  189. package/runtime/src/date.c +0 -0
  190. package/runtime/src/domexception.c +0 -0
  191. package/runtime/src/elements.c +0 -0
  192. package/runtime/src/elements.h +0 -0
  193. package/runtime/src/encoding.c +0 -0
  194. package/runtime/src/error.c +0 -0
  195. package/runtime/src/events.c +0 -0
  196. package/runtime/src/exception.c +0 -0
  197. package/runtime/src/fetch.c +0 -0
  198. package/runtime/src/function.c +0 -0
  199. package/runtime/src/gc.c +0 -0
  200. package/runtime/src/generator.c +0 -0
  201. package/runtime/src/global.c +0 -0
  202. package/runtime/src/headers.c +0 -0
  203. package/runtime/src/inspect.c +0 -0
  204. package/runtime/src/internal.h +0 -0
  205. package/runtime/src/iterate.c +0 -0
  206. package/runtime/src/iterator.c +0 -0
  207. package/runtime/src/jobs.c +0 -0
  208. package/runtime/src/jsnum.c +0 -0
  209. package/runtime/src/json.c +0 -0
  210. package/runtime/src/math.c +0 -0
  211. package/runtime/src/module.c +0 -0
  212. package/runtime/src/number.c +0 -0
  213. package/runtime/src/object.c +0 -0
  214. package/runtime/src/ops.c +0 -0
  215. package/runtime/src/os.c +0 -0
  216. package/runtime/src/os.h +0 -0
  217. package/runtime/src/process.c +7 -0
  218. package/runtime/src/promise.c +0 -0
  219. package/runtime/src/proxy.c +0 -0
  220. package/runtime/src/reflect.c +0 -0
  221. package/runtime/src/regexp.c +0 -0
  222. package/runtime/src/regexp_anchor.h +0 -0
  223. package/runtime/src/regexp_message.h +0 -0
  224. package/runtime/src/shape.c +0 -0
  225. package/runtime/src/shape.h +0 -0
  226. package/runtime/src/streams.c +0 -0
  227. package/runtime/src/streams.h +0 -0
  228. package/runtime/src/string.c +0 -0
  229. package/runtime/src/string_builtins.c +0 -0
  230. package/runtime/src/symbol.c +0 -0
  231. package/runtime/src/test_host.c +0 -0
  232. package/runtime/src/typedarray.c +0 -0
  233. package/runtime/src/tznames.gen.h +0 -0
  234. package/runtime/src/uri.c +0 -0
  235. package/runtime/src/url.c +0 -0
  236. package/runtime/src/weak.c +0 -0
  237. package/runtime/src/web.c +0 -0
  238. package/runtime/src/wrapper.c +0 -0
  239. package/runtime/src/writable.c +0 -0
  240. package/runtime/third_party/ada-idna/LICENSE-MIT +0 -0
  241. package/runtime/third_party/ada-idna/README.md +0 -0
  242. package/runtime/third_party/ada-idna/convert.mjs +0 -0
  243. package/runtime/third_party/ada-idna/idna.c +0 -0
  244. package/runtime/third_party/ada-idna/idna.h +0 -0
  245. package/runtime/third_party/ada-idna/idna_tables.h +0 -0
  246. package/runtime/third_party/quickjs-dtoa/LICENSE +0 -0
  247. package/runtime/third_party/quickjs-dtoa/README.md +0 -0
  248. package/runtime/third_party/quickjs-dtoa/dtoa.c +0 -0
  249. package/runtime/third_party/quickjs-dtoa/dtoa.h +0 -0
  250. package/runtime/third_party/quickjs-dtoa/dtoa_compat.h +0 -0
  251. package/runtime/third_party/quickjs-regexp/LICENSE +0 -0
  252. package/runtime/third_party/quickjs-regexp/README.md +0 -0
  253. package/runtime/third_party/quickjs-regexp/cutils.c +0 -0
  254. package/runtime/third_party/quickjs-regexp/cutils.h +0 -0
  255. package/runtime/third_party/quickjs-regexp/libregexp-opcode.h +0 -0
  256. package/runtime/third_party/quickjs-regexp/libregexp.c +0 -0
  257. package/runtime/third_party/quickjs-regexp/libregexp.h +0 -0
  258. package/runtime/third_party/quickjs-regexp/libunicode-table.h +0 -0
  259. package/runtime/third_party/quickjs-regexp/libunicode.c +0 -0
  260. package/runtime/third_party/quickjs-regexp/libunicode.h +0 -0
  261. package/runtime/third_party/v8-ieee754/LICENSE +0 -0
  262. package/runtime/third_party/v8-ieee754/README.md +0 -0
  263. package/runtime/third_party/v8-ieee754/convert.py +0 -0
  264. package/runtime/third_party/v8-ieee754/ieee754.c +0 -0
  265. package/runtime/third_party/v8-ieee754/ieee754.h +0 -0
  266. package/runtime/tools/regexp_compile.c +0 -0
@@ -0,0 +1,160 @@
1
+ /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to
5
+ * deal in the Software without restriction, including without limitation the
6
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ * sell copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ * IN THE SOFTWARE.
20
+ */
21
+
22
+ #ifndef UV_WIN_WINSOCK_H_
23
+ #define UV_WIN_WINSOCK_H_
24
+
25
+ #include <winsock2.h>
26
+ #include <iptypes.h>
27
+ #include <mswsock.h>
28
+ #include <ws2tcpip.h>
29
+ #include <windows.h>
30
+
31
+ #include "winapi.h"
32
+
33
+
34
+ /*
35
+ * MinGW is missing these too
36
+ */
37
+ #ifndef SO_UPDATE_CONNECT_CONTEXT
38
+ # define SO_UPDATE_CONNECT_CONTEXT 0x7010
39
+ #endif
40
+
41
+ #ifndef TCP_KEEPALIVE
42
+ # define TCP_KEEPALIVE 3
43
+ #endif
44
+
45
+ #ifndef IPV6_V6ONLY
46
+ # define IPV6_V6ONLY 27
47
+ #endif
48
+
49
+ #ifndef IPV6_HOPLIMIT
50
+ # define IPV6_HOPLIMIT 21
51
+ #endif
52
+
53
+ #ifndef SIO_BASE_HANDLE
54
+ # define SIO_BASE_HANDLE 0x48000022
55
+ #endif
56
+
57
+ #ifndef MCAST_JOIN_SOURCE_GROUP
58
+ # define MCAST_JOIN_SOURCE_GROUP 45
59
+ #endif
60
+
61
+ #ifndef MCAST_LEAVE_SOURCE_GROUP
62
+ # define MCAST_LEAVE_SOURCE_GROUP 46
63
+ #endif
64
+
65
+ /*
66
+ * TDI defines that are only in the DDK.
67
+ * We only need receive flags so far.
68
+ */
69
+ #ifndef TDI_RECEIVE_NORMAL
70
+ #define TDI_RECEIVE_BROADCAST 0x00000004
71
+ #define TDI_RECEIVE_MULTICAST 0x00000008
72
+ #define TDI_RECEIVE_PARTIAL 0x00000010
73
+ #define TDI_RECEIVE_NORMAL 0x00000020
74
+ #define TDI_RECEIVE_EXPEDITED 0x00000040
75
+ #define TDI_RECEIVE_PEEK 0x00000080
76
+ #define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
77
+ #define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
78
+ #define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
79
+ #define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
80
+ #define TDI_RECEIVE_CONTROL_INFO 0x00001000
81
+ #define TDI_RECEIVE_FORCE_INDICATION 0x00002000
82
+ #define TDI_RECEIVE_NO_PUSH 0x00004000
83
+ #endif
84
+
85
+ /*
86
+ * The "Auxiliary Function Driver" is the windows kernel-mode driver that does
87
+ * TCP, UDP etc. Winsock is just a layer that dispatches requests to it.
88
+ * Having these definitions allows us to bypass winsock and make an AFD kernel
89
+ * call directly, avoiding a bug in winsock's recvfrom implementation.
90
+ */
91
+
92
+ #define AFD_NO_FAST_IO 0x00000001
93
+ #define AFD_OVERLAPPED 0x00000002
94
+ #define AFD_IMMEDIATE 0x00000004
95
+
96
+ #define AFD_POLL_RECEIVE_BIT 0
97
+ #define AFD_POLL_RECEIVE (1 << AFD_POLL_RECEIVE_BIT)
98
+ #define AFD_POLL_RECEIVE_EXPEDITED_BIT 1
99
+ #define AFD_POLL_RECEIVE_EXPEDITED (1 << AFD_POLL_RECEIVE_EXPEDITED_BIT)
100
+ #define AFD_POLL_SEND_BIT 2
101
+ #define AFD_POLL_SEND (1 << AFD_POLL_SEND_BIT)
102
+ #define AFD_POLL_DISCONNECT_BIT 3
103
+ #define AFD_POLL_DISCONNECT (1 << AFD_POLL_DISCONNECT_BIT)
104
+ #define AFD_POLL_ABORT_BIT 4
105
+ #define AFD_POLL_ABORT (1 << AFD_POLL_ABORT_BIT)
106
+ #define AFD_POLL_LOCAL_CLOSE_BIT 5
107
+ #define AFD_POLL_LOCAL_CLOSE (1 << AFD_POLL_LOCAL_CLOSE_BIT)
108
+ #define AFD_POLL_CONNECT_BIT 6
109
+ #define AFD_POLL_CONNECT (1 << AFD_POLL_CONNECT_BIT)
110
+ #define AFD_POLL_ACCEPT_BIT 7
111
+ #define AFD_POLL_ACCEPT (1 << AFD_POLL_ACCEPT_BIT)
112
+ #define AFD_POLL_CONNECT_FAIL_BIT 8
113
+ #define AFD_POLL_CONNECT_FAIL (1 << AFD_POLL_CONNECT_FAIL_BIT)
114
+ #define AFD_POLL_QOS_BIT 9
115
+ #define AFD_POLL_QOS (1 << AFD_POLL_QOS_BIT)
116
+ #define AFD_POLL_GROUP_QOS_BIT 10
117
+ #define AFD_POLL_GROUP_QOS (1 << AFD_POLL_GROUP_QOS_BIT)
118
+
119
+ #define AFD_NUM_POLL_EVENTS 11
120
+ #define AFD_POLL_ALL ((1 << AFD_NUM_POLL_EVENTS) - 1)
121
+
122
+ typedef struct _AFD_RECV_DATAGRAM_INFO {
123
+ LPWSABUF BufferArray;
124
+ ULONG BufferCount;
125
+ ULONG AfdFlags;
126
+ ULONG TdiFlags;
127
+ struct sockaddr* Address;
128
+ int* AddressLength;
129
+ } AFD_RECV_DATAGRAM_INFO, *PAFD_RECV_DATAGRAM_INFO;
130
+
131
+ typedef struct _AFD_RECV_INFO {
132
+ LPWSABUF BufferArray;
133
+ ULONG BufferCount;
134
+ ULONG AfdFlags;
135
+ ULONG TdiFlags;
136
+ } AFD_RECV_INFO, *PAFD_RECV_INFO;
137
+
138
+
139
+ #define _AFD_CONTROL_CODE(operation, method) \
140
+ ((FSCTL_AFD_BASE) << 12 | (operation << 2) | method)
141
+
142
+ #define FSCTL_AFD_BASE FILE_DEVICE_NETWORK
143
+
144
+ #define AFD_RECEIVE 5
145
+ #define AFD_RECEIVE_DATAGRAM 6
146
+ #define AFD_POLL 9
147
+
148
+ #define IOCTL_AFD_RECEIVE \
149
+ _AFD_CONTROL_CODE(AFD_RECEIVE, METHOD_NEITHER)
150
+
151
+ #define IOCTL_AFD_RECEIVE_DATAGRAM \
152
+ _AFD_CONTROL_CODE(AFD_RECEIVE_DATAGRAM, METHOD_NEITHER)
153
+
154
+ #define IOCTL_AFD_POLL \
155
+ _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED)
156
+
157
+ int uv__convert_to_localhost_if_unspecified(const struct sockaddr* addr,
158
+ struct sockaddr_storage* storage);
159
+
160
+ #endif /* UV_WIN_WINSOCK_H_ */
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visaljs",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Ahead-of-time JavaScript to C compiler: the command line",
5
5
  "license": "MIT",
6
6
  "repository": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -29,6 +29,9 @@ void __sort(RandomAccessIterator first, RandomAccessIterator last, Comp) {
29
29
  }
30
30
  template void __sort<__less<unsigned short> &, unsigned short *>(unsigned short *, unsigned short *, __less<unsigned short> &);
31
31
 
32
- void __libcpp_verbose_abort(const char *, ...) _NOEXCEPT { abort(); }
32
+ /* noexcept since libc++ 20, but not in older ones (Xcode 16's): match whichever header this is */
33
+ void __libcpp_verbose_abort(const char *, ...) noexcept(noexcept(__libcpp_verbose_abort(""))) {
34
+ abort();
35
+ }
33
36
  _LIBCPP_END_NAMESPACE_STD
34
37
  #endif
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/runtime/src/gc.c CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/runtime/src/ops.c CHANGED
File without changes
package/runtime/src/os.c CHANGED
File without changes
package/runtime/src/os.h CHANGED
File without changes
@@ -25,6 +25,7 @@
25
25
 
26
26
  #ifdef _WIN32
27
27
  #include <direct.h>
28
+ #include <fcntl.h>
28
29
  #include <io.h>
29
30
  #include <process.h>
30
31
  #define getcwd _getcwd
@@ -419,6 +420,12 @@ static JSValue new_process(JSContext *ctx) {
419
420
  int js_host_init(JSContext *ctx, int argc, char **argv) {
420
421
  saved_argc = argc;
421
422
  saved_argv = argv;
423
+ #ifdef _WIN32
424
+ /* bytes as written, as Node writes them: the CRT's text mode would turn \n into \r\n */
425
+ _setmode(0, _O_BINARY);
426
+ _setmode(1, _O_BINARY);
427
+ _setmode(2, _O_BINARY);
428
+ #endif
422
429
  JSValue global = ctx->intrinsics[JS_INTRINSIC_GLOBAL_OBJECT];
423
430
  JSObject *g = js_as_object(global);
424
431
  JSValue console = js_new_console(ctx);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/runtime/src/uri.c CHANGED
File without changes
package/runtime/src/url.c CHANGED
File without changes
File without changes
package/runtime/src/web.c CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes