Skip to content

Conversation

@Un1q32
Copy link
Contributor

@Un1q32 Un1q32 commented Dec 31, 2025

(v)snprintf requires C99, GLIBC refuses to declare it for lower standards. I don't think there's many devices that would be capable of running ReMCPE that don't have a C99 compliant libc, and we already kinda depend on C99 through things like C99 only printf format arguments. My solution is just to declare a wrapper function in a C file that gets compiled with -std=c99.

MinGW must still be built for C++11 since their C++ headers don't support anything lower and intentionally error.

These projects should really be setup to detect all source files in directories automatically so it's not such a pain to add a new file.

@Un1q32 Un1q32 changed the title Support building for C++98 on GLIBC by manually declaring vsnprintf. Support building for C++98 on GLIBC using a vsnprintf wrapper. Jan 1, 2026
Copy link
Collaborator

@BrentDaMage BrentDaMage left a comment

Choose a reason for hiding this comment

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

All of the vsnprintf stuff should be moved to compat/LegacyCPP_Compat.hpp

@Un1q32 Un1q32 force-pushed the master branch 2 times, most recently from 7507206 to a464661 Compare January 4, 2026 15:30
@Un1q32 Un1q32 marked this pull request as draft January 4, 2026 15:31
@Un1q32 Un1q32 force-pushed the master branch 3 times, most recently from 7bea725 to 891a98a Compare January 4, 2026 15:33
@Un1q32 Un1q32 marked this pull request as ready for review January 4, 2026 15:38
@Un1q32 Un1q32 force-pushed the master branch 2 times, most recently from 94a5803 to fdc72f6 Compare January 5, 2026 03:42
@BrentDaMage BrentDaMage merged commit 8502eb9 into ReMinecraftPE:master Jan 5, 2026
11 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