mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
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.
This commit is contained in:
@@ -205,10 +205,10 @@ os_isatty (host_callback *p, int fd)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
os_lseek (host_callback *p, int fd, long off, int way)
|
||||
static int64_t
|
||||
os_lseek (host_callback *p, int fd, int64_t off, int way)
|
||||
{
|
||||
int result;
|
||||
int64_t result;
|
||||
|
||||
result = fdbad (p, fd);
|
||||
if (result)
|
||||
@@ -519,7 +519,7 @@ os_lstat (host_callback *p, const char *file, struct stat *buf)
|
||||
}
|
||||
|
||||
static int
|
||||
os_ftruncate (host_callback *p, int fd, long len)
|
||||
os_ftruncate (host_callback *p, int fd, int64_t len)
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -542,7 +542,7 @@ os_ftruncate (host_callback *p, int fd, long len)
|
||||
}
|
||||
|
||||
static int
|
||||
os_truncate (host_callback *p, const char *file, long len)
|
||||
os_truncate (host_callback *p, const char *file, int64_t len)
|
||||
{
|
||||
#ifdef HAVE_TRUNCATE
|
||||
int result;
|
||||
|
||||
Reference in New Issue
Block a user