sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-25 20:49:18 +00:00
parent a34e492c6b
commit acb2a22980
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
86 changed files with 12131 additions and 4602 deletions

View file

@ -1,7 +1,7 @@
/* $XTermId: xterm_io.h,v 1.67 2020/01/18 18:48:19 tom Exp $ */
/* $XTermId: xterm_io.h,v 1.69 2024/05/03 23:32:26 tom Exp $ */
/*
* Copyright 2000-2018,2020 by Thomas E. Dickey
* Copyright 2000-2023,2024 by Thomas E. Dickey
*
* All Rights Reserved
*
@ -70,7 +70,7 @@
#endif
#endif
#ifdef linux
#ifdef __linux__
#define USE_TERMIOS
#define HAVE_POSIX_OPENPT 1
#define HAVE_PTSNAME 1
@ -99,7 +99,7 @@
#define HAVE_GRANTPT_PTY_ISATTY 1
#endif
#if defined(__GLIBC__) && !(defined(linux) || defined(__GNU__))
#if defined(__GLIBC__) && !(defined(__linux__) || defined(__GNU__))
#define USE_POSIX_TERMIOS /* GNU/KFreeBSD and GNU/KNetBSD */
#endif
@ -203,7 +203,7 @@
#ifdef Lynx
#include <resource.h>
#elif !(defined(SYSV) || defined(linux) || defined(VMS) || (defined(__QNX__)&&!defined(__QNXNTO__)))
#elif !(defined(SYSV) || defined(__linux__) || defined(VMS) || (defined(__QNX__)&&!defined(__QNXNTO__)))
#include <sys/resource.h>
#endif
@ -225,7 +225,7 @@
#include <sys/filio.h>
#endif
#if defined(TIOCSLTC) && ! (defined(linux) || defined(__MVS__) || defined(Lynx) || defined(SVR4))
#if defined(TIOCSLTC) && ! (defined(__linux__) || defined(__MVS__) || defined(Lynx) || defined(SVR4))
#define HAS_LTCHARS
#endif
@ -284,4 +284,18 @@
typedef unsigned short ttySize_t;
#ifdef USE_ANY_SYSV_TERMIO
#define TERMIO_STRUCT struct termio
#define ttySetAttr(fd, datap) ioctl(fd, TCSETA, datap)
#define ttyGetAttr(fd, datap) ioctl(fd, TCGETA, datap)
#define ttyFlush(fd) ioctl(fd, TCFLSH, 1)
#elif defined(USE_POSIX_TERMIOS)
#define TERMIO_STRUCT struct termios
#define ttySetAttr(fd, datap) tcsetattr(fd, TCSANOW, datap)
#define ttyGetAttr(fd, datap) tcgetattr(fd, datap)
#define ttyFlush(fd) tcflush(fd, TCOFLUSH)
#else
#error Neither termio or termios is enabled
#endif /* USE_ANY_SYSV_TERMIO */
#endif /* included_xterm_io_h */