[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib largefile support
From: |
Bruno Haible |
Subject: |
Re: gnulib largefile support |
Date: |
Mon, 7 Nov 2011 22:52:39 +0100 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
[CCing Ludovic. The thread starts at
<https://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00079.html>]
Nikos Mavrogiannopoulos wrote:
> Wouldn't it be better to add an option to enable
> it only in systems where it is desirable?
Like Eric said, large file support *is* desirable on all platforms.
The only reason that large file support is off by default is backward
compatibility.
> After adding few modules to gnulib the gnutls-guile library had few
> failures in testsuite in some arm and mips systems. After some
> investigation[0] it seems that the issue was that the new gnulib modules
> were depending on largefile module which defines a 64-bit off_t even on
> 32-bit systems.
You are confusing trigger and cause. While a gnulib update *triggered*
a malfunction [1], the *cause* was a guile bug [2], and it was fixed in
guile 2.0 already two years ago [3].
Ludo, I find that your fix in [4] is not optimal. While testing whether
guile was built to support large files or not (via GUILE_USE_64_CALLS)
certainly fixes the problem at hand, it does nothing about the real
problem. Namely, that guile will not work right with files > 2 GB.
The fix is to import the 'largefile' module from gnulib.
> Why adding getpass or fseek gnulib modules would enable
> largefile by default?
Never use fseek(). Use fseeko() instead. This is documented in the gnulib
manual [5].
I'm not sure what 'fseek' and 'ftell' in guile/doc/sources/unix.texi
are referring to. Probably they should be replaced by 'fseeko' and 'ftello',
respectively.
Bruno
[1] http://lists.gnu.org/archive/html/gnutls-devel/2011-10/msg00084.html
[2] http://lists.gnu.org/archive/html/gnutls-devel/2011-11/msg00007.html
[3] http://lists.gnu.org/archive/html/gnutls-devel/2011-11/msg00014.html
[4]
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=f1ce9199335bebab1a62286ac965f33dc91ca97f
[5] https://www.gnu.org/software/gnulib/manual/html_node/fseek.html
--
In memoriam Hannah Szenes <http://en.wikipedia.org/wiki/Hannah_Szenes>