1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Make backend header files C++ safe

This alters various incidental uses of C++ key words to use other similar
identifiers, so that a C++ compiler won't choke outright.  You still
(probably) need extern "C" { }; around the inclusion of backend headers.

based on a patch by Kurt Harriman <harriman@acm.org>

Also add a script cpluspluscheck to check for C++ compatibility in the
future.  As of right now, this passes without error for me.
This commit is contained in:
Peter Eisentraut
2009-07-16 06:33:46 +00:00
parent 4ef8dc7a75
commit de160e2c00
52 changed files with 392 additions and 359 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.189 2009/06/11 14:49:00 momjian Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.190 2009/07/16 06:33:43 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -796,7 +796,7 @@ transformFromClauseItem(ParseState *pstate, Node *n,
ListCell *lx,
*rx;
Assert(j->using == NIL); /* shouldn't have USING() too */
Assert(j->usingClause == NIL); /* shouldn't have USING() too */
foreach(lx, l_colnames)
{
@ -819,7 +819,7 @@ transformFromClauseItem(ParseState *pstate, Node *n,
rlist = lappend(rlist, m_name);
}
j->using = rlist;
j->usingClause = rlist;
}
/*
@ -828,14 +828,14 @@ transformFromClauseItem(ParseState *pstate, Node *n,
res_colnames = NIL;
res_colvars = NIL;
if (j->using)
if (j->usingClause)
{
/*
* JOIN/USING (or NATURAL JOIN, as transformed above). Transform
* the list into an explicit ON-condition, and generate a list of
* merged result columns.
*/
List *ucols = j->using;
List *ucols = j->usingClause;
List *l_usingvars = NIL;
List *r_usingvars = NIL;
ListCell *ucol;