diff options
author | Bert Belder <bertbelder@gmail.com> | 2013-08-29 15:04:27 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2013-08-29 15:38:32 +0200 |
commit | e83a0cd016ef03d3ec3b491325b347be886c1476 (patch) | |
tree | f9c61bd589f91c07f2dbaec25e09cc8f34d5745f /deps/uv | |
parent | a9eb96d0201fa7d13c898a154e81fd9531358d2f (diff) | |
download | node-e83a0cd016ef03d3ec3b491325b347be886c1476.tar.gz |
uv: upgrade to v0.11.11
Diffstat (limited to 'deps/uv')
-rw-r--r-- | deps/uv/.mailmap | 1 | ||||
-rw-r--r-- | deps/uv/AUTHORS | 1 | ||||
-rw-r--r-- | deps/uv/ChangeLog | 31 | ||||
-rw-r--r-- | deps/uv/Makefile.am | 50 | ||||
-rw-r--r-- | deps/uv/Makefile.mingw | 18 | ||||
-rw-r--r-- | deps/uv/README.md | 4 | ||||
-rw-r--r-- | deps/uv/configure.ac | 1 | ||||
-rw-r--r-- | deps/uv/include/uv-unix.h | 2 | ||||
-rw-r--r-- | deps/uv/include/uv-win.h | 4 | ||||
-rw-r--r-- | deps/uv/include/uv.h | 28 | ||||
-rw-r--r-- | deps/uv/src/unix/core.c | 41 | ||||
-rw-r--r-- | deps/uv/src/unix/darwin-proctitle.c | 123 | ||||
-rw-r--r-- | deps/uv/src/unix/fsevents.c | 225 | ||||
-rw-r--r-- | deps/uv/src/unix/internal.h | 2 | ||||
-rw-r--r-- | deps/uv/src/unix/loop.c | 51 | ||||
-rw-r--r-- | deps/uv/src/unix/thread.c | 21 | ||||
-rw-r--r-- | deps/uv/src/unix/udp.c | 34 | ||||
-rw-r--r-- | deps/uv/src/version.c | 2 | ||||
-rw-r--r-- | deps/uv/src/win/pipe.c | 10 | ||||
-rw-r--r-- | deps/uv/src/win/process-stdio.c | 15 | ||||
-rw-r--r-- | deps/uv/src/win/thread.c | 33 | ||||
-rw-r--r-- | deps/uv/src/win/winapi.h | 8 | ||||
-rw-r--r-- | deps/uv/test/test-list.h | 2 | ||||
-rw-r--r-- | deps/uv/test/test-thread.c | 26 | ||||
-rw-r--r-- | deps/uv/uv.gyp | 8 |
25 files changed, 543 insertions, 198 deletions
diff --git a/deps/uv/.mailmap b/deps/uv/.mailmap index 5dc4075e3..2d5606f88 100644 --- a/deps/uv/.mailmap +++ b/deps/uv/.mailmap @@ -6,6 +6,7 @@ Brian White <mscdex@mscdex.net> Brian White <mscdex@mscdex.net> <mscdex@gmail.com> Frank Denis <github@pureftpd.org> Isaac Z. Schlueter <i@izs.me> +Keno Fischer <kenof@stanford.edu> <kfischer@college.harvard.edu> Robert Mustacchi <rm@joyent.com> <rm@fingolfin.org> Ryan Dahl <ryan@joyent.com> <ry@tinyclouds.org> Ryan Emery <seebees@gmail.com> diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index 538714f9e..f002a8838 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -90,3 +90,4 @@ Wynn Wilkes <wynnw@movenetworks.com> Linus MÃ¥rtensson <linus.martensson@sonymobile.com> Andrei Sedoi <bsnote@gmail.com> Navaneeth Kedaram Nambiathan <navaneethkn@gmail.com> +Alex Crichton <alex@alexcrichton.com> diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index 46c22e4eb..ba73c149d 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,4 +1,33 @@ -2013.08.25, Version 0.11.10 (Unstable) +2013.08.30, Version 0.11.11 (Unstable) + +Changes since version 0.11.10: + +* unix, windows: add thread-local storage API (Ben Noordhuis) + +* linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis) + +* darwin: fix 10.6 build error in fsevents.c (Ben Noordhuis) + +* windows: make uv_shutdown() for write-only pipes work (Bert Belder) + +* include: update uv_udp_open() / uv_udp_bind() docs (Ben Noordhuis) + +* unix: req queue must be empty when destroying loop (Ben Noordhuis) + +* unix: move loop functions from core.c to loop.c (Ben Noordhuis) + +* darwin: remove CoreFoundation dependency (Ben Noordhuis) + +* windows: make autotools build system work with mingw (Keno Fischer) + +* windows: fix mingw build (Alex Crichton) + +* windows: tweak Makefile.mingw for easier usage (Alex Crichton) + +* build: remove _GNU_SOURCE macro definition (Ben Noordhuis) + + +2013.08.25, Version 0.11.10 (Unstable), 742dadcb7154cc7bb89c0c228a223b767a36cf0d * windows: Re-implement uv_fs_stat. The st_ctime field now contains the change time, not the creation time, like on unix systems. st_dev, st_ino, st_blocks diff --git a/deps/uv/Makefile.am b/deps/uv/Makefile.am index e683f0057..bde152e07 100644 --- a/deps/uv/Makefile.am +++ b/deps/uv/Makefile.am @@ -15,10 +15,9 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/unix \ -I$(top_srcdir)/src -include_HEADERS=include/uv.h include/uv-errno.h include/uv-unix.h +include_HEADERS=include/uv.h include/uv-errno.h CLEANFILES = @@ -29,8 +28,46 @@ libuv_la_SOURCES = src/fs-poll.c \ src/inet.c \ src/uv-common.c \ src/uv-common.h \ - src/version.c \ - src/unix/async.c \ + src/version.c + +if WINNT + +include_HEADERS += include/uv-win.h include/tree.h +AM_CPPFLAGS += -I$(top_srcdir)/src/win \ + -DWIN32_LEAN_AND_MEAN \ + -D_WIN32_WINNT=0x0600 +LIBS += -lws2_32 -lpsapi -lphlpapi2 +libuv_la_SOURCES += src/win/async.c \ + src/win/core.c \ + src/win/dl.c \ + src/win/error.c \ + src/win/fs-event.c \ + src/win/fs.c \ + src/win/getaddrinfo.c \ + src/win/handle.c \ + src/win/loop-watcher.c \ + src/win/pipe.c \ + src/win/poll.c \ + src/win/process-stdio.c \ + src/win/process.c \ + src/win/req.c \ + src/win/signal.c \ + src/win/stream.c \ + src/win/tcp.c \ + src/win/thread.c \ + src/win/threadpool.c \ + src/win/timer.c \ + src/win/tty.c \ + src/win/udp.c \ + src/win/util.c \ + src/win/winapi.c \ + src/win/winsock.c + +else # WINNT + +include_HEADERS += include/uv-unix.h +AM_CPPFLAGS += -I$(top_srcdir)/src/unix +libuv_la_SOURCES += src/unix/async.c \ src/unix/core.c \ src/unix/dl.c \ src/unix/fs.c \ @@ -50,6 +87,8 @@ libuv_la_SOURCES = src/fs-poll.c \ src/unix/tty.c \ src/unix/udp.c +endif # WINNT + TESTS = test/run-tests check_PROGRAMS = test/run-tests test_run_tests_SOURCES = test/blackhole-server.c \ @@ -158,9 +197,6 @@ libuv_la_SOURCES += src/unix/darwin.c \ src/unix/fsevents.c \ src/unix/kqueue.c \ src/unix/proctitle.c -libuv_la_LDFLAGS += -framework ApplicationServices \ - -framework CoreServices \ - -framework Foundation endif if FREEBSD diff --git a/deps/uv/Makefile.mingw b/deps/uv/Makefile.mingw index 189104a3a..28a1e274d 100644 --- a/deps/uv/Makefile.mingw +++ b/deps/uv/Makefile.mingw @@ -12,14 +12,16 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -CFLAGS = -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -Iinclude \ - -Isrc \ - -Isrc/win \ - -DWIN32_LEAN_AND_MEAN \ - -D_WIN32_WINNT=0x0600 +CC = gcc + +CFLAGS += -Wall \ + -Wextra \ + -Wno-unused-parameter \ + -Iinclude \ + -Isrc \ + -Isrc/win \ + -DWIN32_LEAN_AND_MEAN \ + -D_WIN32_WINNT=0x0600 INCLUDES = include/stdint-msvc2008.h \ include/tree.h \ diff --git a/deps/uv/README.md b/deps/uv/README.md index 48a862660..e4857106b 100644 --- a/deps/uv/README.md +++ b/deps/uv/README.md @@ -94,10 +94,6 @@ To build for android: Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and `-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically. -Note for Linux users: compile your project with `-D_GNU_SOURCE` when you -include `uv.h`. GYP builds take care of that automatically. If you use -autotools, add a `AC_GNU_SOURCE` declaration to your `configure.ac`. - ## Supported Platforms Microsoft Windows operating systems since Windows XP SP2. It can be built diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index d9760a32e..aede49b7c 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -44,6 +44,7 @@ AM_CONDITIONAL([LINUX], [AS_CASE([$host_os], [linux*], [true], [false])]) AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os], [netbsd*], [true], [false])]) AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os], [openbsd*], [true], [false])]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os], [solaris*], [true], [false])]) +AM_CONDITIONAL([WINNT], [AS_CASE([$host_os], [mingw*], [true], [false])]) PANDORA_ENABLE_DTRACE AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/deps/uv/include/uv-unix.h b/deps/uv/include/uv-unix.h index d0b841856..408b44c6c 100644 --- a/deps/uv/include/uv-unix.h +++ b/deps/uv/include/uv-unix.h @@ -131,7 +131,7 @@ typedef pthread_mutex_t uv_mutex_t; typedef pthread_rwlock_t uv_rwlock_t; typedef UV_PLATFORM_SEM_T uv_sem_t; typedef pthread_cond_t uv_cond_t; - +typedef pthread_key_t uv_key_t; #if defined(__APPLE__) && defined(__MACH__) diff --git a/deps/uv/include/uv-win.h b/deps/uv/include/uv-win.h index 8e60b3547..512d7f89f 100644 --- a/deps/uv/include/uv-win.h +++ b/deps/uv/include/uv-win.h @@ -250,6 +250,10 @@ typedef struct { uv_sem_t turnstile2; } uv_barrier_t; +typedef struct { + DWORD tls_index; +} uv_key_t; + #define UV_ONCE_INIT { 0, NULL } typedef struct uv_once_s { diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index 32d481b23..5700f9413 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -845,6 +845,14 @@ UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle); * datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), * etc.). In other words, other datagram-type sockets like raw sockets or * netlink sockets can also be passed to this function. + * + * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other + * UNIX platforms, it sets the SO_REUSEADDR flag. What that means is that + * multiple threads or processes can bind to the same address without error + * (provided they all set the flag) but only the last one to bind will receive + * any traffic, in effect "stealing" the port from the previous listener. + * This behavior is something of an anomaly and may be replaced by an explicit + * opt-in mechanism in future versions of libuv. */ UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock); @@ -858,6 +866,14 @@ UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock); * * Returns: * 0 on success, or an error code < 0 on failure. + * + * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other + * UNIX platforms, it sets the SO_REUSEADDR flag. What that means is that + * multiple threads or processes can bind to the same address without error + * (provided they all set the flag) but only the last one to bind will receive + * any traffic, in effect "stealing" the port from the previous listener. + * This behavior is something of an anomaly and may be replaced by an explicit + * opt-in mechanism in future versions of libuv. */ UV_EXTERN int uv_udp_bind(uv_udp_t* handle, struct sockaddr_in addr, unsigned flags); @@ -1996,6 +2012,18 @@ UV_EXTERN void uv_barrier_wait(uv_barrier_t* barrier); */ UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void)); +/* Thread-local storage. These functions largely follow the semantics of + * pthread_key_create(), pthread_key_delete(), pthread_getspecific() and + * pthread_setspecific(). + * + * Note that the total thread-local storage size may be limited. + * That is, it may not be possible to create many TLS keys. + */ +UV_EXTERN int uv_key_create(uv_key_t* key); +UV_EXTERN void uv_key_delete(uv_key_t* key); +UV_EXTERN void* uv_key_get(uv_key_t* key); +UV_EXTERN void uv_key_set(uv_key_t* key, void* value); + UV_EXTERN int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg); UV_EXTERN unsigned long uv_thread_self(void); diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c index a5b340a03..7de85bf6a 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -62,9 +62,6 @@ static void uv__run_pending(uv_loop_t* loop); -static uv_loop_t default_loop_struct; -static uv_loop_t* default_loop_ptr; - /* Verify that uv_buf_t is ABI-compatible with struct iovec. */ STATIC_ASSERT(sizeof(uv_buf_t) == sizeof(struct iovec)); STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->base) == @@ -229,44 +226,6 @@ int uv_is_closing(const uv_handle_t* handle) { } -uv_loop_t* uv_default_loop(void) { - if (default_loop_ptr) - return default_loop_ptr; - - if (uv__loop_init(&default_loop_struct, /* default_loop? */ 1)) - return NULL; - - return (default_loop_ptr = &default_loop_struct); -} - - -uv_loop_t* uv_loop_new(void) { - uv_loop_t* loop; - - if ((loop = malloc(sizeof(*loop))) == NULL) - return NULL; - - if (uv__loop_init(loop, /* default_loop? */ 0)) { - free(loop); - return NULL; - } - - return loop; -} - - -void uv_loop_delete(uv_loop_t* loop) { - uv__loop_delete(loop); -#ifndef NDEBUG - memset(loop, -1, sizeof *loop); -#endif - if (loop == default_loop_ptr) - default_loop_ptr = NULL; - else - free(loop); -} - - int uv_backend_fd(const uv_loop_t* loop) { return loop->backend_fd; } diff --git a/deps/uv/src/unix/darwin-proctitle.c b/deps/uv/src/unix/darwin-proctitle.c index 90b2e4188..c5f53a08d 100644 --- a/deps/uv/src/unix/darwin-proctitle.c +++ b/deps/uv/src/unix/darwin-proctitle.c @@ -55,62 +55,111 @@ int uv__set_process_title(const char* title) { #if TARGET_OS_IPHONE return uv__pthread_setname_np(title); #else - typedef CFTypeRef (*LSGetCurrentApplicationASNType)(void); - typedef OSStatus (*LSSetApplicationInformationItemType)(int, - CFTypeRef, - CFStringRef, - CFStringRef, - CFDictionaryRef*); + CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef, + const char*, + CFStringEncoding); + CFBundleRef (*pCFBundleGetBundleWithIdentifier)(CFStringRef); + void *(*pCFBundleGetDataPointerForName)(CFBundleRef, CFStringRef); + void *(*pCFBundleGetFunctionPointerForName)(CFBundleRef, CFStringRef); + OSErr (*pGetCurrentProcess)(ProcessSerialNumber*); + CFTypeRef (*pLSGetCurrentApplicationASN)(void); + OSStatus (*pLSSetApplicationInformationItem)(int, + CFTypeRef, + CFStringRef, + CFStringRef, + CFDictionaryRef*); + void* application_services_handle; + void* core_foundation_handle; CFBundleRef launch_services_bundle; - LSGetCurrentApplicationASNType ls_get_current_application_asn; - LSSetApplicationInformationItemType ls_set_application_information_item; CFStringRef* display_name_key; ProcessSerialNumber psn; CFTypeRef asn; - CFStringRef display_name; - OSStatus err; + int err; + + err = -ENOENT; + application_services_handle = dlopen("/System/Library/Frameworks/" + "ApplicationServices.framework/" + "Versions/A/ApplicationServices", + RTLD_LAZY | RTLD_LOCAL); + core_foundation_handle = dlopen("/System/Library/Frameworks/" + "CoreFoundation.framework/" + "Versions/A/CoreFoundation", + RTLD_LAZY | RTLD_LOCAL); + + if (application_services_handle == NULL || core_foundation_handle == NULL) + goto out; + + pGetCurrentProcess = + dlsym(application_services_handle, "GetCurrentProcess"); + pCFStringCreateWithCString = + dlsym(core_foundation_handle, "CFStringCreateWithCString"); + pCFBundleGetBundleWithIdentifier = + dlsym(core_foundation_handle, "CFBundleGetBundleWithIdentifier"); + pCFBundleGetDataPointerForName = + dlsym(core_foundation_handle, "CFBundleGetDataPointerForName"); + pCFBundleGetFunctionPointerForName = + dlsym(core_foundation_handle, "CFBundleGetFunctionPointerForName"); + + if (pGetCurrentProcess == NULL || + pCFStringCreateWithCString == NULL || + pCFBundleGetBundleWithIdentifier == NULL || + pCFBundleGetDataPointerForName == NULL || + pCFBundleGetFunctionPointerForName == NULL) { + goto out; + } + +#define S(s) pCFStringCreateWithCString(NULL, (s), kCFStringEncodingUTF8) launch_services_bundle = - CFBundleGetBundleWithIdentifier(CFSTR("com.apple.LaunchServices")); + pCFBundleGetBundleWithIdentifier(S("com.apple.LaunchServices")); if (launch_services_bundle == NULL) - return -ENOENT; + goto out; - ls_get_current_application_asn = (LSGetCurrentApplicationASNType) - CFBundleGetFunctionPointerForName(launch_services_bundle, - CFSTR("_LSGetCurrentApplicationASN")); + pLSGetCurrentApplicationASN = + pCFBundleGetFunctionPointerForName(launch_services_bundle, + S("_LSGetCurrentApplicationASN")); - if (ls_get_current_application_asn == NULL) - return -ENOENT; + if (pLSGetCurrentApplicationASN == NULL) + goto out; - ls_set_application_information_item = (LSSetApplicationInformationItemType) - CFBundleGetFunctionPointerForName(launch_services_bundle, - CFSTR("_LSSetApplicationInformationItem")); + pLSSetApplicationInformationItem = + pCFBundleGetFunctionPointerForName(launch_services_bundle, + S("_LSSetApplicationInformationItem")); - if (ls_set_application_information_item == NULL) - return -ENOENT; + if (pLSSetApplicationInformationItem == NULL) + goto out; - display_name_key = CFBundleGetDataPointerForName(launch_services_bundle, - CFSTR("_kLSDisplayNameKey")); + display_name_key = pCFBundleGetDataPointerForName(launch_services_bundle, + S("_kLSDisplayNameKey")); if (display_name_key == NULL || *display_name_key == NULL) - return -ENOENT; + goto out; /* Force the process manager to initialize. */ - GetCurrentProcess(&psn); - - display_name = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8); - asn = ls_get_current_application_asn(); - err = ls_set_application_information_item(-2, /* Magic value. */ - asn, - *display_name_key, - display_name, - NULL); - if (err != noErr) - return -ENOENT; + pGetCurrentProcess(&psn); + + asn = pLSGetCurrentApplicationASN(); + + err = -EINVAL; + if (pLSSetApplicationInformationItem(-2, /* Magic value. */ + asn, + *display_name_key, + S(title), + NULL) != noErr) { + goto out; + } uv__pthread_setname_np(title); /* Don't care if it fails. */ + err = 0; - return 0; +out: + if (core_foundation_handle != NULL) + dlclose(core_foundation_handle); + + if (application_services_handle != NULL) + dlclose(application_services_handle); + + return err; #endif /* !TARGET_OS_IPHONE */ } diff --git a/deps/uv/src/unix/fsevents.c b/deps/uv/src/unix/fsevents.c index 4d5e87fe5..e7a493efb 100644 --- a/deps/uv/src/unix/fsevents.c +++ b/deps/uv/src/unix/fsevents.c @@ -40,6 +40,7 @@ void uv__fsevents_loop_delete(uv_loop_t* loop) { #else /* TARGET_OS_IPHONE */ +#include <dlfcn.h> #include <assert.h> #include <stdlib.h> #include <pthread.h> @@ -47,6 +48,27 @@ void uv__fsevents_loop_delete(uv_loop_t* loop) { #include <CoreFoundation/CFRunLoop.h> #include <CoreServices/CoreServices.h> +/* These are macros to avoid "initializer element is not constant" errors + * with old versions of gcc. + */ +#define kFSEventsModified (kFSEventStreamEventFlagItemFinderInfoMod | \ + kFSEventStreamEventFlagItemModified | \ + kFSEventStreamEventFlagItemInodeMetaMod | \ + kFSEventStreamEventFlagItemChangeOwner | \ + kFSEventStreamEventFlagItemXattrMod) + +#define kFSEventsRenamed (kFSEventStreamEventFlagItemCreated | \ + kFSEventStreamEventFlagItemRemoved | \ + kFSEventStreamEventFlagItemRenamed) + +#define kFSEventsSystem (kFSEventStreamEventFlagUserDropped | \ + kFSEventStreamEventFlagKernelDropped | \ + kFSEventStreamEventFlagEventIdsWrapped | \ + kFSEventStreamEventFlagHistoryDone | \ + kFSEventStreamEventFlagMount | \ + kFSEventStreamEventFlagUnmount | \ + kFSEventStreamEventFlagRootChanged) + typedef struct uv__fsevents_event_s uv__fsevents_event_t; typedef struct uv__cf_loop_signal_s uv__cf_loop_signal_t; typedef struct uv__cf_loop_state_s uv__cf_loop_state_t; @@ -73,27 +95,52 @@ struct uv__fsevents_event_s { char path[1]; }; -static const int kFSEventsModified = kFSEventStreamEventFlagItemFinderInfoMod | - kFSEventStreamEventFlagItemModified | - kFSEventStreamEventFlagItemInodeMetaMod | - kFSEventStreamEventFlagItemChangeOwner | - kFSEventStreamEventFlagItemXattrMod; -static const int kFSEventsRenamed = kFSEventStreamEventFlagItemCreated | - kFSEventStreamEventFlagItemRemoved | - kFSEventStreamEventFlagItemRenamed; -static const int kFSEventsSystem = kFSEventStreamEventFlagUserDropped | - kFSEventStreamEventFlagKernelDropped | - kFSEventStreamEventFlagEventIdsWrapped | - kFSEventStreamEventFlagHistoryDone | - kFSEventStreamEventFlagMount | - kFSEventStreamEventFlagUnmount | - kFSEventStreamEventFlagRootChanged; - /* Forward declarations */ static void uv__cf_loop_cb(void* arg); static void* uv__cf_loop_runner(void* arg); static int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle); +/* Lazy-loaded by uv__fsevents_global_init(). */ +static CFArrayRef (*pCFArrayCreate)(CFAllocatorRef, + const void**, + CFIndex, + const CFArrayCallBacks*); +static void (*pCFRelease)(CFTypeRef); +static void (*pCFRunLoopAddSource)(CFRunLoopRef, + CFRunLoopSourceRef, + CFStringRef); +static CFRunLoopRef (*pCFRunLoopGetCurrent)(void); +static void (*pCFRunLoopRemoveSource)(CFRunLoopRef, + CFRunLoopSourceRef, + CFStringRef); +static void (*pCFRunLoopRun)(void); +static CFRunLoopSourceRef (*pCFRunLoopSourceCreate)(CFAllocatorRef, + CFIndex, + CFRunLoopSourceContext*); +static void (*pCFRunLoopSourceSignal)(CFRunLoopSourceRef); +static void (*pCFRunLoopStop)(CFRunLoopRef); +static void (*pCFRunLoopWakeUp)(CFRunLoopRef); +static CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef, + const char*, + CFStringEncoding); +static CFStringEncoding (*pCFStringGetSystemEncoding)(void); +static CFStringRef (*pkCFRunLoopDefaultMode); +static FSEventStreamRef (*pFSEventStreamCreate)(CFAllocatorRef, + FSEventStreamCallback, + FSEventStreamContext*, + CFArrayRef, + FSEventStreamEventId, + CFTimeInterval, + FSEventStreamCreateFlags); +static void (*pFSEventStreamFlushSync)(FSEventStreamRef); +static void (*pFSEventStreamInvalidate)(FSEventStreamRef); +static void (*pFSEventStreamRelease)(FSEventStreamRef); +static void (*pFSEventStreamScheduleWithRunLoop)(FSEventStreamRef, + CFRunLoopRef, + CFStringRef); +static Boolean (*pFSEventStreamStart)(FSEventStreamRef); +static void (*pFSEventStreamStop)(FSEventStreamRef); + #define UV__FSEVENTS_PROCESS(handle, block) \ do { \ uv__fsevents_event_t* event; \ @@ -256,20 +303,20 @@ static void uv__fsevents_create_stream(uv_loop_t* loop, CFArrayRef paths) { * that is being watched now. Which will cause FSEventStream API to report * changes to files from the past. */ - ref = FSEventStreamCreate(NULL, - &uv__fsevents_event_cb, - &ctx, - paths, - kFSEventStreamEventIdSinceNow, - latency, - flags); + ref = pFSEventStreamCreate(NULL, + &uv__fsevents_event_cb, + &ctx, + paths, + kFSEventStreamEventIdSinceNow, + latency, + flags); assert(ref != NULL); state = loop->cf_state; - FSEventStreamScheduleWithRunLoop(ref, - state->loop, - kCFRunLoopDefaultMode); - if (!FSEventStreamStart(ref)) + pFSEventStreamScheduleWithRunLoop(ref, + state->loop, + *pkCFRunLoopDefaultMode); + if (!pFSEventStreamStart(ref)) abort(); state->fsevent_stream = ref; @@ -286,14 +333,14 @@ static void uv__fsevents_destroy_stream(uv_loop_t* loop) { return; /* Flush all accumulated events */ - FSEventStreamFlushSync(state->fsevent_stream); + pFSEventStreamFlushSync(state->fsevent_stream); /* Stop emitting events */ - FSEventStreamStop(state->fsevent_stream); + pFSEventStreamStop(state->fsevent_stream); /* Release stream */ - FSEventStreamInvalidate(state->fsevent_stream); - FSEventStreamRelease(state->fsevent_stream); + pFSEventStreamInvalidate(state->fsevent_stream); + pFSEventStreamRelease(state->fsevent_stream); state->fsevent_stream = NULL; } @@ -335,9 +382,9 @@ static void uv__fsevents_reschedule(uv_fs_event_t* handle) { curr = QUEUE_DATA(q, uv_fs_event_t, cf_member); assert(curr->realpath != NULL); - paths[i] = CFStringCreateWithCString(NULL, - curr->realpath, - CFStringGetSystemEncoding()); + paths[i] = pCFStringCreateWithCString(NULL, + curr->realpath, + pCFStringGetSystemEncoding()); if (paths[i] == NULL) abort(); } @@ -346,7 +393,7 @@ static void uv__fsevents_reschedule(uv_fs_event_t* handle) { if (path_count != 0) { /* Create new FSEventStream */ - cf_paths = CFArrayCreate(NULL, (const void**) paths, path_count, NULL); + cf_paths = pCFArrayCreate(NULL, (const void**) paths, path_count, NULL); if (cf_paths == NULL) abort(); uv__fsevents_create_stream(handle->loop, cf_paths); @@ -363,6 +410,84 @@ static void uv__fsevents_reschedule(uv_fs_event_t* handle) { } +static int uv__fsevents_global_init(void) { + static pthread_mutex_t global_init_mutex = PTHREAD_MUTEX_INITIALIZER; + static void* core_foundation_handle; + static void* core_services_handle; + int err; + + err = 0; + pthread_mutex_lock(&global_init_mutex); + if (core_foundation_handle != NULL) + goto out; + + /* The libraries are never unloaded because we currently don't have a good + * mechanism for keeping a reference count. It's unlikely to be an issue + * but if it ever becomes one, we can turn the dynamic library handles into + * per-event loop properties and have the dynamic linker keep track for us. + */ + err = -ENOSYS; + core_foundation_handle = dlopen("/System/Library/Frameworks/" + "CoreFoundation.framework/" + "Versions/A/CoreFoundation", + RTLD_LAZY | RTLD_LOCAL); + if (core_foundation_handle == NULL) + goto out; + + core_services_handle = dlopen("/System/Library/Frameworks/" + "CoreServices.framework/" + "Versions/A/CoreServices", + RTLD_LAZY | RTLD_LOCAL); + if (core_services_handle == NULL) + goto out; + + err = -ENOENT; +#define V(handle, symbol) \ + do { \ + p ## symbol = dlsym((handle), #symbol); \ + if (p ## symbol == NULL) \ + goto out; \ + } \ + while (0) + V(core_foundation_handle, CFArrayCreate); + V(core_foundation_handle, CFRelease); + V(core_foundation_handle, CFRunLoopAddSource); + V(core_foundation_handle, CFRunLoopGetCurrent); + V(core_foundation_handle, CFRunLoopRemoveSource); + V(core_foundation_handle, CFRunLoopRun); + V(core_foundation_handle, CFRunLoopSourceCreate); + V(core_foundation_handle, CFRunLoopSourceSignal); + V(core_foundation_handle, CFRunLoopStop); + V(core_foundation_handle, CFRunLoopWakeUp); + V(core_foundation_handle, CFStringCreateWithCString); + V(core_foundation_handle, CFStringGetSystemEncoding); + V(core_foundation_handle, kCFRunLoopDefaultMode); + V(core_services_handle, FSEventStreamCreate); + V(core_services_handle, FSEventStreamFlushSync); + V(core_services_handle, FSEventStreamInvalidate); + V(core_services_handle, FSEventStreamRelease); + V(core_services_handle, FSEventStreamScheduleWithRunLoop); + V(core_services_handle, FSEventStreamStart); + V(core_services_handle, FSEventStreamStop); +#undef V + err = 0; + +out: + if (err && core_services_handle != NULL) { + dlclose(core_services_handle); + core_services_handle = NULL; + } + + if (err && core_foundation_handle != NULL) { + dlclose(core_foundation_handle); + core_foundation_handle = NULL; + } + + pthread_mutex_unlock(&global_init_mutex); + return err; +} + + /* Runs in UV loop */ static int uv__fsevents_loop_init(uv_loop_t* loop) { CFRunLoopSourceContext ctx; @@ -374,6 +499,10 @@ static int uv__fsevents_loop_init(uv_loop_t* loop) { if (loop->cf_state != NULL) return 0; + err = uv__fsevents_global_init(); + if (err) + return err; + state = calloc(1, sizeof(*state)); if (state == NULL) return -ENOMEM; @@ -403,7 +532,7 @@ static int uv__fsevents_loop_init(uv_loop_t* loop) { memset(&ctx, 0, sizeof(ctx)); ctx.info = loop; ctx.perform = uv__cf_loop_cb; - state->signal_source = CFRunLoopSourceCreate(NULL, 0, &ctx); + state->signal_source = pCFRunLoopSourceCreate(NULL, 0, &ctx); if (state->signal_source == NULL) { err = -ENOMEM; goto fail_signal_source_create; @@ -483,7 +612,7 @@ void uv__fsevents_loop_delete(uv_loop_t* loop) { state = loop->cf_state; uv_sem_destroy(&state->fsevent_sem); uv_mutex_destroy(&state->fsevent_mutex); - CFRelease(state->signal_source); + pCFRelease(state->signal_source); free(state); loop->cf_state = NULL; } @@ -496,18 +625,18 @@ static void* uv__cf_loop_runner(void* arg) { loop = arg; state = loop->cf_state; - state->loop = CFRunLoopGetCurrent(); + state->loop = pCFRunLoopGetCurrent(); - CFRunLoopAddSource(state->loop, - state->signal_source, - kCFRunLoopDefaultMode); + pCFRunLoopAddSource(state->loop, + state->signal_source, + *pkCFRunLoopDefaultMode); uv_sem_post(&loop->cf_sem); - CFRunLoopRun(); - CFRunLoopRemoveSource(state->loop, - state->signal_source, - kCFRunLoopDefaultMode); + pCFRunLoopRun(); + pCFRunLoopRemoveSource(state->loop, + state->signal_source, + *pkCFRunLoopDefaultMode); return NULL; } @@ -539,7 +668,7 @@ static void uv__cf_loop_cb(void* arg) { /* This was a termination signal */ if (s->handle == NULL) - CFRunLoopStop(state->loop); + pCFRunLoopStop(state->loop); else uv__fsevents_reschedule(s->handle); @@ -566,8 +695,8 @@ int uv__cf_loop_signal(uv_loop_t* loop, uv_fs_event_t* handle) { state = loop->cf_state; assert(state != NULL); - CFRunLoopSourceSignal(state->signal_source); - CFRunLoopWakeUp(state->loop); + pCFRunLoopSourceSignal(state->signal_source); + pCFRunLoopWakeUp(state->loop); return 0; } diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h index 8559e3318..67c847bae 100644 --- a/deps/uv/src/unix/internal.h +++ b/deps/uv/src/unix/internal.h @@ -150,8 +150,6 @@ int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb); void uv__async_stop(uv_loop_t* loop, struct uv__async* wa); /* loop */ -int uv__loop_init(uv_loop_t* loop, int default_loop); -void uv__loop_delete(uv_loop_t* loop); void uv__run_idle(uv_loop_t* loop); void uv__run_check(uv_loop_t* loop); void uv__run_prepare(uv_loop_t* loop); diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c index 1ed5b8deb..4c10f0f37 100644 --- a/deps/uv/src/unix/loop.c +++ b/deps/uv/src/unix/loop.c @@ -26,8 +26,54 @@ #include <string.h> #include <unistd.h> +static int uv__loop_init(uv_loop_t* loop, int default_loop); +static void uv__loop_delete(uv_loop_t* loop); -int uv__loop_init(uv_loop_t* loop, int default_loop) { +static uv_loop_t default_loop_struct; +static uv_loop_t* default_loop_ptr; + + +uv_loop_t* uv_default_loop(void) { + if (default_loop_ptr != NULL) + return default_loop_ptr; + + if (uv__loop_init(&default_loop_struct, /* default_loop? */ 1)) + return NULL; + + default_loop_ptr = &default_loop_struct; + return default_loop_ptr; +} + + +uv_loop_t* uv_loop_new(void) { + uv_loop_t* loop; + + loop = malloc(sizeof(*loop)); + if (loop == NULL) + return NULL; + + if (uv__loop_init(loop, /* default_loop? */ 0)) { + free(loop); + return NULL; + } + + return loop; +} + + +void uv_loop_delete(uv_loop_t* loop) { + uv__loop_delete(loop); +#ifndef NDEBUG + memset(loop, -1, sizeof(*loop)); +#endif + if (loop == default_loop_ptr) + default_loop_ptr = NULL; + else + free(loop); +} + + +static int uv__loop_init(uv_loop_t* loop, int default_loop) { unsigned int i; int err; @@ -84,7 +130,7 @@ int uv__loop_init(uv_loop_t* loop, int default_loop) { } -void uv__loop_delete(uv_loop_t* loop) { +static void uv__loop_delete(uv_loop_t* loop) { uv__signal_loop_cleanup(loop); uv__platform_loop_delete(loop); uv__async_stop(loop, &loop->async_watcher); @@ -101,6 +147,7 @@ void uv__loop_delete(uv_loop_t* loop) { uv_mutex_lock(&loop->wq_mutex); assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!"); + assert(!uv__has_active_reqs(loop)); uv_mutex_unlock(&loop->wq_mutex); uv_mutex_destroy(&loop->wq_mutex); diff --git a/deps/uv/src/unix/thread.c b/deps/uv/src/unix/thread.c index e0238aefa..8c38c7f14 100644 --- a/deps/uv/src/unix/thread.c +++ b/deps/uv/src/unix/thread.c @@ -441,3 +441,24 @@ void uv_barrier_wait(uv_barrier_t* barrier) { } #endif /* defined(__APPLE__) && defined(__MACH__) */ + +int uv_key_create(uv_key_t* key) { + return -pthread_key_create(key, NULL); +} + + +void uv_key_delete(uv_key_t* key) { + if (pthread_key_delete(*key)) + abort(); +} + + +void* uv_key_get(uv_key_t* key) { + return pthread_getspecific(*key); +} + + +void uv_key_set(uv_key_t* key, void* value) { + if (pthread_setspecific(*key, value)) + abort(); +} diff --git a/deps/uv/src/unix/udp.c b/deps/uv/src/unix/udp.c index 4a545d72a..1413985ba 100644 --- a/deps/uv/src/unix/udp.c +++ b/deps/uv/src/unix/udp.c @@ -280,40 +280,18 @@ static void uv__udp_sendmsg(uv_loop_t* loop, } -/* On the BSDs, SO_REUSEPORT implies SO_REUSEADDR but it also lets you share - * the address and port with other processes. +/* On the BSDs, SO_REUSEPORT implies SO_REUSEADDR but with some additional + * refinements for programs that use multicast. * * Linux as of 3.9 has a SO_REUSEPORT socket option but with semantics that - * are different from the BSDs. The address:port sharing part is taken care - * of by SO_REUSEADDR while SO_REUSEPORT enables fair load distribution. (If - * you wonder why you need to explicitly enable that, well, it's complicated.) - * - * Because we cannot rely on SO_REUSEPORT being available on Linux, it's not - * considered an error when the setsockopt() system call fails. Worst case, - * the program has sub-optimal load distribution characteristics but should - * otherwise run fine. + * are different from the BSDs: it _shares_ the port rather than steal it + * from the current listener. While useful, it's not something we can emulate + * on other platforms so we don't enable it. */ static int uv__set_reuse(int fd) { int yes; -#if defined(__linux__) - static int no_so_reuseport; - - if (no_so_reuseport) - goto no_so_reuseport; - - yes = 1; - if (setsockopt(fd, SOL_SOCKET, 15 /* SO_REUSEPORT */, &yes, sizeof(yes))) { - if (errno != EINVAL && errno != ENOPROTOOPT) - return -errno; - no_so_reuseport = 1; - } - -no_so_reuseport: - yes = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes))) - return -errno; -#elif defined(SO_REUSEPORT) +#if defined(SO_REUSEPORT) && !defined(__linux__) yes = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes))) return -errno; diff --git a/deps/uv/src/version.c b/deps/uv/src/version.c index bba3d764e..c15506de6 100644 --- a/deps/uv/src/version.c +++ b/deps/uv/src/version.c @@ -31,7 +31,7 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 11 -#define UV_VERSION_PATCH 10 +#define UV_VERSION_PATCH 11 #define UV_VERSION_IS_RELEASE 1 diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c index 23d328641..586adbfed 100644 --- a/deps/uv/src/win/pipe.c +++ b/deps/uv/src/win/pipe.c @@ -1594,9 +1594,9 @@ void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle, UNREGISTER_HANDLE_REQ(loop, handle, req); - /* Initialize and optionally start the eof timer. */ - /* This makes no sense if we've already seen EOF. */ if (handle->flags & UV_HANDLE_READABLE) { + /* Initialize and optionally start the eof timer. Only do this if the */ + /* pipe is readable and we haven't seen EOF come in ourselves. */ eof_timer_init(handle); /* If reading start the timer right now. */ @@ -1604,6 +1604,12 @@ void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle, if (handle->flags & UV_HANDLE_READ_PENDING) { eof_timer_start(handle); } + + } else { + /* This pipe is not readable. We can just close it to let the other end */ + /* know that we're done writing. */ + CloseHandle(handle->handle); + handle->handle = INVALID_HANDLE_VALUE; } if (req->cb) { diff --git a/deps/uv/src/win/process-stdio.c b/deps/uv/src/win/process-stdio.c index 51c56b225..612f6be9a 100644 --- a/deps/uv/src/win/process-stdio.c +++ b/deps/uv/src/win/process-stdio.c @@ -104,12 +104,16 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop, int err; if (flags & UV_READABLE_PIPE) { - server_access |= PIPE_ACCESS_OUTBOUND; + /* The server needs inbound access too, otherwise CreateNamedPipe() */ + /* won't give us the FILE_READ_ATTRIBUTES permission. We need that to */ + /* probe the state of the write buffer when we're trying to shutdown */ + /* the pipe. */ + server_access |= PIPE_ACCESS_OUTBOUND | PIPE_ACCESS_INBOUND; client_access |= GENERIC_READ | FILE_WRITE_ATTRIBUTES; } if (flags & UV_WRITABLE_PIPE) { server_access |= PIPE_ACCESS_INBOUND; - client_access |= GENERIC_WRITE; + client_access |= GENERIC_WRITE | FILE_READ_ATTRIBUTES; } /* Create server pipe handle. */ @@ -163,8 +167,11 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop, } } - /* The server end is now readable and writable. */ - server_pipe->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE; + /* The server end is now readable and/or writable. */ + if (flags & UV_READABLE_PIPE) + server_pipe->flags |= UV_HANDLE_WRITABLE; + if (flags & UV_WRITABLE_PIPE) + server_pipe->flags |= UV_HANDLE_READABLE; *child_pipe_ptr = child_pipe; return 0; diff --git a/deps/uv/src/win/thread.c b/deps/uv/src/win/thread.c index e5eb70186..0631da5af 100644 --- a/deps/uv/src/win/thread.c +++ b/deps/uv/src/win/thread.c @@ -680,3 +680,36 @@ void uv_barrier_wait(uv_barrier_t* barrier) { uv_sem_wait(&barrier->turnstile2); uv_sem_post(&barrier->turnstile2); } + + +int uv_key_create(uv_key_t* key) { + key->tls_index = TlsAlloc(); + if (key->tls_index == TLS_OUT_OF_INDEXES) + return UV_ENOMEM; + return 0; +} + + +void uv_key_delete(uv_key_t* key) { + if (TlsFree(key->tls_index) == FALSE) + abort(); + key->tls_index = TLS_OUT_OF_INDEXES; +} + + +void* uv_key_get(uv_key_t* key) { + void* value; + + value = TlsGetValue(key->tls_index); + if (value == NULL) + if (GetLastError() != ERROR_SUCCESS) + abort(); + + return value; +} + + +void uv_key_set(uv_key_t* key, void* value) { + if (TlsSetValue(key->tls_index, value) == FALSE) + abort(); +} diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index 51a3eb636..b1cf0a9e8 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4104,6 +4104,10 @@ # define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000 #endif +#ifndef DEVICE_TYPE +# define DEVICE_TYPE DWORD +#endif + /* from ntifs.h */ /* MinGW already has it, mingw-w64 does not. */ #if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) @@ -4383,10 +4387,6 @@ typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { # define SystemProcessorPerformanceInformation 8 #endif -#ifndef DEVICE_TYPE -# define DEVICE_TYPE DWORD -#endif - #ifndef FILE_DEVICE_FILE_SYSTEM # define FILE_DEVICE_FILE_SYSTEM 0x00000009 #endif diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index feca46700..334b48322 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -203,6 +203,7 @@ TEST_DECLARE (threadpool_cancel_getaddrinfo) TEST_DECLARE (threadpool_cancel_work) TEST_DECLARE (threadpool_cancel_fs) TEST_DECLARE (threadpool_cancel_single) +TEST_DECLARE (thread_local_storage) TEST_DECLARE (thread_mutex) TEST_DECLARE (thread_rwlock) TEST_DECLARE (thread_create) @@ -496,6 +497,7 @@ TASK_LIST_START TEST_ENTRY (threadpool_cancel_work) TEST_ENTRY (threadpool_cancel_fs) TEST_ENTRY (threadpool_cancel_single) + TEST_ENTRY (thread_local_storage) TEST_ENTRY (thread_mutex) TEST_ENTRY (thread_rwlock) TEST_ENTRY (thread_create) diff --git a/deps/uv/test/test-thread.c b/deps/uv/test/test-thread.c index 4bec8428f..c396baa10 100644 --- a/deps/uv/test/test-thread.c +++ b/deps/uv/test/test-thread.c @@ -55,6 +55,7 @@ static void fs_do(struct fs_req* req); static void fs_cb(uv_fs_t* handle); static volatile int thread_called; +static uv_key_t tls_key; static void getaddrinfo_do(struct getaddrinfo_req* req) { @@ -181,3 +182,28 @@ TEST_IMPL(threadpool_multiple_event_loops) { return 0; } + + +static void tls_thread(void* arg) { + ASSERT(NULL == uv_key_get(&tls_key)); + uv_key_set(&tls_key, arg); + ASSERT(arg == uv_key_get(&tls_key)); + uv_key_set(&tls_key, NULL); + ASSERT(NULL == uv_key_get(&tls_key)); +} + + +TEST_IMPL(thread_local_storage) { + char name[] = "main"; + uv_thread_t threads[2]; + ASSERT(0 == uv_key_create(&tls_key)); + ASSERT(NULL == uv_key_get(&tls_key)); + uv_key_set(&tls_key, name); + ASSERT(name == uv_key_get(&tls_key)); + ASSERT(0 == uv_thread_create(threads + 0, tls_thread, threads + 0)); + ASSERT(0 == uv_thread_create(threads + 1, tls_thread, threads + 1)); + ASSERT(0 == uv_thread_join(threads + 0)); + ASSERT(0 == uv_thread_join(threads + 1)); + uv_key_delete(&tls_key); + return 0; +} diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index da254a1ab..3c662438b 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -15,7 +15,6 @@ 'defines': [ '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64', - '_GNU_SOURCE', ], 'conditions': [ ['OS=="solaris"', { @@ -187,13 +186,6 @@ 'src/unix/fsevents.c', 'src/unix/darwin-proctitle.c', ], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework', - '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', - ], - }, 'defines': [ '_DARWIN_USE_64_BIT_INODE=1', ] |