Hi Lewis,
On 2011-06-09 J. Lewis Muir wrote:
> My vote would be to fix the preprocessor; it shouldn't do that
> substitution.
That means removing $(OP_SYS_CPPFLAGS) from the options passed to the
preprocessor when we run it before the SNC. However anyone who has an #ifdef
vxWorks that modifies their SNL code when building it for vxWorks isn't going
to be very happy with that.
> Why does using "vxWorks.h" work when <vxWorks.h> does not?
> Because it thinks "vxWorks.h" is a C string constant and so
> doesn't touch it?
Correct, the pre-processor does not replace tokens inside quoted strings.
> I'm not the biggest fan of using "vxWorks.h". It's, as you
> said, a workaround. When I read that, I think the author wrote
> a vxWorks.h header file and wants to include it.
I just worked out how to fix this nicely: Change the definition in Base's
configure/os/CONFIG.Common.vxWorksCommon to this:
OP_SYS_CPPFLAGS += -DvxWorks=vxWorks
Works perfectly, and will only break code where someone is using #if vxWorks
instead of #ifdef vxWorks. Just don't try %%#including a file called CPU.h
though, I can't fix that one...
- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham
- Replies:
- Re: Sequencer Preprocessor Build Rules J. Lewis Muir
- References:
- Sequencer Preprocessor Build Rules Andrew Johnson
- Re: Sequencer Preprocessor Build Rules J. Lewis Muir
- Navigate by Date:
- Prev:
driver support for SIS3302 and SIS3305 Hu, Yong
- Next:
Re: Sequencer Preprocessor Build Rules 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: Sequencer Preprocessor Build Rules J. Lewis Muir
- Next:
Re: Sequencer Preprocessor Build Rules 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
|