Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/2] Fix incompatible-pointer-types configure test bugs
- X-seq: zsh-workers 52400
- From: Nicholas Vinson <nvinson234@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: Nicholas Vinson <nvinson234@xxxxxxxxx>
- Subject: [PATCH 2/2] Fix incompatible-pointer-types configure test bugs
- Date: Sun, 10 Dec 2023 16:49:37 -0500
- Archived-at: <https://zsh.org/workers/52400>
- In-reply-to: <cover.1702244907.git.nvinson234@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <cover.1702244907.git.nvinson234@gmail.com>
When the flag -Werror=incompatible-pointer-types is passed to gcc, the
configure tests will fail to compile due to incompatible pointer types.
This will prevent configure from properly detecting features.
Beginning with gcc-14, -Werror=incompatible-pointer-typees will default
to enabled. See:
https://wiki.gentoo.org/wiki/Modern_C_porting#What_changed.3F
https://inbox.sourceware.org/gcc-patches/cover.1700473918.git.fweimer@xxxxxxxxxx/
for details.
Signed-off-by: Nicholas Vinson <nvinson234@xxxxxxxxx>
---
configure.ac | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9cb6e032b..64844f550 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1768,27 +1768,27 @@ if test x$zsh_cv_path_term_header != xnone; then
fi
AC_MSG_CHECKING(if boolcodes is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
AC_MSG_RESULT($boolcodes)
AC_MSG_CHECKING(if numcodes is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
AC_MSG_RESULT($numcodes)
AC_MSG_CHECKING(if strcodes is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
AC_MSG_RESULT($strcodes)
AC_MSG_CHECKING(if boolnames is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
AC_MSG_RESULT($boolnames)
AC_MSG_CHECKING(if numnames is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
AC_MSG_RESULT($numnames)
AC_MSG_CHECKING(if strnames is available)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[const char * const *test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
AC_MSG_RESULT($strnames)
dnl There are apparently defective terminal library headers on some
--
2.43.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author