File tree Expand file tree Collapse file tree 7 files changed +35
-8
lines changed
Expand file tree Collapse file tree 7 files changed +35
-8
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,22 @@ The following are the changes from calc version 2.12.6.9 to date:
2020 Added experimential %g printf (and strprintf) format implementation
2121 based on pull request from github user 10110111.
2222
23+ Made exterimental changes to macOS builds to not require use of
24+ /usr/include. The INCDIR for macOS uses:
25+
26+ INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include
27+
28+ to determine the upper path of the /usr/include directory for macOS.
29+ The Darwin target seems to not automatically detected. For now,
30+ under macOS, declare the target as darwin:
31+
32+ # for macOS users only, force the target to be darwin
33+ #
34+ make target=Darwin clobber
35+ make target=Darwin all
36+ make target=Darwin chk
37+ make target=Darwin install
38+
2339
2440The following are the changes from calc version 2.12.6.6 to 2.12.6.8:
2541
Original file line number Diff line number Diff line change @@ -32,6 +32,16 @@ Installing calc from the bzip2-ed tarball in 4 easy steps:
3232 targets, the default make is sufficent. On FreeBSD for example,
3333 one must use gmake instead of make.
3434
35+ Some report that under macOS, one has to declare the target
36+ to be darwin. So for macOS, one might have to do:
37+
38+ # for macOS users only, force the target to be darwin
39+ #
40+ make target=Darwin clobber
41+ make target=Darwin all
42+ make target=Darwin chk
43+ make target=Darwin install
44+
3545 If your target system does not have GNU Make (or equivalent), then
3646 you should try using the Makefile.simple and custom/Makefile.simple
3747 files:
Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ HAVE_UNUSED=
575575ifeq ($(target ) ,Darwin)
576576
577577# default INCDIR for macOS
578- INCDIR = /usr/local /include
578+ INCDIR = $( shell xcrun --show-sdk-path --sdk macosx) /usr/include
579579
580580else
581581# endif /* end of skip for non-Gnu makefiles */
@@ -1054,7 +1054,7 @@ EXT=
10541054
10551055# The default calc versions
10561056#
1057- VERSION = 2.12.6.8
1057+ VERSION = 2.12.6.9
10581058
10591059# Names of shared libraries with versions
10601060#
@@ -2179,7 +2179,7 @@ TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS}
21792179all : check_include ${BLD_TYPE} CHANGES
21802180
21812181check_include :
2182- $(Q ) if [ ! -d /usr/include ]; then \
2182+ $(Q ) if [ ! -d ${INCDIR} ]; then \
21832183 echo " ERROR: critical directory missing: /usr/include" 1>&2 ; \
21842184 echo " Without this critical directory, we cannot compile." 1>&2 ; \
21852185 echo 1>&2 ; \
@@ -2191,7 +2191,7 @@ check_include:
21912191 echo 1>&2 ; \
21922192 exit 1; \
21932193 fi
2194- $(Q ) if [ ! -f /usr/include /stdio.h ]; then \
2194+ $(Q ) if [ ! -f ${INCDIR} /stdio.h ]; then \
21952195 echo " ERROR: critical include files are missing" 1>&2 ; \
21962196 echo " Without this critical directory, we cannot compile." 1>&2 ; \
21972197 echo 1>&2 ; \
Original file line number Diff line number Diff line change 348348
349349# The default calc versions
350350#
351- VERSION = 2.12.6.8
351+ VERSION = 2.12.6.9
352352
353353# Names of shared libraries with versions
354354#
Original file line number Diff line number Diff line change 348348
349349# The default calc versions
350350#
351- VERSION = 2.12.6.8
351+ VERSION = 2.12.6.9
352352
353353# Names of shared libraries with versions
354354#
Original file line number Diff line number Diff line change @@ -253,10 +253,11 @@ qprintnum(NUMBER *q, int outmode)
253253 * does not depend on changing conf->outdigits.
254254 */
255255 const int P = conf -> outdigits ? conf -> outdigits : 1 ;
256+ long olddigits ;
256257 tmpval = * q ;
257258 tmpval .num .sign = 0 ;
258259 exp = qilog10 (& tmpval );
259- const long olddigits = conf -> outdigits ;
260+ olddigits = conf -> outdigits ;
260261 if (P > exp && exp >= - P ) {
261262 conf -> outdigits = P - 1 - exp ;
262263 qprintnum (q , MODE_REAL );
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ static char *program;
4545#define MAJOR_VER 2 /* major library version */
4646#define MINOR_VER 12 /* minor library version */
4747#define MAJOR_PATCH 6 /* major software level under library version */
48- #define MINOR_PATCH 8 /* minor software level or 0 if not patched */
48+ #define MINOR_PATCH 9 /* minor software level or 0 if not patched */
4949
5050
5151/*
You can’t perform that action at this time.
0 commit comments