Roberto Bagnara wrote:
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).
Thanks, that is a good idea! I think that it can be emulated as follows:
#if defined(CIAO_SVNREV) #define CIAO_VCS CIAO_VCS__SVN #define CIAO_VCS_REVISION CIAO_SVNREV #elif defined(CIAO_GITREV) ... #endif
so I will not touch it at this moment (unless you need it, of course).
--Jose
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------