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

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jun 18 07:57:42 UTC 2015



On 18/06/15 03:31, Chris Johns wrote:
> On 17/06/2015 9:17 pm, Sebastian Huber wrote:
>>
>> On 16/06/15 05:21, Chris Johns wrote:
>>> Module:    rtems-libbsd
>>> Branch:    master
>>> Commit:    affed5e3f586860e2fd97445eaa20674dc4bcd25
>>> Changeset:
>>> http://git.rtems.org/rtems-libbsd/commit/?id=affed5e3f586860e2fd97445eaa20674dc4bcd25
>>>
>>>
>>> Author:    Chris Johns <chrisj at rtems.org>
>>> Date:      Tue Jun 16 13:20:15 2015 +1000
>>>
>>> Add BDS command support headers.
>>>
>>> ---
>>>
>>>    freebsd/contrib/tcpdump/tcpdump.c | 6 ++++--
>>>    1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/freebsd/contrib/tcpdump/tcpdump.c
>>> b/freebsd/contrib/tcpdump/tcpdump.c
>>> index 32ffb45..00e44db 100644
>>> --- a/freebsd/contrib/tcpdump/tcpdump.c
>>> +++ b/freebsd/contrib/tcpdump/tcpdump.c
>>> @@ -55,6 +55,8 @@ static const char rcsid[] _U_ =
>>>    #define __need_getopt_newlib
>>>    #include <getopt.h>
>>>    #define setpriority(a, b, c)
>>> +#include <machine/rtems-bsd-program.h>
>>> +#include <machine/rtems-bsd-commands.h>
>> 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.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list