Re: C++ Headers

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: mscott(at)sacadia(dot)com
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: C++ Headers
Date: 2001-05-19 17:17:10
Message-ID: 200105191717.f4JHHAL26241@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Tom Lane wrote:
>
> > mlw <markw(at)mohawksoft(dot)com> writes:
> > > Is any support for reworking the postgres headers such that they can be used,
> > > cleanly, in a C++ program?
> >
> > You'll get no support for a request for a blank check. What do you have
> > in mind exactly?
> >
> > ISTM that making the backend's internal headers C++-clean has already
> > been looked into, but rejected on grounds that I don't recall clearly.
> > Check the list archives.
> >
>
> I have used:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> headers......
>
>
>
> #ifdef __cplusplus
> }
> #endif
>
>
> on many backend header files for use
> on my threaded version of postgres.
> I seems to work fine as I have not had any problems
> yet.

The only mention I see of this is in c.h:

#ifndef __cplusplus
#ifndef bool
typedef char bool;

#endif /* ndef bool */
#endif /* not C++ */

If you need more cplusplus stuff, lets figure it out and add it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-05-19 17:20:26 Re: Fix for tablename in targetlist
Previous Message Myron Scott 2001-05-19 17:09:59 Re: C++ Headers