remove_gets.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. eglibc 2.16 has removed gets so we need to check for it
  2. being there before using it.
  3. From glibc stdio.h
  4. The function has been officially removed in ISO C11. This opportunity
  5. is used to also remove it from the GNU feature list. It is now only
  6. available when explicitly using an old ISO C, Unix, or POSIX standard.
  7. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  8. Upstream-Status: Pending
  9. Index: gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
  10. ===================================================================
  11. --- gettext-0.18.1.1.orig/gettext-runtime/gnulib-lib/stdio.in.h 2010-05-17 12:56:12.000000000 -0700
  12. +++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h 2012-07-02 22:42:21.292223316 -0700
  13. @@ -140,8 +140,10 @@
  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. +#if defined gets
  18. #undef gets
  19. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  20. +#endif
  21. #if @GNULIB_FOPEN@
  22. # if @REPLACE_FOPEN@
  23. Index: gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
  24. ===================================================================
  25. --- gettext-0.18.1.1.orig/gettext-tools/gnulib-lib/stdio.in.h 2010-05-24 02:42:46.000000000 -0700
  26. +++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h 2012-07-02 23:02:33.476281979 -0700
  27. @@ -140,8 +140,10 @@
  28. /* It is very rare that the developer ever has full control of stdin,
  29. so any use of gets warrants an unconditional warning. Assume it is
  30. always declared, since it is required by C89. */
  31. +#if defined gets
  32. #undef gets
  33. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  34. +#endif
  35. #if @GNULIB_FOPEN@
  36. # if @REPLACE_FOPEN@
  37. Index: gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
  38. ===================================================================
  39. --- gettext-0.18.1.1.orig/gettext-tools/libgettextpo/stdio.in.h 2010-05-17 12:58:03.000000000 -0700
  40. +++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h 2012-07-02 23:01:57.440280253 -0700
  41. @@ -140,8 +140,10 @@
  42. /* It is very rare that the developer ever has full control of stdin,
  43. so any use of gets warrants an unconditional warning. Assume it is
  44. always declared, since it is required by C89. */
  45. +#if defined gets
  46. #undef gets
  47. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  48. +#endif
  49. #if @GNULIB_FOPEN@
  50. # if @REPLACE_FOPEN@