Control: tags -1 -moreinfo On Sun, 26 Apr 2020 10:54:35 +0200 Andreas Metzler <ametz...@bebt.de> wrote: > Control: tags -1 moreinfo > > On 2020-04-20 Yangfl <mmyan...@gmail.com> wrote: > > Source: gnutls28 > > Severity: wishlist > > > Hi, > > > As libinih-dev is now available, please consider linking against > > system library instead of bundled ini.c. > > > 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
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 -- Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part