fix(sqlite-objstore): provide S_ISDIR/S_ISREG macros for MSVC - #26
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR unblocks the Windows build/link step for the embedded sqlite-objstore backend by providing missing POSIX-style S_ISDIR / S_ISREG macros for MSVC, which otherwise treats them as implicitly-declared functions and fails at link.
Changes:
- Add guarded MSVC-compatible definitions for
S_ISDIRandS_ISREGinwin_posix.husing_S_IFMT/_S_IFDIR/_S_IFREG. - Include
win_posix.hfrombackend_fs_common.con_WIN32so the directory/file checks in that translation unit compile correctly on MSVC.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| third_party/sqlite-objstore/src/win_posix.h | Adds guarded S_ISDIR / S_ISREG macro definitions for Windows/MSVC builds. |
| third_party/sqlite-objstore/src/backend_fs_common.c | Ensures Windows builds include win_posix.h so S_ISDIR use in this TU doesn’t become an unresolved external at link time. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Round 5 of the Windows port for the npm release of @augmem/cortext v1.3.3
(follow-up to PRs #22-#25). Compile and the cortext.lib name collision are
fixed; both Windows matrix jobs now fail at link with:
MSVC does not define the POSIX S_ISDIR/S_ISREG macros, so C treated the
identifiers as implicit functions. This adds the standard
((m) & _S_IFMT) == _S_IFDIR/REG definitions to win_posix.h (guarded) and
includes that header from backend_fs_common.c on Windows. No other S_IS*
macros are used in the embedded objstore sources.