Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOS_Int21_71a6(): Report correct file size on win32 when file is open. #4647

Merged

Conversation

SmileTheory
Copy link
Contributor

When a file is being written to on win32, a stat() call to it will report its length as 0.

This is different from Int 21/AX=71A6h, which should return the current file size.

So I wrote a quick workaround in DOS_Int21_71a6().

I tested this using djgpp, which uses Int 21/AX=71A6h, and a simple hello world C program. With dos version set to 7.10 before applying this patch, djgpp would not generate a usable executable. With this patch, it does.

I have no idea if the stat() problem is win32 specific or just mingw specific, so this PR could probably use a bit of testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants