From owner-svn-ports-head@freebsd.org Mon Jun 29 16:49:17 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20FF4990107; Mon, 29 Jun 2015 16:49:17 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05FDC2985; Mon, 29 Jun 2015 16:49:17 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TGnGAd033147; Mon, 29 Jun 2015 16:49:16 GMT (envelope-from olivierd@FreeBSD.org) Received: (from olivierd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5TGnFrt033127; Mon, 29 Jun 2015 16:49:15 GMT (envelope-from olivierd@FreeBSD.org) Message-Id: <201506291649.t5TGnFrt033127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: olivierd set sender to olivierd@FreeBSD.org using -f From: Olivier Duchateau Date: Mon, 29 Jun 2015 16:49:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r390922 - in head/editors/mg: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 16:49:17 -0000 Author: olivierd Date: Mon Jun 29 16:49:15 2015 New Revision: 390922 URL: https://svnweb.freebsd.org/changeset/ports/390922 Log: - Update to 20150323 snapshot - Add patches which replace reallocarray by realloc(3) PR: 200682 Submitted by: myself Approved by: darcsis (maintainer, timeout > 3 weeks) Added: head/editors/mg/files/ head/editors/mg/files/patch-autoexec.c (contents, props changed) head/editors/mg/files/patch-def.h (contents, props changed) head/editors/mg/files/patch-display.c (contents, props changed) Modified: head/editors/mg/Makefile head/editors/mg/distinfo Modified: head/editors/mg/Makefile ============================================================================== --- head/editors/mg/Makefile Mon Jun 29 16:34:18 2015 (r390921) +++ head/editors/mg/Makefile Mon Jun 29 16:49:15 2015 (r390922) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= mg -PORTVERSION= 20140414 +PORTVERSION= 20150323 CATEGORIES= editors MASTER_SITES= http://homepage.boetes.org/software/mg/ Modified: head/editors/mg/distinfo ============================================================================== --- head/editors/mg/distinfo Mon Jun 29 16:34:18 2015 (r390921) +++ head/editors/mg/distinfo Mon Jun 29 16:49:15 2015 (r390922) @@ -1,2 +1,2 @@ -SHA256 (mg-20140414.tar.gz) = 89ce25ee13cedc14c3c5c7b76d7a9e0ea38a060ad61e90ac43258d8dadf0d065 -SIZE (mg-20140414.tar.gz) = 142570 +SHA256 (mg-20150323.tar.gz) = d71b24d47d3e1426f162e446d92dfa457df96dd47c1289419cba9fd14c2c3afb +SIZE (mg-20150323.tar.gz) = 142105 Added: head/editors/mg/files/patch-autoexec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/editors/mg/files/patch-autoexec.c Mon Jun 29 16:49:15 2015 (r390922) @@ -0,0 +1,34 @@ +--- autoexec.c.orig 2015-03-23 11:03:05 UTC ++++ autoexec.c +@@ -2,12 +2,17 @@ + /* this file is in the public domain */ + /* Author: Vincent Labrecque April 2002 */ + ++#include + #include + #include + #include + #include + #include + #include ++#ifndef __OpenBSD__ ++#include ++#include ++#endif + + #include "def.h" + #include "funmap.h" +@@ -44,8 +49,13 @@ find_autoexec(const char *fname) + SLIST_FOREACH(ae, &autos, next) { + if (fnmatch(ae->pattern, fname, 0) == 0) { + if (used >= have) { ++ #if defined(__OpenBSD__) + npfl = reallocarray(pfl, have + AUTO_GROW + 1, + sizeof(PF)); ++ #else ++ npfl = realloc(pfl, (have + AUTO_GROW + 1) * ++ sizeof(PF)); ++ #endif + if (npfl == NULL) + panic("out of memory"); + pfl = npfl; Added: head/editors/mg/files/patch-def.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/editors/mg/files/patch-def.h Mon Jun 29 16:49:15 2015 (r390922) @@ -0,0 +1,11 @@ +--- def.h.orig 2015-03-23 11:23:30 UTC ++++ def.h +@@ -13,6 +13,8 @@ + #include "chrdef.h" + #include "ttydef.h" + ++#include ++ + + /* necesarry to get asprintf & friends with glibc XXX doesn't work for some + * mysterious reason! */ Added: head/editors/mg/files/patch-display.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/editors/mg/files/patch-display.c Mon Jun 29 16:49:15 2015 (r390922) @@ -0,0 +1,40 @@ +--- display.c.orig 2015-03-16 14:39:00 UTC ++++ display.c +@@ -170,14 +170,6 @@ vtresize(int force, int newrow, int newc + (a) = tmp; \ + } while (0) + +-#define TRYREALLOCARRAY(a, n, m) do { \ +- void *tmp; \ +- if ((tmp = reallocarray((a), (n), (m))) == NULL) {\ +- panic("out of memory in display code"); \ +- } \ +- (a) = tmp; \ +- } while (0) +- + /* No update needed */ + if (!first_run && !force && !rowchanged && !colchanged) + return (TRUE); +@@ -206,10 +198,10 @@ vtresize(int force, int newrow, int newc + } + } + +- TRYREALLOCARRAY(score, newrow, newrow * sizeof(struct score)); +- TRYREALLOCARRAY(vscreen, (newrow - 1), sizeof(struct video *)); +- TRYREALLOCARRAY(pscreen, (newrow - 1), sizeof(struct video *)); +- TRYREALLOCARRAY(video, (newrow - 1), 2 * sizeof(struct video)); ++ TRYREALLOC(score, newrow * newrow * sizeof(struct score)); ++ TRYREALLOC(vscreen, (newrow - 1) * sizeof(struct video *)); ++ TRYREALLOC(pscreen, (newrow - 1) * sizeof(struct video *)); ++ TRYREALLOC(video, ((newrow - 1) * 2) * sizeof(struct video)); + + /* + * Zero-out the entries we just allocated. +@@ -247,7 +239,6 @@ vtresize(int force, int newrow, int newc + } + + #undef TRYREALLOC +-#undef TRYREALLOCARRAY + + /* + * Initialize the data structures used