On sön, 2010-05-09 at 11:35 -0400, Tom Lane wrote: > bry...@giraffe-data.com (Bryan Henderson) writes: > > The interface header files for Postgres server extensions define "bool", > > but that name is commonly used by other parts of user code, including > > by standards (C99, C++). That causes, at best, compile failures. > > > If Postgres has to define a boolean type in public header files, it should > > use a name that won't collide, like postgres_bool. > > Sorry, this isn't going to happen. It would break far too much existing > code, and we consider building server extensions with C++ to be > unsupported anyway.
Um, our code has #ifndef __cplusplus #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool) 1) #endif etc. so somehow it was once thought that it is worth supporting other definitions of bool. Now to make this work in practice you probably need to play some games with undefining and redefining and include file order and so on, but I think it could work. In any case, it would be better if Bryan could show us a concrete example that is causing problems. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs