blob: 03c4b6cc6cf9c6052f9fc1d1979c1c01af1ad6e8 [file] [log] [blame]
Ben Murdochbb1529c2013-08-08 10:24:53 +01001/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
4
5#ifndef LIBRARIES_NACL_IO_OSTERMIOS_H
6#define LIBRARIES_NACL_IO_OSTERMIOS_H
7
8#if defined(__native_client__)
9
10#include <termios.h>
11
12#else
13
14#include "sdk_util/macros.h"
15
16typedef unsigned char cc_t;
17typedef unsigned short tcflag_t;
18typedef char speed_t;
19
20#define NCCS 32
21struct termios {
22 tcflag_t c_iflag;
23 tcflag_t c_oflag;
24 tcflag_t c_cflag;
25 tcflag_t c_lflag;
26 char c_line;
27 cc_t c_cc[NCCS];
28 speed_t c_ispeed;
29 speed_t c_ospeed;
30};
31
32
33EXTERN_C_BEGIN
34
35int tcgetattr(int fd,struct termios *termios_p);
36int tcsetattr(int fd,int optional_actions,const struct termios *termios_p);
37
38EXTERN_C_END
39
40#endif
41
42#endif /* LIBRARIES_NACL_IO_OSTERMIOS_H */