CL does not support "z" format modifier (as in "%zu" or "%zd"). According to [1], "I" should be used instead.
This patch introduces new "TR_PRIuSIZE" (name discussable) define to overcome the issue.
[1] http://msdn.microsoft.com/en-us/library/vstudio/tcxf1dw6.aspx
Index: libtransmission/announcer-http.c
===================================================================
--- libtransmission/announcer-http.c	(revision 14186)
+++ libtransmission/announcer-http.c	(working copy)
@@ -262,18 +262,18 @@
                 response->downloads = i;
 
             if (tr_variantDictFindRaw (&benc, TR_KEY_peers6, &raw, &len)) {
-                dbgmsg (data->log_name, "got a peers6 length of %zu", len);
+                dbgmsg (data->log_name, "got a peers6 length of %"TR_PRIuSIZE, len);
                 response->pex6 = tr_peerMgrCompact6ToPex (raw, len,
                                               NULL, 0, &response->pex6_count);
             }
 
             if (tr_variantDictFindRaw (&benc, TR_KEY_peers, &raw, &len)) {
-                dbgmsg (data->log_name, "got a compact peers length of %zu", len);
+                dbgmsg (data->log_name, "got a compact peers length of %"TR_PRIuSIZE, len);
                 response->pex = tr_peerMgrCompactToPex (raw, len,
                                                NULL, 0, &response->pex_count);
             } else if (tr_variantDictFindList (&benc, TR_KEY_peers, &tmp)) {
                 response->pex = listToPex (tmp, &response->pex_count);
-                dbgmsg (data->log_name, "got a peers list with %zu entries",
+                dbgmsg (data->log_name, "got a peers list with %"TR_PRIuSIZE" entries",
                         response->pex_count);
             }
         }
Index: libtransmission/announcer-udp.c
===================================================================
--- libtransmission/announcer-udp.c	(revision 14186)
+++ libtransmission/announcer-udp.c	(working copy)
@@ -690,7 +690,7 @@
         return;
     }
 
-    dbgmsg (tracker->key, "addr %p -- connected %d (%zu %zu) -- connecting_at %zu",
+    dbgmsg (tracker->key, "addr %p -- connected %d (%"TR_PRIuSIZE" %"TR_PRIuSIZE") -- connecting_at %"TR_PRIuSIZE,
             tracker->addr,
           (int)(tracker->connection_expiration_time > now), (size_t)tracker->connection_expiration_time, (size_t)now,
           (size_t)tracker->connecting_at);
@@ -871,7 +871,7 @@
     tau_transaction_t transaction_id;
     struct evbuffer * buf;
 
-    /*fprintf (stderr, "got an incoming udp message w/len %zu\n", msglen);*/
+    /*fprintf (stderr, "got an incoming udp message w/len %"TR_PRIuSIZE"\n", msglen);*/
 
     if (!session || !session->announcer_udp)
         return false;
Index: libtransmission/announcer.c
===================================================================
--- libtransmission/announcer.c	(revision 14186)
+++ libtransmission/announcer.c	(working copy)
@@ -1035,8 +1035,8 @@
                       "interval:%d "
                       "min_interval:%d "
                       "tracker_id_str:%s "
-                      "pex:%zu "
-                      "pex6:%zu "
+                      "pex:%"TR_PRIuSIZE" "
+                      "pex6:%"TR_PRIuSIZE" "
                       "err:%s "
                       "warn:%s",
                     (int)response->did_connect,
@@ -1287,8 +1287,8 @@
 
     /* schedule a rescrape */
     interval = getRetryInterval (tier->currentTracker);
-    dbgmsg (tier, "Retrying scrape in %zu seconds.", (size_t)interval);
-    tr_logAddTorInfo (tier->tor, "Retrying scrape in %zu seconds.", (size_t)interval);
+    dbgmsg (tier, "Retrying scrape in %"TR_PRIuSIZE" seconds.", (size_t)interval);
+    tr_logAddTorInfo (tier->tor, "Retrying scrape in %"TR_PRIuSIZE" seconds.", (size_t)interval);
     tier->lastScrapeSucceeded = false;
     tier->scrapeAt = get_next_scrape_time (session, tier, interval);
 }
Index: libtransmission/bandwidth.c
===================================================================
--- libtransmission/bandwidth.c	(revision 14186)
+++ libtransmission/bandwidth.c	(working copy)
@@ -395,7 +395,7 @@
 
 #ifdef DEBUG_DIRECTION
 if ((dir == DEBUG_DIRECTION) && (band->isLimited))
-fprintf (stderr, "%p consumed %5zu bytes of %5s data... was %6zu, now %6zu left\n",
+fprintf (stderr, "%p consumed %5"TR_PRIuSIZE" bytes of %5s data... was %6"TR_PRIuSIZE", now %6"TR_PRIuSIZE" left\n",
          b, byteCount, (isPieceData?"piece":"raw"), oldBytesLeft, band->bytesLeft);
 #endif
 
Index: libtransmission/cache.c
===================================================================
--- libtransmission/cache.c	(revision 14186)
+++ libtransmission/cache.c	(working copy)
@@ -96,7 +96,7 @@
         break;
       if (b->tor != ref->tor)
         break;
-      //fprintf (stderr, "pos %d tor %d block %zu time %zu\n", i, b->tor->uniqueId, (size_t)b->block, (size_t)b->time);
+      //fprintf (stderr, "pos %d tor %d block %"TR_PRIuSIZE" time %"TR_PRIuSIZE"\n", i, b->tor->uniqueId, (size_t)b->block, (size_t)b->time);
     }
 
   //fprintf (stderr, "run is %d long from [%d to %d)\n", (int)(i-pos), i, (int)pos);
@@ -441,7 +441,7 @@
 
   tr_torGetFileBlockRange (torrent, i, &first, &last);
   pos = findBlockPos (cache, torrent, first);
-  dbgmsg ("flushing file %d from cache to disk: blocks [%zu...%zu]", (int)i, (size_t)first, (size_t)last);
+  dbgmsg ("flushing file %d from cache to disk: blocks [%"TR_PRIuSIZE"...%"TR_PRIuSIZE"]", (int)i, (size_t)first, (size_t)last);
 
   /* flush out all the blocks in that file */
   while (!err && (pos < tr_ptrArraySize (&cache->blocks)))
Index: libtransmission/handshake.c
===================================================================
--- libtransmission/handshake.c	(revision 14186)
+++ libtransmission/handshake.c	(working copy)
@@ -254,7 +254,7 @@
   tr_torrent * tor;
   uint8_t peer_id[PEER_ID_LEN];
 
-  dbgmsg (handshake, "payload: need %d, got %zu",
+  dbgmsg (handshake, "payload: need %d, got %"TR_PRIuSIZE,
           HANDSHAKE_SIZE, evbuffer_get_length (inbuf));
 
   if (evbuffer_get_length (inbuf) < HANDSHAKE_SIZE)
@@ -565,7 +565,7 @@
 {
   const size_t needlen = handshake->pad_d_len;
 
-  dbgmsg (handshake, "pad d: need %zu, got %zu",
+  dbgmsg (handshake, "pad d: need %"TR_PRIuSIZE", got %"TR_PRIuSIZE,
           needlen, evbuffer_get_length (inbuf));
   if (evbuffer_get_length (inbuf) < needlen)
     return READ_LATER;
@@ -593,7 +593,7 @@
   uint8_t reserved[HANDSHAKE_FLAGS_LEN];
   uint8_t hash[SHA_DIGEST_LENGTH];
 
-  dbgmsg (handshake, "payload: need %d, got %zu",
+  dbgmsg (handshake, "payload: need %d, got %"TR_PRIuSIZE,
           INCOMING_HANDSHAKE_LEN, evbuffer_get_length (inbuf));
 
   if (evbuffer_get_length (inbuf) < INCOMING_HANDSHAKE_LEN)
@@ -734,7 +734,7 @@
   const uint8_t * secret;
   int len;
 
-  dbgmsg (handshake, "in readYa... need %d, have %zu",
+  dbgmsg (handshake, "in readYa... need %d, have %"TR_PRIuSIZE,
           KEY_LEN, evbuffer_get_length (inbuf));
   if (evbuffer_get_length (inbuf) < KEY_LEN)
     return READ_LATER;
@@ -884,7 +884,7 @@
   struct evbuffer * outbuf;
   uint32_t crypto_select;
 
-  dbgmsg (handshake, "reading IA... have %zu, need %zu",
+  dbgmsg (handshake, "reading IA... have %"TR_PRIuSIZE", need %"TR_PRIuSIZE,
           evbuffer_get_length (inbuf), needlen);
   if (evbuffer_get_length (inbuf) < needlen)
     return READ_LATER;
@@ -961,7 +961,7 @@
   int i;
   const size_t needlen = HANDSHAKE_SIZE;
 
-  dbgmsg (handshake, "reading payload stream... have %zu, need %zu",
+  dbgmsg (handshake, "reading payload stream... have %"TR_PRIuSIZE", need %"TR_PRIuSIZE,
           evbuffer_get_length (inbuf), needlen);
   if (evbuffer_get_length (inbuf) < needlen)
     return READ_LATER;
Index: libtransmission/peer-io.c
===================================================================
--- libtransmission/peer-io.c	(revision 14186)
+++ libtransmission/peer-io.c	(working copy)
@@ -416,7 +416,7 @@
     assert (tr_isPeerIo (io));
 
     rc = evbuffer_add (io->inbuf, buf, buflen);
-    dbgmsg (io, "utp_on_read got %zu bytes", buflen);
+    dbgmsg (io, "utp_on_read got %"TR_PRIuSIZE" bytes", buflen);
 
     if (rc < 0) {
         tr_logAddNamedError ("UTP", "On read evbuffer_add");
@@ -435,7 +435,7 @@
     assert (tr_isPeerIo (io));
 
     rc = evbuffer_remove (io->outbuf, buf, buflen);
-    dbgmsg (io, "utp_on_write sending %zu bytes... evbuffer_remove returned %d", buflen, rc);
+    dbgmsg (io, "utp_on_write sending %"TR_PRIuSIZE" bytes... evbuffer_remove returned %d", buflen, rc);
     assert (rc == (int)buflen); /* if this fails, we've corrupted our bookkeeping somewhere */
     if (rc < (long)buflen) {
         tr_logAddNamedError ("UTP", "Short write: %d < %ld", rc, (long)buflen);
@@ -453,7 +453,7 @@
 
     bytes = tr_bandwidthClamp (&io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE);
 
-    dbgmsg (io, "utp_get_rb_size is saying it's ready to read %zu bytes", bytes);
+    dbgmsg (io, "utp_get_rb_size is saying it's ready to read %"TR_PRIuSIZE" bytes", bytes);
     return UTP_READ_BUFFER_SIZE - bytes;
 }
 
@@ -514,7 +514,7 @@
     tr_peerIo *io = closure;
     assert (tr_isPeerIo (io));
 
-    dbgmsg (io, "utp_on_overhead -- count is %zu", count);
+    dbgmsg (io, "utp_on_overhead -- count is %"TR_PRIuSIZE, count);
 
     tr_bandwidthUsed (&io->bandwidth, send ? TR_UP : TR_DOWN,
                       count, false, tr_time_msec ());
@@ -1269,7 +1269,7 @@
 {
     int n = 0;
     const size_t old_len = evbuffer_get_length (io->outbuf);
-    dbgmsg (io, "in tr_peerIoTryWrite %zu", howmuch);
+    dbgmsg (io, "in tr_peerIoTryWrite %"TR_PRIuSIZE, howmuch);
 
     if (howmuch > old_len)
         howmuch = old_len;
@@ -1322,7 +1322,7 @@
     else
         bytesUsed = tr_peerIoTryWrite (io, limit);
 
-    dbgmsg (io, "flushing peer-io, direction %d, limit %zu, bytesUsed %d", (int)dir, limit, bytesUsed);
+    dbgmsg (io, "flushing peer-io, direction %d, limit %"TR_PRIuSIZE", bytesUsed %d", (int)dir, limit, bytesUsed);
     return bytesUsed;
 }
 
Index: libtransmission/peer-msgs.c
===================================================================
--- libtransmission/peer-msgs.c	(revision 14186)
+++ libtransmission/peer-msgs.c	(working copy)
@@ -333,7 +333,7 @@
 static void
 dbgOutMessageLen (tr_peerMsgs * msgs)
 {
-  dbgmsg (msgs, "outMessage size is now %zu", evbuffer_get_length (msgs->outMessages));
+  dbgmsg (msgs, "outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (msgs->outMessages));
 }
 
 static void
@@ -903,7 +903,7 @@
 tr_peerMsgsCancel (tr_peerMsgs * msgs, tr_block_index_t block)
 {
     struct peer_request req;
-/*fprintf (stderr, "SENDING CANCEL MESSAGE FOR BLOCK %zu\n\t\tFROM PEER %p ------------------------------------\n", (size_t)block, msgs->peer);*/
+/*fprintf (stderr, "SENDING CANCEL MESSAGE FOR BLOCK %"TR_PRIuSIZE"\n\t\tFROM PEER %p ------------------------------------\n", (size_t)block, msgs->peer);*/
     blockToReq (msgs->torrent, block, &req);
     protocolSendCancel (msgs, &req);
 }
@@ -1291,7 +1291,7 @@
 
     tr_peerIoReadUint8 (msgs->io, inbuf, &id);
     msgs->incoming.id = id;
-    dbgmsg (msgs, "msgs->incoming.id is now %d; msgs->incoming.length is %zu", id, (size_t)msgs->incoming.length);
+    dbgmsg (msgs, "msgs->incoming.id is now %d; msgs->incoming.length is %"TR_PRIuSIZE, id, (size_t)msgs->incoming.length);
 
     if (id == BT_PIECE)
     {
@@ -1454,7 +1454,7 @@
 
         fireClientGotPieceData (msgs, n);
         *setme_piece_bytes_read += n;
-        dbgmsg (msgs, "got %zu bytes for block %u:%u->%u ... %d remain",
+        dbgmsg (msgs, "got %"TR_PRIuSIZE" bytes for block %u:%u->%u ... %d remain",
                n, req->index, req->offset, req->length,
              (int)(req->length - evbuffer_get_length (block_buffer)));
         if (evbuffer_get_length (block_buffer) < req->length)
@@ -1486,7 +1486,7 @@
 
     --msglen; /* id length */
 
-    dbgmsg (msgs, "got BT id %d, len %d, buffer size is %zu", (int)id, (int)msglen, inlen);
+    dbgmsg (msgs, "got BT id %d, len %d, buffer size is %"TR_PRIuSIZE, (int)id, (int)msglen, inlen);
 
     if (inlen < msglen)
         return READ_LATER;
@@ -1747,7 +1747,7 @@
     struct evbuffer * in = tr_peerIoGetReadBuffer (io);
     const size_t      inlen = evbuffer_get_length (in);
 
-    dbgmsg (msgs, "canRead: inlen is %zu, msgs->state is %d", inlen, msgs->state);
+    dbgmsg (msgs, "canRead: inlen is %"TR_PRIuSIZE", msgs->state is %d", inlen, msgs->state);
 
     if (!inlen)
     {
@@ -1915,14 +1915,14 @@
 
     if (haveMessages && !msgs->outMessagesBatchedAt) /* fresh batch */
     {
-        dbgmsg (msgs, "started an outMessages batch (length is %zu)", evbuffer_get_length (msgs->outMessages));
+        dbgmsg (msgs, "started an outMessages batch (length is %"TR_PRIuSIZE")", evbuffer_get_length (msgs->outMessages));
         msgs->outMessagesBatchedAt = now;
     }
     else if (haveMessages && ((now - msgs->outMessagesBatchedAt) >= msgs->outMessagesBatchPeriod))
     {
         const size_t len = evbuffer_get_length (msgs->outMessages);
         /* flush the protocol messages */
-        dbgmsg (msgs, "flushing outMessages... to %p (length is %zu)", msgs->io, len);
+        dbgmsg (msgs, "flushing outMessages... to %p (length is %"TR_PRIuSIZE")", msgs->io, len);
         tr_peerIoWriteBuf (msgs->io, msgs->outMessages, false);
         msgs->clientSentAnythingAt = now;
         msgs->outMessagesBatchedAt = 0;
@@ -2029,7 +2029,7 @@
             /* check the piece if it needs checking... */
             if (!err && tr_torrentPieceNeedsCheck (msgs->torrent, req.index))
                 if ((err = !tr_torrentCheckPiece (msgs->torrent, req.index)))
-                    tr_torrentSetLocalError (msgs->torrent, _("Please Verify Local Data! Piece #%zu is corrupt."), (size_t)req.index);
+                    tr_torrentSetLocalError (msgs->torrent, _("Please Verify Local Data! Piece #%"TR_PRIuSIZE" is corrupt."), (size_t)req.index);
 
             if (err)
             {
@@ -2130,7 +2130,7 @@
     evbuffer_add_uint32 (out, sizeof (uint8_t) + byte_count);
     evbuffer_add_uint8 (out, BT_BITFIELD);
     evbuffer_add     (out, bytes, byte_count);
-    dbgmsg (msgs, "sending bitfield... outMessage size is now %zu", evbuffer_get_length (out));
+    dbgmsg (msgs, "sending bitfield... outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (out));
     pokeBatchPeriod (msgs, IMMEDIATE_PRIORITY_INTERVAL_SECS);
 
     tr_free (bytes);
@@ -2425,7 +2425,7 @@
             evbuffer_add_uint8 (out, msgs->ut_pex_id);
             evbuffer_add_buffer (out, payload);
             pokeBatchPeriod (msgs, HIGH_PRIORITY_INTERVAL_SECS);
-            dbgmsg (msgs, "sending a pex message; outMessage size is now %zu", evbuffer_get_length (out));
+            dbgmsg (msgs, "sending a pex message; outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (out));
             dbgOutMessageLen (msgs);
 
             evbuffer_free (payload);
Index: libtransmission/resume.c
===================================================================
--- libtransmission/resume.c	(revision 14186)
+++ libtransmission/resume.c	(working copy)
@@ -164,7 +164,7 @@
     }
   else
     {
-      tr_logAddTorDbg (tor, "Couldn't load DND flags. DND list (%p) has %zu children; torrent has %d files",
+      tr_logAddTorDbg (tor, "Couldn't load DND flags. DND list (%p) has %"TR_PRIuSIZE" children; torrent has %d files",
                        list, tr_variantListSize (list), (int)n);
     }
 
Index: libtransmission/rpc-server.c
===================================================================
--- libtransmission/rpc-server.c	(revision 14186)
+++ libtransmission/rpc-server.c	(working copy)
@@ -387,7 +387,7 @@
           iovec[0].iov_len -= server->stream.avail_out;
 
 #if 0
-          fprintf (stderr, "compressed response is %.2f of original (raw==%zu bytes; compressed==%zu)\n",
+          fprintf (stderr, "compressed response is %.2f of original (raw==%"TR_PRIuSIZE" bytes; compressed==%"TR_PRIuSIZE")\n",
                    (double)evbuffer_get_length (out)/content_len,
                    content_len, evbuffer_get_length (out));
 #endif
Index: libtransmission/rpcimpl.c
===================================================================
--- libtransmission/rpcimpl.c	(revision 14186)
+++ libtransmission/rpcimpl.c	(working copy)
@@ -1633,7 +1633,7 @@
 {
   struct add_torrent_idle_data * data = user_data;
 
-  dbgmsg ("torrentAdd: HTTP response code was %ld (%s); response length was %zu bytes",
+  dbgmsg ("torrentAdd: HTTP response code was %ld (%s); response length was %"TR_PRIuSIZE" bytes",
           response_code, tr_webGetResponseStr (response_code), response_byte_count);
 
   if (response_code==200 || response_code==221) /* http or ftp success.. */
Index: libtransmission/session.c
===================================================================
--- libtransmission/session.c	(revision 14186)
+++ libtransmission/session.c	(working copy)
@@ -676,7 +676,7 @@
   if (usec < min)
     usec = min;
   tr_timerAdd (session->nowTimer, 0, usec);
-  /* fprintf (stderr, "time %zu sec, %zu microsec\n", (size_t)tr_time (), (size_t)tv.tv_usec); */
+  /* fprintf (stderr, "time %"TR_PRIuSIZE" sec, %"TR_PRIuSIZE" microsec\n", (size_t)tr_time (), (size_t)tv.tv_usec); */
 }
 
 static void loadBlocklists (tr_session * session);
@@ -1868,7 +1868,7 @@
 
   assert (tr_isSession (session));
 
-  dbgmsg ("shutting down transmission session %p... now is %zu, deadline is %zu", session, (size_t)time (NULL), (size_t)deadline);
+  dbgmsg ("shutting down transmission session %p... now is %"TR_PRIuSIZE", deadline is %"TR_PRIuSIZE, session, (size_t)time (NULL), (size_t)deadline);
 
   /* close the session */
   tr_runInEventThread (session, sessionCloseImpl, session);
@@ -1885,7 +1885,7 @@
   while ((session->shared || session->web || session->announcer || session->announcer_udp)
            && !deadlineReached (deadline))
     {
-      dbgmsg ("waiting on port unmap (%p) or announcer (%p)... now %zu deadline %zu",
+      dbgmsg ("waiting on port unmap (%p) or announcer (%p)... now %"TR_PRIuSIZE" deadline %"TR_PRIuSIZE,
               session->shared, session->announcer, (size_t)time (NULL), (size_t)deadline);
       tr_wait_msec (50);
     }
@@ -1897,7 +1897,7 @@
   while (session->events != NULL)
     {
       static bool forced = false;
-      dbgmsg ("waiting for libtransmission thread to finish... now %zu deadline %zu", (size_t)time (NULL), (size_t)deadline);
+      dbgmsg ("waiting for libtransmission thread to finish... now %"TR_PRIuSIZE" deadline %"TR_PRIuSIZE, (size_t)time (NULL), (size_t)deadline);
       tr_wait_msec (100);
 
       if (deadlineReached (deadline) && !forced)
Index: libtransmission/torrent.c
===================================================================
--- libtransmission/torrent.c	(revision 14186)
+++ libtransmission/torrent.c	(working copy)
@@ -562,9 +562,9 @@
           const bool allAreSeeds = seedProbability == 100;
 
           if (allAreSeeds)
-            tr_logAddTorDbg (tor, "Got %zu seeds from tracker", event->pexCount);
+            tr_logAddTorDbg (tor, "Got %"TR_PRIuSIZE" seeds from tracker", event->pexCount);
           else
-            tr_logAddTorDbg (tor, "Got %zu peers from tracker", event->pexCount);
+            tr_logAddTorDbg (tor, "Got %"TR_PRIuSIZE" peers from tracker", event->pexCount);
 
           for (i = 0; i < event->pexCount; ++i)
             tr_peerMgrAddPex (tor, TR_PEER_FROM_TRACKER, &event->pex[i], seedProbability);
@@ -2572,7 +2572,7 @@
 {
   const bool pass = tr_ioTestPiece (tor, pieceIndex);
 
-  tr_deeplog_tor (tor, "[LAZY] tr_torrentCheckPiece tested piece %zu, pass==%d", (size_t)pieceIndex, (int)pass);
+  tr_deeplog_tor (tor, "[LAZY] tr_torrentCheckPiece tested piece %"TR_PRIuSIZE", pass==%d", (size_t)pieceIndex, (int)pass);
   tr_torrentSetHasPiece (tor, pieceIndex, pass);
   tr_torrentSetPieceChecked (tor, pieceIndex);
   tor->anyDate = tr_time ();
@@ -3240,7 +3240,7 @@
       p = tr_torBlockPiece (tor, block);
       if (tr_torrentPieceIsComplete (tor, p))
         {
-          tr_logAddTorDbg (tor, "[LAZY] checking just-completed piece %zu", (size_t)p);
+          tr_logAddTorDbg (tor, "[LAZY] checking just-completed piece %"TR_PRIuSIZE, (size_t)p);
 
           if (tr_torrentCheckPiece (tor, p))
             {
Index: libtransmission/tr-utp.c
===================================================================
--- libtransmission/tr-utp.c	(revision 14186)
+++ libtransmission/tr-utp.c	(working copy)
@@ -65,8 +65,8 @@
 bool
 UTP_Write (struct UTPSocket *socket, size_t count)
 {
-    tr_logAddNamedError (MY_NAME, "UTP_RBDrained (%p, %zu) was called.", socket, count);
-    dbgmsg ("UTP_RBDrained (%p, %zu) was called.", socket, count);
+    tr_logAddNamedError (MY_NAME, "UTP_RBDrained (%p, %"TR_PRIuSIZE") was called.", socket, count);
+    dbgmsg ("UTP_RBDrained (%p, %"TR_PRIuSIZE") was called.", socket, count);
     assert (0); /* FIXME: this is too much for the long term, but probably needed in the short term */
     return false;
 }
Index: libtransmission/transmission.h
===================================================================
--- libtransmission/transmission.h	(revision 14186)
+++ libtransmission/transmission.h	(working copy)
@@ -83,6 +83,14 @@
  #endif
 #endif
 
+#ifndef TR_PRIuSIZE
+ #ifdef _MSC_VER
+  #define TR_PRIuSIZE "Iu"
+ #else
+  #define TR_PRIuSIZE "zu"
+ #endif
+#endif
+
 #if defined (WIN32) && defined (_MSC_VER)
  #define inline __inline
 #endif
Index: libtransmission/variant-benc.c
===================================================================
--- libtransmission/variant-benc.c	(revision 14186)
+++ libtransmission/variant-benc.c	(working copy)
@@ -297,7 +297,7 @@
   size_t len;
   const char * str;
   tr_variantGetStr (v, &str, &len);
-  evbuffer_add_printf (evbuf, "%zu:", len);
+  evbuffer_add_printf (evbuf, "%"TR_PRIuSIZE":", len);
   evbuffer_add (evbuf, str, len);
 }
 
Index: libtransmission/variant-json.c
===================================================================
--- libtransmission/variant-json.c	(revision 14186)
+++ libtransmission/variant-json.c	(working copy)
@@ -91,7 +91,7 @@
 
   if (data->source)
     {
-      tr_logAddError ("JSON parse failed in %s at pos %zu: %s -- remaining text \"%.16s\"",
+      tr_logAddError ("JSON parse failed in %s at pos %"TR_PRIuSIZE": %s -- remaining text \"%.16s\"",
               data->source,
               jsn->pos,
               jsonsl_strerror (error),
@@ -99,7 +99,7 @@
     }
   else
     {
-      tr_logAddError ("JSON parse failed at pos %zu: %s -- remaining text \"%.16s\"",
+      tr_logAddError ("JSON parse failed at pos %"TR_PRIuSIZE": %s -- remaining text \"%.16s\"",
               jsn->pos,
               jsonsl_strerror (error),
               buf);
Index: libtransmission/web.c
===================================================================
--- libtransmission/web.c	(revision 14186)
+++ libtransmission/web.c	(working copy)
@@ -133,7 +133,7 @@
     }
 
   evbuffer_add (task->response, ptr, byteCount);
-  dbgmsg ("wrote %zu bytes to task %p's buffer", byteCount, task);
+  dbgmsg ("wrote %"TR_PRIuSIZE" bytes to task %p's buffer", byteCount, task);
   return byteCount;
 }
 
Index: utils/edit.c
===================================================================
--- utils/edit.c	(revision 14186)
+++ utils/edit.c	(working copy)
@@ -279,7 +279,7 @@
         {
           tr_variant * tier = tr_variantListAddList (announce_list, 1);
           tr_variantListAddStr (tier, url);
-          printf ("\tAdded \"%s\" to \"announce-list\" tier %zu\n", url, tr_variantListSize (announce_list));
+          printf ("\tAdded \"%s\" to \"announce-list\" tier %"TR_PRIuSIZE"\n", url, tr_variantListSize (announce_list));
           changed = true;
         }
     }
