1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +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:
Peter Eisentraut
2009-07-16 06:33:46 +00:00
parent 4ef8dc7a75
commit de160e2c00
52 changed files with 392 additions and 359 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.16 2009/06/11 14:49:04 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.17 2009/07/16 06:33:44 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -142,7 +142,7 @@ gin_extract_tsquery(PG_FUNCTION_ARGS)
if (item[i].type == QI_VAL)
{
text *txt;
QueryOperand *val = &item[i].operand;
QueryOperand *val = &item[i].qoperand;
txt = cstring_to_text_with_len(GETOPERAND(query) + val->distance,
val->length);