aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-04-16 12:53:35 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-04-16 12:53:35 +0300
commit7c3d14eb1d103061939fdcad66bf2b27d78bc5b5 (patch)
tree215af173270e7d93496e9a9e14aeaaeeebea0be4 /awkgram.c
parent4afe3d81ba9bdf9443fbdaa43bef47fc20b1eb4b (diff)
downloadegawk-7c3d14eb1d103061939fdcad66bf2b27d78bc5b5.tar.gz
egawk-7c3d14eb1d103061939fdcad66bf2b27d78bc5b5.tar.bz2
egawk-7c3d14eb1d103061939fdcad66bf2b27d78bc5b5.zip
Rename intdiv to intdiv0, require it to be configured in.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index 3ad04500..fc935dc4 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -4547,7 +4547,9 @@ static const struct token tokentab[] = {
{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0, 0},
{"index", Op_builtin, LEX_BUILTIN, A(2), do_index, 0},
{"int", Op_builtin, LEX_BUILTIN, A(1), do_int, MPF(int)},
-{"intdiv", Op_builtin, LEX_BUILTIN, GAWKX|A(3), do_intdiv, MPF(intdiv)},
+#ifdef SUPPLY_INTDIV
+{"intdiv0", Op_builtin, LEX_BUILTIN, GAWKX|A(3), do_intdiv, MPF(intdiv)},
+#endif
{"isarray", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_isarray, 0},
{"length", Op_builtin, LEX_LENGTH, A(0)|A(1), do_length, 0},
{"load", Op_symbol, LEX_LOAD, GAWKX, 0, 0},
@@ -6846,6 +6848,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r)
arg = subn->nexti;
if (arg->nexti == arg->lasti && arg->nexti->opcode == Op_push)
arg->nexti->opcode = Op_push_arg_untyped; /* argument may be untyped */
+#ifdef SUPPLY_INTDIV
} else if (r->builtin == do_intdiv
#ifdef HAVE_MPFR
|| r->builtin == MPF(intdiv)
@@ -6855,6 +6858,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r)
ip = arg->lasti;
if (ip->opcode == Op_push)
ip->opcode = Op_push_array;
+#endif /* SUPPLY_INTDIV */
} else if (r->builtin == do_match) {
static bool warned = false;