]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't always provide definition of gets checking version
authorMarek Polacek <polacek@redhat.com>
Fri, 13 Jan 2012 17:45:02 +0000 (12:45 -0500)
committerUlrich Drepper <drepper@gmail.com>
Fri, 13 Jan 2012 17:45:02 +0000 (12:45 -0500)
ChangeLog
libio/bits/stdio2.h

index c7cba4e8e83f39f6cb21663c2c02387909c48fd8..00faba1ffa61b124c1e38dabbf1dc4688ae071ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-12  Marek Polacek  <polacek@redhat.com>
+
+       * libio/bits/stdio2.h: Do not define gets for ISO C11, ISO C++11,
+       and _GNU_SOURCE.
+
 2012-01-04  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
        * powerpc/powerpc32/sysdep.h: Add GLUE and GENERATE_GOT_LABEL macros.
index a4166f755536ee7c92ebacd90f32aab94da92bd1..cbccea7f3e76bcb242604664928b60b06e1adddb 100644 (file)
@@ -217,6 +217,8 @@ __NTH (obstack_vprintf (struct obstack *__restrict __obstack,
 
 #endif
 
+#if !defined __USE_ISOC11 \
+    || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
 extern char *__gets_chk (char *__str, size_t) __wur;
 extern char *__REDIRECT (__gets_warn, (char *__str), gets)
      __wur __warnattr ("please use fgets or getline instead, gets can't "
@@ -229,6 +231,7 @@ gets (char *__str)
     return __gets_chk (__str, __bos (__str));
   return __gets_warn (__str);
 }
+#endif
 
 extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
                          FILE *__restrict __stream) __wur;