1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +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/nodes/nodeFuncs.c,v 1.40 2009/06/11 14:48:58 momjian Exp $
* $PostgreSQL: pgsql/src/backend/nodes/nodeFuncs.c,v 1.41 2009/07/16 06:33:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -889,7 +889,7 @@ exprLocation(Node *expr)
* any of the components might be leftmost.
*/
loc = exprLocation(tc->arg);
loc = leftmostLoc(loc, tc->typename->location);
loc = leftmostLoc(loc, tc->typeName->location);
loc = leftmostLoc(loc, tc->location);
}
break;
@ -2417,7 +2417,7 @@ bool
if (walker(tc->arg, context))
return true;
if (walker(tc->typename, context))
if (walker(tc->typeName, context))
return true;
}
break;
@ -2468,7 +2468,7 @@ bool
{
ColumnDef *coldef = (ColumnDef *) node;
if (walker(coldef->typename, context))
if (walker(coldef->typeName, context))
return true;
if (walker(coldef->raw_default, context))
return true;
@ -2483,7 +2483,7 @@ bool
if (walker(xs->expr, context))
return true;
if (walker(xs->typename, context))
if (walker(xs->typeName, context))
return true;
}
break;