From 599a664564268f6a1b5895c928a59459c9851b2a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Jul 2011 02:48:03 +0200 Subject: [PATCH] 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. --- ChangeLog | 46 ++++++++++++++++++++++++++++++++++++++ doc/glibc-functions/mkostemp.texi | 7 +++--- doc/glibc-functions/mkostemps.texi | 7 +++--- doc/glibc-functions/mkstemps.texi | 7 +++--- doc/posix-functions/fopen.texi | 7 +++--- doc/posix-functions/freopen.texi | 7 +++--- doc/posix-functions/fseeko.texi | 7 +++--- doc/posix-functions/fstatat.texi | 8 +++---- doc/posix-functions/ftello.texi | 7 +++--- doc/posix-functions/glob.texi | 8 +++---- doc/posix-functions/lseek.texi | 7 +++--- doc/posix-functions/lstat.texi | 8 +++---- doc/posix-functions/mkstemp.texi | 7 +++--- doc/posix-functions/open.texi | 7 +++--- doc/posix-functions/openat.texi | 7 +++--- doc/posix-functions/pread.texi | 7 +++--- doc/posix-functions/pwrite.texi | 7 +++--- doc/posix-functions/scandir.texi | 10 ++++----- doc/posix-functions/stat.texi | 8 +++---- doc/posix-functions/tmpfile.texi | 7 +++--- m4/mkstemp.m4 | 3 +-- m4/tempname.m4 | 4 +--- modules/fopen | 1 + modules/freopen | 1 + modules/fseeko | 1 + modules/ftello | 1 + modules/glob | 1 + modules/lseek | 1 + modules/lstat | 1 + modules/mkostemp | 1 + modules/mkostemps | 1 + modules/mkstemp | 1 + modules/mkstemps | 1 + modules/open | 1 + modules/openat | 1 + modules/pread | 1 + modules/pwrite | 1 + modules/scandir | 1 + modules/stat | 1 + modules/tmpfile | 1 + 40 files changed, 129 insertions(+), 82 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ba89e5de..27ef7ad20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,49 @@ +2011-07-25 Paul Eggert + Bruno Haible + + 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. + 2011-07-25 Bruno Haible fcntl: Move AC_LIBOBJ invocation to module description. diff --git a/doc/glibc-functions/mkostemp.texi b/doc/glibc-functions/mkostemp.texi index f9635ed55..e424b3bfa 100644 --- a/doc/glibc-functions/mkostemp.texi +++ b/doc/glibc-functions/mkostemp.texi @@ -10,14 +10,13 @@ Portability problems fixed by Gnulib: 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. +@item +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 -@item -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 -@code{AC_SYS_LARGEFILE} macro. @end itemize The gnulib module @code{clean-temp} can create temporary files that will not diff --git a/doc/glibc-functions/mkostemps.texi b/doc/glibc-functions/mkostemps.texi index 07e5e18a9..1265cc810 100644 --- a/doc/glibc-functions/mkostemps.texi +++ b/doc/glibc-functions/mkostemps.texi @@ -10,14 +10,13 @@ Portability problems fixed by Gnulib: 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. +@item +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 -@item -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 -@code{AC_SYS_LARGEFILE} macro. @end itemize The gnulib module @code{clean-temp} can create temporary files that will not diff --git a/doc/glibc-functions/mkstemps.texi b/doc/glibc-functions/mkstemps.texi index 5cd0b3bce..e367c951f 100644 --- a/doc/glibc-functions/mkstemps.texi +++ b/doc/glibc-functions/mkstemps.texi @@ -14,14 +14,13 @@ glibc 2.10, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin This function is declared in @code{} instead of @code{} on some platforms: MacOS X 10.5. +@item +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 -@item -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 -@code{AC_SYS_LARGEFILE} macro. @end itemize The gnulib module @code{clean-temp} can create temporary files that will not diff --git a/doc/posix-functions/fopen.texi b/doc/posix-functions/fopen.texi index 77f671d36..167a1477a 100644 --- a/doc/posix-functions/fopen.texi +++ b/doc/posix-functions/fopen.texi @@ -14,6 +14,9 @@ and (without the slash) names a nonexistent file or a file that is not a 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}.) +@item On Windows platforms (excluding Cygwin), this function does usually not recognize the @file{/dev/null} filename. @end itemize @@ -28,10 +31,6 @@ On Windows, this function returns a file stream in ``text'' mode by default; 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 -@code{AC_SYS_LARGEFILE} macro. -@item 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 diff --git a/doc/posix-functions/freopen.texi b/doc/posix-functions/freopen.texi index 23595e003..e1a077a19 100644 --- a/doc/posix-functions/freopen.texi +++ b/doc/posix-functions/freopen.texi @@ -9,6 +9,9 @@ Gnulib module: freopen 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}.) +@item On Windows platforms (excluding Cygwin), this function does usually not recognize the @file{/dev/null} filename. @end itemize @@ -24,10 +27,6 @@ and (without the slash) names a nonexistent file or a file that is not a 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 -@code{AC_SYS_LARGEFILE} macro. -@item 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}, diff --git a/doc/posix-functions/fseeko.texi b/doc/posix-functions/fseeko.texi index 34095cfea..65fe5c778 100644 --- a/doc/posix-functions/fseeko.texi +++ b/doc/posix-functions/fseeko.texi @@ -17,15 +17,14 @@ on some platforms: glibc 2.3.6, OSF/1 5.1. @item This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24. +@item +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 -@code{AC_SYS_LARGEFILE} macro. -@item 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. diff --git a/doc/posix-functions/fstatat.texi b/doc/posix-functions/fstatat.texi index e146fa292..471522c21 100644 --- a/doc/posix-functions/fstatat.texi +++ b/doc/posix-functions/fstatat.texi @@ -14,6 +14,10 @@ glibc 2.3.6, 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, 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}.) +@item On some platforms, @code{fstatat(fd,"file/",buf,flag)} succeeds instead of failing with @code{ENOTDIR}. Solaris 9. @@ -26,10 +30,6 @@ Solaris 9. 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. -@item On Windows platforms (excluding Cygwin), @code{st_ino} is always 0. @item On some file systems, @code{st_size} contains bogus information for diff --git a/doc/posix-functions/ftello.texi b/doc/posix-functions/ftello.texi index 2a33a7f0c..534fbe0cb 100644 --- a/doc/posix-functions/ftello.texi +++ b/doc/posix-functions/ftello.texi @@ -21,15 +21,14 @@ This function produces incorrect results after @code{putc} that followed a Solaris 11 2010-11. @item This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24. +@item +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 -@code{AC_SYS_LARGEFILE} macro. -@item This function produces incorrect results immediately after @code{fseek} on some platforms: HP-UX 11. diff --git a/doc/posix-functions/glob.texi b/doc/posix-functions/glob.texi index 1f236bf0c..648272929 100644 --- a/doc/posix-functions/glob.texi +++ b/doc/posix-functions/glob.texi @@ -14,14 +14,14 @@ IRIX 5.3, mingw, BeOS. @item This function may list symbolic links to nonexistent files among the results, on some platforms. +@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. +(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. -@item Some platforms may store additional flags in the @code{gl_flags} field. @end itemize diff --git a/doc/posix-functions/lseek.texi b/doc/posix-functions/lseek.texi index 3a19327cd..f709515f6 100644 --- a/doc/posix-functions/lseek.texi +++ b/doc/posix-functions/lseek.texi @@ -9,6 +9,9 @@ Gnulib module: lseek 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}.) +@item This function mistakenly succeeds on pipes on some platforms: mingw, BeOS. @end itemize @@ -19,10 +22,6 @@ POSIX does not specify which file descriptors support seeking and which don't. 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 -@code{AC_SYS_LARGEFILE} macro. -@item 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: diff --git a/doc/posix-functions/lstat.texi b/doc/posix-functions/lstat.texi index 2989678af..8ffa66f5c 100644 --- a/doc/posix-functions/lstat.texi +++ b/doc/posix-functions/lstat.texi @@ -9,6 +9,10 @@ Gnulib module: lstat 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}.) +@item For symlinks, when the argument ends in a slash, some platforms don't dereference the argument: Solaris 9. @@ -24,10 +28,6 @@ On Windows platforms (excluding Cygwin), symlinks are not supported, so 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. -@item 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 diff --git a/doc/posix-functions/mkstemp.texi b/doc/posix-functions/mkstemp.texi index b31bd07bc..e461b2790 100644 --- a/doc/posix-functions/mkstemp.texi +++ b/doc/posix-functions/mkstemp.texi @@ -20,6 +20,9 @@ On some platforms (HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a silly 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}.) +@item 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 @@ writable or readable file, if you haven't set the process umask to Portability problems not fixed by Gnulib: @itemize -@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. The fix is to use the -@code{AC_SYS_LARGEFILE} macro. @end itemize The gnulib module @code{clean-temp} can create temporary files that will not diff --git a/doc/posix-functions/open.texi b/doc/posix-functions/open.texi index 55b333cc7..de10f9f0d 100644 --- a/doc/posix-functions/open.texi +++ b/doc/posix-functions/open.texi @@ -9,6 +9,9 @@ Gnulib module: open, fchdir 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}.) +@item 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 @@ Portability problems not fixed by Gnulib: 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. -@item -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 -@code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/doc/posix-functions/openat.texi b/doc/posix-functions/openat.texi index 631151541..6b4d69fb6 100644 --- a/doc/posix-functions/openat.texi +++ b/doc/posix-functions/openat.texi @@ -14,6 +14,9 @@ glibc 2.3.6, 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, 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}.) +@item 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 @@ Solaris 9. Portability problems not fixed by Gnulib: @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. The fix is to use the -@code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/doc/posix-functions/pread.texi b/doc/posix-functions/pread.texi index b86e8a412..55dd72d13 100644 --- a/doc/posix-functions/pread.texi +++ b/doc/posix-functions/pread.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: 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}.) +@item 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 @@ HP-UX 11.31. 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 files larger than 2 GB. The fix is to use the -@code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/doc/posix-functions/pwrite.texi b/doc/posix-functions/pwrite.texi index 713e07e4d..c214a54d1 100644 --- a/doc/posix-functions/pwrite.texi +++ b/doc/posix-functions/pwrite.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: 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}.) +@item 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 @@ HP-UX 11.11. 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 files larger than 2 GB. The fix is to use the -@code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/doc/posix-functions/scandir.texi b/doc/posix-functions/scandir.texi index 6a7f29428..710f77ccc 100644 --- a/doc/posix-functions/scandir.texi +++ b/doc/posix-functions/scandir.texi @@ -11,6 +11,11 @@ Portability problems fixed by Gnulib: @item This function is missing on some platforms: Solaris 9, mingw, BeOS. +@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. 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 @@ glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5. @item The fourth parameter of this function is declared as @code{int (*) (void *, void *)} on some platforms: AIX 5.1. -@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. 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 diff --git a/doc/posix-functions/stat.texi b/doc/posix-functions/stat.texi index c10896e99..18303f6b1 100644 --- a/doc/posix-functions/stat.texi +++ b/doc/posix-functions/stat.texi @@ -9,6 +9,10 @@ Gnulib module: stat 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}.) +@item 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 @@ mingw. 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. -@item Cygwin's @code{stat} function sometimes sets @code{errno} to @code{EACCES} when @code{ENOENT} would be more appropriate. @item diff --git a/doc/posix-functions/tmpfile.texi b/doc/posix-functions/tmpfile.texi index 186683603..69aa9a4ec 100644 --- a/doc/posix-functions/tmpfile.texi +++ b/doc/posix-functions/tmpfile.texi @@ -11,12 +11,11 @@ Portability problems fixed by Gnulib: @item This function often fails for trivial reasons on some platforms: mingw. +@item +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 -@item -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 -@code{AC_SYS_LARGEFILE} macro. @end itemize diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 index 0bc918c10..ef3c68966 100644 --- a/m4/mkstemp.m4 +++ b/m4/mkstemp.m4 @@ -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 diff --git a/m4/tempname.m4 b/m4/tempname.m4 index 633b6719a..5b726a691 100644 --- a/m4/tempname.m4 +++ b/m4/tempname.m4 @@ -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 ]) diff --git a/modules/fopen b/modules/fopen index 13799e987..64a7559e6 100644 --- a/modules/fopen +++ b/modules/fopen @@ -7,6 +7,7 @@ m4/fopen.m4 Depends-on: stdio +largefile unistd [test $REPLACE_FOPEN = 1] configure.ac: diff --git a/modules/freopen b/modules/freopen index 8704c04f4..4a355b092 100644 --- a/modules/freopen +++ b/modules/freopen @@ -7,6 +7,7 @@ m4/freopen.m4 Depends-on: stdio +largefile configure.ac: gl_FUNC_FREOPEN diff --git a/modules/fseeko b/modules/fseeko index 07f78e555..75b129ca5 100644 --- a/modules/fseeko +++ b/modules/fseeko @@ -8,6 +8,7 @@ m4/fseeko.m4 Depends-on: extensions +largefile lseek stdio # Just to guarantee consistency between fseek() and fseeko(). diff --git a/modules/ftello b/modules/ftello index 73aa81157..b64d80eea 100644 --- a/modules/ftello +++ b/modules/ftello @@ -10,6 +10,7 @@ m4/ftello.m4 Depends-on: stdio extensions +largefile lseek [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1] # Just to guarantee consistency between ftell() and ftello(). ftell diff --git a/modules/glob b/modules/glob index 5a8b4aefe..a731c2723 100644 --- a/modules/glob +++ b/modules/glob @@ -10,6 +10,7 @@ m4/glob.m4 Depends-on: extensions +largefile snippet/arg-nonnull snippet/c++defs snippet/warn-on-use diff --git a/modules/lseek b/modules/lseek index 5b4a267a6..0fc7923f6 100644 --- a/modules/lseek +++ b/modules/lseek @@ -7,6 +7,7 @@ m4/lseek.m4 Depends-on: unistd +largefile configure.ac: gl_FUNC_LSEEK diff --git a/modules/lstat b/modules/lstat index dbe7e1150..7fe97caab 100644 --- a/modules/lstat +++ b/modules/lstat @@ -7,6 +7,7 @@ m4/lstat.m4 Depends-on: sys_stat +largefile dosname [test $REPLACE_LSTAT = 1] stat [test $REPLACE_LSTAT = 1] diff --git a/modules/mkostemp b/modules/mkostemp index 299b01f27..ee0ae4acf 100644 --- a/modules/mkostemp +++ b/modules/mkostemp @@ -9,6 +9,7 @@ m4/mkostemp.m4 Depends-on: stdlib extensions +largefile tempname [test $HAVE_MKOSTEMP = 0] configure.ac: diff --git a/modules/mkostemps b/modules/mkostemps index 2061f6951..fb956f9c5 100644 --- a/modules/mkostemps +++ b/modules/mkostemps @@ -9,6 +9,7 @@ m4/mkostemps.m4 Depends-on: stdlib extensions +largefile tempname [test $HAVE_MKOSTEMPS = 0] configure.ac: diff --git a/modules/mkstemp b/modules/mkstemp index 9ac5b3fe6..780908fea 100644 --- a/modules/mkstemp +++ b/modules/mkstemp @@ -8,6 +8,7 @@ m4/mkstemp.m4 Depends-on: stdlib extensions +largefile tempname [test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1] configure.ac: diff --git a/modules/mkstemps b/modules/mkstemps index cb3e5722f..61af8d5fc 100644 --- a/modules/mkstemps +++ b/modules/mkstemps @@ -8,6 +8,7 @@ m4/mkstemps.m4 Depends-on: stdlib extensions +largefile tempname [test $HAVE_MKSTEMPS = 0] configure.ac: diff --git a/modules/open b/modules/open index bf471380b..a504aee9c 100644 --- a/modules/open +++ b/modules/open @@ -8,6 +8,7 @@ m4/mode_t.m4 Depends-on: fcntl-h +largefile stat [test $REPLACE_OPEN = 1] configure.ac: diff --git a/modules/openat b/modules/openat index b9ce4d46a..5b32d8549 100644 --- a/modules/openat +++ b/modules/openat @@ -24,6 +24,7 @@ fcntl-h fdopendir gettext-h intprops +largefile lchown [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1] lstat mkdir [test $HAVE_MKDIRAT = 0] diff --git a/modules/pread b/modules/pread index 537563a9d..7281cd6ad 100644 --- a/modules/pread +++ b/modules/pread @@ -8,6 +8,7 @@ m4/pread.m4 Depends-on: unistd extensions +largefile lseek [test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1] read [test $HAVE_PREAD = 0 || test $REPLACE_PREAD = 1] diff --git a/modules/pwrite b/modules/pwrite index aadce1ef3..78843d4bc 100644 --- a/modules/pwrite +++ b/modules/pwrite @@ -8,6 +8,7 @@ m4/pwrite.m4 Depends-on: unistd extensions +largefile lseek [test $HAVE_PWRITE = 0 || test $REPLACE_PWRITE = 1] write [test $HAVE_PWRITE = 0 || test $REPLACE_PWRITE = 1] diff --git a/modules/scandir b/modules/scandir index e071e5440..54b57dfc1 100644 --- a/modules/scandir +++ b/modules/scandir @@ -8,6 +8,7 @@ m4/scandir.m4 Depends-on: dirent extensions +largefile configure.ac: gl_FUNC_SCANDIR diff --git a/modules/stat b/modules/stat index 8a349a73e..46434215f 100644 --- a/modules/stat +++ b/modules/stat @@ -7,6 +7,7 @@ m4/stat.m4 Depends-on: sys_stat +largefile dosname [test $REPLACE_STAT = 1] stdbool [test $REPLACE_STAT = 1] verify [test $REPLACE_STAT = 1] diff --git a/modules/tmpfile b/modules/tmpfile index d3a97fe89..e98a8ee5a 100644 --- a/modules/tmpfile +++ b/modules/tmpfile @@ -7,6 +7,7 @@ m4/tmpfile.m4 Depends-on: stdio +largefile pathmax [test $REPLACE_TMPFILE = 1] tempname [test $REPLACE_TMPFILE = 1] tmpdir [test $REPLACE_TMPFILE = 1] -- 2.11.0