From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 20 01:10:04 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 3B0A216A420 for ; Tue, 20 Sep 2005 01:10:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7854943D48 for ; Tue, 20 Sep 2005 01:10:01 +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 j8K1A1Pd038627 for ; Tue, 20 Sep 2005 01:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8K1A1BL038626; Tue, 20 Sep 2005 01:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 20 Sep 2005 01:10:01 GMT Resent-Message-Id: <200509200110.j8K1A1BL038626@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Phil Oleson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B64F16A41F for ; Tue, 20 Sep 2005 01:07:53 +0000 (GMT) (envelope-from oz@nixil.net) Received: from nixil.net (nixil.net [161.58.222.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04B0D43D48 for ; Tue, 20 Sep 2005 01:07:52 +0000 (GMT) (envelope-from oz@nixil.net) Received: from nixil.net (localhost [127.0.0.1]) by nixil.net (8.13.1/8.13.1) with ESMTP id j8K17qk1098226 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 19 Sep 2005 19:07:52 -0600 (MDT) Received: (from oz@localhost) by nixil.net (8.13.1/8.13.1/Submit) id j8K17qbC098225; Mon, 19 Sep 2005 19:07:52 -0600 (MDT) Message-Id: <200509200107.j8K17qbC098225@nixil.net> Date: Mon, 19 Sep 2005 19:07:52 -0600 (MDT) From: Phil Oleson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/86355: Update apps that use libedit to use H_SETSIZE X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 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, 20 Sep 2005 01:10:04 -0000 >Number: 86355 >Category: bin >Synopsis: Update apps that use libedit to use H_SETSIZE >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Sep 20 01:10:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Phil Oleson >Release: HEAD >Organization: N/A >Environment: FreeBSD nixil.net 4.7-RELEASE-p28 FreeBSD 4.7-RELEASE-p28 #42: Tue Jun 21 10:33:20 MDT 2005 root@nixil.net:/usr/src/sys/compile/nixil i386 >Description: Since Current has the latest libedit source, I'd prefer to see the userspace apps using the proper define rather than the legacy define that should be removed (in the future). >How-To-Repeat: N/A >Fix: Patches against HEAD --- patch-sh begins here --- Index: src/bin/sh/histedit.c =================================================================== RCS file: /home/ncvs/src/bin/sh/histedit.c,v retrieving revision 1.27 diff -u -r1.27 histedit.c --- src/bin/sh/histedit.c 11 Aug 2005 20:28:26 -0000 1.27 +++ src/bin/sh/histedit.c 20 Sep 2005 00:47: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) { --- patch-sh ends here --- --- patch-tftp begins here --- 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 20 Sep 2005 00:49:37 -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); --- patch-tftp ends here --- --- patch-lpr-lpc begins here --- 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 20 Sep 2005 00:53: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); --- patch-lpr-lpc ends here --- --- patch-fsdb begins here --- Index: src/sbin/fsdb/fsdb.c =================================================================== RCS file: /home/ncvs/src/sbin/fsdb/fsdb.c,v retrieving revision 1.30 diff -u -r1.30 fsdb.c --- src/sbin/fsdb/fsdb.c 7 Aug 2005 20:53:33 -0000 1.30 +++ src/sbin/fsdb/fsdb.c 20 Sep 2005 00:56:29 -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"); --- patch-fsdb ends here --- --- patch-cdcontrol begins here --- 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 20 Sep 2005 00:57:33 -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); --- patch-cdcontrol ends here --- >Release-Note: >Audit-Trail: >Unformatted: