bool exported to user namespace

Поиск
Список
Период
Сортировка
От Ewan Mellor
Тема bool exported to user namespace
Дата
Msg-id 357C09BB.7D7BC1D7@nexus.co.uk
обсуждение исходный текст
Список pgsql-hackers
In interfaces/libpq/libpq-fe.h there is this well-meaning comment:

/*
 * We can't use the conventional "bool", because we are designed to be
 * included in a user's program, and user may already have that type
 * defined.  Pqbool, on the other hand, is unlikely to be used.
 */

Unfortunately, libpq-fe.h includes libpq/pgcomm.h, which in turn
includes c.h, which defines the bool type.  This causes me problems as
the code I am working with also defines bool.

Of c.h, the only section that pqcomm.h requires is section 3 (standard
system types).  What I have done locally, therefore, is to move that
section into a new file (sys_types.h) and include that from pqcomm.h
instead of c.h.  Does this solution seem reasonable, or does anyone have
a different idea about the way the include files should be arranged?  If
there are no objections, I can submit a patch if you want.

Ewan Mellor.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Broytmann
Дата:
Сообщение: Re: [HACKERS] backend now show status in 'ps'
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] keeping track of connections