X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffwriteerror.h;h=24d8e0ad4478ab3e0ab9d9f6be843873f257fe49;hb=bbdcfead98c6d3536215c3f0f603e4f92a28d26b;hp=570023778875a4942ddac8461fedcb688e1ee474;hpb=cf1c745c2a777e95ca4219019847426fec947738;p=gnulib.git diff --git a/lib/fwriteerror.h b/lib/fwriteerror.h index 570023778..24d8e0ad4 100644 --- a/lib/fwriteerror.h +++ b/lib/fwriteerror.h @@ -1,5 +1,5 @@ /* Detect write error on a stream. - Copyright (C) 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* There are two approaches for detecting a write error on a stream opened for writing: @@ -40,6 +40,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* Write out the not yet written buffered contents of the stream FP, close the stream FP, and test whether some error occurred on the stream FP. FP must be a stream opened for writing. @@ -49,3 +53,11 @@ For any given stream FP other than stdout, fwriteerror (FP) may only be called once. */ extern int fwriteerror (FILE *fp); + +/* Likewise, but don't consider it an error if FP has an invalid file + descriptor and no output was done to FP. */ +extern int fwriteerror_no_ebadf (FILE *fp); + +#ifdef __cplusplus +} +#endif