Hi,

On Mon, Jul 10, 2017 at 02:33:43PM +0800, Antonio Quartulli wrote:
> On 10/07/17 14:30, Gert Doering wrote:
> > On Mon, Jul 10, 2017 at 12:31:31PM +0800, Antonio Quartulli wrote:
> >> Instead of cluttering the code with these ifdefs directly in the main
> >> codebase, how about doing it in compat.h, like this (it's a copy/paste -
> >> code might be wrapper by the mail client):
> > 
> > Better, but I wonder if we shouldn't fix this in configure.ac - "if the
> > system lz4 is older than what we bundle(*), use our compat-lz4.c instead"
> > 
> > (*) ... or older than what we need, functionality-wise
> 
> If we do this, then we jump into the can of worms that David S.
> mentioned earlier, I think.

Uh, what can of worms specifically?  (David mentions lots of worms)

#ifdef in the code, or having funny wrapper functions hidden in .h files
are worms as well - and these two are the ones that make the code hard
to follow, so there's good reason to judge the trade-offs.


> Generally speaking, why not just depending on "libX >= a.b.c." and error
> out (at config time) if such lib is not available ?
> 
> I think many other programs do exactly the same.

We are not "many other programs" :-) - and we decided, when we introduced
lz4, that we want to bundle it as it's not a library installed commonly
(yet).   And the whole point of "compat-*" stuff is "use it if the system is
not adequate", without having to be turned-on explicitly.

We can change this, and remove the bundled compat-lz4* stuff, but that's a 
different discussion.

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to