[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] largefile: add dependencies to this module
From: |
Bruno Haible |
Subject: |
Re: [PATCH] largefile: add dependencies to this module |
Date: |
Tue, 26 Jul 2011 02:51:15 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi Paul,
> > If you are adding a dependency to these modules, it sounds like
> > every piece of application code that somehow deads with files
> > via <unistd.h> or <sys/stat.h> would need a dependency to
> > 'largefile'?
>
> That's too strong.
I apologize. No offense was intended; just the heuristic which led you to
the list of modules was unclear to me.
We can split the discussion into three groups:
1) Modules which already exist and on which we agree.
2) Modules which do not yet exist.
3) The rest.
Ad 1)
> Let's look at the agreements and disagreements between our analyses.
>
> * Modules where we already agreed: fseeko, openat, ftello, lseek,
> mkstemp, pwrite.
>
> * In your list but not mine:
>
> . You're right about freopen, fseek, ftell, scandir, tmpfile, mkostemp,
> mkostemps, mkstemps; I missed those.
>
> . You're also right about fopen, glob, lstat, open, pread, stat.
> These modules I made dependent on largefile only if they were
> replaced, but they should depend unconditionally.
Good that we agree. I'm applying the part of your patch for these, together
with the accompanying documentation changes. Attached below.
> . alphasort works regardless of whether largefile is in effect,
> since it merely manipulates struct stat values; it doesn't
> actually fetch them from the file system. So it doesn't need to
> depend on largefile.
You're right. I noticed this while updating the doc too.
Actually, for 'fseek' and 'ftell' adding a dependency to 'largefile' buys
nothing, because it does not change the width of the type 'long'.
Ad 2)
> Some of these primitives, such as 'fstat', do not correspond to any
> gnulib modules, and so we need to depend directly on largefile (or add
> a dummy module, though that sounds less desirable).
For me, that sounds perfectly in line with the gnulib approach: We create
a new module when we notice and fix the first portability problem with
the particular function.
It's not a high burden to remember for the gnulib users, as long as we
stick to the usual conventions: one module per function, and the module's
name is the function's name. It's also not a high burden for us, since
it's only one file, a pretty trivial module description.
Ad 3)
> Some, such as
> 'stat', are often not listed as dependencies, perhaps because they
> were missed or perhaps because their other bugs are not important; in
> any case, 'stat' might be avoided so a module that uses the 'stat'
> function still needs to depend directly on largefile (this is in line
> with the general principle that modules should list all dependencies
> that are locally determinable).
So we will have some uses of the stat() function which give rise to a
module dependency towards 'stat', and others which trigger a module
dependency towards 'largefile'? Sounds hard to remember. In comparable
cases, such as 'dprintf' and 'dprintf-posix', or 'strdup' and 'strdup-posix',
or 'strstr-simple' and 'strstr', we have indicated different levels of
requirements / POSIX support through a suffix.
So, I would propose to rename 'stat' to 'stat-posix', and add a new module
'stat' that only fixes the 2 GiB st_size / 4 TiB st_ino problem. Then,
when other modules depend on it, it's very clear why they do, and during
future maintenance it will be clear whether to keep the dependency or not.
> And some primitives are pretty
> obscure and are not necessarily listed in POSIX (fsusage.c uses them,
> for example), so a direct dependency on largefile makes sense for them.
Yes, I agree with this.
> . canonicalize has lib/canonicalize.c, which invokes 'lstat'.
> canonicalize does depend on the 'lstat' module, but we still
> have a problem if the lstat module is avoided.
Users who use --avoid are on their own in general. But I can imagine that
after we've renamed 'lstat' to 'lstat-posix', someone who uses
--avoid=lstat-posix can judge whether he wants to use 'lstat' or nothing
at all to compensate for it. So on this one, I don't think we need to
add a redundant dependency to 'largefile'.
> . chdir-safer has lib/chdir-safer.c, which invokes fstat and lstat.
> It does not depend on 'lstat'. Perhaps it should, but lstat
> could be avoided. And suppose it stops using lstat but continues
> to use fstat? There is no fstat module ...
There should be an fstat module, IMO. See above.
> . copy-file has lib/copy-file.c, which invokes fstat.
Likewise.
> . fts has lib/fts.c which invokes fstat.
Likewise.
> . read-file has lib/read-file.c, which invokes fstat.
Likewise.
> . fileblocks has lib/fileblocks.c, which uses low-level system
> macros and types such as daddr_t that probably depend on largefile.
More importantly, it uses off_t, therefore it indeed profits from 'largefile'.
> . fsusage has lib/fsusage.c, which is like fileblocks.c on steroids.
fsusage has the dependency to 'largefile' since yesterday.
> . ftruncate (which is obsolete) uses low-level fcntls that may well
> depend on largefile.
Indeed. I wasn't aware that there is an 'fcntl64' under the hood in Linux
(transparently used in glibc).
> . isdir has lib/isdir.c which invokes stat, and the stat module might
> be avoided.
>
> . javacomp has lib/javacomp.c, which invokes 'stat', which might be
> avoided.
>
> . mkdir-p has lib/midr-p.c, which invokes 'stat', which might be avoided.
>
> . modechange has lib/modechange.c, which invokes 'stat', which might be
> avoided.
>
> . pt_chown has lib/pt_chown.c, which invokes 'stat', which might be
> avoided.
>
> . same has lib/same.c, which invokes 'stat', which might be avoided.
>
> . tempname has lib/tempname.c, which invokes 'lstat', which might be
> avoided.
Again, people who use --avoid have to use intelligent replacements. I don't
buy this argument with --avoid as an argument to add redundant dependencies.
> . tmpdir has lib/tmpdir.c, which invokes 'lstat', which is not listed as
> a dependency and which might be avoided.
It invokes 'stat', as far as I can see. And yes we have to think about whether
a dependency to 'stat-posix' or 'stat' is better.
> . relocatable-prog and relocatable-prog-wrapper have
> lib/relocatable.c, which invokes 'fstat and 'stat'. It doesn't
> currently depend on 'stat', but 'stat' might be avoided.
I would better leave 'relocatable-prog' and 'relocatable-prog-wrapper'
alone, because these are built in a very special way and rarely tested
on all platforms, and because executables larger than 2 GB have yet to
be seen in the wild.
So, for 1) here's what I'm committing in your name.
Then for 2) I'll propose new modules.
And for 3) IMO we should first consider to add the missing dependencies to
then existing modules, and add plain 'largefile' only in the few remaining
cases.
2011-07-25 Paul Eggert <address@hidden>
Bruno Haible <address@hidden>
Add dependencies to the 'largefile' module.
* modules/fopen (Depends-on): Add 'largefile'.
* modules/freopen (Depends-on): Likewise.
* modules/fseeko (Depends-on): Likewise.
* modules/ftello (Depends-on): Likewise.
* modules/glob (Depends-on): Likewise.
* modules/lseek (Depends-on): Likewise.
* modules/lstat (Depends-on): Likewise.
* modules/mkostemp (Depends-on): Likewise.
* modules/mkostemps (Depends-on): Likewise.
* modules/mkstemp (Depends-on): Likewise.
* modules/mkstemps (Depends-on): Likewise.
* modules/open (Depends-on): Likewise.
* modules/openat (Depends-on): Likewise.
* modules/pread (Depends-on): Likewise.
* modules/pwrite (Depends-on): Likewise.
* modules/scandir (Depends-on): Likewise.
* modules/stat (Depends-on): Likewise.
* modules/tmpfile (Depends-on): Likewise.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Do not require AC_SYS_LARGEFILE,
since the containing module now depends on the largefile module.
* m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Likewise.
* doc/posix-functions/fopen.texi: Mention that the problem of 32-bit
off_t is fixed by gnulib.
* doc/posix-functions/freopen.texi: Likewise.
* doc/posix-functions/fseeko.texi: Likewise.
* doc/posix-functions/fstatat.texi: Likewise.
* doc/posix-functions/ftello.texi: Likewise.
* doc/posix-functions/glob.texi: Likewise.
* doc/posix-functions/lseek.texi: Likewise.
* doc/posix-functions/lstat.texi: Likewise.
* doc/posix-functions/mkstemp.texi: Likewise.
* doc/posix-functions/open.texi: Likewise.
* doc/posix-functions/openat.texi: Likewise.
* doc/posix-functions/pread.texi: Likewise.
* doc/posix-functions/pwrite.texi: Likewise.
* doc/posix-functions/scandir.texi: Likewise.
* doc/posix-functions/stat.texi: Likewise.
* doc/posix-functions/tmpfile.texi: Likewise.
* doc/glibc-functions/mkostemp.texi: Likewise.
* doc/glibc-functions/mkostemps.texi: Likewise.
* doc/glibc-functions/mkstemps.texi: Likewise.
--- doc/glibc-functions/mkostemp.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/glibc-functions/mkostemp.texi Tue Jul 26 02:18:23 2011
@@ -10,14 +10,13 @@
This function is missing on many non-glibc platforms:
MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.5, mingw, Interix 3.5,
BeOS.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{mkostemp} may not work
+correctly to create files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{mkostemp} may not work
-correctly to create files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
The gnulib module @code{clean-temp} can create temporary files that will not
--- doc/glibc-functions/mkostemps.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/glibc-functions/mkostemps.texi Tue Jul 26 02:18:23 2011
@@ -10,14 +10,13 @@
This function is missing on many non-glibc platforms:
glibc 2.10, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.5, mingw,
Interix 3.5, BeOS.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{mkostemps} may not work
+correctly to create files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{mkostemps} may not work
-correctly to create files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
The gnulib module @code{clean-temp} can create temporary files that will not
--- doc/glibc-functions/mkstemps.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/glibc-functions/mkstemps.texi Tue Jul 26 02:18:23 2011
@@ -14,14 +14,13 @@
This function is declared in @code{<unistd.h>} instead of @code{<stdlib.h>}
on some platforms:
MacOS X 10.5.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{mkstemps} may not work
+correctly to create files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{mkstemps} may not work
-correctly to create files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
The gnulib module @code{clean-temp} can create temporary files that will not
--- doc/posix-functions/fopen.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/fopen.texi Tue Jul 26 02:18:22 2011
@@ -14,6 +14,9 @@
directory, on some platforms:
HP-UX 11.00, AIX 7.1, Solaris 9, Irix 5.3.
@item
+On platforms where @code{off_t} is a 32-bit type, @code{fopen} may not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
On Windows platforms (excluding Cygwin), this function does usually not
recognize the @file{/dev/null} filename.
@end itemize
@@ -28,10 +31,6 @@
this means that it translates @code{'\n'} to CR/LF by default. Use the
@code{"b"} flag if you need reliable binary I/O.
@item
-On platforms where @code{off_t} is a 32-bit type, @code{fopen} may not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
address@hidden
On Windows platforms (excluding Cygwin), this function fails to open
directories for reading. Such streams have implementation-defined
semantics on other platforms. To avoid directory streams with a
--- doc/posix-functions/freopen.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/freopen.texi Tue Jul 26 02:18:22 2011
@@ -9,6 +9,9 @@
Portability problems fixed by Gnulib:
@itemize
@item
+On platforms where @code{off_t} is a 32-bit type, @code{freopen} may not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
On Windows platforms (excluding Cygwin), this function does usually not
recognize the @file{/dev/null} filename.
@end itemize
@@ -24,10 +27,6 @@
directory, on some platforms:
HP-UX 11.00, Solaris 9, Irix 5.3.
@item
-On platforms where @code{off_t} is a 32-bit type, @code{freopen} may not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
address@hidden
Applications should not assume that @code{fileno(f)} will be the same
before and after a call to @code{freopen(name,mode,f)}. However, the
module freopen-safer can at least protect @code{stdin}, @code{stdout},
--- doc/posix-functions/fseeko.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/fseeko.texi Tue Jul 26 02:18:22 2011
@@ -17,15 +17,14 @@
glibc 2.3.6, OSF/1 5.1.
@item
This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{fseeko} does not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, @code{fseeko} does not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
address@hidden
On platforms where @code{off_t} is a 64-bit type, but @code{fseeko} is
not present, stream operations on files larger than 2 GB silently do
the wrong thing. This affects BSD/OS, which is mostly obsolete.
--- doc/posix-functions/fstatat.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/fstatat.texi Tue Jul 26 02:18:22 2011
@@ -14,6 +14,10 @@
5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
But the replacement function is not safe to be used in libraries and is not
multithread-safe.
@item
+On platforms where @code{off_t} is a 32-bit type, @code{fstatat} may
+not correctly report the size of files or block devices larger than 2
+GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
On some platforms, @code{fstatat(fd,"file/",buf,flag)} succeeds instead of
failing with @code{ENOTDIR}.
Solaris 9.
@@ -26,10 +30,6 @@
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, @code{fstatat} may
-not correctly report the size of files or block devices larger than 2
-GB. The fix is to use the @code{AC_SYS_LARGEFILE} macro.
address@hidden
On Windows platforms (excluding Cygwin), @code{st_ino} is always 0.
@item
On some file systems, @code{st_size} contains bogus information for
--- doc/posix-functions/ftello.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/ftello.texi Tue Jul 26 02:18:22 2011
@@ -21,15 +21,14 @@
Solaris 11 2010-11.
@item
This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{ftello} does not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, @code{ftello} does not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
address@hidden
This function produces incorrect results immediately after @code{fseek} on some
platforms:
HP-UX 11.
--- doc/posix-functions/glob.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/glob.texi Tue Jul 26 02:18:22 2011
@@ -14,14 +14,14 @@
@item
This function may list symbolic links to nonexistent files among the results,
on some platforms.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, this function may not
+work correctly on huge directories larger than 2 GB.
+(Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, this function may not
-work correctly on huge directories larger than 2 GB. The fix is to use
-the @code{AC_SYS_LARGEFILE} macro.
address@hidden
Some platforms may store additional flags in the @code{gl_flags} field.
@end itemize
--- doc/posix-functions/lseek.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/lseek.texi Tue Jul 26 02:18:22 2011
@@ -9,6 +9,9 @@
Portability problems fixed by Gnulib:
@itemize
@item
+On platforms where @code{off_t} is a 32-bit type, @code{lseek} does not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
This function mistakenly succeeds on pipes on some platforms: mingw, BeOS.
@end itemize
@@ -19,10 +22,6 @@
In practice, regular files and block devices support seeking, and ttys, pipes,
and most character devices don't support it.
@item
-On platforms where @code{off_t} is a 32-bit type, @code{lseek} does not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
address@hidden
When the third argument is invalid, POSIX says that @code{lseek} should set
@code{errno} to @code{EINVAL} and return -1, but in this situation a
@code{SIGSYS} signal is raised on some platforms:
--- doc/posix-functions/lstat.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/lstat.texi Tue Jul 26 02:18:22 2011
@@ -9,6 +9,10 @@
Portability problems fixed by Gnulib:
@itemize
@item
+On platforms where @code{off_t} is a 32-bit type, @code{lstat} may not
+correctly report the size of files or block devices larger than 2 GB.
+(Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
For symlinks, when the argument ends in a slash, some platforms don't
dereference the argument:
Solaris 9.
@@ -24,10 +28,6 @@
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, @code{lstat} may not
-correctly report the size of files or block devices larger than 2 GB. The fix
-is to use the @code{AC_SYS_LARGEFILE} macro.
address@hidden
On Windows platforms (excluding Cygwin), @code{st_ino} is always 0.
@item
Because of the definition of @code{struct stat}, it is not possible to
--- doc/posix-functions/mkstemp.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/mkstemp.texi Tue Jul 26 02:18:23 2011
@@ -20,6 +20,9 @@
limit that it can create no more than 26 files from a given template. On
OSF/1 4.0f, it can create only 32 files per process.
@item
+On platforms where @code{off_t} is a 32-bit type, @code{mkstemp} may not work
+correctly to create files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
On some older platforms, @code{mkstemp} can create a world or group
writable or readable file, if you haven't set the process umask to
077. This is a security risk.
@@ -27,10 +30,6 @@
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{mkstemp} may not work
-correctly to create files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
The gnulib module @code{clean-temp} can create temporary files that will not
--- doc/posix-functions/open.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/open.texi Tue Jul 26 02:18:23 2011
@@ -9,6 +9,9 @@
Portability problems fixed by the Gnulib module open:
@itemize
@item
+On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
This function does not fail when the file name argument ends in a slash
and (without the slash) names a nonexistent file or a file that is not a
directory, on some platforms:
@@ -35,8 +38,4 @@
On Windows, this function returns a file handle in @code{O_TEXT} mode by
default; this means that it translates '\n' to CR/LF by default. Use the
@code{O_BINARY} flag if you need reliable binary I/O.
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
--- doc/posix-functions/openat.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/openat.texi Tue Jul 26 02:18:23 2011
@@ -14,6 +14,9 @@
5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
But the replacement function is not safe to be used in libraries and is not
multithread-safe.
@item
+On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
+correctly with files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
This function does not fail when the file name argument ends in a slash
and (without the slash) names a nonexistent file or a file that is not a
directory, on some platforms:
@@ -22,8 +25,4 @@
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
-correctly with files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
--- doc/posix-functions/pread.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/pread.texi Tue Jul 26 02:18:23 2011
@@ -12,6 +12,9 @@
This function is missing on some platforms:
HP-UX 10, mingw, BeOS.
@item
+On platforms where @code{off_t} is a 32-bit type, this function may not
+work correctly on files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
This function returns zero instead of positive values when large file support
is enabled on some platforms:
HP-UX 11.11.
@@ -22,8 +25,4 @@
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, this function may not
-work correctly on files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
--- doc/posix-functions/pwrite.texi.orig Tue Jul 26 02:32:09 2011
+++ doc/posix-functions/pwrite.texi Tue Jul 26 02:18:23 2011
@@ -12,6 +12,9 @@
This function is missing on some platforms:
HP-UX 10, mingw, BeOS.
@item
+On platforms where @code{off_t} is a 32-bit type, this function may not
+work correctly on files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
This function does not fail when an invalid (negative) offset is passed when
large file support is enabled on some platforms:
HP-UX 11.11.
@@ -23,8 +26,4 @@
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, this function may not
-work correctly on files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
--- doc/posix-functions/scandir.texi.orig Tue Jul 26 02:32:10 2011
+++ doc/posix-functions/scandir.texi Tue Jul 26 02:18:23 2011
@@ -11,6 +11,11 @@
@item
This function is missing on some platforms:
Solaris 9, mingw, BeOS.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, this function may not
+work correctly on huge directories larger than 2 GB. Also, on platforms
+where @code{ino_t} is a 32-bit type, this function may report inode numbers
+incorrectly. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@@ -21,9 +26,4 @@
@item
The fourth parameter of this function is declared as @code{int (*) (void *,
void *)} on some platforms:
AIX 5.1.
address@hidden
-On platforms where @code{off_t} is a 32-bit type, this function may not
-work correctly on huge directories larger than 2 GB. Also, on platforms
-where @code{ino_t} is a 32-bit type, this function may report inode numbers
-incorrectly. The fix is to use the @code{AC_SYS_LARGEFILE} macro.
@end itemize
--- doc/posix-functions/stat.texi.orig Tue Jul 26 02:32:10 2011
+++ doc/posix-functions/stat.texi Tue Jul 26 02:18:23 2011
@@ -9,6 +9,10 @@
Portability problems fixed by Gnulib:
@itemize
@item
+On platforms where @code{off_t} is a 32-bit type, @code{stat} may not correctly
+report the size of files or block devices larger than 2 GB.
+(Cf. @code{AC_SYS_LARGEFILE}.)
address@hidden
On some platforms, @code{stat("link-to-file/",buf)} succeeds instead
of failing with @code{ENOTDIR}.
FreeBSD 7.2, AIX 7.1, Solaris 9.
@@ -21,10 +25,6 @@
Portability problems not fixed by Gnulib:
@itemize
@item
-On platforms where @code{off_t} is a 32-bit type, @code{stat} may not correctly
-report the size of files or block devices larger than 2 GB. The fix is to
-use the @code{AC_SYS_LARGEFILE} macro.
address@hidden
Cygwin's @code{stat} function sometimes sets @code{errno} to @code{EACCES} when
@code{ENOENT} would be more appropriate.
@item
--- doc/posix-functions/tmpfile.texi.orig Tue Jul 26 02:32:10 2011
+++ doc/posix-functions/tmpfile.texi Tue Jul 26 02:18:23 2011
@@ -11,12 +11,11 @@
@item
This function often fails for trivial reasons on some platforms:
mingw.
address@hidden
+On platforms where @code{off_t} is a 32-bit type, @code{tmpfile} may not work
+correctly to create files larger than 2 GB. (Cf. @code{AC_SYS_LARGEFILE}.)
@end itemize
Portability problems not fixed by Gnulib:
@itemize
address@hidden
-On platforms where @code{off_t} is a 32-bit type, @code{tmpfile} may not work
-correctly to create files larger than 2 GB. The fix is to use the
address@hidden macro.
@end itemize
--- m4/mkstemp.m4.orig Tue Jul 26 02:32:10 2011
+++ m4/mkstemp.m4 Tue Jul 26 02:31:56 2011
@@ -1,4 +1,4 @@
-#serial 21
+#serial 22
# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -16,7 +16,6 @@
AC_DEFUN([gl_FUNC_MKSTEMP],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_REQUIRE([AC_SYS_LARGEFILE])
AC_CHECK_FUNCS_ONCE([mkstemp])
if test $ac_cv_func_mkstemp = yes; then
--- m4/tempname.m4.orig Tue Jul 26 02:32:10 2011
+++ m4/tempname.m4 Tue Jul 26 02:31:56 2011
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -9,8 +9,6 @@
# it as a public API, and provide it on systems that are lacking.
AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
[
- AC_REQUIRE([AC_SYS_LARGEFILE])
-
gl_PREREQ_TEMPNAME
])
--- modules/fopen.orig Tue Jul 26 02:32:10 2011
+++ modules/fopen Tue Jul 26 02:06:31 2011
@@ -7,6 +7,7 @@
Depends-on:
stdio
+largefile
unistd [test $REPLACE_FOPEN = 1]
configure.ac:
--- modules/freopen.orig Tue Jul 26 02:32:10 2011
+++ modules/freopen Tue Jul 26 02:06:32 2011
@@ -7,6 +7,7 @@
Depends-on:
stdio
+largefile
configure.ac:
gl_FUNC_FREOPEN
--- modules/fseeko.orig Tue Jul 26 02:32:10 2011
+++ modules/fseeko Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
extensions
+largefile
lseek
stdio
# Just to guarantee consistency between fseek() and fseeko().
--- modules/ftello.orig Tue Jul 26 02:32:10 2011
+++ modules/ftello Tue Jul 26 02:06:32 2011
@@ -10,6 +10,7 @@
Depends-on:
stdio
extensions
+largefile
lseek [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1]
# Just to guarantee consistency between ftell() and ftello().
ftell
--- modules/glob.orig Tue Jul 26 02:32:10 2011
+++ modules/glob Tue Jul 26 02:06:32 2011
@@ -10,6 +10,7 @@
Depends-on:
extensions
+largefile
snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
--- modules/lseek.orig Tue Jul 26 02:32:10 2011
+++ modules/lseek Tue Jul 26 02:06:32 2011
@@ -7,6 +7,7 @@
Depends-on:
unistd
+largefile
configure.ac:
gl_FUNC_LSEEK
--- modules/lstat.orig Tue Jul 26 02:32:10 2011
+++ modules/lstat Tue Jul 26 02:06:32 2011
@@ -7,6 +7,7 @@
Depends-on:
sys_stat
+largefile
dosname [test $REPLACE_LSTAT = 1]
stat [test $REPLACE_LSTAT = 1]
--- modules/mkostemp.orig Tue Jul 26 02:32:10 2011
+++ modules/mkostemp Tue Jul 26 02:06:32 2011
@@ -9,6 +9,7 @@
Depends-on:
stdlib
extensions
+largefile
tempname [test $HAVE_MKOSTEMP = 0]
configure.ac:
--- modules/mkostemps.orig Tue Jul 26 02:32:10 2011
+++ modules/mkostemps Tue Jul 26 02:06:32 2011
@@ -9,6 +9,7 @@
Depends-on:
stdlib
extensions
+largefile
tempname [test $HAVE_MKOSTEMPS = 0]
configure.ac:
--- modules/mkstemp.orig Tue Jul 26 02:32:10 2011
+++ modules/mkstemp Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
stdlib
extensions
+largefile
tempname [test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1]
configure.ac:
--- modules/mkstemps.orig Tue Jul 26 02:32:10 2011
+++ modules/mkstemps Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
stdlib
extensions
+largefile
tempname [test $HAVE_MKSTEMPS = 0]
configure.ac:
--- modules/open.orig Tue Jul 26 02:32:10 2011
+++ modules/open Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
fcntl-h
+largefile
stat [test $REPLACE_OPEN = 1]
configure.ac:
--- modules/openat.orig Tue Jul 26 02:32:10 2011
+++ modules/openat Tue Jul 26 02:06:32 2011
@@ -24,6 +24,7 @@
fdopendir
gettext-h
intprops
+largefile
lchown [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
lstat
mkdir [test $HAVE_MKDIRAT = 0]
--- modules/pread.orig Tue Jul 26 02:32:10 2011
+++ modules/pread Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
unistd
extensions
+largefile
lseek [test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1]
read [test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1]
--- modules/pwrite.orig Tue Jul 26 02:32:10 2011
+++ modules/pwrite Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
unistd
extensions
+largefile
lseek [test $HAVE_PWRITE = 0 || test $REPLACE_PWRITE = 1]
write [test $HAVE_PWRITE = 0 || test $REPLACE_PWRITE = 1]
--- modules/scandir.orig Tue Jul 26 02:32:10 2011
+++ modules/scandir Tue Jul 26 02:06:32 2011
@@ -8,6 +8,7 @@
Depends-on:
dirent
extensions
+largefile
configure.ac:
gl_FUNC_SCANDIR
--- modules/stat.orig Tue Jul 26 02:32:10 2011
+++ modules/stat Tue Jul 26 02:06:32 2011
@@ -7,6 +7,7 @@
Depends-on:
sys_stat
+largefile
dosname [test $REPLACE_STAT = 1]
stdbool [test $REPLACE_STAT = 1]
verify [test $REPLACE_STAT = 1]
--- modules/tmpfile.orig Tue Jul 26 02:32:10 2011
+++ modules/tmpfile Tue Jul 26 02:06:32 2011
@@ -7,6 +7,7 @@
Depends-on:
stdio
+largefile
pathmax [test $REPLACE_TMPFILE = 1]
tempname [test $REPLACE_TMPFILE = 1]
tmpdir [test $REPLACE_TMPFILE = 1]
2011-07-25 Bruno Haible <address@hidden>
fseek, ftell: Fix doc.
* doc/posix-functions/fseek.texi: Reword statement about
AC_SYS_LARGEFILE.
* doc/posix-functions/ftell.texi: Likewise.
--- doc/posix-functions/fseek.texi.orig Tue Jul 26 02:28:37 2011
+++ doc/posix-functions/fseek.texi Tue Jul 26 02:18:19 2011
@@ -19,6 +19,6 @@
upon failure.
@item
On platforms where @code{long} is a 32-bit type, @code{fseek} does not work
-correctly with files larger than 2 GB. The fix is to use @code{fseeko}
-instead and to invoke the @code{AC_SYS_LARGEFILE} macro.
+correctly with files larger than 2 GB, even when the @code{AC_SYS_LARGEFILE}
+macro is used. The fix is to use @code{fseeko} instead.
@end itemize
--- doc/posix-functions/ftell.texi.orig Tue Jul 26 02:28:37 2011
+++ doc/posix-functions/ftell.texi Tue Jul 26 02:18:18 2011
@@ -28,6 +28,6 @@
contains Unix line terminators (LF), on some platforms: mingw.
@item
On platforms where @code{long} is a 32-bit type, @code{ftell} does not work
-correctly with files larger than 2 GB. The fix is to use @code{ftello}
-instead and to invoke the @code{AC_SYS_LARGEFILE} macro.
+correctly with files larger than 2 GB, even when the @code{AC_SYS_LARGEFILE}
+macro is used. The fix is to use @code{ftello} instead.
@end itemize
--
In memoriam André Chénier <http://en.wikipedia.org/wiki/André_Chénier>