[Top] [All Lists]

Re: [nmh-workers] nmh 1.7.1 compile errors

2019-06-03 12:36:27
"/usr/include/curses.h", line 86: invalid type combination

Quick question: does this compiler have a stdbool.h header file?  If it
does, does autoconf find it?  (This answer should be in the configure output).

I suspect that it does NOT, and you are running afoul of the following
defintions in h/nmh.h:

# include <stdbool.h>
# define bool int
# define true 1
# define false 0

So that would make that line in curses.h:

        typedef char int

Which would probably explain the exact error you are getting.

So, solutions?  Weeelll .... we use bool a lot, actually.  It looks like
bool was added in C99, so maybe adding -std=c99 to the compiler options
would work? (be sure you do that and re-run configure). It might be the
compiler doesn't "see" stdbool.h unless you do -std=c99.  I suspect
using gcc would also work.  That may not be right answer, as I think
the default is -std=c11.  You could also try adding -D_BOOL=1 to CPPFLAGS.

I don't know why older versions don't compile; support for bool was only
added in nmh 1.7.  It would probably be best to focus on the newest versions



<Prev in Thread] Current Thread [Next in Thread>