Question about the definition of _XOPEN_SOURCE

Joel Sherrill joel at
Sun Jan 3 21:43:54 UTC 2021

The file says/features.h defines the defaults for RTEMS. Some methods are
not visible at the default standard level because they are extensions maybe
GNU or BSD specific. The defaults are modified by the selection of the
programming language standard and the feature macros your program defines.
I recall that I'd you say std=c99, you lose visibility to a number of the
POSIX methods.

This is the Linux man page on these.

Note that Linux and RTEMS do not agree on the default feature settings. My
recollection is that RTEMS is closer to pure POSIX while Linux enables a
number of non-POSIX extensions by default.

You need to be careful to define any features you need early in case
sys/features.h is implicitly included in your selection has no impact.


On Sun, Jan 3, 2021, 12:21 PM Sebastian Huber <
sebastian.huber at> wrote:

> On 03/01/2021 18:06, Heinz Junkes wrote:
> > _XOPEN_SOURCE is not set anywhere in the RTEMS header files etc..
> Yes, and this is how it should be. This define is supposed to be defined
> by your application if necessary:
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> _______________________________________________
> devel mailing list
> devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list