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.
This work was done during the JNCF 2025 and is now rebased on master. I guess I won't have time to clean up everything or split it into multiple PRs before going on vacation tonight, so I'm marking it as a draft (but at least it can serve as a demo).
In short, this is achieved by providing the following headers:
src/fglm/aligned_alloc.h
, which provides a handwritten implementation ofposix_memalign
on Windows. I also providedposix_memalign_free
for the reason in https://learn.microsoft.com/en-us/cpp/standard-library/cstdlib?view=msvc-170#remarks-6, and modified files doingfree
over memory allocated byposix_memalign
to useposix_memalign_free
.src/msolve/getdelim.h
, which provides Gnulib's implementation ofgetdelim
andgetline
on Windows.In addition, I modified
src/neogb/sort_r.h
to prevent undefined reference toqsort_r
(though noporpoise/sort_r#17 might be a better idea), and addedb
to fopen access modes so that we have LF instead of CRLF on Windows.Does the so-ported msolve work? Well, 54/56 tests passed on my aarch64-windows machine, with the two failing tests differing by the sizes of some root bounding boxes (probably some miscellaneous precision issues?) and thus non-blocking. I'd say that's satisfactory enough.