Typecasts, etc. to make compile work on AIX. Thanks Darren King..

This commit is contained in:
Bryan Henderson 1996-11-24 04:44:24 +00:00
parent d3f9d6ad4f
commit 092c7a6be5
4 changed files with 15 additions and 15 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.4 1996/11/13 20:49:29 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.5 1996/11/24 04:41:29 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@ -304,11 +304,13 @@ struct itemIdSortData {
};
static int
itemidcompare(struct itemIdSortData *itemidp1, struct itemIdSortData *itemidp2)
itemidcompare(void *itemidp1, void *itemidp2)
{
if (itemidp1->itemiddata.lp_off == itemidp2->itemiddata.lp_off)
if (((struct itemIdSortData *)itemidp1)->itemiddata.lp_off ==
((struct itemIdSortData *)itemidp2)->itemiddata.lp_off)
return(0);
else if (itemidp1->itemiddata.lp_off < itemidp2->itemiddata.lp_off)
else if (((struct itemIdSortData *)itemidp1)->itemiddata.lp_off <
((struct itemIdSortData *)itemidp2)->itemiddata.lp_off)
return(1);
else
return(-1);
@ -325,7 +327,6 @@ PageRepairFragmentation(Page page)
struct itemIdSortData *itemidbase, *itemidptr;
ItemId lp;
int nline, nused;
int itemidcompare();
Offset upper;
Size alignedSize;
@ -364,7 +365,7 @@ PageRepairFragmentation(Page page)
/* sort itemIdSortData array...*/
pg_qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
(void*) itemidcompare);
itemidcompare);
/* compactify page */
((PageHeader)page)->pd_upper = ((PageHeader)page)->pd_special;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.2 1996/11/10 02:26:15 bryanh Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.3 1996/11/24 04:44:14 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@ -204,7 +204,7 @@ handle_load(char *filename, char *funcname)
return((func_ptr) NULL);
}
retval = pg_dlsym(file_scanner->handle, funcname);
retval = (func_ptr) pg_dlsym(file_scanner->handle, funcname);
if (retval == (func_ptr) NULL) {
elog(WARN, "Can't find function %s in file %s", funcname, filename);

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.2 1996/11/24 04:44:17 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@ -109,9 +109,8 @@ pstrdup(char* string)
{
char *nstr;
nstr = strcpy((char *)palloc(strlen(string)+1), string);
nstr = (char *)palloc(strlen(string)+1);
strcpy(nstr, string);
return nstr;
}

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.32 1996/11/22 06:45:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.33 1996/11/24 04:44:24 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@ -739,7 +739,7 @@ do_copy(const char *args, PsqlSettings * settings)
} else {
copystream = fopen(file, "w");
}
if (copystream < 0)
if (copystream == NULL)
fprintf(stderr,
"Unable to open file %s which to copy, errno = %s (%d).",
from ? "from" : "to", strerror(errno), errno);