Skip to content

Fix MSVC 2005/2010 build: use boolean.h instead of stdbool.h#116

Merged
JoeMatt merged 4 commits intolibretro:masterfrom
Provenance-Emu:fix/msvc-stdbool
Apr 23, 2026
Merged

Fix MSVC 2005/2010 build: use boolean.h instead of stdbool.h#116
JoeMatt merged 4 commits intolibretro:masterfrom
Provenance-Emu:fix/msvc-stdbool

Conversation

@JoeMatt
Copy link
Copy Markdown
Collaborator

@JoeMatt JoeMatt commented Apr 23, 2026

Summary

  • Replace #include <stdbool.h> with #include <boolean.h> in src/blitter_simd.h and src/eeprom.c
  • MSVC versions prior to 2013 don't ship <stdbool.h> — the libretro-common <boolean.h> header provides a compatible shim

Fixes

GitLab CI failures on msvc05-i686, msvc10-i686, msvc10-x64:

blitter_simd.h(16) : fatal error C1083: Cannot open include file: 'stdbool.h': No such file or directory

Pipeline: https://git.libretro.com/libretro/virtualjaguar-libretro/-/pipelines/65014

Test plan

  • Builds clean on macOS (Clang)
  • GitLab CI MSVC builds pass

Made with Cursor

MSVC versions prior to 2013 (VS12) don't ship <stdbool.h>.
Use libretro-common's <boolean.h> which provides a compatible
shim for old MSVC while delegating to <stdbool.h> elsewhere.

Fixes GitLab CI: msvc05-i686, msvc10-i686, msvc10-x64.

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 23, 2026 03:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes build failures on older MSVC toolchains (2005/2010) by replacing direct #include <stdbool.h> usage with the project’s boolean.h compatibility shim.

Changes:

  • Replace #include <stdbool.h> with #include <boolean.h> in src/eeprom.c
  • Replace #include <stdbool.h> with #include <boolean.h> in src/blitter_simd.h

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/eeprom.c Switches to boolean.h to provide bool/true/false on older MSVC.
src/blitter_simd.h Switches to boolean.h so the bool-typed API is MSVC 2005/2010 compatible.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JoeMatt JoeMatt self-assigned this Apr 23, 2026
@JoeMatt JoeMatt added the ci/cd 🤖 Nothing to see, just CI/CD. label Apr 23, 2026
JoeMatt added 3 commits April 22, 2026 23:07
Add targets missing from our GitHub Actions that the GitLab buildbot tests:
- MSVC x64/x86 compilation check (cl.exe, catches stdbool.h/C89 issues)
- macOS x86_64 (macos-13 Intel runner)
- Android x86 and x86_64
- PS Vita (vitasdk Docker container)
- Nintendo Switch (devkitPro Docker container)

Add stdbool.h usage lint (must use boolean.h for MSVC 2005/2010 compat).

Sync release.yml with new build targets so releases include all platforms.

Made-with: Cursor
Move uint32_t pc_p_offset/pc_oldp_offset to function scope in
M68KStateSave and M68KStateLoad. Expand C89 lint and MSVC compile
check to include m68kinterface.c (hand-written, not machine-generated).

Fixes MSVC 2005/2010 build failures on GitLab buildbot.

Made-with: Cursor
_mm_set_epi64x is not available in MSVC 2010's emmintrin.h.
Add SSE2_SET64 compat macro that uses _mm_set_epi32 with split
32-bit halves on MSVC < 2012, delegating to _mm_set_epi64x elsewhere.

Also add blitter_simd_sse2.c to the GitHub Actions MSVC compile check
so this class of intrinsic-availability issues is caught going forward.

Made-with: Cursor
@JoeMatt JoeMatt merged commit 15207f5 into libretro:master Apr 23, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd 🤖 Nothing to see, just CI/CD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants