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:
Ed Schouten 2009-05-09 19:01:24 +00:00
parent e678f09a15
commit da7e5864c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191947

View File

@ -39,33 +39,13 @@
#define _SYS_IOCTL_H_ #define _SYS_IOCTL_H_
#ifdef _KERNEL #ifdef _KERNEL
#ifndef _SYS_CDEFS_H_ #error "Don't #include ioctl.h in the kernel. Include xxxio.h instead."
#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
#endif /* _KERNEL */ #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/ioccom.h>
#include <sys/filio.h> #include <sys/filio.h>
#include <sys/sockio.h> #include <sys/sockio.h>
#include <sys/ttycom.h>
#endif /* !_SYS_IOCTL_H_ */ #endif /* !_SYS_IOCTL_H_ */