diff options
Diffstat (limited to 'Utilities/cmlibuv/src/unix/darwin-proctitle.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/darwin-proctitle.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Utilities/cmlibuv/src/unix/darwin-proctitle.c b/Utilities/cmlibuv/src/unix/darwin-proctitle.c index 1142311..dabde22 100644 --- a/Utilities/cmlibuv/src/unix/darwin-proctitle.c +++ b/Utilities/cmlibuv/src/unix/darwin-proctitle.c @@ -18,6 +18,9 @@ * IN THE SOFTWARE. */ +#include "uv.h" +#include "internal.h" + #include <dlfcn.h> #include <errno.h> #include <stdlib.h> @@ -41,14 +44,14 @@ static int uv__pthread_setname_np(const char* name) { dlsym(RTLD_DEFAULT, "pthread_setname_np"); if (dynamic_pthread_setname_np == NULL) - return -ENOSYS; + return UV_ENOSYS; strncpy(namebuf, name, sizeof(namebuf) - 1); namebuf[sizeof(namebuf) - 1] = '\0'; err = dynamic_pthread_setname_np(namebuf); if (err) - return -err; + return UV__ERR(err); return 0; } @@ -84,7 +87,7 @@ int uv__set_process_title(const char* title) { CFTypeRef asn; int err; - err = -ENOENT; + err = UV_ENOENT; application_services_handle = dlopen("/System/Library/Frameworks/" "ApplicationServices.framework/" "Versions/A/ApplicationServices", @@ -151,7 +154,7 @@ int uv__set_process_title(const char* title) { /* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */ hi_services_bundle = pCFBundleGetBundleWithIdentifier(S("com.apple.HIServices")); - err = -ENOENT; + err = UV_ENOENT; if (hi_services_bundle == NULL) goto out; @@ -182,7 +185,7 @@ int uv__set_process_title(const char* title) { asn = pLSGetCurrentApplicationASN(); - err = -EINVAL; + err = UV_EINVAL; if (pLSSetApplicationInformationItem(-2, /* Magic value. */ asn, *display_name_key, |