pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/35179: patches to pkgsrc/editors/nvi for gcc 4.1.x
>Number: 35179
>Category: pkg
>Synopsis: patches to pkgsrc/editors/nvi for gcc 4.1.x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 04 10:00:01 +0000 2006
>Originator: George Michaelson
>Release: NetBSD 4.99.4
>Organization:
George Michaelson email: ggm%apnic.net@localhost
Senior Technical Officer, APNIC sip: ggm%voip.apnic.net@localhost
http://www.apnic.net phone: +61 7 3858 3100
>Environment:
System: NetBSD garlique.algebras.org 4.99.4 NetBSD 4.99.4 (GGM_ACPI) #0: Mon
Nov 27 14:09:26 EST 2006
ggm%garlique.algebras.org@localhost:/data/Build/obj/usr/src/sys/arch/i386/compile/GGM_ACPI
i386
Architecture: i386
Machine: i386
>Description:
nvi broke lvalue restrictions in gcc 4.1.x -these patches
have been ported from Gentoo, and permit it to compile.
>How-To-Repeat:
try to make pkgsrc/editors/nvi on a gcc 4.1.x system.
>Fix:
--- patches/patch-af.orig 2006-12-04 15:55:22.000000000 +1000
+++ patches/patch-af 2006-12-04 15:55:59.000000000 +1000
@@ -0,0 +1,74 @@
+--- ../common/mem.h.orig 2000-08-20 19:12:59.000000000 +1000
++++ ../common/mem.h 2006-12-03 15:21:22.000000000 +1000
+@@ -26,8 +26,9 @@
+ } \
+ }
+ #define BINC_GOTOW(sp, lp, llen, nlen) {
\
+- CHAR_T *L__bp = lp; \
+- BINC_GOTO(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \
++ char *L__lp = (char *)lp; \
++ BINC_GOTO(sp, L__lp, llen, (nlen) * sizeof(CHAR_T)) \
++ lp = (CHAR_T *) L__lp; \
+ }
+ #define BINC_RET(sp, lp, llen, nlen) {
\
+ char *L__p = lp; \
+@@ -43,8 +44,9 @@
+ } \
+ }
+ #define BINC_RETW(sp, lp, llen, nlen) {
\
+- CHAR_T *L__bp = lp; \
+- BINC_RET(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \
++ char *L__lp = (char *)lp; \
++ BINC_RET(sp, L__lp, llen, (nlen) * sizeof(CHAR_T)) \
++ lp = (CHAR_T *) L__lp; \
+ }
+
+ /*
+@@ -66,8 +68,9 @@
+ } \
+ }
+ #define GET_SPACE_GOTOW(sp, bp, blen, nlen) {
\
+- CHAR_T *L__bp = bp; \
+- GET_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ GET_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+ #define GET_SPACE_RET(sp, bp, blen, nlen) {
\
+ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \
+@@ -83,8 +86,9 @@
+ } \
+ }
+ #define GET_SPACE_RETW(sp, bp, blen, nlen) {
\
+- CHAR_T *L__bp = bp; \
+- GET_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ GET_SPACE_RET(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+
+ /*
+@@ -103,8 +107,9 @@
+ BINC_GOTO(sp, bp, blen, nlen); \
+ }
+ #define ADD_SPACE_GOTOW(sp, bp, blen, nlen) {
\
+- CHAR_T *L__bp = bp; \
+- ADD_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ ADD_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+ #define ADD_SPACE_RET(sp, bp, blen, nlen) {
\
+ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \
+@@ -118,8 +123,9 @@
+ BINC_RET(sp, bp, blen, nlen); \
+ }
+ #define ADD_SPACE_RETW(sp, bp, blen, nlen) {
\
+- CHAR_T *L__bp = bp; \
+- ADD_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \
++ char *L__bp = (char *)bp; \
++ ADD_SPACE_RET(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \
++ bp = (CHAR_T *) L__bp; \
+ }
+
+ /* Free a GET_SPACE returned buffer. */
--- patches/patch-ag.orig 2006-12-04 15:55:26.000000000 +1000
+++ patches/patch-ag 2006-12-04 15:56:03.000000000 +1000
@@ -0,0 +1,32 @@
+--- ../cl/cl_funcs.c.orig 2001-06-26 01:19:05.000000000 +1000
++++ ../cl/cl_funcs.c 2006-12-03 15:21:22.000000000 +1000
+@@ -381,7 +381,7 @@
+
+ if (CLSP(discardp)) {
+ delwin(CLSP(discardp));
+- CLSP(discardp) = NULL;
++ discardp->cl_private = NULL;
+ }
+ }
+
+@@ -395,7 +395,7 @@
+
+ if (CLSP(tsp))
+ delwin(CLSP(tsp));
+- CLSP(tsp) = subwin(stdscr, tsp->rows, tsp->cols,
++ tsp->cl_private = subwin(stdscr, tsp->rows, tsp->cols,
+ tsp->roff, tsp->coff);
+ }
+
+@@ -716,9 +716,9 @@
+ if (CLSP(origp))
+ delwin(CLSP(origp));
+
+- CLSP(origp) = subwin(stdscr, origp->rows, origp->cols,
++ origp->cl_private = subwin(stdscr, origp->rows, origp->cols,
+ origp->roff, origp->coff);
+- CLSP(newp) = subwin(stdscr, newp->rows, newp->cols,
++ newp->cl_private = subwin(stdscr, newp->rows, newp->cols,
+ newp->roff, newp->coff);
+
+ /* origp is the original screen, giving up space to newp. */
--- patches/patch-ah.orig 2006-12-04 15:55:30.000000000 +1000
+++ patches/patch-ah 2006-12-04 15:56:06.000000000 +1000
@@ -0,0 +1,11 @@
+--- ../cl/cl_screen.c.orig 2001-06-26 01:19:06.000000000 +1000
++++ ../cl/cl_screen.c 2006-12-03 15:21:22.000000000 +1000
+@@ -56,7 +56,7 @@
+ if (F_ISSET(gp, G_SRESTART)) {
+ if (CLSP(sp)) {
+ delwin(CLSP(sp));
+- CLSP(sp) = NULL;
++ sp->cl_private = NULL;
+ }
+ if (cl_quit(gp))
+ return (1);
--- patches/patch-ai.orig 2006-12-04 15:55:32.000000000 +1000
+++ patches/patch-ai 2006-12-04 15:56:09.000000000 +1000
@@ -0,0 +1,21 @@
+--- ../common/db.c.orig 2001-08-19 07:52:00.000000000 +1000
++++ ../common/db.c 2006-12-03 15:21:22.000000000 +1000
+@@ -94,6 +94,7 @@
+ CHAR_T *wp;
+ size_t wlen;
+ size_t nlen;
++ char *c_lp;
+
+ /*
+ * The underlying recno stuff handles zero by returning NULL, but
+@@ -164,7 +165,9 @@
+ nlen = 1024;
+ retry:
+ /* data.size contains length in bytes */
+- BINC_GOTO(sp, (char *)ep->c_lp, ep->c_blen, nlen);
++ c_lp = (char *) ep->c_lp;
++ BINC_GOTO(sp, c_lp, ep->c_blen, nlen);
++ ep->c_lp = (CHAR_T *) c_lp;
+
+ /* Get the line from the underlying database. */
+ memset(&key, 0, sizeof(key));
--- patches/patch-aj.orig 2006-12-04 15:55:36.000000000 +1000
+++ patches/patch-aj 2006-12-04 15:56:13.000000000 +1000
@@ -0,0 +1,18 @@
+--- ../common/key.c.orig 2001-06-26 01:19:10.000000000 +1000
++++ ../common/key.c 2006-12-03 15:21:22.000000000 +1000
+@@ -829,11 +829,14 @@
+ {
+ WIN *wp;
+ size_t new_nelem, olen;
++ char *i_event;
+
+ wp = sp->wp;
+ new_nelem = wp->i_nelem + add;
+ olen = wp->i_nelem * sizeof(wp->i_event[0]);
+- BINC_RET(sp, (char *)wp->i_event, olen, new_nelem *
sizeof(wp->i_event[0]));
++ i_event = (char *)wp->i_event;
++ BINC_RET(sp, i_event, olen, new_nelem * sizeof(wp->i_event[0]));
++ wp->i_event = (EVENT *) i_event;
+ wp->i_nelem = olen / sizeof(wp->i_event[0]);
+ return (0);
+ }
--- patches/patch-ak.orig 2006-12-04 15:55:39.000000000 +1000
+++ patches/patch-ak 2006-12-04 15:56:17.000000000 +1000
@@ -0,0 +1,14 @@
+--- ../vi/v_txt.c.orig 2001-07-27 03:15:53.000000000 +1000
++++ ../vi/v_txt.c 2006-12-03 15:21:22.000000000 +1000
+@@ -589,8 +589,10 @@
+
+ /* Check to see if the character fits into the replay buffers. */
+ if (LF_ISSET(TXT_RECORD)) {
+- BINC_GOTO(sp, (char *)vip->rep,
++ char *rep = vip->rep;
++ BINC_GOTO(sp, rep,
+ vip->rep_len, (rcol + 1) * sizeof(EVENT));
++ vip->rep = (EVENT *) rep;
+ vip->rep[rcol++] = *evp;
+ }
+
--- distinfo 16 Sep 2006 15:29:35 -0000 1.6
+++ distinfo 4 Dec 2006 07:18:29 -0000
@@ -8,3 +8,9 @@ SHA1 (patch-ab) = d5cb1cccb2799bb21822dc
SHA1 (patch-ac) = 239764397e64323edfba6fcf4ae99846cebbdbe1
SHA1 (patch-ad) = 3cdd8ea5ad6c9c4e6a2d1f77d0b28f80fae44fd0
SHA1 (patch-ae) = 28441e05bd1bbaa89a1df516decc583898eb1a23
+SHA1 (patch-af) = 989cbe967f79812dd48fe608db03be6a536a417e
+SHA1 (patch-ag) = 4216a8fdce5e0409df1a3075bc5fe6e91bc91009
+SHA1 (patch-ah) = 4cc18fed5f7f3cc9ce812e5a842ac812b1fdbe6a
+SHA1 (patch-ai) = 796a11d4dc25bf1726fc4411fcdc6918e7449327
+SHA1 (patch-aj) = 9f4f94e6176dce84a8650c501c38d761b07f3291
+SHA1 (patch-ak) = 05d1131d737604b77bef709c34959176b1880dcd
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index