This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51785] gets not anymore declared
- From: "bkoz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Mar 2012 00:21:11 +0000
- Subject: [Bug libstdc++/51785] gets not anymore declared
- Auto-submitted: auto-generated
- References: <bug-51785-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51785
--- Comment #19 from Benjamin Kosnik <bkoz at gcc dot gnu.org> 2012-03-01 00:21:11 UTC ---
Created attachment 26794
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26794
gets conditionally declared/used
Here's a way to deal with gets that is pretty simple. If it's around at
configure time, it's used. If not, it's dropped from <cstdio>. This uses the
same configure bits and approach used for math.
This should prevent any compile error at bootstrap time. That seems sufficient
for gcc-4.7 release. RMs?
Note, I'm on f17 and I'm not running into this during make/check of trunk gcc.
If somebody can give me self-contained sources that fail on f17 it would be
appreciated.
Please don't put in GLIBC macros to cstdio. Boo.
Instead, if you need to layer on a glibc part to this, you should start with
this patch, and then conditionally define/undefine _GLIBCXX_HAVE_GETS in
libstdc++-v3/config/os/gnu-linux/os_defines.h
based on the glibc prerequisites and version checks.
-benjamin