Skip to content

fix: Fixed the issue of examples failing to compile under MSVC - #19

Merged
daavoo merged 3 commits into
mozilla-ai:mainfrom
geoyee:hotfix-msvc-examples
Aug 25, 2026
Merged

fix: Fixed the issue of examples failing to compile under MSVC#19
daavoo merged 3 commits into
mozilla-ai:mainfrom
geoyee:hotfix-msvc-examples

Conversation

@geoyee

@geoyee geoyee commented May 31, 2026

Copy link
Copy Markdown

In MSVC, since <unistd.h> and its contained isatty do not exist, you can use <io.h>'s _isatty instead.

@geoyee
geoyee force-pushed the hotfix-msvc-examples branch from 886d62d to 3ea6238 Compare May 31, 2026 13:57
geoyee and others added 3 commits August 25, 2026 17:01
Move the isatty/popen/pclose shim into a single
examples/shared/platform_compat.h instead of repeating the same
#ifdef _WIN32 block in four places.

- Drop the trailing `#undef isatty` from the shared headers. It made
  including them depend on order, and an identical macro redefinition
  is legal, so it was never needed.
- Remove the stale <unistd.h> include from the tracing example, which
  never used isatty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@daavoo
daavoo force-pushed the hotfix-msvc-examples branch from 6b5868c to 2aad617 Compare August 25, 2026 15:01
@daavoo

daavoo commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

thanks @geoyee !

@daavoo
daavoo merged commit e2cbeee into mozilla-ai:main Aug 25, 2026
5 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