visaljs 0.0.9 → 0.0.11

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 (232) hide show
  1. package/README.md +12 -4
  2. package/THIRD_PARTY_LICENSES +31 -1
  3. package/cli.js +3745 -890
  4. package/node/include/js_node.h +12 -1
  5. package/node/prelude/_http_common.js +29 -0
  6. package/node/prelude/async_hooks.js +50 -11
  7. package/node/prelude/child_process.js +31 -4
  8. package/node/prelude/console.js +311 -143
  9. package/node/prelude/crypto.js +6 -4
  10. package/node/prelude/dgram.js +1169 -0
  11. package/node/prelude/diagnostics_channel.js +3 -1
  12. package/node/prelude/dns.js +250 -45
  13. package/node/prelude/dns_promises.js +8 -2
  14. package/node/prelude/fs_promises.js +9 -1
  15. package/node/prelude/http.js +405 -94
  16. package/node/prelude/https.js +13 -4
  17. package/node/prelude/internal/console_class.js +7 -0
  18. package/node/prelude/internal/console_global.js +25 -0
  19. package/node/prelude/internal/crypto/key_encryption.js +217 -0
  20. package/node/prelude/internal/crypto/keys.js +161 -26
  21. package/node/prelude/internal/crypto/random.js +24 -0
  22. package/node/prelude/internal/crypto/util.js +2 -1
  23. package/node/prelude/internal/crypto_x509.js +161 -0
  24. package/node/prelude/internal/dns_classes.js +6 -0
  25. package/node/prelude/internal/dns_resolver.js +371 -0
  26. package/node/prelude/internal/errors.js +9 -0
  27. package/node/prelude/internal/events_on.js +82 -37
  28. package/node/prelude/internal/features.js +8 -4
  29. package/node/prelude/internal/fs_filehandle.js +10 -4
  30. package/node/prelude/internal/http_chars.ts +22 -0
  31. package/node/prelude/internal/perf_histogram.js +1 -1
  32. package/node/prelude/internal/process_more.js +32 -17
  33. package/node/prelude/internal/process_signals.js +8 -2
  34. package/node/prelude/internal/punycode.ts +163 -0
  35. package/node/prelude/internal/readline.js +648 -274
  36. package/node/prelude/internal/readline_editor.js +1240 -0
  37. package/node/prelude/internal/string_width.js +43 -0
  38. package/node/prelude/internal/tls/common.js +145 -33
  39. package/node/prelude/internal/tls/wrap.js +182 -49
  40. package/node/prelude/internal/tls/x509.js +4 -1
  41. package/node/prelude/internal/udp.js +177 -0
  42. package/node/prelude/net.js +30 -14
  43. package/node/prelude/os.js +24 -6
  44. package/node/prelude/perf_hooks.js +37 -2
  45. package/node/prelude/punycode.js +2 -130
  46. package/node/prelude/readline.js +113 -4
  47. package/node/prelude/readline_promises.js +56 -32
  48. package/node/prelude/tls.js +21 -4
  49. package/node/prelude/util.js +3 -16
  50. package/node/src/host_dns.c +623 -0
  51. package/node/src/host_http.c +12 -0
  52. package/node/src/host_net.c +46 -0
  53. package/node/src/host_os.c +1 -6
  54. package/node/src/host_sys.c +79 -0
  55. package/node/src/host_udp.c +418 -0
  56. package/node/third_party/c-ares/LICENSE.md +24 -0
  57. package/node/third_party/c-ares/config/darwin/ares_config.h +573 -0
  58. package/node/third_party/c-ares/config/freebsd/ares_config.h +573 -0
  59. package/node/third_party/c-ares/config/linux/ares_config.h +573 -0
  60. package/node/third_party/c-ares/config/openbsd/ares_config.h +583 -0
  61. package/node/third_party/c-ares/include/ares.h +1237 -0
  62. package/node/third_party/c-ares/include/ares_build.h +202 -0
  63. package/node/third_party/c-ares/include/ares_dns.h +127 -0
  64. package/node/third_party/c-ares/include/ares_dns_record.h +1119 -0
  65. package/node/third_party/c-ares/include/ares_nameser.h +510 -0
  66. package/node/third_party/c-ares/include/ares_version.h +47 -0
  67. package/node/third_party/c-ares/src/lib/ares_addrinfo2hostent.c +305 -0
  68. package/node/third_party/c-ares/src/lib/ares_addrinfo_localhost.c +245 -0
  69. package/node/third_party/c-ares/src/lib/ares_android.c +496 -0
  70. package/node/third_party/c-ares/src/lib/ares_android.h +38 -0
  71. package/node/third_party/c-ares/src/lib/ares_cancel.c +87 -0
  72. package/node/third_party/c-ares/src/lib/ares_close_sockets.c +137 -0
  73. package/node/third_party/c-ares/src/lib/ares_conn.c +511 -0
  74. package/node/third_party/c-ares/src/lib/ares_conn.h +202 -0
  75. package/node/third_party/c-ares/src/lib/ares_cookie.c +461 -0
  76. package/node/third_party/c-ares/src/lib/ares_data.c +168 -0
  77. package/node/third_party/c-ares/src/lib/ares_data.h +92 -0
  78. package/node/third_party/c-ares/src/lib/ares_destroy.c +159 -0
  79. package/node/third_party/c-ares/src/lib/ares_free_hostent.c +54 -0
  80. package/node/third_party/c-ares/src/lib/ares_free_string.c +33 -0
  81. package/node/third_party/c-ares/src/lib/ares_freeaddrinfo.c +67 -0
  82. package/node/third_party/c-ares/src/lib/ares_getaddrinfo.c +806 -0
  83. package/node/third_party/c-ares/src/lib/ares_getenv.c +38 -0
  84. package/node/third_party/c-ares/src/lib/ares_getenv.h +34 -0
  85. package/node/third_party/c-ares/src/lib/ares_gethostbyaddr.c +229 -0
  86. package/node/third_party/c-ares/src/lib/ares_gethostbyname.c +341 -0
  87. package/node/third_party/c-ares/src/lib/ares_getnameinfo.c +437 -0
  88. package/node/third_party/c-ares/src/lib/ares_hosts_file.c +960 -0
  89. package/node/third_party/c-ares/src/lib/ares_inet_net_pton.h +31 -0
  90. package/node/third_party/c-ares/src/lib/ares_init.c +631 -0
  91. package/node/third_party/c-ares/src/lib/ares_ipv6.h +115 -0
  92. package/node/third_party/c-ares/src/lib/ares_library_init.c +190 -0
  93. package/node/third_party/c-ares/src/lib/ares_metrics.c +261 -0
  94. package/node/third_party/c-ares/src/lib/ares_options.c +492 -0
  95. package/node/third_party/c-ares/src/lib/ares_parse_into_addrinfo.c +179 -0
  96. package/node/third_party/c-ares/src/lib/ares_private.h +648 -0
  97. package/node/third_party/c-ares/src/lib/ares_process.c +1649 -0
  98. package/node/third_party/c-ares/src/lib/ares_qcache.c +442 -0
  99. package/node/third_party/c-ares/src/lib/ares_query.c +151 -0
  100. package/node/third_party/c-ares/src/lib/ares_search.c +623 -0
  101. package/node/third_party/c-ares/src/lib/ares_send.c +300 -0
  102. package/node/third_party/c-ares/src/lib/ares_set_socket_functions.c +590 -0
  103. package/node/third_party/c-ares/src/lib/ares_setup.h +224 -0
  104. package/node/third_party/c-ares/src/lib/ares_socket.c +427 -0
  105. package/node/third_party/c-ares/src/lib/ares_socket.h +163 -0
  106. package/node/third_party/c-ares/src/lib/ares_sortaddrinfo.c +447 -0
  107. package/node/third_party/c-ares/src/lib/ares_strerror.c +91 -0
  108. package/node/third_party/c-ares/src/lib/ares_sysconfig.c +642 -0
  109. package/node/third_party/c-ares/src/lib/ares_sysconfig_files.c +851 -0
  110. package/node/third_party/c-ares/src/lib/ares_sysconfig_mac.c +373 -0
  111. package/node/third_party/c-ares/src/lib/ares_sysconfig_win.c +673 -0
  112. package/node/third_party/c-ares/src/lib/ares_timeout.c +162 -0
  113. package/node/third_party/c-ares/src/lib/ares_update_servers.c +1376 -0
  114. package/node/third_party/c-ares/src/lib/ares_version.c +36 -0
  115. package/node/third_party/c-ares/src/lib/config-dos.h +114 -0
  116. package/node/third_party/c-ares/src/lib/config-win32.h +396 -0
  117. package/node/third_party/c-ares/src/lib/dsa/ares_array.c +409 -0
  118. package/node/third_party/c-ares/src/lib/dsa/ares_htable.c +451 -0
  119. package/node/third_party/c-ares/src/lib/dsa/ares_htable.h +174 -0
  120. package/node/third_party/c-ares/src/lib/dsa/ares_htable_asvp.c +224 -0
  121. package/node/third_party/c-ares/src/lib/dsa/ares_htable_dict.c +230 -0
  122. package/node/third_party/c-ares/src/lib/dsa/ares_htable_strvp.c +210 -0
  123. package/node/third_party/c-ares/src/lib/dsa/ares_htable_szvp.c +188 -0
  124. package/node/third_party/c-ares/src/lib/dsa/ares_htable_vpstr.c +186 -0
  125. package/node/third_party/c-ares/src/lib/dsa/ares_htable_vpvp.c +194 -0
  126. package/node/third_party/c-ares/src/lib/dsa/ares_llist.c +385 -0
  127. package/node/third_party/c-ares/src/lib/dsa/ares_slist.c +479 -0
  128. package/node/third_party/c-ares/src/lib/dsa/ares_slist.h +207 -0
  129. package/node/third_party/c-ares/src/lib/event/ares_event.h +191 -0
  130. package/node/third_party/c-ares/src/lib/event/ares_event_configchg.c +746 -0
  131. package/node/third_party/c-ares/src/lib/event/ares_event_epoll.c +192 -0
  132. package/node/third_party/c-ares/src/lib/event/ares_event_kqueue.c +248 -0
  133. package/node/third_party/c-ares/src/lib/event/ares_event_poll.c +140 -0
  134. package/node/third_party/c-ares/src/lib/event/ares_event_select.c +159 -0
  135. package/node/third_party/c-ares/src/lib/event/ares_event_thread.c +575 -0
  136. package/node/third_party/c-ares/src/lib/event/ares_event_wake_pipe.c +172 -0
  137. package/node/third_party/c-ares/src/lib/event/ares_event_win32.c +981 -0
  138. package/node/third_party/c-ares/src/lib/event/ares_event_win32.h +161 -0
  139. package/node/third_party/c-ares/src/lib/include/ares_array.h +276 -0
  140. package/node/third_party/c-ares/src/lib/include/ares_buf.h +732 -0
  141. package/node/third_party/c-ares/src/lib/include/ares_htable_asvp.h +130 -0
  142. package/node/third_party/c-ares/src/lib/include/ares_htable_dict.h +123 -0
  143. package/node/third_party/c-ares/src/lib/include/ares_htable_strvp.h +130 -0
  144. package/node/third_party/c-ares/src/lib/include/ares_htable_szvp.h +118 -0
  145. package/node/third_party/c-ares/src/lib/include/ares_htable_vpstr.h +111 -0
  146. package/node/third_party/c-ares/src/lib/include/ares_htable_vpvp.h +128 -0
  147. package/node/third_party/c-ares/src/lib/include/ares_llist.h +239 -0
  148. package/node/third_party/c-ares/src/lib/include/ares_mem.h +41 -0
  149. package/node/third_party/c-ares/src/lib/include/ares_str.h +261 -0
  150. package/node/third_party/c-ares/src/lib/inet_net_pton.c +451 -0
  151. package/node/third_party/c-ares/src/lib/inet_ntop.c +219 -0
  152. package/node/third_party/c-ares/src/lib/legacy/ares_create_query.c +78 -0
  153. package/node/third_party/c-ares/src/lib/legacy/ares_expand_name.c +99 -0
  154. package/node/third_party/c-ares/src/lib/legacy/ares_expand_string.c +107 -0
  155. package/node/third_party/c-ares/src/lib/legacy/ares_fds.c +80 -0
  156. package/node/third_party/c-ares/src/lib/legacy/ares_getsock.c +85 -0
  157. package/node/third_party/c-ares/src/lib/legacy/ares_parse_a_reply.c +107 -0
  158. package/node/third_party/c-ares/src/lib/legacy/ares_parse_aaaa_reply.c +109 -0
  159. package/node/third_party/c-ares/src/lib/legacy/ares_parse_caa_reply.c +137 -0
  160. package/node/third_party/c-ares/src/lib/legacy/ares_parse_mx_reply.c +110 -0
  161. package/node/third_party/c-ares/src/lib/legacy/ares_parse_naptr_reply.c +132 -0
  162. package/node/third_party/c-ares/src/lib/legacy/ares_parse_ns_reply.c +154 -0
  163. package/node/third_party/c-ares/src/lib/legacy/ares_parse_ptr_reply.c +213 -0
  164. package/node/third_party/c-ares/src/lib/legacy/ares_parse_soa_reply.c +115 -0
  165. package/node/third_party/c-ares/src/lib/legacy/ares_parse_srv_reply.c +114 -0
  166. package/node/third_party/c-ares/src/lib/legacy/ares_parse_txt_reply.c +144 -0
  167. package/node/third_party/c-ares/src/lib/legacy/ares_parse_uri_reply.c +113 -0
  168. package/node/third_party/c-ares/src/lib/record/ares_dns_mapping.c +982 -0
  169. package/node/third_party/c-ares/src/lib/record/ares_dns_multistring.c +309 -0
  170. package/node/third_party/c-ares/src/lib/record/ares_dns_multistring.h +72 -0
  171. package/node/third_party/c-ares/src/lib/record/ares_dns_name.c +736 -0
  172. package/node/third_party/c-ares/src/lib/record/ares_dns_parse.c +1360 -0
  173. package/node/third_party/c-ares/src/lib/record/ares_dns_private.h +273 -0
  174. package/node/third_party/c-ares/src/lib/record/ares_dns_record.c +1701 -0
  175. package/node/third_party/c-ares/src/lib/record/ares_dns_write.c +1229 -0
  176. package/node/third_party/c-ares/src/lib/str/ares_buf.c +1510 -0
  177. package/node/third_party/c-ares/src/lib/str/ares_str.c +562 -0
  178. package/node/third_party/c-ares/src/lib/str/ares_strsplit.c +90 -0
  179. package/node/third_party/c-ares/src/lib/str/ares_strsplit.h +51 -0
  180. package/node/third_party/c-ares/src/lib/thirdparty/apple/dnsinfo.h +122 -0
  181. package/node/third_party/c-ares/src/lib/util/ares_iface_ips.c +640 -0
  182. package/node/third_party/c-ares/src/lib/util/ares_iface_ips.h +140 -0
  183. package/node/third_party/c-ares/src/lib/util/ares_math.c +167 -0
  184. package/node/third_party/c-ares/src/lib/util/ares_math.h +58 -0
  185. package/node/third_party/c-ares/src/lib/util/ares_rand.c +389 -0
  186. package/node/third_party/c-ares/src/lib/util/ares_rand.h +36 -0
  187. package/node/third_party/c-ares/src/lib/util/ares_threads.c +613 -0
  188. package/node/third_party/c-ares/src/lib/util/ares_threads.h +60 -0
  189. package/node/third_party/c-ares/src/lib/util/ares_time.h +49 -0
  190. package/node/third_party/c-ares/src/lib/util/ares_timeval.c +95 -0
  191. package/node/third_party/c-ares/src/lib/util/ares_uri.c +1627 -0
  192. package/node/third_party/c-ares/src/lib/util/ares_uri.h +252 -0
  193. package/node/third_party/c-ares/src/lib/windows_port.c +29 -0
  194. package/package.json +1 -1
  195. package/prebuilt/darwin-arm64/cares-a6286c65ca9374a3.a +0 -0
  196. package/prebuilt/darwin-x64/cares-a6286c65ca9374a3.a +0 -0
  197. package/prebuilt/linux-arm64/cares-4ba05ac8e948af8e.a +0 -0
  198. package/prebuilt/linux-arm64-musl/cares-4ba05ac8e948af8e.a +0 -0
  199. package/prebuilt/linux-x64/cares-4ba05ac8e948af8e.a +0 -0
  200. package/prebuilt/linux-x64-musl/cares-4ba05ac8e948af8e.a +0 -0
  201. package/prebuilt/win32-x64/boringssl-ce573858472b7fc9.a +0 -0
  202. package/prebuilt/win32-x64/brotli-20d86a61f30baeb3.a +0 -0
  203. package/prebuilt/win32-x64/cares-49c9ec95162b912d.a +0 -0
  204. package/prebuilt/win32-x64/uv-b11bae65d7fced82.a +0 -0
  205. package/prebuilt/win32-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
  206. package/prebuilt/win32-x64/zstd-015315ac7c784c73.a +0 -0
  207. package/runtime/include/js_buffer.h +185 -0
  208. package/runtime/include/js_builtins.h +58 -0
  209. package/runtime/include/js_crypto.h +11 -0
  210. package/runtime/include/js_exception.h +3 -0
  211. package/runtime/include/js_function.h +1 -1
  212. package/runtime/include/js_gc.h +13 -10
  213. package/runtime/include/js_jobs.h +2 -0
  214. package/runtime/include/js_object.h +79 -3
  215. package/runtime/include/js_ops.h +27 -0
  216. package/runtime/include/js_runtime.h +1 -0
  217. package/runtime/include/js_web.h +0 -3
  218. package/runtime/include/jscontext.h +8 -0
  219. package/runtime/src/builtins.c +17 -4
  220. package/runtime/src/crypto_internal.h +1 -0
  221. package/runtime/src/crypto_subtle.c +66 -7
  222. package/runtime/src/crypto_tls.c +265 -19
  223. package/runtime/src/function.c +37 -10
  224. package/runtime/src/gc.c +76 -93
  225. package/runtime/src/inspect.c +18 -1
  226. package/runtime/src/iterator.c +5 -1
  227. package/runtime/src/jobs.c +37 -22
  228. package/runtime/src/object.c +91 -8
  229. package/runtime/src/os.c +16 -6
  230. package/runtime/src/os.h +2 -0
  231. package/runtime/src/process.c +97 -10
  232. package/runtime/src/typedarray.c +23 -0
@@ -0,0 +1,36 @@
1
+ /* MIT License
2
+ *
3
+ * Copyright (c) 1998 Massachusetts Institute of Technology
4
+ * Copyright (c) The c-ares project and its contributors
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice (including the next
14
+ * paragraph) shall be included in all copies or substantial portions of the
15
+ * Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
25
+ * SPDX-License-Identifier: MIT
26
+ */
27
+ #include "ares_private.h"
28
+
29
+ const char *ares_version(int *version)
30
+ {
31
+ if (version) {
32
+ *version = ARES_VERSION;
33
+ }
34
+
35
+ return ARES_VERSION_STR;
36
+ }
@@ -0,0 +1,114 @@
1
+ #ifndef HEADER_CONFIG_DOS_H
2
+ #define HEADER_CONFIG_DOS_H
3
+
4
+
5
+ /* ================================================================
6
+ * ares/config-dos.h - Hand crafted config file for DOS
7
+ *
8
+ * Copyright (C) The c-ares project and its contributors
9
+ * SPDX-License-Identifier: MIT
10
+ * ================================================================ */
11
+
12
+ #define PACKAGE "c-ares"
13
+
14
+ #define HAVE_ERRNO_H 1
15
+ #define HAVE_GETENV 1
16
+ #define HAVE_GETTIMEOFDAY 1
17
+ #define HAVE_IOCTLSOCKET 1
18
+ #define HAVE_IOCTLSOCKET_FIONBIO 1
19
+ #define HAVE_LIMITS_H 1
20
+ #define HAVE_NET_IF_H 1
21
+ #define HAVE_RECV 1
22
+ #define HAVE_RECVFROM 1
23
+ #define HAVE_SEND 1
24
+ #define HAVE_SENDTO 1
25
+ #define HAVE_STRDUP 1
26
+ #define HAVE_STRICMP 1
27
+ #define HAVE_STRUCT_IN6_ADDR 1
28
+ #define HAVE_STRUCT_TIMEVAL 1
29
+ #define HAVE_SYS_IOCTL_H 1
30
+ #define HAVE_SYS_SOCKET_H 1
31
+ #define HAVE_SYS_STAT_H 1
32
+ #define HAVE_SYS_TYPES_H 1
33
+ #define HAVE_TIME_H 1
34
+ #define HAVE_UNISTD_H 1
35
+ #define HAVE_WRITEV 1
36
+ #define HAVE_STAT 1
37
+ #define HAVE_MALLOC_H 1
38
+
39
+ /* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
40
+
41
+ #define SEND_TYPE_ARG1 int
42
+ #define SEND_TYPE_ARG2 const void *
43
+ #define SEND_TYPE_ARG3 int
44
+ #define SEND_TYPE_ARG4 int
45
+ #define SEND_TYPE_RETV int
46
+
47
+ #define RECV_TYPE_ARG1 int
48
+ #define RECV_TYPE_ARG2 void *
49
+ #define RECV_TYPE_ARG3 int
50
+ #define RECV_TYPE_ARG4 int
51
+ #define RECV_TYPE_RETV int
52
+
53
+ #define RECVFROM_TYPE_ARG1 int
54
+ #define RECVFROM_TYPE_ARG2 void
55
+ #define RECVFROM_TYPE_ARG3 int
56
+ #define RECVFROM_TYPE_ARG4 int
57
+ #define RECVFROM_TYPE_ARG5 struct sockaddr
58
+ #define RECVFROM_TYPE_ARG6 int
59
+ #define RECVFROM_TYPE_RETV int
60
+ #define RECVFROM_TYPE_ARG2_IS_VOID 1
61
+
62
+ #define BSD
63
+
64
+ /* Target HAVE_x section */
65
+
66
+ #if defined(DJGPP)
67
+ # undef _SSIZE_T
68
+ # include <sys/types.h> /* For 'ssize_t' */
69
+
70
+ # define HAVE_STRCASECMP 1
71
+ # define HAVE_STRNCASECMP 1
72
+ # define HAVE_SYS_TIME_H 1
73
+ # define HAVE_VARIADIC_MACROS_GCC 1
74
+
75
+ /* Because djgpp <= 2.03 doesn't have snprintf() etc. */
76
+ # if defined(DJGPP_MINOR) && DJGPP_MINOR < 4
77
+ # define _MPRINTF_REPLACE
78
+ # endif
79
+
80
+ #elif defined(__WATCOMC__)
81
+ # define HAVE_STRCASECMP 1
82
+
83
+ #elif defined(__HIGHC__)
84
+ # define HAVE_SYS_TIME_H 1
85
+ # define strerror(e) strerror_s_((e))
86
+ #endif
87
+
88
+ /* This seems odd, can DOS build without WATT32? */
89
+ #ifdef WATT32
90
+ # define HAVE_AF_INET6 1
91
+ # define HAVE_ARPA_INET_H 1
92
+ # define HAVE_ARPA_NAMESER_H 1
93
+ # define HAVE_CLOSE_S 1
94
+ # define HAVE_GETHOSTNAME 1
95
+ # define HAVE_NETDB_H 1
96
+ # define HAVE_NETINET_IN_H 1
97
+ # define HAVE_NETINET_TCP_H 1
98
+ # define HAVE_PF_INET6 1
99
+ # define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
100
+ # define HAVE_STRUCT_ADDRINFO 1
101
+ # define HAVE_STRUCT_IN6_ADDR 1
102
+ # define HAVE_STRUCT_SOCKADDR_IN6 1
103
+ # define HAVE_SYS_SOCKET_H 1
104
+ # define HAVE_SYS_IOCTL_H 1
105
+ # define HAVE_SYS_UIO_H 1
106
+ # define NS_INADDRSZ 4
107
+ # define HAVE_GETSERVBYPORT_R 1
108
+ # define GETSERVBYPORT_R_ARGS 6
109
+ # define HAVE_WRITEV 1
110
+ # define HAVE_IF_NAMETOINDEX 1
111
+ # define HAVE_IF_INDEXTONAME 1
112
+ #endif
113
+
114
+ #endif /* HEADER_CONFIG_DOS_H */
@@ -0,0 +1,396 @@
1
+ /* MIT License
2
+ *
3
+ * Copyright (c) 2004 Daniel Stenberg
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice (including the next
13
+ * paragraph) shall be included in all copies or substantial portions of the
14
+ * Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ * SPDX-License-Identifier: MIT
25
+ */
26
+ #ifndef HEADER_CARES_CONFIG_WIN32_H
27
+ #define HEADER_CARES_CONFIG_WIN32_H
28
+
29
+ /* ================================================================ */
30
+ /* c-ares/config-win32.h - Hand crafted config file for Windows */
31
+ /* ================================================================ */
32
+
33
+ /* ---------------------------------------------------------------- */
34
+ /* HEADER FILES */
35
+ /* ---------------------------------------------------------------- */
36
+
37
+ /* Define if you have the <assert.h> header file. */
38
+ #define HAVE_ASSERT_H 1
39
+
40
+ /* Define if you have the <errno.h> header file. */
41
+ #define HAVE_ERRNO_H 1
42
+
43
+ /* Define if you have the <getopt.h> header file. */
44
+ #if defined(__MINGW32__) || defined(__POCC__)
45
+ # define HAVE_GETOPT_H 1
46
+ #endif
47
+
48
+ /* Define if you have the <limits.h> header file. */
49
+ #define HAVE_LIMITS_H 1
50
+
51
+ /* Define if you have the <process.h> header file. */
52
+ #ifndef __SALFORDC__
53
+ # define HAVE_PROCESS_H 1
54
+ #endif
55
+
56
+ /* Define if you have the <signal.h> header file. */
57
+ #define HAVE_SIGNAL_H 1
58
+
59
+ /* Define if you have the <sys/time.h> header file */
60
+ /* #define HAVE_SYS_TIME_H 1 */
61
+
62
+ /* Define if you have the <time.h> header file. */
63
+ #define HAVE_TIME_H 1
64
+
65
+ /* Define if you have the <unistd.h> header file. */
66
+ #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
67
+ defined(__POCC__)
68
+ # define HAVE_UNISTD_H 1
69
+ #endif
70
+
71
+ /* Define if you have the <windows.h> header file. */
72
+ #define HAVE_WINDOWS_H 1
73
+
74
+ /* Define if you have the <winsock.h> header file. */
75
+ #define HAVE_WINSOCK_H 1
76
+
77
+ /* Define if you have the <winsock2.h> header file. */
78
+ #ifndef __SALFORDC__
79
+ # define HAVE_WINSOCK2_H 1
80
+ #endif
81
+
82
+ /* Define if you have the <ws2tcpip.h> header file. */
83
+ #ifndef __SALFORDC__
84
+ # define HAVE_WS2TCPIP_H 1
85
+ #endif
86
+
87
+ /* Define if you have <iphlpapi.h> header file */
88
+ #define HAVE_IPHLPAPI_H 1
89
+
90
+ /* Define if you have <netioapi.h> header file */
91
+ #if !defined(__WATCOMC__) && !defined(WATT32)
92
+ # define HAVE_NETIOAPI_H 1
93
+ #endif
94
+
95
+ #define HAVE_SYS_TYPES_H 1
96
+ #define HAVE_SYS_STAT_H 1
97
+
98
+ /* If we are building with OpenWatcom, we need to specify that we have
99
+ * <stdint.h>. */
100
+ #if defined(__WATCOMC__)
101
+ # define HAVE_STDINT_H
102
+ #endif
103
+
104
+ /* ---------------------------------------------------------------- */
105
+ /* OTHER HEADER INFO */
106
+ /* ---------------------------------------------------------------- */
107
+
108
+ /* Define if you have the ANSI C header files. */
109
+ #define STDC_HEADERS 1
110
+
111
+ /* ---------------------------------------------------------------- */
112
+ /* FUNCTIONS */
113
+ /* ---------------------------------------------------------------- */
114
+
115
+ /* Define if you have the closesocket function. */
116
+ #define HAVE_CLOSESOCKET 1
117
+
118
+ /* Define if you have the getenv function. */
119
+ #define HAVE_GETENV 1
120
+
121
+ /* Define if you have the gethostname function. */
122
+ #define HAVE_GETHOSTNAME 1
123
+
124
+ /* Define if you have the ioctlsocket function. */
125
+ #define HAVE_IOCTLSOCKET 1
126
+
127
+ /* Define if you have a working ioctlsocket FIONBIO function. */
128
+ #define HAVE_IOCTLSOCKET_FIONBIO 1
129
+
130
+ /* Define if you have the strcasecmp function. */
131
+ /* #define HAVE_STRCASECMP 1 */
132
+
133
+ /* Define if you have the strdup function. */
134
+ #define HAVE_STRDUP 1
135
+
136
+ /* Define if you have the stricmp function. */
137
+ #define HAVE_STRICMP 1
138
+
139
+ /* Define if you have the strncasecmp function. */
140
+ /* #define HAVE_STRNCASECMP 1 */
141
+
142
+ /* Define if you have the strnicmp function. */
143
+ #define HAVE_STRNICMP 1
144
+
145
+ /* Define if you have the recv function. */
146
+ #define HAVE_RECV 1
147
+
148
+ /* Define to the type of arg 1 for recv. */
149
+ #define RECV_TYPE_ARG1 SOCKET
150
+
151
+ /* Define to the type of arg 2 for recv. */
152
+ #define RECV_TYPE_ARG2 char *
153
+
154
+ /* Define to the type of arg 3 for recv. */
155
+ #define RECV_TYPE_ARG3 int
156
+
157
+ /* Define to the type of arg 4 for recv. */
158
+ #define RECV_TYPE_ARG4 int
159
+
160
+ /* Define to the function return type for recv. */
161
+ #define RECV_TYPE_RETV int
162
+
163
+ /* Define if you have the recvfrom function. */
164
+ #define HAVE_RECVFROM 1
165
+
166
+ /* Define to the type of arg 1 for recvfrom. */
167
+ #define RECVFROM_TYPE_ARG1 SOCKET
168
+
169
+ /* Define to the type pointed by arg 2 for recvfrom. */
170
+ #define RECVFROM_TYPE_ARG2 char
171
+
172
+ /* Define to the type of arg 3 for recvfrom. */
173
+ #define RECVFROM_TYPE_ARG3 int
174
+
175
+ /* Define to the type of arg 4 for recvfrom. */
176
+ #define RECVFROM_TYPE_ARG4 int
177
+
178
+ /* Define to the type pointed by arg 5 for recvfrom. */
179
+ #define RECVFROM_TYPE_ARG5 struct sockaddr
180
+
181
+ /* Define to the type pointed by arg 6 for recvfrom. */
182
+ #define RECVFROM_TYPE_ARG6 int
183
+
184
+ /* Define to the function return type for recvfrom. */
185
+ #define RECVFROM_TYPE_RETV int
186
+
187
+ /* Define if you have the send function. */
188
+ #define HAVE_SEND 1
189
+
190
+ /* Define if you have the sendto function. */
191
+ #define HAVE_SENDTO 1
192
+
193
+ /* Define to the type of arg 1 for send. */
194
+ #define SEND_TYPE_ARG1 SOCKET
195
+
196
+ /* Define to the type of arg 2 for send. */
197
+ #define SEND_TYPE_ARG2 const char *
198
+
199
+ /* Define to the type of arg 3 for send. */
200
+ #define SEND_TYPE_ARG3 int
201
+
202
+ /* Define to the type of arg 4 for send. */
203
+ #define SEND_TYPE_ARG4 int
204
+
205
+ /* Define to the function return type for send. */
206
+ #define SEND_TYPE_RETV int
207
+
208
+ /* Specifics for the Watt-32 tcp/ip stack. */
209
+ #ifdef WATT32
210
+ # undef RECV_TYPE_ARG1
211
+ # define RECV_TYPE_ARG1 int
212
+ # undef SEND_TYPE_ARG1
213
+ # define SEND_TYPE_ARG1 int
214
+ # undef RECVFROM_TYPE_ARG1
215
+ # define RECVFROM_TYPE_ARG1 int
216
+ # define NS_INADDRSZ 4
217
+ # define HAVE_ARPA_NAMESER_H 1
218
+ # define HAVE_ARPA_INET_H 1
219
+ # define HAVE_NETDB_H 1
220
+ # define HAVE_NETINET_IN_H 1
221
+ # define HAVE_SYS_SOCKET_H 1
222
+ # define HAVE_SYS_IOCTL_H 1
223
+ # define HAVE_NETINET_TCP_H 1
224
+ # define HAVE_AF_INET6 1
225
+ # define HAVE_PF_INET6 1
226
+ # define HAVE_STRUCT_IN6_ADDR 1
227
+ # define HAVE_STRUCT_SOCKADDR_IN6 1
228
+ # define HAVE_WRITEV 1
229
+ # define HAVE_IF_NAMETOINDEX 1
230
+ # define HAVE_IF_INDEXTONAME 1
231
+ # define HAVE_GETSERVBYPORT_R 1
232
+ # define GETSERVBYPORT_R_ARGS 6
233
+ # undef HAVE_WINSOCK_H
234
+ # undef HAVE_WINSOCK2_H
235
+ # undef HAVE_WS2TCPIP_H
236
+ # undef HAVE_IPHLPAPI_H
237
+ # undef HAVE_NETIOAPI_H
238
+ #endif
239
+
240
+ /* Threading support enabled for Vista+ */
241
+ #if !defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600
242
+ # define CARES_THREADS 1
243
+ #endif
244
+
245
+ /* ---------------------------------------------------------------- */
246
+ /* TYPEDEF REPLACEMENTS */
247
+ /* ---------------------------------------------------------------- */
248
+
249
+ /* ---------------------------------------------------------------- */
250
+ /* TYPE SIZES */
251
+ /* ---------------------------------------------------------------- */
252
+
253
+ /* ---------------------------------------------------------------- */
254
+ /* STRUCT RELATED */
255
+ /* ---------------------------------------------------------------- */
256
+
257
+ /* Define if you have struct addrinfo. */
258
+ #define HAVE_STRUCT_ADDRINFO 1
259
+
260
+ /* Define if you have struct sockaddr_storage. */
261
+ #if !defined(__SALFORDC__) && !defined(__BORLANDC__)
262
+ # define HAVE_STRUCT_SOCKADDR_STORAGE 1
263
+ #endif
264
+
265
+ /* Define if you have struct timeval. */
266
+ #define HAVE_STRUCT_TIMEVAL 1
267
+
268
+ /* ---------------------------------------------------------------- */
269
+ /* COMPILER SPECIFIC */
270
+ /* ---------------------------------------------------------------- */
271
+
272
+ /* Define to avoid VS2005 complaining about portable C functions. */
273
+ #if defined(_MSC_VER) && (_MSC_VER >= 1400)
274
+ # define _CRT_SECURE_NO_DEPRECATE 1
275
+ # define _CRT_NONSTDC_NO_DEPRECATE 1
276
+ #endif
277
+
278
+ /* Set the Target to Win8 */
279
+ #if defined(_MSC_VER) && (_MSC_VER >= 1500)
280
+ # define MSVC_MIN_TARGET 0x0602
281
+ #endif
282
+
283
+ /* MSVC default target settings */
284
+ #if defined(_MSC_VER) && (_MSC_VER >= 1500)
285
+ # ifndef _WIN32_WINNT
286
+ # define _WIN32_WINNT MSVC_MIN_TARGET
287
+ # endif
288
+ # ifndef WINVER
289
+ # define WINVER MSVC_MIN_TARGET
290
+ # endif
291
+ #endif
292
+
293
+ /* When no build target is specified Pelles C 5.00 and later default build
294
+ target is Windows Vista. */
295
+ #if defined(__POCC__) && (__POCC__ >= 500)
296
+ # ifndef _WIN32_WINNT
297
+ # define _WIN32_WINNT 0x0602
298
+ # endif
299
+ # ifndef WINVER
300
+ # define WINVER 0x0602
301
+ # endif
302
+ #endif
303
+
304
+ /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
305
+ quite convoluted, compiler dependent and even build target dependent. */
306
+ #if defined(HAVE_WS2TCPIP_H)
307
+ # if defined(__POCC__)
308
+ # define HAVE_FREEADDRINFO 1
309
+ # define HAVE_GETADDRINFO 1
310
+ # define HAVE_GETNAMEINFO 1
311
+ # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
312
+ # define HAVE_FREEADDRINFO 1
313
+ # define HAVE_GETADDRINFO 1
314
+ # define HAVE_GETNAMEINFO 1
315
+ # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
316
+ # define HAVE_FREEADDRINFO 1
317
+ # define HAVE_GETADDRINFO 1
318
+ # define HAVE_GETNAMEINFO 1
319
+ # endif
320
+ #endif
321
+
322
+ #if defined(__POCC__)
323
+ # ifndef _MSC_VER
324
+ # error Microsoft extensions /Ze compiler option is required
325
+ # endif
326
+ # ifndef __POCC__OLDNAMES
327
+ # error Compatibility names /Go compiler option is required
328
+ # endif
329
+ #endif
330
+
331
+ /* ---------------------------------------------------------------- */
332
+ /* IPV6 COMPATIBILITY */
333
+ /* ---------------------------------------------------------------- */
334
+
335
+ /* Define if you have address family AF_INET6. */
336
+ #ifdef HAVE_WINSOCK2_H
337
+ # define HAVE_AF_INET6 1
338
+ #endif
339
+
340
+ /* Define if you have protocol family PF_INET6. */
341
+ #ifdef HAVE_WINSOCK2_H
342
+ # define HAVE_PF_INET6 1
343
+ #endif
344
+
345
+ /* Define if you have struct in6_addr. */
346
+ #ifdef HAVE_WS2TCPIP_H
347
+ # define HAVE_STRUCT_IN6_ADDR 1
348
+ #endif
349
+
350
+ /* Define if you have struct sockaddr_in6. */
351
+ #ifdef HAVE_WS2TCPIP_H
352
+ # define HAVE_STRUCT_SOCKADDR_IN6 1
353
+ #endif
354
+
355
+ /* Define if you have sockaddr_in6 with scopeid. */
356
+ #ifdef HAVE_WS2TCPIP_H
357
+ # define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
358
+ #endif
359
+
360
+ /* Define to 1 if you have the `RegisterWaitForSingleObject' function. */
361
+ #define HAVE_REGISTERWAITFORSINGLEOBJECT 1
362
+
363
+ #if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600) && \
364
+ !defined(__WATCOMC__) && !defined(WATT32)
365
+ /* Define if you have if_nametoindex() */
366
+ # define HAVE_IF_NAMETOINDEX 1
367
+ /* Define if you have if_indextoname() */
368
+ # define HAVE_IF_INDEXTONAME 1
369
+ /* Define to 1 if you have the `ConvertInterfaceIndexToLuid' function. */
370
+ # define HAVE_CONVERTINTERFACEINDEXTOLUID 1
371
+ /* Define to 1 if you have the `ConvertInterfaceLuidToNameA' function. */
372
+ # define HAVE_CONVERTINTERFACELUIDTONAMEA 1
373
+ /* Define to 1 if you have the `NotifyIpInterfaceChange' function. */
374
+ # define HAVE_NOTIFYIPINTERFACECHANGE 1
375
+ /* Define to 1 if you have the `GetBestRoute2` function */
376
+ # define HAVE_GETBESTROUTE2 1
377
+ #endif
378
+
379
+ /* ---------------------------------------------------------------- */
380
+ /* Win CE */
381
+ /* ---------------------------------------------------------------- */
382
+
383
+ /* FIXME: A proper config-win32ce.h should be created to hold these */
384
+
385
+ /*
386
+ * System error codes for Windows CE
387
+ */
388
+
389
+ #if defined(_WIN32_WCE) && !defined(HAVE_ERRNO_H)
390
+ # define ENOENT ERROR_FILE_NOT_FOUND
391
+ # define ESRCH ERROR_PATH_NOT_FOUND
392
+ # define ENOMEM ERROR_NOT_ENOUGH_MEMORY
393
+ # define ENOSPC ERROR_INVALID_PARAMETER
394
+ #endif
395
+
396
+ #endif /* HEADER_CARES_CONFIG_WIN32_H */