aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2012-03-20 10:46:03 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2012-03-20 10:46:03 -0400
commitb51edf37c4271bf5ec5dcad9d35169f55e38efa9 (patch)
tree66653936b87078aa96a562e05f66660b4d616d8e /extension
parentcd44d957787e162df4348028c22e8b9621000790 (diff)
downloadegawk-b51edf37c4271bf5ec5dcad9d35169f55e38efa9.tar.gz
egawk-b51edf37c4271bf5ec5dcad9d35169f55e38efa9.tar.bz2
egawk-b51edf37c4271bf5ec5dcad9d35169f55e38efa9.zip
- Add new environment variable AWKLIBPATH to use when searching for shared
libraries. - Instead of hardcoding the default ".so" suffix for shared libraries, use autoconf to get the right value for this platform. - Build and install some of the bundled shared library extensions so that they will now be available using the default AWKLIBPATH.
Diffstat (limited to 'extension')
-rw-r--r--extension/ChangeLog7
-rw-r--r--extension/Makefile.am73
-rw-r--r--extension/arrayparm.c2
-rw-r--r--extension/filefuncs.c2
4 files changed, 82 insertions, 2 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index dff4cf67..251f86c8 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-20 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am: New file to build and install shared libraries.
+ * arrayparm.c (do_mkarray): Get it to compile by removing 2nd arg
+ to assoc_clear.
+ * filefuncs.c (do_stat): Ditto.
+
2011-08-31 John Haque <j.eh@mchsi.com>
* arrayparm.c, filefuncs.c, fork.c, ordchr.c, readfile.c,
rwarray.c, testarg.c: Updated.
diff --git a/extension/Makefile.am b/extension/Makefile.am
new file mode 100644
index 00000000..27bdff4e
--- /dev/null
+++ b/extension/Makefile.am
@@ -0,0 +1,73 @@
+#
+# extension/Makefile.am --- automake input file for gawk
+#
+# Copyright (C) 1995-2006 the Free Software Foundation, Inc.
+#
+# This file is part of GAWK, the GNU implementation of the
+# AWK Programming Language.
+#
+# GAWK is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GAWK is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+
+## Process this file with automake to produce Makefile.in.
+
+INCLUDES = -I.. -I$(top_srcdir) -I$(top_srcdir)/intl
+
+lib_LTLIBRARIES = \
+ libarrayparm.la \
+ libfilefuncs.la \
+ libfork.la \
+ libordchr.la \
+ libreadfile.la \
+ libtestarg.la
+
+# The arrayparm, zaxxon, and testarg libraries do not do anything useful,
+# so do not install them...
+
+install_libraries = \
+ libfilefuncs.la \
+ libfork.la \
+ libordchr.la \
+ libreadfile.la
+
+libarrayparm_la_SOURCES = arrayparm.c
+libfilefuncs_la_SOURCES = filefuncs.c
+libfork_la_SOURCES = fork.c
+libordchr_la_SOURCES = ordchr.c
+libreadfile_la_SOURCES = readfile.c
+libtestarg_la_SOURCES = testarg.c
+
+install: $(install_libraries)
+ for p in $(install_libraries); do \
+ . ./$$p ; \
+ f=`echo $$dlname | sed -e 's/^lib//' -e 's/\.0//g'` ; \
+ echo "Installing $$dlname in $(DESTDIR)$(pkgextensiondir)/$$f" ; \
+ $(INSTALL_PROGRAM) .libs/$$dlname $(DESTDIR)$(pkgextensiondir)/$$f ; \
+ done
+
+uninstall: $(install_libraries)
+ for p in $(install_libraries); do \
+ . ./$$p ; \
+ f=`echo $$dlname | sed -e 's/^lib//' -e 's/\.0//g'` ; \
+ echo "Removing $$dlname in $(DESTDIR)$(pkgextensiondir)/$$f" ; \
+ rm -f $(DESTDIR)$(pkgextensiondir)/$$f ; \
+ done
+
+EXTRA_DIST = \
+ ChangeLog \
+ ChangeLog.0 \
+ *.awk \
+ doit \
+ steps
diff --git a/extension/arrayparm.c b/extension/arrayparm.c
index b0aee33d..1e28811e 100644
--- a/extension/arrayparm.c
+++ b/extension/arrayparm.c
@@ -60,7 +60,7 @@ do_mkarray(int nargs)
printf("sub->type = %s\n", nodetype2str(sub->type));
printf("val->type = %s\n", nodetype2str(val->type));
- assoc_clear(var, NULL);
+ assoc_clear(var);
elemval = assoc_lookup(var, sub);
*elemval = dupnode(val);
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 1a0a86ef..dd1b29a8 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -177,7 +177,7 @@ do_stat(int nargs)
array = get_array_argument(1, FALSE);
/* empty out the array */
- assoc_clear(array, NULL);
+ assoc_clear(array);
/* lstat the file, if error, set ERRNO and return */
(void) force_string(file);