Skip to content

src: use ftruncate() unconditionally#21109

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/ftruncate
Closed

src: use ftruncate() unconditionally#21109
bagder wants to merge 1 commit intomasterfrom
bagder/ftruncate

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 26, 2026

Systems without it need to provide a custom alternative just like we have have for Windows.

@bagder bagder marked this pull request as ready for review March 26, 2026 22:26
@bagder bagder requested a review from Copilot March 26, 2026 22:26

This comment was marked as outdated.

Systems without it need to provide a custom alternative just like we
have have for Windows. This adds an MSDOS version that fails if trying
to truncate a too large file.

Closes #21109
@bagder bagder force-pushed the bagder/ftruncate branch from 79cfefb to 66e4333 Compare March 26, 2026 22:42
@bagder bagder closed this in 6041b9b Mar 27, 2026
@bagder bagder deleted the bagder/ftruncate branch March 27, 2026 07:07
vszakats added a commit that referenced this pull request Mar 30, 2026
Introduce `toolx_ftruncate()` macro and map it to existing replacements
for non-mingw-w64 Windows and DJGPP, or to `ftruncate` otherwise.

Follow-up to 6041b9b #21109

Closes #21130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants