This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51785] gets not anymore declared


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;
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]