diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-08-10 21:40:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-08-10 21:40:18 +0000 |
commit | 0d875352b73d4e50c4a578a706378b3e51885126 (patch) | |
tree | 4681287a082d0b009ceb77a851e9171cb7e651d3 /libio/vasprintf.c | |
parent | c31c27256e4735e9d05676aecd9d5be73bbabde1 (diff) | |
download | glibc-0d875352b73d4e50c4a578a706378b3e51885126.tar.gz glibc-0d875352b73d4e50c4a578a706378b3e51885126.tar.xz glibc-0d875352b73d4e50c4a578a706378b3e51885126.zip |
Call __fsetlocking for temporary stream.
Diffstat (limited to 'libio/vasprintf.c')
-rw-r--r-- | libio/vasprintf.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <string.h> #include "libioP.h" #include "stdio.h" +#include <stdio_ext.h> #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; |