crt: Use native _fseeki64 symbol from msvcrt.dll on Windows Vista+ Function _fseeki64() is available in msvcrt.dll starting from Windows Vista+. Change the emulation of the _fseeki64() function to use native symbol when available via the msvcrt_or_emu_glue.h. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/stdio/_fseeki64.c b/mingw-w64-crt/stdio/_fseeki64.c index 7b6ad55..3ec4ccb 100644 --- a/mingw-w64-crt/stdio/_fseeki64.c +++ b/mingw-w64-crt/stdio/_fseeki64.c
@@ -7,7 +7,7 @@ #include <io.h> #include <errno.h> -int __cdecl _fseeki64(FILE* stream, __int64 offset, int whence) +static int __cdecl emu__fseeki64(FILE *stream, __int64 offset, int whence) { fpos_t pos; if (whence == SEEK_CUR) @@ -33,4 +33,8 @@ return fsetpos (stream, &pos); } -int __cdecl (*__MINGW_IMP_SYMBOL(_fseeki64))(FILE*, __int64, int) = _fseeki64; +#define RETT int +#define FUNC _fseeki64 +#define ARGS FILE *stream, __int64 offset, int whence +#define CALL stream, offset, whence +#include "msvcrt_or_emu_glue.h"