summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2009-07-16 06:33:46 +0000
committerPeter Eisentraut2009-07-16 06:33:46 +0000
commitde160e2c001fc77168ff1edc815ceeec0c6d4244 (patch)
tree15afc931e1e23706b8916619581ddd5c0bcedcee /src/include
parent4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff)
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/include')
-rw-r--r--src/include/catalog/pg_constraint.h4
-rw-r--r--src/include/commands/defrem.h4
-rw-r--r--src/include/commands/tablecmds.h4
-rw-r--r--src/include/nodes/makefuncs.h6
-rw-r--r--src/include/nodes/memnodes.h4
-rw-r--r--src/include/nodes/parsenodes.h18
-rw-r--r--src/include/nodes/primnodes.h8
-rw-r--r--src/include/optimizer/plancat.h6
-rw-r--r--src/include/parser/parse_type.h10
-rw-r--r--src/include/tsearch/ts_public.h4
-rw-r--r--src/include/tsearch/ts_type.h6
-rw-r--r--src/include/tsearch/ts_utils.h4
-rw-r--r--src/include/utils/builtins.h4
13 files changed, 41 insertions, 41 deletions
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index edfa864dc2b..24454ef5687 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.30 2009/01/01 17:23:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.31 2009/07/16 06:33:45 petere Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -210,7 +210,7 @@ extern void RenameConstraintById(Oid conId, const char *newname);
extern bool ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId,
Oid objNamespace, const char *conname);
extern char *ChooseConstraintName(const char *name1, const char *name2,
- const char *label, Oid namespace,
+ const char *label, Oid namespaceid,
List *others);
extern void AlterConstraintNamespaces(Oid ownerId, Oid oldNspId,
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 4658a314f7d..1d6ab7bbf4f 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.94 2009/04/04 21:12:31 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.95 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@ extern void ReindexDatabase(const char *databaseName,
extern char *makeObjectName(const char *name1, const char *name2,
const char *label);
extern char *ChooseRelationName(const char *name1, const char *name2,
- const char *label, Oid namespace);
+ const char *label, Oid namespaceid);
extern Oid GetDefaultOpClass(Oid type_id, Oid am_id);
/* commands/functioncmds.c */
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index 82c9813a7c5..f0cd5300138 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.43 2009/06/11 14:49:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.44 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,7 +57,7 @@ extern void find_composite_type_dependencies(Oid typeOid,
const char *origTblName,
const char *origTypeName);
-extern AttrNumber *varattnos_map(TupleDesc old, TupleDesc new);
+extern AttrNumber *varattnos_map(TupleDesc olddesc, TupleDesc newdesc);
extern AttrNumber *varattnos_map_schema(TupleDesc old, List *schema);
extern void change_varattnos_of_a_node(Node *node, const AttrNumber *newattno);
diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h
index c8f3e42c2fc..f24834b7251 100644
--- a/src/include/nodes/makefuncs.h
+++ b/src/include/nodes/makefuncs.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/makefuncs.h,v 1.68 2009/06/11 14:49:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/makefuncs.h,v 1.69 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,13 +60,13 @@ extern RangeVar *makeRangeVar(char *schemaname, char *relname, int location);
extern TypeName *makeTypeName(char *typnam);
extern TypeName *makeTypeNameFromNameList(List *names);
-extern TypeName *makeTypeNameFromOid(Oid typeid, int32 typmod);
+extern TypeName *makeTypeNameFromOid(Oid typeOid, int32 typmod);
extern FuncExpr *makeFuncExpr(Oid funcid, Oid rettype,
List *args, CoercionForm fformat);
extern DefElem *makeDefElem(char *name, Node *arg);
-extern DefElem *makeDefElemExtended(char *namespace, char *name, Node *arg,
+extern DefElem *makeDefElemExtended(char *nameSpace, char *name, Node *arg,
DefElemAction defaction);
#endif /* MAKEFUNC_H */
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index c49c0230ad1..61d2750bdce 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/memnodes.h,v 1.35 2009/01/01 17:24:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/memnodes.h,v 1.36 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@ typedef struct MemoryContextMethods
void *(*realloc) (MemoryContext context, void *pointer, Size size);
void (*init) (MemoryContext context);
void (*reset) (MemoryContext context);
- void (*delete) (MemoryContext context);
+ void (*delete_context) (MemoryContext context);
Size (*get_chunk_space) (MemoryContext context, void *pointer);
bool (*is_empty) (MemoryContext context);
void (*stats) (MemoryContext context, int level);
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 7793f66f20f..ecd76d7b41c 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.395 2009/06/18 01:27:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.396 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -161,7 +161,7 @@ typedef struct Query
*
* For TypeName structures generated internally, it is often easier to
* specify the type by OID than by name. If "names" is NIL then the
- * actual type OID is given by typeid, otherwise typeid is unused.
+ * actual type OID is given by typeOid, otherwise typeOid is unused.
* Similarly, if "typmods" is NIL then the actual typmod is expected to
* be prespecified in typemod, otherwise typemod is unused.
*
@@ -173,7 +173,7 @@ typedef struct TypeName
{
NodeTag type;
List *names; /* qualified name (list of Value strings) */
- Oid typeid; /* type identified by OID */
+ Oid typeOid; /* type identified by OID */
bool setof; /* is a set? */
bool pct_type; /* %TYPE specified? */
List *typmods; /* type modifier expression(s) */
@@ -256,7 +256,7 @@ typedef struct TypeCast
{
NodeTag type;
Node *arg; /* the expression being casted */
- TypeName *typename; /* the target type */
+ TypeName *typeName; /* the target type */
int location; /* token location, or -1 if unknown */
} TypeCast;
@@ -457,7 +457,7 @@ typedef struct ColumnDef
{
NodeTag type;
char *colname; /* name of column */
- TypeName *typename; /* type of column */
+ TypeName *typeName; /* type of column */
int inhcount; /* number of times column is inherited */
bool is_local; /* column has local (non-inherited) def'n */
bool is_not_null; /* NOT NULL constraint specified? */
@@ -554,7 +554,7 @@ typedef struct XmlSerialize
NodeTag type;
XmlOptionType xmloption; /* DOCUMENT or CONTENT */
Node *expr;
- TypeName *typename;
+ TypeName *typeName;
int location; /* token location, or -1 if unknown */
} XmlSerialize;
@@ -1166,7 +1166,7 @@ typedef struct AlterDomainStmt
* X = drop constraint
*------------
*/
- List *typename; /* domain to work on */
+ List *typeName; /* domain to work on */
char *name; /* column or constraint name to act on */
Node *def; /* definition of default or constraint */
DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
@@ -1670,7 +1670,7 @@ typedef struct CreateDomainStmt
{
NodeTag type;
List *domainname; /* qualified name (list of Value strings) */
- TypeName *typename; /* the base type */
+ TypeName *typeName; /* the base type */
List *constraints; /* constraints (list of Constraint nodes) */
} CreateDomainStmt;
@@ -2084,7 +2084,7 @@ typedef struct CompositeTypeStmt
typedef struct CreateEnumStmt
{
NodeTag type;
- List *typename; /* qualified name (list of Value strings) */
+ List *typeName; /* qualified name (list of Value strings) */
List *vals; /* enum values (list of Value strings) */
} CreateEnumStmt;
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index a41b0e2f7d5..5f5d4125c65 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.149 2009/06/11 14:49:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.150 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1125,8 +1125,8 @@ typedef struct RangeTblRef
/*----------
* JoinExpr - for SQL JOIN expressions
*
- * isNatural, using, and quals are interdependent. The user can write only
- * one of NATURAL, USING(), or ON() (this is enforced by the grammar).
+ * isNatural, usingClause, and quals are interdependent. The user can write
+ * only one of NATURAL, USING(), or ON() (this is enforced by the grammar).
* If he writes NATURAL then parse analysis generates the equivalent USING()
* list, and from that fills in "quals" with the right equality comparisons.
* If he writes USING() then "quals" is filled with equality comparisons.
@@ -1152,7 +1152,7 @@ typedef struct JoinExpr
bool isNatural; /* Natural join? Will need to shape table */
Node *larg; /* left subtree */
Node *rarg; /* right subtree */
- List *using; /* USING clause, if any (list of String) */
+ List *usingClause; /* USING clause, if any (list of String) */
Node *quals; /* qualifiers on join, if any */
Alias *alias; /* user-written alias clause, if any */
int rtindex; /* RT index assigned for join, or 0 */
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index c829ac18912..00da7d32ac6 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.54 2009/06/11 14:49:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.55 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,12 +39,12 @@ extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel);
extern bool has_unique_index(RelOptInfo *rel, AttrNumber attno);
extern Selectivity restriction_selectivity(PlannerInfo *root,
- Oid operator,
+ Oid operatorid,
List *args,
int varRelid);
extern Selectivity join_selectivity(PlannerInfo *root,
- Oid operator,
+ Oid operatorid,
List *args,
JoinType jointype,
SpecialJoinInfo *sjinfo);
diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h
index 26d74a101ff..c2b2b51bc1b 100644
--- a/src/include/parser/parse_type.h
+++ b/src/include/parser/parse_type.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_type.h,v 1.40 2009/01/01 17:24:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_type.h,v 1.41 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,14 +19,14 @@
typedef HeapTuple Type;
-extern Type LookupTypeName(ParseState *pstate, const TypeName *typename,
+extern Type LookupTypeName(ParseState *pstate, const TypeName *typeName,
int32 *typmod_p);
-extern Type typenameType(ParseState *pstate, const TypeName *typename,
+extern Type typenameType(ParseState *pstate, const TypeName *typeName,
int32 *typmod_p);
-extern Oid typenameTypeId(ParseState *pstate, const TypeName *typename,
+extern Oid typenameTypeId(ParseState *pstate, const TypeName *typeName,
int32 *typmod_p);
-extern char *TypeNameToString(const TypeName *typename);
+extern char *TypeNameToString(const TypeName *typeName);
extern char *TypeNameListToString(List *typenames);
extern Type typeidType(Oid id);
diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h
index 253fa1451c4..61a3d220255 100644
--- a/src/include/tsearch/ts_public.h
+++ b/src/include/tsearch/ts_public.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1998-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/tsearch/ts_public.h,v 1.14 2009/06/11 14:49:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/tsearch/ts_public.h,v 1.15 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -111,7 +111,7 @@ typedef struct
bool isend; /* in: marks for lexize_info about text end is
* reached */
bool getnext; /* out: dict wants next lexeme */
- void *private; /* internal dict state between calls with
+ void *private_state; /* internal dict state between calls with
* getnext == true */
} DictSubState;
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h
index 60c16553eaf..6036110c192 100644
--- a/src/include/tsearch/ts_type.h
+++ b/src/include/tsearch/ts_type.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1998-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/tsearch/ts_type.h,v 1.15 2009/01/01 17:24:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/tsearch/ts_type.h,v 1.16 2009/07/16 06:33:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -218,8 +218,8 @@ typedef struct
typedef union
{
QueryItemType type;
- QueryOperator operator;
- QueryOperand operand;
+ QueryOperator qoperator;
+ QueryOperand qoperand;
} QueryItem;
/*
diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h
index 566227ef6fb..db9a43be993 100644
--- a/src/include/tsearch/ts_utils.h
+++ b/src/include/tsearch/ts_utils.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1998-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.17 2009/06/11 14:49:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.18 2009/07/16 06:33:46 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,7 +55,7 @@ extern TSQuery parse_tsquery(char *buf,
extern void pushValue(TSQueryParserState state,
char *strval, int lenval, int2 weight, bool prefix);
extern void pushStop(TSQueryParserState state);
-extern void pushOperator(TSQueryParserState state, int8 operator);
+extern void pushOperator(TSQueryParserState state, int8 oper);
/*
* parse plain text and lexize words
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index de9adb87b34..5547b6c8c93 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.333 2009/07/07 18:23:15 petere Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.334 2009/07/16 06:33:46 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -593,7 +593,7 @@ extern List *deparse_context_for(const char *aliasname, Oid relid);
extern List *deparse_context_for_plan(Node *plan, Node *outer_plan,
List *rtable, List *subplans);
extern const char *quote_identifier(const char *ident);
-extern char *quote_qualified_identifier(const char *namespace,
+extern char *quote_qualified_identifier(const char *qualifier,
const char *ident);
/* tid.c */