From 4f7ee9fa49a911c15323188d621283edb6768472 Mon Sep 17 00:00:00 2001 From: Andrey Slusar Date: Sun, 10 Jun 2007 08:09:25 +0000 Subject: Try to correct works when compiled with gcc4 Reported by: Slawa Olhovchenkov --- palm/makeztxt/Makefile | 1 + palm/makeztxt/files/patch-libztxt-ztxt_disect.c | 13 ++++++++ palm/makeztxt/files/patch-libztxt-ztxt_init.c | 11 +++++++ palm/makeztxt/files/patch-libztxt-ztxt_process.c | 42 ++++++++++++++++++++++++ palm/makeztxt/files/patch-libztxt-ztxt_set.c | 11 +++++++ 5 files changed, 78 insertions(+) create mode 100644 palm/makeztxt/files/patch-libztxt-ztxt_disect.c create mode 100644 palm/makeztxt/files/patch-libztxt-ztxt_init.c create mode 100644 palm/makeztxt/files/patch-libztxt-ztxt_process.c create mode 100644 palm/makeztxt/files/patch-libztxt-ztxt_set.c (limited to 'palm') diff --git a/palm/makeztxt/Makefile b/palm/makeztxt/Makefile index 66bd888ead87..3fdc3d659c0d 100644 --- a/palm/makeztxt/Makefile +++ b/palm/makeztxt/Makefile @@ -7,6 +7,7 @@ PORTNAME= makeztxt PORTVERSION= 1.60 +PORTREVISION= 1 CATEGORIES= palm MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= gutenpalm diff --git a/palm/makeztxt/files/patch-libztxt-ztxt_disect.c b/palm/makeztxt/files/patch-libztxt-ztxt_disect.c new file mode 100644 index 000000000000..a17dc8ceb43c --- /dev/null +++ b/palm/makeztxt/files/patch-libztxt-ztxt_disect.c @@ -0,0 +1,13 @@ +--- libztxt/ztxt_disect.c.orig Sun Jun 3 13:31:46 2007 ++++ libztxt/ztxt_disect.c Sun Jun 3 13:32:42 2007 +@@ -152,8 +152,8 @@ + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; +- zstream.next_in = &db->output[ntohl(db->dbRecordEntries[1].localChunkID)]; +- zstream.next_out = db->input; ++ zstream.next_in = (Bytef *)&db->output[ntohl(db->dbRecordEntries[1].localChunkID)]; ++ zstream.next_out = (Bytef *)db->input; + zstream.avail_in = data_size; + zstream.avail_out = db->input_size + 1; + diff --git a/palm/makeztxt/files/patch-libztxt-ztxt_init.c b/palm/makeztxt/files/patch-libztxt-ztxt_init.c new file mode 100644 index 000000000000..f4f2caf3fe4a --- /dev/null +++ b/palm/makeztxt/files/patch-libztxt-ztxt_init.c @@ -0,0 +1,11 @@ +--- libztxt/ztxt_init.c.orig Mon May 28 20:23:08 2007 ++++ libztxt/ztxt_init.c Mon May 28 20:23:16 2007 +@@ -61,7 +61,7 @@ + + /* Initialize the Palm DB header structure */ + header = ztxtdb->dbHeader; +- strcpy(header->name, "New zTXT database"); ++ strcpy((char *)header->name, "New zTXT database"); + header->attributes = htons(dmHdrAttrBackup); + header->version = htons(ZTXT_VERSION); + header->creationDate = htonl(time(NULL) + PALM_CTIME_OFFSET); diff --git a/palm/makeztxt/files/patch-libztxt-ztxt_process.c b/palm/makeztxt/files/patch-libztxt-ztxt_process.c new file mode 100644 index 000000000000..2ed1f2d232c7 --- /dev/null +++ b/palm/makeztxt/files/patch-libztxt-ztxt_process.c @@ -0,0 +1,42 @@ +--- libztxt/ztxt_process.c.orig Tue Aug 12 15:05:21 2003 ++++ libztxt/ztxt_process.c Sun Jun 3 13:29:24 2007 +@@ -321,8 +321,8 @@ + /* Method 1 allows for random access in the compressed data */ + + /* Set buffer pointers */ +- zstream.next_in = buf; +- zstream.next_out = zbuf; ++ zstream.next_in = (Bytef *)buf; ++ zstream.next_out = (Bytef *)zbuf; + zstream.avail_in = RECORD_SIZE; + zstream.avail_out = zbuf_size; + +@@ -354,7 +354,7 @@ + memcpy(buf, &(db->tmp[zpos]), RECORD_SIZE); + zpos += RECORD_SIZE; + bytesleft -= RECORD_SIZE; +- zstream.next_in = buf; ++ zstream.next_in = (Bytef *)buf; + zstream.avail_in = RECORD_SIZE; + db->num_records++; + offsets[db->num_records] = zstream.total_out; +@@ -365,7 +365,7 @@ + { + memcpy(buf, &(db->tmp[zpos]), bytesleft); + zpos += bytesleft; +- zstream.next_in = buf; ++ zstream.next_in = (Bytef *)buf; + zstream.avail_in = bytesleft; + db->num_records++; + offsets[db->num_records] = zstream.total_out; +@@ -402,8 +402,8 @@ + /* Method 2 gives about 10% - 15% more compression */ + + /* Set buffer pointers */ +- zstream.next_in = db->tmp; +- zstream.next_out = zbuf; ++ zstream.next_in = (Bytef *)db->tmp; ++ zstream.next_out = (Bytef *)zbuf; + zstream.avail_in = db->tmpsize; + zstream.avail_out = zbuf_size; + diff --git a/palm/makeztxt/files/patch-libztxt-ztxt_set.c b/palm/makeztxt/files/patch-libztxt-ztxt_set.c new file mode 100644 index 000000000000..21b5b7259e61 --- /dev/null +++ b/palm/makeztxt/files/patch-libztxt-ztxt_set.c @@ -0,0 +1,11 @@ +--- libztxt/ztxt_set.c.orig Mon May 28 20:12:33 2007 ++++ libztxt/ztxt_set.c Mon May 28 20:12:44 2007 +@@ -40,7 +40,7 @@ + void + ztxt_set_title(ztxt *db, char *new_title) + { +- strncpy(db->dbHeader->name, new_title, dmDBNameLength); ++ strncpy((char *)db->dbHeader->name, new_title, dmDBNameLength); + db->dbHeader->name[dmDBNameLength - 1] = '\0'; + } + -- cgit v1.2.3