From 875a8a6c79b0c5da1715b70eaa58b12f9b816767 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Mon, 31 May 2021 10:06:38 -0700 Subject: Cleanup: Replace fseek() calls with BLI_fseek() The fseek() function on Windows only accepts a 32-bit long offset argument. Because of this we have our own version, BLI_fseek(), which will use 64-bit _fseeki64() on Windows. This patch just replaces some fseek() calls with BLI_fseek(). Differential Revision: https://developer.blender.org/D11430 Reviewed by Brecht Van Lommel --- source/blender/blenfont/intern/blf_font_win32_compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf_font_win32_compat.c b/source/blender/blenfont/intern/blf_font_win32_compat.c index 7d130204c07..e573d3bd224 100644 --- a/source/blender/blenfont/intern/blf_font_win32_compat.c +++ b/source/blender/blenfont/intern/blf_font_win32_compat.c @@ -66,7 +66,7 @@ static unsigned long ft_ansi_stream_io(FT_Stream stream, file = STREAM_FILE(stream); if (stream->pos != offset) { - fseek(file, offset, SEEK_SET); + BLI_fseek(file, offset, SEEK_SET); } return fread(buffer, 1, count, file); @@ -93,7 +93,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep return FT_THROW(Cannot_Open_Resource); } - fseek(file, 0, SEEK_END); + BLI_fseek(file, 0LL, SEEK_END); stream->size = ftell(file); if (!stream->size) { fprintf(stderr, @@ -104,7 +104,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep return FT_THROW(Cannot_Open_Stream); } - fseek(file, 0, SEEK_SET); + BLI_fseek(file, 0LL, SEEK_SET); stream->descriptor.pointer = file; stream->read = ft_ansi_stream_io; -- cgit v1.2.3