Network headers and __BSD_VISIBLE
ralf.corsepius at rtems.org
Thu Sep 8 08:40:48 UTC 2011
On 09/08/2011 09:01 AM, Sebastian Huber wrote:
> if we do this
> #include <sys/socket.h>
> in RTEMS, then several features of the network stack are not visible
> since __BSD_VISIBLE is undefined.
Correct, this is on full purpose.
> This is in contrast to FreeBSD
Linux only appears to export BSD-proprietary stuff, because its glibc
usually by default to accepts BSD-ish code.
In contrast to this, RTEMS is supposed to default to "POSIX" and to
conditionally support some BSDish stuff if explicitly requested.
> FreeBSD for example defines __BSD_VISIBLE in <sys/cdefs.h>
> depending on other defines. The default is __BSD_VISIBLE defined to 1.
> Linux does not use __BSD_VISIBLE and exports everything unconditionally.
Not quite. Linux glibc is equipped with a whole machinery of defines
(cf. /usr/include/features.h) to enforce certain levels of compatibility
to non-Linux systems.
More information about the users