I stumbled across this when moving some functions from ./postgis to ./liblwgeom today. As it turns out, liblwgeom is compiled with gcc, whereas postgis is compiled with g++...and it makes a difference.<br><br>bool is not a C keyword. Not even in C99. To use the C99 "bool" macro, you must include <stdbool.h>. The name of the builtin type is _Bool. Macros for true and false are TRUE and FALSE, respectively. I assume the only reason that postgis compiles at all is that g++ is doing the compiling, and C++ rules apply.<br>
<br>To make the code from the postgis directory compile with a C compiler (e.g., in liblwgeom), I switched all "bool"s to "int"s.<br><br><a href="http://stackoverflow.com/questions/1608318/is-bool-a-native-c-type">http://stackoverflow.com/questions/1608318/is-bool-a-native-c-type</a><br>
<br>I suppose the relevant questions for devel are: Is PostGIS supposed to be a C project or are C++ constructs allowed?  Why are some C things compiled with C++?  How do you want to handle "bool"?  :) food 4 thot<br>
<br>Bryce<br>