comparison acinclude.m4 @ 532:bccfdbfaac00

2004-8-17 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c - added #defines for encoding and decoding file sizes that will work properly for large files (GFTP_OFF_T_HEX_PRINTF_MOD, GFTP_OFF_T_INTL_PRINTF_MOD, GFTP_OFF_T_PRINTF_MOD, GFTP_OFF_T_11PRINTF_MOD and gftp_parse_file_size). Fixed file size not being displayed properly when the system does not support the ' printf formatter * acinclude.m4 (AC_INTL_PRINTF) - check to see if _LARGEFILE_SOURCE is defined. If so, use %'lld instead of %'ld
author masneyb
date Wed, 18 Aug 2004 01:58:43 +0000
parents eb6dafc07f42
children
comparison
equal deleted inserted replaced
531:65cd664cbf32 532:bccfdbfaac00
26 AC_TRY_RUN([#include <stdio.h> 26 AC_TRY_RUN([#include <stdio.h>
27 #include <string.h> 27 #include <string.h>
28 28
29 int main(void) { 29 int main(void) {
30 char buf[20]; 30 char buf[20];
31 #if defined (_LARGEFILE_SOURCE)
32 sprintf (buf, "%'lld", (long) 1);
33 #else
31 sprintf (buf, "%'ld", (long) 1); 34 sprintf (buf, "%'ld", (long) 1);
35 #endif
32 if (strchr (buf, '1') == NULL) 36 if (strchr (buf, '1') == NULL)
33 return (1); 37 return (1);
34 return (0); 38 return (0);
35 }], 39 }],
36 [AC_DEFINE(HAVE_INTL_PRINTF,1,Define if printf supports %'ld) 40 [AC_DEFINE(HAVE_INTL_PRINTF,1,Define if printf supports %'ld)