Paul Eggert wrote: > > #include "unitypes.h" > > > > +/* Get bool. */ > > +#include <stdbool.h> > > In examples like these would it make sense to do the following instead? > > #if !@HAVE_C_BOOL@ && !defined __cplusplus > #include <stdbool.h> > #endif
No, this would not work: * @HAVE_C_BOOL@ tests a property of the C compiler that has built libunistring. It is unrelated to the compiler that uses <unistr.h> after it has been installed in public locations. * As we have just discovered (re Sun C++), 'defined __cplusplus' is not a guarantee that 'true' is defined correctly. So, even in C++ mode, it may be a win to include <stdbool.h>. Remember, here we are in a context where gl_C_BOOL / AC_C_BOOL has not been invoked. Bruno