Pre-branching Testing Request

Sebastian Huber sebastian.huber at embedded-brains.de
Fri May 22 05:01:56 UTC 2015



----- Am 21. Mai 2015 um 23:19 schrieb Nick Withers nick.withers at anu.edu.au:
[...]
> 
> I'm including sys/endian.h to get at htole16() and co., thusly in
> collector.c:
> ____
> 
> #define _POSIX_C_SOURCE 200809L
> 
> #include <assert.h>
> #include <errno.h>
> #include <stdbool.h>
> #include <stdio.h>
> #include <stdint.h>
> #include <stdlib.h>
> #include <string.h>
> #include <sys/endian.h> // Non-standard hto16le() et al. functions

The problem is that <sys/endian.h> includes indirectly <rtems.h>. This reveals that a

#define _POSIX_C_SOURCE 200809L
#include <rtems.h>

is now broken since <rtems.h> depends on __BSD_VISIBLE via <sys/time.h>. It would be easy to fix <rtems/endian.h> to not include <rtems.h>, but how do we address the problem with <rtems.h>?



More information about the users mailing list