summaryrefslogtreecommitdiff
path: root/hurd/hurd/fd.h
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurd/fd.h')
-rw-r--r--hurd/hurd/fd.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index bd6001b310..af5fdcf759 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -1,5 +1,5 @@
/* File descriptors.
- Copyright (C) 1993-2016 Free Software Foundation, Inc.
+ Copyright (C) 1993-2018 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
@@ -26,7 +26,9 @@
#include <hurd/hurd_types.h>
#include <hurd/port.h>
#include <sys/socket.h>
+#include <sys/select.h>
#include <fcntl.h>
+#include <bits/types/sigset_t.h>
/* Structure representing a file descriptor. */
@@ -62,7 +64,7 @@ extern struct mutex _hurd_dtable_lock; /* Locks those two variables. */
extern struct hurd_fd *_hurd_fd_get (int fd);
#if defined __USE_EXTERN_INLINES && defined _LIBC
-# if IS_IN (libc)
+# if IS_IN (libc)
_HURD_FD_H_EXTERN_INLINE struct hurd_fd *
_hurd_fd_get (int fd)
{
@@ -95,7 +97,7 @@ _hurd_fd_get (int fd)
return descriptor;
}
-# endif
+# endif
#endif
@@ -140,6 +142,7 @@ _hurd_fd_get (int fd)
__result; })
#include <errno.h>
+#include <bits/types/error_t.h>
/* Check if ERR should generate a signal.
Returns the signal to take, or zero if none. */
@@ -179,7 +182,7 @@ _hurd_fd_error (int fd, error_t err)
if (signo)
{
const struct hurd_signal_detail detail
- = { code: fd, error: err, exc: 0 };
+ = { exc: 0, exc_code: 0, exc_subcode: 0, code: fd, error: err };
_hurd_raise_signal (NULL, signo, &detail);
}
return err;
@@ -252,9 +255,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, loff_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, loff_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,
@@ -281,7 +284,7 @@ extern int _hurd_select (int nfds, struct pollfd *pollfds,
__hurd_file_name_lookup. */
#if defined __USE_EXTERN_INLINES && defined _LIBC
-# if IS_IN (libc)
+# if IS_IN (libc)
_HURD_FD_H_EXTERN_INLINE error_t
__hurd_at_flags (int *at_flags, int *flags)
{
@@ -298,7 +301,7 @@ __hurd_at_flags (int *at_flags, int *flags)
return 0;
}
-# endif
+# endif
#endif
/* Variant of file_name_lookup used in *at function implementations.