diff options
author | dogcow <dogcow> | 2006-12-12 03:37:30 +0000 |
---|---|---|
committer | dogcow <dogcow> | 2006-12-12 03:37:30 +0000 |
commit | 5e952016784d50358420dce95c8112837a0ceabb (patch) | |
tree | 4b83ab9a5d8b230c5b0ef2934fc7412b9ea26f46 /editors/nvi/patches/patch-af | |
parent | 316415795ce941a510d3c134e3d71b3d873e2ee4 (diff) | |
download | pkgsrc-5e952016784d50358420dce95c8112837a0ceabb.tar.gz |
Patches to avoid lvalue casting. Fixes PR/35179 and issues with gcc4.
No new functionality.
Diffstat (limited to 'editors/nvi/patches/patch-af')
-rw-r--r-- | editors/nvi/patches/patch-af | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/editors/nvi/patches/patch-af b/editors/nvi/patches/patch-af new file mode 100644 index 00000000000..484258f8c2b --- /dev/null +++ b/editors/nvi/patches/patch-af @@ -0,0 +1,76 @@ +$NetBSD: patch-af,v 1.1 2006/12/12 03:37:30 dogcow Exp $ + +--- ../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. */ |