From 0d875352b73d4e50c4a578a706378b3e51885126 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 10 Aug 2001 21:40:18 +0000 Subject: Call __fsetlocking for temporary stream. --- libio/obprintf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libio/obprintf.c') diff --git a/libio/obprintf.c b/libio/obprintf.c index 20e888269d..c0f0e8c8ff 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 , 1996. @@ -28,6 +28,7 @@ #include #include #include +#include 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); -- cgit 1.4.1