Bug#958243: Use system libinih-dev

Andreas Metzler ametzler at bebt.de
Sat Jan 23 14:22:12 GMT 2021


On 2021-01-23 Luca Boccassi <bluca at debian.org> wrote:
> On Sun, 26 Apr 2020 10:54:35 +0200 Andreas Metzler <ametzler at bebt.de> wrote:

> > 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

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
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



More information about the Pkg-gnutls-maint mailing list