Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bd6f98a

Browse files
committed
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
1 parent 0d01fd4 commit bd6f98a

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

src/backend/executor/execMain.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.79 1999/02/22 19:40:09 momjian Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.80 1999/03/19 18:56:36 momjian Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -1724,7 +1724,8 @@ EvalPlanQual(EState *estate, Index rti, ItemPointer tid)
17241724
}
17251725
/* push current PQ to the stack */
17261726
epqstate->es_evalPlanQual = (Pointer) epq;
1727-
estate->es_evalPlanQual = (Pointer) epq = newepq;
1727+
epq = newepq;
1728+
estate->es_evalPlanQual = (Pointer) epq;
17281729
epq->rti = rti;
17291730
endNode = false;
17301731
}

src/backend/optimizer/plan/planner.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.45 1999/02/21 03:48:49 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.46 1999/03/19 18:56:37 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -283,20 +283,20 @@ union_planner(Query *parse)
283283

284284

285285
/* convert the havingQual to conjunctive normal form (cnf) */
286-
(List *) parse->havingQual=cnfify((Expr *)(Node *) parse->havingQual,true);
286+
parse->havingQual = (Node *) cnfify((Expr *)(Node *) parse->havingQual,true);
287287

288288
/* There is a subselect in the havingQual, so we have to process it
289289
* using the same function as for a subselect in 'where' */
290290
if (parse->hasSubLinks)
291291
{
292-
(List *) parse->havingQual =
293-
(List *) SS_process_sublinks((Node *) parse->havingQual);
292+
parse->havingQual =
293+
(Node *) SS_process_sublinks((Node *) parse->havingQual);
294294
}
295295

296296

297297
/* Calculate the opfids from the opnos (=select the correct functions for
298298
* the used VAR datatypes) */
299-
(List *) parse->havingQual=fix_opids((List *) parse->havingQual);
299+
parse->havingQual = (Node *) fix_opids((List *) parse->havingQual);
300300

301301
((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
302302

src/include/utils/ps_status.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
extern char *ps_status_buffer;
2121

2222
#define PS_DEFINE_BUFFER \
23-
char *ps_status_buffer = NULL;
23+
char *ps_status_buffer = NULL
2424

2525
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
2626
{ \
@@ -53,7 +53,7 @@ char *ps_status_buffer = NULL;
5353
extern const char **ps_status;
5454

5555
#define PS_DEFINE_BUFFER \
56-
const char **ps_status = NULL;
56+
const char **ps_status = NULL
5757

5858
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
5959
{ \

src/interfaces/ecpg/lib/ecpglib.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ ECPGexecute(struct statement * stmt)
741741
break;
742742
}
743743

744-
add_mem((void *)(var->value) = *((void **)(var->pointer)) = (void *) ecpg_alloc(len, stmt->lineno), stmt->lineno);
744+
var->pointer = (void *) ecpg_alloc(len, stmt->lineno);
745+
var->value = (void **) var->pointer;
746+
add_mem((void *) var->value, stmt->lineno);
745747
}
746748

747749
for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)

0 commit comments

Comments
 (0)