[Scummvm-git-logs] scummvm master -> b79cc6ebfc787b6ff10c1964a75103c32145fc29

bluegr noreply at scummvm.org
Sat Aug 10 20:20:42 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b79cc6ebfc COMMON: Fix inttypes.h support on RISC OS


Commit: b79cc6ebfc787b6ff10c1964a75103c32145fc29
    https://github.com/scummvm/scummvm/commit/b79cc6ebfc787b6ff10c1964a75103c32145fc29
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-08-10T23:20:39+03:00

Commit Message:
COMMON: Fix inttypes.h support on RISC OS

Changed paths:
    common/scummsys.h


diff --git a/common/scummsys.h b/common/scummsys.h
index b28a5dcc0d6..453edc02b81 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -123,7 +123,17 @@
 	#include <stddef.h>
 	#include <assert.h>
 	#include <ctype.h>
+
+	// The C++11 standard removed the C99 requirement that some <inttypes.h>
+	// features should only be available when the following macros are
+	// defined. But on some systems (such as RISC OS), the libc is not
+	// necessarily up to date with this change. So, continue defining them,
+	// in order to avoid build failures on some environments.
+	#define __STDC_CONSTANT_MACROS
+	#define __STDC_FORMAT_MACROS
+	#define __STDC_LIMIT_MACROS
 	#include <inttypes.h>
+
 	#include <limits.h>
 	// MSVC does not define M_PI, M_SQRT2 and other math defines by default.
 	// _USE_MATH_DEFINES must be defined in order to have these defined, thus




More information about the Scummvm-git-logs mailing list