Re: C++ Headers

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: mscott@sacadia.com
Cc: Hackers List <pgsql-hackers@postgresql.org>
Date: 2001-05-19T17:17:10Z
Lists: 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 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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026