#958243#5
Date:
2020-04-20 01:00:22 UTC
From:
To:
Hi,

As libinih-dev is now available, please consider linking against
system library instead of bundled ini.c.

#958243#10
Date:
2020-04-26 08:54:35 UTC
From:
To:
Control: tags -1 moreinfo


Hello,

Afaict libinih/upstream does not provide a shared library, the Debian
package is patched to build one. However inih does not seem to be
designed as a shared library. It is build-time configured by setting
#defines. The inih Debian patch changes/extends this:
--- a/ini.h +++ b/ini.h /* Maximum line length for any line in INI file (stack or heap). Note that this must be 3 more than the longest line (due to '\r', '\n', and '\0'). */ #ifndef INI_MAX_LINE #define INI_MAX_LINE 200 #endif +extern int ini_max_line; --- a/ini.c +++ b/ini.c +int ini_max_line = INI_MAX_LINE; [...] Afaict when linking /statically/ the old '#define INI_MAX_LINE 666' in config.h would continue to work even with the patched version but would be ignored if linking dynamically. Gnutls would need to set the global variable 'ini_max_line = 666' instead. (Isn't this going to break when gnutls sets 'ini_max_line = 666' and another program using both gnutls and inih sets/wants 'ini_max_line = 50' instead?) So linking gnutls against libinih-dev dynamically would require source changes which are not upstreamable because inih/shared is a Debian fork. cu Andreas
#958243#17
Date:
2021-01-23 13:33:44 UTC
From:
To:
Control: tags -1 -moreinfo

Hi,

Just FYI, this is no longer the case and upstream now provides a shared
library natively. The max line length is also a build time option in
the upstream build system, defaulting to 200.

See:

https://github.com/benhoyt/inih/blob/master/meson_options.txt

#958243#24
Date:
2021-01-23 14:22:12 UTC
From:
To:
The upstream shared library is not feature equivalent to the upstream
static library. Compile-time options for the static library like
INI_MAX_LINE or INI_STOP_ON_FIRST_ERROR have no equivalent dynamic library
runtime setting.

cu Andreas