Jose Morales wrote:
Roberto Bagnara wrote:
Hi there,
would you please consider adding to ciao_prolog.h the definition of macros allowing to determine the Ciao Prolog version at compile time? I mean, like the macros
SICSTUS_MAJOR_VERSION SICSTUS_MINOR_VERSION SICSTUS_REVISION_VERSION SICSTUS_BETA_VERSION
defined by sicstus.h and the macro
PLVERSION
by SWI-Prolog.h.
Sorry for the delay in the answer... I have just committed a patch to define
CIAO_MAJOR_VERSION CIAO_MINOR_VERSION CIAO_PATCH_VERSION CIAO_SVNREV
You can check for older Ciao version by checking that any of them are undefined, e.g.
#if !defined(CIAO_MAJOR_VERSION) ...Ciao 1.10... #elif CIAO_MAJOR_VERSION == 1 && CIAO_MINOR_VERSION >= 13 ... #endif
Please, tell me if it is enough for PPL.
It is, thanks. However, since you probably will not stay with SVN forever, I would replace `CIAO_SVNREV' by the two macros:
CIAO_VCS (0 for distribution packages, 1 for SVN, 2 for GIT, 3 for YOU-NAME-IT, ...) CIAO_VCS_REVISION (0 if CIAO_VCS is 0, same as your CIAO_SVNREV if CIAO_VCS is 1). All the best,
Roberto