[rtems-libbsd commit] Add error() to the BSD program support.

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 19 05:39:56 UTC 2015

On 19/06/15 07:23, Chris Johns wrote:
> On 18/06/2015 5:54 pm, Sebastian Huber wrote:
>>>>> What is the reason for this #undef?
>>> I got warnings for printf in tcpdump for some reason so add the undef to
>>> all symbols present.
>>> Does it hurt having it present ?
>> Yes, since in this case we don't get the redefine warning in general.
> Maybe but this whole hosting of the user land programs in RTEMS is a hack.


>> This redefine might be ok in your special case, but in general it is not
>> right to say in one place A -> B and in another A -> C. You can use the
>> #undef before you include the rtems-bsd-program.h file.
> I was fixing the warning for code that already existed:

It didn't fix the warning, it suppressed it.

> In file included from ../../rtemsbsd/rtems/rtems-bsd-program.c:55:0:
> /opt/work/chris/rtems/libbsd/rtems-libbsd.master/rtemsbsd/include/machine/rtems-bsd-program.h:87:0:
> warning: "printf" redefined
>      #define printf(...) fprintf(stdout, __VA_ARGS__)
>   ^
> In file included from
> /opt/work/chris/rtems/libbsd/rtems-libbsd.master/rtemsbsd/include/machine/rtems-bsd-kernel-space.h:59:0,
>                   from ../../rtemsbsd/rtems/rtems-bsd-program.c:40:
> /opt/work/chris/rtems/libbsd/rtems-libbsd.master/rtemsbsd/include/machine/rtems-bsd-printf-to-iprintf.h:43:0:
> note: this is the location of the previous definition
>   #define printf iprintf
>   ^
> Would you like to fix the warning and then remove the #undef's ?

I would remove the #undef now and put the warnings on the todo list.

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