From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130781 invoked by alias); 14 Dec 2015 04:56:40 -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 130761 invoked by uid 89); 14 Dec 2015 04:56:39 -0000 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 Received: from mail-ob0-f179.google.com (HELO mail-ob0-f179.google.com) (209.85.214.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 14 Dec 2015 04:56:38 +0000 Received: by obciw8 with SMTP id iw8so123494793obc.1 for ; Sun, 13 Dec 2015 20:56:36 -0800 (PST) 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) Received: by 10.76.107.238 with HTTP; Sun, 13 Dec 2015 20:56:36 -0800 (PST) In-Reply-To: <566DA207.3080008@gmail.com> References: <566DA207.3080008@gmail.com> Date: Mon, 14 Dec 2015 04:56:00 -0000 Message-ID: Subject: Re: __STRICT_ANSI__ and stdio.h From: KIMURA Masaru To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00149.txt.bz2 Hi, >> is cygwin's __STRICT_ANSI__ and stdio.h behavior not so compatible to gl= ibc's? >> especially, i meant routines in POSIX 1003.1:2001 (popen(), pclose(), et= c). >> 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 rig= ht? 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 cast 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, -- 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