summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-03 22:56:46 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-03 22:56:46 +0200
commita586a844501efb7e7881e3c6753ed5aa7e6e5b48 (patch)
treefb02e08114c131132e05be86398dea3f784848f1 /Libraries
parent3c2fbc825c469ef4f542e380a1e8d43775649aea (diff)
downloadserenity-a586a844501efb7e7881e3c6753ed5aa7e6e5b48.zip
LibC: Make sure that ioctl() requests are #defined as macros
This fixes terminal UI resizing in the vim port. The problem was that vim had "#ifdef TIOCGWINSZ" around the code that figures out the size of the terminal. Since all of our ioctl() requests were enum values, this code was not compiled into vim at all. This patch fixes that. :^)
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/sys/ioctl_numbers.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Libraries/LibC/sys/ioctl_numbers.h b/Libraries/LibC/sys/ioctl_numbers.h
index b19bc7f34d..e853b9af62 100644
--- a/Libraries/LibC/sys/ioctl_numbers.h
+++ b/Libraries/LibC/sys/ioctl_numbers.h
@@ -66,3 +66,25 @@ enum IOCtlNumber {
SIOCADDRT,
SIOCDELRT
};
+
+#define TIOCGPGRP TIOCGPGRP
+#define TIOCSPGRP TIOCSPGRP
+#define TCGETS TCGETS
+#define TCSETS TCSETS
+#define TCSETSW TCSETSW
+#define TCSETSF TCSETSF
+#define TIOCGWINSZ TIOCGWINSZ
+#define TIOCSCTTY TIOCSCTTY
+#define TIOCNOTTY TIOCNOTTY
+#define TIOCSWINSZ TIOCSWINSZ
+#define FB_IOCTL_GET_SIZE_IN_BYTES FB_IOCTL_GET_SIZE_IN_BYTES
+#define FB_IOCTL_GET_RESOLUTION FB_IOCTL_GET_RESOLUTION
+#define FB_IOCTL_SET_RESOLUTION FB_IOCTL_SET_RESOLUTION
+#define FB_IOCTL_GET_BUFFER FB_IOCTL_GET_BUFFER
+#define FB_IOCTL_SET_BUFFER FB_IOCTL_SET_BUFFER
+#define SIOCSIFADDR SIOCSIFADDR
+#define SIOCGIFADDR SIOCGIFADDR
+#define SIOCGIFHWADDR SIOCGIFHWADDR
+#define SIOCSIFNETMASK SIOCSIFNETMASK
+#define SIOCADDRT SIOCADDRT
+#define SIOCDELRT SIOCDELRT