Release 2.12.6.9

Experimental changes for macOS builds.
This commit is contained in:
Landon Curt Noll
2018-10-15 19:37:48 -07:00
parent 5cfa6199e5
commit 2ea77e6151
7 changed files with 35 additions and 8 deletions

16
CHANGES
View File

@@ -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 Added experimential %g printf (and strprintf) format implementation
based on pull request from github user 10110111. 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: The following are the changes from calc version 2.12.6.6 to 2.12.6.8:

View File

@@ -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, targets, the default make is sufficent. On FreeBSD for example,
one must use gmake instead of make. 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 If your target system does not have GNU Make (or equivalent), then
you should try using the Makefile.simple and custom/Makefile.simple you should try using the Makefile.simple and custom/Makefile.simple
files: files:

View File

@@ -575,7 +575,7 @@ HAVE_UNUSED=
ifeq ($(target),Darwin) ifeq ($(target),Darwin)
# default INCDIR for macOS # default INCDIR for macOS
INCDIR= /usr/local/include INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include
else else
#endif /* end of skip for non-Gnu makefiles */ #endif /* end of skip for non-Gnu makefiles */
@@ -1054,7 +1054,7 @@ EXT=
# The default calc versions # The default calc versions
# #
VERSION= 2.12.6.8 VERSION= 2.12.6.9
# Names of shared libraries with versions # Names of shared libraries with versions
# #
@@ -2179,7 +2179,7 @@ TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS}
all: check_include ${BLD_TYPE} CHANGES all: check_include ${BLD_TYPE} CHANGES
check_include: check_include:
$(Q) if [ ! -d /usr/include ]; then \ $(Q) if [ ! -d ${INCDIR} ]; then \
echo "ERROR: critical directory missing: /usr/include" 1>&2; \ echo "ERROR: critical directory missing: /usr/include" 1>&2; \
echo "Without this critical directory, we cannot compile." 1>&2; \ echo "Without this critical directory, we cannot compile." 1>&2; \
echo 1>&2; \ echo 1>&2; \
@@ -2191,7 +2191,7 @@ check_include:
echo 1>&2; \ echo 1>&2; \
exit 1; \ exit 1; \
fi 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 "ERROR: critical include files are missing" 1>&2; \
echo "Without this critical directory, we cannot compile." 1>&2; \ echo "Without this critical directory, we cannot compile." 1>&2; \
echo 1>&2; \ echo 1>&2; \

View File

@@ -348,7 +348,7 @@ EXT=
# The default calc versions # The default calc versions
# #
VERSION= 2.12.6.8 VERSION= 2.12.6.9
# Names of shared libraries with versions # Names of shared libraries with versions
# #

View File

@@ -348,7 +348,7 @@ EXT=
# The default calc versions # The default calc versions
# #
VERSION= 2.12.6.8 VERSION= 2.12.6.9
# Names of shared libraries with versions # Names of shared libraries with versions
# #

3
qio.c
View File

@@ -253,10 +253,11 @@ qprintnum(NUMBER *q, int outmode)
* does not depend on changing conf->outdigits. * does not depend on changing conf->outdigits.
*/ */
const int P = conf->outdigits ? conf->outdigits : 1; const int P = conf->outdigits ? conf->outdigits : 1;
long olddigits;
tmpval = *q; tmpval = *q;
tmpval.num.sign = 0; tmpval.num.sign = 0;
exp = qilog10(&tmpval); exp = qilog10(&tmpval);
const long olddigits = conf->outdigits; olddigits = conf->outdigits;
if (P > exp && exp >= -P) { if (P > exp && exp >= -P) {
conf->outdigits = P - 1 - exp; conf->outdigits = P - 1 - exp;
qprintnum(q, MODE_REAL); qprintnum(q, MODE_REAL);

View File

@@ -45,7 +45,7 @@ static char *program;
#define MAJOR_VER 2 /* major library version */ #define MAJOR_VER 2 /* major library version */
#define MINOR_VER 12 /* minor library version */ #define MINOR_VER 12 /* minor library version */
#define MAJOR_PATCH 6 /* major software level under 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 */
/* /*