[108257] trunk/base/src/pextlib1.0/tracelib.c

cal at macports.org cal at macports.org
Wed Jul 17 03:52:00 PDT 2013


Revision: 108257
          https://trac.macports.org/changeset/108257
Author:   cal at macports.org
Date:     2013-07-17 03:52:00 -0700 (Wed, 17 Jul 2013)
Log Message:
-----------
tracelib: make tracelib a nop on non-apple platforms

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-07-17 10:49:53 UTC (rev 108256)
+++ trunk/base/src/pextlib1.0/tracelib.c	2013-07-17 10:52:00 UTC (rev 108257)
@@ -63,6 +63,7 @@
 
 #include "strlcat.h"
 
+#ifdef __APPLE__
 #ifndef HAVE_STRLCPY
 /* Define strlcpy if it's not available. */
 size_t strlcpy(char *dst, const char *src, size_t size);
@@ -877,6 +878,7 @@
     filemap = 0;
     return TCL_OK;
 }
+#endif /* __APPLE__ */
 
 int TracelibCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
     int result = TCL_OK;
@@ -899,6 +901,7 @@
         return TCL_ERROR;
     }
 
+#ifdef __APPLE__
     result = Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *)&current_option);
     if (result == TCL_OK) {
         switch (current_option) {
@@ -928,6 +931,10 @@
                 break;
         }
     }
+#else /* __APPLE__ */
+    Tcl_SetResult(in, "tracelib not supported on this platform", TCL_STATIC);
+    result = TCL_ERROR;
+#endif /* __APPLE__ */
 
     return result;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130717/dc0c0ba8/attachment.html>


More information about the macports-changes mailing list