diff src/util.c @ 11656:f9c5480ad0ce

[gaim-migrate @ 13940] The poster of 1253287 says FreeBSD does have a z printf modifier. Someone commented that Solaris doesn't either. I don't know either way, but we use G_GSIZE_FORMAT elsewhere, so I figured it was worth a shot. I rooted out several %z format strings and changed them. It compiles for me. I make no guarantees past that. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 13 Oct 2005 19:53:09 +0000
parents 11d30825c1bb
children 2350fe2bef87
line wrap: on
line diff
--- a/src/util.c	Thu Oct 13 03:23:38 2005 +0000
+++ b/src/util.c	Thu Oct 13 19:53:09 2005 +0000
@@ -2018,8 +2018,8 @@
 	/* Ensure the file is the correct size */
 	if (byteswritten != real_size)
 	{
-		gaim_debug_error("util", "Error writing to file %s: Wrote %z bytes "
-						 "but should have written %z; is your disk full?\n",
+		gaim_debug_error("util", "Error writing to file %s: Wrote %" G_GSIZE_FORMAT " bytes "
+						 "but should have written %" G_GSIZE_FORMAT "; is your disk full?\n",
 						 filename_temp, byteswritten, real_size);
 		g_free(filename_full);
 		g_free(filename_temp);
@@ -2573,7 +2573,7 @@
 		}
 
 		if (size_index == 0) {
-			return g_strdup_printf("%zd %s", size, size_str[size_index]);
+			return g_strdup_printf("%" G_GSIZE_FORMAT " %s", size, size_str[size_index]);
 		} else {
 			return g_strdup_printf("%.2f %s", size_mag, size_str[size_index]);
 		}
@@ -2833,7 +2833,7 @@
 	 * if we make sure that there is indeed a \n in our header.
 	 */
 	if (p && g_strstr_len(p, data_len - (p - data), "\n")) {
-		sscanf(p, "Content-Length: %zu", &content_len);
+		sscanf(p, "Content-Length: %" G_GSIZE_FORMAT, &content_len);
 		gaim_debug_misc("parse_content_len", "parsed %u\n", content_len);
 	}