1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Description: Fix type bool redefinition.
GCC 15+ has it as built-in so check for that and don't redefine it.
This patch should be added into next upstream version.
Author: Andriy Grytsenko <andrej@rep.kiev.ua>
Bug-Debian: https://bugs.debian.org/1114107
Forwarded: not-needed
Last-Update: 2025-09-17
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,7 @@
AC_CHECK_LDFLAG(fe_cv_add_wnolonglong, -Wno-long-long, CPPFLAGS)
AC_CHECK_LDFLAG(fe_cv_add_wnopointersign, -Wno-pointer-sign, CPPFLAGS)
AC_CHECK_LDFLAG(fe_cv_add_wnounusedparameter, -Wno-unused-parameter, CPPFLAGS)
+AC_CHECK_LDFLAG(fe_cv_add_wnoincompatiblepointertypes, -Wno-incompatible-pointer-types, CPPFLAGS)
AC_CHECK_LDFLAG(fe_cv_add_wall, -Wall, CFLAGS)
AC_CHECK_LDFLAG(fe_cv_add_pipe, -pipe, CFLAGS)
AC_CHECK_LDFLAG(fe_cv_add_fshortenums, -fshort-enums, CPPFLAGS)
@@ -311,6 +312,7 @@
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_UID_T
+AC_CHECK_TYPE(bool, [AC_DEFINE(HAVE_BOOL, 1, [Define to 1 if compiler has 'bool' type as built-in.])])
# AC_CHECK_MEMBERS([struct sigaction.sa_handler],,,[#include <signal.h>])
if test "$fe_cv_static" = yes; then
@@ -394,7 +396,6 @@
modules/Makefile.mods \
core/Makefile \
core/init.h \
- intl/Makefile \
ui/Makefile \
po/Makefile.in \
doc/foxeye.1 \
--- a/core/init.h.in
+++ b/core/init.h.in
@@ -23,7 +23,9 @@
WHERE const char *_VERSION INITVAL("@VERSION@");
/* public part */
+#ifndef HAVE_BOOL
typedef char bool;
+#endif
#define ASK (1<<1) /* ask-yes, ask-no */
#define CAN_ASK (1<<2) /* allow above two */
--- a/core/foxeye.h
+++ b/core/foxeye.h
@@ -194,7 +194,7 @@
#define FORMATMAX 120 /* max lenght of format string */
/* common Tcl/internal function prototypes */
-typedef int (*Function)();
+typedef int (*Function)(...);
/* interface flags */
typedef enum
|