aboutsummaryrefslogtreecommitdiff
path: root/include/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-24 14:40:43 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-14 21:16:40 -0400
commit2fbe9507bfba58a6a000d231fe735bad1f245b55 (patch)
tree8b4709489be830480eae1d98a37b2df8af5d60d1 /include/sim
parent00330cd18a4ba83beabad4cb9f4215170828cd29 (diff)
downloadbinutils-2fbe9507bfba58a6a000d231fe735bad1f245b55.zip
binutils-2fbe9507bfba58a6a000d231fe735bad1f245b55.tar.gz
binutils-2fbe9507bfba58a6a000d231fe735bad1f245b55.tar.bz2
sim: callback: convert FS interfaces to 64-bit
Rather than rely on off_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/sim')
-rw-r--r--include/sim/ChangeLog5
-rw-r--r--include/sim/callback.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/include/sim/ChangeLog b/include/sim/ChangeLog
index 393b7b8..4fe3bc0 100644
--- a/include/sim/ChangeLog
+++ b/include/sim/ChangeLog
@@ -1,5 +1,10 @@
2021-05-14 Mike Frysinger <vapier@gentoo.org>
+ * sim/callback.h (struct host_callback_struct): Change lseek return and
+ 3rd arg to int64_t. Change truncate & ftruncate 3rd arg to int64_t.
+
+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.
diff --git a/include/sim/callback.h b/include/sim/callback.h
index f40385e..4c162bc 100644
--- a/include/sim/callback.h
+++ b/include/sim/callback.h
@@ -73,7 +73,7 @@ struct host_callback_struct
int (*close) (host_callback *,int);
int (*get_errno) (host_callback *);
int (*isatty) (host_callback *, int);
- int (*lseek) (host_callback *, int, long , int);
+ int64_t (*lseek) (host_callback *, int, int64_t, int);
int (*open) (host_callback *, const char*, int mode);
int (*read) (host_callback *,int, char *, int);
int (*read_stdin) ( host_callback *, char *, int);
@@ -89,8 +89,8 @@ struct host_callback_struct
int (*to_stat) (host_callback *, const char *, struct stat *);
int (*to_fstat) (host_callback *, int, struct stat *);
int (*to_lstat) (host_callback *, const char *, struct stat *);
- int (*ftruncate) (host_callback *, int, long);
- int (*truncate) (host_callback *, const char *, long);
+ int (*ftruncate) (host_callback *, int, int64_t);
+ int (*truncate) (host_callback *, const char *, int64_t);
int (*pipe) (host_callback *, int *);
/* Called by the framework when a read call has emptied a pipe buffer. */