*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
};
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);
struct itemIdSortData *itemidbase, *itemidptr;
ItemId lp;
int nline, nused;
- int itemidcompare();
Offset upper;
Size alignedSize;
/* sort itemIdSortData array...*/
pg_qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
- (void*) itemidcompare);
+ itemidcompare);
/* compactify page */
((PageHeader)page)->pd_upper = ((PageHeader)page)->pd_special;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
char *nstr;
- nstr = strcpy((char *)palloc(strlen(string)+1), string);
+ nstr = (char *)palloc(strlen(string)+1);
+ strcpy(nstr, string);
+
return nstr;
}
-
-
-
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
} 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);