mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +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/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 */
|
||||
|
Reference in New Issue
Block a user