summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-02-26 22:24:42 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-28 18:23:29 +0100
commitcc36b5a5e2e8df6e633bb767df84ac1e61c56bc3 (patch)
tree7f136cf7b5db5c1409aa49712b5f15ac4267d8eb
parentf8297941a03e1ed6d85519b6778732b59a7a32b9 (diff)
Add the timespec_t Hurd type
This type matches the standard struct timespec, and allows passing time values with nanosecond precision in RPCs. * hurd/hurd_types.defs (timespec_t): New MIG type. * hurd/hurd_types.h: Include <time.h>. (timespec_t): New C type, aliasing struct timespec.
-rw-r--r--hurd/hurd_types.defs2
-rw-r--r--hurd/hurd_types.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
index 5ad5e93f..4b325043 100644
--- a/hurd/hurd_types.defs
+++ b/hurd/hurd_types.defs
@@ -230,6 +230,8 @@ type rusage_t = struct[18] of int; /* XXX */
type flock_t = struct[5] of int;
+type timespec_t = struct[2] of int;
+
#define _SYS_UTSNAME_H /* Inhibit warning from <bits/utsname.h>. */
#include <bits/utsname.h>
type utsname_t = struct[5 * _UTSNAME_LENGTH] of char;
diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
index e1a644f1..7d1bb732 100644
--- a/hurd/hurd_types.h
+++ b/hurd/hurd_types.h
@@ -20,6 +20,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef _HURD_TYPES_H
#define _HURD_TYPES_H
+#include <time.h> /* For struct timespec. */
#include <mach/std_types.h> /* For mach_port_t et al. */
#include <mach/message.h> /* For mach_msg_id_t et al. */
#include <sys/types.h> /* For pid_t and uid_t. */
@@ -69,6 +70,7 @@ typedef struct statfs fsys_statfsbuf_t;
typedef struct stat64 io_statbuf_t;
typedef struct statfs64 fsys_statfsbuf_t;
#endif
+typedef struct timespec timespec_t;
/* Parameters and flags in RPC calls */