From owner-cvs-all Sat May 26 21:31:54 2001
Delivered-To: cvs-all@freebsd.org
Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66])
by hub.freebsd.org (Postfix) with ESMTP
id 0684137B422; Sat, 26 May 2001 21:31:47 -0700 (PDT)
(envelope-from imp@harmony.village.org)
Received: from harmony.village.org (localhost.village.org [127.0.0.1])
by harmony.village.org (8.11.3/8.11.1) with ESMTP id f4R4VkE51578;
Sat, 26 May 2001 22:31:46 -0600 (MDT)
(envelope-from imp@harmony.village.org)
Message-Id: <200105270431.f4R4VkE51578@harmony.village.org>
To: Dima Dorfman
Subject: Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.c
Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
In-reply-to: Your message of "Sat, 26 May 2001 21:03:53 PDT."
<200105270403.f4R43r843630@freefall.freebsd.org>
References: <200105270403.f4R43r843630@freefall.freebsd.org>
Date: Sat, 26 May 2001 22:31:46 -0600
From: Warner Losh
Sender: owner-cvs-all@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.ORG
In message <200105270403.f4R43r843630@freefall.freebsd.org> Dima Dorfman writes:
: Modified files:
: usr.sbin/kbdcontrol kbdcontrol.c
: Log:
: A la rev. 1.36, define CONS_CLRHIST here if it isn't already since
: this is a build tool, so it has to build on 4.x with the old headers.
A better solution would be to have #ifdef CONS_CLRHIST around its
use. We couldn't do that with PASTE because keymaps would break and
disentangling that was a mess. CONS_CLRHIST isn't required to build a
correct system, so it should be ifdef'd.
Warner
Consider the following untested patch:
Index: kbdcontrol.c
===================================================================
RCS file: /home/imp/FreeBSD/CVS/src/usr.sbin/kbdcontrol/kbdcontrol.c,v
retrieving revision 1.38
diff -u -r1.38 kbdcontrol.c
--- kbdcontrol.c 2001/05/27 04:03:52 1.38
+++ kbdcontrol.c 2001/05/27 04:30:34
@@ -44,16 +44,12 @@
#include "lex.h"
/*
- * PASTE and CONS_CLRHIST are't defined in 4.x, but we need them to
- * bridge to 5.0-current so define them here as a stop gap transition
- * measure.
+ * PASTE isn't defined in 4.x, but we need them to bridge to
+ * 5.0-current so define them here as a stop gap transition measure.
*/
#ifndef PASTE
#define PASTE 0xa3 /* paste from cut-paste buffer */
#endif
-#ifndef CONS_CLRHIST
-#define CONS_CLRHIST _IO('c', 10)
-#endif
char ctrl_names[32][4] = {
"nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
@@ -987,9 +983,12 @@
void
clear_history()
{
-
+#ifdef CONS_CLRHIST
if (ioctl(0, CONS_CLRHIST) == -1)
warn("clear history buffer");
+#else
+ warnx("Clearing history not supported");
+#endif
}
static char
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message