diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2009-07-16 06:33:46 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2009-07-16 06:33:46 +0000 |
commit | de160e2c001fc77168ff1edc815ceeec0c6d4244 (patch) | |
tree | 15afc931e1e23706b8916619581ddd5c0bcedcee /src/backend/access | |
parent | 4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff) | |
download | postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.tar.gz postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.zip |
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.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/common/tupdesc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 79efec0969a..0bd50318f6c 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.126 2009/06/11 14:48:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.127 2009/07/16 06:33:42 petere Exp $ * * NOTES * some of the executor utility code such as "ExecTypeFromTL" should be @@ -538,10 +538,10 @@ BuildDescForRelation(List *schema) attnum++; attname = entry->colname; - atttypid = typenameTypeId(NULL, entry->typename, &atttypmod); - attdim = list_length(entry->typename->arrayBounds); + atttypid = typenameTypeId(NULL, entry->typeName, &atttypmod); + attdim = list_length(entry->typeName->arrayBounds); - if (entry->typename->setof) + if (entry->typeName->setof) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), errmsg("column \"%s\" cannot be declared SETOF", |