Use %ld and casts to long for refcount printing, in absense of a universally
available %zd format character. Mark with an XXX comment so we can fix this,
later.
diff --git a/Objects/intobject.c b/Objects/intobject.c
index b0876ae..d7a64be 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -1220,9 +1220,14 @@
 			     i < N_INTOBJECTS;
 			     i++, p++) {
 				if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
+					/* XXX(twouters) cast refcount to
+					   long until %zd is universally
+					   available
+					 */
 					fprintf(stderr,
-				"#   <int at %p, refcnt=%d, val=%ld>\n",
-						p, p->ob_refcnt, p->ob_ival);
+				"#   <int at %p, refcnt=%ld, val=%ld>\n",
+						p, (long)p->ob_refcnt,
+						p->ob_ival);
 			}
 			list = list->next;
 		}