pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/mg2a Fix build with GCC 4.x:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d428465ec640
branches:  trunk
changeset: 515312:d428465ec640
user:      tron <tron%pkgsrc.org@localhost>
date:      Fri Jun 30 15:59:58 2006 +0000

description:
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:

 editors/mg2a/distinfo         |   4 +-
 editors/mg2a/patches/patch-ap |  65 +++++++++++++++++++++++++++++++++++++++++++
 editors/mg2a/patches/patch-aq |  62 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 130 insertions(+), 1 deletions(-)

diffs (150 lines):

diff -r dd70072665e0 -r d428465ec640 editors/mg2a/distinfo
--- a/editors/mg2a/distinfo     Fri Jun 30 15:53:18 2006 +0000
+++ b/editors/mg2a/distinfo     Fri Jun 30 15:59:58 2006 +0000
@@ -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-am) = 3544b6609262899aabd0c0b7a29fdaeee3413d5f
 SHA1 (patch-an) = faf386a6ba58793f286aae1e372e318d77f6daa3
 SHA1 (patch-ao) = ebe3ad41e0ad49aa4ea6fe571dbf360af8c70a96
+SHA1 (patch-ap) = 49aca14c3ee0b1c3c84f3920eb875ec8700f9128
+SHA1 (patch-aq) = 1deef2a00054de186cd73f7d864c5764a41dc2b0
diff -r dd70072665e0 -r d428465ec640 editors/mg2a/patches/patch-ap
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/mg2a/patches/patch-ap     Fri Jun 30 15:59:58 2006 +0000
@@ -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 -r dd70072665e0 -r d428465ec640 editors/mg2a/patches/patch-aq
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/mg2a/patches/patch-aq     Fri Jun 30 15:59:58 2006 +0000
@@ -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++) {



Home | Main Index | Thread Index | Old Index