aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--awk.h2
-rwxr-xr-xconfigure14
-rw-r--r--ext.c2
-rw-r--r--extension/ChangeLog6
-rwxr-xr-xextension/configure14
-rw-r--r--interpret.h6
-rw-r--r--m4/ChangeLog4
-rw-r--r--m4/arch.m414
9 files changed, 42 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index eb06ad7d..ee4f9f4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-08-21 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * awk.h (c_func): Renamed to c_function to avoid conflict.
+ with z/OS headers.
+ * ext.c, interpret.h: Ditto.
+ * configure: Regenerated after update to m4/arch.m4.
+
2017-08-18 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (do_set_var): Fix typos in error messages.
diff --git a/awk.h b/awk.h
index 80e597f1..5eec241e 100644
--- a/awk.h
+++ b/awk.h
@@ -789,7 +789,7 @@ typedef struct exp_instruction {
#define expr_count x.xl
-#define c_func x.exf
+#define c_function x.exf
#define target_continue d.di
#define target_jmp d.di
diff --git a/configure b/configure
index 12e51da0..7659863d 100755
--- a/configure
+++ b/configure
@@ -5460,14 +5460,14 @@ $as_echo "${ac_cv_zos_uss}" >&6; }
if test "x$ac_cv_zos_uss" = "xyes"
then
ac_zos_uss_cc_id=unknown
- echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
- echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
- echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
- echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?c89[ |_]' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc[ |_]' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_OPEN_SYS_UNLOCKED_EXT"
test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
case "$ac_zos_uss_cc_id" in
c89)
diff --git a/ext.c b/ext.c
index ce4b247b..027df697 100644
--- a/ext.c
+++ b/ext.c
@@ -135,7 +135,7 @@ make_builtin(const awk_ext_func_t *funcinfo)
b = bcalloc(Op_symbol, 1, 0);
b->extfunc = funcinfo->function;
- b->c_func = (awk_ext_func_t *) funcinfo;
+ b->c_function = (awk_ext_func_t *) funcinfo;
/* NB: extension sub must return something */
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 2ab3ebb7..c4253909 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,4 +1,8 @@
-2017-08-19 Eli Zaretskii <eliz@gnu.org>
+2017-08-21 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * configure: Regenerated after update to m4/arch.m4.
+
+2017-08-19 Eli Zaretskii <eliz@gnu.org>
* testext.c (test_get_file): Don't remove outfile from the Gawk
script, as that fails on MS-Windows.
diff --git a/extension/configure b/extension/configure
index d1c146c4..985e3079 100755
--- a/extension/configure
+++ b/extension/configure
@@ -3682,14 +3682,14 @@ $as_echo "${ac_cv_zos_uss}" >&6; }
if test "x$ac_cv_zos_uss" = "xyes"
then
ac_zos_uss_cc_id=unknown
- echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
- echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
- echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
- echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?c89[ |_]' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc[ |_]' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_OPEN_SYS_UNLOCKED_EXT"
test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
case "$ac_zos_uss_cc_id" in
c89)
diff --git a/interpret.h b/interpret.h
index ec6a3dda..6c5b432e 100644
--- a/interpret.h
+++ b/interpret.h
@@ -966,7 +966,7 @@ arrayfor:
case Op_ext_builtin:
{
size_t arg_count = pc->expr_count;
- awk_ext_func_t *f = pc[1].c_func;
+ awk_ext_func_t *f = pc[1].c_function;
size_t min_req = f->min_required_args;
size_t max_expect = f->max_expected_args;
awk_value_t result;
@@ -1119,7 +1119,7 @@ match_re:
npc[0].expr_count = arg_count; /* actual argument count */
npc[1] = pc[1];
npc[1].func_name = fname; /* name of the builtin */
- npc[1].c_func = bc->c_func;
+ npc[1].c_function = bc->c_function;
ni = npc;
JUMPTO(ni);
} else
@@ -1158,7 +1158,7 @@ match_re:
pc->extfunc = bc->extfunc;
pc->expr_count = arg_count; /* actual argument count */
(pc + 1)->func_name = fname; /* name of the builtin */
- (pc + 1)->c_func = bc->c_func; /* min and max args */
+ (pc + 1)->c_function = bc->c_function; /* min and max args */
ni = pc;
JUMPTO(ni);
}
diff --git a/m4/ChangeLog b/m4/ChangeLog
index d3a23cc3..49e29d7b 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-21 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * arch.m4: Improvements and enable compiling with unlocked stdio.
+
2016-08-25 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.4: Release tar ball made.
diff --git a/m4/arch.m4 b/m4/arch.m4
index 70cee013..bab9943a 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -38,15 +38,15 @@ if test "x$ac_cv_zos_uss" = "xyes"
then
dnl Identify the compiler.
ac_zos_uss_cc_id=unknown
- echo " $CC " | $EGREP ' (/bin/)?c89[ |_]' >/dev/null && ac_zos_uss_cc_id=c89
- echo " $CC " | $EGREP ' (/bin/)?c99[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?cc[ |_]' >/dev/null && ac_zos_uss_cc_id=cc
- echo " $CC " | $EGREP ' (/bin/)?xlc[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
- echo " $CC " | $EGREP ' (/bin/)?xlC[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
- echo " $CC " | $EGREP ' (/bin/)?xlc\+\+[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP [' (/bin/)?c89[ |_]'] >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP [' (/bin/)?c99[ |_]'] >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP [' (/bin/)?cc[ |_]'] >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP [' (/bin/)?xlc[ |_]'] >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP [' (/bin/)?xlC[ |_]'] >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP [' (/bin/)?xlc\+\+[ |_]'] >/dev/null && ac_zos_uss_cc_id=xlc++
test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
dnl These feature test macros are needed on z/OS.
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_OPEN_SYS_UNLOCKED_EXT"
test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
case "$ac_zos_uss_cc_id" in
c89)