summaryrefslogtreecommitdiff
path: root/libio/iovdprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-11 05:19:24 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-11 05:19:24 +0000
commitc020d48c6e91b351cefebbc7a82a9c1ec2d9d83b (patch)
tree28f297727c45d6197e23e00356713030cc9cc9fb /libio/iovdprintf.c
parent07ba7349279441bd084c8661a4e53c19cba12bf6 (diff)
downloadglibc-c020d48c6e91b351cefebbc7a82a9c1ec2d9d83b.tar.gz
Update.
* libio/iovdprintf.c (_IO_vdprintf): Set _IO_USER_LOCK flag for temporary stream. Don't define lock. * libio/iovsprintf.c: Likewise. * libio/iovsnprintf.c: Likewise. * libio/iovswprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * libio/iovswscanf.c: Likewise. * stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Likewise. * libio/genops.c (_IO_no_init): Don't call _IO_lock_init if _lock is NULL. (_IO_default_finish): Likewise. * libio/wgenops.c (_IO_wdefault_finish): Likewise.
Diffstat (limited to 'libio/iovdprintf.c')
-rw-r--r--libio/iovdprintf.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/libio/iovdprintf.c b/libio/iovdprintf.c
index d7c656a459..636259e382 100644
--- a/libio/iovdprintf.c
+++ b/libio/iovdprintf.c
@@ -36,22 +36,19 @@ _IO_vdprintf (d, format, arg)
_IO_va_list arg;
{
struct _IO_FILE_plus tmpfil;
-#ifdef _IO_MTSAFE_IO
- _IO_lock_t lock;
-#endif
struct _IO_wide_data wd;
int done;
#ifdef _IO_MTSAFE_IO
- tmpfil.file._lock = &lock;
+ tmpfil.file._lock = NULL;
#endif
- _IO_no_init (&tmpfil.file, 0, 0, &wd, &_IO_wfile_jumps);
+ _IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &_IO_wfile_jumps);
_IO_JUMPS (&tmpfil) = &_IO_file_jumps;
_IO_file_init (&tmpfil);
#if !_IO_UNIFIED_JUMPTABLES
tmpfil.vtable = NULL;
#endif
- if (_IO_file_attach ((_IO_FILE *) &tmpfil, d) == NULL)
+ if (_IO_file_attach (&tmpfil.file, d) == NULL)
{
_IO_un_link (&tmpfil);
return EOF;
@@ -60,13 +57,10 @@ _IO_vdprintf (d, format, arg)
(_IO_mask_flags (&tmpfil.file, _IO_NO_READS,
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING)
| _IO_DELETE_DONT_CLOSE);
-#ifdef _IO_MTSAFE_IO
- __fsetlocking ((FILE *) &tmpfil, FSETLOCKING_BYCALLER);
-#endif
- done = _IO_vfprintf ((_IO_FILE *) &tmpfil, format, arg);
+ done = _IO_vfprintf (&tmpfil.file, format, arg);
- _IO_FINISH ((_IO_FILE *) &tmpfil);
+ _IO_FINISH (&tmpfil.file);
return done;
}