Skip to content

Commit 092c7a6

Browse files
author
Bryan Henderson
committed
Typecasts, etc. to make compile work on AIX. Thanks Darren King..
1 parent d3f9d6a commit 092c7a6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/backend/storage/page/bufpage.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.4 1996/11/13 20:49:29 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.5 1996/11/24 04:41:29 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -304,11 +304,13 @@ struct itemIdSortData {
304304
};
305305

306306
static int
307-
itemidcompare(struct itemIdSortData *itemidp1, struct itemIdSortData *itemidp2)
307+
itemidcompare(void *itemidp1, void *itemidp2)
308308
{
309-
if (itemidp1->itemiddata.lp_off == itemidp2->itemiddata.lp_off)
309+
if (((struct itemIdSortData *)itemidp1)->itemiddata.lp_off ==
310+
((struct itemIdSortData *)itemidp2)->itemiddata.lp_off)
310311
return(0);
311-
else if (itemidp1->itemiddata.lp_off < itemidp2->itemiddata.lp_off)
312+
else if (((struct itemIdSortData *)itemidp1)->itemiddata.lp_off <
313+
((struct itemIdSortData *)itemidp2)->itemiddata.lp_off)
312314
return(1);
313315
else
314316
return(-1);
@@ -325,7 +327,6 @@ PageRepairFragmentation(Page page)
325327
struct itemIdSortData *itemidbase, *itemidptr;
326328
ItemId lp;
327329
int nline, nused;
328-
int itemidcompare();
329330
Offset upper;
330331
Size alignedSize;
331332

@@ -364,7 +365,7 @@ PageRepairFragmentation(Page page)
364365

365366
/* sort itemIdSortData array...*/
366367
pg_qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
367-
(void*) itemidcompare);
368+
itemidcompare);
368369

369370
/* compactify page */
370371
((PageHeader)page)->pd_upper = ((PageHeader)page)->pd_special;

src/backend/utils/fmgr/dfmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.2 1996/11/10 02:26:15 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.3 1996/11/24 04:44:14 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -204,7 +204,7 @@ handle_load(char *filename, char *funcname)
204204
return((func_ptr) NULL);
205205
}
206206

207-
retval = pg_dlsym(file_scanner->handle, funcname);
207+
retval = (func_ptr) pg_dlsym(file_scanner->handle, funcname);
208208

209209
if (retval == (func_ptr) NULL) {
210210
elog(WARN, "Can't find function %s in file %s", funcname, filename);

src/backend/utils/mmgr/palloc.c

Lines changed: 4 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/utils/mmgr/Attic/palloc.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.2 1996/11/24 04:44:17 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -109,9 +109,8 @@ pstrdup(char* string)
109109
{
110110
char *nstr;
111111

112-
nstr = strcpy((char *)palloc(strlen(string)+1), string);
112+
nstr = (char *)palloc(strlen(string)+1);
113+
strcpy(nstr, string);
114+
113115
return nstr;
114116
}
115-
116-
117-

src/bin/psql/psql.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.32 1996/11/22 06:45:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.33 1996/11/24 04:44:24 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -739,7 +739,7 @@ do_copy(const char *args, PsqlSettings * settings)
739739
} else {
740740
copystream = fopen(file, "w");
741741
}
742-
if (copystream < 0)
742+
if (copystream == NULL)
743743
fprintf(stderr,
744744
"Unable to open file %s which to copy, errno = %s (%d).",
745745
from ? "from" : "to", strerror(errno), errno);

0 commit comments

Comments
 (0)