diff options
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/fd-read.c | 4 | ||||
-rw-r--r-- | hurd/fd-write.c | 4 | ||||
-rw-r--r-- | hurd/fopenport.c | 21 | ||||
-rw-r--r-- | hurd/hurd/fd.h | 7 | ||||
-rw-r--r-- | hurd/lookup-retry.c | 4 |
5 files changed, 13 insertions, 27 deletions
diff --git a/hurd/fd-read.c b/hurd/fd-read.c index 2e2cd16..55dbc24 100644 --- a/hurd/fd-read.c +++ b/hurd/fd-read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,94,95,97,99 Free Software Foundation, Inc. +/* Copyright (C) 1993,94,95,97,99,2002 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 @@ -23,7 +23,7 @@ #include <string.h> error_t -_hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, off_t offset) +_hurd_fd_read (struct hurd_fd *fd, void *buf, size_t *nbytes, loff_t offset) { error_t err; char *data; diff --git a/hurd/fd-write.c b/hurd/fd-write.c index 23dcbe3..b695817 100644 --- a/hurd/fd-write.c +++ b/hurd/fd-write.c @@ -1,5 +1,5 @@ /* _hurd_fd_write -- write to a file descriptor; handles job control et al. - Copyright (C) 1993,94,95,97,99 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,97,99,2002 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,7 +24,7 @@ error_t _hurd_fd_write (struct hurd_fd *fd, - const void *buf, size_t *nbytes, off_t offset) + const void *buf, size_t *nbytes, loff_t offset) { error_t err; mach_msg_type_number_t wrote; diff --git a/hurd/fopenport.c b/hurd/fopenport.c index 869b391..5dcb5ab 100644 --- a/hurd/fopenport.c +++ b/hurd/fopenport.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994,95,97,2000,01 Free Software Foundation, Inc. +/* Copyright (C) 1994,95,97,2000,01,02 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 @@ -70,23 +70,8 @@ seekio (void *cookie, #endif int whence) { - off_t res; - error_t error; - - /* XXX We don't really support large files on the Hurd. So if POS - doesn't fit in an `off_t', we'll return `-1' and set errno. EOVERFLOW - probably isn't the right error value, but seems appropriate here. */ - if ((off_t) *pos != *pos) - { - __set_errno (EOVERFLOW); - return -1; - } - - error = __io_seek ((file_t) cookie, *pos, whence, &res); - if (error) - return __hurd_fail (error); - *pos = res; - return 0; + error_t err = __io_seek ((file_t) cookie, *pos, whence, pos); + return err ? __hurd_fail (err) : 0; } /* Close the file associated with COOKIE. diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h index 55c6a0e..198791b 100644 --- a/hurd/hurd/fd.h +++ b/hurd/hurd/fd.h @@ -1,5 +1,6 @@ /* File descriptors. - Copyright (C) 1993,94,95,96,97,98,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,97,98,99,2000,01,02 + 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 @@ -214,9 +215,9 @@ extern error_t _hurd_fd_close (struct hurd_fd *fd); If successful, stores the amount actually read or written in *NBYTES. */ extern error_t _hurd_fd_read (struct hurd_fd *fd, - void *buf, size_t *nbytes, off_t offset); + void *buf, size_t *nbytes, loff_t offset); extern error_t _hurd_fd_write (struct hurd_fd *fd, - const void *buf, size_t *nbytes, off_t offset); + const void *buf, size_t *nbytes, loff_t offset); /* Call *RPC on PORT and/or CTTY; if a call on CTTY returns EBACKGROUND, diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c index 736f5e5..f6f77a6 100644 --- a/hurd/lookup-retry.c +++ b/hurd/lookup-retry.c @@ -1,5 +1,5 @@ /* hairy bits of Hurd file name lookup - Copyright (C) 1992,93,94,95,96,97,99,2001 Free Software Foundation, Inc. + Copyright (C) 1992,93,94,95,96,97,99,2001,02 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 @@ -136,7 +136,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) we follow root-owned symlinks; if that is deemed undesireable, we can add a final check for that one exception to our general translator-based rule. */ - struct stat st; + struct stat64 st; err = __io_stat (*result, &st); if (!err && (st.st_mode & (S_IPTRANS|S_IATRANS))) |