mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.506 2009/07/12 17:12:34 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.507 2009/07/16 06:33:44 petere Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -5331,7 +5331,7 @@ flatten_set_variable_args(const char *name, List *args)
|
||||
{
|
||||
Node *arg = (Node *) lfirst(l);
|
||||
char *val;
|
||||
TypeName *typename = NULL;
|
||||
TypeName *typeName = NULL;
|
||||
A_Const *con;
|
||||
|
||||
if (l != list_head(args))
|
||||
@ -5342,7 +5342,7 @@ flatten_set_variable_args(const char *name, List *args)
|
||||
TypeCast *tc = (TypeCast *) arg;
|
||||
|
||||
arg = tc->arg;
|
||||
typename = tc->typename;
|
||||
typeName = tc->typeName;
|
||||
}
|
||||
|
||||
if (!IsA(arg, A_Const))
|
||||
@ -5360,7 +5360,7 @@ flatten_set_variable_args(const char *name, List *args)
|
||||
break;
|
||||
case T_String:
|
||||
val = strVal(&con->val);
|
||||
if (typename != NULL)
|
||||
if (typeName != NULL)
|
||||
{
|
||||
/*
|
||||
* Must be a ConstInterval argument for TIME ZONE. Coerce
|
||||
@ -5372,7 +5372,7 @@ flatten_set_variable_args(const char *name, List *args)
|
||||
Datum interval;
|
||||
char *intervalout;
|
||||
|
||||
typoid = typenameTypeId(NULL, typename, &typmod);
|
||||
typoid = typenameTypeId(NULL, typeName, &typmod);
|
||||
Assert(typoid == INTERVALOID);
|
||||
|
||||
interval =
|
||||
|
Reference in New Issue
Block a user