aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.119
-rw-r--r--doc/gawk.texi43
3 files changed, 53 insertions, 13 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 2bbb982d..3ff659e6 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-20 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * gawk.texi, gawk.1: Add AWKLIBPATH.
+
2012-02-06 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi, gawk.1: And some minor edits thereunto.
diff --git a/doc/gawk.1 b/doc/gawk.1
index 07a8d0e3..cc0ccae2 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -330,11 +330,10 @@ these options cause an immediate, successful exit.)
Load a shared library
.IR lib .
This searches for the library using the
-.B AWKPATH
-environment variable. The suffix
-.I .so
-in the library name is optional, and
-the library initialization routine is expected to be named
+.B AWKLIBPATH
+environment variable. If the initial search fails, another attempt will
+be made after appending the default shared library suffix for the platform.
+The library initialization routine is expected to be named
.BR dlload() .
.TP
.PD 0
@@ -3596,6 +3595,16 @@ and
options.
.PP
The
+.B AWKLIBPATH
+environment variable can be used to provide a list of directories that
+.I gawk
+searches when looking for files named via the
+.B \-l
+and
+.B \-\^\-load
+options.
+.PP
+The
.B GAWK_READ_TIMEOUT
environment variable can be used to specify a timeout
in milliseconds for reading input from a terminal, pipe
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 5b3dd71c..d0d54121 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -351,6 +351,8 @@ particular records in a file and perform operations upon them.
uses.
* AWKPATH Variable:: Searching directories for @command{awk}
programs.
+* AWKLIBPATH Variable:: Searching directories for @command{awk}
+ shared libraries.
* Other Environment Variables:: The environment variables.
* Exit Status:: @command{gawk}'s exit status.
* Include Files:: Including other files into your program.
@@ -3185,8 +3187,9 @@ that @command{gawk} accepts and then exit.
@cindex @code{-l} option
@cindex @code{--load} option
@cindex loading, library
-Load a shared library @var{lib}. This searches for the library using the @env{AWKPATH}
-environment variable. The suffix @samp{.so} in the library name is optional.
+Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH}
+environment variable. The correct library suffix for your platform will be
+supplied by default, so it need not be specified in the library name.
The library initialization routine should be named @code{dlload()}.
@item -L @r{[}value@r{]}
@@ -3558,6 +3561,8 @@ behaves.
@menu
* AWKPATH Variable:: Searching directories for @command{awk}
programs.
+* AWKLIBPATH Variable:: Searching directories for @command{awk}
+ shared libraries.
* Other Environment Variables:: The environment variables.
@end menu
@@ -3633,6 +3638,21 @@ sense: the @env{AWKPATH} environment variable is used to find the program
source files. Once your program is running, all the files have been
found, and @command{gawk} no longer needs to use @env{AWKPATH}.
+@node AWKLIBPATH Variable
+@subsection The @env{AWKLIBPATH} Environment Variable
+@cindex @env{AWKLIBPATH} environment variable
+@cindex directories, searching
+@cindex search paths
+@cindex search paths, for shared libraries
+@cindex differences in @command{awk} and @command{gawk}, @code{AWKLIBPATH} environment variable
+
+The @env{AWKLIBPATH} environment variable is similar to the @env{AWKPATH}
+variable, but it is used to search for shared libraries specified
+with the @option{-l} option rather than for source files. If the library
+is not found, the path is searched again after adding the appropriate
+shared library suffix for the platform. For example, on Linux systems,
+the suffix @samp{.so} is used.
+
@node Other Environment Variables
@subsection Other Environment Variables
@@ -12746,7 +12766,9 @@ does not affect the environment passed on to any programs that
Some operating systems may not have environment variables.
On such systems, the @code{ENVIRON} array is empty (except for
@w{@code{ENVIRON["AWKPATH"]}},
-@pxref{AWKPATH Variable}).
+@pxref{AWKPATH Variable} and
+@w{@code{ENVIRON["AWKLIBPATH"]}},
+@pxref{AWKLIBPATH Variable}).
@cindex @command{gawk}, @code{ERRNO} variable in
@cindex @code{ERRNO} variable
@@ -27025,6 +27047,11 @@ the @option{-f} command-line option
(@pxref{Options}).
@item
+The @env{AWKLIBPATH} environment variable for specifying a path search for
+the @option{-l} command-line option
+(@pxref{Options}).
+
+@item
The ability to use GNU-style long-named options that start with @option{--}
and the
@option{--characters-as-bytes},
@@ -29534,11 +29561,11 @@ anywhere in the program.
@command{gawk} has a list of directories where it searches for libraries.
By default, the list includes directories that depend upon how gawk was built
-and installed (@pxref{AWKPATH Variable}). If you want @command{gawk}
+and installed (@pxref{AWKLIBPATH Variable}). If you want @command{gawk}
to look for libraries in your private directory, you have to tell it.
-The way to do it is to set the @env{AWKPATH} environment variable
-(@pxref{AWKPATH Variable}).
-@command{gawk} supplies the default suffix @samp{.so} if it is not
+The way to do it is to set the @env{AWKLIBPATH} environment variable
+(@pxref{AWKLIBPATH Variable}).
+@command{gawk} supplies the default shared library platform suffix if it is not
present in the name of the library.
If the name of your library is @file{mylib.so}, you can simply type
@@ -29550,7 +29577,7 @@ and @command{gawk} will do everything necessary to load in your library,
and then call your @code{dlload()} routine.
You can always specify the library using an absolute pathname, in which
-case @command{gawk} will not use @env{AWKPATH} to search for it.
+case @command{gawk} will not use @env{AWKLIBPATH} to search for it.
@node Sample Library
@appendixsubsec Example: Directory and File Operation Built-ins