WIP: Windows/macos CI and support#41
Draft
dutow wants to merge 4 commits into
Draft
Conversation
Replace htonl-based to_be32/to_be64 with portable shift-based implementations using std::endian from <bit>, eliminating the POSIX-only dependency on <arpa/inet.h>. This unblocks Windows/macOS support for kmipcore.
Introduce a single last_socket_error()/socket_error_string() pair (errno/strerror on POSIX, WSAGetLastError/FormatMessageA on Windows) used by all socket error reporting, and gate poll/fcntl/setsockopt usage behind #ifdef _WIN32 with WSAPoll/ioctlsocket/SOCKET equivalents. Move is_ip_address to OpenSSL's a2i_IPADDRESS parser so no socket headers are needed just to detect IP-literal hosts.
MSVC encodes struct-vs-class in mangled names. kmip_formatter.hpp forward-declared Element as class while kmip_basics.hpp defines it as struct, so TUs disagreed on the mangling of every symbol involving Element (C4099 warnings, LNK2019 on Windows). Itanium ABI ignores the class-key, which is why Linux and macOS linked fine.
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.
macOS probably already works so this only adds a CI, but windows definitely wouldn't complete.
This is still work in progress, the goal is to get MSVC builds working in this PR including a basic CI test.
For now I only added unit tests, figuring out how we can run integration tests on these platforms is another question.