Commit Graph

29 Commits

Author SHA1 Message Date
David Korth
6eee9fecb0 [inih] Update: r58 -> r60 2025-04-08 22:23:33 -04:00
David Korth
f0647da5eb Remove CheckHiddenVisibility.cmake.
The root CMakeLists.txt has a minimum CMake version of 3.5, and
CheckHiddenVisibility.cmake's workarounds are only needed for
CMake 3.2 and earlier.

Set CMP0063 unconditionally (added in CMake 3.3) and set the
CMAKE_<LANG>_VISIBILITY_PRESET and CMAKE_VISIBILITY_INLINES_HIDDEN
variables where CHECK_HIDDEN_VISIBILITY() was called before.

There should effectively be no code changes with this commit.
2025-01-18 22:34:24 -05:00
David Korth
d470035e61 Switch to CMake's POSITION_INDEPENDENT_CODE property instead of manually adding "-fpic -fPIC".
Something changed that caused the build on Xubuntu 16.04 (32-bit) to fail:

[ 63%] Linking CXX shared library ../../lib/libromdata.so
/usr/bin/ld: read-only segment has dynamic IFUNC relocations; recompile with -fPIC
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: error: ld returned 1 exit status
src/libromdata/CMakeFiles/romdata.dir/build.make:3614: recipe for target 'lib/libromdata.so.6.0' failed
make[2]: *** [lib/libromdata.so.6.0] Error 1

Setting POSITION_INDEPENDENT_CODE instead of "-fpic -fPIC" fixes this.

[extlib] Correctly set properties on the 'mspack' target instead of
'libmspack'. Otherwise, libmspack won't have either EXCLUDE_FROM_ALL
or POSITION_INDEPENDENT_CODE.
2025-01-05 14:02:13 -05:00
David Korth
f4eb26ac4b [inih] Update: r56 -> r58
No significant changes for rom-properties' uses.
2024-02-17 16:59:50 -05:00
David Korth
d9c132da80 [inih] _MODIFIED_INIH.txt: s/r52/r56/ 2023-04-23 10:38:32 -04:00
David Korth
bcb9a0e93d [inih] Forgot to add the 'fuzzing' directory in the r56 update. 2022-07-14 19:34:35 -04:00
David Korth
78efb1645e [inih] Update: r53 -> r56
Define INI_API= to disable the symbol visibility macros, since inih
should not be visible outside of libromdata.
2022-07-13 23:45:04 -04:00
David Korth
c67e06b6b2 Disable symbol visibility in several extlib modules using static linking.
PowerVR, basisu_astc, inih, libmspack-xenia, and unice68 were leaking
externally-visible symbols in the Linux builds of UI frontends.
2022-06-18 15:29:52 -04:00
David Korth
eadcdf9327 Remove "/Gz" for stdcall on i386 when building with MSVC.
I tested a release build and it saved a total of 10,752 bytes.

On the other hand, it had a rather huge maintenance overhead, since I had
to ensure that all extlibs had __cdecl set up in the headers properly,
and this had to be redone on every update.

The i386 build of LZ4 on AppVeyor was failing in tests because of missing
stdcall symbols. I decided not to bother adding stdcall support to LZ4
and simply revert stdcall entirely.
2021-03-31 22:24:17 -04:00
David Korth
0f223add03 [inih] Update: r52 -> r53
Note that the only differences between r52 and r53 were in the
meson build scripts, so there are no real changes here.
2021-03-22 01:21:44 -04:00
David Korth
70e31278ba [inih] Updated to inih-r52. 2020-11-01 13:17:49 -05:00
David Korth
e1d0c027d6 [inih] Updated to inih-r51. 2020-06-19 18:08:56 -04:00
David Korth
a1a2e0895c Set all projects to require CMake 3.0.
- Added language specifications.
- Set the top-level project version in the PROJECT() call.
- Set CMP0063 to NEW if it's available. This enables the symbol
  visibility presets on *all* target types, not just shared libraries,
  module libraries, and executables with ENABLE_EXPORTS set.
2020-06-19 18:02:04 -04:00
David Korth
7a2be06de6 [inih] Updated to inih-r47.
Note that this only affects the C++ wrapper, which we aren't using.
2019-12-15 16:41:25 -05:00
David Korth
4b4c8715b8 [inih] tests: Committed some files that I missed previously.
These were showing up as untracked in `git status`.
2019-12-02 22:09:11 -05:00
David Korth
aaf9fbf293 [inih] Updated to inih-r46 (+1 commit). 2019-10-25 00:52:07 -04:00
David Korth
3d4258723e [inih] Updated _MODIFIED_INIH.txt. 2019-08-04 15:28:01 -04:00
David Korth
81f645717b [inih] Updated to inih-r45. 2019-08-04 15:24:02 -04:00
David Korth
6ad2d84548 [inih] Updated to inih-r44.
The only differences from r43 involve the C++ wrapper, so there's
effectively no changes for rom-properties.
2019-05-25 13:28:58 -04:00
David Korth
354795436a [inih] Updated to inih-r43.
Removed ini_parse_w(), since this should be handled by the caller.

[librpbase] ConfReader.cpp: On Windows, use _wfopen() to open the file
using a Unicode pathname, then use ini_parse_file() to parse the opened
INI file.
2019-04-13 14:02:07 -04:00
David Korth
d720bcdd0c [inih] Updated to inih-r42. 2018-05-17 22:22:52 -04:00
David Korth
952769421e [inih] Updated to inih r41.
This adds INI_START_COMMENT_PREFIXES to allow changing start-of-line
comment characters. It also adds dynamic line buffer reallocation,
though it's disabled in rom-properties.
2018-03-30 09:31:58 -04:00
David Korth
2e96ec05b0 [inih] ini.h: Use __cdecl in function pointers on 32-bit MSVC builds.
This fixes a Run-Time Check Failure #0 on 32-bit builds with /Gz.

[librpbase] ConfReader: Use `INIHCALL` for the inih callbacks.
2017-09-02 13:09:18 -04:00
David Korth
a09a65c372 [inih] Updated to inih r40.
This adds a new function ini_parse_string(), which parses an INI file
from a loaded C string buffer.

Local changes, including ini_parse_w(), have been preserved.
2017-06-10 22:11:54 -04:00
David Korth
550234c070 [inih] Disable multi-line value parsing.
Windows' INI code doesn't support it, and we probably don't need
it anyway.

libinih.a sizes (64-bit Linux, gcc-6.3.0):

Debug build:
- Before: 12,818 bytes
- After:  12,706 bytes
- Diff:      112 bytes

Release build:
- Before: 13,378 bytes
- After:  13,298 bytes
- Diff:       80 bytes
2017-05-07 12:59:46 -04:00
David Korth
29b9e9159e [inih] ini.c: _wfopen() needs a wide string for the mode.
MSVC 2010 gladly compiled this in C mode with only a warning.
The program ended up crashing at runtime with an MSVCRTD assertion.
2017-05-04 01:10:00 -04:00
David Korth
fbf8dd0c34 [inih] ini.c: Open the files as binary.
rstrip() removes trailing newlines and carriage returns, so we should
disable automatic "text mode" handling in the CRT.
2017-05-04 00:52:27 -04:00
David Korth
d92fec619f [inih] ini_parse_w(): New function that takes a wchar_t* filename.
Needed for Unicode filenames on Windows.
2017-05-04 00:51:43 -04:00
David Korth
77e87cf590 [inih] New INI parser library inih.
inih version r39: https://github.com/benhoyt/inih/releases/tag/r39

License: 3-clause BSD
2017-05-04 00:16:28 -04:00