From 59a3de2d4e6cda168396b003618880e456a69305 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 27 Jun 2001 23:35:23 +0000 Subject: * sysdeps/mach/hurd/read.c: Include . (__libc_read): Don't call __pread. Use _hurd_fd_read directly instead. * sysdeps/mach/hurd/write.c: Include . (__libc_write): Don't call __pwrite. Use _hurd_fd_write directly instead. * sysdeps/mach/hurd/read.c: Include . (__libc_read): Don't call __pread. Use _hurd_fd_read directly instead. * sysdeps/mach/hurd/write.c: Include . (__libc_write): Don't call __pwrite. Use _hurd_fd_write directly instead. --- sysdeps/mach/hurd/write.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sysdeps/mach/hurd/write.c') diff --git a/sysdeps/mach/hurd/write.c b/sysdeps/mach/hurd/write.c index e9d8c9d539..14c4522180 100644 --- a/sysdeps/mach/hurd/write.c +++ b/sysdeps/mach/hurd/write.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,97,98,99 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,97,98,99,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 @@ -18,11 +18,14 @@ #include #include +#include ssize_t __libc_write (int fd, const void *buf, size_t nbytes) { - return __pwrite (fd, buf, nbytes, (off_t) -1); + error_t err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, + buf, &nbytes, -1)); + return err ? __hurd_dfail (fd, err) : nbytes; } weak_alias (__libc_write, __write) -- cgit 1.4.1