This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Pthreads: Prototypes missing if -std=c11
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 12 Jul 2017 12:49:58 -0500
- Subject: Re: Pthreads: Prototypes missing if -std=c11
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=cygwin.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=yselkowitz at cygwin dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3D290C056786
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D290C056786
- References: <mtranet.20170712181557.1862059698@a1.net>
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
--
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