From c254399aae1fb663ff9d3038aa4725213afc2cc3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 24 Apr 2023 19:48:47 +0200 Subject: ftell, ftello: Fix recognition of pipes on native Windows. * m4/lseek.m4 (gl_FUNC_LSEEK): Update comment. * m4/ftello.m4 (gl_FUNC_FTELLO): On native Windows, set REPLACE_FTELLO=1 always. * doc/posix-functions/ftello.texi: Mention the behaviour on pipes. * doc/posix-functions/ftell.texi: Likewise. * doc/posix-functions/fgetpos.texi: Likewise. --- doc/posix-functions/fgetpos.texi | 3 +++ doc/posix-functions/ftell.texi | 3 +++ doc/posix-functions/ftello.texi | 3 +++ 3 files changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/posix-functions/fgetpos.texi b/doc/posix-functions/fgetpos.texi index 89e3acd58f..4a0051ea23 100644 --- a/doc/posix-functions/fgetpos.texi +++ b/doc/posix-functions/fgetpos.texi @@ -19,4 +19,7 @@ Portability problems not fixed by Gnulib: @code{fflush}, @code{ftell}, @code{ftello}, @code{fgetpos} behave incorrectly on input streams that are opened in @code{O_TEXT} mode and whose contents contains Unix line terminators (LF), on some platforms: mingw, MSVC 14. +@item +This function mistakenly succeeds on pipes on some platforms: +mingw 10. @end itemize diff --git a/doc/posix-functions/ftell.texi b/doc/posix-functions/ftell.texi index 5a15dee8ea..5d79f5576b 100644 --- a/doc/posix-functions/ftell.texi +++ b/doc/posix-functions/ftell.texi @@ -20,6 +20,9 @@ This function, when invoked after @code{ungetc}, throws away the @code{ungetc} buffer, changes the stream's file position, and returns the wrong position on some platforms: macOS 10.15 and newer. +@item +This function mistakenly succeeds on pipes on some platforms: +mingw 10. @end itemize Portability problems not fixed by Gnulib: diff --git a/doc/posix-functions/ftello.texi b/doc/posix-functions/ftello.texi index ded1df0c11..4e9427015c 100644 --- a/doc/posix-functions/ftello.texi +++ b/doc/posix-functions/ftello.texi @@ -27,6 +27,9 @@ macOS 10.15 and newer. @item This function fails on seekable stdin, stdout, and stderr: cygwin <= 1.5.24. @item +This function mistakenly succeeds on pipes on some platforms: +mingw 10. +@item On platforms where @code{off_t} is a 32-bit type, @code{ftello} does not work correctly with files 2 GiB and larger. @xref{Large File Support}. @end itemize -- cgit v1.2.1