This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/24012] [5/6/7 regression] #define _POSIX_C_SOURCE breaks #include <iostream>
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Mar 2017 13:06:43 +0000
- Subject: [Bug target/24012] [5/6/7 regression] #define _POSIX_C_SOURCE breaks #include <iostream>
- Auto-submitted: auto-generated
- References: <bug-24012-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24012
--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #19)
> (In reply to Gerald Pfeifer from comment #4)
> > Historically, on some systems one had to define _POSIX_C_SOURCE to get at
> > fileno(), which has been used by code generated by flex() and probably
> > others.
>
> Yes, but you don't have to define it to 1. If you define _POSIX_C_SOURCE to
> 199506L or set _XOPEN_SOURCE to 500 then I think the functions we use are
> available, as well as fileno.
Correction: _POSIX_C_SOURCE=200112L or _XOPEN_SOURCE=600 should declare them.