Subject: Re: Again: how how best handle libnbcompat (snprintf)?
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 11/29/2005 15:02:24
On Tue, 29 Nov 2005, Georg Schwarz wrote:
> pkgtools/digest needs snprintf() to compile, which IRIX 5.3 does not
> have. Fortunately libnbcompat provides that function.
> Adding
>
> .include "../../pkgtools/libnbcompat/buildlink3.mk" # for snprintf()
>
> in pkgtools/digest/Makefile nicely solves the issue. Now I am wondering
> whether this should simply be done unconditionally.
No, because:
> Could this add unnecessary code for other OSes?
Yes. It may even add conflicting definitions for some functions. And
libnbcompat is not shlib friendly.
> Or is there some clever mechanism in libnbcompat to prevent this?
Such a mechanism was discussed at a very high level earlier in 2005, but the
idea hasn't materialized yet. Until there is a more granular way to use
libnbcompat, I strongly advise using OS conditionals. (In fact, it may be
best to put the conditionals into a hacks.mk for the package so that these
are easier to find in most cases.)
--
-- Todd Vierling <tv@duh.org> <tv@pobox.com> <todd@vierling.name>