Mercurial > gftp.yaz
changeset 372:44b792841e3f
2003-1-18 Brian Masney <masneyb@gftp.org>
* lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c - if
_LARGEFILE_SOURCE is defined, explicitly cast the file sizes to
long long so that the %lld format will be correct
author | masneyb |
---|---|
date | Mon, 19 Jan 2004 22:23:04 +0000 |
parents | 39b57989c34a |
children | 642bc7a87f05 |
files | ChangeLog lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c |
diffstat | 5 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 19 12:23:52 2004 +0000 +++ b/ChangeLog Mon Jan 19 22:23:04 2004 +0000 @@ -1,4 +1,8 @@ 2003-1-18 Brian Masney <masneyb@gftp.org> + * lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c - if + _LARGEFILE_SOURCE is defined, explicitly cast the file sizes to + long long so that the %lld format will be correct + * src/gtk/gtkui_transfer.c - gtk+ specific file transfer code. Forgot to attach this with the last commit @@ -2025,7 +2029,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.205 2004/01/19 12:23:52 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.206 2004/01/19 22:22:51 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/lib/misc.c Mon Jan 19 12:23:52 2004 +0000 +++ b/lib/misc.c Mon Jan 19 22:23:04 2004 +0000 @@ -30,7 +30,7 @@ if (dest_str != NULL) { #if defined (_LARGEFILE_SOURCE) - g_snprintf (dest_str, dest_len, "%'lld", number); + g_snprintf (dest_str, dest_len, "%'lld", (long long) number); #else g_snprintf (dest_str, dest_len, "%'ld", number); #endif @@ -38,7 +38,7 @@ else { #if defined (_LARGEFILE_SOURCE) - dest_str = g_strdup_printf ("%'lld", number); + dest_str = g_strdup_printf ("%'lld", (long long) number); #else dest_str = g_strdup_printf ("%'ld", number); #endif @@ -56,7 +56,7 @@ int len, num, rem, i; #if defined (_LARGEFILE_SOURCE) - g_snprintf (src, sizeof (src), "%lld", number); + g_snprintf (src, sizeof (src), "%lld", (long long) number); #else g_snprintf (src, sizeof (src), "%ld", number); #endif @@ -918,7 +918,7 @@ else { #if defined (_LARGEFILE_SOURCE) - tempstr2 = g_strdup_printf ("%11lld", fle->size); + tempstr2 = g_strdup_printf ("%11lld", (long long) fle->size); #else tempstr2 = g_strdup_printf ("%11ld", fle->size); #endif
--- a/lib/protocols.c Mon Jan 19 12:23:52 2004 +0000 +++ b/lib/protocols.c Mon Jan 19 22:23:04 2004 +0000 @@ -2147,12 +2147,15 @@ tempfle = templist->data; #if defined (_LARGEFILE_SOURCE) printf ("%s:%s:%lld:%lld:%s:%s:%s\n", + tempfle->file, tempfle->destfile, + (long long) tempfle->size, (long long) tempfle->startsize, + tempfle->user, tempfle->group, tempfle->attribs); #else printf ("%s:%s:%ld:%ld:%s:%s:%s\n", -#endif tempfle->file, tempfle->destfile, tempfle->size, tempfle->startsize, tempfle->user, tempfle->group, tempfle->attribs); +#endif if (templist->next == NULL) break; } @@ -2163,12 +2166,15 @@ tempfle = templist->data; #if defined (_LARGEFILE_SOURCE) printf ("%s:%s:%lld:%lld:%s:%s:%s\n", + tempfle->file, tempfle->destfile, + (long long) tempfle->size, (long long) tempfle->startsize, + tempfle->user, tempfle->group, tempfle->attribs); #else printf ("%s:%s:%ld:%ld:%s:%s:%s\n", -#endif tempfle->file, tempfle->destfile, tempfle->size, tempfle->startsize, tempfle->user, tempfle->group, tempfle->attribs); +#endif if (templist == list) break; }
--- a/lib/rfc2068.c Mon Jan 19 12:23:52 2004 +0000 +++ b/lib/rfc2068.c Mon Jan 19 22:23:04 2004 +0000 @@ -308,7 +308,7 @@ #if defined (_LARGEFILE_SOURCE) request->logging_function (gftp_logging_misc, request, _("Starting the file transfer at offset %lld\n"), - startsize); + (long long) startsize); oldstr = tempstr; tempstr = g_strdup_printf ("%sRange: bytes=%lld-\n", tempstr, startsize);
--- a/lib/rfc959.c Mon Jan 19 12:23:52 2004 +0000 +++ b/lib/rfc959.c Mon Jan 19 22:23:04 2004 +0000 @@ -1074,7 +1074,7 @@ if (startsize > 0) { #if defined (_LARGEFILE_SOURCE) - command = g_strdup_printf ("REST %lld\r\n", startsize); + command = g_strdup_printf ("REST %lld\r\n", (long long) startsize); #else command = g_strdup_printf ("REST %ld\r\n", startsize); #endif @@ -1150,7 +1150,7 @@ if (startsize > 0) { #if defined (_LARGEFILE_SOURCE) - command = g_strdup_printf ("REST %lld\r\n", startsize); + command = g_strdup_printf ("REST %lld\r\n", (long long) startsize); #else command = g_strdup_printf ("REST %ld\r\n", startsize); #endif