On 10/07/17 15:07, Gert Doering wrote: > 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. >
I was referring to something he said in response to a comment to his v1: if we use the bundled lz4, we might have a user stuck on our version even though at some point he decided to update his system-wide lz4 library to a more recent release (maybe because of some security bugs). The user at that point won't notice that openvpn is still running with an older release. > >> 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. Thanks for the explanation! I wasn't aware how we got to this configuration :) anyway, you are right. Deciding the faith of the bundled lib is probably worth another thread/discussion. Cheers, -- Antonio Quartulli
signature.asc
Description: OpenPGP digital 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