Remove pwd tst from configure
[glibc.git] / termios / termios.h
blob688491f5c76351ac03bf6a30b50552b53f74cfb8
1 /* Copyright (C) 1991-1994,1996-1999,2003,2010,2012
2 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. */
21 * POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
24 #ifndef _TERMIOS_H
25 #define _TERMIOS_H 1
27 #include <features.h>
28 #if defined __USE_UNIX98 || defined __USE_XOPEN2K8
29 /* We need `pid_t'. */
30 # include <bits/types.h>
31 # ifndef __pid_t_defined
32 typedef __pid_t pid_t;
33 # define __pid_t_defined
34 # endif
35 #endif
37 __BEGIN_DECLS
39 /* Get the system-dependent definitions of `struct termios', `tcflag_t',
40 `cc_t', `speed_t', and all the macros specifying the flag bits. */
41 #include <bits/termios.h>
43 #ifdef __USE_BSD
44 /* Compare a character C to a value VAL from the `c_cc' array in a
45 `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */
46 # define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
47 #endif
49 /* Return the output baud rate stored in *TERMIOS_P. */
50 extern speed_t cfgetospeed (const struct termios *__termios_p) __THROW;
52 /* Return the input baud rate stored in *TERMIOS_P. */
53 extern speed_t cfgetispeed (const struct termios *__termios_p) __THROW;
55 /* Set the output baud rate stored in *TERMIOS_P to SPEED. */
56 extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW;
58 /* Set the input baud rate stored in *TERMIOS_P to SPEED. */
59 extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW;
61 #ifdef __USE_BSD
62 /* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */
63 extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW;
64 #endif
67 /* Put the state of FD into *TERMIOS_P. */
68 extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW;
70 /* Set the state of FD to *TERMIOS_P.
71 Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>. */
72 extern int tcsetattr (int __fd, int __optional_actions,
73 const struct termios *__termios_p) __THROW;
76 #ifdef __USE_BSD
77 /* Set *TERMIOS_P to indicate raw mode. */
78 extern void cfmakeraw (struct termios *__termios_p) __THROW;
79 #endif
81 /* Send zero bits on FD. */
82 extern int tcsendbreak (int __fd, int __duration) __THROW;
84 /* Wait for pending output to be written on FD.
86 This function is a cancellation point and therefore not marked with
87 __THROW. */
88 extern int tcdrain (int __fd);
90 /* Flush pending data on FD.
91 Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <bits/termios.h>. */
92 extern int tcflush (int __fd, int __queue_selector) __THROW;
94 /* Suspend or restart transmission on FD.
95 Values for ACTION (TC[IO]{OFF,ON}) are in <bits/termios.h>. */
96 extern int tcflow (int __fd, int __action) __THROW;
99 #ifdef __USE_UNIX98
100 /* Get process group ID for session leader for controlling terminal FD. */
101 extern __pid_t tcgetsid (int __fd) __THROW;
102 #endif
105 #ifdef __USE_BSD
106 # include <sys/ttydefaults.h>
107 #endif
109 __END_DECLS
111 #endif /* termios.h */