update uv version.

This commit is contained in:
chenxianyin 2020-07-06 10:23:42 +08:00
parent 7dd2591067
commit f6c5065036
10 changed files with 123 additions and 416 deletions

View File

@ -93,6 +93,20 @@ ifeq ($(TARGET_ARCH),arm64)
LOCAL_EXPORT_CPPFLAGS := -DV8_COMPRESS_POINTERS LOCAL_EXPORT_CPPFLAGS := -DV8_COMPRESS_POINTERS
LOCAL_EXPORT_CFLAGS := -DV8_COMPRESS_POINTERS LOCAL_EXPORT_CFLAGS := -DV8_COMPRESS_POINTERS
endif endif
ifeq ($(TARGET_ARCH),x86_64)
LOCAL_EXPORT_CPPFLAGS := \
-DV8_COMPRESS_POINTERS \
-DV8_TARGET_ARCH_X64 \
-DV8_HAVE_TARGET_OS \
-DV8_TARGET_OS_ANDROID
LOCAL_EXPORT_CFLAGS := \
-DV8_COMPRESS_POINTERS \
-DV8_TARGET_ARCH_X64 \
-DV8_HAVE_TARGET_OS \
-DV8_TARGET_OS_ANDROID
endif
include $(PREBUILT_STATIC_LIBRARY) include $(PREBUILT_STATIC_LIBRARY)
#====================================== #======================================

View File

@ -1,54 +0,0 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif

View File

@ -23,7 +23,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif #endif
#define PTHREAD_BARRIER_SERIAL_THREAD 0x12345 #define PTHREAD_BARRIER_SERIAL_THREAD 0x12345
#define UV__PTHREAD_BARRIER_FALLBACK 1
/* /*
* To maintain ABI compatibility with * To maintain ABI compatibility with

View File

@ -23,11 +23,6 @@
#define UV_ERRNO_H_ #define UV_ERRNO_H_
#include <errno.h> #include <errno.h>
#if EDOM > 0
# define UV__ERR(x) (-(x))
#else
# define UV__ERR(x) (x)
#endif
#define UV__EOF (-4095) #define UV__EOF (-4095)
#define UV__UNKNOWN (-4094) #define UV__UNKNOWN (-4094)
@ -51,355 +46,355 @@
* a fairly common practice for Windows programmers to redefine errno codes. * a fairly common practice for Windows programmers to redefine errno codes.
*/ */
#if defined(E2BIG) && !defined(_WIN32) #if defined(E2BIG) && !defined(_WIN32)
# define UV__E2BIG UV__ERR(E2BIG) # define UV__E2BIG (-E2BIG)
#else #else
# define UV__E2BIG (-4093) # define UV__E2BIG (-4093)
#endif #endif
#if defined(EACCES) && !defined(_WIN32) #if defined(EACCES) && !defined(_WIN32)
# define UV__EACCES UV__ERR(EACCES) # define UV__EACCES (-EACCES)
#else #else
# define UV__EACCES (-4092) # define UV__EACCES (-4092)
#endif #endif
#if defined(EADDRINUSE) && !defined(_WIN32) #if defined(EADDRINUSE) && !defined(_WIN32)
# define UV__EADDRINUSE UV__ERR(EADDRINUSE) # define UV__EADDRINUSE (-EADDRINUSE)
#else #else
# define UV__EADDRINUSE (-4091) # define UV__EADDRINUSE (-4091)
#endif #endif
#if defined(EADDRNOTAVAIL) && !defined(_WIN32) #if defined(EADDRNOTAVAIL) && !defined(_WIN32)
# define UV__EADDRNOTAVAIL UV__ERR(EADDRNOTAVAIL) # define UV__EADDRNOTAVAIL (-EADDRNOTAVAIL)
#else #else
# define UV__EADDRNOTAVAIL (-4090) # define UV__EADDRNOTAVAIL (-4090)
#endif #endif
#if defined(EAFNOSUPPORT) && !defined(_WIN32) #if defined(EAFNOSUPPORT) && !defined(_WIN32)
# define UV__EAFNOSUPPORT UV__ERR(EAFNOSUPPORT) # define UV__EAFNOSUPPORT (-EAFNOSUPPORT)
#else #else
# define UV__EAFNOSUPPORT (-4089) # define UV__EAFNOSUPPORT (-4089)
#endif #endif
#if defined(EAGAIN) && !defined(_WIN32) #if defined(EAGAIN) && !defined(_WIN32)
# define UV__EAGAIN UV__ERR(EAGAIN) # define UV__EAGAIN (-EAGAIN)
#else #else
# define UV__EAGAIN (-4088) # define UV__EAGAIN (-4088)
#endif #endif
#if defined(EALREADY) && !defined(_WIN32) #if defined(EALREADY) && !defined(_WIN32)
# define UV__EALREADY UV__ERR(EALREADY) # define UV__EALREADY (-EALREADY)
#else #else
# define UV__EALREADY (-4084) # define UV__EALREADY (-4084)
#endif #endif
#if defined(EBADF) && !defined(_WIN32) #if defined(EBADF) && !defined(_WIN32)
# define UV__EBADF UV__ERR(EBADF) # define UV__EBADF (-EBADF)
#else #else
# define UV__EBADF (-4083) # define UV__EBADF (-4083)
#endif #endif
#if defined(EBUSY) && !defined(_WIN32) #if defined(EBUSY) && !defined(_WIN32)
# define UV__EBUSY UV__ERR(EBUSY) # define UV__EBUSY (-EBUSY)
#else #else
# define UV__EBUSY (-4082) # define UV__EBUSY (-4082)
#endif #endif
#if defined(ECANCELED) && !defined(_WIN32) #if defined(ECANCELED) && !defined(_WIN32)
# define UV__ECANCELED UV__ERR(ECANCELED) # define UV__ECANCELED (-ECANCELED)
#else #else
# define UV__ECANCELED (-4081) # define UV__ECANCELED (-4081)
#endif #endif
#if defined(ECHARSET) && !defined(_WIN32) #if defined(ECHARSET) && !defined(_WIN32)
# define UV__ECHARSET UV__ERR(ECHARSET) # define UV__ECHARSET (-ECHARSET)
#else #else
# define UV__ECHARSET (-4080) # define UV__ECHARSET (-4080)
#endif #endif
#if defined(ECONNABORTED) && !defined(_WIN32) #if defined(ECONNABORTED) && !defined(_WIN32)
# define UV__ECONNABORTED UV__ERR(ECONNABORTED) # define UV__ECONNABORTED (-ECONNABORTED)
#else #else
# define UV__ECONNABORTED (-4079) # define UV__ECONNABORTED (-4079)
#endif #endif
#if defined(ECONNREFUSED) && !defined(_WIN32) #if defined(ECONNREFUSED) && !defined(_WIN32)
# define UV__ECONNREFUSED UV__ERR(ECONNREFUSED) # define UV__ECONNREFUSED (-ECONNREFUSED)
#else #else
# define UV__ECONNREFUSED (-4078) # define UV__ECONNREFUSED (-4078)
#endif #endif
#if defined(ECONNRESET) && !defined(_WIN32) #if defined(ECONNRESET) && !defined(_WIN32)
# define UV__ECONNRESET UV__ERR(ECONNRESET) # define UV__ECONNRESET (-ECONNRESET)
#else #else
# define UV__ECONNRESET (-4077) # define UV__ECONNRESET (-4077)
#endif #endif
#if defined(EDESTADDRREQ) && !defined(_WIN32) #if defined(EDESTADDRREQ) && !defined(_WIN32)
# define UV__EDESTADDRREQ UV__ERR(EDESTADDRREQ) # define UV__EDESTADDRREQ (-EDESTADDRREQ)
#else #else
# define UV__EDESTADDRREQ (-4076) # define UV__EDESTADDRREQ (-4076)
#endif #endif
#if defined(EEXIST) && !defined(_WIN32) #if defined(EEXIST) && !defined(_WIN32)
# define UV__EEXIST UV__ERR(EEXIST) # define UV__EEXIST (-EEXIST)
#else #else
# define UV__EEXIST (-4075) # define UV__EEXIST (-4075)
#endif #endif
#if defined(EFAULT) && !defined(_WIN32) #if defined(EFAULT) && !defined(_WIN32)
# define UV__EFAULT UV__ERR(EFAULT) # define UV__EFAULT (-EFAULT)
#else #else
# define UV__EFAULT (-4074) # define UV__EFAULT (-4074)
#endif #endif
#if defined(EHOSTUNREACH) && !defined(_WIN32) #if defined(EHOSTUNREACH) && !defined(_WIN32)
# define UV__EHOSTUNREACH UV__ERR(EHOSTUNREACH) # define UV__EHOSTUNREACH (-EHOSTUNREACH)
#else #else
# define UV__EHOSTUNREACH (-4073) # define UV__EHOSTUNREACH (-4073)
#endif #endif
#if defined(EINTR) && !defined(_WIN32) #if defined(EINTR) && !defined(_WIN32)
# define UV__EINTR UV__ERR(EINTR) # define UV__EINTR (-EINTR)
#else #else
# define UV__EINTR (-4072) # define UV__EINTR (-4072)
#endif #endif
#if defined(EINVAL) && !defined(_WIN32) #if defined(EINVAL) && !defined(_WIN32)
# define UV__EINVAL UV__ERR(EINVAL) # define UV__EINVAL (-EINVAL)
#else #else
# define UV__EINVAL (-4071) # define UV__EINVAL (-4071)
#endif #endif
#if defined(EIO) && !defined(_WIN32) #if defined(EIO) && !defined(_WIN32)
# define UV__EIO UV__ERR(EIO) # define UV__EIO (-EIO)
#else #else
# define UV__EIO (-4070) # define UV__EIO (-4070)
#endif #endif
#if defined(EISCONN) && !defined(_WIN32) #if defined(EISCONN) && !defined(_WIN32)
# define UV__EISCONN UV__ERR(EISCONN) # define UV__EISCONN (-EISCONN)
#else #else
# define UV__EISCONN (-4069) # define UV__EISCONN (-4069)
#endif #endif
#if defined(EISDIR) && !defined(_WIN32) #if defined(EISDIR) && !defined(_WIN32)
# define UV__EISDIR UV__ERR(EISDIR) # define UV__EISDIR (-EISDIR)
#else #else
# define UV__EISDIR (-4068) # define UV__EISDIR (-4068)
#endif #endif
#if defined(ELOOP) && !defined(_WIN32) #if defined(ELOOP) && !defined(_WIN32)
# define UV__ELOOP UV__ERR(ELOOP) # define UV__ELOOP (-ELOOP)
#else #else
# define UV__ELOOP (-4067) # define UV__ELOOP (-4067)
#endif #endif
#if defined(EMFILE) && !defined(_WIN32) #if defined(EMFILE) && !defined(_WIN32)
# define UV__EMFILE UV__ERR(EMFILE) # define UV__EMFILE (-EMFILE)
#else #else
# define UV__EMFILE (-4066) # define UV__EMFILE (-4066)
#endif #endif
#if defined(EMSGSIZE) && !defined(_WIN32) #if defined(EMSGSIZE) && !defined(_WIN32)
# define UV__EMSGSIZE UV__ERR(EMSGSIZE) # define UV__EMSGSIZE (-EMSGSIZE)
#else #else
# define UV__EMSGSIZE (-4065) # define UV__EMSGSIZE (-4065)
#endif #endif
#if defined(ENAMETOOLONG) && !defined(_WIN32) #if defined(ENAMETOOLONG) && !defined(_WIN32)
# define UV__ENAMETOOLONG UV__ERR(ENAMETOOLONG) # define UV__ENAMETOOLONG (-ENAMETOOLONG)
#else #else
# define UV__ENAMETOOLONG (-4064) # define UV__ENAMETOOLONG (-4064)
#endif #endif
#if defined(ENETDOWN) && !defined(_WIN32) #if defined(ENETDOWN) && !defined(_WIN32)
# define UV__ENETDOWN UV__ERR(ENETDOWN) # define UV__ENETDOWN (-ENETDOWN)
#else #else
# define UV__ENETDOWN (-4063) # define UV__ENETDOWN (-4063)
#endif #endif
#if defined(ENETUNREACH) && !defined(_WIN32) #if defined(ENETUNREACH) && !defined(_WIN32)
# define UV__ENETUNREACH UV__ERR(ENETUNREACH) # define UV__ENETUNREACH (-ENETUNREACH)
#else #else
# define UV__ENETUNREACH (-4062) # define UV__ENETUNREACH (-4062)
#endif #endif
#if defined(ENFILE) && !defined(_WIN32) #if defined(ENFILE) && !defined(_WIN32)
# define UV__ENFILE UV__ERR(ENFILE) # define UV__ENFILE (-ENFILE)
#else #else
# define UV__ENFILE (-4061) # define UV__ENFILE (-4061)
#endif #endif
#if defined(ENOBUFS) && !defined(_WIN32) #if defined(ENOBUFS) && !defined(_WIN32)
# define UV__ENOBUFS UV__ERR(ENOBUFS) # define UV__ENOBUFS (-ENOBUFS)
#else #else
# define UV__ENOBUFS (-4060) # define UV__ENOBUFS (-4060)
#endif #endif
#if defined(ENODEV) && !defined(_WIN32) #if defined(ENODEV) && !defined(_WIN32)
# define UV__ENODEV UV__ERR(ENODEV) # define UV__ENODEV (-ENODEV)
#else #else
# define UV__ENODEV (-4059) # define UV__ENODEV (-4059)
#endif #endif
#if defined(ENOENT) && !defined(_WIN32) #if defined(ENOENT) && !defined(_WIN32)
# define UV__ENOENT UV__ERR(ENOENT) # define UV__ENOENT (-ENOENT)
#else #else
# define UV__ENOENT (-4058) # define UV__ENOENT (-4058)
#endif #endif
#if defined(ENOMEM) && !defined(_WIN32) #if defined(ENOMEM) && !defined(_WIN32)
# define UV__ENOMEM UV__ERR(ENOMEM) # define UV__ENOMEM (-ENOMEM)
#else #else
# define UV__ENOMEM (-4057) # define UV__ENOMEM (-4057)
#endif #endif
#if defined(ENONET) && !defined(_WIN32) #if defined(ENONET) && !defined(_WIN32)
# define UV__ENONET UV__ERR(ENONET) # define UV__ENONET (-ENONET)
#else #else
# define UV__ENONET (-4056) # define UV__ENONET (-4056)
#endif #endif
#if defined(ENOSPC) && !defined(_WIN32) #if defined(ENOSPC) && !defined(_WIN32)
# define UV__ENOSPC UV__ERR(ENOSPC) # define UV__ENOSPC (-ENOSPC)
#else #else
# define UV__ENOSPC (-4055) # define UV__ENOSPC (-4055)
#endif #endif
#if defined(ENOSYS) && !defined(_WIN32) #if defined(ENOSYS) && !defined(_WIN32)
# define UV__ENOSYS UV__ERR(ENOSYS) # define UV__ENOSYS (-ENOSYS)
#else #else
# define UV__ENOSYS (-4054) # define UV__ENOSYS (-4054)
#endif #endif
#if defined(ENOTCONN) && !defined(_WIN32) #if defined(ENOTCONN) && !defined(_WIN32)
# define UV__ENOTCONN UV__ERR(ENOTCONN) # define UV__ENOTCONN (-ENOTCONN)
#else #else
# define UV__ENOTCONN (-4053) # define UV__ENOTCONN (-4053)
#endif #endif
#if defined(ENOTDIR) && !defined(_WIN32) #if defined(ENOTDIR) && !defined(_WIN32)
# define UV__ENOTDIR UV__ERR(ENOTDIR) # define UV__ENOTDIR (-ENOTDIR)
#else #else
# define UV__ENOTDIR (-4052) # define UV__ENOTDIR (-4052)
#endif #endif
#if defined(ENOTEMPTY) && !defined(_WIN32) #if defined(ENOTEMPTY) && !defined(_WIN32)
# define UV__ENOTEMPTY UV__ERR(ENOTEMPTY) # define UV__ENOTEMPTY (-ENOTEMPTY)
#else #else
# define UV__ENOTEMPTY (-4051) # define UV__ENOTEMPTY (-4051)
#endif #endif
#if defined(ENOTSOCK) && !defined(_WIN32) #if defined(ENOTSOCK) && !defined(_WIN32)
# define UV__ENOTSOCK UV__ERR(ENOTSOCK) # define UV__ENOTSOCK (-ENOTSOCK)
#else #else
# define UV__ENOTSOCK (-4050) # define UV__ENOTSOCK (-4050)
#endif #endif
#if defined(ENOTSUP) && !defined(_WIN32) #if defined(ENOTSUP) && !defined(_WIN32)
# define UV__ENOTSUP UV__ERR(ENOTSUP) # define UV__ENOTSUP (-ENOTSUP)
#else #else
# define UV__ENOTSUP (-4049) # define UV__ENOTSUP (-4049)
#endif #endif
#if defined(EPERM) && !defined(_WIN32) #if defined(EPERM) && !defined(_WIN32)
# define UV__EPERM UV__ERR(EPERM) # define UV__EPERM (-EPERM)
#else #else
# define UV__EPERM (-4048) # define UV__EPERM (-4048)
#endif #endif
#if defined(EPIPE) && !defined(_WIN32) #if defined(EPIPE) && !defined(_WIN32)
# define UV__EPIPE UV__ERR(EPIPE) # define UV__EPIPE (-EPIPE)
#else #else
# define UV__EPIPE (-4047) # define UV__EPIPE (-4047)
#endif #endif
#if defined(EPROTO) && !defined(_WIN32) #if defined(EPROTO) && !defined(_WIN32)
# define UV__EPROTO UV__ERR(EPROTO) # define UV__EPROTO (-EPROTO)
#else #else
# define UV__EPROTO UV__ERR(4046) # define UV__EPROTO (-4046)
#endif #endif
#if defined(EPROTONOSUPPORT) && !defined(_WIN32) #if defined(EPROTONOSUPPORT) && !defined(_WIN32)
# define UV__EPROTONOSUPPORT UV__ERR(EPROTONOSUPPORT) # define UV__EPROTONOSUPPORT (-EPROTONOSUPPORT)
#else #else
# define UV__EPROTONOSUPPORT (-4045) # define UV__EPROTONOSUPPORT (-4045)
#endif #endif
#if defined(EPROTOTYPE) && !defined(_WIN32) #if defined(EPROTOTYPE) && !defined(_WIN32)
# define UV__EPROTOTYPE UV__ERR(EPROTOTYPE) # define UV__EPROTOTYPE (-EPROTOTYPE)
#else #else
# define UV__EPROTOTYPE (-4044) # define UV__EPROTOTYPE (-4044)
#endif #endif
#if defined(EROFS) && !defined(_WIN32) #if defined(EROFS) && !defined(_WIN32)
# define UV__EROFS UV__ERR(EROFS) # define UV__EROFS (-EROFS)
#else #else
# define UV__EROFS (-4043) # define UV__EROFS (-4043)
#endif #endif
#if defined(ESHUTDOWN) && !defined(_WIN32) #if defined(ESHUTDOWN) && !defined(_WIN32)
# define UV__ESHUTDOWN UV__ERR(ESHUTDOWN) # define UV__ESHUTDOWN (-ESHUTDOWN)
#else #else
# define UV__ESHUTDOWN (-4042) # define UV__ESHUTDOWN (-4042)
#endif #endif
#if defined(ESPIPE) && !defined(_WIN32) #if defined(ESPIPE) && !defined(_WIN32)
# define UV__ESPIPE UV__ERR(ESPIPE) # define UV__ESPIPE (-ESPIPE)
#else #else
# define UV__ESPIPE (-4041) # define UV__ESPIPE (-4041)
#endif #endif
#if defined(ESRCH) && !defined(_WIN32) #if defined(ESRCH) && !defined(_WIN32)
# define UV__ESRCH UV__ERR(ESRCH) # define UV__ESRCH (-ESRCH)
#else #else
# define UV__ESRCH (-4040) # define UV__ESRCH (-4040)
#endif #endif
#if defined(ETIMEDOUT) && !defined(_WIN32) #if defined(ETIMEDOUT) && !defined(_WIN32)
# define UV__ETIMEDOUT UV__ERR(ETIMEDOUT) # define UV__ETIMEDOUT (-ETIMEDOUT)
#else #else
# define UV__ETIMEDOUT (-4039) # define UV__ETIMEDOUT (-4039)
#endif #endif
#if defined(ETXTBSY) && !defined(_WIN32) #if defined(ETXTBSY) && !defined(_WIN32)
# define UV__ETXTBSY UV__ERR(ETXTBSY) # define UV__ETXTBSY (-ETXTBSY)
#else #else
# define UV__ETXTBSY (-4038) # define UV__ETXTBSY (-4038)
#endif #endif
#if defined(EXDEV) && !defined(_WIN32) #if defined(EXDEV) && !defined(_WIN32)
# define UV__EXDEV UV__ERR(EXDEV) # define UV__EXDEV (-EXDEV)
#else #else
# define UV__EXDEV (-4037) # define UV__EXDEV (-4037)
#endif #endif
#if defined(EFBIG) && !defined(_WIN32) #if defined(EFBIG) && !defined(_WIN32)
# define UV__EFBIG UV__ERR(EFBIG) # define UV__EFBIG (-EFBIG)
#else #else
# define UV__EFBIG (-4036) # define UV__EFBIG (-4036)
#endif #endif
#if defined(ENOPROTOOPT) && !defined(_WIN32) #if defined(ENOPROTOOPT) && !defined(_WIN32)
# define UV__ENOPROTOOPT UV__ERR(ENOPROTOOPT) # define UV__ENOPROTOOPT (-ENOPROTOOPT)
#else #else
# define UV__ENOPROTOOPT (-4035) # define UV__ENOPROTOOPT (-4035)
#endif #endif
#if defined(ERANGE) && !defined(_WIN32) #if defined(ERANGE) && !defined(_WIN32)
# define UV__ERANGE UV__ERR(ERANGE) # define UV__ERANGE (-ERANGE)
#else #else
# define UV__ERANGE (-4034) # define UV__ERANGE (-4034)
#endif #endif
#if defined(ENXIO) && !defined(_WIN32) #if defined(ENXIO) && !defined(_WIN32)
# define UV__ENXIO UV__ERR(ENXIO) # define UV__ENXIO (-ENXIO)
#else #else
# define UV__ENXIO (-4033) # define UV__ENXIO (-4033)
#endif #endif
#if defined(EMLINK) && !defined(_WIN32) #if defined(EMLINK) && !defined(_WIN32)
# define UV__EMLINK UV__ERR(EMLINK) # define UV__EMLINK (-EMLINK)
#else #else
# define UV__EMLINK (-4032) # define UV__EMLINK (-4032)
#endif #endif
@ -409,7 +404,7 @@
* icky to hard-code it. * icky to hard-code it.
*/ */
#if defined(EHOSTDOWN) && !defined(_WIN32) #if defined(EHOSTDOWN) && !defined(_WIN32)
# define UV__EHOSTDOWN UV__ERR(EHOSTDOWN) # define UV__EHOSTDOWN (-EHOSTDOWN)
#elif defined(__APPLE__) || \ #elif defined(__APPLE__) || \
defined(__DragonFly__) || \ defined(__DragonFly__) || \
defined(__FreeBSD__) || \ defined(__FreeBSD__) || \
@ -421,23 +416,4 @@
# define UV__EHOSTDOWN (-4031) # define UV__EHOSTDOWN (-4031)
#endif #endif
#if defined(EREMOTEIO) && !defined(_WIN32)
# define UV__EREMOTEIO UV__ERR(EREMOTEIO)
#else
# define UV__EREMOTEIO (-4030)
#endif
#if defined(ENOTTY) && !defined(_WIN32)
# define UV__ENOTTY UV__ERR(ENOTTY)
#else
# define UV__ENOTTY (-4029)
#endif
#if defined(EFTYPE) && !defined(_WIN32)
# define UV__EFTYPE UV__ERR(EFTYPE)
#else
# define UV__EFTYPE (-4028)
#endif
#endif /* UV_ERRNO_H_ */ #endif /* UV_ERRNO_H_ */

View File

@ -22,12 +22,9 @@
#ifndef UV_MVS_H #ifndef UV_MVS_H
#define UV_MVS_H #define UV_MVS_H
#define UV_PLATFORM_SEM_T long #define UV_PLATFORM_SEM_T int
#define UV_PLATFORM_LOOP_FIELDS \ #define UV_PLATFORM_LOOP_FIELDS \
void* ep; \ void* ep; \
#define UV_PLATFORM_FS_EVENT_FIELDS \
char rfis_rftok[8]; \
#endif /* UV_MVS_H */ #endif /* UV_MVS_H */

View File

@ -48,8 +48,6 @@
# include "uv-linux.h" # include "uv-linux.h"
#elif defined (__MVS__) #elif defined (__MVS__)
# include "uv-os390.h" # include "uv-os390.h"
#elif defined(__PASE__)
# include "uv-posix.h"
#elif defined(_AIX) #elif defined(_AIX)
# include "uv-aix.h" # include "uv-aix.h"
#elif defined(__sun) #elif defined(__sun)
@ -125,7 +123,6 @@ typedef struct uv_buf_t {
typedef int uv_file; typedef int uv_file;
typedef int uv_os_sock_t; typedef int uv_os_sock_t;
typedef int uv_os_fd_t; typedef int uv_os_fd_t;
typedef pid_t uv_pid_t;
#define UV_ONCE_INIT PTHREAD_ONCE_INIT #define UV_ONCE_INIT PTHREAD_ONCE_INIT
@ -368,97 +365,4 @@ typedef struct {
uv_fs_event_cb cb; \ uv_fs_event_cb cb; \
UV_PLATFORM_FS_EVENT_FIELDS \ UV_PLATFORM_FS_EVENT_FIELDS \
/* fs open() flags supported on this platform: */
#if defined(O_APPEND)
# define UV_FS_O_APPEND O_APPEND
#else
# define UV_FS_O_APPEND 0
#endif
#if defined(O_CREAT)
# define UV_FS_O_CREAT O_CREAT
#else
# define UV_FS_O_CREAT 0
#endif
#if defined(O_DIRECT)
# define UV_FS_O_DIRECT O_DIRECT
#else
# define UV_FS_O_DIRECT 0
#endif
#if defined(O_DIRECTORY)
# define UV_FS_O_DIRECTORY O_DIRECTORY
#else
# define UV_FS_O_DIRECTORY 0
#endif
#if defined(O_DSYNC)
# define UV_FS_O_DSYNC O_DSYNC
#else
# define UV_FS_O_DSYNC 0
#endif
#if defined(O_EXCL)
# define UV_FS_O_EXCL O_EXCL
#else
# define UV_FS_O_EXCL 0
#endif
#if defined(O_EXLOCK)
# define UV_FS_O_EXLOCK O_EXLOCK
#else
# define UV_FS_O_EXLOCK 0
#endif
#if defined(O_NOATIME)
# define UV_FS_O_NOATIME O_NOATIME
#else
# define UV_FS_O_NOATIME 0
#endif
#if defined(O_NOCTTY)
# define UV_FS_O_NOCTTY O_NOCTTY
#else
# define UV_FS_O_NOCTTY 0
#endif
#if defined(O_NOFOLLOW)
# define UV_FS_O_NOFOLLOW O_NOFOLLOW
#else
# define UV_FS_O_NOFOLLOW 0
#endif
#if defined(O_NONBLOCK)
# define UV_FS_O_NONBLOCK O_NONBLOCK
#else
# define UV_FS_O_NONBLOCK 0
#endif
#if defined(O_RDONLY)
# define UV_FS_O_RDONLY O_RDONLY
#else
# define UV_FS_O_RDONLY 0
#endif
#if defined(O_RDWR)
# define UV_FS_O_RDWR O_RDWR
#else
# define UV_FS_O_RDWR 0
#endif
#if defined(O_SYMLINK)
# define UV_FS_O_SYMLINK O_SYMLINK
#else
# define UV_FS_O_SYMLINK 0
#endif
#if defined(O_SYNC)
# define UV_FS_O_SYNC O_SYNC
#else
# define UV_FS_O_SYNC 0
#endif
#if defined(O_TRUNC)
# define UV_FS_O_TRUNC O_TRUNC
#else
# define UV_FS_O_TRUNC 0
#endif
#if defined(O_WRONLY)
# define UV_FS_O_WRONLY O_WRONLY
#else
# define UV_FS_O_WRONLY 0
#endif
/* fs open() flags supported on other platforms: */
#define UV_FS_O_RANDOM 0
#define UV_FS_O_SHORT_LIVED 0
#define UV_FS_O_SEQUENTIAL 0
#define UV_FS_O_TEMPORARY 0
#endif /* UV_UNIX_H */ #endif /* UV_UNIX_H */

View File

@ -31,10 +31,10 @@
*/ */
#define UV_VERSION_MAJOR 1 #define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 23 #define UV_VERSION_MINOR 13
#define UV_VERSION_PATCH 1 #define UV_VERSION_PATCH 1
#define UV_VERSION_IS_RELEASE 0 #define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX "dev" #define UV_VERSION_SUFFIX ""
#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \ #define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \
(UV_VERSION_MINOR << 8) | \ (UV_VERSION_MINOR << 8) | \

View File

@ -20,10 +20,10 @@
*/ */
#ifndef _WIN32_WINNT #ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0600 # define _WIN32_WINNT 0x0502
#endif #endif
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && !defined(__SSIZE_T) #if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
typedef intptr_t ssize_t; typedef intptr_t ssize_t;
# define _SSIZE_T_ # define _SSIZE_T_
# define _SSIZE_T_DEFINED # define _SSIZE_T_DEFINED
@ -53,13 +53,13 @@ typedef struct pollfd {
#include <sys/stat.h> #include <sys/stat.h>
#if defined(_MSC_VER) && _MSC_VER < 1600 #if defined(_MSC_VER) && _MSC_VER < 1600
# include "uv/stdint-msvc2008.h" # include "stdint-msvc2008.h"
#else #else
# include <stdint.h> # include <stdint.h>
#endif #endif
#include "uv/tree.h" #include "tree.h"
#include "uv/threadpool.h" #include "uv-threadpool.h"
#define MAX_PIPENAME_LEN 256 #define MAX_PIPENAME_LEN 256
@ -86,8 +86,8 @@ typedef struct pollfd {
#define SIGKILL 9 #define SIGKILL 9
#define SIGWINCH 28 #define SIGWINCH 28
/* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many unix-like /* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many */
* platforms. However MinGW doesn't define it, so we do. */ /* unix-like platforms. However MinGW doesn't define it, so we do. */
#ifndef SIGABRT_COMPAT #ifndef SIGABRT_COMPAT
# define SIGABRT_COMPAT 6 # define SIGABRT_COMPAT 6
#endif #endif
@ -222,7 +222,6 @@ typedef struct uv_buf_t {
typedef int uv_file; typedef int uv_file;
typedef SOCKET uv_os_sock_t; typedef SOCKET uv_os_sock_t;
typedef HANDLE uv_os_fd_t; typedef HANDLE uv_os_fd_t;
typedef int uv_pid_t;
typedef HANDLE uv_thread_t; typedef HANDLE uv_thread_t;
@ -244,7 +243,7 @@ typedef union {
CRITICAL_SECTION waiters_count_lock; CRITICAL_SECTION waiters_count_lock;
HANDLE signal_event; HANDLE signal_event;
HANDLE broadcast_event; HANDLE broadcast_event;
} unused_; /* TODO: retained for ABI compatibility; remove me in v2.x. */ } fallback;
} uv_cond_t; } uv_cond_t;
typedef union { typedef union {
@ -308,6 +307,8 @@ typedef struct {
char* errmsg; char* errmsg;
} uv_lib_t; } uv_lib_t;
RB_HEAD(uv_timer_tree_s, uv_timer_s);
#define UV_LOOP_PRIVATE_FIELDS \ #define UV_LOOP_PRIVATE_FIELDS \
/* The loop's I/O completion port */ \ /* The loop's I/O completion port */ \
HANDLE iocp; \ HANDLE iocp; \
@ -319,8 +320,8 @@ typedef struct {
uv_req_t* pending_reqs_tail; \ uv_req_t* pending_reqs_tail; \
/* Head of a single-linked list of closed handles */ \ /* Head of a single-linked list of closed handles */ \
uv_handle_t* endgame_handles; \ uv_handle_t* endgame_handles; \
/* TODO(bnoordhuis) Stop heap-allocating |timer_heap| in libuv v2.x. */ \ /* The head of the timers tree */ \
void* timer_heap; \ struct uv_timer_tree_s timers; \
/* Lists of active loop (prepare / check / idle) watchers */ \ /* Lists of active loop (prepare / check / idle) watchers */ \
uv_prepare_t* prepare_handles; \ uv_prepare_t* prepare_handles; \
uv_check_t* check_handles; \ uv_check_t* check_handles; \
@ -367,7 +368,7 @@ typedef struct {
struct uv_req_s* next_req; struct uv_req_s* next_req;
#define UV_WRITE_PRIVATE_FIELDS \ #define UV_WRITE_PRIVATE_FIELDS \
int coalesced; \ int ipc_header; \
uv_buf_t write_buffer; \ uv_buf_t write_buffer; \
HANDLE event_handle; \ HANDLE event_handle; \
HANDLE wait_handle; HANDLE wait_handle;
@ -457,17 +458,16 @@ typedef struct {
#define uv_pipe_connection_fields \ #define uv_pipe_connection_fields \
uv_timer_t* eof_timer; \ uv_timer_t* eof_timer; \
uv_write_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \ uv_write_t ipc_header_write_req; \
DWORD ipc_remote_pid; \ int ipc_pid; \
union { \ uint64_t remaining_ipc_rawdata_bytes; \
uint32_t payload_remaining; \ struct { \
uint64_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \ void* queue[2]; \
} ipc_data_frame; \ int queue_len; \
void* ipc_xfer_queue[2]; \ } pending_ipc_info; \
int ipc_xfer_queue_length; \
uv_write_t* non_overlapped_writes_tail; \ uv_write_t* non_overlapped_writes_tail; \
CRITICAL_SECTION readfile_thread_lock; \ uv_mutex_t readfile_mutex; \
volatile HANDLE readfile_thread_handle; volatile HANDLE readfile_thread;
#define UV_PIPE_PRIVATE_FIELDS \ #define UV_PIPE_PRIVATE_FIELDS \
HANDLE handle; \ HANDLE handle; \
@ -477,8 +477,8 @@ typedef struct {
struct { uv_pipe_connection_fields } conn; \ struct { uv_pipe_connection_fields } conn; \
} pipe; } pipe;
/* TODO: put the parser states in an union - TTY handles are always half-duplex /* TODO: put the parser states in an union - TTY handles are always */
* so read-state can safely overlap write-state. */ /* half-duplex so read-state can safely overlap write-state. */
#define UV_TTY_PRIVATE_FIELDS \ #define UV_TTY_PRIVATE_FIELDS \
HANDLE handle; \ HANDLE handle; \
union { \ union { \
@ -527,9 +527,8 @@ typedef struct {
unsigned char events; unsigned char events;
#define UV_TIMER_PRIVATE_FIELDS \ #define UV_TIMER_PRIVATE_FIELDS \
void* heap_node[3]; \ RB_ENTRY(uv_timer_s) tree_entry; \
int unused; \ uint64_t due; \
uint64_t timeout; \
uint64_t repeat; \ uint64_t repeat; \
uint64_t start_id; \ uint64_t start_id; \
uv_timer_cb timer_cb; uv_timer_cb timer_cb;
@ -649,28 +648,3 @@ typedef struct {
#ifndef X_OK #ifndef X_OK
#define X_OK 1 #define X_OK 1
#endif #endif
/* fs open() flags supported on this platform: */
#define UV_FS_O_APPEND _O_APPEND
#define UV_FS_O_CREAT _O_CREAT
#define UV_FS_O_EXCL _O_EXCL
#define UV_FS_O_RANDOM _O_RANDOM
#define UV_FS_O_RDONLY _O_RDONLY
#define UV_FS_O_RDWR _O_RDWR
#define UV_FS_O_SEQUENTIAL _O_SEQUENTIAL
#define UV_FS_O_SHORT_LIVED _O_SHORT_LIVED
#define UV_FS_O_TEMPORARY _O_TEMPORARY
#define UV_FS_O_TRUNC _O_TRUNC
#define UV_FS_O_WRONLY _O_WRONLY
/* fs open() flags supported on other platforms (or mapped on this platform): */
#define UV_FS_O_DIRECT 0x02000000 /* FILE_FLAG_NO_BUFFERING */
#define UV_FS_O_DIRECTORY 0
#define UV_FS_O_DSYNC 0x04000000 /* FILE_FLAG_WRITE_THROUGH */
#define UV_FS_O_EXLOCK 0x10000000 /* EXCLUSIVE SHARING MODE */
#define UV_FS_O_NOATIME 0
#define UV_FS_O_NOCTTY 0
#define UV_FS_O_NOFOLLOW 0
#define UV_FS_O_NONBLOCK 0
#define UV_FS_O_SYMLINK 0
#define UV_FS_O_SYNC 0x08000000 /* FILE_FLAG_WRITE_THROUGH */

View File

@ -51,7 +51,7 @@ extern "C" {
#include <stdio.h> #include <stdio.h>
#if defined(_MSC_VER) && _MSC_VER < 1600 #if defined(_MSC_VER) && _MSC_VER < 1600
# include "uv-stdint-msvc2008.h" # include "stdint-msvc2008.h"
#else #else
# include <stdint.h> # include <stdint.h>
#endif #endif
@ -140,9 +140,6 @@ extern "C" {
XX(ENXIO, "no such device or address") \ XX(ENXIO, "no such device or address") \
XX(EMLINK, "too many links") \ XX(EMLINK, "too many links") \
XX(EHOSTDOWN, "host is down") \ XX(EHOSTDOWN, "host is down") \
XX(EREMOTEIO, "remote I/O error") \
XX(ENOTTY, "inappropriate ioctl for device") \
XX(EFTYPE, "inappropriate file type or format") \
#define UV_HANDLE_TYPE_MAP(XX) \ #define UV_HANDLE_TYPE_MAP(XX) \
XX(ASYNC, async) \ XX(ASYNC, async) \
@ -370,10 +367,7 @@ typedef enum {
UV_EXTERN int uv_translate_sys_error(int sys_errno); UV_EXTERN int uv_translate_sys_error(int sys_errno);
UV_EXTERN const char* uv_strerror(int err); UV_EXTERN const char* uv_strerror(int err);
UV_EXTERN char* uv_strerror_r(int err, char* buf, size_t buflen);
UV_EXTERN const char* uv_err_name(int err); UV_EXTERN const char* uv_err_name(int err);
UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen);
#define UV_REQ_FIELDS \ #define UV_REQ_FIELDS \
@ -382,7 +376,8 @@ UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen);
/* read-only */ \ /* read-only */ \
uv_req_type type; \ uv_req_type type; \
/* private */ \ /* private */ \
void* reserved[6]; \ void* active_queue[2]; \
void* reserved[4]; \
UV_REQ_PRIVATE_FIELDS \ UV_REQ_PRIVATE_FIELDS \
/* Abstract base class of all requests. */ /* Abstract base class of all requests. */
@ -428,17 +423,7 @@ struct uv_handle_s {
}; };
UV_EXTERN size_t uv_handle_size(uv_handle_type type); UV_EXTERN size_t uv_handle_size(uv_handle_type type);
UV_EXTERN uv_handle_type uv_handle_get_type(const uv_handle_t* handle);
UV_EXTERN const char* uv_handle_type_name(uv_handle_type type);
UV_EXTERN void* uv_handle_get_data(const uv_handle_t* handle);
UV_EXTERN uv_loop_t* uv_handle_get_loop(const uv_handle_t* handle);
UV_EXTERN void uv_handle_set_data(uv_handle_t* handle, void* data);
UV_EXTERN size_t uv_req_size(uv_req_type type); UV_EXTERN size_t uv_req_size(uv_req_type type);
UV_EXTERN void* uv_req_get_data(const uv_req_t* req);
UV_EXTERN void uv_req_set_data(uv_req_t* req, void* data);
UV_EXTERN uv_req_type uv_req_get_type(const uv_req_t* req);
UV_EXTERN const char* uv_req_type_name(uv_req_type type);
UV_EXTERN int uv_is_active(const uv_handle_t* handle); UV_EXTERN int uv_is_active(const uv_handle_t* handle);
@ -478,8 +463,6 @@ struct uv_stream_s {
UV_STREAM_FIELDS UV_STREAM_FIELDS
}; };
UV_EXTERN size_t uv_stream_get_write_queue_size(const uv_stream_t* stream);
UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb); UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb);
UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client); UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client);
@ -507,7 +490,7 @@ UV_EXTERN int uv_try_write(uv_stream_t* handle,
struct uv_write_s { struct uv_write_s {
UV_REQ_FIELDS UV_REQ_FIELDS
uv_write_cb cb; uv_write_cb cb;
uv_stream_t* send_handle; /* TODO: make private and unix-only in v2.x. */ uv_stream_t* send_handle;
uv_stream_t* handle; uv_stream_t* handle;
UV_WRITE_PRIVATE_FIELDS UV_WRITE_PRIVATE_FIELDS
}; };
@ -657,8 +640,6 @@ UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle,
uv_alloc_cb alloc_cb, uv_alloc_cb alloc_cb,
uv_udp_recv_cb recv_cb); uv_udp_recv_cb recv_cb);
UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle); UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle);
UV_EXTERN size_t uv_udp_get_send_queue_size(const uv_udp_t* handle);
UV_EXTERN size_t uv_udp_get_send_queue_count(const uv_udp_t* handle);
/* /*
@ -727,7 +708,6 @@ UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t* handle,
UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count); UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count);
UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle); UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle);
UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle); UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle);
UV_EXTERN int uv_pipe_chmod(uv_pipe_t* handle, int flags);
struct uv_poll_s { struct uv_poll_s {
@ -739,8 +719,7 @@ struct uv_poll_s {
enum uv_poll_event { enum uv_poll_event {
UV_READABLE = 1, UV_READABLE = 1,
UV_WRITABLE = 2, UV_WRITABLE = 2,
UV_DISCONNECT = 4, UV_DISCONNECT = 4
UV_PRIORITIZED = 8
}; };
UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd); UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
@ -869,13 +848,7 @@ typedef enum {
* flags may be specified to create a duplex data stream. * flags may be specified to create a duplex data stream.
*/ */
UV_READABLE_PIPE = 0x10, UV_READABLE_PIPE = 0x10,
UV_WRITABLE_PIPE = 0x20, UV_WRITABLE_PIPE = 0x20
/*
* Open the child pipe handle in overlapped mode on Windows.
* On Unix it is silently ignored.
*/
UV_OVERLAPPED_PIPE = 0x40
} uv_stdio_flags; } uv_stdio_flags;
typedef struct uv_stdio_container_s { typedef struct uv_stdio_container_s {
@ -985,7 +958,6 @@ UV_EXTERN int uv_spawn(uv_loop_t* loop,
const uv_process_options_t* options); const uv_process_options_t* options);
UV_EXTERN int uv_process_kill(uv_process_t*, int signum); UV_EXTERN int uv_process_kill(uv_process_t*, int signum);
UV_EXTERN int uv_kill(int pid, int signum); UV_EXTERN int uv_kill(int pid, int signum);
UV_EXTERN uv_pid_t uv_process_get_pid(const uv_process_t*);
/* /*
@ -1007,18 +979,16 @@ UV_EXTERN int uv_queue_work(uv_loop_t* loop,
UV_EXTERN int uv_cancel(uv_req_t* req); UV_EXTERN int uv_cancel(uv_req_t* req);
struct uv_cpu_times_s { struct uv_cpu_info_s {
char* model;
int speed;
struct uv_cpu_times_s {
uint64_t user; uint64_t user;
uint64_t nice; uint64_t nice;
uint64_t sys; uint64_t sys;
uint64_t idle; uint64_t idle;
uint64_t irq; uint64_t irq;
}; } cpu_times;
struct uv_cpu_info_s {
char* model;
int speed;
struct uv_cpu_times_s cpu_times;
}; };
struct uv_interface_address_s { struct uv_interface_address_s {
@ -1065,7 +1035,6 @@ UV_EXTERN int uv_set_process_title(const char* title);
UV_EXTERN int uv_resident_set_memory(size_t* rss); UV_EXTERN int uv_resident_set_memory(size_t* rss);
UV_EXTERN int uv_uptime(double* uptime); UV_EXTERN int uv_uptime(double* uptime);
UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd); UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd);
UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd);
typedef struct { typedef struct {
long tv_sec; long tv_sec;
@ -1097,18 +1066,6 @@ UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size); UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd); UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd);
UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd); UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd);
UV_EXTERN uv_pid_t uv_os_getpid(void);
UV_EXTERN uv_pid_t uv_os_getppid(void);
#define UV_PRIORITY_LOW 19
#define UV_PRIORITY_BELOW_NORMAL 10
#define UV_PRIORITY_NORMAL 0
#define UV_PRIORITY_ABOVE_NORMAL -7
#define UV_PRIORITY_HIGH -14
#define UV_PRIORITY_HIGHEST -20
UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count); UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count); UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
@ -1155,9 +1112,7 @@ typedef enum {
UV_FS_READLINK, UV_FS_READLINK,
UV_FS_CHOWN, UV_FS_CHOWN,
UV_FS_FCHOWN, UV_FS_FCHOWN,
UV_FS_REALPATH, UV_FS_REALPATH
UV_FS_COPYFILE,
UV_FS_LCHOWN
} uv_fs_type; } uv_fs_type;
/* uv_fs_t is a subclass of uv_req_t. */ /* uv_fs_t is a subclass of uv_req_t. */
@ -1173,12 +1128,6 @@ struct uv_fs_s {
UV_FS_PRIVATE_FIELDS UV_FS_PRIVATE_FIELDS
}; };
UV_EXTERN uv_fs_type uv_fs_get_type(const uv_fs_t*);
UV_EXTERN ssize_t uv_fs_get_result(const uv_fs_t*);
UV_EXTERN void* uv_fs_get_ptr(const uv_fs_t*);
UV_EXTERN const char* uv_fs_get_path(const uv_fs_t*);
UV_EXTERN uv_stat_t* uv_fs_get_statbuf(uv_fs_t*);
UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req); UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req);
UV_EXTERN int uv_fs_close(uv_loop_t* loop, UV_EXTERN int uv_fs_close(uv_loop_t* loop,
uv_fs_t* req, uv_fs_t* req,
@ -1208,30 +1157,6 @@ UV_EXTERN int uv_fs_write(uv_loop_t* loop,
unsigned int nbufs, unsigned int nbufs,
int64_t offset, int64_t offset,
uv_fs_cb cb); uv_fs_cb cb);
/*
* This flag can be used with uv_fs_copyfile() to return an error if the
* destination already exists.
*/
#define UV_FS_COPYFILE_EXCL 0x0001
/*
* This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
* If copy-on-write is not supported, a fallback copy mechanism is used.
*/
#define UV_FS_COPYFILE_FICLONE 0x0002
/*
* This flag can be used with uv_fs_copyfile() to attempt to create a reflink.
* If copy-on-write is not supported, an error is returned.
*/
#define UV_FS_COPYFILE_FICLONE_FORCE 0x0004
UV_EXTERN int uv_fs_copyfile(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
const char* new_path,
int flags,
uv_fs_cb cb);
UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop, UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop,
uv_fs_t* req, uv_fs_t* req,
const char* path, const char* path,
@ -1360,12 +1285,6 @@ UV_EXTERN int uv_fs_fchown(uv_loop_t* loop,
uv_uid_t uid, uv_uid_t uid,
uv_gid_t gid, uv_gid_t gid,
uv_fs_cb cb); uv_fs_cb cb);
UV_EXTERN int uv_fs_lchown(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb);
enum uv_fs_event { enum uv_fs_event {
@ -1471,21 +1390,6 @@ UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size
UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size); UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size);
UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst); UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst);
#if defined(IF_NAMESIZE)
# define UV_IF_NAMESIZE (IF_NAMESIZE + 1)
#elif defined(IFNAMSIZ)
# define UV_IF_NAMESIZE (IFNAMSIZ + 1)
#else
# define UV_IF_NAMESIZE (16 + 1)
#endif
UV_EXTERN int uv_if_indextoname(unsigned int ifindex,
char* buffer,
size_t* size);
UV_EXTERN int uv_if_indextoiid(unsigned int ifindex,
char* buffer,
size_t* size);
UV_EXTERN int uv_exepath(char* buffer, size_t* size); UV_EXTERN int uv_exepath(char* buffer, size_t* size);
UV_EXTERN int uv_cwd(char* buffer, size_t* size); UV_EXTERN int uv_cwd(char* buffer, size_t* size);
@ -1505,7 +1409,6 @@ UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib); UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);
UV_EXTERN int uv_mutex_init(uv_mutex_t* handle); UV_EXTERN int uv_mutex_init(uv_mutex_t* handle);
UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t* handle);
UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle); UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle);
UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle); UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle);
UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle); UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle);
@ -1572,17 +1475,12 @@ struct uv_loop_s {
/* Loop reference counting. */ /* Loop reference counting. */
unsigned int active_handles; unsigned int active_handles;
void* handle_queue[2]; void* handle_queue[2];
union { void* active_reqs[2];
void* unused[2];
unsigned int count;
} active_reqs;
/* Internal flag to signal loop stop. */ /* Internal flag to signal loop stop. */
unsigned int stop_flag; unsigned int stop_flag;
UV_LOOP_PRIVATE_FIELDS UV_LOOP_PRIVATE_FIELDS
}; };
UV_EXTERN void* uv_loop_get_data(const uv_loop_t*);
UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data);
/* Don't export the private CPP symbols. */ /* Don't export the private CPP symbols. */
#undef UV_HANDLE_TYPE_PRIVATE #undef UV_HANDLE_TYPE_PRIVATE
@ -1603,7 +1501,6 @@ UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data);
#undef UV_SIGNAL_PRIVATE_FIELDS #undef UV_SIGNAL_PRIVATE_FIELDS
#undef UV_LOOP_PRIVATE_FIELDS #undef UV_LOOP_PRIVATE_FIELDS
#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS #undef UV_LOOP_PRIVATE_PLATFORM_FIELDS
#undef UV__ERR
#ifdef __cplusplus #ifdef __cplusplus
} }

Binary file not shown.