X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=TZNEHFeN+0eh4qcw iqPHYGEiNmrrIPtngZgNZk/AHRpkfUENN0ELXxReVllJvjWlhJp0JDZKGht46P45 AmcOhe+bRoxJB5sq5ExsH6bY9ZvqXrAHgH73CwSqN4QREkS5tcTPbM928/PumfS8 s7HfhGb41PHiHp2CEQwpwwQlHCs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=6U9QzpT5Wp/UIoPTxUUKe8 Zj8bI=; b=Y5AlZieQ0GTpfs/TT9IlzDcMGuJIUS+Pp2L1m3HaQCSOAF7sdl24GJ NVlJIgZ1VI1z4+LKFTMtpH4XqinMna9JCfuuer+zCct9FwKhfhB2U1Whdmf52HIr mDPmyjjzZaiI6vvc75Clrfo6tIVy6gt/T6S9LbDhDzGSx++odtpoc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=bz0815tirolcom, sk:bz0815, Prototypes, pthreads X-HELO: mail-it0-f50.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zGhZPPy9Mjb3N6glVZhZSMw1AeiT6/cu1Pv9fK5edUU=; b=Ewht0TWwFZsbptsnTj2KzIXBTKeXkqs20oFgEfOsvseFTFD9bWwA5FeLT+IdrrVr92 g9Q6+GK5FWfRy452jkxWmtIPEj+OQRiRVjT4ZEFEck83Th1TqrIBPws0AkC8cSDTX1Ia S0X7qUeRhttnyMs3b3T0f6LwJLwMQLo6okviWxeNI7NcjPxKg80jFHDYhmcb5wp9A1xD UjkB38Oi/FTnZ2N2/u0eKu0yM+Zsn1VleToaRyoc0vAX/PKDv+q81syYMtGdJfarZ3I4 l1qDehns+Ou0BSg8Vquv0aYezzzyBiil5PTX4cc/I0W8ESc4Bw7wx0CwRtqAnf8bv4VN sVLA== X-Gm-Message-State: AIVw111gHMx2F0GHDz6lZexoXM7wz5VB3iF+t+wP8FqBa9wqbggkaOCL zGmonIEKq9xlbpje X-Received: by 10.36.88.135 with SMTP id f129mr27329841itb.22.1499967495682; Thu, 13 Jul 2017 10:38:15 -0700 (PDT) Subject: Re: Pthreads: Prototypes missing if -std=c11 To: cygwin AT cygwin DOT com References: From: cyg Simple Message-ID: <88ff0f37-569e-2607-92a9-bf89e956636e@gmail.com> Date: Thu, 13 Jul 2017 13:38:18 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 7/13/2017 11:36 AM, bz0815 AT tirol DOT com wrote: >> On 2017-07-12 11:15, bz0815 AT tirol DOT 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