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:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; q=dns; s=default; b=S/0aselUvS07a4Pt 0oc4MD92u3a/cU3/mDw1LkNi/n9ZYDvf/VeGcXmLKXkZ7gqoKLSFkiixDRbuCJyc NLysjiD71WNm4Y5Q53BB6oCwSDDjim2e7PGOkHraxvpJcB87Gq+RsD22AO0rhRbf S2fFZ1tpqoDTE7VDwaxJdQj5dTM= 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:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; s=default; bh=JTMw1/OAVyq/8cEQTwPIeH ZWuP8=; b=FjzkwlCgpMR27B4dKz+Bkggx6Hy0/rB2XiDxsZ8foSsg28t/3FckJ7 D9bgdc3L/cRsh/mPw3sa6sVeGAOgI06gECTG+/FD15pJHtLJfHyqWo+M2GxCyz6T YEIcuMF4lcm16Sn1wW5nPMbViCIaWSuLBiDwhmqe6YdgiAWTWPO7I= 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=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f179.google.com MIME-Version: 1.0 X-Received: by 10.60.128.169 with SMTP id np9mr24379534oeb.79.1450068996247; Sun, 13 Dec 2015 20:56:36 -0800 (PST) In-Reply-To: <566DA207.3080008@gmail.com> References: <566DA207 DOT 3080008 AT gmail DOT com> Date: Mon, 14 Dec 2015 13:56:36 +0900 Message-ID: Subject: Re: __STRICT_ANSI__ and stdio.h From: KIMURA Masaru To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id tBE4us0T001472 Hi, >> is cygwin's __STRICT_ANSI__ and stdio.h behavior not so compatible to glibc's? >> especially, i meant routines in POSIX 1003.1:2001 (popen(), pclose(), etc). >> for a specific example, see a cparser issue[1] i submitted. >> > > Cygwin isn't wrong. __STRICT_ANSI__ doesn't mix with POSIX. > __STRICT_ANSI__ definitions is what you should look at for the defined > API; not POSIX 1003.1:2001. then why does glibc look accepting -std=c99 -D_POSIX_C_SOURCE=200809L? so you mean linux (maybe glibc?) is wrong and cygwin (maybe newlib?) is right? w/ attached source that uses popen()/pclose() via gcc -std=c99, on cygwin (maybe newlib?), i got, p.c: In function ‘main’: p.c:5:2: warning: implicit declaration of function ‘popen’ [-Wimplicit-function-declaration] FILE *pp = popen("cat", "w"); ^ p.c:5:13: warning: initialization makes pointer from integer without a cast FILE *pp = popen("cat", "w"); ^ p.c:12:3: warning: implicit declaration of function ‘pclose’ [-Wimplicit-function-declaration] int err = pclose(pp); ^ on linux (maybe glibc?), i got, p.c: In function 'main': p.c:4:14: warning: unused parameter 'argc' [-Wunused-parameter] int main(int argc, char *argv[]) { ^ p.c:4:26: warning: unused parameter 'argv' [-Wunused-parameter] int main(int argc, char *argv[]) { ^ ^ Peace, -- 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