Fix format specifier warning introduced couple commits earlier

This commit is contained in:
Mike Gelfand 2014-12-13 17:04:14 +00:00
parent 74a5bdb9e6
commit c845e35ce1
2 changed files with 10 additions and 2 deletions

View File

@ -2895,9 +2895,9 @@ rechokeDownloads (tr_swarm * s)
const double mult = MIN (timeSinceCancel, maxHistory) / (double) maxHistory;
const int inc = maxIncrease * mult;
maxPeers = s->maxPeers + inc;
tordbg (s, "time since last cancel is %"PRId64" -- increasing the "
tordbg (s, "time since last cancel is %"PRIdMAX" -- increasing the "
"number of peers we're interested in by %d",
(long long)timeSinceCancel, inc);
(intmax_t)timeSinceCancel, inc);
}
}

View File

@ -67,6 +67,14 @@ extern "C" {
#endif
#endif
#ifndef PRIdMAX
#ifdef _WIN32
#define PRIdMAX "I64"
#else
#define PRIdMAX "jd"
#endif
#endif
#ifndef TR_PRIuSIZE
#ifdef _WIN32
#define TR_PRIuSIZE "Iu"