On Sun, May 9, 2010 at 6:04 PM, Tom Lane <[email protected]> wrote: > Huh? We build just fine on C99 compilers, AFAIK. Or are you saying > that we should try to adopt <stdbool.h>'s definition of bool? The > problem there is, again, that we don't know what width that will be.
No, I'm saying we should use something like pgbool so that users can compile code that uses stdbool.h in a c99 environment. This would break any existing modules which use bool to refer to the postgres bool. It wouldn't be hard to replace bool with pgbool in those modules, and if they want to work with multiple versions of postgres then they can add a #ifndef bool #define bool pgbool and be done. It's hardly our highest priority but it seems a reasonable course given that c99 is becoming quite standard. It's hardly as invasive as what would be needed to be c++ safe. I'm not sure whether our include files have an non-c99 inline uses which would be harder to deal with. I don't see any other conflicts offhand that would create problems using a c99 compiler to build server modules. It's quite annoying and sad that they added "bool" to c99 since otherwise it would just be a drop-in replacement with extra functionality and very low risk of conflicts. Instead they virtually guaranteed conflicts with any large software over a single define. -- greg -- Sent via pgsql-bugs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
