From 39138de63889a40662461aeca6ac146ccaef90ab Mon Sep 17 00:00:00 2001 From: John Malmberg Date: Tue, 26 Jan 2016 07:59:56 -0600 Subject: VMS needs to close 2 files when out of file numbers --- ChangeLog | 5 +++++ io.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 07ffd0a6..77a8ffbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-01-25 John E. Malmberg + + * io.c (redirect): Need to call close_one more than once after + running out of file handles. + 2016-01-25 Arnold D. Robbins * NEWS: Document VMS support updated. diff --git a/io.c b/io.c index 8b95b3f1..d700d87a 100644 --- a/io.c +++ b/io.c @@ -1001,8 +1001,10 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) (vaxc$errno == SS$_EXQUOTA || vaxc$errno == SS$_EXBYTLM || vaxc$errno == RMS$_ACC || - vaxc$errno == RMS$_SYN)) + vaxc$errno == RMS$_SYN)) { close_one(); + close_one(); + } #endif else { /* -- cgit v1.2.3 From 9f018b2f0e72476dc29b9f35d8ba4c93e5e2c4db Mon Sep 17 00:00:00 2001 From: John Malmberg Date: Wed, 27 Jan 2016 07:48:07 -0600 Subject: Add missing TIME_T_UNSIGNED macro. --- vms/ChangeLog | 6 ++++++ vms/generate_config_vms_h_gawk.com | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/vms/ChangeLog b/vms/ChangeLog index 43f42786..68eda2fc 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,9 @@ +2016-01-27 John E. Malmberg + + * generate_config_vms_h_gawk.com: Add missing define + for macro TIME_T_UNSIGNED. Remove supression of + complier message. + 2016-01-24 John E. Malmberg * vmstest.com: updates diff --git a/vms/generate_config_vms_h_gawk.com b/vms/generate_config_vms_h_gawk.com index 16d2d5b4..805b764f 100644 --- a/vms/generate_config_vms_h_gawk.com +++ b/vms/generate_config_vms_h_gawk.com @@ -288,7 +288,7 @@ $ write cvh " }" $ write cvh " decc$exit(vms_status);" $ write cvh "}" $ write cvh "" -$ write cvh "#pragma message disable questcompare +$ write cvh "#define TIME_T_UNSIGNED 1" $ write cvh "#include ""custom.h""" $ write cvh "" $! -- cgit v1.2.3 From b5b3c25fa54c82db87fd10f994e717fe221c6362 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 27 Jan 2016 20:31:20 +0200 Subject: Fix a typo in vms/ChangeLog. --- vms/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vms/ChangeLog b/vms/ChangeLog index 68eda2fc..0560a9dc 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -2,7 +2,7 @@ * generate_config_vms_h_gawk.com: Add missing define for macro TIME_T_UNSIGNED. Remove supression of - complier message. + compiler message. 2016-01-24 John E. Malmberg -- cgit v1.2.3 From 8da06a136e6cff1e6b500e37a2623b37528f0bdd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 27 Jan 2016 20:33:30 +0200 Subject: Fix statvfs for AIX compilation. --- extension/ChangeLog | 4 ++++ extension/filefuncs.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/extension/ChangeLog b/extension/ChangeLog index 0821077c..7f62f11b 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2016-01-27 Arnold D. Robbins + + * filefuncs.c (do_statvfs): Define out f_fsid on AIX. + 2016-01-20 Arnold D. Robbins * filefuncs.c: Add statvfs function. Undocumented for now. diff --git a/extension/filefuncs.c b/extension/filefuncs.c index ae4f7c3d..0f1c20ac 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -556,7 +556,9 @@ do_statvfs(int nargs, awk_value_t *result) array_set_numeric(array, "files", vfsbuf.f_files); /* # inodes */ array_set_numeric(array, "ffree", vfsbuf.f_ffree); /* # free inodes */ array_set_numeric(array, "favail", vfsbuf.f_favail); /* # free inodes for unprivileged users */ +#ifndef _AIX array_set_numeric(array, "fsid", vfsbuf.f_fsid); /* filesystem ID */ +#endif array_set_numeric(array, "flag", vfsbuf.f_flag); /* mount flags */ array_set_numeric(array, "namemax", vfsbuf.f_namemax); /* maximum filename length */ -- cgit v1.2.3 From e014f3b24e02d746a3982f3061796569ff294a03 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 27 Jan 2016 20:45:38 +0200 Subject: Remove special support for AIX; should work normally. --- ChangeLog | 7 +++++++ configure | 19 ------------------- configure.ac | 1 - custom.h | 4 ++++ io.c | 2 +- m4/ChangeLog | 4 ++++ m4/arch.m4 | 15 --------------- 7 files changed, 16 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63fc9300..e4bae0b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-01-27 Arnold D. Robbins + + * configure.ac (GAWK_AC_AIX_TWEAK): Remove call. + * configure: Regenerated. + * io.c (GAWK_AIX): Check _AIX instead. + * custom.h (_AIX): Add define of _XOPEN_SOURCE_EXTENDED. + 2016-01-25 John E. Malmberg * io.c (redirect): Need to call close_one more than once after diff --git a/configure b/configure index 78864a11..849569cf 100755 --- a/configure +++ b/configure @@ -6212,25 +6212,6 @@ rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX compilation hacks" >&5 -$as_echo_n "checking for AIX compilation hacks... " >&6; } -if ${gawk_cv_aix_hack+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -d /lpp -then - CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" - gawk_cv_aix_hack=yes -else - gawk_cv_aix_hack=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gawk_cv_aix_hack}" >&5 -$as_echo "${gawk_cv_aix_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 diff --git a/configure.ac b/configure.ac index 2b52fcb7..8d6895ea 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,6 @@ dnl checks for systems AC_ZOS_USS AC_SEARCH_LIBS([strerror],[cposix]) AC_SYS_LARGEFILE -GAWK_AC_AIX_TWEAK AC_MSG_CHECKING([if we are using EBCDIC]) AC_EGREP_CPP([gnu_gawk_in_ebcdic], diff --git a/custom.h b/custom.h index 956c52ab..64d4ec56 100644 --- a/custom.h +++ b/custom.h @@ -59,6 +59,10 @@ #define _TZSET 1 #endif +#if defined(_AIX) +#define _XOPEN_SOURCE_EXTENDED 1 +#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/io.c b/io.c index 6d898dd6..d618181d 100644 --- a/io.c +++ b/io.c @@ -190,7 +190,7 @@ #define setsid() /* nothing */ #endif /* HAVE_SETSID */ -#if defined(GAWK_AIX) +#if defined(_AIX) #undef TANDEM /* AIX defines this in one of its header files */ #endif diff --git a/m4/ChangeLog b/m4/ChangeLog index 76f05960..2c0063ee 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2016-01-27 Arnold D. Robbins + + * arch.m4 (GAWK_AC_AIX_TWEAK): Remove definition. + 2016-01-03 Arnold D. Robbins * arch.m4 (GAWK_AC_LINUX_ALPHA): Remove definition. diff --git a/m4/arch.m4 b/m4/arch.m4 index f156f9f3..6897a1a3 100644 --- a/m4/arch.m4 +++ b/m4/arch.m4 @@ -21,21 +21,6 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA dnl -dnl Check for AIX and add _XOPEN_SOURCE_EXTENDED -AC_DEFUN([GAWK_AC_AIX_TWEAK], [ -AC_MSG_CHECKING([for AIX compilation hacks]) -AC_CACHE_VAL(gawk_cv_aix_hack, [ -if test -d /lpp -then - CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" - gawk_cv_aix_hack=yes -else - gawk_cv_aix_hack=no -fi -])dnl -AC_MSG_RESULT([${gawk_cv_aix_hack}]) -])dnl - dnl Check for z/OS Unix Systems Services AC_DEFUN([AC_ZOS_USS], [ AC_MSG_CHECKING([for z/OS USS compilation]) -- cgit v1.2.3 From cd64f695ec51f4f9e67cc0380d30b429e1be298b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 27 Jan 2016 20:46:58 +0200 Subject: Remove old ISC Unix cruft. --- ChangeLog | 5 +++++ configure | 5 ----- configure.ac | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4bae0b1..884a75d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ * io.c (GAWK_AIX): Check _AIX instead. * custom.h (_AIX): Add define of _XOPEN_SOURCE_EXTENDED. + Unrelated: + + * configure.ac: Remove old stuff for ISC Unix, no longer needed. + * configure: Regenerated. + 2016-01-25 John E. Malmberg * io.c (redirect): Need to call close_one more than once after diff --git a/configure b/configure index 849569cf..af1b8ecc 100755 --- a/configure +++ b/configure @@ -6234,11 +6234,6 @@ 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" -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.ac b/configure.ac index 8d6895ea..f57d2a77 100644 --- a/configure.ac +++ b/configure.ac @@ -123,12 +123,6 @@ gnu_gawk_in_ebcdic [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 - CFLAGS="$CFLAGS -D_SYSV3" -fi - dnl Set the programming language for checks. Fortunately, dnl this only needs to be set once, since everything is in C. AC_LANG([C]) -- cgit v1.2.3