-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
tellg
returns -1 when using clang++ to get the size of a large file (around 6GB) on Windows
#462
Comments
There's a combination of two issues here. With the mingw headers, Secondly, the code that uses When setting up the base ABI for UCRT, it's a shame that we didn't think of defaulting FWIW, if comparing with MSVC, they don't really have anything like |
I remembered there's another thing that we could do on the libcxx side, though - we can configure libcxx with (GCC's libstdc++ does something similar for |
In MSYS2 I remember one case where it broke things since this leads to mingw-w64 defining "stat" https://github.com/mingw-w64/mingw-w64/blob/fab7cfe34e5388c920230d0237e3663804d91458/mingw-w64-headers/crt/sys/stat.h#L276 which clashed with a C++ class called stat in libtorrent (arvidn/libtorrent@44da281). Just an warning that there might be fallout. |
This seems justified to me. |
Microsoft defines It has been That being said, whether libc++ defines |
That's true, but on the other hand, MSVC headers don't really use Switching the type would be beneficial for the unix originated projects which may be using
Right, indeed - yeah there may be fallout. (That's a good reference though - I was wondering if defining
Also regarding uses of both
It's probably meant for transitionary uses, for cases where you earlier might have been ok with having 32 bit file sizes/offsets, but wanted the same API to upgrade to 64 bit file sizes later. In modern days, there's indeed not much reason to bother with it...
That's indeed right; if libcxx wants to have working >2 GB file sizes in MSVC build configurations, it would need to switch to such an API anyway. And if it does that, it doesn't matter how we define |
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits. The test for this, unfortunately, requires temporarily creating a 4 GB file.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits. The test for this, unfortunately, requires temporarily creating a 4 GB file.
…#122798) This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits. The test for this, unfortunately, requires temporarily creating a 4 GB file.
This allows using the full 64 bit range for file offsets. This should fix the issue reported downstream at mstorsjo/llvm-mingw#462.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits. The test for this, unfortunately, requires temporarily creating a 4 GB file.
This adds a test for an issue reported downstream at mstorsjo/llvm-mingw#462; this is known to fail on Windows right now, where the fseek/ftell calls end up truncated to 32 bits. The test for this, unfortunately, requires temporarily creating a 4 GB file.
When compiling C++ code with
clang++
on Windows, thetellg()
function returns -1 when attempting to get the size of a large file (around 6GB). However, when compiling the same code withMSVC
org++
, the file size is retrieved correctly.The text was updated successfully, but these errors were encountered: