diff --git a/CHANGES b/CHANGES index 7888bbf..222d515 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,22 @@ The following are the changes from calc version 2.12.6.9 to date: Added experimential %g printf (and strprintf) format implementation based on pull request from github user 10110111. + Made exterimental changes to macOS builds to not require use of + /usr/include. The INCDIR for macOS uses: + + INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include + + to determine the upper path of the /usr/include directory for macOS. + The Darwin target seems to not automatically detected. For now, + under macOS, declare the target as darwin: + + # for macOS users only, force the target to be darwin + # + make target=Darwin clobber + make target=Darwin all + make target=Darwin chk + make target=Darwin install + The following are the changes from calc version 2.12.6.6 to 2.12.6.8: diff --git a/HOWTO.INSTALL b/HOWTO.INSTALL index 90ae5e6..a2ef81d 100644 --- a/HOWTO.INSTALL +++ b/HOWTO.INSTALL @@ -32,6 +32,16 @@ Installing calc from the bzip2-ed tarball in 4 easy steps: targets, the default make is sufficent. On FreeBSD for example, one must use gmake instead of make. + Some report that under macOS, one has to declare the target + to be darwin. So for macOS, one might have to do: + + # for macOS users only, force the target to be darwin + # + make target=Darwin clobber + make target=Darwin all + make target=Darwin chk + make target=Darwin install + If your target system does not have GNU Make (or equivalent), then you should try using the Makefile.simple and custom/Makefile.simple files: diff --git a/Makefile.ship b/Makefile.ship index d367c70..88a8bc7 100644 --- a/Makefile.ship +++ b/Makefile.ship @@ -575,7 +575,7 @@ HAVE_UNUSED= ifeq ($(target),Darwin) # default INCDIR for macOS -INCDIR= /usr/local/include +INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include else #endif /* end of skip for non-Gnu makefiles */ @@ -1054,7 +1054,7 @@ EXT= # The default calc versions # -VERSION= 2.12.6.8 +VERSION= 2.12.6.9 # Names of shared libraries with versions # @@ -2179,7 +2179,7 @@ TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} all: check_include ${BLD_TYPE} CHANGES check_include: - $(Q) if [ ! -d /usr/include ]; then \ + $(Q) if [ ! -d ${INCDIR} ]; then \ echo "ERROR: critical directory missing: /usr/include" 1>&2; \ echo "Without this critical directory, we cannot compile." 1>&2; \ echo 1>&2; \ @@ -2191,7 +2191,7 @@ check_include: echo 1>&2; \ exit 1; \ fi - $(Q) if [ ! -f /usr/include/stdio.h ]; then \ + $(Q) if [ ! -f ${INCDIR}/stdio.h ]; then \ echo "ERROR: critical include files are missing" 1>&2; \ echo "Without this critical directory, we cannot compile." 1>&2; \ echo 1>&2; \ diff --git a/custom/Makefile b/custom/Makefile index be8585a..8b9ffcf 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -348,7 +348,7 @@ EXT= # The default calc versions # -VERSION= 2.12.6.8 +VERSION= 2.12.6.9 # Names of shared libraries with versions # diff --git a/custom/Makefile.head b/custom/Makefile.head index 8951507..d8dddf8 100644 --- a/custom/Makefile.head +++ b/custom/Makefile.head @@ -348,7 +348,7 @@ EXT= # The default calc versions # -VERSION= 2.12.6.8 +VERSION= 2.12.6.9 # Names of shared libraries with versions # diff --git a/qio.c b/qio.c index 478eb47..a63c189 100644 --- a/qio.c +++ b/qio.c @@ -253,10 +253,11 @@ qprintnum(NUMBER *q, int outmode) * does not depend on changing conf->outdigits. */ const int P = conf->outdigits ? conf->outdigits : 1; + long olddigits; tmpval = *q; tmpval.num.sign = 0; exp = qilog10(&tmpval); - const long olddigits = conf->outdigits; + olddigits = conf->outdigits; if (P > exp && exp >= -P) { conf->outdigits = P - 1 - exp; qprintnum(q, MODE_REAL); diff --git a/version.c b/version.c index ba1fab5..6d76c75 100644 --- a/version.c +++ b/version.c @@ -45,7 +45,7 @@ static char *program; #define MAJOR_VER 2 /* major library version */ #define MINOR_VER 12 /* minor library version */ #define MAJOR_PATCH 6 /* major software level under library version */ -#define MINOR_PATCH 8 /* minor software level or 0 if not patched */ +#define MINOR_PATCH 9 /* minor software level or 0 if not patched */ /*