Mailing List Archived Message #5

From: "Steven Levine" <> Full Headers
Undecoded message
Subject: Re: [GNU Ports] _beginthread not declared
Date: Sun, 10 May 2020 12:28:49 -0700
To: "GNU Ports for eCS Mailing List" <>

In <>, on 05/10/20
   at 06:19 PM, "Paul Smedley" <> said:

Hi guys,

>> 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.


"Steven Levine" <>  Warp/DIY/BlueLion etc.

This email was Anti Virus checked by Astaro Security Gateway.

Subscribe: Feed, Digest, Index.
Mail to ListMaster