Skip to content

Conversation

@wegank
Copy link
Contributor

@wegank wegank commented May 28, 2025

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 of posix_memalign on Windows. I also provided posix_memalign_free for the reason in https://learn.microsoft.com/en-us/cpp/standard-library/cstdlib?view=msvc-170#remarks-6, and modified files doing free over memory allocated by posix_memalign to use posix_memalign_free.
  • src/msolve/getdelim.h, which provides Gnulib's implementation of getdelim and getline on Windows.

In addition, I modified src/neogb/sort_r.h to prevent undefined reference to qsort_r (though noporpoise/sort_r#17 might be a better idea), and added b to fopen access modes so that we have LF instead of CRLF on Windows. I modified src/usolve/refine.c to use mpz_get_ull from Bitwuzla instead of mpz_get_ui to always get 64-bit integers even if long is 32-bit. I also fixed a few bugs that will be the subject of separate PRs.

All tests passed on CI and my aarch64-windows machine.

Copy link
Contributor

@ederc ederc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit f72bc6c is already included in #252.

@wegank
Copy link
Contributor Author

wegank commented Dec 15, 2025

Sure, my goal was precisely to split this into multiple PRs to make it easier to review; I included the last three commits because each of them is necessary to fix part of the tests on Windows.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants