zile/zile-2.3.21-no_gets.patch

20 lines
762 B
Diff

diff -urN zile-2.3.21.orig/lib/stdio.in.h zile-2.3.21/lib/stdio.in.h
--- zile-2.3.21.orig/lib/stdio.in.h 2010-11-11 17:51:04.000000000 +0530
+++ zile-2.3.21/lib/stdio.in.h 2012-08-05 15:56:36.840677597 +0530
@@ -146,10 +146,12 @@
#endif
/* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
+ so any use of gets warrants an unconditional warning; besides, C11
+ removed it. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@