Groundwork for the native Windows (mingw-w64) port - #6569
Open
fingolfin wants to merge 4 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6569 +/- ##
==========================================
+ Coverage 79.02% 79.04% +0.02%
==========================================
Files 683 683
Lines 295190 295195 +5
Branches 8638 8663 +25
==========================================
+ Hits 233264 233342 +78
+ Misses 60107 60035 -72
+ Partials 1819 1818 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lgoettgens
reviewed
Sep 9, 2026
SYS_IS_MINGW marks a native Windows build: mingw-w64 predefines _WIN32, Cygwin GCC does not, as Cygwin is a POSIX system to GAP. So SYS_IS_MINGW and SYS_IS_CYGWIN32 are mutually exclusive, and SYS_IS_WINDOWS now covers both, for the places which care about the operating system rather than the C library. Groundwork for the MinGW port (#4157). ARCH_IS_WINDOWS() also reports true for a "mingw" architecture. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Make the kernel compile with mingw-w64 (#4157, partly after #6077): termios, uname, sigaction, lstat, ttyname, mkdtemp, realpath, readlink, getrusage, sleep, environ, mkdir. Without termios the line editor falls back to syFgetsNoEdit. On Windows, SyTime and RUNTIMES use GetProcessTimes, TmpDirectory a mkdtemp built on _mktemp and mkdir, SyGetOsRelease RtlGetVersion. The fork and pty based subprocess code is compiled out, leaving the stubs of GAP_DISABLE_SUBPROCESS_CODE builds. charreadhook_rl is only defined with select, its sole user. New configure checks: sys/utsname.h, realpath, readlink, mkdtemp, lstat, ttyname. No-ops on current platforms. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Some SYS_IS_CYGWIN32 guards cover behavior any Windows needs, not Cygwin quirks: O_BINARY, CRLF stripping, the C:/WINDOWS/Temp fallback, backslash conversion in root paths, ~/_gap, and the GMP bag zeroing for #3434. Widen them to SYS_IS_WINDOWS. Genuine Cygwin quirks stay Cygwin-only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two testinstall diffs: - SyFseek: reject negative positions; Windows' lseek accepts them - the ExecuteProcess stub validates its arguments like the real implementation, so the documented errors come first Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
fingolfin
force-pushed
the
mh/windows-groundwork
branch
from
September 10, 2026 16:27
726099d to
a3ebb71
Compare
Member
Author
|
@ChrisJefferson @lgoettgens thank you for your feedback. I think we addressed all your points so far now. |
ChrisJefferson
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groundwork for the native Windows (mingw-w64) port, split off #6557: the four commits that change nothing on current platforms.
SYS_IS_WINDOWS, from_WIN32; disjoint fromSYS_IS_CYGWIN32GetProcessTimes,TmpDirectoryfrom anmkdtempbuilt on_mktempandmkdir, theunamerecord fromRtlGetVersionSYS_IS_CYGWIN32guards that any Windows needs (O_BINARY, CRLF stripping, temp dir fallback,~/_gap, GMP bag zeroing) widened toSYS_IS_WINDOWSSyFseekrejects negative positions, theExecuteProcessstub validates its argumentsEvery guard is a no-op where GAP builds today. The rest of the port sits on top in #6557, whose CI job exercises the Windows side.
🤖 Generated with Claude Code
This has IMHO decent quality and is not sloppy, so I have no qualms asking for reviews :-)