public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Pthreads: Prototypes missing if -std=c11
Date: Thu, 13 Jul 2017 17:38:00 -0000	[thread overview]
Message-ID: <88ff0f37-569e-2607-92a9-bf89e956636e@gmail.com> (raw)
In-Reply-To: <mtranet.20170713173633.1507674902@a1.net>

On 7/13/2017 11:36 AM, bz0815@tirol.com wrote:
>> On 2017-07-12 11:15, bz0815@tirol.com wrote:
>>> gcc does not recognize some functions from pthread.h if option -std=c11 is used:
>>
>> Exactly, and the same happens with glibc.  When you use -std=c*, that means you are declaring strict ISO C, and all extensions are disabled by > default unless explicitly enabled (e.g. with -D_POSIX_C_SOURCE=200112L).
> 
>>  If you are not compatible with ISO C, then you should be using
>> -std=gnu* instead.
>>
>> --
>> Yaakov
>>
>> --
> 
> Many thanks for the info, Yaakov. Accoring to the manual -std determines the language standard and c11 means ISO C11, the 2011 revision of the ISO C standard. Howevery, I find no restriction on POSIX in ISO/IEC 9899:2011. So why should -std=c11 have an influence on Pthreads? Am I missing something?

The option means explicit standard C without extensions or additions.
POSIX is atop of the C standard and requires specific definition by the
user if it's required.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2017-07-13 17:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 15:36 bz0815
2017-07-13 17:38 ` cyg Simple [this message]
2017-07-13 19:30 ` Brian Inglis
  -- strict thread matches above, loose matches on Subject: below --
2017-07-12 16:16 bz0815
2017-07-12 17:50 ` Yaakov Selkowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88ff0f37-569e-2607-92a9-bf89e956636e@gmail.com \
    --to=cygsimple@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).