(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / generic / bits / ioctl-types.h
blob58b78a6af3a5b02e8b2d58367c360b1831963818
1 /* Structure types for pre-termios terminal ioctls. Generic Unix version.
2 Copyright (C) 1996, 1997 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _SYS_IOCTL_H
21 # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
22 #endif
24 #if defined TIOCGETC || defined TIOCSETC
25 /* Type of ARG for TIOCGETC and TIOCSETC requests. */
26 struct tchars
28 char t_intrc; /* Interrupt character. */
29 char t_quitc; /* Quit character. */
30 char t_startc; /* Start-output character. */
31 char t_stopc; /* Stop-output character. */
32 char t_eofc; /* End-of-file character. */
33 char t_brkc; /* Input delimiter character. */
36 #define _IOT_tchars /* Hurd ioctl type field. */ \
37 _IOT (_IOTS (char), 6, 0, 0, 0, 0)
38 #endif
40 #if defined TIOCGLTC || defined TIOCSLTC
41 /* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
42 struct ltchars
44 char t_suspc; /* Suspend character. */
45 char t_dsuspc; /* Delayed suspend character. */
46 char t_rprntc; /* Reprint-line character. */
47 char t_flushc; /* Flush-output character. */
48 char t_werasc; /* Word-erase character. */
49 char t_lnextc; /* Literal-next character. */
52 #define _IOT_ltchars /* Hurd ioctl type field. */ \
53 _IOT (_IOTS (char), 6, 0, 0, 0, 0)
54 #endif
56 /* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty). */
57 struct sgttyb
59 char sg_ispeed; /* Input speed. */
60 char sg_ospeed; /* Output speed. */
61 char sg_erase; /* Erase character. */
62 char sg_kill; /* Kill character. */
63 short int sg_flags; /* Mode flags. */
66 #define _IOT_sgttyb /* Hurd ioctl type field. */ \
67 _IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
69 #if defined TIOCGWINSZ || defined TIOCSWINSZ
70 /* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
71 struct winsize
73 unsigned short int ws_row; /* Rows, in characters. */
74 unsigned short int ws_col; /* Columns, in characters. */
76 /* These are not actually used. */
77 unsigned short int ws_xpixel; /* Horizontal pixels. */
78 unsigned short int ws_ypixel; /* Vertical pixels. */
81 #define _IOT_winsize /* Hurd ioctl type field. */ \
82 _IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
83 #endif
85 #if defined TIOCGSIZE || defined TIOCSSIZE
86 /* The BSD-style ioctl constructor macros use `sizeof', which can't be used
87 in a preprocessor conditional. Since the commands are always unique
88 regardless of the size bits, we can safely define away `sizeof' for the
89 purpose of the conditional. */
90 # define sizeof(type) 0
91 # if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
92 /* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
93 compatibility with Sun; they define `struct ttysize' to have identical
94 layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
95 (likewise TIOCSSIZE and TIOCSWINSZ). */
96 struct ttysize
98 unsigned short int ts_lines;
99 unsigned short int ts_cols;
100 unsigned short int ts_xxx;
101 unsigned short int ts_yyy;
103 #define _IOT_ttysize _IOT_winsize
104 # else
105 /* Suns use a different layout for `struct ttysize', and TIOCGSIZE and
106 TIOCGWINSZ are separate commands that do the same thing with different
107 structures (likewise TIOCSSIZE and TIOCSWINSZ). */
108 struct ttysize
110 int ts_lines, ts_cols; /* Lines and columns, in characters. */
112 # endif
113 # undef sizeof /* See above. */
114 #endif