ext/libuv/src/unix/darwin-proctitle.c in libuv-4.0.1 vs ext/libuv/src/unix/darwin-proctitle.c in libuv-4.0.2

- old
+ new

@@ -16,13 +16,10 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#include "uv.h" -#include "internal.h" - #include <dlfcn.h> #include <errno.h> #include <stdlib.h> #include <string.h> @@ -42,18 +39,18 @@ /* pthread_setname_np() first appeared in OS X 10.6 and iOS 3.2. */ *(void **)(&dynamic_pthread_setname_np) = dlsym(RTLD_DEFAULT, "pthread_setname_np"); if (dynamic_pthread_setname_np == NULL) - return UV_ENOSYS; + return -ENOSYS; strncpy(namebuf, name, sizeof(namebuf) - 1); namebuf[sizeof(namebuf) - 1] = '\0'; err = dynamic_pthread_setname_np(namebuf); if (err) - return UV__ERR(err); + return -err; return 0; } @@ -85,11 +82,11 @@ void (*pLSSetApplicationLaunchServicesServerConnectionStatus)(uint64_t, void*); CFTypeRef asn; int err; - err = UV_ENOENT; + 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/" @@ -152,11 +149,11 @@ goto out; /* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */ hi_services_bundle = pCFBundleGetBundleWithIdentifier(S("com.apple.HIServices")); - err = UV_ENOENT; + err = -ENOENT; if (hi_services_bundle == NULL) goto out; *(void **)(&pSetApplicationIsDaemon) = pCFBundleGetFunctionPointerForName( hi_services_bundle, @@ -183,10 +180,10 @@ pLSApplicationCheckIn(-2, pCFBundleGetInfoDictionary(pCFBundleGetMainBundle())); asn = pLSGetCurrentApplicationASN(); - err = UV_EINVAL; + err = -EINVAL; if (pLSSetApplicationInformationItem(-2, /* Magic value. */ asn, *display_name_key, S(title), NULL) != noErr) {