termios_darwin_amd64.go 79 KB

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