aboutsummaryrefslogtreecommitdiff
path: root/libio/obprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-10 21:40:18 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-10 21:40:18 +0000
commit0d875352b73d4e50c4a578a706378b3e51885126 (patch)
tree4681287a082d0b009ceb77a851e9171cb7e651d3 /libio/obprintf.c
parentc31c27256e4735e9d05676aecd9d5be73bbabde1 (diff)
downloadglibc-0d875352b73d4e50c4a578a706378b3e51885126.zip
glibc-0d875352b73d4e50c4a578a706378b3e51885126.tar.gz
glibc-0d875352b73d4e50c4a578a706378b3e51885126.tar.bz2
Call __fsetlocking for temporary stream.
Diffstat (limited to 'libio/obprintf.c')
-rw-r--r--libio/obprintf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/obprintf.c b/libio/obprintf.c
index 20e8882..c0f0e8c 100644
--- a/libio/obprintf.c
+++ b/libio/obprintf.c
@@ -1,5 +1,5 @@
/* Print output of stream to given obstack.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -28,6 +28,7 @@
#include <errno.h>
#include <obstack.h>
#include <stdarg.h>
+#include <stdio_ext.h>
struct _IO_obstack_file
@@ -166,6 +167,9 @@ _IO_obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
obstack_blank_fast (obstack, room);
new_f.ofile.obstack = obstack;
+#ifdef _IO_MTSAFE_IO
+ __fsetlocking ((FILE *) &new_f.ofile.file, FSETLOCKING_BYCALLER);
+#endif
result = _IO_vfprintf ((_IO_FILE *) &new_f.ofile.file, format, args);