mirror of
https://github.com/postgres/postgres.git
synced 2025-08-14 02:22:38 +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:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/view.c,v 1.116 2009/06/11 14:48:56 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/view.c,v 1.117 2009/07/16 06:33:42 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -119,7 +119,7 @@ DefineVirtualRelation(const RangeVar *relation, List *tlist, bool replace)
|
||||
ColumnDef *def = makeNode(ColumnDef);
|
||||
|
||||
def->colname = pstrdup(tle->resname);
|
||||
def->typename = makeTypeNameFromOid(exprType((Node *) tle->expr),
|
||||
def->typeName = makeTypeNameFromOid(exprType((Node *) tle->expr),
|
||||
exprTypmod((Node *) tle->expr));
|
||||
def->inhcount = 0;
|
||||
def->is_local = true;
|
||||
|
Reference in New Issue
Block a user