Print this page
remove support for non-ANSI compilation


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  22 /*        All Rights Reserved   */
  23 
  24 
  25 /*


  26  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  27  */
  28 
  29 #ifndef _SYS_TERMIOS_H
  30 #define _SYS_TERMIOS_H
  31 
  32 #include <sys/feature_tests.h>
  33 
  34 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  35 #include <sys/ttydev.h>
  36 #include <sys/time.h>
  37 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  38 
  39 #include <sys/types.h>
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 /*


  81 typedef unsigned int speed_t;
  82 
  83 /*
  84  * Ioctl control packet
  85  */
  86 struct termios {
  87         tcflag_t        c_iflag;        /* input modes */
  88         tcflag_t        c_oflag;        /* output modes */
  89         tcflag_t        c_cflag;        /* control modes */
  90         tcflag_t        c_lflag;        /* line discipline modes */
  91         cc_t            c_cc[NCCS];     /* control chars */
  92 };
  93 
  94 /*
  95  * POSIX termios functions
  96  * These functions get mapped into ioctls.
  97  */
  98 
  99 #ifndef _KERNEL
 100 
 101 #if defined(__STDC__)
 102 
 103 extern speed_t cfgetospeed(const struct termios *);
 104 extern int cfsetospeed(struct termios *, speed_t);
 105 extern speed_t cfgetispeed(const struct termios *);
 106 extern int cfsetispeed(struct termios *, speed_t);
 107 extern int tcgetattr(int, struct termios *);
 108 extern int tcsetattr(int, int, const struct termios *);
 109 extern int tcsendbreak(int, int);
 110 extern int tcdrain(int);
 111 extern int tcflush(int, int);
 112 extern int tcflow(int, int);
 113 
 114 #else
 115 
 116 extern speed_t cfgetospeed();
 117 extern int cfsetospeed();
 118 extern speed_t cfgetispeed();
 119 extern int cfsetispeed();
 120 extern int tcgetattr();
 121 extern int tcsetattr();
 122 extern int tcsendbreak();
 123 extern int tcdrain();
 124 extern int tcflush();
 125 extern int tcflow();
 126 
 127 #endif /* __STDC__ */
 128 
 129 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 130 
 131 #if defined(__STDC__)
 132 extern pid_t tcgetsid(int);
 133 #else
 134 extern pid_t tcgetsid();
 135 #endif /* __STDC__ */
 136 
 137 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
 138 
 139 #endif
 140 
 141 /* control characters */
 142 #define VINTR   0
 143 #define VQUIT   1
 144 #define VERASE  2
 145 #define VKILL   3
 146 #define VEOF    4
 147 #define VEOL    5
 148 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 149 #define VEOL2   6
 150 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 151 #define VMIN    4
 152 #define VTIME   5
 153 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 154 #define VSWTCH  7
 155 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  22 /*        All Rights Reserved   */
  23 
  24 
  25 /*
  26  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  27  *
  28  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  29  */
  30 
  31 #ifndef _SYS_TERMIOS_H
  32 #define _SYS_TERMIOS_H
  33 
  34 #include <sys/feature_tests.h>
  35 
  36 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  37 #include <sys/ttydev.h>
  38 #include <sys/time.h>
  39 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  40 
  41 #include <sys/types.h>
  42 
  43 #ifdef  __cplusplus
  44 extern "C" {
  45 #endif
  46 
  47 /*


  83 typedef unsigned int speed_t;
  84 
  85 /*
  86  * Ioctl control packet
  87  */
  88 struct termios {
  89         tcflag_t        c_iflag;        /* input modes */
  90         tcflag_t        c_oflag;        /* output modes */
  91         tcflag_t        c_cflag;        /* control modes */
  92         tcflag_t        c_lflag;        /* line discipline modes */
  93         cc_t            c_cc[NCCS];     /* control chars */
  94 };
  95 
  96 /*
  97  * POSIX termios functions
  98  * These functions get mapped into ioctls.
  99  */
 100 
 101 #ifndef _KERNEL
 102 


 103 extern speed_t cfgetospeed(const struct termios *);
 104 extern int cfsetospeed(struct termios *, speed_t);
 105 extern speed_t cfgetispeed(const struct termios *);
 106 extern int cfsetispeed(struct termios *, speed_t);
 107 extern int tcgetattr(int, struct termios *);
 108 extern int tcsetattr(int, int, const struct termios *);
 109 extern int tcsendbreak(int, int);
 110 extern int tcdrain(int);
 111 extern int tcflush(int, int);
 112 extern int tcflow(int, int);
 113 















 114 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 115 

 116 extern pid_t tcgetsid(int);



 117 
 118 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
 119 
 120 #endif
 121 
 122 /* control characters */
 123 #define VINTR   0
 124 #define VQUIT   1
 125 #define VERASE  2
 126 #define VKILL   3
 127 #define VEOF    4
 128 #define VEOL    5
 129 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 130 #define VEOL2   6
 131 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 132 #define VMIN    4
 133 #define VTIME   5
 134 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 135 #define VSWTCH  7
 136 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */