libiconv-1-fixes.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. This file is part of MXE.
  2. See index.html for further information.
  3. Contains ad hoc patches for cross building.
  4. From 47345f5dcfb91da8afed7c4e6c29faa2056db447 Mon Sep 17 00:00:00 2001
  5. From: MXE
  6. Date: Fri, 7 Jun 2013 17:44:24 +1000
  7. Subject: [PATCH] remove gets since c++11 removed it
  8. https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00186.html
  9. diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h
  10. index 473c84c..dfb59eb 100644
  11. --- a/srclib/stdio.in.h
  12. +++ b/srclib/stdio.in.h
  13. @@ -679,22 +679,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
  14. # endif
  15. #endif
  16. -#if @GNULIB_GETS@
  17. -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  18. -# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  19. -# undef gets
  20. -# define gets rpl_gets
  21. -# endif
  22. -_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
  23. -_GL_CXXALIAS_RPL (gets, char *, (char *s));
  24. -# else
  25. -_GL_CXXALIAS_SYS (gets, char *, (char *s));
  26. -# undef gets
  27. -# endif
  28. -_GL_CXXALIASWARN (gets);
  29. /* It is very rare that the developer ever has full control of stdin,
  30. - so any use of gets warrants an unconditional warning. Assume it is
  31. - always declared, since it is required by C89. */
  32. + so any use of gets warrants an unconditional warning; besides, C11
  33. + removed it. */
  34. +#undef gets
  35. +#if HAVE_RAW_DECL_GETS
  36. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  37. #endif
  38. --
  39. 1.8.2.3