Commit Graph

242 Commits

Author SHA1 Message Date
Donovan Watteau
49585ad152 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.
2022-12-25 16:13:29 +01:00
Cameron Cawley
309088dfb2 COMMON: Add WARN_DEPRECATED 2022-11-29 00:06:49 +01:00
Thierry Crozat
e36abe967e COMMON: Move std::initializer_list to scummsys.h 2022-09-04 23:20:17 +01:00
Le Philousophe
111d259015 ALL: Add limits.h for all codebase 2022-08-22 15:38:10 +02:00
Cameron Cawley
0d37729ff7 COMMON: Fix reading and writing doubles from streams with older ARM toolchains 2022-07-02 12:49:22 +02:00
Donovan Watteau
4567f1b176 DINGUX: Only evaluate the toupper() macro argument once
toupper() callers should avoid putting a side-effect expression there, but
in practice it sometimes happen, so making the macro safer can't hurt.

This uses a GCC statement expression, but this port only uses GCC
anyway.
2022-06-12 10:30:04 +02:00
Eugene Sandulenko
5e05f93f36
ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
Donovan Watteau
5ebd9b8d23 BUILD: Remove/simplify GCC_ATLEAST() calls when they targeted pre-C++11 compilers
C++11 is now required, so there's no point in checking for pre-C++11
versions of GCC anymore.  Note that Clang defines __GNUC__ too, but
always reports itself as GCC-4.2.1-compatible (and, in practice, the
earliest C++11-compatible versions of Clang will also be have most
GCC 4.8 features).
2022-05-25 19:07:30 +03:00
Donovan Watteau
5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
D G Turner
4491ccb8bd COMMON: Fix Undefined Macro Warnings in OSystem Header
These are emitted by GCC when -Wundef is passed.
2022-03-10 18:47:39 +00:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
f0af2b513b
COMMON: Remove c++11-compat.h. It is not needed anymore 2021-10-31 23:07:36 +02:00
Eugene Sandulenko
c544e5119b
COMMON: Remove USE_CXX11 checks, it is now always present 2021-10-31 11:52:29 +02:00
Cameron Cawley
987c0eb76a COMMON: Add a signed version of uintptr 2021-09-19 11:21:41 +03:00
SupSuper
e3d082df65 MSVC: Add compiler printf validation 2021-06-02 08:35:31 +03:00
Orgad Shaneh
1f6f82361f COMMON: Use __gnu_printf__ instead of __printf__ for gcc on MinGW
With __printf__, MinGW prefers the portable old ms-style printf, and
warns if formats like %lld and %hhd are used.

In practice, if __USE_MINGW_ANSI_STDIO is not defined, it defaults to 1
on C++11, and these formats are supported. Using __gnu_printf__
suppresses bad format warnings.
2021-03-31 02:09:45 +03:00
Eugene Sandulenko
5dfb0c592c COMMON: Remove duplicate include 2021-03-22 00:07:45 +01:00
Matthew Hoops
6b87aee941 COMMON: Ensure stddef.h is included in scummsys.h 2021-03-22 00:07:39 +01:00
Thierry Crozat
50932ffb38 BUILD: Fix building with c++11 on systems without std::nullptr_t 2021-03-07 19:30:34 +00:00
Orgad Shaneh
81fd1d529b COMMON: Fix warnings on mingw build
bits/os_defines.h has #define NOMINMAX 1, which conflicts with the
non-value #define NOMINXMAX in scummsys.h.

In file included from ../scummvm/common/lua/lua.h:12,
                 from ../scummvm/common/lua/ltable.cpp:27:
../scummvm/common/scummsys.h:111: warning: "NOMINMAX" redefined
  111 |   #define NOMINMAX
      |
In file included from C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-
mingw32/bits/c++config.h:518,
                 from C:/msys64/mingw64/include/c++/10.2.0/cmath:41,
                 from C:/msys64/mingw64/include/c++/10.2.0/math.h:36,
                 from ../scummvm/common/lua/ltable.cpp:21:
C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-mingw32/bits/
os_defines.h:45: note: this is the location of the previous definition
   45 | #define NOMINMAX 1
      |

Amends commit 88f685217b.
2021-03-06 03:06:11 +00:00
SupSuper
88f685217b COMMON: Don't use Win32 MIN/MAX since ScummVM provides its own 2021-03-03 11:17:37 +00:00
Eugene Sandulenko
f27bf85bf7 COMMON: Fix for modern GCC 2021-02-12 00:55:16 +01:00
BeWorld
775f6c4803 MORPHOS: Update scummsys.h
MorphOS support
2020-08-21 00:59:18 +02:00
Eugene Sandulenko
aa563f0c81 ALL: Remove PS2 port 2020-08-01 15:15:49 +02:00
Michał Janiszewski
e0505d5fbf COMMON: Add MSVC ARM64 support 2020-07-15 15:30:55 +02:00
Cameron Cawley
f2b9f7bb76 BACKENDS: Remove the Windows CE port 2019-11-17 22:33:56 +01:00
Cameron Cawley
bcef809e61 WINCE: Fix compilation 2019-04-15 08:06:39 +03:00
SupSuper
d0512db25c WIN32: Move all ARRAYSIZE undefs to util.h
Instead of trying to undefine ARRAYSIZE everywhere we use a Windows header, let's just do it before we define our own
2018-12-17 12:28:33 +02:00
Cameron Cawley
8fa2f90a26 CREATE_PROJECT: Support building with Tremor instead of Vorbis 2018-11-27 22:58:02 +00:00
Cameron Cawley
79a4e3f813 BACKENDS: Remove references to the GP32 backend 2018-11-04 21:38:45 +00:00
Adrian Frühwirth
a0d7a99439 COMMON: Add WARN_UNUSED_RESULT to scummsys.h 2018-04-04 20:56:41 +00:00
Colin Snover
2de83e0937 COMMON: Use C++11 static_assert when available
This improves the output of static assertions in all compilers,
and prevents problems in MSVC 2015 where the mechanism for
triggering a compilation error in C++98 mode may cause errors when
that compiler builds in release mode.

Fixes Trac#10154.
2017-11-10 09:56:43 -06:00
Bastien Bouclet
bbdbd85324 COMMON: Remove unused OverlayColor typedef 2017-09-30 21:35:16 +02:00
Bastien Bouclet
55f46d3667 BUILD: Define pointer sized integer types and remove SCUMM_64BITS 2017-09-30 21:35:16 +02:00
Peter Kohaut
d34314ccc9 BUILD: Fixed macro redefinition warning for 64 bits builds 2017-03-09 23:48:57 +01:00
Thierry Crozat
5484f36f38 BUILD: Define SCUMM_64BITS on 64 bits platforms when not using configure
This for example fixes the compilation of the fullpipe engine on 64 bits
platforms when using create_project.
2017-02-06 21:49:38 +00:00
Colin Snover
135ac922aa COMMON: Define STATIC_ASSERT for all ports
Ports with -DNONSTANDARD_PORT need this too.
2017-01-14 10:17:58 -06:00
Colin Snover
7e0b40173f COMMON: Add STATIC_ASSERT macro to scummsys.h 2017-01-08 13:20:23 -06:00
Colin Snover
849e29dc87 COMMON: Add stddef.h to scummsys.h for ptrdiff_t 2016-12-19 15:00:09 -06:00
Willem Jan Palenstijn
68a15c10be Merge pull request #790 from salty-horse/clang_fixes
ALL: Don't use 'defined' in macro definitions
2016-08-13 11:57:39 +02:00
Bastien Bouclet
8d34d5190d Revert "BUILD: Fix test compilation with event recorder enabled"
This reverts commit 1f8667c5d9.
2016-07-28 18:23:50 +02:00
Ori Avtalion
4d120800fa ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
2016-07-23 16:18:51 +03:00
Eugene Sandulenko
1f8667c5d9 BUILD: Fix test compilation with event recorder enabled 2016-05-23 16:36:26 +02:00
Thomas Edvalson
e2b9572a83 3DS: Initial commit 2016-04-06 02:12:02 -04:00
Johannes Schickel
e7f54aec7d COMMON: A few formatting fixes. 2015-12-12 06:54:58 +01:00
Paul Gilbert
89dfd36b60 CREATE_PROJECT: Add support for Visual Studio 2015 2015-09-28 19:23:58 -04:00
Filippos Karapetis
daf110c867 COMMON: Remove trailing whitespace 2014-10-28 15:38:52 +02:00
Eugene Sandulenko
c3ffbd884a Merge pull request #426 from sunmax/master
PS2: Pull request to master for latest PS2 code
2014-04-28 21:20:42 +03:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Max Lingua
b69a2c81a7 PS2: scummsys.h (u)int64 is "long" for PS2 2014-01-19 12:53:55 -05:00