changeset 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 527cf464140b
children 516cefa2d27d
files src/protocols/irc/dcc_send.c src/protocols/jabber/si.c src/upnp.c src/util.c
diffstat 4 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/dcc_send.c	Thu Oct 13 03:23:38 2005 +0000
+++ b/src/protocols/irc/dcc_send.c	Thu Oct 13 19:53:09 2005 +0000
@@ -286,7 +286,7 @@
 	/* Send the intended recipient the DCC request */
 	arg[0] = xfer->who;
 	inet_aton(gaim_network_get_my_ip(irc->fd), &addr);
-	arg[1] = tmp = g_strdup_printf("\001DCC SEND \"%s\" %u %hu %zu\001",
+	arg[1] = tmp = g_strdup_printf("\001DCC SEND \"%s\" %u %hu %" G_GSIZE_FORMAT "\001",
 	                         xfer->filename, ntohl(addr.s_addr),
 	                         port, xfer->size);
 
--- a/src/protocols/jabber/si.c	Thu Oct 13 03:23:38 2005 +0000
+++ b/src/protocols/jabber/si.c	Thu Oct 13 19:53:09 2005 +0000
@@ -518,7 +518,7 @@
 	xmlnode_set_attrib(file, "xmlns",
 			"http://jabber.org/protocol/si/profile/file-transfer");
 	xmlnode_set_attrib(file, "name", xfer->filename);
-	g_snprintf(buf, sizeof(buf), "%zu", xfer->size);
+	g_snprintf(buf, sizeof(buf), "%" G_GSIZE_FORMAT, xfer->size);
 	xmlnode_set_attrib(file, "size", buf);
 	/* maybe later we'll do hash and date attribs */
 
--- a/src/upnp.c	Thu Oct 13 03:23:38 2005 +0000
+++ b/src/upnp.c	Thu Oct 13 19:53:09 2005 +0000
@@ -95,7 +95,7 @@
                            "\"urn:schemas-upnp-org:"                       \
                            "service:%s#%s\"\r\n"                           \
                            "CONTENT-TYPE: text/xml ; charset=\"utf-8\"\r\n"\
-                           "Content-Length: %zi\r\n\r\n"
+                           "Content-Length: %" G_GSIZE_FORMAT "\r\n\r\n"
 
 #define SOAP_ACTION  "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"     \
                      "<s:Envelope xmlns:s="                               \
--- 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);
 	}