zsh-5.9-c99.patch 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. https://github.com/zsh-users/zsh/commit/4c89849c98172c951a9def3690e8647dae76308f
  2. https://bugs.gentoo.org/919001
  3. Avoid incompatible pointer types in terminfo global variable checks.
  4. Some compilers reject these incompatible pointer types, causing the
  5. checks to always fail, when these variables are in fact available.
  6. Submitted upstream: <https://www.zsh.org/mla/workers/2023/msg01112.html>
  7. --- a/configure.ac
  8. +++ b/configure.ac
  9. @@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then
  10. fi
  11. AC_MSG_CHECKING(if boolcodes is available)
  12. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
  13. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
  14. AC_MSG_RESULT($boolcodes)
  15. AC_MSG_CHECKING(if numcodes is available)
  16. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
  17. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
  18. AC_MSG_RESULT($numcodes)
  19. AC_MSG_CHECKING(if strcodes is available)
  20. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
  21. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
  22. AC_MSG_RESULT($strcodes)
  23. AC_MSG_CHECKING(if boolnames is available)
  24. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
  25. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
  26. AC_MSG_RESULT($boolnames)
  27. AC_MSG_CHECKING(if numnames is available)
  28. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
  29. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
  30. AC_MSG_RESULT($numnames)
  31. AC_MSG_CHECKING(if strnames is available)
  32. - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
  33. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
  34. AC_MSG_RESULT($strnames)
  35. dnl There are apparently defective terminal library headers on some