gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

termios_darwin_arm64.go (81268B)


      1 // Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_darwin_arm64.go -pkgname termios', DO NOT EDIT.
      2 
      3 package termios
      4 
      5 import (
      6 	"math"
      7 	"reflect"
      8 	"sync/atomic"
      9 	"unsafe"
     10 )
     11 
     12 var _ = math.Pi
     13 var _ reflect.Kind
     14 var _ atomic.Value
     15 var _ unsafe.Pointer
     16 
     17 const (
     18 	ALTWERASE                              = 0x00000200 // termios.h:249:1:
     19 	B0                                     = 0          // termios.h:291:1:
     20 	B110                                   = 110        // termios.h:294:1:
     21 	B115200                                = 115200     // termios.h:313:1:
     22 	B1200                                  = 1200       // termios.h:300:1:
     23 	B134                                   = 134        // termios.h:295:1:
     24 	B14400                                 = 14400      // termios.h:309:1:
     25 	B150                                   = 150        // termios.h:296:1:
     26 	B1800                                  = 1800       // termios.h:301:1:
     27 	B19200                                 = 19200      // termios.h:305:1:
     28 	B200                                   = 200        // termios.h:297:1:
     29 	B230400                                = 230400     // termios.h:314:1:
     30 	B2400                                  = 2400       // termios.h:302:1:
     31 	B28800                                 = 28800      // termios.h:310:1:
     32 	B300                                   = 300        // termios.h:298:1:
     33 	B38400                                 = 38400      // termios.h:306:1:
     34 	B4800                                  = 4800       // termios.h:303:1:
     35 	B50                                    = 50         // termios.h:292:1:
     36 	B57600                                 = 57600      // termios.h:311:1:
     37 	B600                                   = 600        // termios.h:299:1:
     38 	B7200                                  = 7200       // termios.h:308:1:
     39 	B75                                    = 75         // termios.h:293:1:
     40 	B76800                                 = 76800      // termios.h:312:1:
     41 	B9600                                  = 9600       // termios.h:304:1:
     42 	BRKINT                                 = 0x00000002 // termios.h:120:1:
     43 	BS0                                    = 0x00000000 // termios.h:190:1:
     44 	BS1                                    = 0x00008000 // termios.h:191:1:
     45 	BSDLY                                  = 0x00008000 // termios.h:159:1:
     46 	CBRK                                   = 255        // ttydefaults.h:107:1:
     47 	CCAR_OFLOW                             = 0x00100000 // termios.h:222:1:
     48 	CCTS_OFLOW                             = 0x00010000 // termios.h:217:1:
     49 	CDISCARD                               = 15         // ttydefaults.h:102:1:
     50 	CDSR_OFLOW                             = 0x00080000 // termios.h:221:1:
     51 	CDSUSP                                 = 25         // ttydefaults.h:98:1:
     52 	CDTR_IFLOW                             = 0x00040000 // termios.h:220:1:
     53 	CEOF                                   = 4          // ttydefaults.h:88:1:
     54 	CEOL                                   = 0xff       // ttydefaults.h:89:1:
     55 	CEOT                                   = 4          // ttydefaults.h:105:1:
     56 	CERASE                                 = 0177       // ttydefaults.h:90:1:
     57 	CFLUSH                                 = 15         // ttydefaults.h:109:1:
     58 	CIGNORE                                = 0x00000001 // termios.h:203:1:
     59 	CINTR                                  = 3          // ttydefaults.h:91:1:
     60 	CKILL                                  = 21         // ttydefaults.h:93:1:
     61 	CLNEXT                                 = 22         // ttydefaults.h:101:1:
     62 	CLOCAL                                 = 0x00008000 // termios.h:215:1:
     63 	CMIN                                   = 1          // ttydefaults.h:94:1:
     64 	CQUIT                                  = 034        // ttydefaults.h:95:1:
     65 	CR0                                    = 0x00000000 // termios.h:184:1:
     66 	CR1                                    = 0x00001000 // termios.h:185:1:
     67 	CR2                                    = 0x00002000 // termios.h:186:1:
     68 	CR3                                    = 0x00003000 // termios.h:187:1:
     69 	CRDLY                                  = 0x00003000 // termios.h:157:1:
     70 	CREAD                                  = 0x00000800 // termios.h:211:1:
     71 	CREPRINT                               = 18         // ttydefaults.h:104:1:
     72 	CRPRNT                                 = 18         // ttydefaults.h:108:1:
     73 	CRTSCTS                                = 196608     // termios.h:218:1:
     74 	CRTS_IFLOW                             = 0x00020000 // termios.h:219:1:
     75 	CS5                                    = 0x00000000 // termios.h:206:1:
     76 	CS6                                    = 0x00000100 // termios.h:207:1:
     77 	CS7                                    = 0x00000200 // termios.h:208:1:
     78 	CS8                                    = 0x00000300 // termios.h:209:1:
     79 	CSIZE                                  = 0x00000300 // termios.h:205:1:
     80 	CSTART                                 = 17         // ttydefaults.h:99:1:
     81 	CSTATUS                                = 20         // ttydefaults.h:92:1:
     82 	CSTOP                                  = 19         // ttydefaults.h:100:1:
     83 	CSTOPB                                 = 0x00000400 // termios.h:210:1:
     84 	CSUSP                                  = 26         // ttydefaults.h:96:1:
     85 	CTIME                                  = 0          // ttydefaults.h:97:1:
     86 	CWERASE                                = 23         // ttydefaults.h:103:1:
     87 	ECHO                                   = 0x00000008 // termios.h:240:1:
     88 	ECHOCTL                                = 0x00000040 // termios.h:244:1:
     89 	ECHOE                                  = 0x00000002 // termios.h:238:1:
     90 	ECHOK                                  = 0x00000004 // termios.h:239:1:
     91 	ECHOKE                                 = 0x00000001 // termios.h:236:1:
     92 	ECHONL                                 = 0x00000010 // termios.h:241:1:
     93 	ECHOPRT                                = 0x00000020 // termios.h:243:1:
     94 	EXTA                                   = 19200      // termios.h:315:1:
     95 	EXTB                                   = 38400      // termios.h:316:1:
     96 	EXTPROC                                = 0x00000800 // termios.h:253:1:
     97 	FF0                                    = 0x00000000 // termios.h:188:1:
     98 	FF1                                    = 0x00004000 // termios.h:189:1:
     99 	FFDLY                                  = 0x00004000 // termios.h:158:1:
    100 	FLUSHO                                 = 0x00800000 // termios.h:257:1:
    101 	HUPCL                                  = 0x00004000 // termios.h:214:1:
    102 	ICANON                                 = 0x00000100 // termios.h:247:1:
    103 	ICRNL                                  = 0x00000100 // termios.h:127:1:
    104 	IEXTEN                                 = 0x00000400 // termios.h:251:1:
    105 	IGNBRK                                 = 0x00000001 // termios.h:119:1:
    106 	IGNCR                                  = 0x00000080 // termios.h:126:1:
    107 	IGNPAR                                 = 0x00000004 // termios.h:121:1:
    108 	IMAXBEL                                = 0x00002000 // termios.h:132:1:
    109 	INLCR                                  = 0x00000040 // termios.h:125:1:
    110 	INPCK                                  = 0x00000010 // termios.h:123:1:
    111 	IOCPARM_MASK                           = 0x1fff     // ioccom.h:74:1:
    112 	IOCPARM_MAX                            = 8192       // ioccom.h:79:1:
    113 	ISIG                                   = 0x00000080 // termios.h:246:1:
    114 	ISTRIP                                 = 0x00000020 // termios.h:124:1:
    115 	IUTF8                                  = 0x00004000 // termios.h:133:1:
    116 	IXANY                                  = 0x00000800 // termios.h:130:1:
    117 	IXOFF                                  = 0x00000400 // termios.h:129:1:
    118 	IXON                                   = 0x00000200 // termios.h:128:1:
    119 	MDMBUF                                 = 0x00100000 // termios.h:223:1:
    120 	NCCS                                   = 20         // termios.h:108:1:
    121 	NL0                                    = 0x00000000 // termios.h:173:1:
    122 	NL1                                    = 0x00000100 // termios.h:174:1:
    123 	NL2                                    = 0x00000200 // termios.h:176:1:
    124 	NL3                                    = 0x00000300 // termios.h:177:1:
    125 	NLDLY                                  = 0x00000300 // termios.h:155:1:
    126 	NOFLSH                                 = 0x80000000 // termios.h:261:1:
    127 	NOKERNINFO                             = 0x02000000 // termios.h:258:1:
    128 	OCRNL                                  = 0x00000010 // termios.h:151:1:
    129 	OFDEL                                  = 0x00020000 // termios.h:161:1:
    130 	OFILL                                  = 0x00000080 // termios.h:154:1:
    131 	ONLCR                                  = 0x00000002 // termios.h:140:1:
    132 	ONLRET                                 = 0x00000040 // termios.h:153:1:
    133 	ONOCR                                  = 0x00000020 // termios.h:152:1:
    134 	ONOEOT                                 = 0x00000008 // termios.h:143:1:
    135 	OPOST                                  = 0x00000001 // termios.h:139:1:
    136 	OXTABS                                 = 0x00000004 // termios.h:142:1:
    137 	PARENB                                 = 0x00001000 // termios.h:212:1:
    138 	PARMRK                                 = 0x00000008 // termios.h:122:1:
    139 	PARODD                                 = 0x00002000 // termios.h:213:1:
    140 	PENDIN                                 = 0x20000000 // termios.h:259:1:
    141 	PPPDISC                                = 5          // ttycom.h:171:1:
    142 	SLIPDISC                               = 4          // ttycom.h:170:1:
    143 	TAB0                                   = 0x00000000 // termios.h:179:1:
    144 	TAB1                                   = 0x00000400 // termios.h:180:1:
    145 	TAB2                                   = 0x00000800 // termios.h:181:1:
    146 	TAB3                                   = 0x00000004 // termios.h:183:1:
    147 	TABDLY                                 = 0x00000c04 // termios.h:156:1:
    148 	TABLDISC                               = 3          // ttycom.h:169:1:
    149 	TCIFLUSH                               = 1          // termios.h:320:1:
    150 	TCIOFF                                 = 3          // termios.h:325:1:
    151 	TCIOFLUSH                              = 3          // termios.h:322:1:
    152 	TCION                                  = 4          // termios.h:326:1:
    153 	TCOFLUSH                               = 2          // termios.h:321:1:
    154 	TCOOFF                                 = 1          // termios.h:323:1:
    155 	TCOON                                  = 2          // termios.h:324:1:
    156 	TCSADRAIN                              = 1          // termios.h:282:1:
    157 	TCSAFLUSH                              = 2          // termios.h:283:1:
    158 	TCSANOW                                = 0          // termios.h:281:1:
    159 	TCSASOFT                               = 0x10       // termios.h:285:1:
    160 	TIOCM_CAR                              = 0100       // ttycom.h:97:1:
    161 	TIOCM_CD                               = 64         // ttycom.h:98:1:
    162 	TIOCM_CTS                              = 0040       // ttycom.h:96:1:
    163 	TIOCM_DSR                              = 0400       // ttycom.h:101:1:
    164 	TIOCM_DTR                              = 0002       // ttycom.h:92:1:
    165 	TIOCM_LE                               = 0001       // ttycom.h:91:1:
    166 	TIOCM_RI                               = 128        // ttycom.h:100:1:
    167 	TIOCM_RNG                              = 0200       // ttycom.h:99:1:
    168 	TIOCM_RTS                              = 0004       // ttycom.h:93:1:
    169 	TIOCM_SR                               = 0020       // ttycom.h:95:1:
    170 	TIOCM_ST                               = 0010       // ttycom.h:94:1:
    171 	TIOCPKT_DATA                           = 0x00       // ttycom.h:128:1:
    172 	TIOCPKT_DOSTOP                         = 0x20       // ttycom.h:134:1:
    173 	TIOCPKT_FLUSHREAD                      = 0x01       // ttycom.h:129:1:
    174 	TIOCPKT_FLUSHWRITE                     = 0x02       // ttycom.h:130:1:
    175 	TIOCPKT_IOCTL                          = 0x40       // ttycom.h:135:1:
    176 	TIOCPKT_NOSTOP                         = 0x10       // ttycom.h:133:1:
    177 	TIOCPKT_START                          = 0x08       // ttycom.h:132:1:
    178 	TIOCPKT_STOP                           = 0x04       // ttycom.h:131:1:
    179 	TOSTOP                                 = 0x00400000 // termios.h:255:1:
    180 	TTYDEF_CFLAG                           = 19200      // ttydefaults.h:81:1:
    181 	TTYDEF_IFLAG                           = 11010      // ttydefaults.h:78:1:
    182 	TTYDEF_LFLAG                           = 1483       // ttydefaults.h:80:1:
    183 	TTYDEF_OFLAG                           = 3          // ttydefaults.h:79:1:
    184 	TTYDEF_SPEED                           = 9600       // ttydefaults.h:82:1:
    185 	TTYDISC                                = 0          // ttycom.h:168:1:
    186 	VDISCARD                               = 15         // termios.h:100:1:
    187 	VDSUSP                                 = 11         // termios.h:94:1:
    188 	VEOF                                   = 0          // termios.h:76:1:
    189 	VEOL                                   = 1          // termios.h:77:1:
    190 	VEOL2                                  = 2          // termios.h:79:1:
    191 	VERASE                                 = 3          // termios.h:81:1:
    192 	VINTR                                  = 8          // termios.h:90:1:
    193 	VKILL                                  = 5          // termios.h:85:1:
    194 	VLNEXT                                 = 14         // termios.h:99:1:
    195 	VMIN                                   = 16         // termios.h:102:1:
    196 	VQUIT                                  = 9          // termios.h:91:1:
    197 	VREPRINT                               = 6          // termios.h:87:1:
    198 	VSTART                                 = 12         // termios.h:96:1:
    199 	VSTATUS                                = 18         // termios.h:105:1:
    200 	VSTOP                                  = 13         // termios.h:97:1:
    201 	VSUSP                                  = 10         // termios.h:92:1:
    202 	VT0                                    = 0x00000000 // termios.h:192:1:
    203 	VT1                                    = 0x00010000 // termios.h:193:1:
    204 	VTDLY                                  = 0x00010000 // termios.h:160:1:
    205 	VTIME                                  = 17         // termios.h:103:1:
    206 	VWERASE                                = 4          // termios.h:83:1:
    207 	X_BSD_ARM__TYPES_H_                    = 0          // _types.h:5:1:
    208 	X_BSD_MACHINE__TYPES_H_                = 0          // _types.h:29:1:
    209 	X_CDEFS_H_                             = 0          // cdefs.h:68:1:
    210 	X_DARWIN_FEATURE_64_BIT_INODE          = 1          // cdefs.h:774:1:
    211 	X_DARWIN_FEATURE_ONLY_64_BIT_INODE     = 1          // cdefs.h:784:1:
    212 	X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1          // cdefs.h:800:1:
    213 	X_DARWIN_FEATURE_ONLY_VERS_1050        = 1          // cdefs.h:792:1:
    214 	X_DARWIN_FEATURE_UNIX_CONFORMANCE      = 3          // cdefs.h:808:1:
    215 	X_FILE_OFFSET_BITS                     = 64         // <builtin>:25:1:
    216 	X_FORTIFY_SOURCE                       = 2          // _types.h:65:1:
    217 	X_LP64                                 = 1          // <predefined>:1:1:
    218 	X_Nonnull                              = 0          // cdefs.h:268:1:
    219 	X_Null_unspecified                     = 0          // cdefs.h:271:1:
    220 	X_Nullable                             = 0          // cdefs.h:265:1:
    221 	X_PID_T                                = 0          // _pid_t.h:29:1:
    222 	X_SYS_IOCCOM_H_                        = 0          // ioccom.h:65:1:
    223 	X_SYS_TERMIOS_H_                       = 0          // termios.h:65:1:
    224 	X_SYS_TTYCOM_H_                        = 0          // ttycom.h:70:1:
    225 	X_SYS_TTYDEFAULTS_H_                   = 0          // ttydefaults.h:73:1:
    226 	X_SYS__PTHREAD_TYPES_H_                = 0          // _pthread_types.h:30:1:
    227 	X_SYS__TYPES_H_                        = 0          // _types.h:30:1:
    228 )
    229 
    230 type Ptrdiff_t = int64 /* <builtin>:3:26 */
    231 
    232 type Size_t = uint64 /* <builtin>:9:23 */
    233 
    234 type Wchar_t = int32 /* <builtin>:15:24 */
    235 
    236 type X__int128_t = struct {
    237 	Flo int64
    238 	Fhi int64
    239 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
    240 type X__uint128_t = struct {
    241 	Flo uint64
    242 	Fhi uint64
    243 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
    244 
    245 type X__builtin_va_list = uintptr /* <builtin>:46:14 */
    246 type X__float128 = float64        /* <builtin>:47:21 */
    247 
    248 var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
    249 
    250 // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
    251 //
    252 // @APPLE_LICENSE_HEADER_START@
    253 //
    254 // This file contains Original Code and/or Modifications of Original Code
    255 // as defined in and that are subject to the Apple Public Source License
    256 // Version 2.0 (the 'License'). You may not use this file except in
    257 // compliance with the License. Please obtain a copy of the License at
    258 // http://www.opensource.apple.com/apsl/ and read it before using this
    259 // file.
    260 //
    261 // The Original Code and all software distributed under the License are
    262 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    263 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    264 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    265 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    266 // Please see the License for the specific language governing rights and
    267 // limitations under the License.
    268 //
    269 // @APPLE_LICENSE_HEADER_END@
    270 
    271 // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
    272 //
    273 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    274 //
    275 // This file contains Original Code and/or Modifications of Original Code
    276 // as defined in and that are subject to the Apple Public Source License
    277 // Version 2.0 (the 'License'). You may not use this file except in
    278 // compliance with the License. The rights granted to you under the License
    279 // may not be used to create, or enable the creation or redistribution of,
    280 // unlawful or unlicensed copies of an Apple operating system, or to
    281 // circumvent, violate, or enable the circumvention or violation of, any
    282 // terms of an Apple operating system software license agreement.
    283 //
    284 // Please obtain a copy of the License at
    285 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    286 //
    287 // The Original Code and all software distributed under the License are
    288 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    289 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    290 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    291 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    292 // Please see the License for the specific language governing rights and
    293 // limitations under the License.
    294 //
    295 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    296 // Copyright 1995 NeXT Computer, Inc. All rights reserved.
    297 // Copyright (c) 1991, 1993
    298 //	The Regents of the University of California.  All rights reserved.
    299 //
    300 // This code is derived from software contributed to Berkeley by
    301 // Berkeley Software Design, Inc.
    302 //
    303 // Redistribution and use in source and binary forms, with or without
    304 // modification, are permitted provided that the following conditions
    305 // are met:
    306 // 1. Redistributions of source code must retain the above copyright
    307 //    notice, this list of conditions and the following disclaimer.
    308 // 2. Redistributions in binary form must reproduce the above copyright
    309 //    notice, this list of conditions and the following disclaimer in the
    310 //    documentation and/or other materials provided with the distribution.
    311 // 3. All advertising materials mentioning features or use of this software
    312 //    must display the following acknowledgement:
    313 //	This product includes software developed by the University of
    314 //	California, Berkeley and its contributors.
    315 // 4. Neither the name of the University nor the names of its contributors
    316 //    may be used to endorse or promote products derived from this software
    317 //    without specific prior written permission.
    318 //
    319 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    320 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    321 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    322 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    323 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    324 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    325 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    326 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    327 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    328 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    329 // SUCH DAMAGE.
    330 //
    331 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
    332 
    333 // This SDK is designed to work with clang and specific versions of
    334 // gcc >= 4.0 with Apple's patch sets
    335 
    336 // Compatibility with compilers and environments that don't support compiler
    337 // feature checking function-like macros.
    338 
    339 // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
    340 // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
    341 // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
    342 // in between its arguments.  __CONCAT can also concatenate double-quoted
    343 // strings produced by the __STRING macro, but this only works with ANSI C.
    344 
    345 // In non-ANSI C environments, new programs will want ANSI-only C keywords
    346 // deleted from the program and old programs will want them left alone.
    347 // When using a compiler other than gcc, programs using the ANSI C keywords
    348 // const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
    349 // When using "gcc -traditional", we assume that this is the intent; if
    350 // __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
    351 
    352 // __pure2 can be used for functions that are only a function of their scalar
    353 // arguments (meaning they can't dereference pointers).
    354 //
    355 // __stateful_pure can be used for functions that have no side effects,
    356 // but depend on the state of the memory.
    357 
    358 // __unused denotes variables and functions that may not be used, preventing
    359 // the compiler from warning about it if not used.
    360 
    361 // __used forces variables and functions to be included even if it appears
    362 // to the compiler that they are not used (and would thust be discarded).
    363 
    364 // __cold marks code used for debugging or that is rarely taken
    365 // and tells the compiler to optimize for size and outline code.
    366 
    367 // __exported denotes symbols that should be exported even when symbols
    368 // are hidden by default.
    369 // __exported_push/_exported_pop are pragmas used to delimit a range of
    370 //  symbols that should be exported even when symbols are hidden by default.
    371 
    372 // __deprecated causes the compiler to produce a warning when encountering
    373 // code using the deprecated functionality.
    374 // __deprecated_msg() does the same, and compilers that support it will print
    375 // a message along with the deprecation warning.
    376 // This may require turning on such warning with the -Wdeprecated flag.
    377 // __deprecated_enum_msg() should be used on enums, and compilers that support
    378 // it will print the deprecation warning.
    379 // __kpi_deprecated() specifically indicates deprecation of kernel programming
    380 // interfaces in Kernel.framework used by KEXTs.
    381 
    382 // __unavailable causes the compiler to error out when encountering
    383 // code using the tagged function
    384 
    385 // Delete pseudo-keywords wherever they are not available or needed.
    386 
    387 // We use `__restrict' as a way to define the `restrict' type qualifier
    388 // without disturbing older software that is unaware of C99 keywords.
    389 
    390 // Compatibility with compilers and environments that don't support the
    391 // nullability feature.
    392 
    393 // __disable_tail_calls causes the compiler to not perform tail call
    394 // optimization inside the marked function.
    395 
    396 // __not_tail_called causes the compiler to prevent tail call optimization
    397 // on statically bound calls to the function.  It has no effect on indirect
    398 // calls.  Virtual functions, objective-c methods, and functions marked as
    399 // "always_inline" cannot be marked as __not_tail_called.
    400 
    401 // __result_use_check warns callers of a function that not using the function
    402 // return value is a bug, i.e. dismissing malloc() return value results in a
    403 // memory leak.
    404 
    405 // __swift_unavailable causes the compiler to mark a symbol as specifically
    406 // unavailable in Swift, regardless of any other availability in C.
    407 
    408 // __abortlike is the attribute to put on functions like abort() that are
    409 // typically used to mark assertions. These optimize the codegen
    410 // for outlining while still maintaining debugability.
    411 
    412 // Declaring inline functions within headers is error-prone due to differences
    413 // across various versions of the C language and extensions.  __header_inline
    414 // can be used to declare inline functions within system headers.  In cases
    415 // where you want to force inlining instead of letting the compiler make
    416 // the decision, you can use __header_always_inline.
    417 //
    418 // Be aware that using inline for functions which compilers may also provide
    419 // builtins can behave differently under various compilers.  If you intend to
    420 // provide an inline version of such a function, you may want to use a macro
    421 // instead.
    422 //
    423 // The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
    424 // support c99 inline in some cases:
    425 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
    426 
    427 // Compiler-dependent macros that bracket portions of code where the
    428 // "-Wunreachable-code" warning should be ignored. Please use sparingly.
    429 
    430 // Compiler-dependent macros to declare that functions take printf-like
    431 // or scanf-like arguments.  They are null except for versions of gcc
    432 // that are known to support the features properly.  Functions declared
    433 // with these attributes will cause compilation warnings if there is a
    434 // mismatch between the format string and subsequent function parameter
    435 // types.
    436 
    437 // Source compatibility only, ID string not emitted in object file
    438 
    439 // __alloc_size can be used to label function arguments that represent the
    440 // size of memory that the function allocates and returns. The one-argument
    441 // form labels a single argument that gives the allocation size (where the
    442 // arguments are numbered from 1):
    443 //
    444 // void	*malloc(size_t __size) __alloc_size(1);
    445 //
    446 // The two-argument form handles the case where the size is calculated as the
    447 // product of two arguments:
    448 //
    449 // void	*calloc(size_t __count, size_t __size) __alloc_size(1,2);
    450 
    451 // COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
    452 //
    453 // DEFAULT	By default newly complied code will get POSIX APIs plus
    454 //		Apple API extensions in scope.
    455 //
    456 //		Most users will use this compilation environment to avoid
    457 //		behavioral differences between 32 and 64 bit code.
    458 //
    459 // LEGACY	Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
    460 //		API extensions in scope.
    461 //
    462 //		This is generally equivalent to the Tiger release compilation
    463 //		environment, except that it cannot be applied to 64 bit code;
    464 //		its use is discouraged.
    465 //
    466 //		We expect this environment to be deprecated in the future.
    467 //
    468 // STRICT	Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
    469 //		available APIs to exactly the set of APIs defined by the
    470 //		corresponding standard, based on the value defined.
    471 //
    472 //		A correct, portable definition for _POSIX_C_SOURCE is 200112L.
    473 //		A correct, portable definition for _XOPEN_SOURCE is 600L.
    474 //
    475 //		Apple API extensions are not visible in this environment,
    476 //		which can cause Apple specific code to fail to compile,
    477 //		or behave incorrectly if prototypes are not in scope or
    478 //		warnings about missing prototypes are not enabled or ignored.
    479 //
    480 // In any compilation environment, for correct symbol resolution to occur,
    481 // function prototypes must be in scope.  It is recommended that all Apple
    482 // tools users add either the "-Wall" or "-Wimplicit-function-declaration"
    483 // compiler flags to their projects to be warned when a function is being
    484 // used without a prototype in scope.
    485 
    486 // These settings are particular to each product.
    487 // Platform: MacOSX
    488 
    489 // The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
    490 // legacy code to use the old symbol, thus maintaining binary compatibility
    491 // while new code can use a standards compliant version of the same function.
    492 //
    493 // __DARWIN_ALIAS is used by itself if the function signature has not
    494 // changed, it is used along with a #ifdef check for __DARWIN_UNIX03
    495 // if the signature has changed.  Because the __LP64__ environment
    496 // only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
    497 // defined, but causes __DARWIN_ALIAS to do no symbol mangling.
    498 //
    499 // As a special case, when XCode is used to target a specific version of the
    500 // OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
    501 // will be defined by the compiler, with the digits representing major version
    502 // time 100 + minor version times 10 (e.g. 10.5 := 1050).  If we are targeting
    503 // pre-10.5, and it is the default compilation environment, revert the
    504 // compilation environment to pre-__DARWIN_UNIX03.
    505 
    506 // symbol suffixes used for symbol versioning
    507 
    508 // symbol versioning macros
    509 
    510 // symbol release macros
    511 // Copyright (c) 2010 Apple Inc. All rights reserved.
    512 //
    513 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    514 //
    515 // This file contains Original Code and/or Modifications of Original Code
    516 // as defined in and that are subject to the Apple Public Source License
    517 // Version 2.0 (the 'License'). You may not use this file except in
    518 // compliance with the License. The rights granted to you under the License
    519 // may not be used to create, or enable the creation or redistribution of,
    520 // unlawful or unlicensed copies of an Apple operating system, or to
    521 // circumvent, violate, or enable the circumvention or violation of, any
    522 // terms of an Apple operating system software license agreement.
    523 //
    524 // Please obtain a copy of the License at
    525 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    526 //
    527 // The Original Code and all software distributed under the License are
    528 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    529 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    530 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    531 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    532 // Please see the License for the specific language governing rights and
    533 // limitations under the License.
    534 //
    535 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    536 
    537 // POSIX.1 requires that the macros we test be defined before any standard
    538 // header file is included.  This permits us to convert values for feature
    539 // testing, as necessary, using only _POSIX_C_SOURCE.
    540 //
    541 // Here's a quick run-down of the versions:
    542 //  defined(_POSIX_SOURCE)		1003.1-1988
    543 //  _POSIX_C_SOURCE == 1L		1003.1-1990
    544 //  _POSIX_C_SOURCE == 2L		1003.2-1992 C Language Binding Option
    545 //  _POSIX_C_SOURCE == 199309L		1003.1b-1993
    546 //  _POSIX_C_SOURCE == 199506L		1003.1c-1995, 1003.1i-1995,
    547 //					and the omnibus ISO/IEC 9945-1: 1996
    548 //  _POSIX_C_SOURCE == 200112L		1003.1-2001
    549 //  _POSIX_C_SOURCE == 200809L		1003.1-2008
    550 //
    551 // In addition, the X/Open Portability Guide, which is now the Single UNIX
    552 // Specification, defines a feature-test macro which indicates the version of
    553 // that specification, and which subsumes _POSIX_C_SOURCE.
    554 
    555 // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L.
    556 
    557 // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L.
    558 
    559 // Deal with various X/Open Portability Guides and Single UNIX Spec.
    560 
    561 // Deal with all versions of POSIX.  The ordering relative to the tests above is
    562 // important.
    563 
    564 // POSIX C deprecation macros
    565 // Copyright (c) 2010 Apple Inc. All rights reserved.
    566 //
    567 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    568 //
    569 // This file contains Original Code and/or Modifications of Original Code
    570 // as defined in and that are subject to the Apple Public Source License
    571 // Version 2.0 (the 'License'). You may not use this file except in
    572 // compliance with the License. The rights granted to you under the License
    573 // may not be used to create, or enable the creation or redistribution of,
    574 // unlawful or unlicensed copies of an Apple operating system, or to
    575 // circumvent, violate, or enable the circumvention or violation of, any
    576 // terms of an Apple operating system software license agreement.
    577 //
    578 // Please obtain a copy of the License at
    579 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    580 //
    581 // The Original Code and all software distributed under the License are
    582 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    583 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    584 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    585 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    586 // Please see the License for the specific language governing rights and
    587 // limitations under the License.
    588 //
    589 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    590 
    591 // Set a single macro which will always be defined and can be used to determine
    592 // the appropriate namespace.  For POSIX, these values will correspond to
    593 // _POSIX_C_SOURCE value.  Currently there are two additional levels corresponding
    594 // to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
    595 
    596 // If the developer has neither requested a strict language mode nor a version
    597 // of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
    598 // of __DARWIN_C_FULL.
    599 
    600 // long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
    601 // c99 still want long longs.  While not perfect, we allow long longs for
    602 // g++.
    603 
    604 // ****************************************
    605 //
    606 //  Public darwin-specific feature macros
    607 //
    608 
    609 // _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
    610 // structures modified for 64-bit inodes (like struct stat) will be used.
    611 
    612 // _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
    613 // be 64-bit; there is no support for 32-bit ino_t when this macro is defined
    614 // (and non-zero).  There is no struct stat64 either, as the regular
    615 // struct stat will already be the 64-bit version.
    616 
    617 // _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
    618 // in 10.5 exists; no pre-10.5 variants are available.
    619 
    620 // _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
    621 // are available (the legacy BSD APIs are not available)
    622 
    623 // _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
    624 // and specifies the conformance level (3 is SUSv3)
    625 
    626 // This macro casts away the qualifier from the variable
    627 //
    628 // Note: use at your own risk, removing qualifiers can result in
    629 // catastrophic run-time failures.
    630 
    631 // __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
    632 // used from other compilation units, but not other libraries or executables.
    633 
    634 // We intentionally define to nothing pointer attributes which do not have an
    635 // impact on the ABI. __indexable and __bidi_indexable are not defined because
    636 // of the ABI incompatibility that makes the diagnostic preferable.
    637 
    638 // Similarly, we intentionally define to nothing the
    639 // __ptrcheck_abi_assume_single and __ptrcheck_abi_assume_unsafe_indexable
    640 // macros because they do not lead to an ABI incompatibility. However, we do not
    641 // define the indexable and unsafe_indexable ones because the diagnostic is
    642 // better than the silent ABI break.
    643 
    644 // __unsafe_forge intrinsics are defined as regular C casts.
    645 
    646 // decay operates normally; attribute is meaningless without pointer checks.
    647 
    648 // Architecture validation for current SDK
    649 
    650 // Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
    651 //
    652 // This provides more advanced type checking on compilers supporting
    653 // the proper extensions, even in C.
    654 
    655 // Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
    656 //
    657 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    658 //
    659 // This file contains Original Code and/or Modifications of Original Code
    660 // as defined in and that are subject to the Apple Public Source License
    661 // Version 2.0 (the 'License'). You may not use this file except in
    662 // compliance with the License. The rights granted to you under the License
    663 // may not be used to create, or enable the creation or redistribution of,
    664 // unlawful or unlicensed copies of an Apple operating system, or to
    665 // circumvent, violate, or enable the circumvention or violation of, any
    666 // terms of an Apple operating system software license agreement.
    667 //
    668 // Please obtain a copy of the License at
    669 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    670 //
    671 // The Original Code and all software distributed under the License are
    672 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    673 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    674 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    675 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    676 // Please see the License for the specific language governing rights and
    677 // limitations under the License.
    678 //
    679 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    680 // Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved
    681 // Copyright (c) 1988, 1989, 1993, 1994
    682 //	The Regents of the University of California.  All rights reserved.
    683 //
    684 // Redistribution and use in source and binary forms, with or without
    685 // modification, are permitted provided that the following conditions
    686 // are met:
    687 // 1. Redistributions of source code must retain the above copyright
    688 //    notice, this list of conditions and the following disclaimer.
    689 // 2. Redistributions in binary form must reproduce the above copyright
    690 //    notice, this list of conditions and the following disclaimer in the
    691 //    documentation and/or other materials provided with the distribution.
    692 // 3. All advertising materials mentioning features or use of this software
    693 //    must display the following acknowledgement:
    694 //      This product includes software developed by the University of
    695 //      California, Berkeley and its contributors.
    696 // 4. Neither the name of the University nor the names of its contributors
    697 //    may be used to endorse or promote products derived from this software
    698 //    without specific prior written permission.
    699 //
    700 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    701 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    702 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    703 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    704 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    705 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    706 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    707 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    708 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    709 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    710 // SUCH DAMAGE.
    711 //
    712 //	@(#)termios.h	8.3 (Berkeley) 3/28/94
    713 
    714 // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
    715 //
    716 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    717 //
    718 // This file contains Original Code and/or Modifications of Original Code
    719 // as defined in and that are subject to the Apple Public Source License
    720 // Version 2.0 (the 'License'). You may not use this file except in
    721 // compliance with the License. The rights granted to you under the License
    722 // may not be used to create, or enable the creation or redistribution of,
    723 // unlawful or unlicensed copies of an Apple operating system, or to
    724 // circumvent, violate, or enable the circumvention or violation of, any
    725 // terms of an Apple operating system software license agreement.
    726 //
    727 // Please obtain a copy of the License at
    728 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    729 //
    730 // The Original Code and all software distributed under the License are
    731 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    732 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    733 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    734 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    735 // Please see the License for the specific language governing rights and
    736 // limitations under the License.
    737 //
    738 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    739 // Copyright 1995 NeXT Computer, Inc. All rights reserved.
    740 // Copyright (c) 1991, 1993
    741 //	The Regents of the University of California.  All rights reserved.
    742 //
    743 // This code is derived from software contributed to Berkeley by
    744 // Berkeley Software Design, Inc.
    745 //
    746 // Redistribution and use in source and binary forms, with or without
    747 // modification, are permitted provided that the following conditions
    748 // are met:
    749 // 1. Redistributions of source code must retain the above copyright
    750 //    notice, this list of conditions and the following disclaimer.
    751 // 2. Redistributions in binary form must reproduce the above copyright
    752 //    notice, this list of conditions and the following disclaimer in the
    753 //    documentation and/or other materials provided with the distribution.
    754 // 3. All advertising materials mentioning features or use of this software
    755 //    must display the following acknowledgement:
    756 //	This product includes software developed by the University of
    757 //	California, Berkeley and its contributors.
    758 // 4. Neither the name of the University nor the names of its contributors
    759 //    may be used to endorse or promote products derived from this software
    760 //    without specific prior written permission.
    761 //
    762 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    763 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    764 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    765 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    766 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    767 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    768 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    769 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    770 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    771 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    772 // SUCH DAMAGE.
    773 //
    774 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
    775 
    776 // Special Control Characters
    777 //
    778 // Index into c_cc[] character array.
    779 //
    780 //	Name	     Subscript	Enabled by
    781 //			7	   spare 1
    782 //			19	   spare 2
    783 
    784 // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
    785 //
    786 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    787 //
    788 // This file contains Original Code and/or Modifications of Original Code
    789 // as defined in and that are subject to the Apple Public Source License
    790 // Version 2.0 (the 'License'). You may not use this file except in
    791 // compliance with the License. The rights granted to you under the License
    792 // may not be used to create, or enable the creation or redistribution of,
    793 // unlawful or unlicensed copies of an Apple operating system, or to
    794 // circumvent, violate, or enable the circumvention or violation of, any
    795 // terms of an Apple operating system software license agreement.
    796 //
    797 // Please obtain a copy of the License at
    798 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    799 //
    800 // The Original Code and all software distributed under the License are
    801 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    802 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    803 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    804 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    805 // Please see the License for the specific language governing rights and
    806 // limitations under the License.
    807 //
    808 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    809 
    810 // Input flags - software input processing
    811 
    812 // Output flags - software output processing
    813 // The following block of features is unimplemented.  Use of these flags in
    814 // programs will currently result in unexpected behaviour.
    815 //
    816 // - Begin unimplemented features
    817 // These manifest constants have the same names as those in the header
    818 // <sys/ioctl_compat.h>, so you are not permitted to have both definitions
    819 // in scope simultaneously in the same compilation unit.  Nevertheless,
    820 // they are required to be in scope when _POSIX_C_SOURCE is requested;
    821 // this means that including the <sys/ioctl_compat.h> header before this
    822 // one when _POSIX_C_SOURCE is in scope will result in redefintions.  We
    823 // attempt to maintain these as the same values so as to avoid this being
    824 // an outright error in most compilers.
    825 // not in sys/ioctl_compat.h, use OXTABS value
    826 // + End unimplemented features
    827 
    828 // Control flags - hardware control of terminal
    829 
    830 // "Local" flags - dumping ground for other state
    831 //
    832 // Warning: some flags in this structure begin with
    833 // the letter "I" and look like they belong in the
    834 // input flag.
    835 
    836 type Tcflag_t = uint64 /* termios.h:263:25 */
    837 type Cc_t = uint8      /* termios.h:264:25 */
    838 type Speed_t = uint64  /* termios.h:265:25 */
    839 
    840 type Termios = struct {
    841 	Fc_iflag     Tcflag_t
    842 	Fc_oflag     Tcflag_t
    843 	Fc_cflag     Tcflag_t
    844 	Fc_lflag     Tcflag_t
    845 	Fc_cc        [20]Cc_t
    846 	F__ccgo_pad1 [4]byte
    847 	Fc_ispeed    Speed_t
    848 	Fc_ospeed    Speed_t
    849 } /* termios.h:267:1 */
    850 
    851 // Include tty ioctl's that aren't just for backwards compatibility
    852 // with the old tty driver.  These ioctl definitions were previously
    853 // in <sys/ioctl.h>.
    854 // Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
    855 //
    856 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    857 //
    858 // This file contains Original Code and/or Modifications of Original Code
    859 // as defined in and that are subject to the Apple Public Source License
    860 // Version 2.0 (the 'License'). You may not use this file except in
    861 // compliance with the License. The rights granted to you under the License
    862 // may not be used to create, or enable the creation or redistribution of,
    863 // unlawful or unlicensed copies of an Apple operating system, or to
    864 // circumvent, violate, or enable the circumvention or violation of, any
    865 // terms of an Apple operating system software license agreement.
    866 //
    867 // Please obtain a copy of the License at
    868 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    869 //
    870 // The Original Code and all software distributed under the License are
    871 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    872 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    873 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    874 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    875 // Please see the License for the specific language governing rights and
    876 // limitations under the License.
    877 //
    878 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    879 // Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved
    880 // -
    881 // Copyright (c) 1982, 1986, 1990, 1993, 1994
    882 //	The Regents of the University of California.  All rights reserved.
    883 // (c) UNIX System Laboratories, Inc.
    884 // All or some portions of this file are derived from material licensed
    885 // to the University of California by American Telephone and Telegraph
    886 // Co. or Unix System Laboratories, Inc. and are reproduced herein with
    887 // the permission of UNIX System Laboratories, Inc.
    888 //
    889 // Redistribution and use in source and binary forms, with or without
    890 // modification, are permitted provided that the following conditions
    891 // are met:
    892 // 1. Redistributions of source code must retain the above copyright
    893 //    notice, this list of conditions and the following disclaimer.
    894 // 2. Redistributions in binary form must reproduce the above copyright
    895 //    notice, this list of conditions and the following disclaimer in the
    896 //    documentation and/or other materials provided with the distribution.
    897 // 3. All advertising materials mentioning features or use of this software
    898 //    must display the following acknowledgement:
    899 //      This product includes software developed by the University of
    900 //      California, Berkeley and its contributors.
    901 // 4. Neither the name of the University nor the names of its contributors
    902 //    may be used to endorse or promote products derived from this software
    903 //    without specific prior written permission.
    904 //
    905 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    906 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    907 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    908 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    909 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    910 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    911 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    912 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    913 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    914 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    915 // SUCH DAMAGE.
    916 //
    917 //	@(#)ttycom.h	8.1 (Berkeley) 3/28/94
    918 
    919 // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
    920 //
    921 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    922 //
    923 // This file contains Original Code and/or Modifications of Original Code
    924 // as defined in and that are subject to the Apple Public Source License
    925 // Version 2.0 (the 'License'). You may not use this file except in
    926 // compliance with the License. The rights granted to you under the License
    927 // may not be used to create, or enable the creation or redistribution of,
    928 // unlawful or unlicensed copies of an Apple operating system, or to
    929 // circumvent, violate, or enable the circumvention or violation of, any
    930 // terms of an Apple operating system software license agreement.
    931 //
    932 // Please obtain a copy of the License at
    933 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    934 //
    935 // The Original Code and all software distributed under the License are
    936 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    937 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    938 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    939 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    940 // Please see the License for the specific language governing rights and
    941 // limitations under the License.
    942 //
    943 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
    944 // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
    945 // -
    946 // Copyright (c) 1982, 1986, 1990, 1993, 1994
    947 //	The Regents of the University of California.  All rights reserved.
    948 //
    949 // Redistribution and use in source and binary forms, with or without
    950 // modification, are permitted provided that the following conditions
    951 // are met:
    952 // 1. Redistributions of source code must retain the above copyright
    953 //    notice, this list of conditions and the following disclaimer.
    954 // 2. Redistributions in binary form must reproduce the above copyright
    955 //    notice, this list of conditions and the following disclaimer in the
    956 //    documentation and/or other materials provided with the distribution.
    957 // 3. All advertising materials mentioning features or use of this software
    958 //    must display the following acknowledgement:
    959 //	This product includes software developed by the University of
    960 //	California, Berkeley and its contributors.
    961 // 4. Neither the name of the University nor the names of its contributors
    962 //    may be used to endorse or promote products derived from this software
    963 //    without specific prior written permission.
    964 //
    965 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    966 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    967 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    968 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    969 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    970 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    971 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    972 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    973 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    974 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    975 // SUCH DAMAGE.
    976 //
    977 //	@(#)ioccom.h	8.2 (Berkeley) 3/28/94
    978 
    979 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
    980 //
    981 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    982 //
    983 // This file contains Original Code and/or Modifications of Original Code
    984 // as defined in and that are subject to the Apple Public Source License
    985 // Version 2.0 (the 'License'). You may not use this file except in
    986 // compliance with the License. The rights granted to you under the License
    987 // may not be used to create, or enable the creation or redistribution of,
    988 // unlawful or unlicensed copies of an Apple operating system, or to
    989 // circumvent, violate, or enable the circumvention or violation of, any
    990 // terms of an Apple operating system software license agreement.
    991 //
    992 // Please obtain a copy of the License at
    993 // http://www.opensource.apple.com/apsl/ and read it before using this file.
    994 //
    995 // The Original Code and all software distributed under the License are
    996 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    997 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    998 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    999 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1000 // Please see the License for the specific language governing rights and
   1001 // limitations under the License.
   1002 //
   1003 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1004 
   1005 // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
   1006 //
   1007 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1008 //
   1009 // This file contains Original Code and/or Modifications of Original Code
   1010 // as defined in and that are subject to the Apple Public Source License
   1011 // Version 2.0 (the 'License'). You may not use this file except in
   1012 // compliance with the License. The rights granted to you under the License
   1013 // may not be used to create, or enable the creation or redistribution of,
   1014 // unlawful or unlicensed copies of an Apple operating system, or to
   1015 // circumvent, violate, or enable the circumvention or violation of, any
   1016 // terms of an Apple operating system software license agreement.
   1017 //
   1018 // Please obtain a copy of the License at
   1019 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1020 //
   1021 // The Original Code and all software distributed under the License are
   1022 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1023 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1024 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1025 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1026 // Please see the License for the specific language governing rights and
   1027 // limitations under the License.
   1028 //
   1029 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1030 // Copyright 1995 NeXT Computer, Inc. All rights reserved.
   1031 // Copyright (c) 1991, 1993
   1032 //	The Regents of the University of California.  All rights reserved.
   1033 //
   1034 // This code is derived from software contributed to Berkeley by
   1035 // Berkeley Software Design, Inc.
   1036 //
   1037 // Redistribution and use in source and binary forms, with or without
   1038 // modification, are permitted provided that the following conditions
   1039 // are met:
   1040 // 1. Redistributions of source code must retain the above copyright
   1041 //    notice, this list of conditions and the following disclaimer.
   1042 // 2. Redistributions in binary form must reproduce the above copyright
   1043 //    notice, this list of conditions and the following disclaimer in the
   1044 //    documentation and/or other materials provided with the distribution.
   1045 // 3. All advertising materials mentioning features or use of this software
   1046 //    must display the following acknowledgement:
   1047 //	This product includes software developed by the University of
   1048 //	California, Berkeley and its contributors.
   1049 // 4. Neither the name of the University nor the names of its contributors
   1050 //    may be used to endorse or promote products derived from this software
   1051 //    without specific prior written permission.
   1052 //
   1053 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   1054 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   1055 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   1056 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   1057 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   1058 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   1059 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   1060 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   1061 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   1062 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   1063 // SUCH DAMAGE.
   1064 //
   1065 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   1066 
   1067 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   1068 //
   1069 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1070 //
   1071 // This file contains Original Code and/or Modifications of Original Code
   1072 // as defined in and that are subject to the Apple Public Source License
   1073 // Version 2.0 (the 'License'). You may not use this file except in
   1074 // compliance with the License. The rights granted to you under the License
   1075 // may not be used to create, or enable the creation or redistribution of,
   1076 // unlawful or unlicensed copies of an Apple operating system, or to
   1077 // circumvent, violate, or enable the circumvention or violation of, any
   1078 // terms of an Apple operating system software license agreement.
   1079 //
   1080 // Please obtain a copy of the License at
   1081 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1082 //
   1083 // The Original Code and all software distributed under the License are
   1084 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1085 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1086 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1087 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1088 // Please see the License for the specific language governing rights and
   1089 // limitations under the License.
   1090 //
   1091 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1092 
   1093 // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
   1094 
   1095 // This header file contains integer types.  It's intended to also contain
   1096 // flotaing point and other arithmetic types, as needed, later.
   1097 
   1098 type X__int8_t = int8     /* _types.h:15:33 */
   1099 type X__uint8_t = uint8   /* _types.h:19:33 */
   1100 type X__int16_t = int16   /* _types.h:20:33 */
   1101 type X__uint16_t = uint16 /* _types.h:21:33 */
   1102 type X__int32_t = int32   /* _types.h:22:33 */
   1103 type X__uint32_t = uint32 /* _types.h:23:33 */
   1104 type X__int64_t = int64   /* _types.h:24:33 */
   1105 type X__uint64_t = uint64 /* _types.h:25:33 */
   1106 
   1107 type X__darwin_intptr_t = int64   /* _types.h:27:33 */
   1108 type X__darwin_natural_t = uint32 /* _types.h:28:33 */
   1109 
   1110 // The rune type below is declared to be an ``int'' instead of the more natural
   1111 // ``unsigned long'' or ``long''.  Two things are happening here.  It is not
   1112 // unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
   1113 // it looks like 10646 will be a 31 bit standard.  This means that if your
   1114 // ints cannot hold 32 bits, you will be in trouble.  The reason an int was
   1115 // chosen over a long is that the is*() and to*() routines take ints (says
   1116 // ANSI C), but they use __darwin_ct_rune_t instead of int.  By changing it
   1117 // here, you lose a bit of ANSI conformance, but your programs will still
   1118 // work.
   1119 //
   1120 // NOTE: rune_t is not covered by ANSI nor other standards, and should not
   1121 // be instantiated outside of lib/libc/locale.  Use wchar_t.  wchar_t and
   1122 // rune_t must be the same type.  Also wint_t must be no narrower than
   1123 // wchar_t, and should also be able to hold all members of the largest
   1124 // character set plus one extra value (WEOF). wint_t must be at least 16 bits.
   1125 
   1126 type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
   1127 
   1128 // mbstate_t is an opaque object to keep conversion state, during multibyte
   1129 // stream conversions.  The content must not be referenced by user programs.
   1130 type X__mbstate_t = struct {
   1131 	F__ccgo_pad1 [0]uint64
   1132 	F__mbstate8  [128]int8
   1133 } /* _types.h:57:3 */
   1134 
   1135 type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
   1136 
   1137 type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
   1138 
   1139 type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
   1140 
   1141 type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
   1142 
   1143 type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
   1144 
   1145 type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
   1146 
   1147 type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
   1148 
   1149 type X__darwin_clock_t = uint64        /* _types.h:95:33 */ // clock()
   1150 type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
   1151 type X__darwin_ssize_t = int64         /* _types.h:97:33 */ // byte count or error
   1152 type X__darwin_time_t = int64          /* _types.h:98:33 */ // time()
   1153 
   1154 // Type definitions; takes common type definitions that must be used
   1155 // in multiple header files due to [XSI], removes them from the system
   1156 // space, and puts them in the implementation space.
   1157 
   1158 type X__darwin_blkcnt_t = X__int64_t                    /* _types.h:55:25 */ // total blocks
   1159 type X__darwin_blksize_t = X__int32_t                   /* _types.h:56:25 */ // preferred block size
   1160 type X__darwin_dev_t = X__int32_t                       /* _types.h:57:25 */ // dev_t
   1161 type X__darwin_fsblkcnt_t = uint32                      /* _types.h:58:25 */ // Used by statvfs and fstatvfs
   1162 type X__darwin_fsfilcnt_t = uint32                      /* _types.h:59:25 */ // Used by statvfs and fstatvfs
   1163 type X__darwin_gid_t = X__uint32_t                      /* _types.h:60:25 */ // [???] process and group IDs
   1164 type X__darwin_id_t = X__uint32_t                       /* _types.h:61:25 */ // [XSI] pid_t, uid_t, or gid_t
   1165 type X__darwin_ino64_t = X__uint64_t                    /* _types.h:62:25 */ // [???] Used for 64 bit inodes
   1166 type X__darwin_ino_t = X__darwin_ino64_t                /* _types.h:64:26 */ // [???] Used for inodes
   1167 type X__darwin_mach_port_name_t = X__darwin_natural_t   /* _types.h:68:28 */ // Used by mach
   1168 type X__darwin_mach_port_t = X__darwin_mach_port_name_t /* _types.h:69:35 */ // Used by mach
   1169 type X__darwin_mode_t = X__uint16_t                     /* _types.h:70:25 */ // [???] Some file attributes
   1170 type X__darwin_off_t = X__int64_t                       /* _types.h:71:25 */ // [???] Used for file sizes
   1171 type X__darwin_pid_t = X__int32_t                       /* _types.h:72:25 */ // [???] process and group IDs
   1172 type X__darwin_sigset_t = X__uint32_t                   /* _types.h:73:25 */ // [???] signal set
   1173 type X__darwin_suseconds_t = X__int32_t                 /* _types.h:74:25 */ // [???] microseconds
   1174 type X__darwin_uid_t = X__uint32_t                      /* _types.h:75:25 */ // [???] user IDs
   1175 type X__darwin_useconds_t = X__uint32_t                 /* _types.h:76:25 */ // [???] microseconds
   1176 type X__darwin_uuid_t = [16]uint8                       /* _types.h:77:25 */
   1177 type X__darwin_uuid_string_t = [37]int8                 /* _types.h:78:17 */
   1178 
   1179 // Copyright (c) 2003-2013 Apple Inc. All rights reserved.
   1180 //
   1181 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1182 //
   1183 // This file contains Original Code and/or Modifications of Original Code
   1184 // as defined in and that are subject to the Apple Public Source License
   1185 // Version 2.0 (the 'License'). You may not use this file except in
   1186 // compliance with the License. The rights granted to you under the License
   1187 // may not be used to create, or enable the creation or redistribution of,
   1188 // unlawful or unlicensed copies of an Apple operating system, or to
   1189 // circumvent, violate, or enable the circumvention or violation of, any
   1190 // terms of an Apple operating system software license agreement.
   1191 //
   1192 // Please obtain a copy of the License at
   1193 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1194 //
   1195 // The Original Code and all software distributed under the License are
   1196 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1197 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1198 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1199 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1200 // Please see the License for the specific language governing rights and
   1201 // limitations under the License.
   1202 //
   1203 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1204 
   1205 // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
   1206 //
   1207 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1208 //
   1209 // This file contains Original Code and/or Modifications of Original Code
   1210 // as defined in and that are subject to the Apple Public Source License
   1211 // Version 2.0 (the 'License'). You may not use this file except in
   1212 // compliance with the License. The rights granted to you under the License
   1213 // may not be used to create, or enable the creation or redistribution of,
   1214 // unlawful or unlicensed copies of an Apple operating system, or to
   1215 // circumvent, violate, or enable the circumvention or violation of, any
   1216 // terms of an Apple operating system software license agreement.
   1217 //
   1218 // Please obtain a copy of the License at
   1219 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1220 //
   1221 // The Original Code and all software distributed under the License are
   1222 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1223 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1224 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1225 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1226 // Please see the License for the specific language governing rights and
   1227 // limitations under the License.
   1228 //
   1229 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1230 // Copyright 1995 NeXT Computer, Inc. All rights reserved.
   1231 // Copyright (c) 1991, 1993
   1232 //	The Regents of the University of California.  All rights reserved.
   1233 //
   1234 // This code is derived from software contributed to Berkeley by
   1235 // Berkeley Software Design, Inc.
   1236 //
   1237 // Redistribution and use in source and binary forms, with or without
   1238 // modification, are permitted provided that the following conditions
   1239 // are met:
   1240 // 1. Redistributions of source code must retain the above copyright
   1241 //    notice, this list of conditions and the following disclaimer.
   1242 // 2. Redistributions in binary form must reproduce the above copyright
   1243 //    notice, this list of conditions and the following disclaimer in the
   1244 //    documentation and/or other materials provided with the distribution.
   1245 // 3. All advertising materials mentioning features or use of this software
   1246 //    must display the following acknowledgement:
   1247 //	This product includes software developed by the University of
   1248 //	California, Berkeley and its contributors.
   1249 // 4. Neither the name of the University nor the names of its contributors
   1250 //    may be used to endorse or promote products derived from this software
   1251 //    without specific prior written permission.
   1252 //
   1253 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   1254 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   1255 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   1256 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   1257 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   1258 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   1259 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   1260 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   1261 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   1262 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   1263 // SUCH DAMAGE.
   1264 //
   1265 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
   1266 
   1267 // pthread opaque structures
   1268 
   1269 type X__darwin_pthread_handler_rec = struct {
   1270 	F__routine uintptr
   1271 	F__arg     uintptr
   1272 	F__next    uintptr
   1273 } /* _pthread_types.h:57:1 */
   1274 
   1275 type X_opaque_pthread_attr_t = struct {
   1276 	F__sig    int64
   1277 	F__opaque [56]int8
   1278 } /* _pthread_types.h:63:1 */
   1279 
   1280 type X_opaque_pthread_cond_t = struct {
   1281 	F__sig    int64
   1282 	F__opaque [40]int8
   1283 } /* _pthread_types.h:68:1 */
   1284 
   1285 type X_opaque_pthread_condattr_t = struct {
   1286 	F__sig    int64
   1287 	F__opaque [8]int8
   1288 } /* _pthread_types.h:73:1 */
   1289 
   1290 type X_opaque_pthread_mutex_t = struct {
   1291 	F__sig    int64
   1292 	F__opaque [56]int8
   1293 } /* _pthread_types.h:78:1 */
   1294 
   1295 type X_opaque_pthread_mutexattr_t = struct {
   1296 	F__sig    int64
   1297 	F__opaque [8]int8
   1298 } /* _pthread_types.h:83:1 */
   1299 
   1300 type X_opaque_pthread_once_t = struct {
   1301 	F__sig    int64
   1302 	F__opaque [8]int8
   1303 } /* _pthread_types.h:88:1 */
   1304 
   1305 type X_opaque_pthread_rwlock_t = struct {
   1306 	F__sig    int64
   1307 	F__opaque [192]int8
   1308 } /* _pthread_types.h:93:1 */
   1309 
   1310 type X_opaque_pthread_rwlockattr_t = struct {
   1311 	F__sig    int64
   1312 	F__opaque [16]int8
   1313 } /* _pthread_types.h:98:1 */
   1314 
   1315 type X_opaque_pthread_t = struct {
   1316 	F__sig           int64
   1317 	F__cleanup_stack uintptr
   1318 	F__opaque        [8176]int8
   1319 } /* _pthread_types.h:103:1 */
   1320 
   1321 type X__darwin_pthread_attr_t = X_opaque_pthread_attr_t             /* _pthread_types.h:109:39 */
   1322 type X__darwin_pthread_cond_t = X_opaque_pthread_cond_t             /* _pthread_types.h:110:39 */
   1323 type X__darwin_pthread_condattr_t = X_opaque_pthread_condattr_t     /* _pthread_types.h:111:43 */
   1324 type X__darwin_pthread_key_t = uint64                               /* _pthread_types.h:112:23 */
   1325 type X__darwin_pthread_mutex_t = X_opaque_pthread_mutex_t           /* _pthread_types.h:113:40 */
   1326 type X__darwin_pthread_mutexattr_t = X_opaque_pthread_mutexattr_t   /* _pthread_types.h:114:44 */
   1327 type X__darwin_pthread_once_t = X_opaque_pthread_once_t             /* _pthread_types.h:115:39 */
   1328 type X__darwin_pthread_rwlock_t = X_opaque_pthread_rwlock_t         /* _pthread_types.h:116:41 */
   1329 type X__darwin_pthread_rwlockattr_t = X_opaque_pthread_rwlockattr_t /* _pthread_types.h:117:45 */
   1330 type X__darwin_pthread_t = uintptr                                  /* _pthread_types.h:118:34 */
   1331 
   1332 // Ioctl's have the command encoded in the lower word, and the size of
   1333 // any in or out parameters in the upper word.  The high 3 bits of the
   1334 // upper word are used to encode the in/out status of the parameter.
   1335 
   1336 // no parameters
   1337 // copy parameters out
   1338 // copy parameters in
   1339 // copy parameters in and out
   1340 // mask for IN/OUT/VOID
   1341 
   1342 // this should be _IORW, but stdio got there first
   1343 
   1344 // Tty ioctl's except for those supported only for backwards compatibility
   1345 // with the old tty driver.
   1346 
   1347 // Window/terminal size structure.  This information is stored by the kernel
   1348 // in order to provide a consistent interface, but is not used by the kernel.
   1349 type Winsize = struct {
   1350 	Fws_row    uint16
   1351 	Fws_col    uint16
   1352 	Fws_xpixel uint16
   1353 	Fws_ypixel uint16
   1354 } /* ttycom.h:82:1 */
   1355 
   1356 // 8-10 compat
   1357 // 15 unused
   1358 // 17-18 compat
   1359 // 127-124 compat
   1360 // 117-116 compat
   1361 // 105 unused
   1362 
   1363 // END OF PROTECTED INCLUDE.
   1364 
   1365 // Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
   1366 //
   1367 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1368 //
   1369 // This file contains Original Code and/or Modifications of Original Code
   1370 // as defined in and that are subject to the Apple Public Source License
   1371 // Version 2.0 (the 'License'). You may not use this file except in
   1372 // compliance with the License. The rights granted to you under the License
   1373 // may not be used to create, or enable the creation or redistribution of,
   1374 // unlawful or unlicensed copies of an Apple operating system, or to
   1375 // circumvent, violate, or enable the circumvention or violation of, any
   1376 // terms of an Apple operating system software license agreement.
   1377 //
   1378 // Please obtain a copy of the License at
   1379 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1380 //
   1381 // The Original Code and all software distributed under the License are
   1382 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1383 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1384 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1385 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1386 // Please see the License for the specific language governing rights and
   1387 // limitations under the License.
   1388 //
   1389 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1390 // Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved
   1391 // -
   1392 // Copyright (c) 1982, 1986, 1993
   1393 //	The Regents of the University of California.  All rights reserved.
   1394 // (c) UNIX System Laboratories, Inc.
   1395 // All or some portions of this file are derived from material licensed
   1396 // to the University of California by American Telephone and Telegraph
   1397 // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   1398 // the permission of UNIX System Laboratories, Inc.
   1399 //
   1400 // Redistribution and use in source and binary forms, with or without
   1401 // modification, are permitted provided that the following conditions
   1402 // are met:
   1403 // 1. Redistributions of source code must retain the above copyright
   1404 //    notice, this list of conditions and the following disclaimer.
   1405 // 2. Redistributions in binary form must reproduce the above copyright
   1406 //    notice, this list of conditions and the following disclaimer in the
   1407 //    documentation and/or other materials provided with the distribution.
   1408 // 3. All advertising materials mentioning features or use of this software
   1409 //    must display the following acknowledgement:
   1410 //      This product includes software developed by the University of
   1411 //      California, Berkeley and its contributors.
   1412 // 4. Neither the name of the University nor the names of its contributors
   1413 //    may be used to endorse or promote products derived from this software
   1414 //    without specific prior written permission.
   1415 //
   1416 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   1417 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   1418 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   1419 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   1420 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   1421 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   1422 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   1423 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   1424 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   1425 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   1426 // SUCH DAMAGE.
   1427 //
   1428 //	@(#)ttydefaults.h	8.4 (Berkeley) 1/21/94
   1429 
   1430 // System wide defaults for terminal state.
   1431 
   1432 // Defaults on "first" open.
   1433 
   1434 // Control Character Defaults
   1435 // compat
   1436 
   1437 // PROTECTED INCLUSION ENDS HERE
   1438 
   1439 // #define TTYDEFCHARS to include an array of default control characters.
   1440 // Copyright (c) 2004, 2008, 2009 Apple Inc. All rights reserved.
   1441 //
   1442 // @APPLE_LICENSE_HEADER_START@
   1443 //
   1444 // This file contains Original Code and/or Modifications of Original Code
   1445 // as defined in and that are subject to the Apple Public Source License
   1446 // Version 2.0 (the 'License'). You may not use this file except in
   1447 // compliance with the License. Please obtain a copy of the License at
   1448 // http://www.opensource.apple.com/apsl/ and read it before using this
   1449 // file.
   1450 //
   1451 // The Original Code and all software distributed under the License are
   1452 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1453 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1454 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1455 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1456 // Please see the License for the specific language governing rights and
   1457 // limitations under the License.
   1458 //
   1459 // @APPLE_LICENSE_HEADER_END@
   1460 
   1461 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   1462 //
   1463 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1464 //
   1465 // This file contains Original Code and/or Modifications of Original Code
   1466 // as defined in and that are subject to the Apple Public Source License
   1467 // Version 2.0 (the 'License'). You may not use this file except in
   1468 // compliance with the License. The rights granted to you under the License
   1469 // may not be used to create, or enable the creation or redistribution of,
   1470 // unlawful or unlicensed copies of an Apple operating system, or to
   1471 // circumvent, violate, or enable the circumvention or violation of, any
   1472 // terms of an Apple operating system software license agreement.
   1473 //
   1474 // Please obtain a copy of the License at
   1475 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1476 //
   1477 // The Original Code and all software distributed under the License are
   1478 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1479 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1480 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1481 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1482 // Please see the License for the specific language governing rights and
   1483 // limitations under the License.
   1484 //
   1485 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1486 
   1487 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   1488 //
   1489 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1490 //
   1491 // This file contains Original Code and/or Modifications of Original Code
   1492 // as defined in and that are subject to the Apple Public Source License
   1493 // Version 2.0 (the 'License'). You may not use this file except in
   1494 // compliance with the License. The rights granted to you under the License
   1495 // may not be used to create, or enable the creation or redistribution of,
   1496 // unlawful or unlicensed copies of an Apple operating system, or to
   1497 // circumvent, violate, or enable the circumvention or violation of, any
   1498 // terms of an Apple operating system software license agreement.
   1499 //
   1500 // Please obtain a copy of the License at
   1501 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1502 //
   1503 // The Original Code and all software distributed under the License are
   1504 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1505 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1506 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1507 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1508 // Please see the License for the specific language governing rights and
   1509 // limitations under the License.
   1510 //
   1511 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1512 
   1513 type X__darwin_nl_item = int32        /* _types.h:40:14 */
   1514 type X__darwin_wctrans_t = int32      /* _types.h:41:14 */
   1515 type X__darwin_wctype_t = X__uint32_t /* _types.h:43:20 */
   1516 
   1517 // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
   1518 //
   1519 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1520 //
   1521 // This file contains Original Code and/or Modifications of Original Code
   1522 // as defined in and that are subject to the Apple Public Source License
   1523 // Version 2.0 (the 'License'). You may not use this file except in
   1524 // compliance with the License. The rights granted to you under the License
   1525 // may not be used to create, or enable the creation or redistribution of,
   1526 // unlawful or unlicensed copies of an Apple operating system, or to
   1527 // circumvent, violate, or enable the circumvention or violation of, any
   1528 // terms of an Apple operating system software license agreement.
   1529 //
   1530 // Please obtain a copy of the License at
   1531 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1532 //
   1533 // The Original Code and all software distributed under the License are
   1534 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1535 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1536 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1537 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1538 // Please see the License for the specific language governing rights and
   1539 // limitations under the License.
   1540 //
   1541 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1542 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
   1543 //
   1544 // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
   1545 //
   1546 // This file contains Original Code and/or Modifications of Original Code
   1547 // as defined in and that are subject to the Apple Public Source License
   1548 // Version 2.0 (the 'License'). You may not use this file except in
   1549 // compliance with the License. The rights granted to you under the License
   1550 // may not be used to create, or enable the creation or redistribution of,
   1551 // unlawful or unlicensed copies of an Apple operating system, or to
   1552 // circumvent, violate, or enable the circumvention or violation of, any
   1553 // terms of an Apple operating system software license agreement.
   1554 //
   1555 // Please obtain a copy of the License at
   1556 // http://www.opensource.apple.com/apsl/ and read it before using this file.
   1557 //
   1558 // The Original Code and all software distributed under the License are
   1559 // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   1560 // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   1561 // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   1562 // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   1563 // Please see the License for the specific language governing rights and
   1564 // limitations under the License.
   1565 //
   1566 // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   1567 
   1568 type Pid_t = X__darwin_pid_t /* _pid_t.h:31:31 */
   1569 
   1570 var _ int8 /* gen.c:2:13: */