[MacPorts] #55415: cmake @3.10.1 does not build on PPC Tiger, Mac OS X 10.4.11, due to various issues building libuv
MacPorts
noreply at macports.org
Tue Mar 20 23:07:58 UTC 2018
#55415: cmake @3.10.1 does not build on PPC Tiger, Mac OS X 10.4.11, due to various
issues building libuv
------------------------+-----------------------
Reporter: ballapete | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.2
Resolution: | Keywords: tiger
Port: cmake |
------------------------+-----------------------
Comment (by ballapete):
Replying to [comment:23 ballapete]:
> Replying to [comment:2 kencu]:
>
> The original funtion in cmake-3.10.0/Utilities/cmlibuv/src/unix/core.c
is:
>
> {{{
> int uv_os_unsetenv(const char* name) {
> if (unsetenv(name) != 0)
> return -errno;
>
> return 0;
> }
> }}}
>
Isn't the following equivalent?
{{{
int uv_os_unsetenv(const char* name) {
unsetenv(name);
/* in old libc (Mac OS X 10.4) unsetenv() returns void, so let's check
success "manually" */
if (getenv(name) != NULL) /* name still exists in environment */
return -errno;
return 0; /* successful elimination */
}
}}}
So the improved patch (who knows all side effects of #defining
`__DARWIN_UNIX03`?) would be:
{{{
int uv_os_unsetenv(const char* name) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
if (unsetenv(name) != 0)
return -errno;
-
+#else
+ unsetenv(name);
+ if (getenv(name) != NULL) /* if name still exists in environment,
then no NULL pointer */
+ return -errno;
+#endif
return 0;
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/55415#comment:25>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list