1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +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

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.64 2009/04/04 21:12:31 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.65 2009/07/16 06:33:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -316,11 +316,11 @@ makeTypeNameFromNameList(List *names)
* build a TypeName node to represent a type already known by OID/typmod.
*/
TypeName *
makeTypeNameFromOid(Oid typeid, int32 typmod)
makeTypeNameFromOid(Oid typeOid, int32 typmod)
{
TypeName *n = makeNode(TypeName);
n->typeid = typeid;
n->typeOid = typeOid;
n->typemod = typmod;
n->location = -1;
return n;
@ -373,12 +373,12 @@ makeDefElem(char *name, Node *arg)
* build a DefElem node with all fields available to be specified
*/
DefElem *
makeDefElemExtended(char *namespace, char *name, Node *arg,
makeDefElemExtended(char *nameSpace, char *name, Node *arg,
DefElemAction defaction)
{
DefElem *res = makeNode(DefElem);
res->defnamespace = namespace;
res->defnamespace = nameSpace;
res->defname = name;
res->arg = arg;
res->defaction = defaction;