this should fix bug report 3422638 large ramfile support broken on anything but Linux
This commit is contained in:
parent
1f7f9bc2ff
commit
01f27e3a0c
@ -131,6 +131,8 @@
|
||||
#define BX_HAVE_TIMELOCAL 0
|
||||
#define BX_HAVE_GMTIME 0
|
||||
#define BX_HAVE_MKTIME 0
|
||||
#define BX_HAVE_FSEEK64 0
|
||||
#define BX_HAVE_FSEEKO64 0
|
||||
#define BX_HAVE_NET_IF_H 0
|
||||
#define BX_HAVE___BUILTIN_BSWAP32 0
|
||||
#define BX_HAVE___BUILTIN_BSWAP64 0
|
||||
|
1188
bochs/configure
vendored
1188
bochs/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -155,6 +155,9 @@ AC_CHECK_HEADER(sys/mman.h, AC_DEFINE(BX_HAVE_SYS_MMAN_H))
|
||||
AC_CHECK_FUNCS(timelocal, AC_DEFINE(BX_HAVE_TIMELOCAL))
|
||||
AC_CHECK_FUNCS(gmtime, AC_DEFINE(BX_HAVE_GMTIME))
|
||||
AC_CHECK_FUNCS(mktime, AC_DEFINE(BX_HAVE_MKTIME))
|
||||
AC_CHECK_FUNCS(tmpfile64, AC_DEFINE(BX_HAVE_TMPFILE64))
|
||||
AC_CHECK_FUNCS(fseek64, AC_DEFINE(BX_HAVE_FSEEK64))
|
||||
AC_CHECK_FUNCS(fseeko64, AC_DEFINE(BX_HAVE_FSEEKO64))
|
||||
|
||||
AC_MSG_CHECKING(for __builtin_bswap32)
|
||||
AC_TRY_LINK([],[
|
||||
|
@ -196,7 +196,7 @@ void BX_MEM_C::allocate_block(Bit32u block)
|
||||
bx_phy_address address = ((bx_phy_address)BX_MEM_THIS next_swapout_idx)*BX_MEM_BLOCK_LEN;
|
||||
// Create overflow file if it does not currently exist.
|
||||
if (!BX_MEM_THIS overflow_file) {
|
||||
BX_MEM_THIS overflow_file = tmpfile();
|
||||
BX_MEM_THIS overflow_file = tmpfile64();
|
||||
if (!BX_MEM_THIS overflow_file)
|
||||
BX_PANIC(("Unable to allocate memory overflow file"));
|
||||
}
|
||||
|
@ -241,4 +241,21 @@ extern Bit64u bx_get_realtime64_usec (void);
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if BX_LARGE_RAMFILE
|
||||
|
||||
// these macros required for large ramfile option functionality
|
||||
#if BX_HAVE_TMPFILE64 == 0
|
||||
#define tmpfile64 tmpfile /* use regular tmpfile() function */
|
||||
#endif
|
||||
|
||||
#if BX_HAVE_FSEEKO64 == 0
|
||||
#if BX_HAVE_FSEEK64
|
||||
#define fseeko64 fseek64 /* use fseek64() function */
|
||||
#else
|
||||
#define fseeko64 fseeko /* use regular fseeko() function */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // BX_LARGE_RAMFILE
|
||||
|
||||
#endif /* ifdef BX_OSDEP_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user