EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Different behavior on dbdToRecordTypeH - include guard
From: Andrew Johnson <[email protected]>
To: "Kim, Kukhee" <[email protected]>, "[email protected] Talk" <[email protected]>
Date: Wed, 10 Dec 2014 18:01:23 -0600
Hi Kukhee,

On 12/10/2014 05:26 PM, Kim, Kukhee wrote:
> Some of my DBD files which define new record type, have the include
> statements to bring other DBD files (netsting other DBD).
> Usually, the nesting DBD has new menu types.
> Previous tool puts the include guard for each "typedef" statements,
> but the new one doesn't do.

Ahh, menu definitions in record types, now I understand your problem: In
3.14 each menu got a separate include guard in the generated *Record.h
file, e.g. the aoRecord.h file starts with:

> #ifndef INCaoOIFH
> #define INCaoOIFH
> typedef enum {
> 	aoOIF_Full,
> 	aoOIF_Incremental
> }aoOIF;
> #endif /*INCaoOIFH*/
> #ifndef INCaoH
> #define INCaoH
> #include "epicsTypes.h"

Note that if you tried to create a menu named 'ao' in the aoRecord.dbd
file the include guard generated for the menu would prevent you from
loading the record type since the names would be the same.

> It brings me duplicated declaration issue when I try to compile
> existing code for the new epics base.
> I can change my side to avoid it, but we also need to think about
> backward compatibility.

You should not include your external *Menu.dbd file from within your
*Record.dbd file. Either keep it as a separate file (which must still be
loaded by the IOCs) or move the menu definition into the Record.dbd file
entirely (and rename the menu, the usual convention is for
record-specific menus to be named beginning with the name of the record
type, such as the menu aoOIF shown above). That solution can be made to
compile for both versions of Base.

HTH,

- Andrew
-- 
People everywhere confuse what they read in newspapers with news.
-- A. J. Liebling

Replies:
RE: Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
References:
Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
Re: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
RE: Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee

Navigate by Date:
Prev: Re: Darwin SHRLIB_VERSION build error: multiple target patterns Andrew Johnson
Next: RE: Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
Next: RE: Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·