fenv: only allow to enable for supported architectures
[uclibc-ng.git] / libc / termios / kernel_termios.h
blobdefb462b71e983c9c376047ad1c9a75fc0b4894f
1 /* Copyright (C) 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef _KERNEL_TERMIOS_H
19 #define _KERNEL_TERMIOS_H 1
21 /* We need the definition of tcflag_t, cc_t, and speed_t. */
22 #include <termios.h>
24 /* The following corresponds to the values from the Linux 2.1.20 kernel. */
29 #if defined( __sparc__ )
32 #define __KERNEL_NCCS 17
33 struct __kernel_termios
35 tcflag_t c_iflag; /* input mode flags */
36 tcflag_t c_oflag; /* output mode flags */
37 tcflag_t c_cflag; /* control mode flags */
38 tcflag_t c_lflag; /* local mode flags */
39 cc_t c_line; /* line discipline */
40 cc_t c_cc[__KERNEL_NCCS]; /* control characters */
45 #elif defined(__powerpc__)
49 #define __KERNEL_NCCS 19
50 struct __kernel_termios
52 tcflag_t c_iflag; /* input mode flags */
53 tcflag_t c_oflag; /* output mode flags */
54 tcflag_t c_cflag; /* control mode flags */
55 tcflag_t c_lflag; /* local mode flags */
56 cc_t c_cc[__KERNEL_NCCS]; /* control characters */
57 cc_t c_line; /* line discipline */
58 speed_t c_ispeed; /* input speed */
59 speed_t c_ospeed; /* output speed */
62 #define _HAVE_C_ISPEED 1
63 #define _HAVE_C_OSPEED 1
65 /* We have the kernel termios structure, so we can presume this code knows
66 what it's doing... */
67 #undef TCGETS
68 #undef TCSETS
69 #undef TCSETSW
70 #undef TCSETSF
71 #define TCGETS _IOR ('t', 19, struct __kernel_termios)
72 #define TCSETS _IOW ('t', 20, struct __kernel_termios)
73 #define TCSETSW _IOW ('t', 21, struct __kernel_termios)
74 #define TCSETSF _IOW ('t', 22, struct __kernel_termios)
78 #elif defined(__mips__)
82 #define __KERNEL_NCCS 23
83 struct __kernel_termios
85 tcflag_t c_iflag; /* input mode flags */
86 tcflag_t c_oflag; /* output mode flags */
87 tcflag_t c_cflag; /* control mode flags */
88 tcflag_t c_lflag; /* local mode flags */
89 cc_t c_line; /* line discipline */
90 cc_t c_cc[__KERNEL_NCCS]; /* control characters */
95 #elif defined(__alpha__)
99 #define __KERNEL_NCCS 19
100 struct __kernel_termios
102 tcflag_t c_iflag; /* input mode flags */
103 tcflag_t c_oflag; /* output mode flags */
104 tcflag_t c_cflag; /* control mode flags */
105 tcflag_t c_lflag; /* local mode flags */
106 cc_t c_cc[__KERNEL_NCCS]; /* control characters */
107 cc_t c_line; /* line discipline */
108 speed_t c_ispeed; /* input speed */
109 speed_t c_ospeed; /* output speed */
112 #define _HAVE_C_ISPEED 1
113 #define _HAVE_C_OSPEED 1
117 #else /* None of the above */
121 #define __KERNEL_NCCS 19
122 struct __kernel_termios
124 tcflag_t c_iflag; /* input mode flags */
125 tcflag_t c_oflag; /* output mode flags */
126 tcflag_t c_cflag; /* control mode flags */
127 tcflag_t c_lflag; /* local mode flags */
128 cc_t c_line; /* line discipline */
129 cc_t c_cc[__KERNEL_NCCS]; /* control characters */
132 #endif
137 #endif /* kernel_termios.h */