aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-11-24 20:27:02 +0200
committerArnold D. Robbins <arnold@skeeve.com>2010-11-24 20:27:02 +0200
commit50d4a80f67e5bcbf3902138d85a25f6a90847d31 (patch)
tree18ebd4f82b1b5732977926b9bac4634bfb002759 /doc/gawk.texi
parentb9c0946c39a677f733d42a26d2de3f44131bbdd8 (diff)
downloadegawk-50d4a80f67e5bcbf3902138d85a25f6a90847d31.tar.gz
egawk-50d4a80f67e5bcbf3902138d85a25f6a90847d31.tar.bz2
egawk-50d4a80f67e5bcbf3902138d85a25f6a90847d31.zip
Add check for plugin license, make close on exec POSIX compatibile.
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index a8aef1b7..28692a39 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -660,6 +660,7 @@ particular records in a file and perform operations upon them.
@command{gawk}.
* Internals:: A brief look at some @command{gawk}
internals.
+* Plugin License:: A note about licensing.
* Sample Library:: A example of new functions.
* Internal File Description:: What the new functions will do.
* Internal File Ops:: The code for internal file operations.
@@ -28275,6 +28276,7 @@ When @option{--sandbox} is specified, extensions are disabled.
@menu
* Internals:: A brief look at some @command{gawk} internals.
+* Plugin License:: A note about licensing.
* Sample Library:: A example of new functions.
@end menu
@@ -28598,6 +28600,22 @@ Again, you should spend time studying the @command{gawk} internals;
don't just blindly copy this code.
@c ENDOFRANGE gawint
+@node Plugin License
+@appendixsubsec Extension Licensing
+
+Every dynamic extension should define the global symbol
+@code{plugin_is_GPL_compatible} to assert that it has been licensed under
+a GPL-compatible license. If this symbol does not exist, @command{gawk}
+will emit a fatal error and exit.
+
+The declared type of the symbol should be @code{int}. It does not need
+to be in any allocated section, though. The code merely asserts that
+the symbol exists in the global scope. Something like this is enough:
+
+@example
+int plugin_is_GPL_compatible;
+@end example
+
@node Sample Library
@appendixsubsec Directory and File Operation Built-ins
@c STARTOFRANGE chdirg
@@ -28779,6 +28797,8 @@ slightly for presentation. The complete version can be found in
#include <sys/sysmacros.h>
+int plugin_is_GPL_compatible;
+
/* do_chdir --- provide dynamically loaded
chdir() builtin for gawk */