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/vasprintf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libio/vasprintf.c') diff --git a/libio/vasprintf.c b/libio/vasprintf.c index 852de2367b..8dda7d9b1b 100644 --- a/libio/vasprintf.c +++ b/libio/vasprintf.c @@ -29,6 +29,7 @@ #include #include "libioP.h" #include "stdio.h" +#include #include "strfile.h" int @@ -60,6 +61,9 @@ _IO_vasprintf (result_ptr, format, args) sf._sbf._f._flags &= ~_IO_USER_BUF; sf._s._allocate_buffer = (_IO_alloc_type) malloc; sf._s._free_buffer = (_IO_free_type) free; +#ifdef _IO_MTSAFE_IO + __fsetlocking ((FILE *) &sf, FSETLOCKING_BYCALLER); +#endif ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args); if (ret < 0) return ret; -- cgit v1.2.3