Description: Use stdbool if available to work around boolean changes. Author: Agustin Martin Domingo Forwarded: https://sourceforge.net/p/regina-rexx/bugs/612/ Bug-Debian: http://bugs.debian.org/1097785 Seems that there were some C23 changes with booleans. x86_64-linux-gnu-gcc ... ./regutil/regfilesys.c In file included from ./regutil/regfilesys.c:29: ./regutil/regutil.h:28:4: error: expected identifier before 'false' 28 | false, | ^~~~~ This patch uses stdbool.h if available. If so, makes rxbool a bool through typedef. Otherwise uses rxbool old definition. --- a/config.h.in +++ b/config.h.in @@ -246,6 +246,9 @@ /* Define if you have the header file. */ #undef HAVE_STDARG_H +/* Define if you have the header file. */ +#undef HAVE_STDBOOL_H + /* Define if you have the header file. */ #undef HAVE_STDIO_H --- a/configure +++ b/configure @@ -4725,6 +4725,7 @@ for ac_header in \ signal.h \ socket.h \ stdarg.h \ + stdbool.h \ stdio.h \ statvfs.h \ stdlib.h \ --- a/configure.in +++ b/configure.in @@ -179,6 +179,7 @@ AC_CHECK_HEADERS( \ signal.h \ socket.h \ stdarg.h \ + stdbool.h \ stdio.h \ statvfs.h \ stdlib.h \ --- a/regutil/regutil.h +++ b/regutil/regutil.h @@ -24,10 +24,15 @@ #include "rxproto.h" +#ifdef HAVE_STDBOOL_H +# include +typedef bool rxbool; +#else typedef enum { false, true } rxbool; +#endif void init_random(void);