Fix format string warnings

Also fixes bug #768199:

https://bugzilla.gnome.org/show_bug.cgi?id=768199
diff --git a/runtest.c b/runtest.c
index 1861577..b2ce693 100644
--- a/runtest.c
+++ b/runtest.c
@@ -688,7 +688,7 @@
     }
     if (info.st_size != size) {
         fprintf(stderr, "file %s is %ld bytes, result is %d bytes\n",
-	        filename, info.st_size, size);
+	        filename, (long) info.st_size, size);
         return(-1);
     }
     fd = open(filename, RD_FLAGS);
diff --git a/testlimits.c b/testlimits.c
index 577f593..68c94db 100644
--- a/testlimits.c
+++ b/testlimits.c
@@ -1284,13 +1284,14 @@
         if (fail)
             res = 0;
         else {
-            fprintf(stderr, "Failed to parse '%s' %lu\n", filename, limit);
+            fprintf(stderr, "Failed to parse '%s' %lu\n", filename,
+                    (unsigned long) limit);
             res = 1;
         }
     } else {
         if (fail) {
             fprintf(stderr, "Failed to get failure for '%s' %lu\n",
-                    filename, limit);
+                    filename, (unsigned long) limit);
             res = 1;
         } else
             res = 0;
@@ -1339,7 +1340,7 @@
                         filename, crazy_indx);
             else
                 fprintf(stderr, "Failed to parse '%s' %lu\n",
-                        filename, limit);
+                        filename, (unsigned long) limit);
             res = 1;
         }
     } else {
@@ -1349,7 +1350,7 @@
                         filename, crazy_indx);
             else
                 fprintf(stderr, "Failed to get failure for '%s' %lu\n",
-                        filename, limit);
+                        filename, (unsigned long) limit);
             res = 1;
         } else
             res = 0;
diff --git a/timsort.h b/timsort.h
index 795f272..9369e7c 100644
--- a/timsort.h
+++ b/timsort.h
@@ -323,7 +323,7 @@
     SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
     if (tempstore == NULL)
     {
-      fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
+      fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", (unsigned long) (sizeof(SORT_TYPE) * new_size));
       exit(1);
     }
     store->storage = tempstore;
diff --git a/xmlIO.c b/xmlIO.c
index 1a79c09..300ee47 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -1674,7 +1674,7 @@
 	xmlStrPrintf(msg, 500,
 		    "xmlZMemBuffExtend:  %s %lu bytes.\n",
 		    "Allocation failure extending output buffer to",
-		    new_size );
+		    (unsigned long) new_size );
 	xmlIOErr(XML_IO_WRITE, (const char *) msg);
     }