This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Guile patch to avoid copyright problems


Hello,

Currently libguile has the problem that is not clear (from the
application's point of view) which license it currently has.

For instance, if you make use of the license exception it's too
easy for users to violate the GPL without even noticing for instance
by linking in GPLed libraries.

To avoid this problem, GPLed guile interpreters should define some
feature which both the library and code like ice-9/boot-9.scm can
use to determine whether it's permitted to include GPLed code.

This patch calles `scm_add_feature("gnu")' in the main guile interpreter
and also adds a section to the manual stating that one should do the
same in any GPLed interpreter.

                                   * * *

Index: NEWS
===================================================================
RCS file: /cvs/guile/guile/guile-core/NEWS,v
retrieving revision 1.108
diff -u -u -r1.108 NEWS
--- NEWS	1999/05/09 09:12:53	1.108
+++ NEWS	1999/06/05 16:08:05
@@ -8,6 +8,15 @@
 
 * Changes to the distribution
 
+** GPLed guile interpreters should now define the `gnu' feature.
+
+If you link libguile into a GPLed executable, please set the `gnu'
+feature. This is used by the library to determine whether it's
+permitted to dynamically link in GPLed libraries or not.
+
+The main guile interpreter included in this distribution also defines
+this feature.
+
 ** Readline support is no longer included with Guile by default.
 
 Based on the different license terms of Guile and Readline, we
Index: libguile/guile.c
===================================================================
RCS file: /cvs/guile/guile/guile-core/libguile/guile.c,v
retrieving revision 1.2
diff -u -u -r1.2 guile.c
--- guile.c	1997/05/26 22:32:46	1.2
+++ guile.c	1999/06/05 16:08:06
@@ -57,6 +57,7 @@
 inner_main (void *closure, int argc, char **argv)
 {
   /* module initializations would go here */
+  scm_add_feature ("gnu");
   scm_shell (argc, argv);
 }
 
Index: ref/gh.texi
===================================================================
RCS file: /cvs/guile/guile/guile-doc/ref/gh.texi,v
retrieving revision 1.14
diff -u -u -r1.14 gh.texi
--- gh.texi	1998/10/27 06:09:47	1.14
+++ gh.texi	1999/06/05 16:06:05
@@ -246,6 +246,28 @@
 procedures @code{(gsl-ran-random)}, @code{(gsl-ran-gaussian)} and so
 forth.
 
+If you link libguile into a GPLed executable, you may want to call
+@code{scm_add_feature("gnu")} before @code{gh_repl ()}. This tells the
+library that it is ok to dynamically link in other GPLed libraries.
+
+@smallexample
+#include <guile/gh.h>
+#include <gsl_ran.h>
+
+void
+main_prog (int argc, char *argv[])
+@{
+  scm_add_feature("gnu");
+
+  gh_repl(argc, argv);
+@}
+
+int
+main (int argc, char *argv[])
+@{
+  gh_enter (argc, argv, main_prog);
+@}
+@end smallexample
 
 @page
 @node Error messages

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]