mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Kernel: Make both Ioctl.h and POSIX/termios.h define struct winsize
FreeBSD also makes it available from both sys/ioctl.h and termios.h.
glibc doesn't have the POSIX 2024 tc{set,get}winsize() wrappers yet,
so it doesn't even define it in termios.h at the moment.
LLVM relies on sys/ioctl.h defining struct winsize, so the llvm port and
the zig port failed to build after 312b4440bf.
This commit is contained in:
1 parent
31d7c87c68
commit
be0e1aaf8f
3 files changed
+26
-8
No files matched your search
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/winsize.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/sys/types.h>
|
||||
#include <Kernel/API/POSIX/winsize.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -28,14 +29,6 @@ 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
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Sönke Holz <[email protected]>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* 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;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user