mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
* hurd/vpprintf.c [USE_IN_LIBIO]: Include <libioP.h>. (do_write): Renamed from pwrite. (vpprintf) [USE_IN_LIBIO]: Adjust for renaming and reshufling of `struct _IO_cookie_file'.
2000-07-07 Mark Kettenis <kettenis@gnu.org> * hurd/vpprintf.c [USE_IN_LIBIO]: Include <libioP.h>. (do_write): Renamed from pwrite. (vpprintf) [USE_IN_LIBIO]: Adjust for renaming and reshufling of `struct _IO_cookie_file'.
This commit is contained in:
parent
d6a250638f
commit
f5dcffc584
@ -1,3 +1,10 @@
|
|||||||
|
2000-07-07 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* hurd/vpprintf.c [USE_IN_LIBIO]: Include <libioP.h>.
|
||||||
|
(do_write): Renamed from pwrite.
|
||||||
|
(vpprintf) [USE_IN_LIBIO]: Adjust for renaming and reshufling of
|
||||||
|
`struct _IO_cookie_file'.
|
||||||
|
|
||||||
2000-07-07 Ulrich Drepper <drepper@redhat.com>
|
2000-07-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* malloc/mtrace.pl: Exit with exit code 1 if any leak was
|
* malloc/mtrace.pl: Exit with exit code 1 if any leak was
|
||||||
|
@ -21,10 +21,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
|
|
||||||
|
#ifdef USE_IN_LIBIO
|
||||||
|
# include <libioP.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
pwrite (void *cookie,
|
do_write (void *cookie, const char *buf, size_t n)
|
||||||
const char *buf,
|
|
||||||
size_t n)
|
|
||||||
{
|
{
|
||||||
error_t error = __io_write ((io_t) cookie, buf, n, -1,
|
error_t error = __io_write ((io_t) cookie, buf, n, -1,
|
||||||
(mach_msg_type_number_t *) &n);
|
(mach_msg_type_number_t *) &n);
|
||||||
@ -36,9 +38,7 @@ pwrite (void *cookie,
|
|||||||
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
|
||||||
according to the format string FORMAT, using the argument list in ARG. */
|
according to the format string FORMAT, using the argument list in ARG. */
|
||||||
int
|
int
|
||||||
vpprintf (io_t port,
|
vpprintf (io_t port, const char *format, va_list arg)
|
||||||
const char *format,
|
|
||||||
va_list arg)
|
|
||||||
{
|
{
|
||||||
int done;
|
int done;
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ vpprintf (io_t port,
|
|||||||
#endif
|
#endif
|
||||||
} temp_f;
|
} temp_f;
|
||||||
#ifdef _IO_MTSAFE_IO
|
#ifdef _IO_MTSAFE_IO
|
||||||
temp_f.cfile.__file._lock = &temp_f.lock;
|
temp_f.cfile.__fp.file._lock = &temp_f.lock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_IO_cookie_init (&temp_f.cfile, _IO_NO_READS,
|
_IO_cookie_init (&temp_f.cfile, _IO_NO_READS,
|
||||||
(void *) port, (cookie_io_functions_t) { write: pwrite });
|
(void *) port, (cookie_io_functions_t) { write: do_write });
|
||||||
|
|
||||||
done = _IO_vfprintf (&temp_f.cfile.__file, format, arg);
|
done = _IO_vfprintf (&temp_f.cfile.__fp, format, arg);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ vpprintf (io_t port,
|
|||||||
f.__mode.__write = 1;
|
f.__mode.__write = 1;
|
||||||
f.__cookie = (void *) port;
|
f.__cookie = (void *) port;
|
||||||
f.__room_funcs = __default_room_functions;
|
f.__room_funcs = __default_room_functions;
|
||||||
f.__io_funcs.__write = pwrite;
|
f.__io_funcs.__write = do_write;
|
||||||
f.__seen = 1;
|
f.__seen = 1;
|
||||||
f.__userbuf = 1;
|
f.__userbuf = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user