bool exported to user namespace

From: Ewan Mellor <em(at)nexus(dot)co(dot)uk>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: bool exported to user namespace
Date: 1998-06-08 15:56:43
Message-ID: 357C09BB.7D7BC1D7@nexus.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-06-08 16:04:27 Re: [HACKERS] backend now show status in 'ps'
Previous Message Oleg Broytmann 1998-06-08 15:36:42 Re: [HACKERS] backend now show status in 'ps'