Proposed changes for v2.14.1.1

Added a few remarks on calc version numbers to version.c.

Fixed how fposval.h is built.  On a number of systems, the fposval.c
file failed to compile incorrectly.  This caused problems for systems in
which fposval.h.def was not correct.

Fixed how have_memmv.h is built.  On a number of systems, the have_memmv.c
file failed to compile incorrectly, producing a potentially incorrect
have_memmv.h file for such systems.

Fixed how align32.h is built.  On a number of systems, the align32.c
file failed to compile incorrectly, producing a potentially incorrect
align32.h file for such systems.

Fixed how have_newstr.h is built.  On a number of systems, the have_newstr.c
failed to compile incorrectly, producing a potentially incorrect
have_newstr.h file for such systems.

Fixed how have_strdup.h is built.  On a number of systems, the have_strdup.c
file failed to compile incorrectly, producing a potentially incorrect
have_strdup.h file for such systems.

Fixed how have_strlcat.h is built.  On a number of systems, the have_strlcat.c
file failed to compile incorrectly, producing a potentially incorrect
have_strlcat.h file for such systems.

Fixed how have_strlcpy.h is built.  On a number of systems, the have_strlcpy.c
file failed to compile incorrectly, producing a potentially incorrect
have_strlcpy.h file for such systems.

Fixed how have_uid_t.h is built.  On a number of systems, the have_uid_t.c
file failed to compile incorrectly, producing a potentially incorrect
have_uid_t.h file for such systems.

Fixed how have_uid_t.h is built.  On a number of systems, the have_uid_t.c
file failed to compile incorrectly, producing a potentially incorrect
have_uid_t.h file for such systems.
This commit is contained in:
Landon Curt Noll
2022-11-27 13:28:32 -08:00
parent 3e4391e2af
commit 3b3bfb3f74
7 changed files with 115 additions and 19 deletions

38
CHANGES
View File

@@ -65,6 +65,44 @@ The following are the changes from calc version 2.14.1.0 to date:
The value produced by str_comma() is returned.
Added a few remarks on calc version numbers to version.c.
Fixed how fposval.h is built. On a number of systems, the fposval.c
file failed to compile incorrectly. This caused problems for systems in
which fposval.h.def was not correct.
Fixed how have_memmv.h is built. On a number of systems, the have_memmv.c
file failed to compile incorrectly, producing a potentially incorrect
have_memmv.h file for such systems.
Fixed how align32.h is built. On a number of systems, the align32.c
file failed to compile incorrectly, producing a potentially incorrect
align32.h file for such systems.
Fixed how have_newstr.h is built. On a number of systems, the have_newstr.c
failed to compile incorrectly, producing a potentially incorrect
have_newstr.h file for such systems.
Fixed how have_strdup.h is built. On a number of systems, the have_strdup.c
file failed to compile incorrectly, producing a potentially incorrect
have_strdup.h file for such systems.
Fixed how have_strlcat.h is built. On a number of systems, the have_strlcat.c
file failed to compile incorrectly, producing a potentially incorrect
have_strlcat.h file for such systems.
Fixed how have_strlcpy.h is built. On a number of systems, the have_strlcpy.c
file failed to compile incorrectly, producing a potentially incorrect
have_strlcpy.h file for such systems.
Fixed how have_uid_t.h is built. On a number of systems, the have_uid_t.c
file failed to compile incorrectly, producing a potentially incorrect
have_uid_t.h file for such systems.
Fixed how have_uid_t.h is built. On a number of systems, the have_uid_t.c
file failed to compile incorrectly, producing a potentially incorrect
have_uid_t.h file for such systems.
The following are the changes from calc version 2.14.0.15 to 2.14.0.15:

View File

@@ -3264,7 +3264,8 @@ have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h \
fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \
endian_calc.h banned.h have_ban_pragma.h fposval.h.def alloc.h \
have_newstr.h have_memmv.h ${MAKE_FILE} ${LOC_MKF}
have_newstr.h have_memmv.h have_string.h have_const.h have_string.h \
have_unused.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f fposval_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3431,7 +3432,7 @@ have_posscl.h: have_posscl.c have_fpos.h have_unistd.h \
fi
align32.h: align32.c longbits.h have_unistd.h \
banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
banned.h have_ban_pragma.h have_unused.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f align32 align32_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3609,7 +3610,7 @@ have_arc4random.h: have_arc4random.c have_stdlib.h \
${TRUE}; \
fi
have_newstr.h: have_newstr.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_newstr.h: have_newstr.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f newstr_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3649,7 +3650,7 @@ have_newstr.h: have_newstr.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_memmv.h: have_memmv.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_memmv.h: have_memmv.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3968,7 +3969,7 @@ have_rusage.h: have_rusage.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_strdup.h: have_strdup.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_strdup.h: have_strdup.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f strdup_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -4206,7 +4207,7 @@ have_ban_pragma.h: have_ban_pragma.c banned.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h \
have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h have_string.h \
${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f unused_tmp $@
${H} echo 'forming $@'
@@ -4248,7 +4249,7 @@ have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h \
${TRUE}; \
fi
have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h \
have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h have_string.h \
${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f unused_tmp $@
${H} echo 'forming $@'
@@ -5802,7 +5803,9 @@ addop.o: zmath.h
align32.o: align32.c
align32.o: banned.h
align32.o: have_ban_pragma.h
align32.o: have_stdlib.h
align32.o: have_unistd.h
align32.o: have_unused.h
align32.o: longbits.h
assocfunc.o: alloc.h
assocfunc.o: assocfunc.c
@@ -6153,9 +6156,11 @@ file.o: value.h
file.o: zmath.h
fposval.o: alloc.h
fposval.o: banned.h
fposval.o: decl.h
fposval.o: endian_calc.h
fposval.o: fposval.c
fposval.o: have_ban_pragma.h
fposval.o: have_const.h
fposval.o: have_fpos.h
fposval.o: have_fpos_pos.h
fposval.o: have_memmv.h
@@ -6163,6 +6168,7 @@ fposval.o: have_newstr.h
fposval.o: have_offscl.h
fposval.o: have_posscl.h
fposval.o: have_string.h
fposval.o: have_unused.h
func.o: alloc.h
func.o: attribute.h
func.o: banned.h

View File

@@ -2578,7 +2578,8 @@ have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h \
fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \
endian_calc.h banned.h have_ban_pragma.h fposval.h.def alloc.h \
have_newstr.h have_memmv.h ${MAKE_FILE} ${LOC_MKF}
have_newstr.h have_memmv.h have_string.h have_const.h have_string.h \
have_unused.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f fposval_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -2745,7 +2746,7 @@ have_posscl.h: have_posscl.c have_fpos.h have_unistd.h \
fi
align32.h: align32.c longbits.h have_unistd.h \
banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
banned.h have_ban_pragma.h have_unused.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f align32 align32_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -2923,7 +2924,7 @@ have_arc4random.h: have_arc4random.c have_stdlib.h \
${TRUE}; \
fi
have_newstr.h: have_newstr.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_newstr.h: have_newstr.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f newstr_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -2963,7 +2964,7 @@ have_newstr.h: have_newstr.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_memmv.h: have_memmv.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_memmv.h: have_memmv.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3282,7 +3283,7 @@ have_rusage.h: have_rusage.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_strdup.h: have_strdup.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
have_strdup.h: have_strdup.c banned.h have_ban_pragma.h have_string.h ${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f strdup_tmp $@
${H} echo 'forming $@'
${Q} echo '/*' > $@
@@ -3520,7 +3521,7 @@ have_ban_pragma.h: have_ban_pragma.c banned.h ${MAKE_FILE} ${LOC_MKF}
${TRUE}; \
fi
have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h \
have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h have_string.h \
${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f unused_tmp $@
${H} echo 'forming $@'
@@ -3562,7 +3563,7 @@ have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h \
${TRUE}; \
fi
have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h \
have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h have_string.h \
${MAKE_FILE} ${LOC_MKF}
${Q} ${RM} -f unused_tmp $@
${H} echo 'forming $@'
@@ -5070,7 +5071,9 @@ addop.o: zmath.h
align32.o: align32.c
align32.o: banned.h
align32.o: have_ban_pragma.h
align32.o: have_stdlib.h
align32.o: have_unistd.h
align32.o: have_unused.h
align32.o: longbits.h
assocfunc.o: alloc.h
assocfunc.o: assocfunc.c
@@ -5421,9 +5424,11 @@ file.o: value.h
file.o: zmath.h
fposval.o: alloc.h
fposval.o: banned.h
fposval.o: decl.h
fposval.o: endian_calc.h
fposval.o: fposval.c
fposval.o: have_ban_pragma.h
fposval.o: have_const.h
fposval.o: have_fpos.h
fposval.o: have_fpos_pos.h
fposval.o: have_memmv.h
@@ -5431,6 +5436,7 @@ fposval.o: have_newstr.h
fposval.o: have_offscl.h
fposval.o: have_posscl.h
fposval.o: have_string.h
fposval.o: have_unused.h
func.o: alloc.h
func.o: attribute.h
func.o: banned.h

View File

@@ -27,6 +27,11 @@
#include <stdio.h>
#include <signal.h>
#include "have_stdlib.h"
#if defined(HAVE_STDLIB_H)
#include <stdlib.h>
#endif
#include "longbits.h"
#include "have_unistd.h"
@@ -34,11 +39,13 @@
#include <unistd.h>
#endif
#include "have_unused.h"
#include "banned.h" /* include after system header <> includes */
static void buserr(void); /* catch alignment errors */
static void buserr(int arg); /* catch alignment errors */
int
@@ -46,7 +53,7 @@ main(void)
{
char byte[2*sizeof(USB32)]; /* mis-alignment buffer */
USB32 *p; /* mis-alignment pointer */
int i;
unsigned long i;
#if defined(MUST_ALIGN32)
/* force alignment */
@@ -82,7 +89,7 @@ main(void)
*/
/*ARGSUSED*/
static void
buserr(int arg)
buserr(int UNUSED(arg))
{
/* alignment is required */
printf("#define MUST_ALIGN32\t%c* must align 32 bit values *%c\n",

View File

@@ -59,12 +59,19 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "have_string.h"
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#include "decl.h"
#include "have_fpos.h"
#include "endian_calc.h"
#include "have_offscl.h"
#include "have_posscl.h"
#include "have_fpos_pos.h"
#include "alloc.h"
#include "have_unused.h"
#include "have_memmv.h"
#include "banned.h" /* include after system header <> includes */
@@ -73,7 +80,7 @@
char *program; /* our name */
int
main(int argc, char **argv)
main(int UNUSED(argc), char **argv)
{
int stsizelen; /* bit length of st_size in buf */
int fileposlen; /* bit length of FILEPOS */

View File

@@ -65,6 +65,8 @@ main(void)
extern uid_t geteuid();
curds = geteuid();
/* force curds to be used, but do not print much info about our UID */
printf("/* geteuid() mod 2 == %ld */\n", ((long)curds) & 0x1);
printf("#define HAVE_UID_T /* yes */\n");

View File

@@ -51,10 +51,40 @@ static char *program;
#include "banned.h" /* include after system header <> includes */
/*
* MAJOR_VER
*
* The MAJOR_VER remains at 2. That are concepts for version 3 calc,
* but that is a long way off. One of the main reasons why MAJOR_VER
* might incremented is if fundamental calc data objects (such as when ZVALUE
* or NUMBER or COMPLEX need to change) that would cause an incompatibility
* with existing hardware accelerators that are using fundamental calc data objects.
*
* MINOR_VER
*
* The MINOR_VER changes when there are incompatible changes to the calc library
* or calc custom library. The MINOR_VER might change if we need to make a major
* change to the math engine. For example, when the way 0^x was evaluated, we
* changed MINOR_VER from 13 to 14.
*
* MAJOR_PATCH
*
* The MAJOR_PATCH changes when there is an update to the calc library
* or calc custom library. For example, the MAJOR_PATCH might increment when there
* are new builtin functions available, or when there is a change to how existing
* builtin functions process arguments.
*
* MINOR_PATCH
*
* The MINOR_PATCH changes whenever there is any change in the calc release.
* For example, when the documentation changes, the MINOR_PATCH will increment.
* Moreover, when we are working towards a new production release,
* bug fix and improvement updates will cause MINOR_PATCH to increment.
*/
#define MAJOR_VER 2 /* major library version */
#define MINOR_VER 14 /* minor library version */
#define MAJOR_PATCH 1 /* major software version level */
#define MINOR_PATCH 0 /* minor software version level */
#define MINOR_PATCH 1 /* minor software version level */
/*