[Top][All Lists]

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

Fixing interlibrary deps.

From: Sergey Poznyakoff
Subject: Fixing interlibrary deps.
Date: Wed, 11 Sep 2002 13:22:25 +0300


The libmailbox library currently is not self-contained. Here is
the list of dependencies that create problems:

mu_argp.c -> [argp stuff]
folder_imap.c -> strtok_r

Thus, linking an application against libmailbox fails on
systems whose libc does not have strtok_r and/or argp (thanks to
Hydrant for opening my eyes on this :^). In mailutils each application
is linked against both libmailbox and libmailutils, the latter
provides the replacements, so the problem is eliminated. We have
three possible solutions:

1) Move mu_argp.c back to lib and rewrite folder_imap.c to eliminate
use of strtok_r.

This doesn't seem feasible since, first, mu_auth depends on mu_argp
and, secondly, folder_imap.c relies heavily on strtok_r. Besides,
mu_argp provides a very convenient abstaction layer for arguments

2) Make libmailutils lib_LTLIBRARY.

Again, this hardly can be admitted, mailnly because many of the
sources in lib/ are under GPL, whereas libmailbox is under LGPL.

3) Move LTLIBOBJS from lib/ to mailbox/.

Due to the reason explained in 2) we cannot move *all* the LTLIBOBJS
to mailbox. However, we can just move the following:

  strtok_r.c strndup.c strnlen.c 
  strchrnul.c argp-ba.c argp-eexst.c argp-fmtstream.c argp-fs-xinl.c 
  argp-help.c argp-parse.c argp-pv.c argp-pvh.c argp-xinl.c

and it will make libmailbox self-consistent.

I'd vote for 3). Opinions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]