From 39429e370c13cef9270f2b2fa897214f82364c5c Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 19 Sep 2023 18:42:34 -0700 Subject: [PATCH] fix errtbl.c to compile under gcc When errtbl.c is being compiled for the errcode executable, (when ERRCODE_SRC is defined), skip functions that make called to math_error() and name_newerrorstr() from libcalc. --- errtbl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/errtbl.c b/errtbl.c index 2db3ac6..1d2c439 100644 --- a/errtbl.c +++ b/errtbl.c @@ -1683,6 +1683,12 @@ errsym_2_errnum(CONST char *errsym) } +/* + * The code below is not compatible with the errcode executable + */ +#if !defined(ERRCODE_SRC) + + /* * errnum_2_errsym - convert an errnum value into an errsym E_STRING, possibly malloced * @@ -1934,6 +1940,9 @@ errsym_2_errmsg(CONST char *errsym, bool *palloced) } +#endif /* !ERRCODE_SRC */ + + /* * The code below is used to form the errcode executable and is NOT part of libcalc */