Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Dec 9, 2025

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-largefile option a no-op for Windows.


https://github.com/curl/curl/pull/19888/files?w=1

Copy link

Copilot AI left a 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_FILES macro definition from build configuration files (CMakeLists.txt, curl_config.h.cmake, config-win32.h, configure.ac, acinclude.m4)
  • Simplified preprocessor conditionals to use _WIN32 instead of checking for USE_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.

Copy link

Copilot AI left a 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 vszakats closed this in 163705d Dec 9, 2025
@vszakats vszakats deleted the wlargef branch December 9, 2025 18:34
@jay
Copy link
Member

jay commented Dec 9, 2025

@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?

@vszakats
Copy link
Member Author

vszakats commented Dec 9, 2025

@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.
MS-DOS and other platforms should be unchanged.

Re: truncate_dryrun, it was made MS-DOS-only because the only call to it came from
msdosify, which was in turn MS-DOS-only. This looks correct to me.

MS-DOS's (DJGPP's) issue is that it supports OpenSSL 1.0.2 max, meaning curl can
only build without TLS.

@jay
Copy link
Member

jay commented Dec 9, 2025

Ok

vszakats added a commit to vszakats/curl that referenced this pull request Dec 10, 2025
Always show it on Windows, regardless of the `--enable-largefile`
option.

Follow-up to 163705d curl#19888
vszakats added a commit that referenced this pull request Dec 10, 2025
Always show it on Windows, regardless of the `--disable-largefile`
build option.

Follow-up to 163705d #19888
Closes #19922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants