File tree 4 files changed +26
-29
lines changed 4 files changed +26
-29
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ typedef void* uv_lib_t;
223
223
ev_io read_watcher; \
224
224
uv_fs_event_cb cb;
225
225
226
- #elif ( defined(__MAC_OS_X_VERSION_MIN_REQUIRED ) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 ) \
226
+ #elif defined(__APPLE__ ) \
227
227
|| defined(__FreeBSD__ ) \
228
228
|| defined(__OpenBSD__ ) \
229
229
|| defined(__NetBSD__ )
Original file line number Diff line number Diff line change 43
43
#include <string.h>
44
44
#include <errno.h>
45
45
46
+ /* These are the same on OS X and the BSDs. */
47
+ #ifndef NOTE_DELETE
48
+ # define NOTE_DELETE 0x01
49
+ #endif
50
+ #ifndef NOTE_WRITE
51
+ # define NOTE_WRITE 0x02
52
+ #endif
53
+ #ifndef NOTE_EXTEND
54
+ # define NOTE_EXTEND 0x04
55
+ #endif
56
+ #ifndef NOTE_ATTRIB
57
+ # define NOTE_ATTRIB 0x08
58
+ #endif
59
+ #ifndef NOTE_LINK
60
+ # define NOTE_LINK 0x10
61
+ #endif
62
+ #ifndef NOTE_RENAME
63
+ # define NOTE_RENAME 0x20
64
+ #endif
65
+ #ifndef NOTE_REVOKE
66
+ # define NOTE_REVOKE 0x40
67
+ #endif
68
+
69
+
46
70
extern void
47
71
uv__kqueue_hack (EV_P_ int fflags , ev_io * w );
48
72
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ inline static int sys_accept4(int fd,
125
125
#endif
126
126
127
127
/* FIXME exact copy of the #ifdef guard in uv-unix.h */
128
- #if ( defined(__MAC_OS_X_VERSION_MIN_REQUIRED ) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 ) \
128
+ #if defined(__APPLE__ ) \
129
129
|| defined(__FreeBSD__ ) \
130
130
|| defined(__OpenBSD__ ) \
131
131
|| defined(__NetBSD__ )
Original file line number Diff line number Diff line change 26
26
#include <string.h>
27
27
#include <errno.h>
28
28
29
- #if HAVE_KQUEUE
30
-
31
29
#include <sys/sysctl.h>
32
30
#include <sys/types.h>
33
31
#include <sys/event.h>
@@ -127,28 +125,3 @@ void uv__fs_event_destroy(uv_fs_event_t* handle) {
127
125
close (handle -> fd );
128
126
handle -> fd = -1 ;
129
127
}
130
-
131
- #else /* !HAVE_KQUEUE */
132
-
133
- int uv_fs_event_init (uv_loop_t * loop ,
134
- uv_fs_event_t * handle ,
135
- const char * filename ,
136
- uv_fs_event_cb cb ,
137
- int flags ) {
138
- loop -> counters .fs_event_init ++ ;
139
- uv__set_sys_error (loop , ENOSYS );
140
- return -1 ;
141
- }
142
-
143
-
144
- void uv__fs_event_destroy (uv_fs_event_t * handle ) {
145
- UNREACHABLE ();
146
- }
147
-
148
-
149
- /* Called by libev, don't touch. */
150
- void uv__kqueue_hack (EV_P_ int fflags , ev_io * w ) {
151
- UNREACHABLE ();
152
- }
153
-
154
- #endif /* HAVE_KQUEUE */
You can’t perform that action at this time.
0 commit comments