Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 May 2001 22:31:46 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        Dima Dorfman <dd@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.c 
Message-ID:  <200105270431.f4R4VkE51578@harmony.village.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>  

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105270431.f4R4VkE51578>