This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51785] gets not anymore declared
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jan 2012 13:00:37 +0000
- Subject: [Bug c++/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 #3 from vries at gcc dot gnu.org 2012-01-11 13:00:37 UTC ---
This attempt at 'a glibc version check and defining the std::gets prototype in
libstdc++' (PR 51773 comment 11) unbreaks the libstdc++ build:
...
Index: libstdc++-v3/include/c_std/cstdio
===================================================================
--- libstdc++-v3/include/c_std/cstdio (revision 183073)
+++ libstdc++-v3/include/c_std/cstdio (working copy)
@@ -88,6 +88,12 @@
#undef vprintf
#undef vsprintf
+#if __GLIBC_PREREQ (2,15)
+extern "C" {
+ extern char *gets (char *__s) __attribute__((deprecated));
+}
+#endif
+
namespace std
{
using ::FILE;
Index: libstdc++-v3/include/c_global/cstdio
===================================================================
--- libstdc++-v3/include/c_global/cstdio (revision 183073)
+++ libstdc++-v3/include/c_global/cstdio (working copy)
@@ -89,6 +89,12 @@
#undef vprintf
#undef vsprintf
+#if __GLIBC_PREREQ (2,15)
+extern "C" {
+ extern char *gets (char *__s) __attribute__((deprecated));
+}
+#endif
+
namespace std
{
using ::FILE;
...