EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: #ifdef EPICS3_14
From: Dirk Zimoch <[email protected]>
To: [email protected]
Cc: Till Straumann <[email protected]>, Steven Hartman <[email protected]>, EPICS tech-talk <[email protected]>
Date: Thu, 21 Jul 2005 08:35:39 +0200
I use:

#if ((EPICS_VERSION==3 && EPICS_REVISION>=14) || EPICS_VERSION>3)
#include<epicsExport.h>
epicsExportAddress(dset,devAiStream);
#endif

Dirk


David M. Kline wrote:


Till Straumann wrote:

David M. Kline wrote:

i use something like this:
------------------------------------------------------------------------------------------


/* EPICS base version-specific definitions (must be performed first) */
#include <epicsVersion.h>
#define LT_EPICSBASE(v,r,l) ((EPICS_VERSION<=(v)) && (EPICS_REVISION<=(r)) && (EPICS_MODIFICATION<(l)))


I believe your test is wrong - 3.13.8 would not pass LT_EPICBASE(3,14,6), i.e., would not reach
the #error statement


It should be

( EPICS_VERSION<(v) ||
(EPICS_VERSION==(v) && ( EPICS_REVISION < (r) ||
( EPICS_REVISION == (r) && EPICS_MODIFICATION < (l) )
)
)
)


BTW: wrong implementations can be found in gtr and other packages which illustrates
that having a correct version in a base header would make real sense. Applications could
then test



i agree.


oops ... you are absolutely correct, i'm embarrassed. sorry to everyone for the
misinformation... (i'll go crawl into a hole now.)


thanks for bringing this to my attention,
/david


#if !defined(LT_EPICSBASE) || LT_EPICSBASE(x,y,z) #error #endif

Regards
-- Till

/* Evaluate EPICS base */
#if LT_EPICSBASE(3,14,6)
#error "EPICS base must be 3.14.6 or greater"
#endif
------------------------------------------------------------------------------------------


you can make variations as well..

tschuess!
/david


Steven Hartman wrote:


I have a number of EPICS 3.13 VxWorks device/drivers which I would like to
start using with EPICS 3.14, also with VxWorks. From the "Converting an
EPICS R3.13 application to R3.14.4" document, I see that the addition of
two lines is the minimum that is required.


I would like to be able to maintain the same source code for both the 3.13
and 3.14 apps. So, what I would like to be able to do is something like:


#ifdef EPICS3_14
 #include <epicsExport.h>
 . . .
 epicsExportAddress(dset,devFoo);
#endif

My question is, Is there already an `official' identifier defined to use
for such preprocessor conditionals that I can use for this?


Thanks,



--


+-------------------------------------------------+
Argonne National Laboratory
APS Operations Division (AOD)
Beamline Controls and Data Acquisition (BCDA)

EPICS Application Development and Beamline Support
David M. Kline
(630) 252-8639
[email protected]
+-------------------------------------------------+





-- Dr. Dirk Zimoch Swiss Light Source Paul Scherrer Institut Computing and Controls phone +41 56 310 5182 fax +41 56 310 4413

References:
#ifdef EPICS3_14 Steven Hartman
Re: #ifdef EPICS3_14 David M. Kline
Re: #ifdef EPICS3_14 Till Straumann
Re: #ifdef EPICS3_14 David M. Kline

Navigate by Date:
Prev: Re: #ifdef EPICS3_14 David M. Kline
Next: Re: iocLogServer change? Carl Cork
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: #ifdef EPICS3_14 David M. Kline
Next: announcing EPICS meeting on 6/ 7 Oct. before ICALEPCS Matthias Clausen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·