From 6ab6766a05105209c9bca2e662be4e8c258da148 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 25 Sep 2011 23:22:19 +0200 Subject: [PATCH] fflush et al.: Document limitation on MSVC. * doc/posix-functions/fflush.texi: Document possible crash in handling mode other than DEFAULT_HANDLING. * doc/posix-functions/fgetc.texi: Likewise. * doc/posix-functions/fputc.texi: Likewise. * doc/posix-functions/fread.texi: Likewise. * doc/posix-functions/fwrite.texi: Likewise. --- ChangeLog | 10 ++++++++++ doc/posix-functions/fflush.texi | 6 ++++++ doc/posix-functions/fgetc.texi | 6 ++++++ doc/posix-functions/fputc.texi | 6 ++++++ doc/posix-functions/fread.texi | 6 ++++++ doc/posix-functions/fwrite.texi | 6 ++++++ 6 files changed, 40 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0bea9c597..27cdfcd5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2011-09-25 Bruno Haible + fflush et al.: Document limitation on MSVC. + * doc/posix-functions/fflush.texi: Document possible crash in handling + mode other than DEFAULT_HANDLING. + * doc/posix-functions/fgetc.texi: Likewise. + * doc/posix-functions/fputc.texi: Likewise. + * doc/posix-functions/fread.texi: Likewise. + * doc/posix-functions/fwrite.texi: Likewise. + +2011-09-25 Bruno Haible + msvc-inval: Allow three invalid parameter handling modes. * lib/msvc-inval.h: Don't include here. (DEFAULT_HANDLING, HAIRY_LIBRARY_HANDLING, SANE_LIBRARY_HANDLING): New diff --git a/doc/posix-functions/fflush.texi b/doc/posix-functions/fflush.texi index c56d25e2e..9ba3e8ef4 100644 --- a/doc/posix-functions/fflush.texi +++ b/doc/posix-functions/fflush.texi @@ -31,6 +31,12 @@ contains Unix line terminators (LF), on some platforms: mingw, MSVC 9. On Windows platforms (excluding Cygwin), this function does not set @code{errno} upon failure. @item +This function crashes if the stream's file descriptor has already been +closed, if @code{MSVC_INVALID_PARAMETER_HANDLING} is +@code{HAIRY_LIBRARY_HANDLING} or @code{SANE_LIBRARY_HANDLING}, +on some platforms: +MSVC 9. +@item @code{fflush} on an input stream right after @code{ungetc} does not discard the @code{ungetc} buffer, on some platforms: AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, mingw, MSVC 9. diff --git a/doc/posix-functions/fgetc.texi b/doc/posix-functions/fgetc.texi index ea3772e5f..acf7ad7d2 100644 --- a/doc/posix-functions/fgetc.texi +++ b/doc/posix-functions/fgetc.texi @@ -20,4 +20,10 @@ Portability problems not fixed by Gnulib: @item On Windows platforms (excluding Cygwin), this function does not set @code{errno} upon failure. +@item +This function crashes if the stream's file descriptor has already been +closed, if @code{MSVC_INVALID_PARAMETER_HANDLING} is +@code{HAIRY_LIBRARY_HANDLING} or @code{SANE_LIBRARY_HANDLING}, +on some platforms: +MSVC 9. @end itemize diff --git a/doc/posix-functions/fputc.texi b/doc/posix-functions/fputc.texi index 8822806c5..8a9e5f2e6 100644 --- a/doc/posix-functions/fputc.texi +++ b/doc/posix-functions/fputc.texi @@ -32,4 +32,10 @@ upon failure. On some platforms, this function does not set @code{errno} or the stream error indicator on attempts to write to a read-only stream: Cygwin 1.7.9. +@item +This function crashes if the stream's file descriptor has already been +closed, if @code{MSVC_INVALID_PARAMETER_HANDLING} is +@code{HAIRY_LIBRARY_HANDLING} or @code{SANE_LIBRARY_HANDLING}, +on some platforms: +MSVC 9. @end itemize diff --git a/doc/posix-functions/fread.texi b/doc/posix-functions/fread.texi index 31440dd02..1d642495c 100644 --- a/doc/posix-functions/fread.texi +++ b/doc/posix-functions/fread.texi @@ -20,4 +20,10 @@ Portability problems not fixed by Gnulib: @item On Windows platforms (excluding Cygwin), this function does not set @code{errno} upon failure. +@item +This function crashes if the stream's file descriptor has already been +closed, if @code{MSVC_INVALID_PARAMETER_HANDLING} is +@code{HAIRY_LIBRARY_HANDLING} or @code{SANE_LIBRARY_HANDLING}, +on some platforms: +MSVC 9. @end itemize diff --git a/doc/posix-functions/fwrite.texi b/doc/posix-functions/fwrite.texi index 409a7d4c8..73b5427ed 100644 --- a/doc/posix-functions/fwrite.texi +++ b/doc/posix-functions/fwrite.texi @@ -32,4 +32,10 @@ upon failure. On some platforms, this function does not set @code{errno} or the stream error indicator on attempts to write to a read-only stream: Cygwin 1.7.9. +@item +This function crashes if the stream's file descriptor has already been +closed, if @code{MSVC_INVALID_PARAMETER_HANDLING} is +@code{HAIRY_LIBRARY_HANDLING} or @code{SANE_LIBRARY_HANDLING}, +on some platforms: +MSVC 9. @end itemize -- 2.11.0