-
-
Notifications
You must be signed in to change notification settings - Fork 7k
windows: assume USE_WIN32_LARGE_FILES
#19888
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies Windows large file support by removing the USE_WIN32_LARGE_FILES macro and assuming all Windows platforms support large files (>2GB). Previously, this was a configurable option primarily controlled through build systems, with autotools allowing it to be disabled via --disable-largefile. Now, the codebase unconditionally uses 64-bit Windows file APIs (_lseeki64, _fstati64, _stati64) for all Windows builds, using the standard _WIN32 macro instead.
Key changes:
- Removed
USE_WIN32_LARGE_FILESmacro definition from build configuration files (CMakeLists.txt, curl_config.h.cmake, config-win32.h, configure.ac, acinclude.m4) - Simplified preprocessor conditionals to use
_WIN32instead of checking forUSE_WIN32_LARGE_FILES - Removed small file (<2GB) code paths for Windows, keeping only the 64-bit file handling functions
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tool_cb_see.c | Updated condition to exclude all Windows builds from 32-bit offset workaround |
| lib/version.c | Changed largefile feature detection to check for _WIN32 instead of USE_WIN32_LARGE_FILES |
| lib/curlx/fopen.c | Simplified to always use 64-bit file functions (_fseeki64, _wstati64, _stati64) on Windows |
| lib/curl_setup.h | Removed conditional large file macro definitions, now unconditionally defines 64-bit file macros for Windows |
| lib/curl_config.h.cmake | Removed USE_WIN32_LARGE_FILES CMake configuration option |
| lib/config-win32.h | Removed USE_WIN32_LARGE_FILES definition and simplified large file support configuration |
| configure.ac | Removed call to CURL_CHECK_WIN32_LARGEFILE autoconf macro |
| acinclude.m4 | Removed CURL_CHECK_WIN32_LARGEFILE macro definition entirely |
| CMakeLists.txt | Removed USE_WIN32_LARGE_FILES variable and updated largefile feature detection to use WIN32 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…uild methods do Note that config-win32.h is not used for mingw-w64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@vszakats does this mean curl no longer builds for MS-DOS? There is MS-DOS specific code in tool_doswin: truncate_dryrun (?someone must have changed that to only apply to msdos) and msdosify. Since Vista is the minimum version I would assume we can get rid of that? |
I don't think so. This patch touched Windows code paths only. Unless I missed something. Re: MS-DOS's (DJGPP's) issue is that it supports OpenSSL 1.0.2 max, meaning curl can |
|
Ok |
Always show it on Windows, regardless of the `--enable-largefile` option. Follow-up to 163705d curl#19888
All Windows platforms support it. It was permanently enabled with most
build methods. The exception is autotools where it is enabled by
default, with an option to disable it. It changed the build in a few
places for rarely tested code paths, but not bringing other advantages
(and used some 64-bit APIs anyway). This patch makes autotools'
--disable-largefileoption a no-op for Windows.https://github.com/curl/curl/pull/19888/files?w=1