node-linux-arm64 18.17.1 → 18.18.0

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 (79) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/LICENSE +515 -520
  3. package/README.md +11 -2
  4. package/bin/node +0 -0
  5. package/include/node/common.gypi +48 -20
  6. package/include/node/js_native_api.h +18 -0
  7. package/include/node/node_version.h +2 -2
  8. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/crypto/bn_conf.h +29 -0
  9. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/crypto/dso_conf.h +19 -0
  10. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/asn1.h +1128 -0
  11. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/asn1t.h +946 -0
  12. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/bio.h +887 -0
  13. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/cms.h +493 -0
  14. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/conf.h +211 -0
  15. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/configuration.h +137 -0
  16. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/crmf.h +227 -0
  17. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/crypto.h +558 -0
  18. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ct.h +573 -0
  19. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/err.h +504 -0
  20. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ess.h +128 -0
  21. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/fipskey.h +36 -0
  22. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/lhash.h +288 -0
  23. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ocsp.h +483 -0
  24. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/pkcs12.h +350 -0
  25. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/pkcs7.h +427 -0
  26. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/safestack.h +297 -0
  27. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/srp.h +285 -0
  28. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ssl.h +2668 -0
  29. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ui.h +407 -0
  30. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509.h +1276 -0
  31. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509_vfy.h +894 -0
  32. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509v3.h +1450 -0
  33. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/progs.h +123 -0
  34. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_digests.h +160 -0
  35. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_dsa.h +94 -0
  36. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_ec.h +286 -0
  37. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_ecx.h +50 -0
  38. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_rsa.h +187 -0
  39. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_sm2.h +37 -0
  40. package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_wrap.h +46 -0
  41. package/include/node/openssl/asn1_no-asm.h +2 -0
  42. package/include/node/openssl/asn1t_no-asm.h +2 -0
  43. package/include/node/openssl/bio_no-asm.h +2 -0
  44. package/include/node/openssl/bn_conf_no-asm.h +2 -0
  45. package/include/node/openssl/cmp_no-asm.h +2 -0
  46. package/include/node/openssl/cms_no-asm.h +2 -0
  47. package/include/node/openssl/conf_no-asm.h +2 -0
  48. package/include/node/openssl/configuration_no-asm.h +2 -0
  49. package/include/node/openssl/crmf_no-asm.h +2 -0
  50. package/include/node/openssl/crypto_no-asm.h +2 -0
  51. package/include/node/openssl/ct_no-asm.h +2 -0
  52. package/include/node/openssl/dso_conf_no-asm.h +2 -0
  53. package/include/node/openssl/err_no-asm.h +2 -0
  54. package/include/node/openssl/ess_no-asm.h +2 -0
  55. package/include/node/openssl/fipskey_no-asm.h +2 -0
  56. package/include/node/openssl/lhash_no-asm.h +2 -0
  57. package/include/node/openssl/ocsp_no-asm.h +2 -0
  58. package/include/node/openssl/opensslv_no-asm.h +2 -0
  59. package/include/node/openssl/pkcs12_no-asm.h +2 -0
  60. package/include/node/openssl/pkcs7_no-asm.h +2 -0
  61. package/include/node/openssl/safestack_no-asm.h +2 -0
  62. package/include/node/openssl/srp_no-asm.h +2 -0
  63. package/include/node/openssl/ssl_no-asm.h +2 -0
  64. package/include/node/openssl/ui_no-asm.h +2 -0
  65. package/include/node/openssl/x509_no-asm.h +2 -0
  66. package/include/node/openssl/x509_vfy_no-asm.h +2 -0
  67. package/include/node/openssl/x509v3_no-asm.h +2 -0
  68. package/include/node/uv/darwin.h +3 -3
  69. package/include/node/uv/errno.h +18 -1
  70. package/include/node/uv/linux.h +1 -1
  71. package/include/node/uv/threadpool.h +1 -1
  72. package/include/node/uv/unix.h +25 -24
  73. package/include/node/uv/version.h +2 -2
  74. package/include/node/uv/win.h +20 -17
  75. package/include/node/uv.h +81 -19
  76. package/include/node/zconf.h +1 -1
  77. package/include/node/zlib.h +175 -175
  78. package/package.json +1 -1
  79. package/include/node/uv/stdint-msvc2008.h +0 -247
@@ -413,7 +413,6 @@
413
413
  #elif defined(__APPLE__) || \
414
414
  defined(__DragonFly__) || \
415
415
  defined(__FreeBSD__) || \
416
- defined(__FreeBSD_kernel__) || \
417
416
  defined(__NetBSD__) || \
418
417
  defined(__OpenBSD__)
419
418
  # define UV__EHOSTDOWN (-64)
@@ -457,4 +456,22 @@
457
456
  # define UV__ESOCKTNOSUPPORT (-4025)
458
457
  #endif
459
458
 
459
+ /* FreeBSD defines ENODATA in /usr/include/c++/v1/errno.h which is only visible
460
+ * if C++ is being used. Define it directly to avoid problems when integrating
461
+ * libuv in a C++ project.
462
+ */
463
+ #if defined(ENODATA) && !defined(_WIN32)
464
+ # define UV__ENODATA UV__ERR(ENODATA)
465
+ #elif defined(__FreeBSD__)
466
+ # define UV__ENODATA (-9919)
467
+ #else
468
+ # define UV__ENODATA (-4024)
469
+ #endif
470
+
471
+ #if defined(EUNATCH) && !defined(_WIN32)
472
+ # define UV__EUNATCH UV__ERR(EUNATCH)
473
+ #else
474
+ # define UV__EUNATCH (-4023)
475
+ #endif
476
+
460
477
  #endif /* UV_ERRNO_H_ */
@@ -28,7 +28,7 @@
28
28
  int inotify_fd; \
29
29
 
30
30
  #define UV_PLATFORM_FS_EVENT_FIELDS \
31
- void* watchers[2]; \
31
+ struct uv__queue watchers; \
32
32
  int wd; \
33
33
 
34
34
  #endif /* UV_LINUX_H */
@@ -31,7 +31,7 @@ struct uv__work {
31
31
  void (*work)(struct uv__work *w);
32
32
  void (*done)(struct uv__work *w, int status);
33
33
  struct uv_loop_s* loop;
34
- void* wq[2];
34
+ struct uv__queue wq;
35
35
  };
36
36
 
37
37
  #endif /* UV_THREADPOOL_H_ */
@@ -59,7 +59,6 @@
59
59
  # include "uv/darwin.h"
60
60
  #elif defined(__DragonFly__) || \
61
61
  defined(__FreeBSD__) || \
62
- defined(__FreeBSD_kernel__) || \
63
62
  defined(__OpenBSD__) || \
64
63
  defined(__NetBSD__)
65
64
  # include "uv/bsd.h"
@@ -93,8 +92,8 @@ typedef struct uv__io_s uv__io_t;
93
92
 
94
93
  struct uv__io_s {
95
94
  uv__io_cb cb;
96
- void* pending_queue[2];
97
- void* watcher_queue[2];
95
+ struct uv__queue pending_queue;
96
+ struct uv__queue watcher_queue;
98
97
  unsigned int pevents; /* Pending event mask i.e. mask at next tick. */
99
98
  unsigned int events; /* Current event mask. */
100
99
  int fd;
@@ -221,21 +220,21 @@ typedef struct {
221
220
  #define UV_LOOP_PRIVATE_FIELDS \
222
221
  unsigned long flags; \
223
222
  int backend_fd; \
224
- void* pending_queue[2]; \
225
- void* watcher_queue[2]; \
223
+ struct uv__queue pending_queue; \
224
+ struct uv__queue watcher_queue; \
226
225
  uv__io_t** watchers; \
227
226
  unsigned int nwatchers; \
228
227
  unsigned int nfds; \
229
- void* wq[2]; \
228
+ struct uv__queue wq; \
230
229
  uv_mutex_t wq_mutex; \
231
230
  uv_async_t wq_async; \
232
231
  uv_rwlock_t cloexec_lock; \
233
232
  uv_handle_t* closing_handles; \
234
- void* process_handles[2]; \
235
- void* prepare_handles[2]; \
236
- void* check_handles[2]; \
237
- void* idle_handles[2]; \
238
- void* async_handles[2]; \
233
+ struct uv__queue process_handles; \
234
+ struct uv__queue prepare_handles; \
235
+ struct uv__queue check_handles; \
236
+ struct uv__queue idle_handles; \
237
+ struct uv__queue async_handles; \
239
238
  void (*async_unused)(void); /* TODO(bnoordhuis) Remove in libuv v2. */ \
240
239
  uv__io_t async_io_watcher; \
241
240
  int async_wfd; \
@@ -258,7 +257,7 @@ typedef struct {
258
257
  #define UV_PRIVATE_REQ_TYPES /* empty */
259
258
 
260
259
  #define UV_WRITE_PRIVATE_FIELDS \
261
- void* queue[2]; \
260
+ struct uv__queue queue; \
262
261
  unsigned int write_index; \
263
262
  uv_buf_t* bufs; \
264
263
  unsigned int nbufs; \
@@ -266,12 +265,12 @@ typedef struct {
266
265
  uv_buf_t bufsml[4]; \
267
266
 
268
267
  #define UV_CONNECT_PRIVATE_FIELDS \
269
- void* queue[2]; \
268
+ struct uv__queue queue; \
270
269
 
271
270
  #define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */
272
271
 
273
272
  #define UV_UDP_SEND_PRIVATE_FIELDS \
274
- void* queue[2]; \
273
+ struct uv__queue queue; \
275
274
  struct sockaddr_storage addr; \
276
275
  unsigned int nbufs; \
277
276
  uv_buf_t* bufs; \
@@ -287,8 +286,8 @@ typedef struct {
287
286
  uv_connect_t *connect_req; \
288
287
  uv_shutdown_t *shutdown_req; \
289
288
  uv__io_t io_watcher; \
290
- void* write_queue[2]; \
291
- void* write_completed_queue[2]; \
289
+ struct uv__queue write_queue; \
290
+ struct uv__queue write_completed_queue; \
292
291
  uv_connection_cb connection_cb; \
293
292
  int delayed_error; \
294
293
  int accepted_fd; \
@@ -301,30 +300,30 @@ typedef struct {
301
300
  uv_alloc_cb alloc_cb; \
302
301
  uv_udp_recv_cb recv_cb; \
303
302
  uv__io_t io_watcher; \
304
- void* write_queue[2]; \
305
- void* write_completed_queue[2]; \
303
+ struct uv__queue write_queue; \
304
+ struct uv__queue write_completed_queue; \
306
305
 
307
306
  #define UV_PIPE_PRIVATE_FIELDS \
308
- const char* pipe_fname; /* strdup'ed */
307
+ const char* pipe_fname; /* NULL or strdup'ed */
309
308
 
310
309
  #define UV_POLL_PRIVATE_FIELDS \
311
310
  uv__io_t io_watcher;
312
311
 
313
312
  #define UV_PREPARE_PRIVATE_FIELDS \
314
313
  uv_prepare_cb prepare_cb; \
315
- void* queue[2]; \
314
+ struct uv__queue queue; \
316
315
 
317
316
  #define UV_CHECK_PRIVATE_FIELDS \
318
317
  uv_check_cb check_cb; \
319
- void* queue[2]; \
318
+ struct uv__queue queue; \
320
319
 
321
320
  #define UV_IDLE_PRIVATE_FIELDS \
322
321
  uv_idle_cb idle_cb; \
323
- void* queue[2]; \
322
+ struct uv__queue queue; \
324
323
 
325
324
  #define UV_ASYNC_PRIVATE_FIELDS \
326
325
  uv_async_cb async_cb; \
327
- void* queue[2]; \
326
+ struct uv__queue queue; \
328
327
  int pending; \
329
328
 
330
329
  #define UV_TIMER_PRIVATE_FIELDS \
@@ -353,7 +352,7 @@ typedef struct {
353
352
  int retcode;
354
353
 
355
354
  #define UV_PROCESS_PRIVATE_FIELDS \
356
- void* queue[2]; \
355
+ struct uv__queue queue; \
357
356
  int status; \
358
357
 
359
358
  #define UV_FS_PRIVATE_FIELDS \
@@ -418,6 +417,8 @@ typedef struct {
418
417
  # define UV_FS_O_DIRECT 0x04000
419
418
  #elif defined(__linux__) && defined(__x86_64__)
420
419
  # define UV_FS_O_DIRECT 0x04000
420
+ #elif defined(__linux__) && defined(__loongarch__)
421
+ # define UV_FS_O_DIRECT 0x04000
421
422
  #elif defined(O_DIRECT)
422
423
  # define UV_FS_O_DIRECT O_DIRECT
423
424
  #else
@@ -31,8 +31,8 @@
31
31
  */
32
32
 
33
33
  #define UV_VERSION_MAJOR 1
34
- #define UV_VERSION_MINOR 44
35
- #define UV_VERSION_PATCH 2
34
+ #define UV_VERSION_MINOR 46
35
+ #define UV_VERSION_PATCH 0
36
36
  #define UV_VERSION_IS_RELEASE 1
37
37
  #define UV_VERSION_SUFFIX ""
38
38
 
@@ -59,12 +59,7 @@ typedef struct pollfd {
59
59
  #include <signal.h>
60
60
  #include <fcntl.h>
61
61
  #include <sys/stat.h>
62
-
63
- #if defined(_MSC_VER) && _MSC_VER < 1600
64
- # include "uv/stdint-msvc2008.h"
65
- #else
66
- # include <stdint.h>
67
- #endif
62
+ #include <stdint.h>
68
63
 
69
64
  #include "uv/tree.h"
70
65
  #include "uv/threadpool.h"
@@ -75,6 +70,11 @@ typedef struct pollfd {
75
70
  # define S_IFLNK 0xA000
76
71
  #endif
77
72
 
73
+ // Define missing in Windows Kit Include\{VERSION}\ucrt\sys\stat.h
74
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES && !defined(S_IFIFO)
75
+ # define S_IFIFO _S_IFIFO
76
+ #endif
77
+
78
78
  /* Additional signals supported by uv_signal and or uv_kill. The CRT defines
79
79
  * the following signals already:
80
80
  *
@@ -91,6 +91,7 @@ typedef struct pollfd {
91
91
  * variants (Linux and Darwin)
92
92
  */
93
93
  #define SIGHUP 1
94
+ #define SIGQUIT 3
94
95
  #define SIGKILL 9
95
96
  #define SIGWINCH 28
96
97
 
@@ -223,7 +224,7 @@ typedef struct _AFD_POLL_INFO {
223
224
  AFD_POLL_HANDLE_INFO Handles[1];
224
225
  } AFD_POLL_INFO, *PAFD_POLL_INFO;
225
226
 
226
- #define UV_MSAFD_PROVIDER_COUNT 3
227
+ #define UV_MSAFD_PROVIDER_COUNT 4
227
228
 
228
229
 
229
230
  /**
@@ -274,11 +275,12 @@ typedef struct {
274
275
  } uv_rwlock_t;
275
276
 
276
277
  typedef struct {
277
- unsigned int n;
278
- unsigned int count;
278
+ unsigned threshold;
279
+ unsigned in;
279
280
  uv_mutex_t mutex;
280
- uv_sem_t turnstile1;
281
- uv_sem_t turnstile2;
281
+ /* TODO: in v2 make this a uv_cond_t, without unused_ */
282
+ CONDITION_VARIABLE cond;
283
+ unsigned out;
282
284
  } uv_barrier_t;
283
285
 
284
286
  typedef struct {
@@ -348,14 +350,14 @@ typedef struct {
348
350
  uv_idle_t* next_idle_handle; \
349
351
  /* This handle holds the peer sockets for the fast variant of uv_poll_t */ \
350
352
  SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT]; \
351
- /* Counter to keep track of active tcp streams */ \
353
+ /* No longer used. */ \
352
354
  unsigned int active_tcp_streams; \
353
- /* Counter to keep track of active udp streams */ \
355
+ /* No longer used. */ \
354
356
  unsigned int active_udp_streams; \
355
357
  /* Counter to started timer */ \
356
358
  uint64_t timer_counter; \
357
359
  /* Threadpool */ \
358
- void* wq[2]; \
360
+ struct uv__queue wq; \
359
361
  uv_mutex_t wq_mutex; \
360
362
  uv_async_t wq_async;
361
363
 
@@ -382,6 +384,7 @@ typedef struct {
382
384
  ULONG_PTR result; /* overlapped.Internal is reused to hold the result */\
383
385
  HANDLE pipeHandle; \
384
386
  DWORD duplex_flags; \
387
+ WCHAR* name; \
385
388
  } connect; \
386
389
  } u; \
387
390
  struct uv_req_s* next_req;
@@ -483,7 +486,7 @@ typedef struct {
483
486
  uint32_t payload_remaining; \
484
487
  uint64_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \
485
488
  } ipc_data_frame; \
486
- void* ipc_xfer_queue[2]; \
489
+ struct uv__queue ipc_xfer_queue; \
487
490
  int ipc_xfer_queue_length; \
488
491
  uv_write_t* non_overlapped_writes_tail; \
489
492
  CRITICAL_SECTION readfile_thread_lock; \
@@ -497,7 +500,7 @@ typedef struct {
497
500
  struct { uv_pipe_connection_fields } conn; \
498
501
  } pipe;
499
502
 
500
- /* TODO: put the parser states in an union - TTY handles are always half-duplex
503
+ /* TODO: put the parser states in a union - TTY handles are always half-duplex
501
504
  * so read-state can safely overlap write-state. */
502
505
  #define UV_TTY_PRIVATE_FIELDS \
503
506
  HANDLE handle; \
@@ -605,7 +608,7 @@ typedef struct {
605
608
  struct uv_process_exit_s { \
606
609
  UV_REQ_FIELDS \
607
610
  } exit_req; \
608
- BYTE* child_stdio_buffer; \
611
+ void* unused; /* TODO: retained for ABI compat; remove this in v2.x. */ \
609
612
  int exit_signal; \
610
613
  HANDLE wait_handle; \
611
614
  HANDLE process_handle; \
package/include/node/uv.h CHANGED
@@ -31,6 +31,7 @@ extern "C" {
31
31
  #error "Define either BUILDING_UV_SHARED or USING_UV_SHARED, not both."
32
32
  #endif
33
33
 
34
+ #ifndef UV_EXTERN
34
35
  #ifdef _WIN32
35
36
  /* Windows - set up dll import/export decorators. */
36
37
  # if defined(BUILDING_UV_SHARED)
@@ -50,17 +51,19 @@ extern "C" {
50
51
  #else
51
52
  # define UV_EXTERN /* nothing */
52
53
  #endif
54
+ #endif /* UV_EXTERN */
53
55
 
54
56
  #include "uv/errno.h"
55
57
  #include "uv/version.h"
56
58
  #include <stddef.h>
57
59
  #include <stdio.h>
60
+ #include <stdint.h>
58
61
 
59
- #if defined(_MSC_VER) && _MSC_VER < 1600
60
- # include "uv/stdint-msvc2008.h"
61
- #else
62
- # include <stdint.h>
63
- #endif
62
+ /* Internal type, do not use. */
63
+ struct uv__queue {
64
+ struct uv__queue* next;
65
+ struct uv__queue* prev;
66
+ };
64
67
 
65
68
  #if defined(_WIN32)
66
69
  # include "uv/win.h"
@@ -152,6 +155,8 @@ extern "C" {
152
155
  XX(EFTYPE, "inappropriate file type or format") \
153
156
  XX(EILSEQ, "illegal byte sequence") \
154
157
  XX(ESOCKTNOSUPPORT, "socket type not supported") \
158
+ XX(ENODATA, "no data available") \
159
+ XX(EUNATCH, "protocol driver not attached") \
155
160
 
156
161
  #define UV_HANDLE_TYPE_MAP(XX) \
157
162
  XX(ASYNC, async) \
@@ -247,9 +252,12 @@ typedef struct uv_cpu_info_s uv_cpu_info_t;
247
252
  typedef struct uv_interface_address_s uv_interface_address_t;
248
253
  typedef struct uv_dirent_s uv_dirent_t;
249
254
  typedef struct uv_passwd_s uv_passwd_t;
255
+ typedef struct uv_group_s uv_group_t;
250
256
  typedef struct uv_utsname_s uv_utsname_t;
251
257
  typedef struct uv_statfs_s uv_statfs_t;
252
258
 
259
+ typedef struct uv_metrics_s uv_metrics_t;
260
+
253
261
  typedef enum {
254
262
  UV_LOOP_BLOCK_SIGNAL = 0,
255
263
  UV_METRICS_IDLE_TIME
@@ -282,13 +290,13 @@ UV_EXTERN int uv_loop_init(uv_loop_t* loop);
282
290
  UV_EXTERN int uv_loop_close(uv_loop_t* loop);
283
291
  /*
284
292
  * NOTE:
285
- * This function is DEPRECATED (to be removed after 0.12), users should
293
+ * This function is DEPRECATED, users should
286
294
  * allocate the loop manually and use uv_loop_init instead.
287
295
  */
288
296
  UV_EXTERN uv_loop_t* uv_loop_new(void);
289
297
  /*
290
298
  * NOTE:
291
- * This function is DEPRECATED (to be removed after 0.12). Users should use
299
+ * This function is DEPRECATED. Users should use
292
300
  * uv_loop_close and free the memory manually instead.
293
301
  */
294
302
  UV_EXTERN void uv_loop_delete(uv_loop_t*);
@@ -344,11 +352,32 @@ typedef void (*uv_random_cb)(uv_random_t* req,
344
352
  void* buf,
345
353
  size_t buflen);
346
354
 
355
+ typedef enum {
356
+ UV_CLOCK_MONOTONIC,
357
+ UV_CLOCK_REALTIME
358
+ } uv_clock_id;
359
+
360
+ /* XXX(bnoordhuis) not 2038-proof, https://github.com/libuv/libuv/issues/3864 */
347
361
  typedef struct {
348
362
  long tv_sec;
349
363
  long tv_nsec;
350
364
  } uv_timespec_t;
351
365
 
366
+ typedef struct {
367
+ int64_t tv_sec;
368
+ int32_t tv_nsec;
369
+ } uv_timespec64_t;
370
+
371
+ /* XXX(bnoordhuis) not 2038-proof, https://github.com/libuv/libuv/issues/3864 */
372
+ typedef struct {
373
+ long tv_sec;
374
+ long tv_usec;
375
+ } uv_timeval_t;
376
+
377
+ typedef struct {
378
+ int64_t tv_sec;
379
+ int32_t tv_usec;
380
+ } uv_timeval64_t;
352
381
 
353
382
  typedef struct {
354
383
  uint64_t st_dev;
@@ -437,7 +466,7 @@ struct uv_shutdown_s {
437
466
  uv_handle_type type; \
438
467
  /* private */ \
439
468
  uv_close_cb close_cb; \
440
- void* handle_queue[2]; \
469
+ struct uv__queue handle_queue; \
441
470
  union { \
442
471
  int fd; \
443
472
  void* reserved[4]; \
@@ -779,6 +808,10 @@ inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {
779
808
 
780
809
  UV_EXTERN uv_handle_type uv_guess_handle(uv_file file);
781
810
 
811
+ enum {
812
+ UV_PIPE_NO_TRUNCATE = 1u << 0
813
+ };
814
+
782
815
  /*
783
816
  * uv_pipe_t is a subclass of uv_stream_t.
784
817
  *
@@ -795,10 +828,20 @@ struct uv_pipe_s {
795
828
  UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc);
796
829
  UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file);
797
830
  UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
831
+ UV_EXTERN int uv_pipe_bind2(uv_pipe_t* handle,
832
+ const char* name,
833
+ size_t namelen,
834
+ unsigned int flags);
798
835
  UV_EXTERN void uv_pipe_connect(uv_connect_t* req,
799
836
  uv_pipe_t* handle,
800
837
  const char* name,
801
838
  uv_connect_cb cb);
839
+ UV_EXTERN int uv_pipe_connect2(uv_connect_t* req,
840
+ uv_pipe_t* handle,
841
+ const char* name,
842
+ size_t namelen,
843
+ unsigned int flags,
844
+ uv_connect_cb cb);
802
845
  UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle,
803
846
  char* buffer,
804
847
  size_t* size);
@@ -1139,6 +1182,12 @@ struct uv_passwd_s {
1139
1182
  char* homedir;
1140
1183
  };
1141
1184
 
1185
+ struct uv_group_s {
1186
+ char* groupname;
1187
+ unsigned long gid;
1188
+ char** members;
1189
+ };
1190
+
1142
1191
  struct uv_utsname_s {
1143
1192
  char sysname[256];
1144
1193
  char release[256];
@@ -1184,16 +1233,6 @@ UV_EXTERN int uv_uptime(double* uptime);
1184
1233
  UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd);
1185
1234
  UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd);
1186
1235
 
1187
- typedef struct {
1188
- long tv_sec;
1189
- long tv_usec;
1190
- } uv_timeval_t;
1191
-
1192
- typedef struct {
1193
- int64_t tv_sec;
1194
- int32_t tv_usec;
1195
- } uv_timeval64_t;
1196
-
1197
1236
  typedef struct {
1198
1237
  uv_timeval_t ru_utime; /* user CPU time used */
1199
1238
  uv_timeval_t ru_stime; /* system CPU time used */
@@ -1219,6 +1258,9 @@ UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
1219
1258
  UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
1220
1259
  UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd);
1221
1260
  UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
1261
+ UV_EXTERN int uv_os_get_passwd2(uv_passwd_t* pwd, uv_uid_t uid);
1262
+ UV_EXTERN int uv_os_get_group(uv_group_t* grp, uv_uid_t gid);
1263
+ UV_EXTERN void uv_os_free_group(uv_group_t* grp);
1222
1264
  UV_EXTERN uv_pid_t uv_os_getpid(void);
1223
1265
  UV_EXTERN uv_pid_t uv_os_getppid(void);
1224
1266
 
@@ -1245,6 +1287,7 @@ UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
1245
1287
  UV_EXTERN unsigned int uv_available_parallelism(void);
1246
1288
  UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
1247
1289
  UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
1290
+ UV_EXTERN int uv_cpumask_size(void);
1248
1291
 
1249
1292
  UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses,
1250
1293
  int* count);
@@ -1277,6 +1320,15 @@ UV_EXTERN int uv_os_gethostname(char* buffer, size_t* size);
1277
1320
 
1278
1321
  UV_EXTERN int uv_os_uname(uv_utsname_t* buffer);
1279
1322
 
1323
+ struct uv_metrics_s {
1324
+ uint64_t loop_count;
1325
+ uint64_t events;
1326
+ uint64_t events_waiting;
1327
+ /* private */
1328
+ uint64_t* reserved[13];
1329
+ };
1330
+
1331
+ UV_EXTERN int uv_metrics_info(uv_loop_t* loop, uv_metrics_t* metrics);
1280
1332
  UV_EXTERN uint64_t uv_metrics_idle_time(uv_loop_t* loop);
1281
1333
 
1282
1334
  typedef enum {
@@ -1710,7 +1762,9 @@ UV_EXTERN int uv_chdir(const char* dir);
1710
1762
  UV_EXTERN uint64_t uv_get_free_memory(void);
1711
1763
  UV_EXTERN uint64_t uv_get_total_memory(void);
1712
1764
  UV_EXTERN uint64_t uv_get_constrained_memory(void);
1765
+ UV_EXTERN uint64_t uv_get_available_memory(void);
1713
1766
 
1767
+ UV_EXTERN int uv_clock_gettime(uv_clock_id clock_id, uv_timespec64_t* ts);
1714
1768
  UV_EXTERN uint64_t uv_hrtime(void);
1715
1769
  UV_EXTERN void uv_sleep(unsigned int msec);
1716
1770
 
@@ -1787,6 +1841,14 @@ UV_EXTERN int uv_thread_create_ex(uv_thread_t* tid,
1787
1841
  const uv_thread_options_t* params,
1788
1842
  uv_thread_cb entry,
1789
1843
  void* arg);
1844
+ UV_EXTERN int uv_thread_setaffinity(uv_thread_t* tid,
1845
+ char* cpumask,
1846
+ char* oldmask,
1847
+ size_t mask_size);
1848
+ UV_EXTERN int uv_thread_getaffinity(uv_thread_t* tid,
1849
+ char* cpumask,
1850
+ size_t mask_size);
1851
+ UV_EXTERN int uv_thread_getcpu(void);
1790
1852
  UV_EXTERN uv_thread_t uv_thread_self(void);
1791
1853
  UV_EXTERN int uv_thread_join(uv_thread_t *tid);
1792
1854
  UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2);
@@ -1808,7 +1870,7 @@ struct uv_loop_s {
1808
1870
  void* data;
1809
1871
  /* Loop reference counting. */
1810
1872
  unsigned int active_handles;
1811
- void* handle_queue[2];
1873
+ struct uv__queue handle_queue;
1812
1874
  union {
1813
1875
  void* unused;
1814
1876
  unsigned int count;
@@ -539,7 +539,7 @@ typedef uLong FAR uLongf;
539
539
  #if !defined(_WIN32) && defined(Z_LARGE64)
540
540
  # define z_off64_t off64_t
541
541
  #else
542
- # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
542
+ # if defined(_WIN32) && !defined(__GNUC__)
543
543
  # define z_off64_t __int64
544
544
  # else
545
545
  # define z_off64_t z_off_t