4 ms·
This is actually a very practical question, as IIRC Editline was readline compatible on some levels. What follows is all my hazy recollection. If memory serves
by gchpaco 17y ago
This is actually a very practical question, as IIRC Editline was readline compatible on some levels.
What follows is all my hazy recollection.
If memory serves, the answer was this, although obviously if you ask RMS you get slightly different answers depending: you have to GPL your code (if you distribute it) if you link to GPL code. If you can plausibly link to several different libraries, not all of which are GPL, you don't. So when readline was alone in the world, everything that used it had to be GPL. The BSD folks wrote editline specifically to avoid this--initially, editline was extremely lame compared to readline and I think might still be, but because the API was equivalent they could say "We're BSD licensed through and through; use our code for anything you want" and still have a non-horrible CLI and yet at link time decide to use the good library.
I think the reason this works legally, although I'm not a lawyer, is because yes, when you link your program with readline that executable cannot be distributed except under the terms of the GPL. Because you have multiple potential targets for this sort of thing, nobody can argue that you are trying to technically evade the requirements.
But apparently this is still contentious.
- durin42 17y agoeditline is intended to be API compatible, and has weakened the argument that linking implies work-derivation at least somewhat. As far as I know, nobody has ever been willing to test that theory in court since they'd lose so much political face in the process. Sometime last year, I saw an article claiming that because of libedit's existence, we could all link against readline from whatever we wanted (or at least that this showed that the dynamic-linking-is-deriving was crap), but I can't find the article now.