- fixed compilation with large ramfile support present on MSVC

This commit is contained in:
Volker Ruppert 2012-08-26 14:43:14 +00:00
parent c2f9150497
commit fb0e05e36c
3 changed files with 9 additions and 4 deletions

View File

@ -131,6 +131,7 @@
#define BX_HAVE_TIMELOCAL 0
#define BX_HAVE_GMTIME 0
#define BX_HAVE_MKTIME 0
#define BX_HAVE_TMPFILE64 0
#define BX_HAVE_FSEEK64 0
#define BX_HAVE_FSEEKO64 0
#define BX_HAVE_NET_IF_H 0

View File

@ -182,6 +182,9 @@ if test "$MSVC_TARGET" != 1; then
],[
AC_MSG_RESULT(no)
])
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))
else
AC_DEFINE(BX_HAVE_SELECT, 1)
AC_DEFINE(BX_HAVE_SOCKLEN_T, 0)
@ -197,6 +200,9 @@ else
AC_DEFINE(BX_HAVE_USLEEP, 0)
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP32, 0)
AC_DEFINE(BX_HAVE___BUILTIN_BSWAP64, 0)
AC_DEFINE(BX_HAVE_TMPFILE64, 0)
AC_DEFINE(BX_HAVE_FSEEK64, 0)
AC_DEFINE(BX_HAVE_FSEEKO64, 0)
fi
AC_CHECK_FUNCS(sleep, AC_DEFINE(BX_HAVE_SLEEP))
AC_CHECK_FUNCS(nanosleep, AC_DEFINE(BX_HAVE_NANOSLEEP))
@ -206,9 +212,6 @@ AC_CHECK_MEMBER(struct sockaddr_in.sin_len, AC_DEFINE(BX_HAVE_SOCKADDR_IN_SIN_LE
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))
dnl As of autoconf 2.53, the standard largefile test fails for Linux/gcc.
dnl It does not put the largefiles arguments into CFLAGS, even though Linux/gcc

View File

@ -83,6 +83,7 @@ extern "C" {
#define mktemp _mktemp
#define off_t __int64
#define lseek _lseeki64
#define fseeko64 _fseeki64
#define fstat _fstati64
#define stat _stati64
#define read _read
@ -251,7 +252,7 @@ extern Bit64u bx_get_realtime64_usec (void);
#if BX_HAVE_FSEEKO64 == 0
#if BX_HAVE_FSEEK64
#define fseeko64 fseek64 /* use fseek64() function */
#else
#elif !defined(_MSC_VER)
#define fseeko64 fseeko /* use regular fseeko() function */
#endif
#endif