[113706] trunk/base/src/pextlib1.0/tracelib.c
cal at macports.org
cal at macports.org
Sat Nov 23 08:20:05 PST 2013
Revision: 113706
https://trac.macports.org/changeset/113706
Author: cal at macports.org
Date: 2013-11-23 08:20:05 -0800 (Sat, 23 Nov 2013)
Log Message:
-----------
pextlib1.0: Fix build on PPC Tiger where EV_RECEIPT is not available
Closes #39765 by making trace mode unsupported on systems where kevent(2) does
not support EV_RECEIPT, because supporting using kevent(2) without EV_RECEIPT
would be a huge hassle. Trace mode will fail on these systems when used.
Also removes #if defined(__APPLE__) in a block that's already in #if
defined(__APPLE__).
Modified Paths:
--------------
trunk/base/src/pextlib1.0/tracelib.c
Modified: trunk/base/src/pextlib1.0/tracelib.c
===================================================================
--- trunk/base/src/pextlib1.0/tracelib.c 2013-11-23 16:10:31 UTC (rev 113705)
+++ trunk/base/src/pextlib1.0/tracelib.c 2013-11-23 16:20:05 UTC (rev 113706)
@@ -63,7 +63,7 @@
#include "strlcat.h"
-#ifdef __APPLE__
+#if defined(__APPLE__) && defined(EV_RECEIPT)
#ifndef HAVE_STRLCPY
/* Define strlcpy if it's not available. */
size_t strlcpy(char *dst, const char *src, size_t size);
@@ -513,7 +513,7 @@
if (getrlimit(RLIMIT_NOFILE, &rl) == -1) {
ui_warn("getrlimit failed (%d), skipping setrlimit", errno);
} else {
-#if defined(__APPLE__) && defined(OPEN_MAX)
+#ifdef OPEN_MAX
if (rl.rlim_max > OPEN_MAX) {
rl.rlim_max = OPEN_MAX;
}
@@ -850,7 +850,7 @@
filemap = 0;
return TCL_OK;
}
-#endif /* __APPLE__ */
+#endif /* defined(__APPLE__) && defined(EV_RECEIPT) */
int TracelibCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
int result = TCL_OK;
@@ -873,7 +873,7 @@
return TCL_ERROR;
}
-#ifdef __APPLE__
+#if defined(__APPLE__) && defined(EV_RECEIPT)
result = Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *)¤t_option);
if (result == TCL_OK) {
switch (current_option) {
@@ -903,10 +903,10 @@
break;
}
}
-#else /* __APPLE__ */
+#else /* defined(__APPLE__) && defined(EV_RECEIPT) */
Tcl_SetResult(interp, "tracelib not supported on this platform", TCL_STATIC);
result = TCL_ERROR;
-#endif /* __APPLE__ */
+#endif /* defined(__APPLE__) && defined(EV_RECEIPT) */
return result;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131123/96800e70/attachment.html>
More information about the macports-changes
mailing list