From ebe3207f870ca379c32c61edcb75466a86ba6e93 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 9 Nov 2018 19:11:17 +0100 Subject: [PATCH] Fix licensing clash The glibc code is LGPL 2.1 or later. Fix it in the generated files and mention this fact in the documentation. Fixes bug #54996. --- doc/gengetopt.texinfo | 3 +++ src/skels/custom_getopt_gen.cc | 2 +- src/skels/custom_getopt_gen.h_skel | 2 +- tests/test_first_cmdline_cmd.c.test | 2 +- tests/test_second_cmdline_cmd.c.test | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/gengetopt.texinfo b/doc/gengetopt.texinfo index c0d9c39..a5c1d80 100644 --- a/doc/gengetopt.texinfo +++ b/doc/gengetopt.texinfo @@ -168,6 +168,9 @@ licensed with a simple all-permissive license instead of the GPL or LGPL. You are free to do anything you like with the generated code, including incorporating it into or linking it with proprietary software. +If you use @code{--include-getopt}, then Gengetopt adds a getopt code +that is licensed under LGPL 2.1 or later. + Gengetopt was originally written by Roberto Arturo Tena Sanchez. It is currently maintained by Lorenzo Bettini @value{myhomepage}. diff --git a/src/skels/custom_getopt_gen.cc b/src/skels/custom_getopt_gen.cc index abab5f6..40dfa6b 100644 --- a/src/skels/custom_getopt_gen.cc +++ b/src/skels/custom_getopt_gen.cc @@ -21,7 +21,7 @@ custom_getopt_gen_gen_class::generate_custom_getopt_gen(ostream &stream, unsigne stream << " *"; stream << "\n"; stream << indent_str; - stream << " * Licensed under the GPL as per the whole glibc source tree."; + stream << " * Licensed under the LGPL 2.1 or later as per the whole glibc source tree."; stream << "\n"; stream << indent_str; stream << " *"; diff --git a/src/skels/custom_getopt_gen.h_skel b/src/skels/custom_getopt_gen.h_skel index 36a4bf6..9a245ed 100644 --- a/src/skels/custom_getopt_gen.h_skel +++ b/src/skels/custom_getopt_gen.h_skel @@ -1,7 +1,7 @@ /* * Extracted from the glibc source tree, version 2.3.6 * - * Licensed under the GPL as per the whole glibc source tree. + * Licensed under the LGPL 2.1 or later as per the whole glibc source tree. * * This file was modified so that getopt_long can be called * many times without risking previous memory to be spoiled. diff --git a/tests/test_first_cmdline_cmd.c.test b/tests/test_first_cmdline_cmd.c.test index 5dd6224..8e6537f 100644 --- a/tests/test_first_cmdline_cmd.c.test +++ b/tests/test_first_cmdline_cmd.c.test @@ -560,7 +560,7 @@ test_first_cmdline_cmd_parser_required2 (struct test_first_cmdline_cmd_struct *a /* * Extracted from the glibc source tree, version 2.3.6 * - * Licensed under the GPL as per the whole glibc source tree. + * Licensed under the LGPL 2.1 or later as per the whole glibc source tree. * * This file was modified so that getopt_long can be called * many times without risking previous memory to be spoiled. diff --git a/tests/test_second_cmdline_cmd.c.test b/tests/test_second_cmdline_cmd.c.test index f6720d2..3edfd3d 100644 --- a/tests/test_second_cmdline_cmd.c.test +++ b/tests/test_second_cmdline_cmd.c.test @@ -569,7 +569,7 @@ test_second_cmdline_cmd_parser_required2 (struct test_second_cmdline_cmd_struct /* * Extracted from the glibc source tree, version 2.3.6 * - * Licensed under the GPL as per the whole glibc source tree. + * Licensed under the LGPL 2.1 or later as per the whole glibc source tree. * * This file was modified so that getopt_long can be called * many times without risking previous memory to be spoiled. -- 2.19.1