From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9596 invoked by alias); 13 Jul 2017 17:38:21 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 5734 invoked by uid 89); 13 Jul 2017 17:38:18 -0000 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 Received: from mail-it0-f50.google.com (HELO mail-it0-f50.google.com) (209.85.214.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 17:38:17 +0000 Received: by mail-it0-f50.google.com with SMTP id m68so46106957ith.1 for ; Thu, 13 Jul 2017 10:38:17 -0700 (PDT) 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) Received: from [192.168.0.6] (d4-50-42-50.try.wideopenwest.com. [50.4.50.42]) by smtp.gmail.com with ESMTPSA id 189sm3089777itl.11.2017.07.13.10.38.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 10:38:15 -0700 (PDT) Subject: Re: Pthreads: Prototypes missing if -std=c11 To: cygwin@cygwin.com References: From: cyg Simple Message-ID: <88ff0f37-569e-2607-92a9-bf89e956636e@gmail.com> Date: Thu, 13 Jul 2017 17:38:00 -0000 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 X-SW-Source: 2017-07/txt/msg00224.txt.bz2 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