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

cal at macports.org cal at macports.org
Wed Jul 10 17:05:57 PDT 2013


Revision: 108034
          https://trac.macports.org/changeset/108034
Author:   cal at macports.org
Date:     2013-07-10 17:05:57 -0700 (Wed, 10 Jul 2013)
Log Message:
-----------
tracelib: switch to uint32_t size headers in the communication protocol

this ensures compatibility with both 32bit and 64bit guests, regardless of
their size of size_t.

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-11 00:04:34 UTC (rev 108033)
+++ trunk/base/src/pextlib1.0/tracelib.c	2013-07-11 00:05:57 UTC (rev 108034)
@@ -242,7 +242,7 @@
 static int process_line(int sock) {
     char *f;
     char buf[BUFSIZE];
-    size_t len;
+    uint32_t len;
     ssize_t ret;
 
     if ((ret = recv(sock, &len, sizeof(len), MSG_WAITALL)) != sizeof(len)) {
@@ -362,11 +362,7 @@
 #       undef append_allow
     }
 
-    {
-        size_t s = filemap_end - filemap;
-        send(sock, &s, sizeof(s), 0);
-        send(sock, filemap, s, 0);
-    }
+    answer_s(sock, filemap, filemap_end - filemap);
 }
 
 /**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130710/ac38ab45/attachment.html>


More information about the macports-changes mailing list