From 3be8c16308af83af5fc9ea91b91e8602c4130081 Mon Sep 17 00:00:00 2001
From: dd
Date: Sun, 27 May 2001 06:28:08 +0000
Subject: Instead of defining CONS_CLRHIST if it isn't defined, simply disable
the -c option [when CONS_CLRHIST isn't defined]. This is okay since the only
time CONS_CLRHIST wouldn't be defined is when kbdcontrol is being built in
bootstrap-tools, and -c isn't needed then.
Submitted by: imp
---
usr.sbin/kbdcontrol/kbdcontrol.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index 287b266..577d919 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -44,16 +44,12 @@ static const char rcsid[] =
#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 it to bridge to 5.0-current
+ * so define it 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",
@@ -988,8 +984,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
--
cgit v1.1