-/* Copyright (C) 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997-2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include "libioP.h"
#include "libio.h"
+#include <stdio_ext.h>
int
_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);
/* 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.
#include <errno.h>
#include <obstack.h>
#include <stdarg.h>
+#include <stdio_ext.h>
struct _IO_obstack_file
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);
-/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include "strfile.h"
#include "libioP.h"
#include <string.h>
+#include <stdio_ext.h>
#if 0
/* The following definitions are for exposition only.
}
/* A null _allocate_buffer function flags the strfile as being static. */
sf->_s._allocate_buffer = (_IO_alloc_type) 0;
+
+#ifdef _IO_MTSAFE_IO
+ /* We never have to lock this stream. */
+ __fsetlocking ((FILE *) fp, FSETLOCKING_BYCALLER);
+#endif
}
void
#include <string.h>
#include "libioP.h"
#include "stdio.h"
+#include <stdio_ext.h>
#include "strfile.h"
int
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;
-/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include "libioP.h"
#include <string.h>
#include <wchar.h>
+#include <stdio_ext.h>
#if 0
/* The following definitions are for exposition only.
}
/* A null _allocate_buffer function flags the strfile as being static. */
(((_IO_strfile *) fp)->_s._allocate_buffer) = (_IO_alloc_type)0;
+
+#ifdef _IO_MTSAFE_IO
+ /* We never have to lock this stream. */
+ __fsetlocking ((FILE *) fp, FSETLOCKING_BYCALLER);
+#endif
}
void