feat(windows): add full Windows/MSVC support#10
Closed
sashml wants to merge 2 commits into
Closed
Conversation
- Add bfc_win32_compat.h with POSIX shims (ssize_t, usleep, clock_gettime, S_IS* macros, fseeko/ftello, mkdir, fileno) - Add cli_win32_compat.h for CLI-layer POSIX shims (getopt, fnmatch, dirent, symlink stubs) - Fix MSVC warnings-as-errors: C4206 (empty TU), C4244 (narrowing), C4267 (size_t conversions), C4456 (variable shadowing), C4100 (unused params), C4702 (unreachable code after ZSTD guard) - Update CMakeLists.txt with MSVC /W4 /WX flags and _CRT_SECURE_NO_WARNINGS - Add GitHub Actions CI matrix for windows-latest with vcpkg (zstd, libsodium) - Add Windows release workflow with ZIP packaging and install.bat - Fix test_reader.c pre-existing assertion bug (wrong expected string in partial-read test) - Guard ZSTD-only test functions with #ifdef BFC_WITH_ZSTD body wrapping - Update README with Windows build instructions - Guard POSIX-only includes in benchmarks and examples with #ifndef _WIN32
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.
Summary
Closes #9 — full Windows/MSVC build support for bfc.
bfc_win32_compat.h(lib) andcli_win32_compat.h(CLI) provide POSIX shims:ssize_t,usleep,clock_gettime,S_IS*macros,fseeko/ftello,mkdir,fileno,getopt,fnmatch,direntbfc_iter.c), C4244 (narrowing inbfc_crc32c.c,bfc_reader.c), C4267 (size_t conversions inbfc_reader.c), C4456 (variable shadowing inbfc_reader.c), C4100 (unused params inbfc_os.c,cmd_extract.c), C4702 (unreachable code intest_compress.c)/W4 /WX /wd4996,_CRT_SECURE_NO_WARNINGS, debug/Od /Zi /RTC1, release/O2)windows-latestmatrix entry with vcpkg (zstd, libsodium), separate configure/build/test steps; guarded POSIX-only stepsbfc-<version>-windows-x86_64.zipwithbfc.exe,bfc.lib, headers,install.battest_reader.c(wrong expected string in partial-read test); replaced early-returnZSTD guards with#ifdef BFC_WITH_ZSTDbody wrapping to avoid MSVC C4702Test plan
ctest -C Debug→100% tests passed/W4 /WX— zero warningswindows-latest(GitHub Actions)if: matrix.os != 'windows-latest')