Hi Andrew,
Thank you for your concern.
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.
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.
Please, let me know your opinion.
Thank you.
Best regards,
Kukhee
--------------------------------------------
Kukhee Kim
SLAC National Accelerator Laboratory
2575 Sand Hill Rd, MS 64
Menlo Park, CA 94025
Email: [email protected]
Phone: (650)926-4912
Fax: (650)926-3800
-----Original Message-----
From: Andrew Johnson [mailto:[email protected]]
Sent: Wednesday, December 10, 2014 2:27 PM
To: Kim, Kukhee; [email protected] Talk
Subject: Re: Different behavior on dbdToRecordTypeH - include guard
Hi Kukhee,
On 12/10/2014 02:03 PM, Kim, Kukhee wrote:
> I just found that the tool "dbdToRecordTypeH" in base-R3.15 behaves
> differently compare to the previous version.
> In the previous version, the tool put "include guard" for type
> definition.
> But, the new one doesn't put the "include guard".
The generated files from a 3.15 build do have an include guard, the name it uses has changed slightly though and the guard now wraps the whole header file rather than just a part of it:
> /* aiRecord.h generated from aiRecord.dbd */
>
> #ifndef INC_aiRecord_H
> #define INC_aiRecord_H
>
> #include "epicsTypes.h"
...
> } aiFieldIndex;
>
> #ifdef GEN_SIZE_OFFSET
>
> #ifdef __cplusplus
> extern "C" {
> #endif
> #include <epicsExport.h>
...
> #ifdef __cplusplus
> }
> #endif
> #endif /* GEN_SIZE_OFFSET */
>
> #endif /* INC_aiRecord_H */
In 3.14 the include guard covered the record structure and index definitions but not the GEN_SIZE_OFFSET section:
> #ifndef INCaiH
> #define INCaiH
> #include "epicsTypes.h"
...
> #define aiRecordSIMS 81
> #endif /*INCaiH*/
> #ifdef GEN_SIZE_OFFSET
> #ifdef __cplusplus
> extern "C" {
> #endif
> #include <epicsExport.h>
...
> #ifdef __cplusplus
> }
> #endif
> #endif /*GEN_SIZE_OFFSET*/
Only *Record.c files define the GEN_SIZE_OFFSET macro though, and they shouldn't be including other headers that include their own *Record.h file so this change should be transparent.
What does your complicated include setup that this breaks look like?
- Andrew
--
People everywhere confuse what they read in newspapers with news.
-- A. J. Liebling
- Replies:
- Re: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
- References:
- Different behavior on dbdToRecordTypeH - include guard Kim, Kukhee
- Re: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
- Navigate by Date:
- Prev:
Re: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
- Next:
Darwin SHRLIB_VERSION build error: multiple target patterns J. Lewis Muir
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
- Next:
Re: Different behavior on dbdToRecordTypeH - include guard Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|