[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [gftp] 32bit bug?



On Sun, Mar 14, 2004 at 11:36:00AM +0100, Oliver Lehmann wrote:
> Hi,
> 
> files with a size of for example ~4GB:
> 
> ftp> ls -l
> 150 Opening ASCII mode data connection for '/bin/ls'.
> total 12918594
> [...]
> -rw-r--r--  1 olivleh1  staff  4200000000 Mar 12 22:04 1.img
> -rw-r--r--  1 olivleh1  staff  4200000000 Mar 12 21:35 1.img
> [...]
> 226 Transfer complete.
> ftp> 
> 
> Are showed in gftp with a size of 2,147,483,647....

What's the output of gftp --info?

It should look something like this:

brian:~/src/gftp/src/gtk$ ./gftp-gtk --info
gFTP 2.0.17pre0
#define _REENTRANT
#define _GNU_SOURCE
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
sizeof (off_t) = 8
#define HAVE_GETADDRINFO
#define HAVE_GAI_STRERROR
#define HAVE_GETDTABLESIZE
#define G_HAVE_GINT64
#define HAVE_LIBREADLINE
#define ENABLE_NLS
#define HAVE_GETTEXT
#define HAVE_INTL_PRINTF
glib version: 2.2.3
PTY implementation: openpty
OpenSSL version: 0x90703f
Enabled protocols: FTP FTPS HTTP HTTPS Local SSH2 Bookmark 

The main thing that needs to be defined is _LARGEFILE_SOURCE for files > 2.1GB.
That's the define that I am looking for whether or not to use large files.
I found the following article (http://freshmeat.net/articles/view/709/) that
mentions that FreeBSD always uses a 64bit off_t. If _LARGEFILE_SOURCE isn't
defined, in your gftp source edit the config.h file and define _LARGEFILE_SOURCE
and recompile. 

Brian