chore: add macros so we can swap implementations
This commit is contained in:
parent
50ed2fd7bd
commit
350f735786
@ -450,6 +450,22 @@ int uv__iou_fs_unlink(uv_loop_t* loop, uv_fs_t* req);
|
||||
#if defined(__APPLE__)
|
||||
int uv___stream_fd(const uv_stream_t* handle);
|
||||
#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle)))
|
||||
|
||||
#ifdef EV64
|
||||
#define SET_EVENT(a, b, c, d, e) EV_SET64(a, b, c, d, e, 0, 0, 0, 0)
|
||||
#define KEVENT(a, b, c, d, e, f, g) kevent64(a, b, c, d, e, f, g)
|
||||
#define KEVENT_S struct kevent64_s
|
||||
#else
|
||||
#define SET_EVENT(a, b, c, d, e) EV_SET(a, b, c, d, e, 0, 0)
|
||||
#define KEVENT(a, b, c, d, e, f, g) kevent(a, b, c, d, e, g)
|
||||
#define KEVENT_S struct kevent
|
||||
#endif
|
||||
#ifndef KEVENT_FLAG_IMMEDIATE
|
||||
#define KEVENT_FLAG_IMMEDIATE 1
|
||||
#endif
|
||||
#ifndef KEVENT_FLAG_NONE
|
||||
#define KEVENT_FLAG_NONE 0
|
||||
#endif
|
||||
#else
|
||||
#define uv__stream_fd(handle) ((handle)->io_watcher.fd)
|
||||
#endif /* defined(__APPLE__) */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user