From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 5 09:10:10 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E043D16A4CE for ; Tue, 5 Apr 2005 09:10:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95EED43D53 for ; Tue, 5 Apr 2005 09:10:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j359AAca068872 for ; Tue, 5 Apr 2005 09:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j359AAtA068869; Tue, 5 Apr 2005 09:10:10 GMT (envelope-from gnats) Date: Tue, 5 Apr 2005 09:10:10 GMT Message-Id: <200504050910.j359AAtA068869@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Phil Oleson Subject: Re: bin/79418: [patch] libedit sync from netbsd cvs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Phil Oleson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 09:10:11 -0000 The following reply was made to PR bin/79418; it has been noted by GNATS. From: Phil Oleson To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: Subject: Re: bin/79418: [patch] libedit sync from netbsd cvs Date: Tue, 05 Apr 2005 03:00:17 -0600 This is a multi-part message in MIME format. --------------060902030201060704010601 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Here are patches to port the rest of the userspace apps that use libevent to use the H_SETSIZE flag rather than H_EVENT, which will be eliminated with the upgrade of libevent. This should allow buildworld to compile clean after the libevent patch is applied. Phil. -- It's a frail sad line between optimism and delusion. --------------060902030201060704010601 Content-Type: text/plain; name="cdcontrol.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cdcontrol.patch" Index: src/usr.sbin/cdcontrol/cdcontrol.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/cdcontrol/cdcontrol.c,v retrieving revision 1.48 diff -u -r1.48 cdcontrol.c --- src/usr.sbin/cdcontrol/cdcontrol.c 1 Apr 2004 16:37:46 -0000 1.48 +++ src/usr.sbin/cdcontrol/cdcontrol.c 5 Apr 2005 08:45:00 -0000 @@ -1130,7 +1130,7 @@ el = el_init("cdcontrol", stdin, stdout, stderr); hist = history_init(); - history(hist, &he, H_EVENT, 100); + history(hist, &he, H_SETSIZE, 100); el_set(el, EL_HIST, history, hist); el_set(el, EL_EDITOR, "emacs"); el_set(el, EL_PROMPT, cdcontrol_prompt); --------------060902030201060704010601 Content-Type: text/plain; name="fsdb.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fsdb.patch" Index: src/sbin/fsdb/fsdb.c =================================================================== RCS file: /home/ncvs/src/sbin/fsdb/fsdb.c,v retrieving revision 1.29 diff -u -r1.29 fsdb.c --- src/sbin/fsdb/fsdb.c 9 Oct 2004 15:56:34 -0000 1.29 +++ src/sbin/fsdb/fsdb.c 5 Apr 2005 08:41:50 -0000 @@ -223,7 +223,7 @@ printactive(0); hist = history_init(); - history(hist, &he, H_EVENT, 100); /* 100 elt history buffer */ + history(hist, &he, H_SETSIZE, 100); /* 100 elt history buffer */ elptr = el_init("fsdb", stdin, stdout, stderr); el_set(elptr, EL_EDITOR, "emacs"); @@ -243,7 +243,7 @@ * el_parse returns -1 to signal that it's not been handled * internally. */ - if (el_parse(elptr, cmd_argc, cmd_argv) != -1) + if (el_parse(elptr, cmd_argc, (const char **)cmd_argv) != -1) continue; if (cmd_argc) { known = 0; --------------060902030201060704010601 Content-Type: text/plain; name="lpr-lpc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lpr-lpc.patch" Index: src/usr.sbin/lpr/lpc/lpc.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/lpr/lpc/lpc.c,v retrieving revision 1.30 diff -u -r1.30 lpc.c --- src/usr.sbin/lpr/lpc/lpc.c 22 Feb 2005 02:56:42 -0000 1.30 +++ src/usr.sbin/lpr/lpc/lpc.c 5 Apr 2005 08:43:31 -0000 @@ -167,7 +167,7 @@ if (!el) { el = el_init("lpc", stdin, stdout, stderr); hist = history_init(); - history(hist, &he, H_EVENT, 100); + history(hist, &he, H_SETSIZE, 100); el_set(el, EL_HIST, history, hist); el_set(el, EL_EDITOR, "emacs"); el_set(el, EL_PROMPT, lpc_prompt); --------------060902030201060704010601 Content-Type: text/plain; name="sh.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sh.patch" Index: src/bin/sh/histedit.c =================================================================== RCS file: /home/ncvs/src/bin/sh/histedit.c,v retrieving revision 1.26 diff -u -r1.26 histedit.c --- src/bin/sh/histedit.c 6 Apr 2004 20:06:51 -0000 1.26 +++ src/bin/sh/histedit.c 5 Apr 2005 08:40:14 -0000 @@ -156,7 +156,7 @@ if (hs == NULL || *hs == '\0' || (histsize = atoi(hs)) < 0) histsize = 100; - history(hist, &he, H_EVENT, histsize); + history(hist, &he, H_SETSIZE, histsize); } } @@ -318,7 +318,7 @@ if (editor) { int fd; INTOFF; /* easier */ - sprintf(editfile, "%s/_shXXXXXX", _PATH_TMP); + snprintf(editfile, sizeof(editfile), "%s_shXXXXXX", _PATH_TMP); if ((fd = mkstemp(editfile)) < 0) error("can't create temporary file %s", editfile); if ((efp = fdopen(fd, "w")) == NULL) { --------------060902030201060704010601 Content-Type: text/plain; name="tftp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tftp.patch" Index: src/usr.bin/tftp/main.c =================================================================== RCS file: /home/ncvs/src/usr.bin/tftp/main.c,v retrieving revision 1.21 diff -u -r1.21 main.c --- src/usr.bin/tftp/main.c 12 Oct 2003 00:27:55 -0000 1.21 +++ src/usr.bin/tftp/main.c 5 Apr 2005 08:42:56 -0000 @@ -635,7 +635,7 @@ if (vrbose) { el = el_init("tftp", stdin, stdout, stderr); hist = history_init(); - history(hist, &he, H_EVENT, 100); + history(hist, &he, H_SETSIZE, 100); el_set(el, EL_HIST, history, hist); el_set(el, EL_EDITOR, "emacs"); el_set(el, EL_PROMPT, command_prompt); --------------060902030201060704010601--