summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-22 23:54:48 +0000
committerRoland McGrath <roland@gnu.org>1999-06-22 23:54:48 +0000
commit725af56f3adb3ea40cc4e58d1c9e0215e71186ba (patch)
treef7e0344392fa34fdd40ebade69002bec57e9c56b /sysdeps/mach
parentde88ee7a6a16c0d871c21226caa587bb78b9fd81 (diff)
downloadglibc-725af56f3adb3ea40cc4e58d1c9e0215e71186ba.tar.gz
glibc-725af56f3adb3ea40cc4e58d1c9e0215e71186ba.tar.xz
glibc-725af56f3adb3ea40cc4e58d1c9e0215e71186ba.zip
1999-06-23 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/read.c (__libc_read): Just call __pread with 
OFFSET argument of (off_t) -1. 
* sysdeps/mach/hurd/write.c (__libc_write): Just call __pwrite with 
OFFSET argument of (off_t) -1.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/read.c5
-rw-r--r--sysdeps/mach/hurd/write.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/mach/hurd/read.c b/sysdeps/mach/hurd/read.c
index f6d8f390b9..7e2b880903 100644
--- a/sysdeps/mach/hurd/read.c
+++ b/sysdeps/mach/hurd/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,97,98,99 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
@@ -25,8 +25,7 @@
 ssize_t
 __libc_read (int fd, void *buf, size_t nbytes)
 {
-  error_t err = HURD_FD_USE (fd, _hurd_fd_read (descriptor, buf, &nbytes));
-  return err ? __hurd_dfail (fd, err) : nbytes;
+  return __pread (fd, buf, nbytes, (off_t) -1);
 }
 
 weak_alias (__libc_read, __read)
diff --git a/sysdeps/mach/hurd/write.c b/sysdeps/mach/hurd/write.c
index 7cd715e5a7..b019cf2023 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 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,97,98,99 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
@@ -24,8 +24,7 @@
 ssize_t
 __libc_write (int fd, const void *buf, size_t nbytes)
 {
-  error_t err = HURD_FD_USE (fd, _hurd_fd_write (descriptor, buf, &nbytes));
-  return err ? __hurd_dfail (fd, err) : nbytes;
+  return __pread (fd, buf, nbytes, (off_t) -1);
 }
 
 weak_alias (__libc_write, __write)