Commit bd6f98af authored by Bruce Momjian's avatar Bruce Momjian

I suggest the following portability patch, which does not

change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.

 <<port.patch>>
Thanks
Andreas
parent 0d01fd4e
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.79 1999/02/22 19:40:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.80 1999/03/19 18:56:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1724,7 +1724,8 @@ EvalPlanQual(EState *estate, Index rti, ItemPointer tid) ...@@ -1724,7 +1724,8 @@ EvalPlanQual(EState *estate, Index rti, ItemPointer tid)
} }
/* push current PQ to the stack */ /* push current PQ to the stack */
epqstate->es_evalPlanQual = (Pointer) epq; epqstate->es_evalPlanQual = (Pointer) epq;
estate->es_evalPlanQual = (Pointer) epq = newepq; epq = newepq;
estate->es_evalPlanQual = (Pointer) epq;
epq->rti = rti; epq->rti = rti;
endNode = false; endNode = false;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.45 1999/02/21 03:48:49 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.46 1999/03/19 18:56:37 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -283,20 +283,20 @@ union_planner(Query *parse) ...@@ -283,20 +283,20 @@ union_planner(Query *parse)
/* convert the havingQual to conjunctive normal form (cnf) */ /* convert the havingQual to conjunctive normal form (cnf) */
(List *) parse->havingQual=cnfify((Expr *)(Node *) parse->havingQual,true); parse->havingQual = (Node *) cnfify((Expr *)(Node *) parse->havingQual,true);
/* There is a subselect in the havingQual, so we have to process it /* There is a subselect in the havingQual, so we have to process it
* using the same function as for a subselect in 'where' */ * using the same function as for a subselect in 'where' */
if (parse->hasSubLinks) if (parse->hasSubLinks)
{ {
(List *) parse->havingQual = parse->havingQual =
(List *) SS_process_sublinks((Node *) parse->havingQual); (Node *) SS_process_sublinks((Node *) parse->havingQual);
} }
/* Calculate the opfids from the opnos (=select the correct functions for /* Calculate the opfids from the opnos (=select the correct functions for
* the used VAR datatypes) */ * the used VAR datatypes) */
(List *) parse->havingQual=fix_opids((List *) parse->havingQual); parse->havingQual = (Node *) fix_opids((List *) parse->havingQual);
((Agg *) result_plan)->plan.qual=(List *) parse->havingQual; ((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
extern char *ps_status_buffer; extern char *ps_status_buffer;
#define PS_DEFINE_BUFFER \ #define PS_DEFINE_BUFFER \
char *ps_status_buffer = NULL; char *ps_status_buffer = NULL
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \ #define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \ { \
...@@ -53,7 +53,7 @@ char *ps_status_buffer = NULL; ...@@ -53,7 +53,7 @@ char *ps_status_buffer = NULL;
extern const char **ps_status; extern const char **ps_status;
#define PS_DEFINE_BUFFER \ #define PS_DEFINE_BUFFER \
const char **ps_status = NULL; const char **ps_status = NULL
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \ #define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \ { \
......
...@@ -741,7 +741,9 @@ ECPGexecute(struct statement * stmt) ...@@ -741,7 +741,9 @@ ECPGexecute(struct statement * stmt)
break; break;
} }
add_mem((void *)(var->value) = *((void **)(var->pointer)) = (void *) ecpg_alloc(len, stmt->lineno), stmt->lineno); var->pointer = (void *) ecpg_alloc(len, stmt->lineno);
var->value = (void **) var->pointer;
add_mem((void *) var->value, stmt->lineno);
} }
for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++) for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment