From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62379 invoked by alias); 30 Jan 2017 17:38:28 -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 62371 invoked by uid 89); 30 Jan 2017 17:38:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:cygwin, H*f:sk:Ni7jPd8, H*i:sk:Ni7jPd8, H*F:D*cygwin.com X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Jan 2017 17:38:27 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30FCD81250 for ; Mon, 30 Jan 2017 17:38:27 +0000 (UTC) Received: from [10.10.116.135] (ovpn-116-135.rdu2.redhat.com [10.10.116.135]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0UHcPgV026263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 Jan 2017 12:38:26 -0500 Subject: Re: Why is popen from stdio.h disabled with -std=c++11? To: cygwin@cygwin.com References: From: Yaakov Selkowitz Message-ID: Date: Mon, 30 Jan 2017 17:38:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00392.txt.bz2 On 2017-01-30 10:41, Пётр Б. wrote: > Why is popen from stdio.h disabled with -std=c++11? I am trying to > grasp it and I can't. > > It is exposed if -std=c11 but not for c++11. No, it's not, you get an implicit function declaration warning in C. C++ is simply less forgiving (which is not a bad thing in this case). > What is the problem and can it be solved? Use -std=gnu++11, or -D_DEFAULT_SOURCE with -std=c++11. > Why does -std=c++11 prevent POSIX visibility? Because it means ISO standard C++, which popen is not. > MinGW exposes popen as _popen, could it be an option for Cygwin? Absolutely not, that is an MSVC-ism. -- Yaakov -- 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