summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog41
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.in12
-rw-r--r--NEWS2
-rw-r--r--README6
-rw-r--r--awk.h30
-rw-r--r--awkgram.c43
-rw-r--r--awkgram.y43
-rw-r--r--awklib/ChangeLog12
-rw-r--r--awklib/Makefile.am20
-rw-r--r--awklib/Makefile.in28
-rw-r--r--awklib/eg/lib/grcat.c6
-rw-r--r--awklib/eg/lib/pwcat.c10
-rw-r--r--command.c37
-rw-r--r--command.y37
-rw-r--r--configh.in15
-rwxr-xr-xconfigure176
-rw-r--r--configure.ac29
-rw-r--r--custom.h12
-rw-r--r--doc/ChangeLog8
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in10
-rw-r--r--doc/gawk.info1112
-rw-r--r--doc/gawk.texi22
-rw-r--r--doc/gawktexi.in22
-rw-r--r--eval.c4
-rw-r--r--extension/ChangeLog10
-rw-r--r--extension/Makefile.am2
-rw-r--r--extension/Makefile.in11
-rw-r--r--extension/aclocal.m41
-rwxr-xr-xextension/configure93
-rw-r--r--extension/configure.ac1
-rw-r--r--extension/gawkfts.h8
-rw-r--r--extension/readdir.c12
-rw-r--r--extension/rwarray.c11
-rw-r--r--helpers/ChangeLog8
-rw-r--r--helpers/testdfa.c2
-rw-r--r--io.c8
-rw-r--r--m4/ChangeLog17
-rw-r--r--m4/arch.m490
-rw-r--r--regcomp.c9
-rw-r--r--regex_internal.h2
-rw-r--r--test/ChangeLog8
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in26
45 files changed, 1328 insertions, 741 deletions
diff --git a/ChangeLog b/ChangeLog
index ac4f78df..8c95a11b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,11 +15,52 @@
already parsed part of the record. Thanks to Ed Morton
for the bug report.
+2015-09-11 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * regcomp.h: Include strings.h, wrapped in ifdef. Revise
+ defines for BTOWC.
+ * regex_internal.h: Remove ZOS_USS bracketing ifdefs.
+
2015-09-04 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_num): Use format_val to print integral values
as integers. Thanks to Hermann Peifer for the report.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am, configure.ac: Use an Automake conditional to
+ enable/disable the "extensions" subdirectory instead of
+ producing a stub Makefile therein from the configure script.
+ * awk.h, custom.h, regex_internal.h: Removed z/OS-specific code
+ that is no longer needed due to improvements in Gawk's general
+ Autotools support.
+ * awk.h: Allow <strings.h> to be #included together with
+ <string.h> as this is required on some systems (z/OS).
+ * io.c, configure.ac: <sys/select.h> is needed for select()
+ and related bits on z/OS.
+ * awk.h: Handle the redefinition of EXIT_FAILURE on z/OS in a
+ more elegant/general way.
+ * awkgram.y, command.y, configure.ac, eval.c,
+ helpers/testdfa.c: Define and use the USE_EBCDIC cpp symbol
+ instead of checking the value of 'a' whenever we want to know
+ if we're on an EBCDIC system. Also, don't assume that z/OS
+ necessarily means EBCDIC, as the compiler does have an ASCII
+ mode (-qascii).
+ * awkgram.y, command.y, configure.ac: On EBCDIC systems,
+ convert singleton EBCDIC characters in the input stream to
+ ASCII on the fly so that the generated awkgram.c/command.c in
+ the distributed sources can be used, i.e. we don't have to
+ require the user to build Bison and re-generate those files
+ themselves. This implementation uses a z/OS-specific function
+ (__etoa_l()) to do the conversion, but support for other
+ systems can be added in the future as necessary.
+ * io.c: No need to protect this block of "#if
+ defined(HAVE_TERMIOS_H)" code from z/OS; it works just fine
+ there.
+ * configure.ac: Check for the "struct passwd.pw_passwd" and
+ "struct group.gr_passwd" fields and conditionalize their use,
+ as they don't exist on z/OS. Needed for doc/gawktexi.in.
+
2015-08-25 Arnold D. Robbins <arnold@skeeve.com>
* node.c (str2wstr): Upon finding an invalid character, if
diff --git a/Makefile.am b/Makefile.am
index c646fc34..342df292 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,9 +68,12 @@ SUBDIRS = \
doc \
awklib \
po \
- extension \
test
+if ENABLE_EXTENSIONS
+SUBDIRS += extension
+endif
+
# what to make and install
bin_PROGRAMS = gawk
include_HEADERS = gawkapi.h
diff --git a/Makefile.in b/Makefile.in
index 183d71cd..08f434c1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@ENABLE_EXTENSIONS_TRUE@am__append_1 = extension
bin_PROGRAMS = gawk$(EXEEXT)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -261,7 +262,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = . doc awklib po test extension
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in ABOUT-NLS \
AUTHORS COPYING ChangeLog INSTALL NEWS README awkgram.c \
command.c compile config.guess config.rpath config.sub depcomp \
@@ -480,14 +481,7 @@ EXTRA_DIST = \
# that `make check' without a prior `make' works.
# Build in awklib after in doc, since we want to extract
# sample files if doc/gawk.texi changed.
-SUBDIRS = \
- . \
- doc \
- awklib \
- po \
- extension \
- test
-
+SUBDIRS = . doc awklib po test $(am__append_1)
include_HEADERS = gawkapi.h
# sources for both gawk and dgawk
diff --git a/NEWS b/NEWS
index 0d8bdf00..6cc254a0 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ Changes from 4.1.3 to 4.1.x
1. Updated to GNU autoconf 2.69, automake 1.15, gettext 0.19.5.1.
+2. z/OS support updated.
+
Changes from 4.1.2 to 4.1.3
---------------------------
diff --git a/README b/README
index a1b32de0..11905893 100644
--- a/README
+++ b/README
@@ -94,6 +94,10 @@ VMS:
John Malmberg
wb8tyw@qsl.net
-z/OS (OS/390):
+z/OS (OS/390) Contact:
+ Daniel Richard G.
+ skunk@iSKUNK.ORG
+
+z/OS (OS/390) Maintainer Emeritus:
Dave Pitts
dpitts@cozx.com
diff --git a/awk.h b/awk.h
index c3a3cba7..c74c6881 100644
--- a/awk.h
+++ b/awk.h
@@ -108,24 +108,12 @@ extern int errno;
#undef CHARBITS
#undef INTBITS
-#if !defined(ZOS_USS)
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
-#else /* ZOS_USS */
-#include <limits.h>
-#include <sys/time.h>
-#define INT32_MAX INT_MAX
-#define INT32_MIN INT_MIN
-#ifndef __uint32_t
-#define __uint32_t 1
-typedef unsigned long uint32_t;
-#endif
-typedef long int32_t;
-#endif /* !ZOS_USS */
/* ----------------- System dependencies (with more includes) -----------*/
@@ -159,11 +147,10 @@ typedef int off_t;
#ifdef NEED_MEMORY_H
#include <memory.h>
#endif /* NEED_MEMORY_H */
-#else /* not HAVE_STRING_H */
+#endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
-#endif /* not HAVE_STRING_H */
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -1664,6 +1651,11 @@ extern uintmax_t adjust_uint(uintmax_t n);
#endif /* ! defined(VMS)) */
#endif /* WEXITSTATUS */
+/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */
+#if defined(EXIT_FAILURE) && EXIT_FAILURE == 8
+# undef EXIT_FAILURE
+#endif
+
/* EXIT_SUCCESS and EXIT_FAILURE normally come from <stdlib.h> */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -1676,16 +1668,6 @@ extern uintmax_t adjust_uint(uintmax_t n);
# define EXIT_FATAL 2
#endif
-/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */
-#ifdef ZOS_USS
-
-#ifdef EXIT_FAILURE
-#undef EXIT_FAILURE
-#endif
-
-#define EXIT_FAILURE 1
-#endif
-
/* ------------------ Inline Functions ------------------ */
/*
diff --git a/awkgram.c b/awkgram.c
index 728bc29d..9ced0daf 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -4162,7 +4162,7 @@ struct token {
NODE *(*ptr2)(int); /* alternate arbitrary-precision function */
};
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
/* tokcompare --- lexicographically compare token names for sorting */
static int
@@ -5312,7 +5312,11 @@ static int newline_eof()
/* yylex --- Read the input and turn it into tokens. */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
int c;
bool seen_e = false; /* These are for numbers */
@@ -6142,6 +6146,41 @@ out:
#undef NEWLINE_EOF
}
+/* It's EBCDIC in a Bison grammar, run for the hills!
+
+ Or, convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* snode --- instructions for builtin functions. Checks for arg. count
and supplies defaults where possible. */
@@ -7899,7 +7938,7 @@ check_special(const char *name)
int low, high, mid;
int i;
int non_standard_flags = 0;
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
static bool did_sort = false;
if (! did_sort) {
diff --git a/awkgram.y b/awkgram.y
index 0da7fbe1..cb41cf3b 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1823,7 +1823,7 @@ struct token {
NODE *(*ptr2)(int); /* alternate arbitrary-precision function */
};
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
/* tokcompare --- lexicographically compare token names for sorting */
static int
@@ -2973,7 +2973,11 @@ static int newline_eof()
/* yylex --- Read the input and turn it into tokens. */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
int c;
bool seen_e = false; /* These are for numbers */
@@ -3803,6 +3807,41 @@ out:
#undef NEWLINE_EOF
}
+/* It's EBCDIC in a Bison grammar, run for the hills!
+
+ Or, convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* snode --- instructions for builtin functions. Checks for arg. count
and supplies defaults where possible. */
@@ -5560,7 +5599,7 @@ check_special(const char *name)
int low, high, mid;
int i;
int non_standard_flags = 0;
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
static bool did_sort = false;
if (! did_sort) {
diff --git a/awklib/ChangeLog b/awklib/ChangeLog
index 791c25f6..eb9ffcd6 100644
--- a/awklib/ChangeLog
+++ b/awklib/ChangeLog
@@ -1,3 +1,15 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am: Build pwcat.c and grcat.c with (copied)
+ source in the current directory, so that (1) we can use
+ Automake-generated build rules instead of rolling our own, and
+ (2) Automake doesn't then admonish us to enable subdir-objects
+ due to the source files being in another directory.
+ * Makefile.am: Make the $(srcdir)/stamp-eg rule depend
+ on gawktexi.in instead of the gawk.texi file that is generated
+ from same, so that the build doesn't break if the latter is
+ missing.
+
2015-06-19 Arnold D. Robbins <arnold@skeeve.com>
* extract.awk: Sync with current version in the doc. Thanks to
diff --git a/awklib/Makefile.am b/awklib/Makefile.am
index 2e1adaf1..73f91f05 100644
--- a/awklib/Makefile.am
+++ b/awklib/Makefile.am
@@ -45,6 +45,8 @@ AUXAWK = passwd.awk group.awk
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
+CLEANFILES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES)
+
all: $(srcdir)/stamp-eg $(AUXPROGS) igawk $(AUXAWK)
install-exec-hook: $(AUXAWK)
@@ -64,22 +66,24 @@ clean-local:
rm -fr eg.old
rm -fr grcat.dSYM pwcat.dSYM
-$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
+$(srcdir)/stamp-eg: $(srcdir)/../doc/gawktexi.in $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
rm -fr eg && \
rm -fr stamp-eg && \
- $(AWKPROG) -f ./extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
+ $(AWKPROG) -f ./extract.awk ../doc/gawktexi.in ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
-$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
-$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
+pwcat.c: $(srcdir)/eg/lib/pwcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/pwcat.c .
-pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
- $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
+grcat.c: $(srcdir)/eg/lib/grcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/grcat.c .
-grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
- $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
+$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
+$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
igawk: $(srcdir)/eg/prog/igawk.sh
cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index 610b6ee1..b96dbe1b 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -365,6 +365,7 @@ bin_SCRIPTS = igawk
AUXAWK = passwd.awk group.awk
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
+CLEANFILES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES)
all: all-am
.SUFFIXES:
@@ -440,6 +441,14 @@ uninstall-pkglibexecPROGRAMS:
clean-pkglibexecPROGRAMS:
-test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS)
+
+grcat$(EXEEXT): $(grcat_OBJECTS) $(grcat_DEPENDENCIES) $(EXTRA_grcat_DEPENDENCIES)
+ @rm -f grcat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(grcat_OBJECTS) $(grcat_LDADD) $(LIBS)
+
+pwcat$(EXEEXT): $(pwcat_OBJECTS) $(pwcat_DEPENDENCIES) $(EXTRA_pwcat_DEPENDENCIES)
+ @rm -f pwcat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pwcat_OBJECTS) $(pwcat_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
@@ -610,6 +619,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -730,22 +740,24 @@ clean-local:
rm -fr eg.old
rm -fr grcat.dSYM pwcat.dSYM
-$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
+$(srcdir)/stamp-eg: $(srcdir)/../doc/gawktexi.in $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
rm -fr eg && \
rm -fr stamp-eg && \
- $(AWKPROG) -f ./extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
+ $(AWKPROG) -f ./extract.awk ../doc/gawktexi.in ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
-$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
-$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
+pwcat.c: $(srcdir)/eg/lib/pwcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/pwcat.c .
-pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
- $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
+grcat.c: $(srcdir)/eg/lib/grcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/grcat.c .
-grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
- $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
+$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
+$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
igawk: $(srcdir)/eg/prog/igawk.sh
cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
diff --git a/awklib/eg/lib/grcat.c b/awklib/eg/lib/grcat.c
index 7d6b6a74..cf39083c 100644
--- a/awklib/eg/lib/grcat.c
+++ b/awklib/eg/lib/grcat.c
@@ -31,11 +31,11 @@ main(int argc, char **argv)
int i;
while ((g = getgrent()) != NULL) {
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
printf("%s:%s:%ld:", g->gr_name, g->gr_passwd,
(long) g->gr_gid);
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
for (i = 0; g->gr_mem[i] != NULL; i++) {
printf("%s", g->gr_mem[i]);
diff --git a/awklib/eg/lib/pwcat.c b/awklib/eg/lib/pwcat.c
index 934ef34e..cfe250c3 100644
--- a/awklib/eg/lib/pwcat.c
+++ b/awklib/eg/lib/pwcat.c
@@ -26,14 +26,14 @@ main(int argc, char **argv)
struct passwd *p;
while ((p = getpwent()) != NULL)
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
printf("%s:%s:%ld:%ld:%s:%s:%s\n",
p->pw_name, p->pw_passwd, (long) p->pw_uid,
(long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell);
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
endpwent();
diff --git a/command.c b/command.c
index 04d5e5f3..76c3c752 100644
--- a/command.c
+++ b/command.c
@@ -2773,7 +2773,11 @@ yyerror(const char *mesg, ...)
/* yylex --- read a command and turn it into tokens */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
static char *lexptr = NULL;
static char *lexend;
@@ -3049,6 +3053,39 @@ err:
return D_VARIABLE;
}
+/* Convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* find_argument --- find index in 'argtab' for a command option */
static int
diff --git a/command.y b/command.y
index 08893743..43aae8d2 100644
--- a/command.y
+++ b/command.y
@@ -1022,7 +1022,11 @@ yyerror(const char *mesg, ...)
/* yylex --- read a command and turn it into tokens */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
static char *lexptr = NULL;
static char *lexend;
@@ -1298,6 +1302,39 @@ err:
return D_VARIABLE;
}
+/* Convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* find_argument --- find index in 'argtab' for a command option */
static int
diff --git a/configh.in b/configh.in
index 214d3c4b..d3624c2b 100644
--- a/configh.in
+++ b/configh.in
@@ -228,6 +228,12 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
+/* Define to 1 if `gr_passwd' is a member of `struct group'. */
+#undef HAVE_STRUCT_GROUP_GR_PASSWD
+
+/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
+#undef HAVE_STRUCT_PASSWD_PW_PASSWD
+
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
@@ -243,6 +249,9 @@
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
@@ -317,6 +326,9 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
+/* Define to 1 if you have the `__etoa_l' function. */
+#undef HAVE___ETOA_L
+
/* enable severe portability problems */
#undef I_DONT_KNOW_WHAT_IM_DOING
@@ -371,6 +383,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
+/* Define to 1 if the character set is EBCDIC */
+#undef USE_EBCDIC
+
/* force use of our version of strftime */
#undef USE_INCLUDED_STRFTIME
diff --git a/configure b/configure
index 686a1abf..bdf50552 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Awk 4.1.3.
+# Generated by GNU Autoconf 2.69 for GNU Awk 4.1.3-zOS-2.
#
# Report bugs to <bug-gawk@gnu.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU Awk'
PACKAGE_TARNAME='gawk'
-PACKAGE_VERSION='4.1.3'
-PACKAGE_STRING='GNU Awk 4.1.3'
+PACKAGE_VERSION='4.1.3-zOS-2'
+PACKAGE_STRING='GNU Awk 4.1.3-zOS-2'
PACKAGE_BUGREPORT='bug-gawk@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/gawk/'
@@ -633,6 +633,8 @@ GAWKLIBEXT
LIBMPFR
LIBREADLINE
SOCKET_LIBS
+ENABLE_EXTENSIONS_FALSE
+ENABLE_EXTENSIONS_TRUE
LIBSIGSEGV_PREFIX
LTLIBSIGSEGV
LIBSIGSEGV
@@ -1326,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Awk 4.1.3 to adapt to many kinds of systems.
+\`configure' configures GNU Awk 4.1.3-zOS-2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1398,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Awk 4.1.3:";;
+ short | recursive ) echo "Configuration of GNU Awk 4.1.3-zOS-2:";;
esac
cat <<\_ACEOF
@@ -1515,7 +1517,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Awk configure 4.1.3
+GNU Awk configure 4.1.3-zOS-2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2224,7 +2226,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Awk $as_me 4.1.3, which was
+It was created by GNU Awk $as_me 4.1.3-zOS-2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3107,7 +3109,7 @@ fi
# Define the identity of the package.
PACKAGE='gawk'
- VERSION='4.1.3'
+ VERSION='4.1.3-zOS-2'
cat >>confdefs.h <<_ACEOF
@@ -5863,17 +5865,95 @@ pkgextensiondir='${pkglibdir}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5
$as_echo_n "checking for z/OS USS compilation... " >&6; }
+if ${ac_cv_zos_uss+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
if test "OS/390" = "`uname`"
then
- CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c and command.c from Bison for EBCDIC
- rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
fi
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5
$as_echo "${ac_cv_zos_uss}" >&6; }
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ if test -n "$_C89_OPTIONS"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CC = $CC" >&5
+$as_echo "$as_me: CC = $CC" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: _C89_OPTIONS = $_C89_OPTIONS" >&5
+$as_echo "$as_me: _C89_OPTIONS = $_C89_OPTIONS" >&6;}
+ else
+ as_fn_error $? "c89-setup-required
+To build GNU Awk using \"c89\", please set
+
+ _C89_OPTIONS=\"-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)\"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)" "$LINENO" 5
+ fi
+ ;;
+ gcc)
+ ;;
+ cc)
+ as_fn_error $? "cc-invalid
+The z/OS \"cc\" compiler does not build GNU Awk correctly.
+
+If the \"xlc\" or \"c89\" compiler is available, please set CC accordingly
+and reconfigure. (\"xlc\" is the recommended compiler on z/OS.)" "$LINENO" 5
+ ;;
+ xlc*)
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: wrapping $CC with zos-cc to obtain standard behavior" >&5
+$as_echo "$as_me: wrapping $CC with zos-cc to obtain standard behavior" >&6;}
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized compiler environment" >&5
+$as_echo "$as_me: WARNING: unrecognized compiler environment" >&2;}
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
@@ -6164,6 +6244,28 @@ fi
$as_echo "${gawk_cv_linux_alpha_hack}" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are using EBCDIC" >&5
+$as_echo_n "checking if we are using EBCDIC... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if 'a' == 0x81
+gnu_gawk_in_ebcdic
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "gnu_gawk_in_ebcdic" >/dev/null 2>&1; then :
+
+$as_echo "#define USE_EBCDIC 1" >>confdefs.h
+
+ use_ebcdic=yes
+else
+ use_ebcdic=no
+fi
+rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ebcdic" >&5
+$as_echo "$use_ebcdic" >&6; }
+
if test "$ISC" = 1 # will be set by test for ISC
then
CFLAGS="$CFLAGS -D_SYSV3"
@@ -8396,7 +8498,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
netdb.h netinet/in.h stdarg.h stddef.h string.h \
- sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
+ sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -10335,7 +10437,7 @@ $as_echo "$LIBSIGSEGV" >&6; }
esac
# Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
-for ac_func in atexit btowc fmod getgrent getgroups grantpt \
+for ac_func in __etoa_l atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
memset_ulong mkstemp posix_openpt setenv setlocale setsid snprintf strchr \
@@ -10401,10 +10503,6 @@ if test "x$enable_extensions" != "xno"; then
case $host_os in
mirbsd* | openedition*) # OS/390 z/OS POSIX layer
- cat << \EOF > extension/Makefile
-all dist check clean distclean install uninstall distcheck:
- @exit 0
-EOF
;;
*)
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
@@ -10499,6 +10597,14 @@ fi
as_fn_error $? "extension support requested, but unavailable" "$LINENO" 5
fi
enable_extensions=$extensions_supported
+ if test "x$enable_extensions" = "xyes"; then
+ ENABLE_EXTENSIONS_TRUE=
+ ENABLE_EXTENSIONS_FALSE='#'
+else
+ ENABLE_EXTENSIONS_TRUE='#'
+ ENABLE_EXTENSIONS_FALSE=
+fi
+
fi
case $host_os in
@@ -11019,6 +11125,34 @@ _ACEOF
fi
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
+#include <sys/types.h>
+#include <pwd.h>
+
+"
+if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
+_ACEOF
+
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct group" "gr_passwd" "ac_cv_member_struct_group_gr_passwd" "
+#include <sys/types.h>
+#include <grp.h>
+
+"
+if test "x$ac_cv_member_struct_group_gr_passwd" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_GROUP_GR_PASSWD 1
+_ACEOF
+
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if ${ac_cv_struct_tm+:} false; then :
@@ -11512,6 +11646,10 @@ if test -z "${TEST_CROSS_COMPILE_TRUE}" && test -z "${TEST_CROSS_COMPILE_FALSE}"
as_fn_error $? "conditional \"TEST_CROSS_COMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_EXTENSIONS_TRUE}" && test -z "${ENABLE_EXTENSIONS_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_EXTENSIONS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -11909,7 +12047,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Awk $as_me 4.1.3, which was
+This file was extended by GNU Awk $as_me 4.1.3-zOS-2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11977,7 +12115,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Awk config.status 4.1.3
+GNU Awk config.status 4.1.3-zOS-2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 72f78f03..42af5deb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([GNU Awk], 4.1.3, bug-gawk@gnu.org, gawk)
+AC_INIT([GNU Awk], 4.1.3-zOS-2, bug-gawk@gnu.org, gawk)
# This is a hack. Different versions of install on different systems
# are just too different. Chuck it and use install-sh.
@@ -115,6 +115,16 @@ AC_SYS_LARGEFILE
GAWK_AC_AIX_TWEAK
GAWK_AC_LINUX_ALPHA
+AC_MSG_CHECKING([if we are using EBCDIC])
+AC_EGREP_CPP([gnu_gawk_in_ebcdic],
+[#if 'a' == 0x81
+gnu_gawk_in_ebcdic
+#endif],
+[AC_DEFINE(USE_EBCDIC, 1, Define to 1 if the character set is EBCDIC)
+ use_ebcdic=yes],
+[use_ebcdic=no])
+AC_MSG_RESULT([$use_ebcdic])
+
if test "$ISC" = 1 # will be set by test for ISC
then
dnl need -D_SYSV3 for ISC
@@ -141,7 +151,7 @@ gt_LC_MESSAGES
dnl checks for header files
AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
netdb.h netinet/in.h stdarg.h stddef.h string.h \
- sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
+ sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h)
AC_HEADER_STDC
AC_HEADER_STDBOOL
@@ -273,7 +283,7 @@ osf1) : ;;
esac
# Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
-AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \
+AC_CHECK_FUNCS(__etoa_l atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
memset_ulong mkstemp posix_openpt setenv setlocale setsid snprintf strchr \
@@ -293,10 +303,6 @@ if test "x$enable_extensions" != "xno"; then
dnl On MirBSD (and probably other systems), don't even try.
case $host_os in
mirbsd* | openedition*) # OS/390 z/OS POSIX layer
- cat << \EOF > extension/Makefile
-all dist check clean distclean install uninstall distcheck:
- @exit 0
-EOF
;;
*)
AC_CHECK_HEADER(dlfcn.h,
@@ -328,6 +334,7 @@ EOF
AC_MSG_ERROR([extension support requested, but unavailable])
fi
enable_extensions=$extensions_supported
+ AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"])
fi
dnl check for how to use getpgrp
@@ -380,6 +387,14 @@ GNUPG_CHECK_MPFR
dnl checks for structure members
AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct passwd.pw_passwd],,,[
+#include <sys/types.h>
+#include <pwd.h>
+])
+AC_CHECK_MEMBERS([struct group.gr_passwd],,,[
+#include <sys/types.h>
+#include <grp.h>
+])
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
diff --git a/custom.h b/custom.h
index 1f57a83a..956c52ab 100644
--- a/custom.h
+++ b/custom.h
@@ -59,18 +59,6 @@
#define _TZSET 1
#endif
-/* For z/OS, from Dave Pitts - VMS using some ZOS_USS code paths */
-#if defined(ZOS_USS) && !defined(__VMS)
-#undef HAVE_DLFCN_H
-#undef HAVE_SYS_PARAM_H
-#undef HAVE_MCHECK_H
-#undef HAVE_SETENV
-#define setenv zos_setenv
-#define unsetenv zos_unsetenv
-extern int setenv(const char *name, const char *value, int rewrite);
-extern int unsetenv(const char *name);
-#endif
-
/* Junk for dfa.[ch] */
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ceb2e197..7948ccb4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -6,6 +6,14 @@
* texinfo.tex: Update to latest.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * doc/gawktexi.in: Check for the "struct passwd.pw_passwd" and
+ "struct group.gr_passwd" fields and conditionalize their use, as
+ they don't exist on z/OS.
+ * Makefile.am (pdf-local): Renamed from "pdf", as Automake already
+ defines "pdf" and warns us as much.
+
2015-08-14 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Typo fixes in Appendix A.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 86321bbc..e94e0d07 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -77,7 +77,7 @@ gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD)
-pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
gawk.ps: gawk.dvi
TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 30a371d7..8515b9a3 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -838,7 +838,9 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
-pdf-am: $(PDFS)
+pdf: pdf-am
+
+pdf-am: $(PDFS) pdf-local
ps: ps-am
@@ -861,8 +863,8 @@ uninstall-man: uninstall-man1
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic mostlyclean mostlyclean-aminfo \
- mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
- uninstall-am uninstall-dvi-am uninstall-html-am \
+ mostlyclean-generic pdf pdf-am pdf-local ps ps-am tags-am \
+ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
uninstall-info-am uninstall-man uninstall-man1 \
uninstall-pdf-am uninstall-ps-am
@@ -880,7 +882,7 @@ gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD)
-pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
gawk.ps: gawk.dvi
TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
diff --git a/doc/gawk.info b/doc/gawk.info
index 66167218..d073efbb 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1329,13 +1329,14 @@ acknowledgements:
file for the 3.1 release of 'gawk'.
Dr. Nelson Beebe, Andreas Buening, Dr. Manuel Collado, Antonio
-Colombo, Stephen Davies, Scott Deifik, Akim Demaille, Darrel Hankerson,
-Michal Jaegermann, Ju"rgen Kahrs, Stepan Kasal, John Malmberg, Dave
-Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna Vinschen, and Eli
-Zaretskii (in alphabetical order) make up the current 'gawk' "crack
-portability team." Without their hard work and help, 'gawk' would not
-be nearly the robust, portable program it is today. It has been and
-continues to be a pleasure working with this team of fine people.
+Colombo, Stephen Davies, Scott Deifik, Akim Demaille, Daniel Richard G.,
+Darrel Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Stepan Kasal, John
+Malmberg, Dave Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna
+Vinschen, and Eli Zaretskii (in alphabetical order) make up the current
+'gawk' "crack portability team." Without their hard work and help,
+'gawk' would not be nearly the robust, portable program it is today. It
+has been and continues to be a pleasure working with this team of fine
+people.
Notable code and documentation contributions were made by a number of
people. *Note Contributors::, for the full list.
@@ -28213,7 +28214,8 @@ OS/2 Andreas Buening, <andreas.buening@nexgo.de>
VMS John Malmberg, <wb8tyw@qsl.net>
-z/OS (OS/390) Dave Pitts, <dpitts@cozx.com>
+z/OS (OS/390) Daniel Richard G. <skunk@iSKUNK.ORG>
+ Dave Pitts (Maintainer Emeritus), <dpitts@cozx.com>
If your bug is also reproducible under Unix, send a copy of your
report to the <bug-gawk@gnu.org> email list as well.
@@ -31962,7 +31964,7 @@ Index
* Bentley, Jon: Glossary. (line 206)
* Benzinger, Michael: Contributors. (line 98)
* Berry, Karl: Acknowledgments. (line 33)
-* Berry, Karl <1>: Acknowledgments. (line 74)
+* Berry, Karl <1>: Acknowledgments. (line 75)
* Berry, Karl <2>: Ranges and Locales. (line 74)
* binary input/output: User-modified. (line 15)
* 'bindtextdomain': I18N Functions. (line 11)
@@ -32017,7 +32019,7 @@ Index
* breakpoint, setting: Breakpoint Control. (line 11)
* Brennan, Michael: Foreword3. (line 84)
* Brennan, Michael <1>: Foreword4. (line 33)
-* Brennan, Michael <2>: Acknowledgments. (line 78)
+* Brennan, Michael <2>: Acknowledgments. (line 79)
* Brennan, Michael <3>: Delete. (line 56)
* Brennan, Michael <4>: Simple Sed. (line 25)
* Brennan, Michael <5>: Other Versions. (line 6)
@@ -32308,7 +32310,7 @@ Index
(line 112)
* Davies, Stephen: Acknowledgments. (line 60)
* Davies, Stephen <1>: Contributors. (line 75)
-* Day, Robert P.J.: Acknowledgments. (line 78)
+* Day, Robert P.J.: Acknowledgments. (line 79)
* 'dcgettext': I18N Functions. (line 21)
* 'dcgettext' <1>: Programmer i18n. (line 20)
* 'dcgettext()' function ('gawk'), portability and: I18N Portability.
@@ -32552,7 +32554,7 @@ Index
* double quote ('"'), in shell commands: Quoting. (line 54)
* 'down' debugger command: Execution Stack. (line 23)
* Drepper, Ulrich: Acknowledgments. (line 52)
-* Duman, Patrice: Acknowledgments. (line 74)
+* Duman, Patrice: Acknowledgments. (line 75)
* dump all variables of a program: Options. (line 94)
* 'dump' debugger command: Miscellaneous Debugger Commands.
(line 9)
@@ -32941,7 +32943,9 @@ Index
(line 44)
* functions, user-defined, 'next'/'nextfile' statements and <1>: Nextfile Statement.
(line 47)
-* G-d: Acknowledgments. (line 93)
+* G-d: Acknowledgments. (line 94)
+* G., Daniel Richard: Acknowledgments. (line 60)
+* G., Daniel Richard <1>: Bugs. (line 73)
* Garfinkle, Scott: Contributors. (line 35)
* 'gawk' program, dynamic profiling: Profiling. (line 178)
* 'gawk' version: Auto-set. (line 206)
@@ -33273,7 +33277,7 @@ Index
* Kenobi, Obi-Wan: Undocumented. (line 6)
* Kernighan, Brian: History. (line 17)
* Kernighan, Brian <1>: Conventions. (line 38)
-* Kernighan, Brian <2>: Acknowledgments. (line 78)
+* Kernighan, Brian <2>: Acknowledgments. (line 79)
* Kernighan, Brian <3>: Getline/Pipe. (line 6)
* Kernighan, Brian <4>: Concatenation. (line 6)
* Kernighan, Brian <5>: Library Functions. (line 12)
@@ -33988,9 +33992,9 @@ Index
* Robbins, Arnold <6>: Bugs. (line 73)
* Robbins, Arnold <7>: Future Extensions. (line 6)
* Robbins, Bill: Getline/Pipe. (line 40)
-* Robbins, Harry: Acknowledgments. (line 93)
-* Robbins, Jean: Acknowledgments. (line 93)
-* Robbins, Miriam: Acknowledgments. (line 93)
+* Robbins, Harry: Acknowledgments. (line 94)
+* Robbins, Jean: Acknowledgments. (line 94)
+* Robbins, Miriam: Acknowledgments. (line 94)
* Robbins, Miriam <1>: Getline/Pipe. (line 40)
* Robbins, Miriam <2>: Passwd Functions. (line 90)
* Rommel, Kai Uwe: Contributors. (line 43)
@@ -34548,542 +34552,542 @@ Ref: Manual History-Footnote-166996
Ref: Manual History-Footnote-267037
Node: How To Contribute67111
Node: Acknowledgments68240
-Node: Getting Started73108
-Node: Running gawk75547
-Node: One-shot76737
-Node: Read Terminal78000
-Node: Long80032
-Node: Executable Scripts81545
-Ref: Executable Scripts-Footnote-184340
-Node: Comments84443
-Node: Quoting86927
-Node: DOS Quoting92445
-Node: Sample Data Files93120
-Node: Very Simple95715
-Node: Two Rules100617
-Node: More Complex102503
-Node: Statements/Lines105366
-Ref: Statements/Lines-Footnote-1109825
-Node: Other Features110090
-Node: When111027
-Ref: When-Footnote-1112781
-Node: Intro Summary112846
-Node: Invoking Gawk113730
-Node: Command Line115244
-Node: Options116042
-Ref: Options-Footnote-1131949
-Ref: Options-Footnote-2132179
-Node: Other Arguments132204
-Node: Naming Standard Input135151
-Node: Environment Variables136244
-Node: AWKPATH Variable136802
-Ref: AWKPATH Variable-Footnote-1140103
-Ref: AWKPATH Variable-Footnote-2140148
-Node: AWKLIBPATH Variable140409
-Node: Other Environment Variables141553
-Node: Exit Status145318
-Node: Include Files145995
-Node: Loading Shared Libraries149590
-Node: Obsolete151018
-Node: Undocumented151710
-Node: Invoking Summary152007
-Node: Regexp153667
-Node: Regexp Usage155121
-Node: Escape Sequences157158
-Node: Regexp Operators163173
-Ref: Regexp Operators-Footnote-1170590
-Ref: Regexp Operators-Footnote-2170737
-Node: Bracket Expressions170835
-Ref: table-char-classes172858
-Node: Leftmost Longest175804
-Node: Computed Regexps177107
-Node: GNU Regexp Operators180534
-Node: Case-sensitivity184213
-Ref: Case-sensitivity-Footnote-1187100
-Ref: Case-sensitivity-Footnote-2187335
-Node: Regexp Summary187443
-Node: Reading Files188909
-Node: Records191003
-Node: awk split records191736
-Node: gawk split records196668
-Ref: gawk split records-Footnote-1201212
-Node: Fields201249
-Ref: Fields-Footnote-1204029
-Node: Nonconstant Fields204115
-Ref: Nonconstant Fields-Footnote-1206351
-Node: Changing Fields206555
-Node: Field Separators212485
-Node: Default Field Splitting215183
-Node: Regexp Field Splitting216301
-Node: Single Character Fields219654
-Node: Command Line Field Separator220714
-Node: Full Line Fields223932
-Ref: Full Line Fields-Footnote-1225454
-Ref: Full Line Fields-Footnote-2225500
-Node: Field Splitting Summary225601
-Node: Constant Size227675
-Node: Splitting By Content232254
-Ref: Splitting By Content-Footnote-1236225
-Node: Multiple Line236388
-Ref: Multiple Line-Footnote-1242271
-Node: Getline242450
-Node: Plain Getline244654
-Node: Getline/Variable247293
-Node: Getline/File248442
-Node: Getline/Variable/File249828
-Ref: Getline/Variable/File-Footnote-1251432
-Node: Getline/Pipe251520
-Node: Getline/Variable/Pipe254225
-Node: Getline/Coprocess255358
-Node: Getline/Variable/Coprocess256623
-Node: Getline Notes257363
-Node: Getline Summary260158
-Ref: table-getline-variants260580
-Node: Read Timeout261328
-Ref: Read Timeout-Footnote-1265169
-Node: Command-line directories265227
-Node: Input Summary266132
-Node: Input Exercises269304
-Node: Printing270032
-Node: Print271809
-Node: Print Examples273266
-Node: Output Separators276046
-Node: OFMT278063
-Node: Printf279419
-Node: Basic Printf280204
-Node: Control Letters281778
-Node: Format Modifiers285766
-Node: Printf Examples291781
-Node: Redirection294267
-Node: Special FD301110
-Ref: Special FD-Footnote-1304278
-Node: Special Files304352
-Node: Other Inherited Files304969
-Node: Special Network305970
-Node: Special Caveats306830
-Node: Close Files And Pipes307779
-Ref: Close Files And Pipes-Footnote-1314972
-Ref: Close Files And Pipes-Footnote-2315120
-Node: Output Summary315271
-Node: Output Exercises316269
-Node: Expressions316948
-Node: Values318136
-Node: Constants318814
-Node: Scalar Constants319505
-Ref: Scalar Constants-Footnote-1320369
-Node: Nondecimal-numbers320619
-Node: Regexp Constants323633
-Node: Using Constant Regexps324159
-Node: Variables327322
-Node: Using Variables327979
-Node: Assignment Options329890
-Node: Conversion331764
-Node: Strings And Numbers332288
-Ref: Strings And Numbers-Footnote-1335352
-Node: Locale influences conversions335461
-Ref: table-locale-affects338219
-Node: All Operators338837
-Node: Arithmetic Ops339466
-Node: Concatenation341972
-Ref: Concatenation-Footnote-1344819
-Node: Assignment Ops344926
-Ref: table-assign-ops349918
-Node: Increment Ops351231
-Node: Truth Values and Conditions354691
-Node: Truth Values355765
-Node: Typing and Comparison356813
-Node: Variable Typing357633
-Node: Comparison Operators361257
-Ref: table-relational-ops361676
-Node: POSIX String Comparison365171
-Ref: POSIX String Comparison-Footnote-1366245
-Node: Boolean Ops366384
-Ref: Boolean Ops-Footnote-1370866
-Node: Conditional Exp370958
-Node: Function Calls372694
-Node: Precedence376574
-Node: Locales380233
-Node: Expressions Summary381865
-Node: Patterns and Actions384438
-Node: Pattern Overview385558
-Node: Regexp Patterns387235
-Node: Expression Patterns387777
-Node: Ranges391558
-Node: BEGIN/END394666
-Node: Using BEGIN/END395427
-Ref: Using BEGIN/END-Footnote-1398164
-Node: I/O And BEGIN/END398270
-Node: BEGINFILE/ENDFILE400586
-Node: Empty403493
-Node: Using Shell Variables403810
-Node: Action Overview406084
-Node: Statements408409
-Node: If Statement410257
-Node: While Statement411752
-Node: Do Statement413780
-Node: For Statement414928
-Node: Switch Statement418087
-Node: Break Statement420473
-Node: Continue Statement422565
-Node: Next Statement424392
-Node: Nextfile Statement426775
-Node: Exit Statement429427
-Node: Built-in Variables431832
-Node: User-modified432965
-Ref: User-modified-Footnote-1440592
-Node: Auto-set440654
-Ref: Auto-set-Footnote-1453722
-Ref: Auto-set-Footnote-2453928
-Node: ARGC and ARGV453984
-Node: Pattern Action Summary458203
-Node: Arrays460633
-Node: Array Basics461962
-Node: Array Intro462806
-Ref: figure-array-elements464781
-Ref: Array Intro-Footnote-1467485
-Node: Reference to Elements467613
-Node: Assigning Elements470077
-Node: Array Example470568
-Node: Scanning an Array472327
-Node: Controlling Scanning475351
-Ref: Controlling Scanning-Footnote-1480750
-Node: Numeric Array Subscripts481066
-Node: Uninitialized Subscripts483250
-Node: Delete484869
-Ref: Delete-Footnote-1487621
-Node: Multidimensional487678
-Node: Multiscanning490773
-Node: Arrays of Arrays492364
-Node: Arrays Summary497132
-Node: Functions499225
-Node: Built-in500263
-Node: Calling Built-in501341
-Node: Numeric Functions503337
-Ref: Numeric Functions-Footnote-1507365
-Ref: Numeric Functions-Footnote-2507722
-Ref: Numeric Functions-Footnote-3507770
-Node: String Functions508042
-Ref: String Functions-Footnote-1531550
-Ref: String Functions-Footnote-2531679
-Ref: String Functions-Footnote-3531927
-Node: Gory Details532014
-Ref: table-sub-escapes533805
-Ref: table-sub-proposed535324
-Ref: table-posix-sub536687
-Ref: table-gensub-escapes538228
-Ref: Gory Details-Footnote-1539051
-Node: I/O Functions539202
-Ref: I/O Functions-Footnote-1546423
-Node: Time Functions546571
-Ref: Time Functions-Footnote-1557076
-Ref: Time Functions-Footnote-2557144
-Ref: Time Functions-Footnote-3557302
-Ref: Time Functions-Footnote-4557413
-Ref: Time Functions-Footnote-5557525
-Ref: Time Functions-Footnote-6557752
-Node: Bitwise Functions558018
-Ref: table-bitwise-ops558612
-Ref: Bitwise Functions-Footnote-1562950
-Node: Type Functions563123
-Node: I18N Functions564279
-Node: User-defined565930
-Node: Definition Syntax566735
-Ref: Definition Syntax-Footnote-1572422
-Node: Function Example572493
-Ref: Function Example-Footnote-1575415
-Node: Function Caveats575437
-Node: Calling A Function575955
-Node: Variable Scope576913
-Node: Pass By Value/Reference579907
-Node: Return Statement583406
-Node: Dynamic Typing586385
-Node: Indirect Calls587315
-Ref: Indirect Calls-Footnote-1597566
-Node: Functions Summary597694
-Node: Library Functions600399
-Ref: Library Functions-Footnote-1604008
-Ref: Library Functions-Footnote-2604151
-Node: Library Names604322
-Ref: Library Names-Footnote-1607783
-Ref: Library Names-Footnote-2608006
-Node: General Functions608092
-Node: Strtonum Function609195
-Node: Assert Function612217
-Node: Round Function615543
-Node: Cliff Random Function617084
-Node: Ordinal Functions618100
-Ref: Ordinal Functions-Footnote-1621163
-Ref: Ordinal Functions-Footnote-2621415
-Node: Join Function621625
-Ref: Join Function-Footnote-1623395
-Node: Getlocaltime Function623595
-Node: Readfile Function627339
-Node: Shell Quoting629313
-Node: Data File Management630714
-Node: Filetrans Function631346
-Node: Rewind Function635443
-Node: File Checking636829
-Ref: File Checking-Footnote-1638163
-Node: Empty Files638364
-Node: Ignoring Assigns640343
-Node: Getopt Function641893
-Ref: Getopt Function-Footnote-1653363
-Node: Passwd Functions653563
-Ref: Passwd Functions-Footnote-1662404
-Node: Group Functions662492
-Ref: Group Functions-Footnote-1670391
-Node: Walking Arrays670598
-Node: Library Functions Summary673608
-Node: Library Exercises675014
-Node: Sample Programs675479
-Node: Running Examples676249
-Node: Clones676977
-Node: Cut Program678201
-Node: Egrep Program687922
-Ref: Egrep Program-Footnote-1695434
-Node: Id Program695544
-Node: Split Program699224
-Ref: Split Program-Footnote-1702683
-Node: Tee Program702812
-Node: Uniq Program705602
-Node: Wc Program713028
-Ref: Wc Program-Footnote-1717283
-Node: Miscellaneous Programs717377
-Node: Dupword Program718590
-Node: Alarm Program720620
-Node: Translate Program725475
-Ref: Translate Program-Footnote-1730040
-Node: Labels Program730310
-Ref: Labels Program-Footnote-1733661
-Node: Word Sorting733745
-Node: History Sorting737817
-Node: Extract Program739652
-Node: Simple Sed747183
-Node: Igawk Program750257
-Ref: Igawk Program-Footnote-1764588
-Ref: Igawk Program-Footnote-2764790
-Ref: Igawk Program-Footnote-3764912
-Node: Anagram Program765027
-Node: Signature Program768089
-Node: Programs Summary769336
-Node: Programs Exercises770551
-Ref: Programs Exercises-Footnote-1774680
-Node: Advanced Features774771
-Node: Nondecimal Data776761
-Node: Array Sorting778352
-Node: Controlling Array Traversal779052
-Ref: Controlling Array Traversal-Footnote-1787421
-Node: Array Sorting Functions787539
-Ref: Array Sorting Functions-Footnote-1791426
-Node: Two-way I/O791622
-Ref: Two-way I/O-Footnote-1796573
-Ref: Two-way I/O-Footnote-2796760
-Node: TCP/IP Networking796842
-Node: Profiling799960
-Node: Advanced Features Summary807499
-Node: Internationalization809435
-Node: I18N and L10N810915
-Node: Explaining gettext811602
-Ref: Explaining gettext-Footnote-1816625
-Ref: Explaining gettext-Footnote-2816810
-Node: Programmer i18n816975
-Ref: Programmer i18n-Footnote-1821831
-Node: Translator i18n821880
-Node: String Extraction822674
-Ref: String Extraction-Footnote-1823807
-Node: Printf Ordering823893
-Ref: Printf Ordering-Footnote-1826679
-Node: I18N Portability826743
-Ref: I18N Portability-Footnote-1829199
-Node: I18N Example829262
-Ref: I18N Example-Footnote-1832068
-Node: Gawk I18N832141
-Node: I18N Summary832786
-Node: Debugger834127
-Node: Debugging835149
-Node: Debugging Concepts835590
-Node: Debugging Terms837399
-Node: Awk Debugging839974
-Node: Sample Debugging Session840880
-Node: Debugger Invocation841414
-Node: Finding The Bug842800
-Node: List of Debugger Commands849278
-Node: Breakpoint Control850611
-Node: Debugger Execution Control854305
-Node: Viewing And Changing Data857667
-Node: Execution Stack861041
-Node: Debugger Info862678
-Node: Miscellaneous Debugger Commands866749
-Node: Readline Support871758
-Node: Limitations872654
-Node: Debugging Summary874763
-Node: Arbitrary Precision Arithmetic875936
-Node: Computer Arithmetic877352
-Ref: table-numeric-ranges880943
-Ref: Computer Arithmetic-Footnote-1881665
-Node: Math Definitions881722
-Ref: table-ieee-formats885036
-Ref: Math Definitions-Footnote-1885639
-Node: MPFR features885744
-Node: FP Math Caution887417
-Ref: FP Math Caution-Footnote-1888489
-Node: Inexactness of computations888858
-Node: Inexact representation889818
-Node: Comparing FP Values891178
-Node: Errors accumulate892260
-Node: Getting Accuracy893693
-Node: Try To Round896403
-Node: Setting precision897302
-Ref: table-predefined-precision-strings897999
-Node: Setting the rounding mode899829
-Ref: table-gawk-rounding-modes900203
-Ref: Setting the rounding mode-Footnote-1903611
-Node: Arbitrary Precision Integers903790
-Ref: Arbitrary Precision Integers-Footnote-1906774
-Node: POSIX Floating Point Problems906923
-Ref: POSIX Floating Point Problems-Footnote-1910805
-Node: Floating point summary910843
-Node: Dynamic Extensions913033
-Node: Extension Intro914586
-Node: Plugin License915852
-Node: Extension Mechanism Outline916649
-Ref: figure-load-extension917088
-Ref: figure-register-new-function918653
-Ref: figure-call-new-function919745
-Node: Extension API Description921808
-Node: Extension API Functions Introduction923258
-Node: General Data Types928070
-Ref: General Data Types-Footnote-1934025
-Node: Memory Allocation Functions934324
-Ref: Memory Allocation Functions-Footnote-1937169
-Node: Constructor Functions937268
-Node: Registration Functions939013
-Node: Extension Functions939698
-Node: Exit Callback Functions941997
-Node: Extension Version String943247
-Node: Input Parsers943910
-Node: Output Wrappers953795
-Node: Two-way processors958307
-Node: Printing Messages960571
-Ref: Printing Messages-Footnote-1961647
-Node: Updating 'ERRNO'961800
-Node: Requesting Values962541
-Ref: table-value-types-returned963280
-Node: Accessing Parameters964163
-Node: Symbol Table Access965399
-Node: Symbol table by name965911
-Node: Symbol table by cookie967932
-Ref: Symbol table by cookie-Footnote-1972081
-Node: Cached values972145
-Ref: Cached values-Footnote-1975646
-Node: Array Manipulation975737
-Ref: Array Manipulation-Footnote-1976836
-Node: Array Data Types976873
-Ref: Array Data Types-Footnote-1979531
-Node: Array Functions979623
-Node: Flattening Arrays983482
-Node: Creating Arrays990390
-Node: Extension API Variables995162
-Node: Extension Versioning995798
-Node: Extension API Informational Variables997689
-Node: Extension API Boilerplate998753
-Node: Finding Extensions1002567
-Node: Extension Example1003127
-Node: Internal File Description1003925
-Node: Internal File Ops1008005
-Ref: Internal File Ops-Footnote-11019767
-Node: Using Internal File Ops1019907
-Ref: Using Internal File Ops-Footnote-11022290
-Node: Extension Samples1022565
-Node: Extension Sample File Functions1024094
-Node: Extension Sample Fnmatch1031743
-Node: Extension Sample Fork1033230
-Node: Extension Sample Inplace1034448
-Node: Extension Sample Ord1037658
-Node: Extension Sample Readdir1038494
-Ref: table-readdir-file-types1039383
-Node: Extension Sample Revout1040188
-Node: Extension Sample Rev2way1040777
-Node: Extension Sample Read write array1041517
-Node: Extension Sample Readfile1043459
-Node: Extension Sample Time1044554
-Node: Extension Sample API Tests1045902
-Node: gawkextlib1046394
-Node: Extension summary1048818
-Node: Extension Exercises1052510
-Node: Language History1054007
-Node: V7/SVR3.11055663
-Node: SVR41057815
-Node: POSIX1059249
-Node: BTL1060629
-Node: POSIX/GNU1061359
-Node: Feature History1066880
-Node: Common Extensions1080209
-Node: Ranges and Locales1081492
-Ref: Ranges and Locales-Footnote-11086108
-Ref: Ranges and Locales-Footnote-21086135
-Ref: Ranges and Locales-Footnote-31086370
-Node: Contributors1086591
-Node: History summary1092160
-Node: Installation1093540
-Node: Gawk Distribution1094485
-Node: Getting1094969
-Node: Extracting1095792
-Node: Distribution contents1097430
-Node: Unix Installation1103183
-Node: Quick Installation1103799
-Node: Additional Configuration Options1106226
-Node: Configuration Philosophy1108030
-Node: Non-Unix Installation1110400
-Node: PC Installation1110858
-Node: PC Binary Installation1112178
-Node: PC Compiling1114030
-Ref: PC Compiling-Footnote-11117054
-Node: PC Testing1117163
-Node: PC Using1118343
-Node: Cygwin1122457
-Node: MSYS1123227
-Node: VMS Installation1123728
-Node: VMS Compilation1124519
-Ref: VMS Compilation-Footnote-11125749
-Node: VMS Dynamic Extensions1125807
-Node: VMS Installation Details1127492
-Node: VMS Running1129745
-Node: VMS GNV1132586
-Node: VMS Old Gawk1133321
-Node: Bugs1133792
-Node: Other Versions1137906
-Node: Installation summary1144492
-Node: Notes1145550
-Node: Compatibility Mode1146415
-Node: Additions1147197
-Node: Accessing The Source1148122
-Node: Adding Code1149558
-Node: New Ports1155713
-Node: Derived Files1160201
-Ref: Derived Files-Footnote-11165686
-Ref: Derived Files-Footnote-21165721
-Ref: Derived Files-Footnote-31166319
-Node: Future Extensions1166433
-Node: Implementation Limitations1167091
-Node: Extension Design1168274
-Node: Old Extension Problems1169428
-Ref: Old Extension Problems-Footnote-11170946
-Node: Extension New Mechanism Goals1171003
-Ref: Extension New Mechanism Goals-Footnote-11174367
-Node: Extension Other Design Decisions1174556
-Node: Extension Future Growth1176669
-Node: Old Extension Mechanism1177505
-Node: Notes summary1179268
-Node: Basic Concepts1180450
-Node: Basic High Level1181131
-Ref: figure-general-flow1181413
-Ref: figure-process-flow1182098
-Ref: Basic High Level-Footnote-11185399
-Node: Basic Data Typing1185584
-Node: Glossary1188912
-Node: Copying1220858
-Node: GNU Free Documentation License1258397
-Node: Index1283515
+Node: Getting Started73127
+Node: Running gawk75566
+Node: One-shot76756
+Node: Read Terminal78019
+Node: Long80051
+Node: Executable Scripts81564
+Ref: Executable Scripts-Footnote-184359
+Node: Comments84462
+Node: Quoting86946
+Node: DOS Quoting92464
+Node: Sample Data Files93139
+Node: Very Simple95734
+Node: Two Rules100636
+Node: More Complex102522
+Node: Statements/Lines105385
+Ref: Statements/Lines-Footnote-1109844
+Node: Other Features110109
+Node: When111046
+Ref: When-Footnote-1112800
+Node: Intro Summary112865
+Node: Invoking Gawk113749
+Node: Command Line115263
+Node: Options116061
+Ref: Options-Footnote-1131968
+Ref: Options-Footnote-2132198
+Node: Other Arguments132223
+Node: Naming Standard Input135170
+Node: Environment Variables136263
+Node: AWKPATH Variable136821
+Ref: AWKPATH Variable-Footnote-1140122
+Ref: AWKPATH Variable-Footnote-2140167
+Node: AWKLIBPATH Variable140428
+Node: Other Environment Variables141572
+Node: Exit Status145337
+Node: Include Files146014
+Node: Loading Shared Libraries149609
+Node: Obsolete151037
+Node: Undocumented151729
+Node: Invoking Summary152026
+Node: Regexp153686
+Node: Regexp Usage155140
+Node: Escape Sequences157177
+Node: Regexp Operators163192
+Ref: Regexp Operators-Footnote-1170609
+Ref: Regexp Operators-Footnote-2170756
+Node: Bracket Expressions170854
+Ref: table-char-classes172877
+Node: Leftmost Longest175823
+Node: Computed Regexps177126
+Node: GNU Regexp Operators180553
+Node: Case-sensitivity184232
+Ref: Case-sensitivity-Footnote-1187119
+Ref: Case-sensitivity-Footnote-2187354
+Node: Regexp Summary187462
+Node: Reading Files188928
+Node: Records191022
+Node: awk split records191755
+Node: gawk split records196687
+Ref: gawk split records-Footnote-1201231
+Node: Fields201268
+Ref: Fields-Footnote-1204048
+Node: Nonconstant Fields204134
+Ref: Nonconstant Fields-Footnote-1206370
+Node: Changing Fields206574
+Node: Field Separators212504
+Node: Default Field Splitting215202
+Node: Regexp Field Splitting216320
+Node: Single Character Fields219673
+Node: Command Line Field Separator220733
+Node: Full Line Fields223951
+Ref: Full Line Fields-Footnote-1225473
+Ref: Full Line Fields-Footnote-2225519
+Node: Field Splitting Summary225620
+Node: Constant Size227694
+Node: Splitting By Content232273
+Ref: Splitting By Content-Footnote-1236244
+Node: Multiple Line236407
+Ref: Multiple Line-Footnote-1242290
+Node: Getline242469
+Node: Plain Getline244673
+Node: Getline/Variable247312
+Node: Getline/File248461
+Node: Getline/Variable/File249847
+Ref: Getline/Variable/File-Footnote-1251451
+Node: Getline/Pipe251539
+Node: Getline/Variable/Pipe254244
+Node: Getline/Coprocess255377
+Node: Getline/Variable/Coprocess256642
+Node: Getline Notes257382
+Node: Getline Summary260177
+Ref: table-getline-variants260599
+Node: Read Timeout261347
+Ref: Read Timeout-Footnote-1265188
+Node: Command-line directories265246
+Node: Input Summary266151
+Node: Input Exercises269323
+Node: Printing270051
+Node: Print271828
+Node: Print Examples273285
+Node: Output Separators276065
+Node: OFMT278082
+Node: Printf279438
+Node: Basic Printf280223
+Node: Control Letters281797
+Node: Format Modifiers285785
+Node: Printf Examples291800
+Node: Redirection294286
+Node: Special FD301129
+Ref: Special FD-Footnote-1304297
+Node: Special Files304371
+Node: Other Inherited Files304988
+Node: Special Network305989
+Node: Special Caveats306849
+Node: Close Files And Pipes307798
+Ref: Close Files And Pipes-Footnote-1314991
+Ref: Close Files And Pipes-Footnote-2315139
+Node: Output Summary315290
+Node: Output Exercises316288
+Node: Expressions316967
+Node: Values318155
+Node: Constants318833
+Node: Scalar Constants319524
+Ref: Scalar Constants-Footnote-1320388
+Node: Nondecimal-numbers320638
+Node: Regexp Constants323652
+Node: Using Constant Regexps324178
+Node: Variables327341
+Node: Using Variables327998
+Node: Assignment Options329909
+Node: Conversion331783
+Node: Strings And Numbers332307
+Ref: Strings And Numbers-Footnote-1335371
+Node: Locale influences conversions335480
+Ref: table-locale-affects338238
+Node: All Operators338856
+Node: Arithmetic Ops339485
+Node: Concatenation341991
+Ref: Concatenation-Footnote-1344838
+Node: Assignment Ops344945
+Ref: table-assign-ops349937
+Node: Increment Ops351250
+Node: Truth Values and Conditions354710
+Node: Truth Values355784
+Node: Typing and Comparison356832
+Node: Variable Typing357652
+Node: Comparison Operators361276
+Ref: table-relational-ops361695
+Node: POSIX String Comparison365190
+Ref: POSIX String Comparison-Footnote-1366264
+Node: Boolean Ops366403
+Ref: Boolean Ops-Footnote-1370885
+Node: Conditional Exp370977
+Node: Function Calls372713
+Node: Precedence376593
+Node: Locales380252
+Node: Expressions Summary381884
+Node: Patterns and Actions384457
+Node: Pattern Overview385577
+Node: Regexp Patterns387254
+Node: Expression Patterns387796
+Node: Ranges391577
+Node: BEGIN/END394685
+Node: Using BEGIN/END395446
+Ref: Using BEGIN/END-Footnote-1398183
+Node: I/O And BEGIN/END398289
+Node: BEGINFILE/ENDFILE400605
+Node: Empty403512
+Node: Using Shell Variables403829
+Node: Action Overview406103
+Node: Statements408428
+Node: If Statement410276
+Node: While Statement411771
+Node: Do Statement413799
+Node: For Statement414947
+Node: Switch Statement418106
+Node: Break Statement420492
+Node: Continue Statement422584
+Node: Next Statement424411
+Node: Nextfile Statement426794
+Node: Exit Statement429446
+Node: Built-in Variables431851
+Node: User-modified432984
+Ref: User-modified-Footnote-1440611
+Node: Auto-set440673
+Ref: Auto-set-Footnote-1453741
+Ref: Auto-set-Footnote-2453947
+Node: ARGC and ARGV454003
+Node: Pattern Action Summary458222
+Node: Arrays460652
+Node: Array Basics461981
+Node: Array Intro462825
+Ref: figure-array-elements464800
+Ref: Array Intro-Footnote-1467504
+Node: Reference to Elements467632
+Node: Assigning Elements470096
+Node: Array Example470587
+Node: Scanning an Array472346
+Node: Controlling Scanning475370
+Ref: Controlling Scanning-Footnote-1480769
+Node: Numeric Array Subscripts481085
+Node: Uninitialized Subscripts483269
+Node: Delete484888
+Ref: Delete-Footnote-1487640
+Node: Multidimensional487697
+Node: Multiscanning490792
+Node: Arrays of Arrays492383
+Node: Arrays Summary497151
+Node: Functions499244
+Node: Built-in500282
+Node: Calling Built-in501360
+Node: Numeric Functions503356
+Ref: Numeric Functions-Footnote-1507384
+Ref: Numeric Functions-Footnote-2507741
+Ref: Numeric Functions-Footnote-3507789
+Node: String Functions508061
+Ref: String Functions-Footnote-1531569
+Ref: String Functions-Footnote-2531698
+Ref: String Functions-Footnote-3531946
+Node: Gory Details532033
+Ref: table-sub-escapes533824
+Ref: table-sub-proposed535343
+Ref: table-posix-sub536706
+Ref: table-gensub-escapes538247
+Ref: Gory Details-Footnote-1539070
+Node: I/O Functions539221
+Ref: I/O Functions-Footnote-1546442
+Node: Time Functions546590
+Ref: Time Functions-Footnote-1557095
+Ref: Time Functions-Footnote-2557163
+Ref: Time Functions-Footnote-3557321
+Ref: Time Functions-Footnote-4557432
+Ref: Time Functions-Footnote-5557544
+Ref: Time Functions-Footnote-6557771
+Node: Bitwise Functions558037
+Ref: table-bitwise-ops558631
+Ref: Bitwise Functions-Footnote-1562969
+Node: Type Functions563142
+Node: I18N Functions564298
+Node: User-defined565949
+Node: Definition Syntax566754
+Ref: Definition Syntax-Footnote-1572441
+Node: Function Example572512
+Ref: Function Example-Footnote-1575434
+Node: Function Caveats575456
+Node: Calling A Function575974
+Node: Variable Scope576932
+Node: Pass By Value/Reference579926
+Node: Return Statement583425
+Node: Dynamic Typing586404
+Node: Indirect Calls587334
+Ref: Indirect Calls-Footnote-1597585
+Node: Functions Summary597713
+Node: Library Functions600418
+Ref: Library Functions-Footnote-1604027
+Ref: Library Functions-Footnote-2604170
+Node: Library Names604341
+Ref: Library Names-Footnote-1607802
+Ref: Library Names-Footnote-2608025
+Node: General Functions608111
+Node: Strtonum Function609214
+Node: Assert Function612236
+Node: Round Function615562
+Node: Cliff Random Function617103
+Node: Ordinal Functions618119
+Ref: Ordinal Functions-Footnote-1621182
+Ref: Ordinal Functions-Footnote-2621434
+Node: Join Function621644
+Ref: Join Function-Footnote-1623414
+Node: Getlocaltime Function623614
+Node: Readfile Function627358
+Node: Shell Quoting629332
+Node: Data File Management630733
+Node: Filetrans Function631365
+Node: Rewind Function635462
+Node: File Checking636848
+Ref: File Checking-Footnote-1638182
+Node: Empty Files638383
+Node: Ignoring Assigns640362
+Node: Getopt Function641912
+Ref: Getopt Function-Footnote-1653382
+Node: Passwd Functions653582
+Ref: Passwd Functions-Footnote-1662423
+Node: Group Functions662511
+Ref: Group Functions-Footnote-1670410
+Node: Walking Arrays670617
+Node: Library Functions Summary673627
+Node: Library Exercises675033
+Node: Sample Programs675498
+Node: Running Examples676268
+Node: Clones676996
+Node: Cut Program678220
+Node: Egrep Program687941
+Ref: Egrep Program-Footnote-1695453
+Node: Id Program695563
+Node: Split Program699243
+Ref: Split Program-Footnote-1702702
+Node: Tee Program702831
+Node: Uniq Program705621
+Node: Wc Program713047
+Ref: Wc Program-Footnote-1717302
+Node: Miscellaneous Programs717396
+Node: Dupword Program718609
+Node: Alarm Program720639
+Node: Translate Program725494
+Ref: Translate Program-Footnote-1730059
+Node: Labels Program730329
+Ref: Labels Program-Footnote-1733680
+Node: Word Sorting733764
+Node: History Sorting737836
+Node: Extract Program739671
+Node: Simple Sed747202
+Node: Igawk Program750276
+Ref: Igawk Program-Footnote-1764607
+Ref: Igawk Program-Footnote-2764809
+Ref: Igawk Program-Footnote-3764931
+Node: Anagram Program765046
+Node: Signature Program768108
+Node: Programs Summary769355
+Node: Programs Exercises770570
+Ref: Programs Exercises-Footnote-1774699
+Node: Advanced Features774790
+Node: Nondecimal Data776780
+Node: Array Sorting778371
+Node: Controlling Array Traversal779071
+Ref: Controlling Array Traversal-Footnote-1787440
+Node: Array Sorting Functions787558
+Ref: Array Sorting Functions-Footnote-1791445
+Node: Two-way I/O791641
+Ref: Two-way I/O-Footnote-1796592
+Ref: Two-way I/O-Footnote-2796779
+Node: TCP/IP Networking796861
+Node: Profiling799979
+Node: Advanced Features Summary807518
+Node: Internationalization809454
+Node: I18N and L10N810934
+Node: Explaining gettext811621
+Ref: Explaining gettext-Footnote-1816644
+Ref: Explaining gettext-Footnote-2816829
+Node: Programmer i18n816994
+Ref: Programmer i18n-Footnote-1821850
+Node: Translator i18n821899
+Node: String Extraction822693
+Ref: String Extraction-Footnote-1823826
+Node: Printf Ordering823912
+Ref: Printf Ordering-Footnote-1826698
+Node: I18N Portability826762
+Ref: I18N Portability-Footnote-1829218
+Node: I18N Example829281
+Ref: I18N Example-Footnote-1832087
+Node: Gawk I18N832160
+Node: I18N Summary832805
+Node: Debugger834146
+Node: Debugging835168
+Node: Debugging Concepts835609
+Node: Debugging Terms837418
+Node: Awk Debugging839993
+Node: Sample Debugging Session840899
+Node: Debugger Invocation841433
+Node: Finding The Bug842819
+Node: List of Debugger Commands849297
+Node: Breakpoint Control850630
+Node: Debugger Execution Control854324
+Node: Viewing And Changing Data857686
+Node: Execution Stack861060
+Node: Debugger Info862697
+Node: Miscellaneous Debugger Commands866768
+Node: Readline Support871777
+Node: Limitations872673
+Node: Debugging Summary874782
+Node: Arbitrary Precision Arithmetic875955
+Node: Computer Arithmetic877371
+Ref: table-numeric-ranges880962
+Ref: Computer Arithmetic-Footnote-1881684
+Node: Math Definitions881741
+Ref: table-ieee-formats885055
+Ref: Math Definitions-Footnote-1885658
+Node: MPFR features885763
+Node: FP Math Caution887436
+Ref: FP Math Caution-Footnote-1888508
+Node: Inexactness of computations888877
+Node: Inexact representation889837
+Node: Comparing FP Values891197
+Node: Errors accumulate892279
+Node: Getting Accuracy893712
+Node: Try To Round896422
+Node: Setting precision897321
+Ref: table-predefined-precision-strings898018
+Node: Setting the rounding mode899848
+Ref: table-gawk-rounding-modes900222
+Ref: Setting the rounding mode-Footnote-1903630
+Node: Arbitrary Precision Integers903809
+Ref: Arbitrary Precision Integers-Footnote-1906793
+Node: POSIX Floating Point Problems906942
+Ref: POSIX Floating Point Problems-Footnote-1910824
+Node: Floating point summary910862
+Node: Dynamic Extensions913052
+Node: Extension Intro914605
+Node: Plugin License915871
+Node: Extension Mechanism Outline916668
+Ref: figure-load-extension917107
+Ref: figure-register-new-function918672
+Ref: figure-call-new-function919764
+Node: Extension API Description921827
+Node: Extension API Functions Introduction923277
+Node: General Data Types928089
+Ref: General Data Types-Footnote-1934044
+Node: Memory Allocation Functions934343
+Ref: Memory Allocation Functions-Footnote-1937188
+Node: Constructor Functions937287
+Node: Registration Functions939032
+Node: Extension Functions939717
+Node: Exit Callback Functions942016
+Node: Extension Version String943266
+Node: Input Parsers943929
+Node: Output Wrappers953814
+Node: Two-way processors958326
+Node: Printing Messages960590
+Ref: Printing Messages-Footnote-1961666
+Node: Updating 'ERRNO'961819
+Node: Requesting Values962560
+Ref: table-value-types-returned963299
+Node: Accessing Parameters964182
+Node: Symbol Table Access965418
+Node: Symbol table by name965930
+Node: Symbol table by cookie967951
+Ref: Symbol table by cookie-Footnote-1972100
+Node: Cached values972164
+Ref: Cached values-Footnote-1975665
+Node: Array Manipulation975756
+Ref: Array Manipulation-Footnote-1976855
+Node: Array Data Types976892
+Ref: Array Data Types-Footnote-1979550
+Node: Array Functions979642
+Node: Flattening Arrays983501
+Node: Creating Arrays990409
+Node: Extension API Variables995181
+Node: Extension Versioning995817
+Node: Extension API Informational Variables997708
+Node: Extension API Boilerplate998772
+Node: Finding Extensions1002586
+Node: Extension Example1003146
+Node: Internal File Description1003944
+Node: Internal File Ops1008024
+Ref: Internal File Ops-Footnote-11019786
+Node: Using Internal File Ops1019926
+Ref: Using Internal File Ops-Footnote-11022309
+Node: Extension Samples1022584
+Node: Extension Sample File Functions1024113
+Node: Extension Sample Fnmatch1031762
+Node: Extension Sample Fork1033249
+Node: Extension Sample Inplace1034467
+Node: Extension Sample Ord1037677
+Node: Extension Sample Readdir1038513
+Ref: table-readdir-file-types1039402
+Node: Extension Sample Revout1040207
+Node: Extension Sample Rev2way1040796
+Node: Extension Sample Read write array1041536
+Node: Extension Sample Readfile1043478
+Node: Extension Sample Time1044573
+Node: Extension Sample API Tests1045921
+Node: gawkextlib1046413
+Node: Extension summary1048837
+Node: Extension Exercises1052529
+Node: Language History1054026
+Node: V7/SVR3.11055682
+Node: SVR41057834
+Node: POSIX1059268
+Node: BTL1060648
+Node: POSIX/GNU1061378
+Node: Feature History1066899
+Node: Common Extensions1080228
+Node: Ranges and Locales1081511
+Ref: Ranges and Locales-Footnote-11086127
+Ref: Ranges and Locales-Footnote-21086154
+Ref: Ranges and Locales-Footnote-31086389
+Node: Contributors1086610
+Node: History summary1092179
+Node: Installation1093559
+Node: Gawk Distribution1094504
+Node: Getting1094988
+Node: Extracting1095811
+Node: Distribution contents1097449
+Node: Unix Installation1103202
+Node: Quick Installation1103818
+Node: Additional Configuration Options1106245
+Node: Configuration Philosophy1108049
+Node: Non-Unix Installation1110419
+Node: PC Installation1110877
+Node: PC Binary Installation1112197
+Node: PC Compiling1114049
+Ref: PC Compiling-Footnote-11117073
+Node: PC Testing1117182
+Node: PC Using1118362
+Node: Cygwin1122476
+Node: MSYS1123246
+Node: VMS Installation1123747
+Node: VMS Compilation1124538
+Ref: VMS Compilation-Footnote-11125768
+Node: VMS Dynamic Extensions1125826
+Node: VMS Installation Details1127511
+Node: VMS Running1129764
+Node: VMS GNV1132605
+Node: VMS Old Gawk1133340
+Node: Bugs1133811
+Node: Other Versions1138008
+Node: Installation summary1144594
+Node: Notes1145652
+Node: Compatibility Mode1146517
+Node: Additions1147299
+Node: Accessing The Source1148224
+Node: Adding Code1149660
+Node: New Ports1155815
+Node: Derived Files1160303
+Ref: Derived Files-Footnote-11165788
+Ref: Derived Files-Footnote-21165823
+Ref: Derived Files-Footnote-31166421
+Node: Future Extensions1166535
+Node: Implementation Limitations1167193
+Node: Extension Design1168376
+Node: Old Extension Problems1169530
+Ref: Old Extension Problems-Footnote-11171048
+Node: Extension New Mechanism Goals1171105
+Ref: Extension New Mechanism Goals-Footnote-11174469
+Node: Extension Other Design Decisions1174658
+Node: Extension Future Growth1176771
+Node: Old Extension Mechanism1177607
+Node: Notes summary1179370
+Node: Basic Concepts1180552
+Node: Basic High Level1181233
+Ref: figure-general-flow1181515
+Ref: figure-process-flow1182200
+Ref: Basic High Level-Footnote-11185501
+Node: Basic Data Typing1185686
+Node: Glossary1189014
+Node: Copying1220960
+Node: GNU Free Documentation License1258499
+Node: Index1283617

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 0dcaf135..bc737777 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -2205,6 +2205,7 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Davies, Stephen
@cindex Deifik, Scott
@cindex Demaille, Akim
+@cindex G., Daniel Richard
@cindex Hankerson, Darrel
@cindex Jaegermann, Michal
@cindex Kahrs, J@"urgen
@@ -2224,6 +2225,7 @@ Antonio Colombo,
Stephen Davies,
Scott Deifik,
Akim Demaille,
+Daniel Richard G.,
Darrel Hankerson,
Michal Jaegermann,
J@"urgen Kahrs,
@@ -22305,11 +22307,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
@c endfile
@end ignore
@c file eg/lib/pwcat.c
@@ -22319,6 +22317,10 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
@c endfile
@end ignore
@@ -22638,9 +22640,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
@c endfile
@end ignore
@c file eg/lib/grcat.c
@@ -22649,6 +22649,8 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
@c endfile
@end ignore
@@ -38224,6 +38226,7 @@ The people maintaining the various @command{gawk} ports are:
@cindex Deifik, Scott
@cindex Malmberg, John
@cindex Pitts, Dave
+@cindex G., Daniel Richard
@cindex Robbins, Arnold
@cindex Zaretskii, Eli
@multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890}
@@ -38239,7 +38242,8 @@ The people maintaining the various @command{gawk} ports are:
@item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}
-@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
+@item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK.ORG}
+@item @tab Dave Pitts (Maintainer Emeritus), @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
@end multitable
If your bug is also reproducible under Unix, send a copy of your
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index d63a6f60..a604d983 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -2172,6 +2172,7 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Davies, Stephen
@cindex Deifik, Scott
@cindex Demaille, Akim
+@cindex G., Daniel Richard
@cindex Hankerson, Darrel
@cindex Jaegermann, Michal
@cindex Kahrs, J@"urgen
@@ -2191,6 +2192,7 @@ Antonio Colombo,
Stephen Davies,
Scott Deifik,
Akim Demaille,
+Daniel Richard G.,
Darrel Hankerson,
Michal Jaegermann,
J@"urgen Kahrs,
@@ -21396,11 +21398,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
@c endfile
@end ignore
@c file eg/lib/pwcat.c
@@ -21410,6 +21408,10 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
@c endfile
@end ignore
@@ -21729,9 +21731,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
@c endfile
@end ignore
@c file eg/lib/grcat.c
@@ -21740,6 +21740,8 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
@c endfile
@end ignore
@@ -37315,6 +37317,7 @@ The people maintaining the various @command{gawk} ports are:
@cindex Deifik, Scott
@cindex Malmberg, John
@cindex Pitts, Dave
+@cindex G., Daniel Richard
@cindex Robbins, Arnold
@cindex Zaretskii, Eli
@multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890}
@@ -37330,7 +37333,8 @@ The people maintaining the various @command{gawk} ports are:
@item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}
-@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
+@item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK.ORG}
+@item @tab Dave Pitts (Maintainer Emeritus), @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
@end multitable
If your bug is also reproducible under Unix, send a copy of your
diff --git a/eval.c b/eval.c
index dfb99a4c..05924cda 100644
--- a/eval.c
+++ b/eval.c
@@ -122,7 +122,7 @@ char casetable[] = {
C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'),
C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'),
};
-#elif 'a' == 0x81 /* it's EBCDIC */
+#elif defined(USE_EBCDIC)
char casetable[] = {
/*00 NU SH SX EX PF HT LC DL */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -215,7 +215,7 @@ load_casetable(void)
if (cp == NULL || strcmp(cp, "C") == 0 || strcmp(cp, "POSIX") == 0)
return;
-#ifndef ZOS_USS
+#ifndef USE_EBCDIC
/* use of isalpha is ok here (see is_alpha in awkgram.y) */
for (i = 0200; i <= 0377; i++) {
if (isalpha(i) && islower(i) && i != toupper(i))
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 3cd932b6..e0089cc5 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,13 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * rwarray.c: Removed z/OS-specific code that is no longer needed due
+ to improvements in Gawk's general Autotools support.
+ * Makefile.am, configure.ac: Make use of the AC_ZOS_USS macro so
+ that this sub-project can support that platform as well.
+ * gawkfts.h, readdir.c: Use a proper platform cpp symbol to guard
+ z/OS-specific code, and eliminate the z/OS-specific use of "long"
+ inode numbers as "long long" works perfectly well there.
+
2015-08-02 Arnold D. Robbins <arnold@skeeve.com>
* revoutput.c (init_revoutput): Don't install REVOUT if it's
diff --git a/extension/Makefile.am b/extension/Makefile.am
index 92f5637b..ff9e9073 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -27,7 +27,7 @@ AM_CPPFLAGS = -I$(srcdir)/..
# This variable insures that aclocal runs
# correctly after changing configure.ac
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I ../m4
# For some make's, e.g. OpenBSD, that don't define this
RM = rm -f
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 4c148361..868781ca 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -113,10 +113,11 @@ build_triplet = @build@
host_triplet = @host@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/dirfd.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/../m4/arch.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -499,7 +500,7 @@ AM_CPPFLAGS = -I$(srcdir)/..
# This variable insures that aclocal runs
# correctly after changing configure.ac
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I ../m4
# For some make's, e.g. OpenBSD, that don't define this
RM = rm -f
diff --git a/extension/aclocal.m4 b/extension/aclocal.m4
index d2e755e4..5665d48e 100644
--- a/extension/aclocal.m4
+++ b/extension/aclocal.m4
@@ -1210,6 +1210,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../m4/arch.m4])
m4_include([m4/dirfd.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
diff --git a/extension/configure b/extension/configure
index 6e280de9..0e6dd611 100755
--- a/extension/configure
+++ b/extension/configure
@@ -3660,6 +3660,99 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5
+$as_echo_n "checking for z/OS USS compilation... " >&6; }
+if ${ac_cv_zos_uss+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+if test "OS/390" = "`uname`"
+then
+ ac_cv_zos_uss=yes
+else
+ ac_cv_zos_uss=no
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5
+$as_echo "${ac_cv_zos_uss}" >&6; }
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ if test -n "$_C89_OPTIONS"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CC = $CC" >&5
+$as_echo "$as_me: CC = $CC" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: _C89_OPTIONS = $_C89_OPTIONS" >&5
+$as_echo "$as_me: _C89_OPTIONS = $_C89_OPTIONS" >&6;}
+ else
+ as_fn_error $? "c89-setup-required
+To build GNU Awk using \"c89\", please set
+
+ _C89_OPTIONS=\"-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)\"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)" "$LINENO" 5
+ fi
+ ;;
+ gcc)
+ ;;
+ cc)
+ as_fn_error $? "cc-invalid
+The z/OS \"cc\" compiler does not build GNU Awk correctly.
+
+If the \"xlc\" or \"c89\" compiler is available, please set CC accordingly
+and reconfigure. (\"xlc\" is the recommended compiler on z/OS.)" "$LINENO" 5
+ ;;
+ xlc*)
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: wrapping $CC with zos-cc to obtain standard behavior" >&5
+$as_echo "$as_me: wrapping $CC with zos-cc to obtain standard behavior" >&6;}
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized compiler environment" >&5
+$as_echo "$as_me: WARNING: unrecognized compiler environment" >&2;}
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
+
+
INSTALL="$ac_aux_dir/install-sh -c"
export INSTALL
diff --git a/extension/configure.ac b/extension/configure.ac
index f99742b9..45e4fb6e 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -29,6 +29,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_USE_SYSTEM_EXTENSIONS
+AC_ZOS_USS
INSTALL="$ac_aux_dir/install-sh -c"
export INSTALL
diff --git a/extension/gawkfts.h b/extension/gawkfts.h
index f1ca26f5..447b1758 100644
--- a/extension/gawkfts.h
+++ b/extension/gawkfts.h
@@ -45,7 +45,7 @@
# endif
#endif
-#ifdef ZOS_USS
+#ifdef __MVS__
#include <limits.h>
#define MAXPATHLEN FILENAME_MAX
#endif
@@ -81,11 +81,7 @@ typedef struct _ftsent {
struct _ftsent *fts_cycle; /* cycle node */
struct _ftsent *fts_parent; /* parent directory */
struct _ftsent *fts_link; /* next file in directory */
-#ifdef ZOS_USS
- long fts_number; /* local numeric value */
-#else
- long long fts_number; /* local numeric value */
-#endif
+ long long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
diff --git a/extension/readdir.c b/extension/readdir.c
index 7bcabcb0..4578b864 100644
--- a/extension/readdir.c
+++ b/extension/readdir.c
@@ -137,11 +137,7 @@ ftype(struct dirent *entry, const char *dirname)
}
/* get_inode --- get the inode of a file */
-#ifdef ZOS_USS
-static long
-#else
static long long
-#endif
get_inode(struct dirent *entry, const char *dirname)
{
#ifdef __MINGW32__
@@ -179,11 +175,7 @@ dir_get_record(char **out, awk_input_buf_t *iobuf, int *errcode,
int len;
open_directory_t *the_dir;
const char *ftstr;
-#ifdef ZOS_USS
- unsigned long ino;
-#else
unsigned long long ino;
-#endif
/*
* The caller sets *errcode to 0, so we should set it only if an
@@ -208,9 +200,7 @@ dir_get_record(char **out, awk_input_buf_t *iobuf, int *errcode,
ino = get_inode (dirent, iobuf->name);
-#if defined(ZOS_USS)
- len = sprintf(the_dir->buf, "%lu/%s", ino, dirent->d_name);
-#elif __MINGW32__
+#if __MINGW32__
len = sprintf(the_dir->buf, "%I64u/%s", ino, dirent->d_name);
#else
len = sprintf(the_dir->buf, "%llu/%s", ino, dirent->d_name);
diff --git a/extension/rwarray.c b/extension/rwarray.c
index aa05a0d5..155cc47c 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -53,17 +53,6 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
-#if defined(ZOS_USS)
-#include <limits.h>
-#define INT32_MAX INT_MAX
-#define INT32_MIN INT_MIN
-#ifndef __uint32_t
-#define __uint32_t 1
-typedef unsigned long uint32_t;
-#endif
-typedef long int32_t;
-#endif /* ZOS_USS */
-
#define MAGIC "awkrulz\n"
#define MAJOR 3
#define MINOR 0
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index 4188c17d..3215d159 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * testdfa.c: Define and use the USE_EBCDIC cpp symbol
+ instead of checking the value of 'a' whenever we want to know
+ if we're on an EBCDIC system. Also, don't assume that z/OS
+ necessarily means EBCDIC, as the compiler does have an ASCII
+ mode (-qascii).
+
2015-05-27 Arnold D. Robbins <arnold@skeeve.com>
* mb_cur_max.c, timeformat.c: New files.
diff --git a/helpers/testdfa.c b/helpers/testdfa.c
index 25a229a2..1e144bd7 100644
--- a/helpers/testdfa.c
+++ b/helpers/testdfa.c
@@ -668,7 +668,7 @@ char casetable[] = {
C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'),
C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'),
};
-#elif 'a' == 0x81 /* it's EBCDIC */
+#elif defined(USE_EBCDIC)
char casetable[] = {
/*00 NU SH SX EX PF HT LC DL */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
diff --git a/io.c b/io.c
index 2344c2ad..f6b50314 100644
--- a/io.c
+++ b/io.c
@@ -76,6 +76,10 @@
#include <netdb.h>
#endif /* HAVE_NETDB_H */
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SYS_SELECT_H */
+
#ifndef HAVE_GETADDRINFO
#include "missing_d/getaddrinfo.h"
#endif
@@ -1774,7 +1778,7 @@ two_way_open(const char *str, struct redirect *rp)
if (find_two_way_processor(str, rp))
return true;
-#if defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS)
+#if defined(HAVE_TERMIOS_H)
/* case 3: use ptys for two-way communications to child */
if (! no_ptys && pty_vs_pipe(str)) {
static bool initialized = false;
@@ -2000,7 +2004,7 @@ two_way_open(const char *str, struct redirect *rp)
first_pty_letter = '\0'; /* reset for next command */
return true;
}
-#endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */
+#endif /* defined(HAVE_TERMIOS_H) */
use_pipes:
#ifndef PIPES_SIMULATED /* real pipes */
diff --git a/m4/ChangeLog b/m4/ChangeLog
index c3704e4b..e6a87883 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,20 @@
+2015-09-11 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * arch.m4: Rework again. In particular, provide a wrapper
+ for CC to work around some issues.
+
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * arch.m4: Complete rewrite of AC_ZOS_USS. It no longer
+ deletes awkgram.c and command.c on a z/OS system, as these are
+ now usable in EBCDIC-land without regeneration; it sets some
+ important CFLAGS/CPPFLAGS to enable standard compiler
+ behavior, like giving an error instead of a warning when a
+ header file cannot be found (!); prevents the use of cc(1),
+ which on z/OS does not build gawk correctly; and gives some
+ help to the user if s/he is building with c89(1), which
+ presents some difficulties due to its option syntax.
+
2015-08-02 Arnold D. Robbins <arnold@skeeve.com>
* codeset.m4, glibc2.m4, glibc21.m4, intdiv0.m4, intl.m4,
diff --git a/m4/arch.m4 b/m4/arch.m4
index 2402435e..fc25d8e9 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -61,14 +61,98 @@ AC_MSG_RESULT([${gawk_cv_linux_alpha_hack}])
dnl Check for z/OS Unix Systems Services
AC_DEFUN([AC_ZOS_USS], [
AC_MSG_CHECKING([for z/OS USS compilation])
+AC_CACHE_VAL(ac_cv_zos_uss, [
if test "OS/390" = "`uname`"
then
- CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c and command.c from Bison for EBCDIC
- rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
fi
+])dnl
AC_MSG_RESULT([${ac_cv_zos_uss}])
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ dnl Identify the compiler.
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89[ |_]' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc[ |_]' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ dnl These feature test macros are needed on z/OS.
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ dnl If the user has set CC=c89 and _C89_OPTIONS, then don't get in
+ dnl their way. c89 (as well as cc) pre-dates xlc, and accepts an
+ dnl option syntax that involves parentheses and cannot be handled
+ dnl in the usual way in C(PP)FLAGS. However, c89 will also accept
+ dnl options via the aforementioned environment variable, which
+ dnl gives the user one way around the problem. (If you're
+ dnl wondering about cc, it is meant for programs written in
+ dnl "Common Usage C" [a.k.a. K&R C] as opposed to "Standard C"
+ dnl [a.k.a. ANSI], and does not build gawk correctly.)
+ if test -n "$_C89_OPTIONS"
+ then
+ AC_MSG_NOTICE([CC = $CC])
+ AC_MSG_NOTICE([_C89_OPTIONS = $_C89_OPTIONS])
+ else
+ AC_MSG_ERROR([c89-setup-required
+To build GNU Awk using "c89", please set
+
+ _C89_OPTIONS="-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)])
+ fi
+ ;;
+ gcc)
+ dnl GCC has not yet been ported to z/OS as of this writing
+ ;;
+ cc)
+ AC_MSG_ERROR([cc-invalid
+The z/OS "cc" compiler does not build GNU Awk correctly.
+
+If the "xlc" or "c89" compiler is available, please set CC accordingly
+and reconfigure. ("xlc" is the recommended compiler on z/OS.)])
+ ;;
+ xlc*)
+ dnl This enables C99, and on z/OS 1.11, the setenv() prototype.
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ dnl Use a compiler wrapper script to address some annoyances.
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$[]@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ AC_MSG_NOTICE([wrapping $CC with zos-cc to obtain standard behavior])
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ AC_MSG_WARN([unrecognized compiler environment])
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
])dnl
diff --git a/regcomp.c b/regcomp.c
index fd3ab84a..80dcb0ce 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -21,6 +21,10 @@
#include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
#ifdef _LIBC
# include <locale/weight.h>
#endif
@@ -211,10 +215,7 @@ const size_t __re_error_msgid_idx[] attribute_hidden =
/* Entry points for GNU code. */
-#ifdef ZOS_USS
-
-/* For ZOS USS we must define btowc */
-
+#ifndef HAVE_BTOWC
wchar_t
btowc (int c)
{
diff --git a/regex_internal.h b/regex_internal.h
index 4d0028ff..9e104d8d 100644
--- a/regex_internal.h
+++ b/regex_internal.h
@@ -41,11 +41,9 @@
#if defined HAVE_STDBOOL_H || defined _LIBC
# include <stdbool.h>
#endif /* HAVE_STDBOOL_H || _LIBC */
-#if !defined(ZOS_USS)
#if defined HAVE_STDINT_H || defined _LIBC
# include <stdint.h>
#endif /* HAVE_STDINT_H || _LIBC */
-#endif /* !ZOS_USS */
#if defined _LIBC
# include <bits/libc-lock.h>
#else
diff --git a/test/ChangeLog b/test/ChangeLog
index 8a227232..2199f56c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -12,6 +12,14 @@
* profile.ok: Updated after code change.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am: Generate the Maketests file without
+ reference to its directory, because putting it directly into
+ srcdir can be problematic (e.g. srcdir could be read-only).
+ (clean-local): Renamed from "clean", as Automake already defines
+ "clean" and warns us as much.
+
2015-08-25 Arnold D. Robbins <arnold@skeeve.com>
* mbstr1.ok: Updated after code change.
diff --git a/test/Makefile.am b/test/Makefile.am
index 27ccb76a..56fd5da9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2099,11 +2099,11 @@ muldimposix::
# Targets generated for other tests:
include Maketests
-$(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
+Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
files=`cd "$(srcdir)" && echo *.awk *.in`; \
- $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > "$(srcdir)"/Maketests
+ $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > $@
-clean:
+clean-local:
rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
mmap8k.ok profile1.ok
diff --git a/test/Makefile.in b/test/Makefile.in
index 787fba15..7963cfbb 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1498,7 +1498,9 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic mostlyclean-am
+clean: clean-am
+
+clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
@@ -1564,14 +1566,14 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
- ctags-am distclean distclean-generic distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.PHONY: all all-am check check-am clean clean-generic clean-local \
+ cscopelist-am ctags-am distclean distclean-generic distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am
@@ -3954,11 +3956,11 @@ time:
# Targets generated for other tests:
-$(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
+Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
files=`cd "$(srcdir)" && echo *.awk *.in`; \
- $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > "$(srcdir)"/Maketests
+ $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > $@
-clean:
+clean-local:
rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
mmap8k.ok profile1.ok