[Scummvm-git-logs] scummvm master -> 49585ad152248537432ffba43b4219b131abe316

sev- noreply at scummvm.org
Sun Dec 25 15:13:33 UTC 2022


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

Summary:
e4ed41950d GRIM: Fix luaA_passresults() int32/int discrepancy
ce09ee629e ULTIMA: NUVIE: Drop custom uint8/uint32/etc typedefs
70b2359f0b ULTIMA: NUVIE: Fix 'connect1' int32/int discrepancy
49585ad152 COMMON: BUILD: Use 'long' for int32 in MSVC 32-bit builds


Commit: e4ed41950dfe785bec136c23025a4999a4ec160f
    https://github.com/scummvm/scummvm/commit/e4ed41950dfe785bec136c23025a4999a4ec160f
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-12-25T16:13:29+01:00

Commit Message:
GRIM: Fix luaA_passresults() int32/int discrepancy

Linking would fail with MSVC when building for win32 with 'long' used
as the int32 typedef.

Changed paths:
    engines/grim/lua_v1.cpp


diff --git a/engines/grim/lua_v1.cpp b/engines/grim/lua_v1.cpp
index 9273300683e..6bba8405d7f 100644
--- a/engines/grim/lua_v1.cpp
+++ b/engines/grim/lua_v1.cpp
@@ -53,7 +53,7 @@ byte clamp_color(int c) {
 		return c;
 }
 
-int luaA_passresults();
+int32 luaA_passresults();
 
 void Lua_V1::new_dofile() {
 	const char *fname_str = luaL_check_string(1);


Commit: ce09ee629e5d483599cde3e50d21cfbe4cc3ffb0
    https://github.com/scummvm/scummvm/commit/ce09ee629e5d483599cde3e50d21cfbe4cc3ffb0
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-12-25T16:13:29+01:00

Commit Message:
ULTIMA: NUVIE: Drop custom uint8/uint32/etc typedefs

We already provide ours, and redefining them here this way makes the
build fail with MSVC when building for win32 with 'long' used as the
int32 typedef.

Changed paths:
    engines/ultima/nuvie/sound/adplug/opl_class.h


diff --git a/engines/ultima/nuvie/sound/adplug/opl_class.h b/engines/ultima/nuvie/sound/adplug/opl_class.h
index 72f69257c9e..886041fd53c 100644
--- a/engines/ultima/nuvie/sound/adplug/opl_class.h
+++ b/engines/ultima/nuvie/sound/adplug/opl_class.h
@@ -39,17 +39,6 @@ namespace Nuvie {
 /* select output bits size of output : 8 or 16 */
 #define OPL_SAMPLE_BITS 16
 
-/* compiler dependence */
-#ifndef OSD_CPU_H
-#define OSD_CPU_H
-typedef unsigned char   uint8;   /* unsigned  8bit */
-typedef unsigned short  UINT16;  /* unsigned 16bit */
-typedef unsigned int    uint32;  /* unsigned 32bit */
-typedef signed char     int8;    /* signed  8bit   */
-typedef signed short    int16;   /* signed 16bit   */
-typedef signed int      int32;   /* signed 32bit   */
-#endif
-
 #if (OPL_SAMPLE_BITS==16)
 typedef int16 OPLSAMPLE;
 #endif


Commit: 70b2359f0b9fa65943f87af36e574a7ffaf0b9e6
    https://github.com/scummvm/scummvm/commit/70b2359f0b9fa65943f87af36e574a7ffaf0b9e6
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-12-25T16:13:29+01:00

Commit Message:
ULTIMA: NUVIE: Fix 'connect1' int32/int discrepancy

Build would fail with MSVC when building for win32 with 'long' used as
the int32 typedef.

Changed paths:
    engines/ultima/nuvie/sound/adplug/opl_class.h


diff --git a/engines/ultima/nuvie/sound/adplug/opl_class.h b/engines/ultima/nuvie/sound/adplug/opl_class.h
index 886041fd53c..8e85637e39d 100644
--- a/engines/ultima/nuvie/sound/adplug/opl_class.h
+++ b/engines/ultima/nuvie/sound/adplug/opl_class.h
@@ -68,7 +68,7 @@ typedef struct {
 	uint32  Cnt;        /* frequency counter            */
 	uint32  Incr;       /* frequency counter step       */
 	uint8   FB;         /* feedback shift value         */
-	int32   *connect1;  /* slot1 output pointer         */
+	signed int *connect1;  /* slot1 output pointer         */
 	int32   op1_out[2]; /* slot1 output for feedback    */
 	uint8   CON;        /* connection (algorithm) type  */
 


Commit: 49585ad152248537432ffba43b4219b131abe316
    https://github.com/scummvm/scummvm/commit/49585ad152248537432ffba43b4219b131abe316
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-12-25T16:13:29+01:00

Commit Message:
COMMON: BUILD: Use 'long' for int32 in MSVC 32-bit builds

The NDS and AmigaOS ports have frequent buildbot issues, because they
need to use 'long' for int32, for their own reasons. The buildbot is
run *after* things are merged into the main branch, so we'd like to
catch the frequent int/int32 build issues as an earlier development
stage (such as by the automated Github Actions).

MSVC 32-bit builds look like a good candidate for this, since its
'long' is also a 32-bit value on Win32, this platform is tested by
Github Actions right from the PR stage, and there are more developers
doing frequent local build tests there.

Not applying this change to Mingw builds yet, since GCC is less
permissive  about this trick (i.e. -Wformat becomes quite noisy), and
the Mingw builds are used for releases, so let's be safe for now.

Changed paths:
    common/scummsys.h


diff --git a/common/scummsys.h b/common/scummsys.h
index eab1f2caf81..09c289f40f8 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -475,8 +475,20 @@
 	typedef signed char int8;
 	typedef unsigned short uint16;
 	typedef signed short int16;
+	// HACK: Some ports, such as NDS and AmigaOS, are not frequently
+	// tested during development, but cause frequent buildbot failures
+	// because they need to use 'long' for int32. Windows 32-bit
+	// binaries have this nice property of being easy to build, having
+	// a 32-bit 'long' too, *and* being frequently tested (incl. Github
+	// Actions). We want to catch this case as early and frequently
+	// as possible, so Win32 is probably the best candidate for this...
+	#if defined(WIN32) && !defined(_WIN64)
+	typedef unsigned long uint32;
+	typedef signed long int32;
+	#else
 	typedef unsigned int uint32;
 	typedef signed int int32;
+	#endif
 	typedef unsigned int uint;
 	typedef signed long long int64;
 	typedef unsigned long long uint64;




More information about the Scummvm-git-logs mailing list