Some of the programs I've recently tried to build with pdcurses are using stdbool.h and its definition of bool. There's code in pdcurses.h that attempts to work-around the situation in C++ where bool might already be defined. However, don't see anything to deal with the issue for C. Has anyone else hit the problem and does anyone have suggestions for work-arounds?
I can add a fix to pdcurses similar to what was done for C++, but that only works for programs using pdcurses. It doesn't work if you attempt to use the pdcurses.h header when building pdcurses itself. In that case, it will temporarily redefine bool to _bool and then undefine it at the end of the header. The pdcurses C files would then also need bool redefined to _bool in order to compile. Was thinking it might be easier to check if bool is already defined and only define it if it isn't. However, that might break binary compatibility for builds using the compiler's definition of bool and programs expecting bool to still be unsigned char. If anyone has any ideas for work-arounds or fixes, would be very interested in hearing them. Thanks. Sincerely, Laura