mirror of
https://github.com/simh/simh.git
synced 2026-02-27 01:00:07 +00:00
FIO: Fix large file support on Linux AND Android platforms correctly
As discussed in #564
This commit is contained in:
@@ -198,7 +198,7 @@ t_offset pos, sz;
|
||||
if (fp == NULL)
|
||||
return 0;
|
||||
pos = sim_ftell (fp);
|
||||
sim_fseek (fp, 0, SEEK_END);
|
||||
sim_fseeko (fp, 0, SEEK_END);
|
||||
sz = sim_ftell (fp);
|
||||
sim_fseeko (fp, pos, SEEK_SET);
|
||||
return sz;
|
||||
|
||||
@@ -41,7 +41,7 @@ extern "C" {
|
||||
#define fxread(a,b,c,d) sim_fread (a, b, c, d)
|
||||
#define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)
|
||||
|
||||
#if ((defined (__linux) || defined (__linux__)) && (!defined (__ANDROID_API__) || (__ANDROID_API__ < 24)))
|
||||
#if ((defined (__linux) || defined (__linux__)) && (defined (__ANDROID_API__) && (__ANDROID_API__ < 24)))
|
||||
#define DONT_DO_LARGEFILE 1
|
||||
#endif
|
||||
int32 sim_finit (void);
|
||||
|
||||
Reference in New Issue
Block a user