Skip to content

[windows][build] patch ANSITerminal for mingw-w64 GCC 14 - #2283

Merged
dulmarod merged 1 commit into
meta:mainfrom
jeremydubreil:patch-ansiterminal
Oct 29, 2026
Merged

dulmarod merged 1 commit into
meta:mainfrom
jeremydubreil:patch-ansiterminal

Conversation

@jeremydubreil

@jeremydubreil jeremydubreil commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The latest release of ANSITerminal, 0.8.5 (July 2022), fails to compile on Windows with mingw-w64 GCC 14, which turned some warnings into errors. This adds ANSITerminal.0.8.5 to infer's local opam repository, with a patch to its Windows-only stubs:

  • _get_osfhandle() was declared as returning long, which truncates handles to 32 bits on 64-bit Windows; the declaration now comes from <io.h>;
  • <caml/fail.h> was missing, for caml_raise_with_args();
  • FillConsoleOutputCharacter was passed an int * where it expects a DWORD *.

The patched file is only compiled on Windows, so nothing changes on Linux and macOS.

@meta-cla meta-cla Bot added the CLA Signed label Oct 27, 2026
@jeremydubreil
jeremydubreil marked this pull request as ready for review October 27, 2026 17:57
@dulmarod

Copy link
Copy Markdown
Contributor

There is a conflict in this one now.

@jeremydubreil

Copy link
Copy Markdown
Contributor Author

There is a conflict in this one now.

Fixed after rebasing.

@dulmarod
dulmarod merged commit 9031737 into meta:main Oct 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants