X-Recipient: archive-cygwin@delorie.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; q=dns; s=default; b=av
	bJR5Jyo9+IvnnVtD0Tbg891G3/aTQVllizOaxuf+8CwHjYj1BVLNIlvKShp20xRV
	eszK8zhNApVxDAo0iW7Nk/ILCs86cVWRI3ZkakWp9ZvoYHbtdEI7z8M7JYZFCMZS
	9tmaUJz5pS3T8dQmfeTfvKkKpQw7IMqDd3m7rCCFE=
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; s=default; bh=enVmjtfE
	PpqEk0haG29f90Zw4Ro=; b=J3C5NVoZDUeQWjaqChd4RZ7+sERs+t3N5+brc4oy
	p2ca5+YhtanO7Igrk+7QXJ4WgE3R8y7E0XQbV40tBd1eeb6hT7QRqaBUUincDXAv
	LDGixRmRYri0hihMR1xQ29HkWy+MJghd+63t1TfqfUr6xwqzjf8lAJuFD3J5GauN
	L+8=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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-f176.google.com
MIME-Version: 1.0
X-Received: by 10.60.95.34 with SMTP id dh2mr14123826oeb.28.1450069077420; Sun, 13 Dec 2015 20:57:57 -0800 (PST)
In-Reply-To: <CAPYQg33bDtta3=D2bZeswz1zTgrw1m-5rPNRLeayVEY3zp3E0w@mail.gmail.com>
References: <CAPYQg31yUkpu9oC1cfWTmxaBANBYcd4X18RY9Q+BVpx-o=nLBw@mail.gmail.com>	<566DA207.3080008@gmail.com>	<CAPYQg33bDtta3=D2bZeswz1zTgrw1m-5rPNRLeayVEY3zp3E0w@mail.gmail.com>
Date: Mon, 14 Dec 2015 13:57:57 +0900
Message-ID: <CAPYQg32s_tEbu8DS=VipwnCvaNwEwojPb2QdrEza6QRF7RnoLg@mail.gmail.com>
Subject: Re: __STRICT_ANSI__ and stdio.h
From: KIMURA Masaru <hiyuh.root@gmail.com>
To: cygwin@cygwin.com
Content-Type: multipart/mixed; boundary=089e01177341429c050526d484f1
X-IsSubscribed: yes

--089e01177341429c050526d484f1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

oops!
forgot to attach p.c, so resending now...

> Hi,
>
>>> is cygwin's __STRICT_ANSI__ and stdio.h behavior not so compatible to g=
libc's?
>>> especially, i meant routines in POSIX 1003.1:2001 (popen(), pclose(), e=
tc).
>>> 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=3Dc99 -D_POSIX_C_SOURCE=3D200809L?
> so you mean linux (maybe glibc?) is wrong and cygwin (maybe newlib?) is r=
ight?
>
> w/ attached source that uses popen()/pclose() via gcc -std=3Dc99,
>
> on cygwin (maybe newlib?), i got,
> p.c: In function =E2=80=98main=E2=80=99:
> p.c:5:2: warning: implicit declaration of function =E2=80=98popen=E2=80=
=99
> [-Wimplicit-function-declaration]
>   FILE *pp =3D popen("cat", "w");
>   ^
> p.c:5:13: warning: initialization makes pointer from integer without a ca=
st
>   FILE *pp =3D popen("cat", "w");
>              ^
> p.c:12:3: warning: implicit declaration of function =E2=80=98pclose=E2=80=
=99
> [-Wimplicit-function-declaration]
>    int err =3D 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,

--089e01177341429c050526d484f1
Content-Type: text/x-csrc; charset=US-ASCII; name="p.c"
Content-Disposition: attachment; filename="p.c"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ii5hoi8w0

I2RlZmluZSBfUE9TSVhfQ19TT1VSQ0UgMjAwODA5TAojaW5jbHVkZSA8YXNz
ZXJ0Lmg+CiNpbmNsdWRlIDxzdGRpby5oPgppbnQgbWFpbihpbnQgYXJnYywg
Y2hhciAqYXJndltdKSB7CglGSUxFICpwcCA9IHBvcGVuKCJjYXQiLCAidyIp
OwoJYXNzZXJ0KHBwICE9IE5VTEwpOwoJewoJCWludCBuID0gZnByaW50Zihw
cCwgImZvb1xuIik7CgkJYXNzZXJ0KG4gPj0gMCk7Cgl9Cgl7CgkJaW50IGVy
ciA9IHBjbG9zZShwcCk7CgkJYXNzZXJ0KGVyciAhPSAtMSk7Cgl9CglyZXR1
cm4gMDsKfQo=


--089e01177341429c050526d484f1
Content-Type: text/plain; charset=us-ascii

--
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
--089e01177341429c050526d484f1--
