mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
Clean up <sys/ioctl.h>.
- Just use #error when including <sys/ioctl.h> in the kernel. Code hasn't used this header for years now and probably doesn't compile anyway, because of -Werror. - Get rid of struct ttysize, TIOCGSIZE and TIOCSSIZE. All code nowadays use both TIOC[GS]SIZE and TIOC[GS]WINSZ. Because we have other popular systems that don't implement the first, it's of little use to support interfaces nowadays.
This commit is contained in:
parent
e678f09a15
commit
da7e5864c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191947
@ -39,33 +39,13 @@
|
||||
#define _SYS_IOCTL_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _SYS_CDEFS_H_
|
||||
#error this file needs sys/cdefs.h as a prerequisite
|
||||
#endif
|
||||
#ifdef __CC_SUPPORTS_WARNING
|
||||
#warning "Don't #include ioctl.h in the kernel. Include xxxio.h instead."
|
||||
#endif
|
||||
#error "Don't #include ioctl.h in the kernel. Include xxxio.h instead."
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#include <sys/ttycom.h>
|
||||
|
||||
/*
|
||||
* Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
|
||||
* and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
|
||||
* notwithstanding).
|
||||
*/
|
||||
struct ttysize {
|
||||
unsigned short ts_lines;
|
||||
unsigned short ts_cols;
|
||||
unsigned short ts_xxx;
|
||||
unsigned short ts_yyy;
|
||||
};
|
||||
#define TIOCGSIZE TIOCGWINSZ
|
||||
#define TIOCSSIZE TIOCSWINSZ
|
||||
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
#include <sys/filio.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/ttycom.h>
|
||||
|
||||
#endif /* !_SYS_IOCTL_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user