portability patch
Started by Zeugswetter Andreas IZ5almost 27 years ago2 messages
Hi,
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
Attachments:
port.patchapplication/octet-stream; name=port.patchDownload
*** src/backend/executor/execMain.c.orig Fri Mar 5 10:08:16 1999
--- src/backend/executor/execMain.c Wed Mar 17 11:46:05 1999
***************
*** 1724,1730 ****
}
/* push current PQ to the stack */
epqstate->es_evalPlanQual = (Pointer) epq;
! estate->es_evalPlanQual = (Pointer) epq = newepq;
epq->rti = rti;
endNode = false;
}
--- 1724,1731 ----
}
/* push current PQ to the stack */
epqstate->es_evalPlanQual = (Pointer) epq;
! epq = newepq;
! estate->es_evalPlanQual = (Pointer) epq;
epq->rti = rti;
endNode = false;
}
*** src/backend/optimizer/plan/planner.c.orig Fri Mar 5 10:09:03 1999
--- src/backend/optimizer/plan/planner.c Wed Mar 17 11:53:25 1999
***************
*** 283,302 ****
/* convert the havingQual to conjunctive normal form (cnf) */
! (List *) parse->havingQual=cnfify((Expr *)(Node *) parse->havingQual,true);
/* There is a subselect in the havingQual, so we have to process it
* using the same function as for a subselect in 'where' */
if (parse->hasSubLinks)
{
! (List *) parse->havingQual =
! (List *) SS_process_sublinks((Node *) parse->havingQual);
}
/* Calculate the opfids from the opnos (=select the correct functions for
* the used VAR datatypes) */
! (List *) parse->havingQual=fix_opids((List *) parse->havingQual);
((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
--- 283,302 ----
/* convert the havingQual to conjunctive normal form (cnf) */
! parse->havingQual = (Node *) cnfify((Expr *)(Node *) parse->havingQual,true);
/* There is a subselect in the havingQual, so we have to process it
* using the same function as for a subselect in 'where' */
if (parse->hasSubLinks)
{
! parse->havingQual =
! (Node *) SS_process_sublinks((Node *) parse->havingQual);
}
/* Calculate the opfids from the opnos (=select the correct functions for
* the used VAR datatypes) */
! parse->havingQual = (Node *) fix_opids((List *) parse->havingQual);
((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
*** src/include/utils/ps_status.h.orig Mon Feb 15 13:55:11 1999
--- src/include/utils/ps_status.h Fri Mar 19 09:26:43 1999
***************
*** 20,26 ****
extern char *ps_status_buffer;
#define PS_DEFINE_BUFFER \
! char *ps_status_buffer = NULL;
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \
--- 20,26 ----
extern char *ps_status_buffer;
#define PS_DEFINE_BUFFER \
! char *ps_status_buffer = NULL
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \
***************
*** 53,59 ****
extern const char **ps_status;
#define PS_DEFINE_BUFFER \
! const char **ps_status = NULL;
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \
--- 53,59 ----
extern const char **ps_status;
#define PS_DEFINE_BUFFER \
! const char **ps_status = NULL
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \
*** src/interfaces/ecpg/lib/ecpglib.c.orig Fri Mar 12 10:00:23 1999
--- src/interfaces/ecpg/lib/ecpglib.c Wed Mar 17 15:16:45 1999
***************
*** 741,747 ****
break;
}
! add_mem((void *)(var->value) = *((void **)(var->pointer)) = (void *) ecpg_alloc(len, stmt->lineno), stmt->lineno);
}
for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)
--- 741,749 ----
break;
}
! 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++)
Re: [HACKERS] portability patch
Applied. It certainly clears up some funny-looking code.
Hi,
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
[Attachment, skipping...]
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026