On 02.04.19 19:37, Johnson, Andrew N. wrote:
Hi Dirk,
On 4/2/19 9:24 AM, Dirk Zimoch via Core-talk wrote:
The function definition errSymbolAdd() (and others) have disappeared
from errMdef.h. Thus when compiling a driver including errMdef.h and
using errSymbolAdd(), I get a compiler warning because of the missing
function prototype.
The prototypes are now in the new header file errSymTbl.h. But simply
including the new file instead is no good solution, because then the
driver does not compile with older EPICS versions any more.
Instead I have use compiler branches based on EPICS versions. That is
a bit inconvenient.
Not sure what you mean by "compiler branches" there.
I meant preprocessor branches: #if EPICS_VERSION >= 7
You could do this:
#include <errMdef.h>
#ifndef M_syd
#include <errSymTbl.h>
#endif
I believe the M_syd macro has not been used since before I started with
EPICS. The comment for it said "Sync Data Routines; see sydDefs.h" but
that header has not been present in any 3.13 release so I finally
deleted that symbol while restructuring the libcom/src/error files.
Alternatively you could do a version number check (see the other
epicsVersion.h thread for details) but the above suggestion is simpler
and faster.
M_syd does not exist in 7.0.1. Also M_* macros seem to come and go. For
example M_ts disappears. So this type of branching would be not only
obfuscating the real reason for the branch but would also be unstable
against future changes.
Instead I did the second alternative, branching on EPICS_VERSION.
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- Replies:
- Re: EPICS 7 incompatibility in errMdef.h Johnson, Andrew N. via Core-talk
- References:
- EPICS 7 incompatibility in errMdef.h Dirk Zimoch via Core-talk
- Re: EPICS 7 incompatibility in errMdef.h Johnson, Andrew N. via Core-talk
- Navigate by Date:
- Prev:
Re: EPICS 7 incompatibility in errMdef.h Dirk Zimoch via Core-talk
- Next:
a question on a commit comment Jeong Han Lee via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS 7 incompatibility in errMdef.h Johnson, Andrew N. via Core-talk
- Next:
Re: EPICS 7 incompatibility in errMdef.h Johnson, Andrew N. via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|