diff options
author | tron <tron@pkgsrc.org> | 2006-06-30 15:59:58 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2006-06-30 15:59:58 +0000 |
commit | 32664596536125f777255b5212fbef2b23b78d4b (patch) | |
tree | 65fb644f851089b43327ea17694e649abab41b59 /editors | |
parent | 2859430dddf8ac0fc069714c7d904e6f18f6161f (diff) | |
download | pkgsrc-32664596536125f777255b5212fbef2b23b78d4b.tar.gz |
Fix build with GCC 4.x:
- Include "stdlib.h" and "string.h" where appropriate.
- Don't use function-local forward declarations of static functions.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/mg2a/distinfo | 4 | ||||
-rw-r--r-- | editors/mg2a/patches/patch-ap | 65 | ||||
-rw-r--r-- | editors/mg2a/patches/patch-aq | 62 |
3 files changed, 130 insertions, 1 deletions
diff --git a/editors/mg2a/distinfo b/editors/mg2a/distinfo index f5ec3abd9b7..def69380b50 100644 --- a/editors/mg2a/distinfo +++ b/editors/mg2a/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2005/12/09 15:26:52 joerg Exp $ +$NetBSD: distinfo,v 1.6 2006/06/30 15:59:58 tron Exp $ SHA1 (mg2a.tar.Z) = c96f890f217eaacb78117f9c73f1ea3709ca8d3f RMD160 (mg2a.tar.Z) = 7083ec8b49eb89d1389dabfb915859af2bb40ee1 @@ -18,3 +18,5 @@ SHA1 (patch-al) = b8595b33d45b73b709bcdbf1d2e255d57f02735b SHA1 (patch-am) = 3544b6609262899aabd0c0b7a29fdaeee3413d5f SHA1 (patch-an) = faf386a6ba58793f286aae1e372e318d77f6daa3 SHA1 (patch-ao) = ebe3ad41e0ad49aa4ea6fe571dbf360af8c70a96 +SHA1 (patch-ap) = 49aca14c3ee0b1c3c84f3920eb875ec8700f9128 +SHA1 (patch-aq) = 1deef2a00054de186cd73f7d864c5764a41dc2b0 diff --git a/editors/mg2a/patches/patch-ap b/editors/mg2a/patches/patch-ap new file mode 100644 index 00000000000..c4c2b627a15 --- /dev/null +++ b/editors/mg2a/patches/patch-ap @@ -0,0 +1,65 @@ +$NetBSD: patch-ap,v 1.1 2006/06/30 15:59:58 tron Exp $ + +--- extend.c.orig 1988-07-03 18:48:52.000000000 +0100 ++++ extend.c 2006-06-30 16:56:09.000000000 +0100 +@@ -18,7 +18,9 @@ + #endif + #endif + +-extern char *strncpy(); ++#include <stdlib.h> ++#include <string.h> ++ + extern int rescan(); + + /* insert a string, mainly for use from macros (created by selfinsert) */ +@@ -68,6 +70,8 @@ + * don't have them. Care is taken so running out of memory will leave + * the keymap in a usable state. + */ ++static KEYMAP *realocmap(); ++ + static int remap(curmap, c, funct, pref_map) + register KEYMAP *curmap;/* pointer to the map being changed */ + int c; /* character being changed */ +@@ -80,7 +84,6 @@ + KEYMAP *mp; + PF *pfp; + MAP_ELEMENT *mep; +- static KEYMAP *realocmap(); + + if(ele >= &curmap->map_element[curmap->map_num] || c < ele->k_base) { + if(ele > &curmap->map_element[0] && (funct!=prefix || +@@ -225,13 +228,14 @@ + return TRUE; + } + ++static VOID fixmap(); ++ + /* reallocate a keymap, used above */ + static KEYMAP *realocmap(curmap) + register KEYMAP *curmap; + { + register KEYMAP *mp; + register int i; +- static VOID fixmap(); + extern int nmaps; + + if((mp = (KEYMAP *)malloc((unsigned)(sizeof(KEYMAP)+ +@@ -550,6 +554,8 @@ + return TRUE; + } + ++static char *skipwhite(), *parsetoken(); ++ + /* + * excline - run a line from a load file or eval-expression. + * if FKEYS is defined, duplicate functionallity of dobind so function +@@ -578,7 +584,6 @@ + #endif + PF name_function(); + LINE *lalloc(); +- static char *skipwhite(), *parsetoken(); + + if(macrodef || inmacro) { + ewprintf("Not now!"); diff --git a/editors/mg2a/patches/patch-aq b/editors/mg2a/patches/patch-aq new file mode 100644 index 00000000000..8706a87f498 --- /dev/null +++ b/editors/mg2a/patches/patch-aq @@ -0,0 +1,62 @@ +$NetBSD: patch-aq,v 1.1 2006/06/30 15:59:58 tron Exp $ + +--- help.c.orig 1988-07-03 18:50:10.000000000 +0100 ++++ help.c 2006-06-30 16:57:54.000000000 +0100 +@@ -10,6 +10,8 @@ + #endif + extern int rescan(); + ++#include <string.h> ++ + /* + * Read a key from the keyboard, and look it + * up in the keymap. Display the name of the function +@@ -87,12 +89,13 @@ + static BUFFER *bp; + static char buf[80]; /* used by showall and findbind */ + ++static int showall(); ++ + /*ARGSUSED*/ + wallchart(f, n) + { + int m; + static char locbind[80] = "Local keybindings for mode "; +- static int showall(); + + bp = bfind("*help*", TRUE); + if (bclear(bp) != TRUE) return FALSE; /* Clear it out. */ +@@ -181,6 +184,8 @@ + static char buf2[128]; + static char *buf2p; + ++static VOID findbind(); ++ + /*ARGSUSED*/ + apropos_command(f, n) + int f, n; +@@ -189,7 +194,6 @@ + char string[32]; + FUNCTNAMES *fnp; + BUFFER *bp; +- static VOID findbind(); + + if(eread("apropos: ", string, sizeof(string), EFNEW) == ABORT) return ABORT; + /* FALSE means we got a 0 character string, which is fine */ +@@ -212,6 +216,8 @@ + return popbuftop(bp); + } + ++static VOID bindfound(); ++ + static VOID findbind(funct, ind, map) + PF funct; + char *ind; +@@ -221,7 +227,6 @@ + register int i; + char *cp; + int last; +- static VOID bindfound(); + + last = -1; + for(ele = &map->map_element[0]; ele < &map->map_element[map->map_num]; ele++) { |