Re: C++ Headers - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: C++ Headers
Date
Msg-id 200105191717.f4JHHAL26241@candle.pha.pa.us
Whole thread Raw
In response to Re: C++ Headers  (Myron Scott <mscott@sacadia.com>)
Responses Re: C++ Headers
List pgsql-hackers
> Tom Lane wrote:
> 
> > mlw <markw@mohawksoft.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 booltypedef 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Myron Scott
Date:
Subject: Re: C++ Headers
Next
From: Bruce Momjian
Date:
Subject: Re: Fix for tablename in targetlist