Mercurial > gftp.yaz
diff lib/misc.c @ 14:83090328581e
* More largefile support. Hopefully all that is left is the configure stuff
* Sanity checking on the fdopen() calls. Also make sure that all of them have a + in their open mode. Doesn't affect UNIX, but it does affect Windows
* HTTP fixes when running under Solaris. Read from request->sockfd and write to request->sockfd_write (Solaris doesn't like it when you read/write to the same FILE structure)
* Display major/minor properly for a device when connected with the local protocol
author | masneyb |
---|---|
date | Wed, 04 Sep 2002 11:45:56 +0000 |
parents | cd2e26a69461 |
children | ddb983d8574b |
line wrap: on
line diff
--- a/lib/misc.c Fri Aug 30 19:46:27 2002 +0000 +++ b/lib/misc.c Wed Sep 04 11:45:56 2002 +0000 @@ -21,7 +21,7 @@ #include "options.h" char * -insert_commas (unsigned long number, char *dest_str, size_t dest_len) +insert_commas (off_t number, char *dest_str, size_t dest_len) { char *frompos, *topos, src[50], *dest; int len, num, rem, i; @@ -54,7 +54,11 @@ else dest = dest_str; +#if defined (_LARGEFILE_SOURCE) + g_snprintf (src, sizeof (src), "%lld", number); +#else g_snprintf (src, sizeof (src), "%ld", number); +#endif num = strlen (src) / 3 - 1; rem = strlen (src) % 3;