Fix MSVC 2005/2010 build: use boolean.h instead of stdbool.h#116
Merged
JoeMatt merged 4 commits intolibretro:masterfrom Apr 23, 2026
Merged
Fix MSVC 2005/2010 build: use boolean.h instead of stdbool.h#116JoeMatt merged 4 commits intolibretro:masterfrom
JoeMatt merged 4 commits intolibretro:masterfrom
Conversation
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
Contributor
There was a problem hiding this comment.
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>insrc/eeprom.c - Replace
#include <stdbool.h>with#include <boolean.h>insrc/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.
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
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
#include <stdbool.h>with#include <boolean.h>insrc/blitter_simd.handsrc/eeprom.c<stdbool.h>— the libretro-common<boolean.h>header provides a compatible shimFixes
GitLab CI failures on
msvc05-i686,msvc10-i686,msvc10-x64:Pipeline: https://git.libretro.com/libretro/virtualjaguar-libretro/-/pipelines/65014
Test plan
Made with Cursor