From 9e464a4cc18c5ca8ccdc6ac30e082b8d6b315d67 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 30 Mar 2019 22:09:46 -0700 Subject: c++ maintenance: multiple defs of mod_s and bit_s. * arith.h (mod_s, bit_s): Add extern declarations. * ffi.c (bit_s): Remove definition. * match.c (mod_s): Remove definition. Include "arith.h" to obtain declaration of mod_s. --- arith.h | 1 + ffi.c | 2 +- match.c | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arith.h b/arith.h index e57c368e..4d4d0fd5 100644 --- a/arith.h +++ b/arith.h @@ -25,6 +25,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +extern val mod_s, bit_s; val make_bignum(void); val bignum(cnum cn); val bignum_from_long(long l); diff --git a/ffi.c b/ffi.c index f54ecddd..7dd5b9e5 100644 --- a/ffi.c +++ b/ffi.c @@ -122,7 +122,7 @@ val ptr_in_s, ptr_out_s, ptr_in_d_s, ptr_out_d_s, ptr_out_s_s, ptr_s; val closure_s; -val sbit_s, ubit_s, bit_s; +val sbit_s, ubit_s; /* bit_s is in arith.c */ val enum_s, enumed_s; diff --git a/match.c b/match.c index d36525b1..b2f38d19 100644 --- a/match.c +++ b/match.c @@ -48,6 +48,7 @@ #include "debug.h" #include "eval.h" #include "cadr.h" +#include "arith.h" #include "match.h" int opt_print_bindings = 0; @@ -57,7 +58,7 @@ int opt_arraydims = 1; val decline_k, next_spec_k, repeat_spec_k; val mingap_k, maxgap_k, gap_k, mintimes_k, maxtimes_k, times_k; val lines_k, chars_k; -val text_s, choose_s, gather_s, do_s, mdo_s, mod_s, modlast_s; +val text_s, choose_s, gather_s, do_s, mdo_s, modlast_s; /* mod_s in arith.c */ val line_s, data_s, fuzz_s, load_s; val include_s, close_s, require_s, in_package_s; val else_s, elif_s; -- cgit v1.2.3