[rtems-libbsd commit] Add BDS command support headers.

Chris Johns chrisj at rtems.org
Thu Jun 18 22:30:09 UTC 2015


On 18/06/2015 5:57 pm, Sebastian Huber wrote:
> 
>>> Every RTEMS specific change should be in #ifdef __rtems__ sections. This
>>> is very helpful if you have to review files. This is missing in a couple
>>> of files.
>> In tcpdump.c there is '#if __rtems__' and so you are asking these always
>> be '#ifdef __rtems__' ? I will add the end comment.
> 
> Yes, this should be #ifdef #ifndef. If you do a freebsd-to-rtems -R and
> then make a git diff in the freebsd-org repository, then we should have
> a patch with only '+' and no '-' and all the '+' sections should start
> with a #ifndef or #ifdef __rtems__ and end with #endif /* __rtems__*/. 
> There are some exceptions in the commands, but these are evil hacks. It
> was very helpful to have these markers during review and bug finding.
> 

This makes sense. I will update the code.

I have moved to just '#if XYZ' because of the BSPOPTS type issues that
arise where you have -DXYZ=0 or -DXYZ=1 and the tests being '#ifdef
XYZ'. We have bugs in this area.

Chris



More information about the devel mailing list