[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [gftp] 32bit bug?
On Mon, Mar 15, 2004 at 08:01:25PM +0100, Oliver Lehmann wrote:
> Brian Masney wrote:
> > It should look something like this:
> > brian:~/src/gftp/src/gtk$ ./gftp-gtk --info
> > [...]
> > #define _LARGEFILE_SOURCE
> beside defining _LARGEFILE_SOURCE I had to apply the attached patch too.
> Is there a way to bring it both, the define for the FreeBSD-case and the
> patch behaviour, into the next release?
Here is a patch to lib/gftp.h that I am commiting to CVS should fix this:
diff -u -r1.81 gftp.h
--- gftp.h 15 Mar 2004 18:07:05 -0000 1.81
+++ gftp.h 16 Mar 2004 02:08:15 -0000
@@ -26,6 +26,13 @@
+/* FreeBSD and OpenBSD both include 64bit off_t but _LARGEFILE_SOURCE does not
+ get defined. */
+#if defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS > 32 && \
+ !defined (_LARGEFILE_SOURCE)
+#define _LARGEFILE_SOURCE 1
There are more cases in the code where gftp is checking for _LARGEFILE_SOURCE
and this patch covers all of them.