pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: tnftp build fails on aix 6.1 for 2015Q4

On 1/6/16 11:08 AM, Joerg Sonnenberger wrote:
> On Mon, Jan 04, 2016 at 10:12:17PM -0600, J Raynor wrote:
>> I believe vasprintf can’t be found because AIX doesn’t have it.
>> If I were to submit a patch, should I modify ssl.c so it doesn’t
>> need to use vasprintf?  Should I provide an implementation of
>> vasprintf for systems that don’t have it?
> libnbcompat has a good working copy, it just needs to be included with
> tnftp as well.

Hi, Joerg!

I fully accept this as the best solution, but for my own understanding,
would you or someone else be willing to explain why it's the best
solution as opposed to linking against the nbcompat static library

To me, advantages of including it in tnftp are:

* No dependency on libnbcompat.  A dependency on another library just
  makes tnftp harder to compile.

Advantages of linking against the nbcompat library are:

* No duplicate code.  If there's a fix for vasprintf in libnbcompat, it
  can be fixed in one place (i.e. libnbcompat) instead of two.  Since
  nbcompat is not a shared library, tnftp still needs to be recompiled,
  but at least the source code is not duplicated.

I would tend to put a higher value on not duplicating code.  On the
other hand, if tnftp already has duplicate code, I could see following
that precedent and adding the vasprintf code.

I could also see a view that reasoned as follows: the vasprintf
code being added is unlikely to change and unlikely to contain a
bug.  Therefore, it's not a big deal to have duplicate code, and the
maintainer accepts the possible maintenance cost for that while getting
the benefit of an application with no or minimal dependencies.



Home | Main Index | Thread Index | Old Index