about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/fcloseall.c5
-rw-r--r--libio/genops.c8
-rw-r--r--libio/libioP.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/libio/fcloseall.c b/libio/fcloseall.c
index cd01655450..9b980c6cde 100644
--- a/libio/fcloseall.c
+++ b/libio/fcloseall.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
 
    This library is free software; you can redistribute it and/or
@@ -30,8 +30,7 @@ int
 __fcloseall ()
 {
   /* Close all streams.  */
-  _IO_cleanup ();
-  return 0;
+  return _IO_cleanup ();
 }
 
 #ifdef weak_alias
diff --git a/libio/genops.c b/libio/genops.c
index ea602eda39..b0334d6d0e 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
 
    This library is free software; you can redistribute it and/or
@@ -714,10 +714,10 @@ _IO_unbuffer_all ()
       _IO_SETBUF (fp, NULL, 0);
 }
 
-void
+int
 _IO_cleanup ()
 {
-  _IO_flush_all ();
+  int result = _IO_flush_all ();
 
   /* We currently don't have a reliable mechanism for making sure that
      C++ static destructors are executed in the correct order.
@@ -727,6 +727,8 @@ _IO_cleanup ()
      The following will make the standard streambufs be unbuffered,
      which forces any output from late destructors to be written out. */
   _IO_unbuffer_all ();
+
+  return result;
 }
 
 
diff --git a/libio/libioP.h b/libio/libioP.h
index 0452c7758f..8e8e61843a 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -341,7 +341,7 @@ extern struct _IO_jump_t _IO_str_jumps;
 extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
 extern int _IO_old_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
 extern int _IO_flush_all __P ((void));
-extern void _IO_cleanup __P ((void));
+extern int _IO_cleanup __P ((void));
 extern void _IO_flush_all_linebuffered __P ((void));
 
 #define _IO_do_flush(_f) \