argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
377 stars 65 forks source link

License-related question #54

Closed Kerl13 closed 3 years ago

Kerl13 commented 3 years ago

I am a bit confused with the license texts included in the src/getopt.h and src/getopt_long.c files.

What I gather from looking at the files

The src/getopt.h header seems to include a 4-clause BSD license whereas src/getopt_long.c contains:

The important point is: there is no mention of the "3rd clause" of the 4-clause BSD license in src/getopt_long.c.

Also, the LICENSE file at the root of the repository says that the getopt library is distributed by argtable under the 4-clause BSD license.

What I don't understand

Does this mean that:

NB 1. This is related to issue #24. I'm trying to understand which part of argtable exactly I need to remove/replace to get rid of the 4-clause BSD license.

NB 2. I'm no expert in licenses, so I'm sorry if I'm missing a trivial point…

tomghuang commented 3 years ago

@Kerl13 I don't understand the problem you face. Does it cause any trouble for you?

I'm not an expert in licenses, either. However, when I established Argtable3, one of the major goals is to get rid of LGPL, which is used by Argtable2 and not commercial-friendly. What I know is, all BSD-style licenses are commercial friendly, so I'm not sure what's the problem when different BSD-style licenses mixing together.

When I chose the getopt implementation from NetBSD, I just copied the source files without changing any license statement. I don't think it's a mistake, because I believe I should keep the original license statements.

If this license issue really concerns you, like what you've found, you can use your own getopt implementation by setting ARG_REPLACE_GETOPT. Thanks.

Kerl13 commented 3 years ago

I think BSD-style licenses are a great choice for argtable.

My only concern with the 4-clause BSD is that the (apparently controversial) 3rd clause, aka the "advertising" clause, makes it incompatible with the GPL. So I cannot use argtable3 as is if I also have GPL-licensed dependencies.

It would have been ideal not to have this clause in the NetBSD implementation, but I assume I'll have to use my getopt then :man_shrugging: Thanks for your answer anyway!

tomghuang commented 3 years ago

I had a ticket long time ago about the same 4-clause BSD and GPL incompatibility issue. My solution is: use your own getopt implementation. However, since you are the second one mentioning this issue, I guess I need to switch to the FreeBSD implementation, which uses 2-clause BSD.

For now, maybe you can use the FreeBSD version by yourself.

Kerl13 commented 3 years ago

This would be a nice enhancement I think, thanks for considering it