gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, feature/zOS, created. gawk-4.1.0-725-g00


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/zOS, created. gawk-4.1.0-725-g002790d
Date: Thu, 09 Jul 2015 15:53:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/zOS has been created
        at  002790d66b50284baf6ca9fd737118ffe60528a1 (commit)

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=002790d66b50284baf6ca9fd737118ffe60528a1

commit 002790d66b50284baf6ca9fd737118ffe60528a1
Author: Arnold D. Robbins <address@hidden>
Date:   Thu Jul 9 18:52:24 2015 +0300

    zOS change from Daniel Richard G.

diff --git a/Makefile.am b/Makefile.am
index c646fc3..342df29 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 183d71c..08f434c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
address@hidden@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/awk.h b/awk.h
index 1eb2688..2b82366 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,14 @@ 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 */
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SYS_SELECT_H */
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
@@ -1633,6 +1624,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
@@ -1645,16 +1641,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 fa88a50..5964c59 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 */
@@ -6138,6 +6142,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. */
 
@@ -7895,7 +7934,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 f311f29..9bb747e 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 */
@@ -3799,6 +3803,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. */
 
@@ -5556,7 +5595,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/Makefile.am b/awklib/Makefile.am
index 2e1adaf..6fc0f0a 100644
--- a/awklib/Makefile.am
+++ b/awklib/Makefile.am
@@ -64,22 +64,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 $@
+       cp $(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 $@
+       cp $(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 610b6ee..cbc1b95 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -440,6 +440,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=; \
@@ -730,22 +738,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 $@
+       cp $(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 $@
+       cp $(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 7d6b6a7..6d7791d 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 934ef34..caabf20 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 04d5e5f..76c3c75 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 0889374..43aae8d 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/config.guess b/config.guess
index f7eb141..6c32c86 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-03-04'
+timestamp='2014-11-04'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,27 +168,20 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-           /sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || \
-           echo unknown)`
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
-           earmv*)
-               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 
's,^e\(armv[0-9]\).*$,\1,'`
-               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 
's,^.*\(eb\)$,\1,p'`
-               machine=${arch}${endian}-unknown
-               ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
        # to ELF recently, or will in the future.
        case "${UNAME_MACHINE_ARCH}" in
-           arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
                        | grep -q __ELF__
@@ -204,13 +197,6 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                os=netbsd
                ;;
        esac
-       # Determine ABI tags.
-       case "${UNAME_MACHINE_ARCH}" in
-           earm*)
-               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-               ;;
-       esac
        # The OS release
        # Debian GNU/NetBSD machines have a different userland, and
        # thus, need a distinct triplet. However, they do not need
@@ -227,7 +213,7 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}${abi}"
+       echo "${machine}-${os}${release}"
        exit ;;
     *:Bitrig:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -947,9 +933,6 @@ EOF
     crisv32:Linux:*:*)
        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
-    e2k:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
     frv:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
diff --git a/config.sub b/config.sub
index 8f1229c..7ffe373 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-03-08'
+timestamp='2014-12-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ Report bugs and patches to <address@hidden>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | 
kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -259,8 +259,8 @@ case $basic_machine in
        | bfin \
        | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | e2k | epiphany \
-       | fido | fr30 | frv | ft32 \
+       | epiphany \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
        | i370 | i860 | i960 | ia64 \
@@ -381,7 +381,7 @@ case $basic_machine in
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
-       | e2k-* | elxsi-* \
+       | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@@ -518,9 +518,6 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-aros
                ;;
-        asmjs)
-               basic_machine=asmjs-unknown
-               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -1376,7 +1373,7 @@ case $os in
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | 
-solaris* \
              | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* | -cloudabi* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --git a/configh.in b/configh.in
index f7ec5c9..d3624c2 100644
--- a/configh.in
+++ b/configh.in
@@ -26,11 +26,11 @@
 /* Define to 1 if you have the `btowc' function. */
 #undef HAVE_BTOWC
 
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
    CoreFoundation framework. */
 #undef HAVE_CFLOCALECOPYCURRENT
 
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
    the CoreFoundation framework. */
 #undef HAVE_CFPREFERENCESCOPYAPPVALUE
 
@@ -108,7 +108,7 @@
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
-/* Define to 1 if the system has the type `long long int'. */
+/* Define to 1 if the system has the type 'long long int'. */
 #undef HAVE_LONG_LONG_INT
 
 /* Define to 1 if you have the `mbrlen' function. */
@@ -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 0aee8f3..5b94270 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.
 #
 # Report bugs to <address@hidden>.
 #
@@ -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'
+PACKAGE_STRING='GNU Awk 4.1.3-zOS'
 PACKAGE_BUGREPORT='address@hidden'
 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 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:";;
    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
 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, 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'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5863,15 +5865,30 @@ 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
+  CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600"
+  if test "x$GCC" != "xyes"
+  then
+                        if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' 
>/dev/null
+    then
+      as_fn_error $? "invalid-cc
+GNU Awk does not support the \"cc\" nor \"c89\" compiler frontends on z/OS.
+Please set CC to \"c99\" or one of the \"xlc\" frontends." "$LINENO" 5
+    fi
+        CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+                CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296"
+  fi
   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; }
 
@@ -6164,6 +6181,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 +8435,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`
@@ -8883,75 +8922,85 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if ${ac_cv_type_long_long_int+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long 
int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-  /* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;
+unsigned long long int ull = 18446744073709551615ULL;
+           typedef int a[(18446744073709551615ULL <= (unsigned long long int) 
-1
+                          ? 1 : -1)];
+          int i = 63;
 int
 main ()
 {
-/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));
+unsigned long long int ullmax = 18446744073709551615ull;
+           return (ull << 63 | ull >> 63 | ull << i | ull >> i
+                   | ullmax / ull | ullmax % ull);
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-                          if test "$cross_compiling" = yes; then :
+  ac_cv_type_unsigned_long_long_int=yes
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
   ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then 
:
+  :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <limits.h>
-               #ifndef LLONG_MAX
-               # define HALF \
-                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-               # define LLONG_MAX (HALF - 1 + HALF)
-               #endif
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
 int
 main ()
 {
 long long int n = 1;
-               int i;
-               for (i = 0; ; i++)
-                 {
-                   long long int m = n << i;
-                   if (m >> i != n)
-                     return 1;
-                   if (LLONG_MAX / 2 < m)
-                     break;
-                 }
-               return 0;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_type_long_long_int=yes
+
 else
   ac_cv_type_long_long_int=no
 fi
@@ -8959,11 +9008,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out 
conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-else
-  ac_cv_type_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+        fi
+      fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
 $as_echo "$ac_cv_type_long_long_int" >&6; }
@@ -10328,7 +10374,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 \
@@ -10394,10 +10440,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"
@@ -10492,6 +10534,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
@@ -11012,6 +11062,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 :
@@ -11505,6 +11583,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
@@ -11902,7 +11984,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, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11970,7 +12052,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
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 72f78f0..45bd06b 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, address@hidden, gawk)
+AC_INIT([GNU Awk], 4.1.3-zOS, address@hidden, 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 1f57a83..956c52a 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/dfa.h b/dfa.h
index 4060dfa..d14a222 100644
--- a/dfa.h
+++ b/dfa.h
@@ -18,7 +18,7 @@
 
 /* Written June, 1988 by Mike Haertel */
 
-#include <regex.h>
+#include "regex.h"
 #ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
 #else
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 86321bb..e94e0d0 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 30a371d..8515b9a 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.texi b/doc/gawk.texi
index 3769517..9f596ed 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -22305,11 +22305,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 +22315,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 +22638,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 +22647,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
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 7695d97..c087a42 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -21396,11 +21396,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 +21406,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 +21729,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 +21738,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
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 152e985..85f184c 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,12 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2015-05-06.11}
+\def\texinfoversion{2013-02-01.11}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
-% Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -97,9 +96,7 @@
 \let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
-\let\ptexsp=\sp
 \let\ptexstar=\*
-\let\ptexsup=\sup
 \let\ptext=\t
 \let\ptextop=\top
 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
@@ -284,9 +281,9 @@
   \toks6=\expandafter{\prevsectiondefs}%
   \toks8=\expandafter{\lastcolordefs}%
   \mark{%
-                   \the\toks0 \the\toks2  % 0: top marks (\last...)
-      \noexpand\or \the\toks4 \the\toks6  % 1: bottom marks (default, \prev...)
-    \noexpand\else \the\toks8             % 2: color marks
+                   \the\toks0 \the\toks2
+      \noexpand\or \the\toks4 \the\toks6
+    \noexpand\else \the\toks8
   }%
 }
 % \topmark doesn't work for the very first chapter (after the title
@@ -325,13 +322,10 @@
   %
   % Do this outside of the \shipout so @code etc. will be expanded in
   % the headline as they should be, not taken literally (outputting ''code).
-  \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars}
-  %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
-  \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
-  %
+  \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
-  \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
+  \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
   %
   {%
     % Have to do this stuff outside the \shipout because we want it to
@@ -1013,15 +1007,24 @@ where each line of input produces a line of output.}
 % paragraph.
 %
 \gdef\dosuppressfirstparagraphindent{%
-  \gdef\indent  {\restorefirstparagraphindent \indent}%
-  \gdef\noindent{\restorefirstparagraphindent \noindent}%
-  \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
+  \gdef\indent{%
+    \restorefirstparagraphindent
+    \indent
+  }%
+  \gdef\noindent{%
+    \restorefirstparagraphindent
+    \noindent
+  }%
+  \global\everypar = {%
+    \kern -\parindent
+    \restorefirstparagraphindent
+  }%
 }
-%
+
 \gdef\restorefirstparagraphindent{%
-  \global\let\indent = \ptexindent
-  \global\let\noindent = \ptexnoindent
-  \global\everypar = {}%
+  \global \let \indent = \ptexindent
+  \global \let \noindent = \ptexnoindent
+  \global \everypar = {}%
 }
 
 
@@ -1132,12 +1135,10 @@ output) for that.)}
 
 \ifpdf
   %
-  % Color manipulation macros using ideas from pdfcolor.tex,
+  % Color manipulation macros based on pdfcolor.tex,
   % except using rgb instead of cmyk; the latter is said to render as a
   % very dark gray on-screen and a very dark halftone in print, instead
-  % of actual black. The dark red here is dark enough to print on paper as
-  % nearly black, but still distinguishable for online viewing.  We use
-  % black by default, though.
+  % of actual black.
   \def\rgbDarkRed{0.50 0.09 0.12}
   \def\rgbBlack{0 0 0}
   %
@@ -1247,9 +1248,10 @@ output) for that.)}
   % used to mark target names; must be expandable.
   \def\pdfmkpgn#1{#1}
   %
-  % by default, use black for everything.
-  \def\urlcolor{\rgbBlack}
-  \def\linkcolor{\rgbBlack}
+  % by default, use a color that is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.
+  \def\urlcolor{\rgbDarkRed}
+  \def\linkcolor{\rgbDarkRed}
   \def\endlink{\setcolor{\maincolor}\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -2084,9 +2086,12 @@ end
  \endgroup
 }
 
+
 % In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families.  We don't
-% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
+% we have to define the \textfont of the standard families.  Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
 %
 \def\resetmathfonts{%
   \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
@@ -2100,8 +2105,8 @@ end
 % \tenSTYLE to set the current font.
 %
 % Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
+% and \lllsize (three sizes lower).  These relative commands are used in
+% the LaTeX logo and acronyms.
 %
 % This all needs generalizing, badly.
 %
@@ -2137,7 +2142,7 @@ end
   \let\tenttsl=\secttsl
   \def\curfontsize{sec}%
   \def\lsize{subsec}\def\lllsize{reduced}%
-  \resetmathfonts \setleading{17pt}}
+  \resetmathfonts \setleading{16pt}}
 \def\subsecfonts{%
   \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
   \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
@@ -2372,10 +2377,8 @@ end
   \ifx\next,%
   \else\ifx\next-%
   \else\ifx\next.%
-  \else\ifx\next\.%
-  \else\ifx\next\comma%
   \else\ptexslash
-  \fi\fi\fi\fi\fi
+  \fi\fi\fi
   \aftersmartic
 }
 
@@ -2472,14 +2475,14 @@ end
 }
 
 % We *must* turn on hyphenation at `-' and `_' in @code.
-% (But see \codedashfinish below.)
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
 %
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash. -- rms.
+% and arrange explicitly to hyphenate at a dash.
+%  -- rms.
 {
   \catcode`\-=\active \catcode`\_=\active
   \catcode`\'=\active \catcode`\`=\active
@@ -2496,35 +2499,14 @@ end
      \let-\normaldash
      \let_\realunder
     \fi
-    % Given -foo (with a single dash), we do not want to allow a break
-    % after the hyphen.
-    \global\let\codedashprev=\codedash
-    %
     \codex
   }
-  %
-  \gdef\codedash{\futurelet\next\codedashfinish}
-  \gdef\codedashfinish{%
-    \normaldash % always output the dash character itself.
-    % 
-    % Now, output a discretionary to allow a line break, unless
-    % (a) the next character is a -, or
-    % (b) the preceding character is a -.
-    % E.g., given --posix, we do not want to allow a break after either -.
-    % Given --foo-bar, we do want to allow a break between the - and the b.
-    \ifx\next\codedash \else
-      \ifx\codedashprev\codedash 
-      \else \discretionary{}{}{}\fi
-    \fi
-    % we need the space after the = for the case when \next itself is a
-    % space token; it would get swallowed otherwise.  As in @code{- a}.
-    \global\let\codedashprev= \next
-  }
 }
-\def\normaldash{-}
-%
+
 \def\codex #1{\tclose{#1}\endgroup}
 
+\def\normaldash{-}
+\def\codedash{-\discretionary{}{}{}}
 \def\codeunder{%
   % this is all so @address@hidden can work.  In math mode, _
   % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@@ -2566,21 +2548,37 @@ end
 \let\file=\code
 \let\option=\code
 
-% @uref (abbreviation for `urlref') aka @url takes an optional
-% (comma-separated) second argument specifying the text to display and
-% an optional third arg as text to display instead of (rather than in
-% addition to) the url itself.  First (mandatory) arg is the url.
-
-% TeX-only option to allow changing PDF output to show only the second
-% arg (if given), and not the url (which is then just the link target).
-\newif\ifurefurlonlylink
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself.  First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \code{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
 
-% The main macro is \urefbreak, which allows breaking at expected
-% places within the url.  (There used to be another version, which
-% didn't support automatic breaking.)
+% This \urefbreak definition is the active one.
 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
 \let\uref=\urefbreak
-%
 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
   \unsepspaces
@@ -2589,19 +2587,12 @@ end
   \ifdim\wd0 > 0pt
     \unhbox0 % third arg given, show only that
   \else
-    \setbox0 = \hbox{\ignorespaces #2}% look for second arg
+    \setbox0 = \hbox{\ignorespaces #2}%
     \ifdim\wd0 > 0pt
       \ifpdf
-        \ifurefurlonlylink
-          % PDF plus option to not display url, show just arg
-          \unhbox0             
-        \else
-          % PDF, normally display both arg and url for consistency,
-          % visibility, if the pdf is eventually used to print, etc.
-          \unhbox0\ (\urefcode{#1})%
-        \fi
+        \unhbox0             % PDF: 2nd arg given, show only it
       \else
-        \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
+        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
       \fi
     \else
       \urefcode{#1}% only url given, so show it
@@ -2641,10 +2632,8 @@ end
 % we put a little stretch before and after the breakable chars, to help
 % line breaking of long url's.  The unequal skips make look better in
 % cmtt at least, especially for dots.
-\def\urefprestretchamount{.13em}
-\def\urefpoststretchamount{.1em}
-\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
 %
 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
 \def\urefcodedot{\urefprestretch .\urefpoststretch}
@@ -2842,8 +2831,6 @@ end
   \let\v=\check
   \let\~=\tilde
   \let\dotaccent=\dot
-  % have to provide another name for sup operator
-  \let\mathopsup=\sup
   $\finishmath
 }
 \def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
@@ -2867,18 +2854,6 @@ end
   }
 }
 
-% for @sub and @sup, if in math mode, just do a normal sub/superscript.
-% If in text, use math to place as sub/superscript, but switch
-% into text mode, with smaller fonts.  This is a different font than the
-% one used for real math sub/superscripts (8pt vs. 7pt), but let's not
-% fix it (significant additions to font machinery) until someone notices.
-%
-\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
-\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}%
-%
-\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
-\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}%
-
 % ctrl is no longer a Texinfo command, but leave this definition for fun.
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
@@ -2893,15 +2868,6 @@ end
   \def\inlinefmtname{#1}%
   \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
 }
-% 
-% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
-% FMTNAME is tex, else ELSE-TEXT.
-\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
-\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
-  \def\inlinefmtname{#1}%
-  \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
-}
-%
 % For raw, must switch into @tex before parsing the argument, to avoid
 % setting catcodes prematurely.  Doing it this way means that, for
 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
@@ -2918,23 +2884,6 @@ end
   \endgroup % close group opened by \tex.
 }
 
-% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
-%
-\long\def\inlineifset#1{\doinlineifset #1,\finish}
-\long\def\doinlineifset#1,#2,\finish{%
-  \def\inlinevarname{#1}%
-  \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
-  \else\ignorespaces#2\fi
-}
-
-% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
-%
-\long\def\inlineifclear#1{\doinlineifclear #1,\finish}
-\long\def\doinlineifclear#1,#2,\finish{%
-  \def\inlinevarname{#1}%
-  \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
-}
-
 
 \message{glyphs,}
 % and logos.
@@ -3022,16 +2971,11 @@ end
   \TeX
 }
 
-% Some math mode symbols.  Define \ensuremath to switch into math mode
-% unless we are already there.  Expansion tricks may not be needed here,
-% but safer, and can't hurt.
-\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
-\def\ensuredmath#1{$\relax#1$}
-%
-\def\bullet{\ensuremath\ptexbullet}
-\def\geq{\ensuremath\ge}
-\def\leq{\ensuremath\le}
-\def\minus{\ensuremath-}
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
 
 % @dots{} outputs an ellipsis using the current font.
 % We do .5em per period so that it has the same spacing in the cm
@@ -3695,7 +3639,7 @@ end
   \parskip=\smallskipamount
   \ifdim\parskip=0pt \parskip=2pt \fi
   %
-  % Try typesetting the item mark so that if the document erroneously says
+  % Try typesetting the item mark that if the document erroneously says
   % something like @itemize @samp (intending @table), there's an error
   % right away at the @itemize.  It's not the best error message in the
   % world, but it's better than leaving it to the @item.  This means if
@@ -3945,23 +3889,19 @@ end
 }
 
 % multitable-only commands.
-% 
-% @headitem starts a heading row, which we typeset in bold.  Assignments
-% have to be global since we are inside the implicit group of an
-% alignment entry.  \everycr below resets \everytab so we don't have to
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry.  \everycr resets \everytab so we don't have to
 % undo it ourselves.
 \def\headitemfont{\b}% for people to use in the template row; not changeable
 \def\headitem{%
   \checkenv\multitable
   \crcr
-  \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
   \global\everytab={\bf}% can't use \headitemfont since the parsing differs
   \the\everytab % for the first item
 }%
 %
-% default for tables with no headings.
-\let\headitemcrhook=\relax
-%
 % A \tab used to include \hskip1sp.  But then the space in a template
 % line is not enough.  That is bad.  So let's go back to just `&' until
 % we again encounter the problem the 1sp was intended to solve.
@@ -3992,15 +3932,15 @@ end
   %
   \everycr = {%
     \noalign{%
-      \global\everytab={}% Reset from possible headitem.
+      \global\everytab={}%
       \global\colcount=0 % Reset the column counter.
-      %
-      % Check for saved footnotes, etc.:
+      % Check for saved footnotes, etc.
       \checkinserts
-      %
-      % Perhaps a \nobreak, then reset:
-      \headitemcrhook
-      \global\let\headitemcrhook=\relax
+      % Keeps underfull box messages off when table breaks over pages.
+      %\filbreak
+       % Maybe so, but it also creates really weird page breaks when the
+       % table breaks over pages. Wouldn't \vfil be better?  Wait until the
+       % problem manifests itself, so it can be fixed for real --karl.
     }%
   }%
   %
@@ -4239,7 +4179,7 @@ end
 \def\value{\begingroup\makevalueexpandable\valuexxx}
 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
 {
-  \catcode`\-=\active \catcode`\_=\active
+  \catcode`\- = \active \catcode`\_ = \active
   %
   \gdef\makevalueexpandable{%
     \let\value = \expandablevalue
@@ -4259,12 +4199,7 @@ end
 % variable's value contains other Texinfo commands, it's almost certain
 % it will fail (although perhaps we could fix that with sufficient work
 % to do a one-level expansion on the result, instead of complete).
-% 
-% Unfortunately, this has the consequence that when _ is in the *value*
-% of an @set, it does not print properly in the roman fonts (get the cmr
-% dot accent at position 126 instead).  No fix comes to mind, and it's
-% been this way since 2003 or earlier, so just ignore it.
-% 
+%
 \def\expandablevalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
     {[No value for ``#1'']}%
@@ -4276,9 +4211,8 @@ end
 
 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
 % with @set.
-% 
-% To get the special treatment we need for address@hidden ifset,' we call
-% \makecond and then redefine.
+%
+% To get special treatment of address@hidden ifset,' call \makeond and the 
redefine.
 %
 \makecond{ifset}
 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@@ -4442,7 +4376,7 @@ end
   % complicated, when \tex is in effect and \{ is a \delimiter again.
   % We can't use \lbracecmd and \rbracecmd because texindex assumes
   % braces and backslashes are used only as delimiters.  Perhaps we
-  % should use @lbracechar and @rbracechar?
+  % should define @lbrace and @rbrace commands a la @comma.
   \def\{{{\tt\char123}}%
   \def\}{{\tt\char125}}%
   %
@@ -4463,7 +4397,8 @@ end
   % @end macro
   % ...
   % @funindex commtest
-  % This is not enough to reproduce the bug, but it gives the flavor.
+  %
+  % The above is not enough to reproduce the bug, but it gives the flavor.
   %
   % Sample whatsit resulting:
   % address@hidden@folio address@hidden address@hidden }}}
@@ -4494,6 +4429,7 @@ end
 % Called from \indexdummies and \atdummies.
 %
 \def\commondummies{%
+  %
   % \definedummyword defines \#1 as \string\#1\space, thus effectively
   % preventing its expansion.  This is used only for control words,
   % not control letters, because the \space would be incorrect for
@@ -4570,7 +4506,6 @@ end
   \definedummyword\guilsinglright
   \definedummyword\lbracechar
   \definedummyword\leq
-  \definedummyword\mathopsup
   \definedummyword\minus
   \definedummyword\ogonek
   \definedummyword\pounds
@@ -4584,8 +4519,6 @@ end
   \definedummyword\quotesinglbase
   \definedummyword\rbracechar
   \definedummyword\result
-  \definedummyword\sub
-  \definedummyword\sup
   \definedummyword\textdegree
   %
   % We want to disable all macros so that they are not expanded by \write.
@@ -4660,28 +4593,14 @@ end
   \definedummyword\samp
   \definedummyword\strong
   \definedummyword\tie
-  \definedummyword\U
   \definedummyword\uref
   \definedummyword\url
   \definedummyword\var
   \definedummyword\verb
   \definedummyword\w
   \definedummyword\xref
-  %
-  % Consider:
-  %   @macro mkind{arg1,arg2}
-  %   @cindex \arg2\
-  %   @end macro
-  %   @mkind{foo, bar}
-  % The space after the comma will end up in the temporary definition
-  % that we make for arg2 (see \parsemargdef ff.).  We want all this to be
-  % expanded for the sake of the index, so we end up just seeing "bar".
-  \let\xeatspaces = \eatspaces
 }
 
-% For testing: output @{ and @} in index sort strings as \{ and \}.
-\newif\ifusebracesinindexes
-
 % \indexnofonts is used when outputting the strings to sort the index
 % by, and when constructing control sequence names.  It eliminates all
 % control sequences and just writes whatever the best ASCII sort string
@@ -4710,16 +4629,11 @@ end
   % Unfortunately, texindex is not prepared to handle braces in the
   % content at all.  So for index sorting, we map @{ and @} to strings
   % starting with |, since that ASCII character is between ASCII { and }.
-  \ifusebracesinindexes
-    \def\lbracechar{\lbracecmd}%
-    \def\rbracechar{\rbracecmd}%
-  \else
-    \def\lbracechar{|a}%
-    \def\rbracechar{|b}%
-  \fi
-  \let\{=\lbracechar
-  \let\}=\rbracechar
+  \def\{{|a}%
+  \def\lbracechar{|a}%
   %
+  \def\}{|b}%
+  \def\rbracechar{|b}%
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -5752,16 +5666,13 @@ end
 %
 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
 % Yappendix, Yomitfromtoc), #3 the chapter number.
-% Not used for @heading series.
 %
 % To test against our argument.
 \def\Ynothingkeyword{Ynothing}
-\def\Yappendixkeyword{Yappendix}
 \def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
 %
 \def\chapmacro#1#2#3{%
-  \checkenv{}% chapters, etc., should not start inside an environment.
-  %
   % Insert the first mark before the heading break (see notes for \domark).
   \let\prevchapterdefs=\lastchapterdefs
   \let\prevsectiondefs=\lastsectiondefs
@@ -5814,7 +5725,6 @@ end
   %
   {%
     \chapfonts \rmisbold
-    \let\footnote=\errfootnoteheading % give better error message
     %
     % Have to define \lastsection before calling \donoderef, because the
     % xref code eventually uses it.  On the other hand, it has to be called
@@ -5908,29 +5818,22 @@ end
 
 % Print any size, any type, section title.
 %
-% #1 is the text of the title,
-% #2 is the section level (sec/subsec/subsubsec),
-% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
-% #4 is the section number.
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
 %
 \def\seckeyword{sec}
 %
 \def\sectionheading#1#2#3#4{%
   {%
-    \def\sectionlevel{#2}%
-    \def\temptype{#3}%
-    %
-    % It is ok for the @heading series commands to appear inside an
-    % environment (it's been historically allowed, though the logic is
-    % dubious), but not the others.
-    \ifx\temptype\Yomitfromtockeyword\else
-      \checkenv{}% address@hidden should not be in an environment.
-    \fi
-    \let\footnote=\errfootnoteheading
+    \checkenv{}% should not be in an environment.
     %
     % Switch to the right set of fonts.
     \csname #2fonts\endcsname \rmisbold
     %
+    \def\sectionlevel{#2}%
+    \def\temptype{#3}%
+    %
     % Insert first mark before the heading break (see notes for \domark).
     \let\prevsectiondefs=\lastsectiondefs
     \ifx\temptype\Ynothingkeyword
@@ -5982,7 +5885,7 @@ end
     %
     % Now the second mark, after the heading break.  No break points
     % between here and the heading.
-    \global\let\prevsectiondefs=\lastsectiondefs
+    \let\prevsectiondefs=\lastsectiondefs
     \domark
     %
     % Only insert the space after the number if we have a section number.
@@ -6349,15 +6252,14 @@ end
   \catcode `\|=\other
   \catcode `\<=\other
   \catcode `\>=\other
-  \catcode `\`=\other
-  \catcode `\'=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
   \escapechar=`\\
   %
   % ' is active in math mode (mathcode"8000).  So reset it, and all our
   % other math active characters (just in case), to plain's definitions.
   \mathactive
   %
-  % Inverse of the list at the beginning of the file.
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6373,11 +6275,9 @@ end
   \let\+=\tabalign
   \let\}=\ptexrbrace
   \let\/=\ptexslash
-  \let\sp=\ptexsp
   \let\*=\ptexstar
-  %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
   \let\t=\ptext
-  \expandafter \let\csname top\endcsname=\ptextop  % we've made it outer
+  \expandafter \let\csname top\endcsname=\ptextop  % outer
   \let\frenchspacing=\plainfrenchspacing
   %
   \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@@ -6461,6 +6361,8 @@ end
                                % side, and for 6pt waste from
                                % each corner char, and rule thickness
   \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+  % Flag to tell @lisp, etc., not to narrow margin.
+  \let\nonarrowing = t%
   %
   % If this cartouche directly follows a sectioning command, we need the
   % \parskip glue (backspaced over by default) or the cartouche can
@@ -6500,7 +6402,7 @@ end
 \newdimen\nonfillparindent
 \def\nonfillstart{%
   \aboveenvbreak
-  \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
+  \hfuzz = 12pt % Don't be fussy
   \sepspaces % Make spaces be word-separators rather than space tokens.
   \let\par = \lisppar % don't ignore blank lines
   \obeylines % each line of input is a line of output
@@ -6627,13 +6529,9 @@ end
 
 
 % @raggedright does more-or-less normal line breaking but no right
-% justification.  From plain.tex.  Don't stretch around special
-% characters in urls in this environment, since the stretch at the right
-% should be enough.
+% justification.  From plain.tex.
 \envdef\raggedright{%
-  \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
-  \def\urefprestretchamount{0pt}%
-  \def\urefpoststretchamount{0pt}%
+  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
 }
 \let\Eraggedright\par
 
@@ -7441,6 +7339,7 @@ end
 %
 % \anythingelse will almost certainly be an error of some kind.
 
+
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
@@ -7525,7 +7424,7 @@ end
 
 % Parse the optional {params} list.  Set up \paramno and \paramlist
 % so \defmacro knows what to do.  Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument is to be expanded.  If
+% in the params list to some hook where the argument si to be expanded.  If
 % there are less than 10 arguments that hook is to be replaced by ##N where N
 % is the position in that list, that is to say the macro arguments are to be
 % defined `a la TeX in the macro body.  
@@ -7549,7 +7448,8 @@ end
 % the catcode regime underwhich the body was input).
 %
 % If you compile with TeX (not eTeX), and you have macros with 10 or more
-% arguments, no macro can have more than 256 arguments (else error).
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
 \def\parsemargdef#1;{%
   \paramno=0\def\paramlist{}%
   \let\hash\relax
@@ -8343,7 +8243,14 @@ end
   \catcode`\\=\other
   %
   % Make the characters 128-255 be printing characters.
-  {\setnonasciicharscatcodenonglobal\other}%
+  {%
+    \count1=128
+    \def\loop{%
+      \catcode\count1=\other
+      \advance\count1 by 1
+      \ifnum \count1<256 \loop \fi
+    }%
+  }%
   %
   % @ is our escape character in .aux files, and we need braces.
   \catcode`\{=1
@@ -8377,6 +8284,8 @@ end
 %
 % Auto-number footnotes.  Otherwise like plain.
 \gdef\footnote{%
+  \let\indent=\ptexindent
+  \let\noindent=\ptexnoindent
   \global\advance\footnoteno by address@hidden
   \edef\thisfootno{$^{\the\footnoteno}$}%
   %
@@ -8400,11 +8309,6 @@ end
 %
 \gdef\dofootnote{%
   \insert\footins\bgroup
-  %
-  % Nested footnotes are not supported in TeX, that would take a lot
-  % more work.  (\startsavinginserts does not suffice.)
-  \let\footnote=\errfootnotenest
-  %
   % We want to typeset this text as a normal paragraph, even if the
   % footnote reference occurs in (for example) a display environment.
   % So reset some parameters.
@@ -8442,24 +8346,13 @@ end
 }
 }%end \catcode address@hidden
 
-\def\errfootnotenest{%
-  \errhelp=\EMsimple
-  \errmessage{Nested footnotes not supported in texinfo.tex,
-    even though they work in makeinfo; sorry}
-}
-
-\def\errfootnoteheading{%
-  \errhelp=\EMsimple
-  \errmessage{Footnotes in chapters, sections, etc., are not supported}
-}
-
 % In case a @footnote appears in a vbox, save the footnote text and create
 % the real \insert just after the vbox finished.  Otherwise, the insertion
 % would be lost.
 % Similarly, if a @footnote appears inside an alignment, save the footnote
 % text to a box and make the \insert when a row of the table is finished.
 % And the same can be done for other insert classes.  --kasal, 16nov03.
-%
+
 % Replace the \insert primitive by a cheating macro.
 % Deeper inside, just make sure that the saved insertions are not spilled
 % out prematurely.
@@ -8876,20 +8769,20 @@ end
 {
   \catcode`\_ = \active
   \globaldefs=1
-\parseargdef\documentlanguage{%
+\parseargdef\documentlanguage{\begingroup
+  \let_=\normalunderscore  % normal _ character for filenames
   \tex % read txi-??.tex file in plain TeX.
     % Read the file by the name they passed if it exists.
-    \let_ = \normalunderscore  % normal _ character for filename test
     \openin 1 txi-#1.tex
     \ifeof 1
-      \documentlanguagetrywithoutunderscore #1_\finish
+      \documentlanguagetrywithoutunderscore{#1_\finish}%
     \else
       \globaldefs = 1  % everything in the txi-LL files needs to persist
       \input txi-#1.tex
     \fi
     \closein 1
   \endgroup % end raw TeX
-}
+\endgroup}
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
@@ -8954,7 +8847,6 @@ directory should work if nowhere else does.}
       \catcode\count255=#1\relax
       \advance\count255 by 1
    \repeat
-
 }
 
 % @documentencoding sets the definition of non-ASCII characters
@@ -8989,12 +8881,10 @@ directory should work if nowhere else does.}
   %
   \else \ifx \declaredencoding \utfeight
      \setnonasciicharscatcode\active
-     % since we already invoked \utfeightchardefs at the top level
-     % (below), do not re-invoke it, then our check for duplicated
-     % definitions triggers.  Making non-ascii chars active is enough.
+     \utfeightchardefs
   %
   \else
-    \message{Ignoring unknown document encoding: #1.}%
+    \message{Unknown document encoding #1, ignoring.}%
   %
   \fi % utfeight
   \fi % latnine
@@ -9003,11 +8893,10 @@ directory should work if nowhere else does.}
   \fi % ascii
 }
 
-% emacs-page
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
 %
-\def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
+\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
 
 % Take account of \c (plain) vs. \, (Texinfo) difference.
 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
@@ -9043,10 +8932,12 @@ directory should work if nowhere else does.}
   \gdef^^b4{\'{}}
   \gdef^^b5{$\mu$}
   \gdef^^b6{\P}
-  \gdef^^b7{\ensuremath\cdot}
+  %
+  \gdef^^b7{$^.$}
   \gdef^^b8{\cedilla\ }
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
+  %
   \gdef^^bb{\guillemetright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
@@ -9301,18 +9192,6 @@ directory should work if nowhere else does.}
   \UTFviiiLoop
 \endgroup
 
-\def\globallet{\global\let} % save some \expandafter's below
-
-% @U{xxxx} to produce U+xxxx, if we support it.
-\def\U#1{%
-  \expandafter\ifx\csname uni:#1\endcsname \relax
-    \errhelp = \EMsimple       
-    \errmessage{Unicode character U+#1 not supported, sorry}%
-  \else
-    \csname uni:#1\endcsname
-  \fi
-}
-
 \begingroup
   \catcode`\"=12
   \catcode`\<=12
@@ -9321,6 +9200,7 @@ directory should work if nowhere else does.}
   \catcode`\;=12
   \catcode`\!=12
   \catcode`\~=13
+
   \gdef\DeclareUnicodeCharacter#1#2{%
     \countUTFz = "#1\relax
     %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
@@ -9335,13 +9215,6 @@ directory should work if nowhere else does.}
       \expandafter\expandafter\expandafter\expandafter
        \expandafter\expandafter\expandafter
        \gdef\UTFviiiTmp{#2}%
-      % 
-      \expandafter\ifx\csname uni:#1\endcsname \relax \else
-       \errmessage{Internal error, already defined: #1}%
-      \fi
-      %
-      % define an additional control sequence for this code point.
-      \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
     \endgroup}
 
   \gdef\parseXMLCharref{%
@@ -9379,49 +9252,23 @@ directory should work if nowhere else does.}
     \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
 \endgroup
 
-% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
-% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
-% U+0080..U+00FF = 
https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
-% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
-% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
-% 
-% Many of our renditions are less than wonderful, and all the missing
-% characters are available somewhere.  Loading the necessary fonts
-% awaits user request.  We can't truly support Unicode without
-% reimplementing everything that's been done in LaTeX for many years,
-% plus probably using luatex or xetex, and who knows what else.
-% We won't be doing that here in this simple file.  But we can try to at
-% least make most of the characters not bomb out.
-%
 \def\utfeightchardefs{%
   \DeclareUnicodeCharacter{00A0}{\tie}
   \DeclareUnicodeCharacter{00A1}{\exclamdown}
   \DeclareUnicodeCharacter{00A3}{\pounds}
-  \DeclareUnicodeCharacter{00A7}{\S}
   \DeclareUnicodeCharacter{00A8}{\"{ }}
   \DeclareUnicodeCharacter{00A9}{\copyright}
   \DeclareUnicodeCharacter{00AA}{\ordf}
   \DeclareUnicodeCharacter{00AB}{\guillemetleft}
-  \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}
   \DeclareUnicodeCharacter{00AD}{\-}
   \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
   \DeclareUnicodeCharacter{00AF}{\={ }}
 
   \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
-  \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}
-  \DeclareUnicodeCharacter{00B2}{$^2$}
-  \DeclareUnicodeCharacter{00B3}{$^3$}
   \DeclareUnicodeCharacter{00B4}{\'{ }}
-  \DeclareUnicodeCharacter{00B5}{$\mu$}
-  \DeclareUnicodeCharacter{00B6}{\P}
-  \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}
   \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
-  \DeclareUnicodeCharacter{00B9}{$^1$}
   \DeclareUnicodeCharacter{00BA}{\ordm}
   \DeclareUnicodeCharacter{00BB}{\guillemetright}
-  \DeclareUnicodeCharacter{00BC}{$1\over4$}
-  \DeclareUnicodeCharacter{00BD}{$1\over2$}
-  \DeclareUnicodeCharacter{00BE}{$3\over4$}
   \DeclareUnicodeCharacter{00BF}{\questiondown}
 
   \DeclareUnicodeCharacter{00C0}{\`A}
@@ -9448,7 +9295,6 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00D4}{\^O}
   \DeclareUnicodeCharacter{00D5}{\~O}
   \DeclareUnicodeCharacter{00D6}{\"O}
-  \DeclareUnicodeCharacter{00D7}{\ensuremath\times}
   \DeclareUnicodeCharacter{00D8}{\O}
   \DeclareUnicodeCharacter{00D9}{\`U}
   \DeclareUnicodeCharacter{00DA}{\'U}
@@ -9482,7 +9328,6 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00F4}{\^o}
   \DeclareUnicodeCharacter{00F5}{\~o}
   \DeclareUnicodeCharacter{00F6}{\"o}
-  \DeclareUnicodeCharacter{00F7}{\ensuremath\div}
   \DeclareUnicodeCharacter{00F8}{\o}
   \DeclareUnicodeCharacter{00F9}{\`u}
   \DeclareUnicodeCharacter{00FA}{\'u}
@@ -9502,23 +9347,20 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{0107}{\'c}
   \DeclareUnicodeCharacter{0108}{\^C}
   \DeclareUnicodeCharacter{0109}{\^c}
+  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
   \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
   \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
   \DeclareUnicodeCharacter{010C}{\v{C}}
   \DeclareUnicodeCharacter{010D}{\v{c}}
   \DeclareUnicodeCharacter{010E}{\v{D}}
-  \DeclareUnicodeCharacter{010F}{d'}
 
-  \DeclareUnicodeCharacter{0110}{\DH}
-  \DeclareUnicodeCharacter{0111}{\dh}
   \DeclareUnicodeCharacter{0112}{\=E}
   \DeclareUnicodeCharacter{0113}{\=e}
   \DeclareUnicodeCharacter{0114}{\u{E}}
   \DeclareUnicodeCharacter{0115}{\u{e}}
   \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
   \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
-  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
-  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
   \DeclareUnicodeCharacter{011A}{\v{E}}
   \DeclareUnicodeCharacter{011B}{\v{e}}
   \DeclareUnicodeCharacter{011C}{\^G}
@@ -9528,20 +9370,14 @@ directory should work if nowhere else does.}
 
   \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
   \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
-  \DeclareUnicodeCharacter{0122}{\cedilla{G}}
-  \DeclareUnicodeCharacter{0123}{\cedilla{g}}
   \DeclareUnicodeCharacter{0124}{\^H}
   \DeclareUnicodeCharacter{0125}{\^h}
-  \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}
-  \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}
   \DeclareUnicodeCharacter{0128}{\~I}
   \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
   \DeclareUnicodeCharacter{012A}{\=I}
   \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
   \DeclareUnicodeCharacter{012C}{\u{I}}
   \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
-  \DeclareUnicodeCharacter{012E}{\ogonek{I}}
-  \DeclareUnicodeCharacter{012F}{\ogonek{i}}
 
   \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
   \DeclareUnicodeCharacter{0131}{\dotless{i}}
@@ -9549,29 +9385,15 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{0133}{ij}
   \DeclareUnicodeCharacter{0134}{\^J}
   \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
-  \DeclareUnicodeCharacter{0136}{\cedilla{K}}
-  \DeclareUnicodeCharacter{0137}{\cedilla{k}}
-  \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}  
   \DeclareUnicodeCharacter{0139}{\'L}
   \DeclareUnicodeCharacter{013A}{\'l}
-  \DeclareUnicodeCharacter{013B}{\cedilla{L}}
-  \DeclareUnicodeCharacter{013C}{\cedilla{l}}
-  \DeclareUnicodeCharacter{013D}{L'}% should kern
-  \DeclareUnicodeCharacter{013E}{l'}% should kern
-  \DeclareUnicodeCharacter{013F}{L\U{00B7}}
 
-  \DeclareUnicodeCharacter{0140}{l\U{00B7}}
   \DeclareUnicodeCharacter{0141}{\L}
   \DeclareUnicodeCharacter{0142}{\l}
   \DeclareUnicodeCharacter{0143}{\'N}
   \DeclareUnicodeCharacter{0144}{\'n}
-  \DeclareUnicodeCharacter{0145}{\cedilla{N}}
-  \DeclareUnicodeCharacter{0146}{\cedilla{n}}
   \DeclareUnicodeCharacter{0147}{\v{N}}
   \DeclareUnicodeCharacter{0148}{\v{n}}
-  \DeclareUnicodeCharacter{0149}{'n}
-  \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}
-  \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}
   \DeclareUnicodeCharacter{014C}{\=O}
   \DeclareUnicodeCharacter{014D}{\=o}
   \DeclareUnicodeCharacter{014E}{\u{O}}
@@ -9583,8 +9405,6 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{0153}{\oe}
   \DeclareUnicodeCharacter{0154}{\'R}
   \DeclareUnicodeCharacter{0155}{\'r}
-  \DeclareUnicodeCharacter{0156}{\cedilla{R}}
-  \DeclareUnicodeCharacter{0157}{\cedilla{r}}
   \DeclareUnicodeCharacter{0158}{\v{R}}
   \DeclareUnicodeCharacter{0159}{\v{r}}
   \DeclareUnicodeCharacter{015A}{\'S}
@@ -9596,12 +9416,10 @@ directory should work if nowhere else does.}
 
   \DeclareUnicodeCharacter{0160}{\v{S}}
   \DeclareUnicodeCharacter{0161}{\v{s}}
-  \DeclareUnicodeCharacter{0162}{\cedilla{T}}
-  \DeclareUnicodeCharacter{0163}{\cedilla{t}}
+  \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+  \DeclareUnicodeCharacter{0163}{\cedilla{T}}
   \DeclareUnicodeCharacter{0164}{\v{T}}
-  \DeclareUnicodeCharacter{0165}{\v{t}}
-  \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}
-  \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}
+
   \DeclareUnicodeCharacter{0168}{\~U}
   \DeclareUnicodeCharacter{0169}{\~u}
   \DeclareUnicodeCharacter{016A}{\=U}
@@ -9613,8 +9431,6 @@ directory should work if nowhere else does.}
 
   \DeclareUnicodeCharacter{0170}{\H{U}}
   \DeclareUnicodeCharacter{0171}{\H{u}}
-  \DeclareUnicodeCharacter{0172}{\ogonek{U}}
-  \DeclareUnicodeCharacter{0173}{\ogonek{u}}
   \DeclareUnicodeCharacter{0174}{\^W}
   \DeclareUnicodeCharacter{0175}{\^w}
   \DeclareUnicodeCharacter{0176}{\^Y}
@@ -9626,7 +9442,6 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
   \DeclareUnicodeCharacter{017D}{\v{Z}}
   \DeclareUnicodeCharacter{017E}{\v{z}}
-  \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}
 
   \DeclareUnicodeCharacter{01C4}{D\v{Z}}
   \DeclareUnicodeCharacter{01C5}{D\v{z}}
@@ -9818,8 +9633,6 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{201C}{\quotedblleft}
   \DeclareUnicodeCharacter{201D}{\quotedblright}
   \DeclareUnicodeCharacter{201E}{\quotedblbase}
-  \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}
-  \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}
   \DeclareUnicodeCharacter{2022}{\bullet}
   \DeclareUnicodeCharacter{2026}{\dots}
   \DeclareUnicodeCharacter{2039}{\guilsinglleft}
@@ -9831,66 +9644,15 @@ directory should work if nowhere else does.}
 
   \DeclareUnicodeCharacter{2212}{\minus}
   \DeclareUnicodeCharacter{2217}{\point}
-  \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}
   \DeclareUnicodeCharacter{2261}{\equiv}
 }% end of \utfeightchardefs
 
+
 % US-ASCII character definitions.
 \def\asciichardefs{% nothing need be done
    \relax
 }
 
-% Latin1 (ISO-8859-1) character definitions.
-\def\nonasciistringdefs{%
-  \setnonasciicharscatcode\active
-  \def\defstringchar##1{\def##1{\string##1}}%
-  %
-  \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83%
-  \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87%
-  \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b%
-  \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f%
-  %
-  \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93%
-  \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97%
-  \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b%
-  \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f%
-  %
-  \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3%
-  \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7%
-  \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab%
-  \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af%
-  %
-  \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3%
-  \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7%
-  \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb%
-  \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf%
-  %
-  \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3%
-  \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7%
-  \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb%
-  \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf%
-  %
-  \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3%
-  \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7%
-  \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db%
-  \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df%
-  %
-  \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3%
-  \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7%
-  \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb%
-  \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef%
-  %
-  \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3%
-  \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7%
-  \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb%
-  \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff%
-}
-
-
-% define all the unicode characters we know about, for the sake of @U.
-\utfeightchardefs
-
-
 % Make non-ASCII characters printable again for compatibility with
 % existing Texinfo documents that may use them, even without declaring a
 % document encoding.
@@ -10158,9 +9920,11 @@ directory should work if nowhere else does.}
 \catcode`\"=\active
 \def\activedoublequote{{\tt\char34}}
 \let"=\activedoublequote
-\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
+\catcode`\~=\active
+\def~{{\tt\char126}}
 \chardef\hat=`\^
-\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat
+\catcode`\^=\active
+\def^{{\tt \hat}}
 
 \catcode`\_=\active
 \def_{\ifusingtt\normalunderscore\_}
@@ -10170,26 +9934,16 @@ directory should work if nowhere else does.}
 
 \catcode`\|=\active
 \def|{{\tt\char124}}
-
 \chardef \less=`\<
-\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
+\catcode`\<=\active
+\def<{{\tt \less}}
 \chardef \gtr=`\>
-\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
-\catcode`\+=\active \def+{{\tt \char 43}}
-\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
-
-% used for headline/footline in the output routine, in case the page
-% breaks in the middle of an @tex block.
-\def\texinfochars{%
-  \let< = \activeless
-  \let> = \activegtr
-  \let~ = \activetilde 
-  \let^ = \activehat
-  \markupsetuplqdefault \markupsetuprqdefault 
-  \let\b = \strong
-  \let\i = \smartitalic
-  % in principle, all other definitions in \tex have to be undone too.
-}
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
 
 % If a .fmt file is being used, characters that might appear in a file
 % name cannot be active until we have parsed the command line.
@@ -10244,7 +9998,6 @@ directory should work if nowhere else does.}
 %
 address@hidden = @active
  @address@hidden
-   @nonasciistringdefs
    @address@hidden
    @let"address@hidden
    @address@hidden %$ font-lock fix
@@ -10313,7 +10066,7 @@ directory should work if nowhere else does.}
 
 @c Local variables:
 @c eval: (add-hook 'write-file-hooks 'time-stamp)
address@hidden page-delimiter: "^\\\\message\\|emacs-page"
address@hidden page-delimiter: "^\\\\message"
 @c time-stamp-start: "def\\\\texinfoversion{"
 @c time-stamp-format: "%:y-%02m-%02d.%02H"
 @c time-stamp-end: "}"
diff --git a/eval.c b/eval.c
index dfb99a4..05924cd 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/Makefile.am b/extension/Makefile.am
index 92f5637..ff9e907 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 4c14836..868781c 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 d2e755e..5665d48 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/build-aux/config.guess b/extension/build-aux/config.guess
index dbfb978..6c32c86 100755
--- a/extension/build-aux/config.guess
+++ b/extension/build-aux/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-01-01'
+timestamp='2014-11-04'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub
index 6d2e94c..7ffe373 100755
--- a/extension/build-aux/config.sub
+++ b/extension/build-aux/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2015-01-01'
+timestamp='2014-12-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ Report bugs and patches to <address@hidden>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -260,7 +260,7 @@ case $basic_machine in
        | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
        | epiphany \
-       | fido | fr30 | frv | ft32 \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
        | i370 | i860 | i960 | ia64 \
diff --git a/extension/configure b/extension/configure
index 3a89c9a..33c60ad 100755
--- a/extension/configure
+++ b/extension/configure
@@ -3660,6 +3660,36 @@ $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
+  CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600"
+  if test "x$GCC" != "xyes"
+  then
+                        if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' 
>/dev/null
+    then
+      as_fn_error $? "invalid-cc
+GNU Awk does not support the \"cc\" nor \"c89\" compiler frontends on z/OS.
+Please set CC to \"c99\" or one of the \"xlc\" frontends." "$LINENO" 5
+    fi
+        CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+                CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296"
+  fi
+  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; }
+
+
 INSTALL="$ac_aux_dir/install-sh -c"
 export INSTALL
 
diff --git a/extension/configure.ac b/extension/configure.ac
index f99742b..45e4fb6 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 f1ca26f..447b175 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 7bcabcb..4578b86 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 aa05a0d..155cc47 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/testdfa.c b/helpers/testdfa.c
index 25a229a..1e144bd 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 2344c2a..8ebce69 100644
--- a/io.c
+++ b/io.c
@@ -1774,7 +1774,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 +2000,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/arch.m4 b/m4/arch.m4
index 2402435..e1583a5 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -61,14 +61,34 @@ 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
+  CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600"
+  if test "x$GCC" != "xyes"
+  then
+    dnl If the user is using the "cc" or "c89" compiler frontends, then
+    dnl give up. These do not accept standard XL C -qfoobar options, and
+    dnl instead use a devil's-spawn option syntax involving parentheses.
+    dnl (For example, the below CFLAGS addendum becomes
+    dnl "-W c,langlvl(stdc99,libext)". Good luck quoting that.)
+    if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' >/dev/null
+    then
+      AC_MSG_ERROR([invalid-cc
+GNU Awk does not support the "cc" nor "c89" compiler frontends on z/OS.
+Please set CC to "c99" or one of the "xlc" frontends.])
+    fi
+    dnl This enables C99, and on z/OS 1.11, the setenv() prototype.
+    CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+    dnl This is needed so that xlc considers a missing header file to be an
+    dnl error and not a warning. (Yes, the latter is in fact the default
+    dnl behavior on z/OS.)
+    CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296"
+  fi
   ac_cv_zos_uss=yes
 else
   ac_cv_zos_uss=no
 fi
+])dnl
 AC_MSG_RESULT([${ac_cv_zos_uss}])
 ])dnl
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index a53c042..d7de8d6 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,5 +1,5 @@
-# codeset.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
+# codeset.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,10 +9,12 @@ dnl From Bruno Haible.
 AC_DEFUN([AM_LANGINFO_CODESET],
 [
   AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
-    [AC_TRY_LINK([#include <langinfo.h>],
-      [char* cs = nl_langinfo(CODESET); return !cs;],
-      [am_cv_langinfo_codeset=yes],
-      [am_cv_langinfo_codeset=no])
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <langinfo.h>]],
+          [[char* cs = nl_langinfo(CODESET); return !cs;]])],
+       [am_cv_langinfo_codeset=yes],
+       [am_cv_langinfo_codeset=no])
     ])
   if test $am_cv_langinfo_codeset = yes; then
     AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
new file mode 100644
index 0000000..0edbe3c
--- /dev/null
+++ b/m4/extern-inline.m4
@@ -0,0 +1,100 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2014 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+  AH_VERBATIM([extern_inline],
+[/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
+     && (defined __header_inline \
+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+            && ! defined __clang__) \
+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
+             && (defined __GNUC__ || defined __cplusplus)) \
+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+                && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC, suppress bogus "no previous prototype for 'FOO'"
+   and "no previous declaration for 'FOO'" diagnostics,
+   when FOO is an inline function in the header; see
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
new file mode 100644
index 0000000..43c9312
--- /dev/null
+++ b/m4/fcntl-o.m4
@@ -0,0 +1,134 @@
+# fcntl-o.m4 serial 4
+dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+  dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CHECK_FUNCS_ONCE([symlink])
+  AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+          ]],
+          [[
+            int result = !constants;
+            #if HAVE_SYMLINK
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            #endif
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;]])],
+       [gl_cv_header_working_fcntl_h=yes],
+       [case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac],
+       [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+    [Define to 1 if O_NOATIME works.])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+    [Define to 1 if O_NOFOLLOW works.])
+])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
index f148c12..71dd8a1 100644
--- a/m4/glibc2.m4
+++ b/m4/glibc2.m4
@@ -1,5 +1,6 @@
-# glibc2.m4 serial 2
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc2.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +16,7 @@ AC_DEFUN([gt_GLIBC2],
         [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
   Lucky GNU user
  #endif
 #endif
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
index 68ada9d..ab58b71 100644
--- a/m4/glibc21.m4
+++ b/m4/glibc21.m4
@@ -1,17 +1,18 @@
-# glibc21.m4 serial 4
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-# Test for the GNU C Library, version 2.1 or newer.
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
 # From Bruno Haible.
 
 AC_DEFUN([gl_GLIBC21],
   [
-    AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+    AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
       [ac_cv_gnu_library_2_1],
-      [AC_EGREP_CPP([Lucky GNU user],
+      [AC_EGREP_CPP([Lucky],
         [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
@@ -19,6 +20,9 @@ AC_DEFUN([gl_GLIBC21],
   Lucky GNU user
  #endif
 #endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
         ],
         [ac_cv_gnu_library_2_1=yes],
         [ac_cv_gnu_library_2_1=no])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
index 289c4df..afa9acb 100644
--- a/m4/intdiv0.m4
+++ b/m4/intdiv0.m4
@@ -1,5 +1,5 @@
-# intdiv0.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc.
+# intdiv0.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002, 2007-2008, 2010-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,7 @@ AC_DEFUN([gt_INTDIV0],
 changequote(,)dnl
       case "$host_os" in
         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
-          # On MacOS X 10.2 or newer, just assume the same as when cross-
+          # On Mac OS X 10.2 or newer, just assume the same as when cross-
           # compiling. If we were to perform the real test, 1 Crash Report
           # dialog window would pop up.
           case "$host_cpu" in
@@ -29,7 +29,8 @@ changequote(,)dnl
       esac
 changequote([,])dnl
       if test -z "$gt_cv_int_divbyzero_sigfpe"; then
-        AC_TRY_RUN([
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
 #include <stdlib.h>
 #include <signal.h>
 
@@ -59,9 +60,11 @@ int main ()
 
   z = x / y;
   nan = y / y;
-  exit (1);
+  exit (2);
 }
-], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no],
+]])],
+          [gt_cv_int_divbyzero_sigfpe=yes],
+          [gt_cv_int_divbyzero_sigfpe=no],
           [
             # Guess based on the CPU.
 changequote(,)dnl
diff --git a/m4/intl.m4 b/m4/intl.m4
index d18cc01..0c29ad0 100644
--- a/m4/intl.m4
+++ b/m4/intl.m4
@@ -1,5 +1,5 @@
-# intl.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
+# intl.m4 serial 28 (gettext-0.19)
+dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,7 @@ dnl Authors:
 dnl   Ulrich Drepper <address@hidden>, 1995-2000.
 dnl   Bruno Haible <address@hidden>, 2000-2009.
 
-AC_PREREQ([2.52])
+AC_PREREQ([2.60])
 
 dnl Checks for all prerequisites of the intl subdirectory,
 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
@@ -42,6 +42,8 @@ AC_DEFUN([AM_INTL_SUBDIR],
   AC_REQUIRE([gl_XSIZE])dnl
   AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
   AC_REQUIRE([gt_INTL_MACOSX])dnl
+  AC_REQUIRE([gl_EXTERN_INLINE])dnl
+  AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
 
   dnl Support for automake's --enable-silent-rules.
   case "$enable_silent_rules" in
@@ -55,21 +57,19 @@ AC_DEFUN([AM_INTL_SUBDIR],
     [AC_DEFINE([ptrdiff_t], [long],
        [Define as the type of the result of subtracting two pointers, if the 
system doesn't define it.])
     ])
-  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+  AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h])
   AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
     snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
 
   dnl Use the _snprintf function only if it is declared (because on NetBSD it
   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
-  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
-  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+  AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>])
 
   dnl Use the *_unlocked functions only if they are declared.
   dnl (because some of them were defined without being declared in Solaris
   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
   dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+  AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>])
 
   case $gt_cv_func_printf_posix in
     *yes) HAVE_POSIX_PRINTF=1 ;;
@@ -220,9 +220,10 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
   AC_REQUIRE([gt_INTTYPES_PRI])dnl
   AC_REQUIRE([gl_LOCK])dnl
 
-  AC_TRY_LINK(
-    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; 
}],
-    [],
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 
1; }]],
+       [[]])],
     [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
        [Define to 1 if the compiler understands __builtin_expect.])])
 
@@ -235,16 +236,13 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
   dnl (because some of them were defined without being declared in Solaris
   dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
   dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>])
-  gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>])
+  AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>])
 
   AM_ICONV
 
   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
   dnl because plural.y uses bison specific features. It requires at least
-  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
-  dnl compile.
+  dnl bison-2.7 for %define api.pure.
   dnl bison is only needed for the maintainer (who touches plural.y). But in
   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
   dnl the rule in general Makefile. Now, some people carelessly touch the
@@ -261,7 +259,7 @@ changequote(<<,>>)dnl
     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* 
\([0-9]*\.[0-9.]*\).*$/\1/p'`
     case $ac_prog_version in
       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+      2.[7-9]* | [3-9].*)
 changequote([,])dnl
          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
@@ -273,22 +271,28 @@ changequote([,])dnl
   fi
 ])
 
+dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
+dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
+AC_DEFUN([gt_GL_ATTRIBUTE], [
+  m4_ifndef([gl_[]COMMON],
+    AH_VERBATIM([gt_gl_attribute],
+[/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#ifndef _GL_UNUSED
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_UNUSED __attribute__ ((__unused__))
+# else
+#  define _GL_UNUSED
+# endif
+#endif
 
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
-[
-  AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
-    [AC_TRY_COMPILE([$2], [
-#ifndef $1
-  char *p = (char *) $1;
+/* The __pure__ attribute was added in gcc 2.96.  */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
-  if test $ac_cv_have_decl_$1 = yes; then
-    gt_value=1
-  else
-    gt_value=0
-  fi
-  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
-    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
-])
+]))])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index dd91025..8a045f6 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
-# intlmacosx.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,35 +13,40 @@ dnl by the GNU Library General Public License, and the rest 
of the GNU
 dnl gettext package package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
 dnl Defines INTL_MACOSX_LIBS.
 AC_DEFUN([gt_INTL_MACOSX],
 [
-  dnl Check for API introduced in MacOS X 10.2.
+  dnl Check for API introduced in Mac OS X 10.2.
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     [gt_cv_func_CFPreferencesCopyAppValue],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
-       [CFPreferencesCopyAppValue(NULL, NULL)],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
        [gt_cv_func_CFPreferencesCopyAppValue=yes],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
-      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue 
in the CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue 
in the CoreFoundation framework.])
   fi
-  dnl Check for API introduced in MacOS X 10.3.
+  dnl Check for API introduced in Mac OS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], 
[CFLocaleCopyCurrent();],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
        [gt_cv_func_CFLocaleCopyCurrent=yes],
        [gt_cv_func_CFLocaleCopyCurrent=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
-      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the 
CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in 
the CoreFoundation framework.])
   fi
   INTL_MACOSX_LIBS=
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test 
$gt_cv_func_CFLocaleCopyCurrent = yes; then
diff --git a/m4/intmax.m4 b/m4/intmax.m4
index 74aaaf5..f70ceee 100644
--- a/m4/intmax.m4
+++ b/m4/intmax.m4
@@ -1,5 +1,5 @@
-# intmax.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 2002-2005, 2008-2010 Free Software Foundation, Inc.
+# intmax.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002-2005, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,9 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
   AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
-    [AC_TRY_COMPILE([
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
 #include <stddef.h>
 #include <stdlib.h>
 #if HAVE_STDINT_H_WITH_UINTMAX
@@ -22,8 +24,9 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
 #if HAVE_INTTYPES_H_WITH_UINTMAX
 #include <inttypes.h>
 #endif
-],     [intmax_t x = -1;
-        return !x;],
+          ]],
+          [[intmax_t x = -1;
+            return !x;]])],
        [gt_cv_c_intmax_t=yes],
        [gt_cv_c_intmax_t=no])])
   if test $gt_cv_c_intmax_t = yes; then
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
index 718a4f4..00251e1 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/inttypes-pri.m4
@@ -1,12 +1,12 @@
-# inttypes-pri.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1997-2002, 2006, 2008-2010 Free Software Foundation, Inc.
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
-AC_PREREQ([2.52])
+AC_PREREQ([2.53])
 
 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 # macros to non-string values.  This is the case on AIX 4.3.3.
@@ -18,11 +18,17 @@ AC_DEFUN([gt_INTTYPES_PRI],
     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
       [gt_cv_inttypes_pri_broken],
       [
-        AC_TRY_COMPILE([#include <inttypes.h>
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <inttypes.h>
 #ifdef PRId32
 char *p = PRId32;
 #endif
-], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
+             ]],
+             [[]])],
+          [gt_cv_inttypes_pri_broken=no],
+          [gt_cv_inttypes_pri_broken=yes])
       ])
   fi
   if test "$gt_cv_inttypes_pri_broken" = yes; then
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index 782d77e..87be9cf 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
-# inttypes_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
+# inttypes_h.m4 serial 10
+dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,12 +12,15 @@ dnl From Paul Eggert.
 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 [
   AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <inttypes.h>],
-    [uintmax_t i = (uintmax_t) -1; return !i;],
-    [gl_cv_header_inttypes_h=yes],
-    [gl_cv_header_inttypes_h=no])])
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+#include <sys/types.h>
+#include <inttypes.h>
+          ]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_inttypes_h=yes],
+       [gl_cv_header_inttypes_h=no])])
   if test $gl_cv_header_inttypes_h = yes; then
     AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
index 1a70543..7470ec5 100644
--- a/m4/lcmessage.m4
+++ b/m4/lcmessage.m4
@@ -1,5 +1,5 @@
-# lcmessage.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
+# lcmessage.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,12 @@ dnl   Ulrich Drepper <address@hidden>, 1995.
 AC_DEFUN([gt_LC_MESSAGES],
 [
   AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
-    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>]],
+          [[return LC_MESSAGES]])],
+       [gt_cv_val_LC_MESSAGES=yes],
+       [gt_cv_val_LC_MESSAGES=no])])
   if test $gt_cv_val_LC_MESSAGES = yes; then
     AC_DEFINE([HAVE_LC_MESSAGES], [1],
       [Define if your <locale.h> file defines LC_MESSAGES.])
diff --git a/m4/lock.m4 b/m4/lock.m4
index 9da8465..73a3c54 100644
--- a/m4/lock.m4
+++ b/m4/lock.m4
@@ -1,5 +1,5 @@
-# lock.m4 serial 10 (gettext-0.18)
-dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
+# lock.m4 serial 13 (gettext-0.18.2)
+dnl Copyright (C) 2005-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_LOCK],
 [
   AC_REQUIRE([gl_THREADLIB])
   if test "$gl_threads_api" = posix; then
-    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
     # pthread_rwlock_* functions.
     AC_CHECK_TYPE([pthread_rwlock_t],
       [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
@@ -18,20 +18,25 @@ AC_DEFUN([gl_LOCK],
       [],
       [#include <pthread.h>])
     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
-    AC_TRY_COMPILE([#include <pthread.h>],
-      [#if __FreeBSD__ == 4
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [[#include <pthread.h>]],
+        [[
+#if __FreeBSD__ == 4
 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
 #else
 int x = (int)PTHREAD_MUTEX_RECURSIVE;
 return !x;
-#endif],
+#endif
+        ]])],
       [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
          [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
   fi
   gl_PREREQ_LOCK
 ])
 
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index cca3c1a..eefb37c 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
-# longlong.m4 serial 14
-dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,8 +7,8 @@ dnl with or without modifications, as long as this notice is 
preserved.
 dnl From Paul Eggert.
 
 # Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
 
 # Note: If the type 'long long int' exists but is only 32 bits large
 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
@@ -16,44 +16,48 @@ dnl From Paul Eggert.
 
 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
 [
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
   AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
-    [AC_LINK_IFELSE(
-       [_AC_TYPE_LONG_LONG_SNIPPET],
-       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
-        dnl If cross compiling, assume the bug isn't important, since
-        dnl nobody cross compiles for this platform as far as we know.
-        AC_RUN_IFELSE(
-          [AC_LANG_PROGRAM(
-             address@hidden:@include <limits.h>
-               @%:@ifndef LLONG_MAX
-               @%:@ define HALF \
-                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-               @%:@ define LLONG_MAX (HALF - 1 + HALF)
-               @%:@endif]],
-             [[long long int n = 1;
-               int i;
-               for (i = 0; ; i++)
-                 {
-                   long long int m = n << i;
-                   if (m >> i != n)
-                     return 1;
-                   if (LLONG_MAX / 2 < m)
-                     break;
-                 }
-               return 0;]])],
-          [ac_cv_type_long_long_int=yes],
-          [ac_cv_type_long_long_int=no],
-          [ac_cv_type_long_long_int=yes])],
-       [ac_cv_type_long_long_int=no])])
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               address@hidden:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `long long int'.])
+      [Define to 1 if the system has the type 'long long int'.])
   fi
 ])
 
 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, but can be removed once we
-# assume 2.62 everywhere.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
 
 # Note: If the type 'unsigned long long int' exists but is only 32 bits
 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
@@ -64,13 +68,16 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
 [
   AC_CACHE_CHECK([for unsigned long long int],
     [ac_cv_type_unsigned_long_long_int],
-    [AC_LINK_IFELSE(
-       [_AC_TYPE_LONG_LONG_SNIPPET],
-       [ac_cv_type_unsigned_long_long_int=yes],
-       [ac_cv_type_unsigned_long_long_int=no])])
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `unsigned long long int'.])
+      [Define to 1 if the system has the type 'unsigned long long int'.])
   fi
 ])
 
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
index 1eacf95..3be95c1 100644
--- a/m4/printf-posix.m4
+++ b/m4/printf-posix.m4
@@ -1,5 +1,5 @@
-# printf-posix.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc.
+# printf-posix.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007, 2009-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,8 @@ AC_DEFUN([gt_PRINTF_POSIX],
   AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
     gt_cv_func_printf_posix,
     [
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
 /* The string "%2$d %1$d", with dollar characters protected from the shell's
@@ -25,16 +26,18 @@ int main ()
 {
   sprintf (buf, format, 33, 55);
   return (strcmp (buf, "55 33") != 0);
-}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
-      [
-        AC_EGREP_CPP([notposix], [
+}]])],
+        [gt_cv_func_printf_posix=yes],
+        [gt_cv_func_printf_posix=no],
+        [
+          AC_EGREP_CPP([notposix], [
 #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined 
__MINGW32__ || defined __CYGWIN__
   notposix
 #endif
-          ],
-          [gt_cv_func_printf_posix="guessing no"],
-          [gt_cv_func_printf_posix="guessing yes"])
-      ])
+            ],
+            [gt_cv_func_printf_posix="guessing no"],
+            [gt_cv_func_printf_posix="guessing yes"])
+        ])
     ])
   case $gt_cv_func_printf_posix in
     *yes)
diff --git a/m4/size_max.m4 b/m4/size_max.m4
index ce992db..7e192d5 100644
--- a/m4/size_max.m4
+++ b/m4/size_max.m4
@@ -1,5 +1,5 @@
-# size_max.m4 serial 9
-dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc.
+# size_max.m4 serial 10
+dnl Copyright (C) 2003, 2005-2006, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,10 +34,14 @@ Found it
         if test $fits_in_uint = 1; then
           dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
           dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned 
long'.
-          AC_TRY_COMPILE([#include <stddef.h>
-            extern size_t foo;
-            extern unsigned long foo;
-            ], [], [fits_in_uint=0])
+          AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
+               ]],
+               [[]])],
+            [fits_in_uint=0])
         fi
         dnl We cannot use 'expr' to simplify this expression, because 'expr'
         dnl works only with 'long' integers in the host environment, while we
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index b8e3c6c..7fc2ce9 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -1,5 +1,5 @@
-# stdint_h.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
+# stdint_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,12 +12,13 @@ dnl From Paul Eggert.
 AC_DEFUN([gl_AC_HEADER_STDINT_H],
 [
   AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <stdint.h>],
-    [uintmax_t i = (uintmax_t) -1; return !i;],
-    [gl_cv_header_stdint_h=yes],
-    [gl_cv_header_stdint_h=no])])
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+            #include <stdint.h>]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_stdint_h=yes],
+       [gl_cv_header_stdint_h=no])])
   if test $gl_cv_header_stdint_h = yes; then
     AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
new file mode 100644
index 0000000..dc9a3d8
--- /dev/null
+++ b/m4/threadlib.m4
@@ -0,0 +1,389 @@
+# threadlib.m4 serial 11 (gettext-0.18.2)
+dnl Copyright (C) 2005-2014 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+  dnl influences the result of the autoconf tests that test for *_unlocked
+  dnl declarations, on AIX 5 at least. Therefore it must come early.
+  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+  AC_BEFORE([$0], [gl_ARGP])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+  dnl Check for multithreading.
+  m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+  AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify 
multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+    [gl_use_threads=$enableval],
+    [if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+changequote(,)dnl
+       case "$host_os" in
+         dnl Disable multithreading by default on OSF/1, because it interferes
+         dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+         dnl child process gets an endless segmentation fault inside execvp().
+         dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+         dnl bugs that lead to endless loops or crashes. See
+         dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+         osf*) gl_use_threads=no ;;
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+changequote([,])dnl
+     fi
+    ])
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+    dnl Check whether the compiler and linker support weak declarations.
+    AC_CACHE_CHECK([whether imported symbols can be declared weak],
+      [gl_cv_have_weak],
+      [gl_cv_have_weak=no
+       dnl First, test whether the compiler accepts it syntactically.
+       AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern void xyzzy ();
+#pragma weak xyzzy]],
+            [[xyzzy();]])],
+         [gl_cv_have_weak=maybe])
+       if test $gl_cv_have_weak = maybe; then
+         dnl Second, test whether it actually works. On Cygwin 1.7.2, with
+         dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}]])],
+           [gl_cv_have_weak=yes],
+           [gl_cv_have_weak=no],
+           [dnl When cross-compiling, assume that only ELF platforms support
+            dnl weak symbols.
+            AC_EGREP_CPP([Extensible Linking Format],
+              [#ifdef __ELF__
+               Extensible Linking Format
+               #endif
+              ],
+              [gl_cv_have_weak="guessing yes"],
+              [gl_cv_have_weak="guessing no"])
+           ])
+       fi
+      ])
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+      AC_CHECK_HEADER([pthread.h],
+        [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        #
+        # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+        # needs -pthread for some reason.  See:
+        # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+        save_LIBS=$LIBS
+        for gl_pthread in '' '-pthread'; do
+          LIBS="$LIBS $gl_pthread"
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <pthread.h>
+                 pthread_mutex_t m;
+                 pthread_mutexattr_t ma;
+               ]],
+               [[pthread_mutex_lock (&m);
+                 pthread_mutexattr_init (&ma);]])],
+            [gl_have_pthread=yes
+             LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+             LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
+          LIBS=$save_LIBS
+          test -n "$gl_have_pthread" && break
+        done
+
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                   [Define if the pthread_in_use() detection is hard.])
+             esac
+            ])
+        elif test -z "$gl_have_pthread"; then
+          # Some library is needed. Try libpthread and libc_r.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            AC_CHECK_LIB([c_r], [pthread_kill],
+              [gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+          AC_DEFINE([USE_POSIX_THREADS], [1],
+            [Define if the POSIX multithreading library can be used.])
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+                [Define if references to the POSIX multithreading library 
should be made weak.])
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <thread.h>
+#include <synch.h>
+             ]],
+             [[thr_self();]])],
+          [gl_have_solaristhread=yes])
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+          AC_DEFINE([USE_SOLARIS_THREADS], [1],
+            [Define if the old Solaris multithreading library can be used.])
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+              [Define if references to the old Solaris multithreading library 
should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+      AC_LIB_LINKFLAGS([pth])
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBPTH"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
+        [gl_have_pth=yes])
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+        AC_DEFINE([USE_PTH_THREADS], [1],
+          [Define if the GNU Pth multithreading library can be used.])
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+              [Define if references to the GNU Pth multithreading library 
should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+            AC_DEFINE([USE_WINDOWS_THREADS], [1],
+              [Define if the native Windows multithreading API can be used.])
+          fi
+          ;;
+      esac
+    fi
+  fi
+  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_RESULT([$gl_threads_api])
+  AC_SUBST([LIBTHREAD])
+  AC_SUBST([LTLIBTHREAD])
+  AC_SUBST([LIBMULTITHREAD])
+  AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY])
+  AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+  m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform           Available  Compiler    Supports   test-lock
+dnl                    flavours   option      weak       result
+dnl ---------------    ---------  ---------   --------   ---------
+dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
+dnl
+dnl GNU Hurd/glibc     posix
+dnl
+dnl Ubuntu 14.04       posix      -pthread        Y      OK
+dnl
+dnl FreeBSD 5.3        posix      -lc_r           Y
+dnl                    posix      -lkse ?         Y
+dnl                    posix      -lpthread ?     Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 5.2        posix      -lc_r           Y
+dnl                    posix      -lkse           Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
+dnl
+dnl NetBSD 1.6         --
+dnl
+dnl OpenBSD 3.4        posix      -lpthread       Y      OK
+dnl
+dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
+dnl
+dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: 
OK
+dnl                    solaris    -lthread        Y      Sol 7,8: 0.0; Sol 9: 
OK
+dnl
+dnl HP-UX 11           posix      -lpthread       N (cc) OK
+dnl                                               Y (gcc)
+dnl
+dnl IRIX 6.5           posix      -lpthread       Y      0.5
+dnl
+dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
+dnl                               -lpthread (gcc) Y
+dnl
+dnl Cygwin             posix      -lpthread       Y      OK
+dnl
+dnl Any of the above   pth        -lpth                  0.0
+dnl
+dnl Mingw              windows                    N      OK
+dnl
+dnl BeOS 5             --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl   OK if all three tests terminate OK,
+dnl   0.5 if the first test terminates OK but the second one loops endlessly,
+dnl   0.0 if the first test already loops endlessly.
diff --git a/m4/visibility.m4 b/m4/visibility.m4
index 077c476..552e397 100644
--- a/m4/visibility.m4
+++ b/m4/visibility.m4
@@ -1,5 +1,5 @@
-# visibility.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
+# visibility.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and
 dnl __attribute__((__visibility__("default"))).
 dnl Does *not* test for __visibility__("protected") - which has tricky
 dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
+dnl Mac OS X.
 dnl Does *not* test for __visibility__("internal") - which has processor
 dnl dependent semantics.
 dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
@@ -33,7 +33,8 @@ AC_DEFUN([gl_VISIBILITY],
     AC_CACHE_VAL([gl_cv_cc_vis_werror], [
       gl_save_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Werror"
-      AC_TRY_COMPILE([], [],
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[]], [[]])],
         [gl_cv_cc_vis_werror=yes],
         [gl_cv_cc_vis_werror=no])
       CFLAGS="$gl_save_CFLAGS"])
@@ -51,13 +52,15 @@ AC_DEFUN([gl_VISIBILITY],
       if test $gl_cv_cc_vis_werror = yes; then
         CFLAGS="$CFLAGS -Werror"
       fi
-      AC_TRY_COMPILE(
-        [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-         extern __attribute__((__visibility__("default"))) int exportedvar;
-         extern __attribute__((__visibility__("hidden"))) int hiddenfunc 
(void);
-         extern __attribute__((__visibility__("default"))) int exportedfunc 
(void);
-         void dummyfunc (void) {}],
-        [],
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+             extern __attribute__((__visibility__("default"))) int exportedvar;
+             extern __attribute__((__visibility__("hidden"))) int hiddenfunc 
(void);
+             extern __attribute__((__visibility__("default"))) int 
exportedfunc (void);
+             void dummyfunc (void) {}
+           ]],
+           [[]])],
         [gl_cv_cc_visibility=yes],
         [gl_cv_cc_visibility=no])
       CFLAGS="$gl_save_CFLAGS"])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index ed804e6..839a04c 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
-# wchar_t.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc.
+# wchar_t.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2002-2003, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,9 +11,13 @@ dnl Prerequisite: AC_PROG_CC
 AC_DEFUN([gt_TYPE_WCHAR_T],
 [
   AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
-    [AC_TRY_COMPILE([#include <stddef.h>
-       wchar_t foo = (wchar_t)'\0';], ,
-       [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wchar_t=yes],
+       [gt_cv_c_wchar_t=no])])
   if test $gt_cv_c_wchar_t = yes; then
     AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
   fi
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
index a6c7d15..9b07b07 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
+# wint_t.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,9 @@ dnl Prerequisite: AC_PROG_CC
 AC_DEFUN([gt_TYPE_WINT_T],
 [
   AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
-    [AC_TRY_COMPILE([
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
@@ -20,8 +22,10 @@ AC_DEFUN([gt_TYPE_WINT_T],
 #include <stdio.h>
 #include <time.h>
 #include <wchar.h>
-       wint_t foo = (wchar_t)'\0';], ,
-       [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
+            wint_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wint_t=yes],
+       [gt_cv_c_wint_t=no])])
   if test $gt_cv_c_wint_t = yes; then
     AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
   fi
diff --git a/m4/xsize.m4 b/m4/xsize.m4
index b653693..3af23ec 100644
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -1,5 +1,5 @@
-# xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc.
+# xsize.m4 serial 5
+dnl Copyright (C) 2003-2004, 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS([stdint.h])
 ])
diff --git a/pc/config.h b/pc/config.h
index d6fee70..e67349b 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -31,11 +31,11 @@
 #define HAVE_BTOWC 1
 #endif
 
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
    CoreFoundation framework. */
 #undef HAVE_CFLOCALECOPYCURRENT
 
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
    the CoreFoundation framework. */
 #undef HAVE_CFPREFERENCESCOPYAPPVALUE
 
@@ -131,7 +131,7 @@
 #define HAVE_LOCALE_H 1
 #endif
 
-/* Define to 1 if the system has the type `long long int'. */
+/* Define to 1 if the system has the type 'long long int'. */
 #undef HAVE_LONG_LONG_INT
 
 /* Define to 1 if you have the `mbrlen' function. */
@@ -285,6 +285,12 @@
 #define HAVE_STRTOUL 1
 #endif
 
+/* 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
 
@@ -302,6 +308,9 @@
 #define HAVE_SYS_PARAM_H 1
 #endif
 
+/* 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
 
@@ -407,6 +416,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
 
@@ -426,7 +438,7 @@
 #define PACKAGE_NAME "GNU Awk"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU Awk 4.1.3"
+#define PACKAGE_STRING "GNU Awk 4.1.3-zOS"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "gawk"
@@ -435,7 +447,7 @@
 #define PACKAGE_URL "http://www.gnu.org/software/gawk/";
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "4.1.3"
+#define PACKAGE_VERSION "4.1.3-zOS"
 
 /* Define to 1 if *printf supports %F format */
 #undef PRINTF_HAS_F_FORMAT
@@ -471,6 +483,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
 
@@ -497,7 +512,7 @@
 
 
 /* Version number of package */
-#define VERSION "4.1.3"
+#define VERSION "4.1.3-zOS"
 
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE
diff --git a/regcomp.c b/regcomp.c
index fd3ab84..588768e 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
@@ -133,88 +137,31 @@ static reg_errcode_t mark_opt_subexp (void *extra, 
bin_tree_t *node);
    POSIX doesn't require that we do anything for REG_NOERROR,
    but why not be nice?  */
 
-const char __re_error_msgid[] attribute_hidden =
+const char *__re_error_msg[] attribute_hidden =
   {
-#define REG_NOERROR_IDX        0
-    gettext_noop ("Success")   /* REG_NOERROR */
-    "\0"
-#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
-    gettext_noop ("No match")  /* REG_NOMATCH */
-    "\0"
-#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
-    gettext_noop ("Invalid regular expression") /* REG_BADPAT */
-    "\0"
-#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
-    gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
-    "\0"
-#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation 
character")
-    gettext_noop ("Invalid character class name") /* REG_ECTYPE */
-    "\0"
-#define REG_EESCAPE_IDX        (REG_ECTYPE_IDX + sizeof "Invalid character 
class name")
-    gettext_noop ("Trailing backslash") /* REG_EESCAPE */
-    "\0"
-#define REG_ESUBREG_IDX        (REG_EESCAPE_IDX + sizeof "Trailing backslash")
-    gettext_noop ("Invalid back reference") /* REG_ESUBREG */
-    "\0"
-#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
-    gettext_noop ("Unmatched [, [^, [:, [., or [=")    /* REG_EBRACK */
-    "\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or 
[=")
-    gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
-    "\0"
-#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
-    gettext_noop ("Unmatched \\{") /* REG_EBRACE */
-    "\0"
-#define REG_BADBR_IDX  (REG_EBRACE_IDX + sizeof "Unmatched \\{")
-    gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
-    "\0"
-#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
-    gettext_noop ("Invalid range end") /* REG_ERANGE */
-    "\0"
-#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
-    gettext_noop ("Memory exhausted") /* REG_ESPACE */
-    "\0"
-#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
-    gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
-    "\0"
-#define REG_EEND_IDX   (REG_BADRPT_IDX + sizeof "Invalid preceding regular 
expression")
-    gettext_noop ("Premature end of regular expression") /* REG_EEND */
-    "\0"
-#define REG_ESIZE_IDX  (REG_EEND_IDX + sizeof "Premature end of regular 
expression")
-    gettext_noop ("Regular expression too big") /* REG_ESIZE */
-    "\0"
-#define REG_ERPAREN_IDX        (REG_ESIZE_IDX + sizeof "Regular expression too 
big")
+    gettext_noop ("Success"), /* REG_NOERROR */
+    gettext_noop ("No match"), /* REG_NOMATCH */
+    gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
+    gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
+    gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
+    gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
+    gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
+    gettext_noop ("Unmatched [, [^, [:, [., or [="),   /* REG_EBRACK */
+    gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
+    gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
+    gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
+    gettext_noop ("Invalid range end"),        /* REG_ERANGE */
+    gettext_noop ("Memory exhausted"), /* REG_ESPACE */
+    gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
+    gettext_noop ("Premature end of regular expression"), /* REG_EEND */
+    gettext_noop ("Regular expression too big"), /* REG_ESIZE */
     gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
   };
-
-const size_t __re_error_msgid_idx[] attribute_hidden =
-  {
-    REG_NOERROR_IDX,
-    REG_NOMATCH_IDX,
-    REG_BADPAT_IDX,
-    REG_ECOLLATE_IDX,
-    REG_ECTYPE_IDX,
-    REG_EESCAPE_IDX,
-    REG_ESUBREG_IDX,
-    REG_EBRACK_IDX,
-    REG_EPAREN_IDX,
-    REG_EBRACE_IDX,
-    REG_BADBR_IDX,
-    REG_ERANGE_IDX,
-    REG_ESPACE_IDX,
-    REG_BADRPT_IDX,
-    REG_EEND_IDX,
-    REG_ESIZE_IDX,
-    REG_ERPAREN_IDX
-  };
 
 /* Entry points for GNU code.  */
 
 
-#ifdef ZOS_USS
-
-/* For ZOS USS we must define btowc */
-
+#ifndef HAVE_BTOWC
 wchar_t 
 btowc (int c)
 {
@@ -258,7 +205,7 @@ re_compile_pattern (pattern, length, bufp)
 
   if (!ret)
     return NULL;
-  return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+  return gettext (__re_error_msg[(int) ret]);
 }
 #ifdef _LIBC
 weak_alias (__re_compile_pattern, re_compile_pattern)
@@ -565,15 +512,15 @@ regerror (errcode, preg, errbuf, errbuf_size)
   size_t msg_size;
 
   if (BE (errcode < 0
-         || errcode >= (int) (sizeof (__re_error_msgid_idx)
-                              / sizeof (__re_error_msgid_idx[0])), 0))
+         || errcode >= (int) (sizeof (__re_error_msg)
+                              / sizeof (__re_error_msg[0])), 0))
     /* Only error codes returned by the rest of the code should be passed
        to this routine.  If we are given anything else, or if other regex
        code generates an invalid error code, then the program has a bug.
        Dump core so we can fix it.  */
     abort ();
 
-  msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+  msg = gettext (__re_error_msg[errcode]);
 
   msg_size = strlen (msg) + 1; /* Includes the null.  */
 
@@ -726,8 +673,7 @@ re_comp (s)
     {
       re_comp_buf.fastmap = (char *) malloc (SBC_MAX);
       if (re_comp_buf.fastmap == NULL)
-       return (char *) gettext (__re_error_msgid
-                                + __re_error_msgid_idx[(int) REG_ESPACE]);
+       return (char *) gettext (__re_error_msg[(int) REG_ESPACE]);
     }
 
   /* Since 're_exec' always passes NULL for the 'regs' argument, we
@@ -742,7 +688,7 @@ re_comp (s)
     return NULL;
 
   /* Yes, we're discarding `const' here if !HAVE_LIBINTL.  */
-  return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+  return (char *) gettext (__re_error_msg[(int) ret]);
 }
 
 #ifdef _LIBC
diff --git a/regex.c b/regex.c
index ed6a4f5..7b20513 100644
--- a/regex.c
+++ b/regex.c
@@ -65,7 +65,7 @@
 #undef alloca
 #define alloca alloca_is_bad_you_should_never_use_it
 #endif
-#include <regex.h>
+#include "regex.h"
 #include "regex_internal.h"
 
 #include "regex_internal.c"
diff --git a/regex_internal.h b/regex_internal.h
index 4d0028f..9e104d8 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/Makefile.am b/test/Makefile.am
index 5e72014..c499996 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2079,11 +2079,11 @@ negtime::
 # 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 0116f3a..e8f0109 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1489,7 +1489,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
@@ -1555,14 +1557,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
 
@@ -3929,11 +3931,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

-----------------------------------------------------------------------


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]