bmx-ng / pub.mod

BlitzMax NG Pub modules port.
7 stars 8 forks source link

stdc.mod not using _stat64/_wstat64 #25

Closed nulleddrake closed 5 years ago

nulleddrake commented 5 years ago

When trying to get the size of a file greater than 4GB, the FileSize function will return an overflown int rather than a long.

Going through the code, it looks like changing _stat and _wstat to _stat64 and _wstat64 in stdc.mod's C code fixes the issue.

Here is some info from Microsoft: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2017

woollybah commented 5 years ago

Thanks for the info. :-) (note to future self : may need updated for older win32 versions)