More stable workaround for MinGW fseek() workaround#1759
Merged
derselbst merged 4 commits intorelease/2.5from Feb 21, 2026
Merged
More stable workaround for MinGW fseek() workaround#1759derselbst merged 4 commits intorelease/2.5from
derselbst merged 4 commits intorelease/2.5from
Conversation
sezero
reviewed
Feb 17, 2026
src/utils/fluid_sys.c
Outdated
| #if (defined(__MINGW32__) || defined(__MINGW64__)) && defined(__GNUC__) && (__GNUC__ < 15) | ||
| // Some older versions of MinGW report incorrect values for _ftelli64(). This is problematic, | ||
| // See here for the macro definitions: https://github.com/mingw-w64/mingw-w64/blob/a125b9ec1d96ff282155f2344f7d6eb50bf43c02/mingw-w64-headers/crt/_mingw_mac.h#L50-L61 | ||
| #if defined(__MINGW32__) && defined(_M_IX86) |
There was a problem hiding this comment.
Why are you torturing yourself with _M_IX86 instead of simply using __i386__ ?
Member
Author
There was a problem hiding this comment.
That's what written in the _mingw.h header. I thought it would be appropriate to reuse that logic for x86 detection. Is __i386__ always defined for x86? I mean even then when e.g. __i686__ is defined?
There was a problem hiding this comment.
Is
__i386__always defined for x86? I mean even then when e.g.__i686__is defined?
Yes and yes
Member
Author
There was a problem hiding this comment.
Ok then, CI build passed, thanks for your perseverance.
sezero
approved these changes
Feb 17, 2026
|
pedrolcl
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This makes the
fseek()workaround for MinGW more stable, as per related discussion.Addresses #1755