From a50d73d5782a351ad83e8d1f84d11720a12e70d3 Mon Sep 17 00:00:00 2001 From: "Stephen J. Kiernan" Date: Mon, 17 Apr 2023 19:27:54 -0400 Subject: [PATCH] loader: Change version calculation to be more consistent. Use 1000 * major + minor when calculating the version number that gets set in the Ficl environment or lua loader property. This allows for more room if the minor number needs to go above 9. Add loader.version property to lua loader. Reviewed by: imp Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39631 --- stand/common/bootstrap.h | 1 + stand/common/interp_forth.c | 1 - stand/common/newvers.sh | 2 +- stand/liblua/lutils.c | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 80c1a2352b3..d62a936e6ff 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -182,6 +182,7 @@ extern int isapnp_readport; * Version information */ extern char bootprog_info[]; +extern unsigned bootprog_rev; /* * Interpreter information diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c index 19f1c75dc19..edf21e53dc1 100644 --- a/stand/common/interp_forth.c +++ b/stand/common/interp_forth.c @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "ficl.h" -extern unsigned bootprog_rev; INTERP_DEFINE("4th"); /* #define BFORTH_DEBUG */ diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 714adba6c9c..1a3ceb91af1 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -57,6 +57,6 @@ fi cat > $tempfile <