"GNU Ports for eCS Mailing List" <email@example.com>
In <firstname.lastname@example.org>, on 05/10/20
at 06:19 PM, "Paul Smedley" <email@example.com> said:
>> Yet these turn into a fatal error if I declare __USE_EMX or such.
>I remember a similar problem years ago with one port (I forget which).
>I worked around it by adding the definition for _beginthread in the .c
>file that needed it.
I guessed a bit backwards and the macro priorities. For _beginthread to
be declared both __STRICT_ANSI__ and _POSIX_SOURCE must be undefined.
Best I can tell this logic is specific to our gcc/kLIBC ports. The use of
_WITH_UNDERSCORE and __USE_EMX also appear to be specific to our gcc/kLIBC
ports. __STRICT_ANSI__ is known to gcc and _POSIX_SOURCE is known to the
POSIX standard. _POSIX_SOURCE appears to be deprecated in favor of
One possible solution is to turn off the -ansi option which may allow
_beginthread to be defined without negative side effects.