aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-24 14:35:14 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-14 21:05:36 -0400
commit00330cd18a4ba83beabad4cb9f4215170828cd29 (patch)
tree5e2c26d6fa4f383e0ac7e933f33005d6b136fbcd /include
parentfcf102ba7abe6c8a64b2db41bfd02ac80e79e094 (diff)
downloadfsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.zip
fsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.tar.gz
fsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.tar.bz2
sim: callback: convert time interface to 64-bit
PR sim/27705 Rather than rely on time_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target.
Diffstat (limited to 'include')
-rw-r--r--include/sim/ChangeLog6
-rw-r--r--include/sim/callback.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/include/sim/ChangeLog b/include/sim/ChangeLog
index a70d8f0..393b7b8 100644
--- a/include/sim/ChangeLog
+++ b/include/sim/ChangeLog
@@ -1,5 +1,11 @@
2021-05-14 Mike Frysinger <vapier@gentoo.org>
+ * callback.h: Include stdint.h.
+ (struct host_callback_struct): Change time return to int64_t. Delete
+ 2nd arg.
+
+2021-05-14 Mike Frysinger <vapier@gentoo.org>
+
* callback.h (p1, p2): Change PTR to void*.
(cb_host_to_target_stat): Likewise.
diff --git a/include/sim/callback.h b/include/sim/callback.h
index 87a61df..f40385e 100644
--- a/include/sim/callback.h
+++ b/include/sim/callback.h
@@ -47,6 +47,7 @@
#include <ansidecl.h>
#include <stdarg.h>
+#include <stdint.h>
/* Needed for enum bfd_endian. */
#include "bfd.h"
@@ -78,7 +79,7 @@ struct host_callback_struct
int (*read_stdin) ( host_callback *, char *, int);
int (*rename) (host_callback *, const char *, const char *);
int (*system) (host_callback *, const char *);
- long (*time) (host_callback *, long *);
+ int64_t (*time) (host_callback *);
int (*unlink) (host_callback *, const char *);
int (*write) (host_callback *,int, const char *, int);
int (*write_stdout) (host_callback *, const char *, int);