New decimal constants ECL_VERSION_NUMBER (C/C++) and EXT:+ECL-VERSION-NUMBER+ (Lisp)

This commit is contained in:
Juan Jose Garcia Ripoll 2009-02-23 21:45:02 +01:00
parent 16849b5eb3
commit 402e59f82f
6 changed files with 26 additions and 6 deletions

View file

@ -87,6 +87,11 @@ ECL 9.1.0:
now stored using an (ARRAY (SIGNED-BYTE 32)). This saves memory on
systems with 64-bit pointers.
- Two new constants, a C macro ECL_VERSION_NUMBER, and Lisp constant
EXT:+ECL-VERSION-NUMBER+, allow determining the version of ECL with
a greater granurality. The constant is a decimal number, yymmaa,
matching the ECL versioning scheme.
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

View file

@ -1749,5 +1749,7 @@ cl_symbols[] = {
{EXT_ "HEAP-SIZE", EXT_ORDINARY, si_heap_size, -1, OBJNULL},
#endif
{EXT_ "+ECL-VERSION-NUMBER+", EXT_CONSTANT, NULL, -1, MAKE_FIXNUM(ECL_VERSION_NUMBER)},
/* Tag for end of list */
{NULL, CL_ORDINARY, NULL, -1, OBJNULL}};

View file

@ -1749,5 +1749,7 @@ cl_symbols[] = {
{EXT_ "HEAP-SIZE","si_heap_size"},
#endif
{EXT_ "+ECL-VERSION-NUMBER+",NULL},
/* Tag for end of list */
{NULL,NULL}};

10
src/configure vendored
View file

@ -654,6 +654,7 @@ CL_FIXNUM_TYPE
EGREP
GREP
XMKMF
ECL_VERSION_NUMBER
SONAME_LDFLAGS
SONAME
SONAME1
@ -5162,6 +5163,9 @@ fi
{ $as_echo "$as_me:$LINENO: checking for soname flags" >&5
$as_echo_n "checking for soname flags... " >&6; }
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'`
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'`
if test "${enable_soname}" != yes; then
SONAME=''
SONAME1=''
@ -5172,9 +5176,6 @@ if test "${enable_soname}" != yes; then
{ $as_echo "$as_me:$LINENO: result: none" >&5
$as_echo "none" >&6; }
else
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'`
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_LEAST}"
SONAME3=`echo $SONAME | sed "s,.SOVERSION,.$i,g"`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}"
@ -5192,6 +5193,9 @@ fi
ECL_VERSION_NUMBER=$(($PACKAGE_MAJOR * 10000 + $PACKAGE_MINOR * 100 + $PACKAGE_LEAST))
if test "${with_fpe}" != yes; then
cat >>confdefs.h <<\_ACEOF
#define ECL_AVOID_FPE_H 1

View file

@ -397,6 +397,9 @@ dnl ----------------------------------------------------------------------
dnl SONAME is only active when SONAME_LDFLAGS and SONAME are non nil
dnl
AC_MSG_CHECKING(for soname flags)
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'`
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'`
if test "${enable_soname}" != yes; then
SONAME=''
SONAME1=''
@ -406,9 +409,6 @@ if test "${enable_soname}" != yes; then
SONAME_LDFLAGS=''
AC_MSG_RESULT([none])
else
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'`
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_LEAST}"
SONAME3=`echo $SONAME | sed "s,.SOVERSION,.$i,g"`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}"
@ -425,6 +425,10 @@ AC_SUBST(SONAME1)
AC_SUBST(SONAME)
AC_SUBST(SONAME_LDFLAGS)
dnl Related to that, the package version number
ECL_VERSION_NUMBER=$(($PACKAGE_MAJOR * 10000 + $PACKAGE_MINOR * 100 + $PACKAGE_LEAST))
AC_SUBST(ECL_VERSION_NUMBER)
dnl ----------------------------------------------------------------------
dnl Deactivate floating point exceptions if asked to
if test "${with_fpe}" != yes; then

View file

@ -39,6 +39,9 @@
# define ECL_API
#endif
/* Decimal number made with the formula yymmvv */
#define ECL_VERSION_NUMBER @ECL_VERSION_NUMBER@
/*
* FEATURES LINKED IN
*/