Commit Graph

516 Commits

Author SHA1 Message Date
David Korth
c3643b9244 [libpng] Update: v1.6.48 -> v1.6.49
Includes the APNG patch.
2025-06-15 14:25:09 -04:00
David Korth
bf2d3af7c3 [gettext.win32] Updated to gettext-0.25.
Some checks are pending
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
Compiled with:
- i386:  gcc-15.1.0, MinGW-w64 12.0.0
- amd64: gcc-15.1.0, MinGW-w64 12.0.0

The file sizes have grown a bit. In particular, xgettext.exe grew from
1,529,344 bytes to 8,492,544 bytes. This might be related to various
gnulib updates, since libgnuintl-8.dll has a bunch of new exports
compared to 0.24.
2025-06-11 22:30:05 -04:00
David Korth
407fb36461 [libpng] Disable /guard:cf in MSVC builds for now.
Some checks failed
Codecov / run (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
This is what was causing the libpng crash in png_longjmp() on
Windows 10 in MSVC 2022 release builds.

See #451: libpng errors crash due to libpng setjmp/longjmp (Windows 10, release builds only)
Reported by @Masamune3210.
2025-05-26 11:11:51 -04:00
David Korth
440bb7aeb5 Increase minimum CMake versions to "3.5...3.10".
CMake 4.0 drops compatibility with versions older than 3.5, and warns
that compatibility with < 3.10 will be dropped in a "future version".

CMake 3.30 previously warned about dropping support for older than
3.5, which was changed in 3.31 to older than 3.10.
2025-05-25 15:39:40 -04:00
David Korth
b72bd8a436 [extlib] Skip installation of binaries for minizip-ng.
Some checks are pending
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
FIXME: The minigzip and minizip binaries are automatically built,
even though we use SET_EXTLIB_PROPERTIES(), which should exclude
them from ALL builds...
2025-05-25 00:35:04 -04:00
David Korth
8e841026e9 [minizip-ng] CMakeLists.txt: Don't check for ZLIB/ZLIBNG.
zlib is already checked earlier. On my system, since I have zlib-ng
installed system-wide, this check picks it up, and causes libromdata.so.6
to be linked to libz-ng.so.2.

Disabling the check removes that linkage.

NOTE: The Ubuntu packages for 2.5 and 2.5.1 are *not* linked to zlib-ng,
since Ubuntu doesn't have zlib-ng included by default.

Also, update _MODIFIED_MINIZIP.txt for 4.0.10. (Forgot to do this when
updating from 4.0.9 to 4.0.10.)
2025-05-13 22:47:38 -04:00
David Korth
25c5aa02cc [minizip] Update: v4.0.9 -> v4.0.10
Some checks failed
Codecov / run (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CMakeLists.txt: Add a missing "LINKER_LANGUAGE C". Not entirely sure
when this was added, or why I missed it...
2025-05-06 18:49:33 -04:00
David Korth
c66cd83539 [fmt] Update: v11.1.4 -> v11.2.0 2025-05-04 20:07:29 -04:00
David Korth
b4ba027439 [libpng] Forgot to check in new file PNGCheckLibconf.cmake.
Some checks are pending
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
2025-05-03 20:18:22 -04:00
David Korth
c706f7ba9b [libpng] Update: v1.6.47 -> v1.6.48
The APNG patch for v1.6.48 isn't out yet, but unlike v1.6.47, this
release doesn't have any major breaking changes.
2025-05-03 10:23:59 -04:00
David Korth
cb3ada3e88 [gettext.win32] Recompiled with gcc-15.1.0.
Some checks failed
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Has been cancelled
2025-04-25 18:23:11 -04:00
David Korth
684ef662a7 [gettext.win32] Updated to gettext-0.24.
Compiled with:
- i386:  gcc-14.2.1_p20241116, MinGW-w64 12.0.0
- amd64: gcc-14.2.1_p20241221, MinGW-w64 12.0.0

I tried updating it before, but every time I rebuilt gettext, it would
cause all of rom-properties to crash on startup. It turns out the
problem was -Wl,--pic-executable; removing this fixed it.

This *might* prevent ASLR .reloc sections from being generated in the
gettext executables. These are only used at compile time, so it's not
that big of an issue.

Removed most of the patches, since they are no longer necessary.
The remaining patches:

- 001-gettext-runtime-disable-iconv.patch
- 122-Use-LF-as-newline-in-envsubst.patch

Both patches have been updated for gettext-0.24.

TODO: Build for arm, arm64, and arm64ec.
2025-04-21 20:37:26 -04:00
David Korth
3022868577 [pugixml] Disable functionality we don't need.
This reduces the size of pugixml.dll to within range of what
tinyxml-10.dll was in previous versions.

Size comparisons: (amd64 release build, with LTO, MSVC 2022 17.6.5)

tinyxml-10.dll in rom-properties 2.4.1: 105,472

pugixml.dll:
- With all enabled:     222,208
- Disable XPATH:        142,336
- + disable STL:        121,856
- + disable exceptions: 121,856

NOTE: Disabling exceptions doesn't seem to change the code size at all,
even if STL is left enabled.
2025-04-20 11:13:35 -04:00
David Korth
b6538e24c9 [libpng] Rebased on 1.6.47 + "official" APNG patch.
The "official" patch doesn't put the APNG functions in the pngrutil.c
dispatch table like my version did, but my version might've been
a bit broken...
2025-04-20 02:27:45 -04:00
David Korth
301c895d33 [libpng] CMakeLists.txt: Fix PDB installation.
PNG_LIB_NAME was removed from CMakeLists.txt in v1.6.40, which was added
in rom-properties 2.2. No one seems to have noticed its absence, though...

Affects: v2.2 - v2.4.1
2025-04-20 02:19:28 -04:00
David Korth
8b17f8c5c5 [fmt] CMakeLists.txt: Fix installation path; install the PDB file.
Also added DO_SPLIT_DEBUG() and SET_WINDOWS_SUBSYSTEM().
2025-04-20 02:15:38 -04:00
David Korth
5d3ec38bce [minizip-ng] Don't install CMake or pkgconfig files, or header files.
[extlib] CMakeLists.txt: Set SKIP_INSTALL_HDR for MiniZip-ng, which for
some reason checks this variable instead of SKIP_INSTALL_HEADERS.
2025-04-20 02:09:19 -04:00
David Korth
a0738afd26 [pugixml] CMakeLists.txt: Only install the DLL and PDB files; fix the install path.
- Don't install CMake or pkgconfig files, or header files.
- Add DO_SPLIT_DEBUG() and SET_WINDOWS_SUBSYSTEM().
- Make sure the PDB file gets installed.
- Install to the correct path.

This fixes PugiXML's location in the Win32 zip file.
2025-04-20 02:06:16 -04:00
David Korth
0214ec25ec [rapidjson] biginteger.h, diyfp.h: Use softintrin.lib for _umul128 on arm64ec.
Ported from upstream.

extlib\rapidjson\include\rapidjson\internal\biginteger.h(22,9): error C2220: the following warning is treated as an error (compiling source file src\librpbase\TextOut_json.cpp)
extlib\rapidjson\include\rapidjson\internal\biginteger.h(22,9): warning C4163: 'UnsignedMultiply128': not available as an intrinsic function (compiling source file src\librpbase\TextOut_json.cpp)
extlib\rapidjson\include\rapidjson\internal\diyfp.h(27,9): warning C4163: 'UnsignedMultiply128': not available as an intrinsic function (compiling source file src\librpbase\TextOut_json.cpp)
2025-04-19 17:52:16 -04:00
David Korth
e6c96bc1d2 [zlib-ng] CMakeLists.txt: Also disable INSTALL_UTILS.
This is also set by extlib/CMakeLists.txt.

CMake Warning (dev) at extlib/zlib-ng/CMakeLists.txt:145 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'INSTALL_UTILS'.
This warning is for project developers.  Use -Wno-dev to suppress it.
2025-04-19 17:31:34 -04:00
David Korth
74b0465ae1 [zlib-ng] CMakeLists.txt: Disable the various optimization options.
We're setting these using SET() in extlib/CMakeLists.txt, so having them
as actual options causes CMake to print a bunch of warnings like this:

CMake Warning (dev) at extlib/zlib-ng/CMakeLists.txt:133 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'WITH_SSE2'.
This warning is for project developers.  Use -Wno-dev to suppress it.

[extlib] CMakeLists.txt: SET(WITH_VPCLMULQDQ ON)
2025-04-19 17:19:05 -04:00
David Korth
6765222c58 [unice68] unice68.c, exactread(): Fix a missing printf() format parameter.
Fixes two CodeQL warnings:
- Incorrect format parameter.
- Too few format parameters.
2025-04-15 22:29:53 -04:00
David Korth
2529100c11 [unice68] unice68.c: Fix some 64-bit compile warnings.
Ideally, we'd make it use size_t for all size parameters, but this is
old code, and doing that would require going through a lot of stuff,
so just cast it to int for now.

FIXME: unice68 is expecting fread() and fwrite() to return -1 on error,
but these functions return size_t, which is unsigned...
2025-04-11 18:28:19 -04:00
David Korth
6eee9fecb0 [inih] Update: r58 -> r60 2025-04-08 22:23:33 -04:00
David Korth
d1ff987d64 [minizip-ng] Fix some warnings that broke -Werror builds.
Initialize some variables, and use memcpy() instead of strncpy().

Remove the -Wno-error options. This broke on Debian 8 ppc (gcc-4.9.2),
which doesn't support -Wstringop-overflow or -Wstringop-truncation.

extlib/minizip-ng/compat/unzip.c: In function ‘unzGetFilePos’:
extlib/minizip-ng/compat/unzip.c:563:38: error: ‘file_pos64.pos_in_zip_directory’ may be used uninitialized [-Werror=maybe-uninitialized]
  563 |     file_pos->pos_in_zip_directory = (uint32_t)file_pos64.pos_in_zip_directory;
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:556:20: note: ‘file_pos64.pos_in_zip_directory’ was declared here
  556 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:564:29: error: ‘file_pos64.num_of_file’ may be used uninitialized [-Werror=maybe-uninitialized]
  564 |     file_pos->num_of_file = (uint32_t)file_pos64.num_of_file;
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:556:20: note: ‘file_pos64.num_of_file’ was declared here
  556 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
cc1: all warnings being treated as errors

extlib/minizip-ng/mz_zip.c: In function ‘mz_zip_set_comment’:
extlib/minizip-ng/mz_zip.c:1569:5: error: ‘__builtin___strncpy_chk’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
 1569 |     strncpy(zip->comment, comment, comment_size);
      |     ^
extlib/minizip-ng/mz_zip.c:1563:29: note: length computed here
 1563 |     comment_size = (int32_t)strlen(comment);
      |                             ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2025-04-07 20:55:55 -04:00
David Korth
b18e8b2fcd [extlib] CMakeLists.txt: Define ZEXPORT=__declspec(dllexport) for MiniZip.
A change in 4.0.8 results in ZEXPORT defaulting to nothing, which breaks
dllexports in the Windows version (and results in no import library
being generated).

Define ZEXPORT=__declspec(dllexport) to have the same behavior as 4.0.7.
2025-04-07 20:51:48 -04:00
David Korth
87196e25c6 [minizip-ng] unzip.h, zip.h: MSVC 2015 doesn't support __has_include().
Unconditionally use zlib.h instead of checking for zlib-ng.h.
2025-04-07 20:12:02 -04:00
David Korth
4779ac6f75 [extlib] CMakeLists.txt: Add STRICT macros for MiniZip.
This ensures unzFile/zipFile are opaque types instead of just
typedefs of void*.
2025-04-07 19:16:41 -04:00
David Korth
dedee7e5c7 [microtar] microtar.c: Use snprintf() instead of strncpy() to ensure NULL-termination.
CMakeLists.txt: Remove -Wno-error=stringop-truncation.
2025-04-07 19:16:28 -04:00
David Korth
05055964a0 [minizip] Update: v4.0.7 -> v4.0.9
[libromdata] J2ME, GcnFstTest: MiniZip's compat headers were moved
in v4.0.8.
2025-04-07 19:14:26 -04:00
David Korth
3367e4d6e6 [fmt] CMakeLists.txt: The cxx_std_11 check doesn't work on CMake 3.6, either.
Tested on Debian 8 ppc (qemu) with cmake-3.6.2.
2025-04-07 00:59:59 -04:00
David Korth
b8ba2bee67 [microtar] CMakeLists.txt: FIXME: Fix stringop-truncation warnings.
This broke the Ubuntu 22.04 AppVeyor build:

extlib/microtar/src/microtar.c: In function ‘mtar_read_header’:
extlib/microtar/src/microtar.c:111:3: error: ‘__builtin_strncpy’ output may be truncated copying 99 bytes from a string of length 99 [-Werror=stringop-truncation]
  111 |   strncpy(h->name, rh->name, sizeof(h->name));
      |   ^
extlib/microtar/src/microtar.c:112:3: error: ‘__builtin_strncpy’ output may be truncated copying 99 bytes from a string of length 99 [-Werror=stringop-truncation]
  112 |   strncpy(h->linkname, rh->linkname, sizeof(h->linkname));
      |   ^
cc1: all warnings being treated as errors
2025-04-06 19:41:58 -04:00
David Korth
cc3a501ae6 [unice68] unice68.c, set_binary_mode(): Suppress unused variable warnings. 2025-04-06 18:56:41 -04:00
David Korth
a680b67b99 [minizip-ng] CMakeLists.txt: FIXME: Fix stringop-overflow and stringop-truncation warnings.
This broke the Ubuntu 22.04 AppVeyor build:

extlib/minizip-ng/mz_compat.c: In function ‘unzGetFilePos’:
extlib/minizip-ng/mz_compat.c:1201:38: error: ‘file_pos64.pos_in_zip_directory’ may be used uninitialized [-Werror=maybe-uninitialized]
 1201 |     file_pos->pos_in_zip_directory = (uint32_t)file_pos64.pos_in_zip_directory;
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/mz_compat.c:1194:20: note: ‘file_pos64.pos_in_zip_directory’ was declared here
 1194 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
extlib/minizip-ng/mz_compat.c:1202:29: error: ‘file_pos64.num_of_file’ may be used uninitialized [-Werror=maybe-uninitialized]
 1202 |     file_pos->num_of_file = (uint32_t)file_pos64.num_of_file;
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/mz_compat.c:1194:20: note: ‘file_pos64.num_of_file’ was declared here
 1194 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
cc1: all warnings being treated as errors
2025-04-06 18:10:02 -04:00
David Korth
3a7f06e0fa [minizip-ng] CMakeLists.txt: FIXME: Fix stringop-overflow and stringop-truncation warnings.
This broke the Ubuntu 22.04 AppVeyor build:

extlib/minizip-ng/mz_zip_rw.c: In function ‘mz_zip_reader_entry_save_file’:
extlib/minizip-ng/mz_zip_rw.c:668:5: error: ‘__builtin_strncat’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  668 |     strncat(pathwfs, path, path_length);
      |     ^
extlib/minizip-ng/mz_zip_rw.c:662:19: note: length computed here
  662 |     path_length = strlen(path);
      |                   ^~~~~~~~~~~~
cc1: all warnings being treated as errors

extlib/minizip-ng/mz_zip.c: In function ‘mz_zip_set_comment’:
extlib/minizip-ng/mz_zip.c:1574:5: error: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
 1574 |     strncpy(zip->comment, comment, comment_size);
      |     ^
extlib/minizip-ng/mz_zip.c:1568:29: note: length computed here
 1568 |     comment_size = (int32_t)strlen(comment);
      |                             ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2025-04-06 14:44:21 -04:00
Cameron Cawley
e361e653bc Link internal libraries statically on Mac OS X 2025-04-03 11:01:51 +01:00
David Korth
95e1b19473 [extlib] Enable pugixml's built-in DLL postfix option.
pugixml uses "_d" instead of "d".

[pugixml] CMakeLists.txt: Disable options. The cmake_dependent_option()
setup for PUGIXML_USE_POSTFIX prevented the postfix from working because
the top-level source directory is not the same as PugiXML's directory.

[libwin32common] DelayLoadHelper: Handle PugiXML's "_d" postfix.

DelayLoadHelper.cmake has new variables for debug/release only DLLs,
which is used for PugiXML due to the different debug postfix.
2025-04-01 19:19:20 -04:00
David Korth
55f86d1158 Add an internal copy of PugiXML and remove TinyXML2 completely.
TODO:
- Add the 'd' postfix to the debug DLL.
- Configure PugiXML options and hide them from the user, since these are
  configured by rom-properties.
2025-04-01 19:19:20 -04:00
David Korth
0c0ff2e595 [libpng] pngrutil.c: Missed a few png_structrp/png_inforp changes. 2025-04-01 19:17:11 -04:00
David Korth
dd4251101c [zstd] zstd_compress.c, ZSTD_convertBlockSequences(): Add const to make it match the declaration in zstd_compress_internal.h.
MSVC 2015 is complaining now:

extlib\zstd\compress\zstd_compress.c(7321): error C2220: warning treated as error - no 'object' file generated [build\extlib\zstd\zstd.vcxproj]
extlib\zstd\compress\zstd_compress.c(7321): warning C4028: formal parameter 4 different from declaration [build\extlib\zstd\zstd.vcxproj]
2025-04-01 19:17:11 -04:00
David Korth
54e8215488 [platform] msvc.cmake: Add -D_SCL_SECURE_NO_WARNINGS.
[fmt] chrono.h: Revert the MSVC C4996 warning pragma. It didn't work.
Adding `-D_SCL_SECURE_NO_WARNINGS` *should* fix it.
2025-04-01 19:17:11 -04:00
David Korth
119de9f956 [fmt] chrono.h, color.h: Suppress some MSVC warnings.
These warnings (now handled as errors) appeared in the AppVeyor build
with MSVC 2015:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\algorithm(1669): error C2220: warning treated as error - no 'object' file generated [build\src\amiibo-data\amiiboc.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\algorithm(1669): warning C4996: 'std::reverse_copy::_Unchecked_iterators::_Deprecate': Call to 'std::reverse_copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' [build\src\amiibo-data\amiiboc.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\algorithm(1669): note: see declaration of 'std::reverse_copy::_Unchecked_iterators::_Deprecate'
  extlib\fmt\include\fmt/chrono.h(659): note: see reference to function template instantiation '_OutIt *std::reverse_copy<char*,char*>(_BidIt,_BidIt,_OutIt)' being compiled
          with
          [
              _OutIt=char *,
              _BidIt=char *
          ]
extlib\fmt\include\fmt\color.h(410): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning) [build\src\amiibo-data\amiiboc.vcxproj]
  extlib\fmt\include\fmt\color.h(409): note: while compiling class template member function 'bool fmt::v11::detail::ansi_color_escape<Char>::has_emphasis(fmt::v11::emphasis,fmt::v11::emphasis) noexcept'
          with
          [
              Char=wchar_t
          ]
  extlib\fmt\include\fmt\color.h(371): note: see reference to function template instantiation 'bool fmt::v11::detail::ansi_color_escape<Char>::has_emphasis(fmt::v11::emphasis,fmt::v11::emphasis) noexcept' being compiled
          with
          [
              Char=wchar_t
          ]
  extlib\fmt\include\fmt\color.h(450): note: see reference to class template instantiation 'fmt::v11::detail::ansi_color_escape<Char>' being compiled
          with
          [
              Char=wchar_t
          ]
  extlib\fmt\include\fmt/xchar.h(328): note: see reference to function template instantiation 'void fmt::v11::detail::vformat_to<T>(fmt::v11::detail::buffer<T> &,const fmt::v11::text_style &,fmt::v11::basic_string_view<wchar_t>,fmt::v11::basic_format_args<fmt::v11::wformat_context>)' being compiled
          with
          [
              T=wchar_t
          ]
2025-04-01 19:17:11 -04:00
David Korth
78cb92f273 [libmspack-xenia] lzxd.c: Fix some warnings in the 32-bit (i386) MSVC build. 2025-03-31 21:55:21 -04:00
David Korth
3be503184b [libpng] Fix incorrect signatures for the APNG functions.
png_structp -> png_structrp
png_infop -> png_inforp

TODO: Re-apply the APNG patch now that it's been rebased to 1.6.47.
2025-03-31 21:42:46 -04:00
David Korth
e3a427f6c2 [cmake] msvc.cmake: Make all warnings act as errors. (/W3 /WX)
The MSVC build (64-bit, at least...) now builds with no warnings.
Tested using MSVC 2022 17.6.5.

NOTE: /W4 adds a *lot* of warnings that are mostly just noise. Need to
check /W4 and selectively enable at least some of them...

Removed /wd4482. I don't think this warning is relevant anymore.

Warning fixes:

[extlib] Add (unsigned int) casts where necessary.

[librpbase] Config::ImgTypePrio_t, KeyManager::KeyData_t:
- Change `length` from unsigned int to size_t.
  The struct is 16 bytes on 64-bit either way, but making it size_t
  fixes some conversion warnings.

[librpbase] Hash::Process():
- crc32() returns `unsigned long`, not `uint32_t`, for some reason.
- Also, its length parameter is `unsigned int`, not `size_t`.
- KeyManager::hexStringToBytes(): Take a `size_t` length parameter.

[librpfile] scsi:
- Change cdb_len from `uint8_t` to `size_t`. Using a `uint8_t` argument
  doesn't actually save any memory, since it uses 4 bytes on the stack
  for 32-bit, and one register on 64-bit, regardless.
- Also, limit the maximum cdb size to 260.

[rp-download] Disable warning C4996 when calling GetVersionEx().

[librptexture] DirectDrawSurface:
- Change some `expected_size` variables from `unsigned int` to `size_t`.

[librptexture] PalmOS_Tbmp:
- Change d->bitmapTypeAddr from `off64_t` to `uint32_t`.
- Change some size variables from `unsigned int` to `size_t`.
- loadTbmp(): v3 transparency: Explicitly cast the transparency value
  to uint16_t. (It's stored as a big-endian 32-bit value, but only
  16 bits are used.)
- getNextTbmpAddress(): Cast addresses to `uint32_t`. PalmOS executables
  are 32-bit and cannot possibly exceed 4 GB.
  - FIXME: This function isn't used? (Was it ever used?)

[libromdata]
- DMGPrivate::CartType(): Make `end_offset` constexpr.
- NCCHReader: Add casts for EncSections when using sizeof().
- KeyStoreUIPrivate: binToHexStr(), verifyKeyData():
  - Take a `size_t` length parameter.
- WiiUPackagePrivate: Added a parseHexBinary32() wrapper function
  that returns `uint32_t` instead of `uint64_t`.

[librpbyteswap/tests]
- BitstuffTest: Cast time(nullptr) to `unsigned int`.
  srand() takes `unsigned int`, not `time_t`.

[librpbase/tests]
- RpPngFormatTest: crc32()'s length parameter is `unsigned int`,
  not `size_t`.

[libromdata/tests]
- SuperMagicDriveTest: zlib uses `unsigned int`, so cast array sizes
  to `unsigned int` instead of changing decompress() to take `size_t`.
2025-03-31 21:34:35 -04:00
David Korth
d5e2b8266f [minizip-ng] Cherry-pick a slight memory optimization for 64-bit systems.
Slightly reduces struct size by getting rid of padding.

Not including the mz_crypt_openssl.c change because it doesn't apply here.
2025-03-29 12:21:23 -04:00
David Korth
7f3bda3238 [zlib-ng] CMakeLists.txt: Also don't print the list of architecture-specific source files.
There's a lot of them on amd64.
2025-03-29 12:16:54 -04:00
David Korth
b1676ede31 [zlib-ng] CMakeLists.txt: Add a dummy add_feature_info() function.
TODO: Use FeatureSummary for the main project?
2025-03-29 12:15:53 -04:00
David Korth
c3e2b1985b [zlib-ng] CMakeLists.txt: Disable the automatic feature summary function.
zlib-ng isn't the main package here, so the feature summary isn't useful.
2025-03-29 12:13:50 -04:00
David Korth
a547396dca CMake 3.5: Work around some issues with C_STANDARD and CXX_STANDARD not working properly for C11/C++11.
Needed for Ubuntu 16.04.

This *might* be related to commit af0e29f7eb.
(CMakeLists.txt: Use C++20 if it's available.)
2025-03-23 15:25:36 -04:00