From: Yaakov Selkowitz <yselkowitz@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Why is popen from stdio.h disabled with -std=c++11?
Date: Mon, 30 Jan 2017 17:38:00 -0000 [thread overview]
Message-ID: <cb06911b-93e1-dadf-1b55-0c94955bc0ff@cygwin.com> (raw)
In-Reply-To: <CA+Ni7jPd8kpSJgM2DGoMvuUpQL9Kf-vxyyw_6yQiqig5-s6hfw@mail.gmail.com>
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
prev parent reply other threads:[~2017-01-30 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 16:41 Пётр Б.
2017-01-30 17:38 ` Yaakov Selkowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb06911b-93e1-dadf-1b55-0c94955bc0ff@cygwin.com \
--to=yselkowitz@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).