chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] getting exact chicken version during compile-time


From: felix winkelmann
Subject: Re: [Chicken-users] getting exact chicken version during compile-time
Date: Thu, 5 Apr 2007 13:46:36 +0200

On 4/5/07, foobar <address@hidden> wrote:
Hi,

i just tested the new c-string-list of the current head-revision
and it works like a charme. The problem that arises now, is
that i want to provide a workaround-implementation for
the current stable-release. For that purpose i need to
conditionally select one of the implementation during
compilation, depending on the chicken-version used.

Is there a way to accomplish this?


(chicken-version) gives you the current version as a string,
so you could check (with string>=?), for example inside a macro:

(define-macro (with-chicken v . body)
 (if (string>=? (chicken-version) "2.608")
     `(begin ,@body)
     '(void) ) )



cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]