[107865] trunk/base/src

cal at macports.org cal at macports.org
Sun Jul 7 16:03:34 PDT 2013


Revision: 107865
          https://trac.macports.org/changeset/107865
Author:   cal at macports.org
Date:     2013-07-07 16:03:34 -0700 (Sun, 07 Jul 2013)
Log Message:
-----------
tracelib: conform to C90

Modified Paths:
--------------
    trunk/base/src/darwintracelib1.0/Makefile
    trunk/base/src/pextlib1.0/tracelib.c

Modified: trunk/base/src/darwintracelib1.0/Makefile
===================================================================
--- trunk/base/src/darwintracelib1.0/Makefile	2013-07-07 22:53:34 UTC (rev 107864)
+++ trunk/base/src/darwintracelib1.0/Makefile	2013-07-07 23:03:34 UTC (rev 107865)
@@ -4,8 +4,11 @@
 
 include ../../Mk/macports.autoconf.mk
 
+ARCHFLAGS=-arch i386 -arch x86_64
 CFLAGS+= -fPIC -Wno-deprecated-declarations -std=c99
+CFLAGS+=${ARCHFLAGS}
 CFLAGS_PEDANTIC=
+SHLIB_LDFLAGS+=${ARCHFLAGS}
 
 all:: ${SHLIB_NAME}
 

Modified: trunk/base/src/pextlib1.0/tracelib.c
===================================================================
--- trunk/base/src/pextlib1.0/tracelib.c	2013-07-07 22:53:34 UTC (rev 107864)
+++ trunk/base/src/pextlib1.0/tracelib.c	2013-07-07 23:03:34 UTC (rev 107865)
@@ -206,13 +206,13 @@
         } else if (ret == 0) {
             /* this usually means the socket was closed by the remote side */
         } else {
-            fprintf(stderr, "tracelib: partial data received: expected %zd, but got %zd on socket %d\n", sizeof(len), ret, sock);
+            fprintf(stderr, "tracelib: partial data received: expected %ld, but got %ld on socket %d\n", (unsigned long) sizeof(len), (unsigned long) ret, sock);
         }
         return 0;
     }
 
     if (len > BUFSIZE - 1) {
-        fprintf(stderr, "tracelib: transfer too large: %zd bytes sent, but buffer holds %zd on socket %d\n", len, BUFSIZE - 1, sock);
+        fprintf(stderr, "tracelib: transfer too large: %ld bytes sent, but buffer holds %d on socket %d\n", (unsigned long) len, (int) (BUFSIZE - 1), sock);
         return 0;
     }
 
@@ -220,7 +220,7 @@
         if (ret < 0) {
             perror("tracelib: recv");
         } else {
-            fprintf(stderr, "tracelib: partial data received: expected %zd, but got %zd on socket %d\n", len, ret, sock);
+            fprintf(stderr, "tracelib: partial data received: expected %ld, but got %ld on socket %d\n", (unsigned long) len, (unsigned long) ret, sock);
         }
         return 0;
     }
@@ -326,6 +326,7 @@
 
 static void dep_check(int sock, char *path) {
     char *port = 0;
+    char *t;
     reg_registry *reg;
     reg_entry entry;
     reg_error error;
@@ -354,7 +355,7 @@
     }
 
     /* check our list of dependencies */
-    for (char *t = depends; *t; t += strlen(t) + 1) {
+    for (t = depends; *t; t += strlen(t) + 1) {
         if (strcmp(t, port) == 0) {
             free(port);
             answer(sock, "+");
@@ -540,6 +541,7 @@
 
     while (sock != -1 && !cleanuping) {
         int keventstatus;
+        int i;
 
         /* run kevent(2) until new activity is available */
         do {
@@ -552,7 +554,7 @@
             }
         } while (keventstatus == 0);
 
-        for (int i = 0; i < keventstatus; ++i) {
+        for (i = 0; i < keventstatus; ++i) {
             /* the control socket has activity – we might have a new
              * connection. We use a copy of sock here, because sock might have
              * been set to -1 by the close command */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130707/b31fb0f7/attachment.html>


More information about the macports-changes mailing list