aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranray <anray@FreeBSD.org>2007-06-10 16:09:25 +0800
committeranray <anray@FreeBSD.org>2007-06-10 16:09:25 +0800
commitc5f419924c6a3e3fc2d2e0abea0e90d5569da2af (patch)
treef115c303a892f29bed4f7d549b9edd6d85e677bc
parent39743f6649d780926ce2a1fa21b8f56636c5b94d (diff)
downloadfreebsd-ports-gnome-c5f419924c6a3e3fc2d2e0abea0e90d5569da2af.tar.gz
freebsd-ports-gnome-c5f419924c6a3e3fc2d2e0abea0e90d5569da2af.tar.zst
freebsd-ports-gnome-c5f419924c6a3e3fc2d2e0abea0e90d5569da2af.zip
Try to correct works when compiled with gcc4
Reported by: Slawa Olhovchenkov
-rw-r--r--palm/makeztxt/Makefile1
-rw-r--r--palm/makeztxt/files/patch-libztxt-ztxt_disect.c13
-rw-r--r--palm/makeztxt/files/patch-libztxt-ztxt_init.c11
-rw-r--r--palm/makeztxt/files/patch-libztxt-ztxt_process.c42
-rw-r--r--palm/makeztxt/files/patch-libztxt-ztxt_set.c11
5 files changed, 78 insertions, 0 deletions
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';
+ }
+