bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Use standard types in include/device/input.h


From: Flavio Cruz
Subject: [PATCH] Use standard types in include/device/input.h
Date: Sat, 28 Jan 2023 01:07:28 -0500

--enable-platform=xen won't compile because u_char is not included from
sys/types.h. Also, we are forcing users of include/device/input.h to
include glibc headers that export such types which should not be 
necessary.

For i386/i386at/kd.h we include input.h to get Scancode.
---
 i386/i386at/kd.h       | 6 +-----
 include/device/input.h | 4 ++--
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index ea0d4e13..53fbce51 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -77,6 +77,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <device/cons.h>
 #include <device/io_req.h>
 #include <device/buf.h>
+#include <device/input.h>
 #include <device/tty.h>
 #include <i386at/kdsoft.h>
 
@@ -272,11 +273,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define KS_CTLED       0x20
 
 
-/*
- * Scancode values, not to be confused with Ascii values.
- */
-typedef u_char Scancode;
-
 /* special codes */
 #define K_UP           0x80            /* OR'd in if key below is released */
 #define K_EXTEND       0xe0            /* marker for "extended" sequence */
diff --git a/include/device/input.h b/include/device/input.h
index 3f8435a6..9de73a30 100644
--- a/include/device/input.h
+++ b/include/device/input.h
@@ -42,8 +42,8 @@
 #define        _IOW(g,n,t)     _IOC(IOC_IN,    (g), (n), sizeof(t))
 #define        _IOWR(g,n,t)    _IOC(IOC_INOUT, (g), (n), sizeof(t))
 
-typedef u_char Scancode;
-typedef u_short kev_type;              /* kd event type */
+typedef uint8_t Scancode;
+typedef uint16_t kev_type;             /* kd event type */
 
 /* (used for event records) */
 struct mouse_motion {          
-- 
2.39.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]