Skip to content

Fix windows build#4

Merged
bendichter merged 10 commits into
catalystneuro:mainfrom
oruebel:fix_windows_build
Jul 23, 2026
Merged

Fix windows build#4
bendichter merged 10 commits into
catalystneuro:mainfrom
oruebel:fix_windows_build

Conversation

@oruebel

@oruebel oruebel commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
  • Wrapped std::min calls in parentheses in src/remfile_vfd.cpp. This prevents the Windows min macro from incorrectly expanding the standard library function, which was causing the error C2589: '(': illegal token on right side of '::' error.
  • Fixed warning C4365: 'argument': conversion from 'size_t' to 'const __int64', signed/unsigned mismatch [D:\a\aqnwb\aqnwb\build\_deps\remfile-build\remfile.vcxproj] std::vector<uint8_t>(data.begin() + piece_start, data.begin() + piece_end);
  • Added Windows to the CI build to make sure this is tested here directly
  • Updated test_remfile.c to support Windows

@oruebel
oruebel marked this pull request as draft July 23, 2026 06:16
@oruebel
oruebel marked this pull request as ready for review July 23, 2026 07:33
@bendichter

Copy link
Copy Markdown
Collaborator

Thanks @oruebel, this looks good. The library-side changes are minimal and safe: the parenthesized (std::min) calls are the standard workaround for the Windows min macro, and the switch from iterator-based to pointer-based vector construction in load_chunk is semantically identical to what was there before. Everything else is test and CI infrastructure, and the full matrix (including the two new Windows jobs) is green, so I am comfortable merging this as is.

A few minor notes, none of them blocking:

  • The comment at the top of tests/http_test_server.hpp still says "POSIX sockets only (Linux/macOS)", which this PR makes untrue. Worth updating in a follow-up.
  • The typedef int socklen_t; in the _WIN32 branch duplicates the typedef in ws2tcpip.h. It is legal since the types are identical, but it can probably be dropped.
  • An alternative to parenthesizing each std::min call would be defining NOMINMAX on the target for Windows builds, which would also protect any future std::min/std::max uses. The current approach is fine too; I mention it mainly in case we hit this again elsewhere.

@bendichter
bendichter merged commit de1cf8c into catalystneuro:main Jul 23, 2026
9 checks passed
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