remove-gets.patch 866 B

12345678910111213141516171819202122232425
  1. ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
  2. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  3. Backported to guile 2.0.3 by Scott Garman <scott.a.garman@intel.com>
  4. Upstream-Status: Pending
  5. diff -urN guile-2.0.3.orig/lib/stdio.in.h guile-2.0.3/lib/stdio.in.h
  6. --- guile-2.0.3.orig/lib/stdio.in.h 2011-10-22 07:19:35.000000000 -0700
  7. +++ guile-2.0.3/lib/stdio.in.h 2012-12-12 20:47:06.397265942 -0800
  8. @@ -711,11 +711,13 @@
  9. _GL_CXXALIAS_SYS (gets, char *, (char *s));
  10. # undef gets
  11. # endif
  12. +# if defined gets
  13. _GL_CXXALIASWARN (gets);
  14. /* It is very rare that the developer ever has full control of stdin,
  15. so any use of gets warrants an unconditional warning. Assume it is
  16. always declared, since it is required by C89. */
  17. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  18. +# endif
  19. #endif