From de160e2c001fc77168ff1edc815ceeec0c6d4244 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 16 Jul 2009 06:33:46 +0000 Subject: 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 Also add a script cpluspluscheck to check for C++ compatibility in the future. As of right now, this passes without error for me. --- src/backend/commands/indexcmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/indexcmds.c') diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c6a01f5b75..ef879a3df2 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.185 2009/06/11 14:48:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.186 2009/07/16 06:33:42 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1237,7 +1237,7 @@ makeObjectName(const char *name1, const char *name2, const char *label) */ char * ChooseRelationName(const char *name1, const char *name2, - const char *label, Oid namespace) + const char *label, Oid namespaceid) { int pass = 0; char *relname = NULL; @@ -1250,7 +1250,7 @@ ChooseRelationName(const char *name1, const char *name2, { relname = makeObjectName(name1, name2, modlabel); - if (!OidIsValid(get_relname_relid(relname, namespace))) + if (!OidIsValid(get_relname_relid(relname, namespaceid))) break; /* found a conflict, so try a new name component */ -- cgit v1.2.1