1/* 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(WIN32) 9 10#include "sdk_util/macros.h" 11 12typedef unsigned char cc_t; 13typedef unsigned short tcflag_t; 14typedef char speed_t; 15 16#define NCCS 32 17struct termios { 18 tcflag_t c_iflag; 19 tcflag_t c_oflag; 20 tcflag_t c_cflag; 21 tcflag_t c_lflag; 22 char c_line; 23 cc_t c_cc[NCCS]; 24 speed_t c_ispeed; 25 speed_t c_ospeed; 26}; 27 28EXTERN_C_BEGIN 29 30int tcgetattr(int fd, struct termios* termios_p); 31int tcsetattr(int fd, int optional_actions, const struct termios* termios_p); 32 33EXTERN_C_END 34 35#else 36 37#include <termios.h> 38 39#endif 40 41 42#endif /* LIBRARIES_NACL_IO_OSTERMIOS_H */ 43