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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Fl8qYJp1LdW5ajTu akLgJNnssxepSZ5LgwlNhQ1lIJFyx+sDtaDQQFJF6ajJnyhmBEjWR323WViDxMYd WlrbUklxhFPoMmJC2XBtYvJyPSLjVaSP8ualDFjKtc27r2SdsTHFVMr2ZZJA1Da6 mVmwh31NixFmdU1s7uGiuHy14GU= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=2O/jVdOXSYD8Cx8k0WsNxx HyXYo=; b=h0U6aNzRD5cBlayAHDlda6jAhrXPGvcTnjWnyxohLQYqVhBAcL5pMH ZHNaQgcBs3JsBr1mClrF3OmUETnj16HwyFaBQ7FNtvu+kKFmCnmfgs7rYn5cbE0b A00L6f7wpKeQQ7InGkrsaRZN07KzRXk0AqJJz2Cu+9mrrcvpHdhAY= 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=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 Subject: Re: Why is popen from stdio.h disabled with -std=c++11? To: cygwin AT cygwin DOT com References: From: Yaakov Selkowitz Message-ID: Date: Mon, 30 Jan 2017 11:38:25 -0600 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 Note-from-DJ: This may be spam 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