aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/.cvsignore7
-rw-r--r--libio/cleanup.c2
-rw-r--r--libio/filedoalloc.c10
3 files changed, 13 insertions, 6 deletions
diff --git a/libio/.cvsignore b/libio/.cvsignore
new file mode 100644
index 0000000..b699a6e
--- /dev/null
+++ b/libio/.cvsignore
@@ -0,0 +1,7 @@
+*.gz *.Z *.tar *.tgz
+=*
+TODO COPYING* AUTHORS copyr-* copying.*
+glibc-*
+
+mpn-copy.mk
+distinfo
diff --git a/libio/cleanup.c b/libio/cleanup.c
index b4c8be9..a0c5052 100644
--- a/libio/cleanup.c
+++ b/libio/cleanup.c
@@ -12,4 +12,6 @@ DEFUN_VOID(_IO_register_cleanup)
}
void (*_IO_cleanup_registration_needed)() = _IO_register_cleanup;
+#else
+void (*_IO_cleanup_registration_needed)() = NULL;
#endif /* _G_HAVE_ATEXIT */
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index 8ab1738..0ebb75d 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -49,12 +49,6 @@ the executable file might be covered by the GNU General Public License. */
#include <stdlib.h>
#endif
-/* If this function pointer is non-zero, we should call it.
- It's supposed to make sure _IO_cleanup gets called on exit.
- We call it from _IO_file_doallocate, since that is likely
- to get called by any program that does buffered I/O. */
-void (*_IO_cleanup_registration_needed)();
-
/*
* Allocate a file buffer, or switch to unbuffered I/O.
* Per the ANSI C standard, ALL tty devices default to line buffered.
@@ -72,6 +66,10 @@ DEFUN(_IO_file_doallocate, (fp),
register char *p;
struct stat st;
+ /* If _IO_cleanup_registration_needed is non-zero, we should call the
+ function it points to. This is to make sure _IO_cleanup gets called
+ on exit. We call it from _IO_file_doallocate, since that is likely
+ to get called by any program that does buffered I/O. */
if (_IO_cleanup_registration_needed)
(*_IO_cleanup_registration_needed)();