mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-08 15:19:41 -10:00
Kernel: Move struct winsize definition to API/POSIX/termios.h
POSIX requires it to be defined in this header:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html
"The <termios.h> header shall define the winsize structure, [...]"
This unbreaks the readline port after 8e34c970b5, which made it
use tc{get,set}winsize() instead of the ioctl.
Previously, it failed to compile with a -Wincompatible-pointer-types
warning:
"expected 'struct winsize *' but argument is of type 'struct winsize *'"
ioctl() takes the argument as a vararg, so it didn't trigger this
warning.
This commit is contained in:
1 parent
d85d1a984f
commit
312b4440bf
2 files changed
+8
-7
No files matched your search
@@ -11,13 +11,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
struct GraphicsConnectorProperties {
|
||||
unsigned char multihead_support;
|
||||
unsigned char doublebuffer_support;
|
||||
|
||||
@@ -28,6 +28,14 @@ struct termios {
|
||||
speed_t c_ospeed;
|
||||
};
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html#tag_14_77_03_07
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
/* c_cc characters */
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
|
||||
Reference in new issue
Block a user