fcntl_openbsd_arm64.go (38592B)
1 // Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT. 2 3 package fcntl 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 AT_EACCESS = 0x01 // fcntl.h:200:1: 19 AT_FDCWD = -100 // fcntl.h:198:1: 20 AT_REMOVEDIR = 0x08 // fcntl.h:203:1: 21 AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1: 22 AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1: 23 BIG_ENDIAN = 4321 // endian.h:45:1: 24 BYTE_ORDER = 1234 // endian.h:47:1: 25 FAPPEND = 8 // fcntl.h:130:1: 26 FASYNC = 64 // fcntl.h:131:1: 27 FD_CLOEXEC = 1 // fcntl.h:163:1: 28 FFSYNC = 128 // fcntl.h:132:1: 29 FNDELAY = 4 // fcntl.h:134:1: 30 FNONBLOCK = 4 // fcntl.h:133:1: 31 FREAD = 0x0001 // fcntl.h:76:1: 32 FWRITE = 0x0002 // fcntl.h:77:1: 33 F_DUPFD = 0 // fcntl.h:143:1: 34 F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1: 35 F_GETFD = 1 // fcntl.h:144:1: 36 F_GETFL = 3 // fcntl.h:146:1: 37 F_GETLK = 7 // fcntl.h:152:1: 38 F_GETOWN = 5 // fcntl.h:149:1: 39 F_ISATTY = 11 // fcntl.h:159:1: 40 F_RDLCK = 1 // fcntl.h:166:1: 41 F_SETFD = 2 // fcntl.h:145:1: 42 F_SETFL = 4 // fcntl.h:147:1: 43 F_SETLK = 8 // fcntl.h:153:1: 44 F_SETLKW = 9 // fcntl.h:154:1: 45 F_SETOWN = 6 // fcntl.h:150:1: 46 F_UNLCK = 2 // fcntl.h:167:1: 47 F_WRLCK = 3 // fcntl.h:168:1: 48 LITTLE_ENDIAN = 1234 // endian.h:44:1: 49 LOCK_EX = 0x02 // fcntl.h:192:1: 50 LOCK_NB = 0x04 // fcntl.h:193:1: 51 LOCK_SH = 0x01 // fcntl.h:191:1: 52 LOCK_UN = 0x08 // fcntl.h:194:1: 53 O_ACCMODE = 0x0003 // fcntl.h:65:1: 54 O_APPEND = 0x0008 // fcntl.h:80:1: 55 O_ASYNC = 0x0040 // fcntl.h:84:1: 56 O_CLOEXEC = 0x10000 // fcntl.h:107:1: 57 O_CREAT = 0x0200 // fcntl.h:91:1: 58 O_DIRECTORY = 0x20000 // fcntl.h:108:1: 59 O_DSYNC = 128 // fcntl.h:100:1: 60 O_EXCL = 0x0800 // fcntl.h:93:1: 61 O_EXLOCK = 0x0020 // fcntl.h:83:1: 62 O_FSYNC = 0x0080 // fcntl.h:85:1: 63 O_NDELAY = 4 // fcntl.h:135:1: 64 O_NOCTTY = 0x8000 // fcntl.h:104:1: 65 O_NOFOLLOW = 0x0100 // fcntl.h:86:1: 66 O_NONBLOCK = 0x0004 // fcntl.h:79:1: 67 O_RDONLY = 0x0000 // fcntl.h:62:1: 68 O_RDWR = 0x0002 // fcntl.h:64:1: 69 O_RSYNC = 128 // fcntl.h:101:1: 70 O_SHLOCK = 0x0010 // fcntl.h:82:1: 71 O_SYNC = 0x0080 // fcntl.h:89:1: 72 O_TRUNC = 0x0400 // fcntl.h:92:1: 73 O_WRONLY = 0x0001 // fcntl.h:63:1: 74 PDP_ENDIAN = 3412 // endian.h:46:1: 75 X_BIG_ENDIAN = 4321 // _endian.h:43:1: 76 X_BYTE_ORDER = 1234 // endian.h:60:1: 77 X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: 78 X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: 79 X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: 80 X_INT16_T_DEFINED_ = 0 // types.h:84:1: 81 X_INT32_T_DEFINED_ = 0 // types.h:94:1: 82 X_INT64_T_DEFINED_ = 0 // types.h:104:1: 83 X_INT8_T_DEFINED_ = 0 // types.h:74:1: 84 X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: 85 X_LP64 = 1 // <predefined>:1:1: 86 X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: 87 X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: 88 X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: 89 X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: 90 X_OFF_T_DEFINED_ = 0 // types.h:192:1: 91 X_PDP_ENDIAN = 3412 // _endian.h:44:1: 92 X_PID_T_DEFINED_ = 0 // types.h:167:1: 93 X_QUAD_HIGHWORD = 1 // _endian.h:95:1: 94 X_QUAD_LOWWORD = 0 // _endian.h:96:1: 95 X_RET_PROTECTOR = 1 // <predefined>:2:1: 96 X_SIZE_T_DEFINED_ = 0 // types.h:172:1: 97 X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: 98 X_STACKALIGNBYTES = 15 // _types.h:54:1: 99 X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: 100 X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: 101 X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: 102 X_SYS_TYPES_H_ = 0 // types.h:41:1: 103 X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: 104 X_SYS__TYPES_H_ = 0 // _types.h:35:1: 105 X_TIMER_T_DEFINED_ = 0 // types.h:187:1: 106 X_TIME_T_DEFINED_ = 0 // types.h:182:1: 107 X_UINT16_T_DEFINED_ = 0 // types.h:89:1: 108 X_UINT32_T_DEFINED_ = 0 // types.h:99:1: 109 X_UINT64_T_DEFINED_ = 0 // types.h:109:1: 110 X_UINT8_T_DEFINED_ = 0 // types.h:79:1: 111 Unix = 1 // <predefined>:360:1: 112 ) 113 114 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 115 116 type Size_t = uint64 /* <builtin>:9:23 */ 117 118 type Wchar_t = int32 /* <builtin>:15:24 */ 119 120 type X__int128_t = struct { 121 Flo int64 122 Fhi int64 123 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 124 type X__uint128_t = struct { 125 Flo uint64 126 Fhi uint64 127 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 128 129 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 130 type X__float128 = float64 /* <builtin>:47:21 */ 131 132 // $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $ 133 // $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ 134 135 // - 136 // Copyright (c) 1983, 1990, 1993 137 // The Regents of the University of California. All rights reserved. 138 // (c) UNIX System Laboratories, Inc. 139 // All or some portions of this file are derived from material licensed 140 // to the University of California by American Telephone and Telegraph 141 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 142 // the permission of UNIX System Laboratories, Inc. 143 // 144 // Redistribution and use in source and binary forms, with or without 145 // modification, are permitted provided that the following conditions 146 // are met: 147 // 1. Redistributions of source code must retain the above copyright 148 // notice, this list of conditions and the following disclaimer. 149 // 2. Redistributions in binary form must reproduce the above copyright 150 // notice, this list of conditions and the following disclaimer in the 151 // documentation and/or other materials provided with the distribution. 152 // 3. Neither the name of the University nor the names of its contributors 153 // may be used to endorse or promote products derived from this software 154 // without specific prior written permission. 155 // 156 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 157 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 158 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 159 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 160 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 161 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 162 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 163 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 164 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 165 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 166 // SUCH DAMAGE. 167 // 168 // @(#)fcntl.h 8.3 (Berkeley) 1/21/94 169 170 // This file includes the definitions for open and fcntl 171 // described by POSIX for <fcntl.h>; it also includes 172 // related kernel definitions. 173 174 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 175 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 176 177 // Copyright (c) 1991, 1993 178 // The Regents of the University of California. All rights reserved. 179 // 180 // This code is derived from software contributed to Berkeley by 181 // Berkeley Software Design, Inc. 182 // 183 // Redistribution and use in source and binary forms, with or without 184 // modification, are permitted provided that the following conditions 185 // are met: 186 // 1. Redistributions of source code must retain the above copyright 187 // notice, this list of conditions and the following disclaimer. 188 // 2. Redistributions in binary form must reproduce the above copyright 189 // notice, this list of conditions and the following disclaimer in the 190 // documentation and/or other materials provided with the distribution. 191 // 3. Neither the name of the University nor the names of its contributors 192 // may be used to endorse or promote products derived from this software 193 // without specific prior written permission. 194 // 195 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 196 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 197 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 198 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 199 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 200 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 202 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 203 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 204 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 205 // SUCH DAMAGE. 206 // 207 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 208 209 // $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ 210 211 // Macro to test if we're using a specific version of gcc or later. 212 213 // The __CONCAT macro is used to concatenate parts of symbol names, e.g. 214 // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. 215 // The __CONCAT macro is a bit tricky -- make sure you don't put spaces 216 // in between its arguments. Do not use __CONCAT on double-quoted strings, 217 // such as those from the __STRING macro: to concatenate strings just put 218 // them next to each other. 219 220 // GCC1 and some versions of GCC2 declare dead (non-returning) and 221 // pure (no side effects) functions using "volatile" and "const"; 222 // unfortunately, these then cause warnings under "-ansi -pedantic". 223 // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these 224 // work for GNU C++ (modulo a slight glitch in the C++ grammar in 225 // the distribution version of 2.5.5). 226 227 // __returns_twice makes the compiler not assume the function 228 // only returns once. This affects registerisation of variables: 229 // even local variables need to be in memory across such a call. 230 // Example: setjmp() 231 232 // __only_inline makes the compiler only use this function definition 233 // for inlining; references that can't be inlined will be left as 234 // external references instead of generating a local copy. The 235 // matching library should include a simple extern definition for 236 // the function to handle those references. c.f. ctype.h 237 238 // GNU C version 2.96 adds explicit branch prediction so that 239 // the CPU back-end can hint the processor and also so that 240 // code blocks can be reordered such that the predicted path 241 // sees a more linear flow, thus improving cache behavior, etc. 242 // 243 // The following two macros provide us with a way to utilize this 244 // compiler feature. Use __predict_true() if you expect the expression 245 // to evaluate to true, and __predict_false() if you expect the 246 // expression to evaluate to false. 247 // 248 // A few notes about usage: 249 // 250 // * Generally, __predict_false() error condition checks (unless 251 // you have some _strong_ reason to do otherwise, in which case 252 // document it), and/or __predict_true() `no-error' condition 253 // checks, assuming you want to optimize for the no-error case. 254 // 255 // * Other than that, if you don't know the likelihood of a test 256 // succeeding from empirical or other `hard' evidence, don't 257 // make predictions. 258 // 259 // * These are meant to be used in places that are run `a lot'. 260 // It is wasteful to make predictions in code that is run 261 // seldomly (e.g. at subsystem initialization time) as the 262 // basic block reordering that this affects can often generate 263 // larger code. 264 265 // Delete pseudo-keywords wherever they are not available or needed. 266 267 // The __packed macro indicates that a variable or structure members 268 // should have the smallest possible alignment, despite any host CPU 269 // alignment requirements. 270 // 271 // The __aligned(x) macro specifies the minimum alignment of a 272 // variable or structure. 273 // 274 // These macros together are useful for describing the layout and 275 // alignment of messages exchanged with hardware or other systems. 276 277 // "The nice thing about standards is that there are so many to choose from." 278 // There are a number of "feature test macros" specified by (different) 279 // standards that determine which interfaces and types the header files 280 // should expose. 281 // 282 // Because of inconsistencies in these macros, we define our own 283 // set in the private name space that end in _VISIBLE. These are 284 // always defined and so headers can test their values easily. 285 // Things can get tricky when multiple feature macros are defined. 286 // We try to take the union of all the features requested. 287 // 288 // The following macros are guaranteed to have a value after cdefs.h 289 // has been included: 290 // __POSIX_VISIBLE 291 // __XPG_VISIBLE 292 // __ISO_C_VISIBLE 293 // __BSD_VISIBLE 294 295 // X/Open Portability Guides and Single Unix Specifications. 296 // _XOPEN_SOURCE XPG3 297 // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 298 // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 299 // _XOPEN_SOURCE == 500 XPG5 300 // _XOPEN_SOURCE == 520 XPG5v2 301 // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI 302 // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI 303 // 304 // The XPG spec implies a specific value for _POSIX_C_SOURCE. 305 306 // POSIX macros, these checks must follow the XOPEN ones above. 307 // 308 // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) 309 // _POSIX_C_SOURCE == 1 1003.1-1990 310 // _POSIX_C_SOURCE == 2 1003.2-1992 311 // _POSIX_C_SOURCE == 199309L 1003.1b-1993 312 // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, 313 // and the omnibus ISO/IEC 9945-1:1996 314 // _POSIX_C_SOURCE == 200112L 1003.1-2001 315 // _POSIX_C_SOURCE == 200809L 1003.1-2008 316 // 317 // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though 318 // this may be overridden by the _ISOC99_SOURCE macro later. 319 320 // _ANSI_SOURCE means to expose ANSI C89 interfaces only. 321 // If the user defines it in addition to one of the POSIX or XOPEN 322 // macros, assume the POSIX/XOPEN macro(s) should take precedence. 323 324 // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus 325 // override any of the other macros since they are non-exclusive. 326 327 // Finally deal with BSD-specific interfaces that are not covered 328 // by any standards. We expose these when none of the POSIX or XPG 329 // macros is defined or if the user explicitly asks for them. 330 331 // Default values. 332 333 // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ 334 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 335 336 // - 337 // Copyright (c) 1982, 1986, 1991, 1993 338 // The Regents of the University of California. All rights reserved. 339 // (c) UNIX System Laboratories, Inc. 340 // All or some portions of this file are derived from material licensed 341 // to the University of California by American Telephone and Telegraph 342 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 343 // the permission of UNIX System Laboratories, Inc. 344 // 345 // Redistribution and use in source and binary forms, with or without 346 // modification, are permitted provided that the following conditions 347 // are met: 348 // 1. Redistributions of source code must retain the above copyright 349 // notice, this list of conditions and the following disclaimer. 350 // 2. Redistributions in binary form must reproduce the above copyright 351 // notice, this list of conditions and the following disclaimer in the 352 // documentation and/or other materials provided with the distribution. 353 // 3. Neither the name of the University nor the names of its contributors 354 // may be used to endorse or promote products derived from this software 355 // without specific prior written permission. 356 // 357 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 358 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 359 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 360 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 361 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 362 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 363 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 364 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 365 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 366 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 367 // SUCH DAMAGE. 368 // 369 // @(#)types.h 8.4 (Berkeley) 1/21/94 370 371 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 372 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 373 374 // Copyright (c) 1991, 1993 375 // The Regents of the University of California. All rights reserved. 376 // 377 // This code is derived from software contributed to Berkeley by 378 // Berkeley Software Design, Inc. 379 // 380 // Redistribution and use in source and binary forms, with or without 381 // modification, are permitted provided that the following conditions 382 // are met: 383 // 1. Redistributions of source code must retain the above copyright 384 // notice, this list of conditions and the following disclaimer. 385 // 2. Redistributions in binary form must reproduce the above copyright 386 // notice, this list of conditions and the following disclaimer in the 387 // documentation and/or other materials provided with the distribution. 388 // 3. Neither the name of the University nor the names of its contributors 389 // may be used to endorse or promote products derived from this software 390 // without specific prior written permission. 391 // 392 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 393 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 394 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 395 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 396 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 397 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 398 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 399 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 400 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 401 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 402 // SUCH DAMAGE. 403 // 404 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 405 406 // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ 407 408 // - 409 // Copyright (c) 1997 Niklas Hallqvist. All rights reserved. 410 // 411 // Redistribution and use in source and binary forms, with or without 412 // modification, are permitted provided that the following conditions 413 // are met: 414 // 1. Redistributions of source code must retain the above copyright 415 // notice, this list of conditions and the following disclaimer. 416 // 2. Redistributions in binary form must reproduce the above copyright 417 // notice, this list of conditions and the following disclaimer in the 418 // documentation and/or other materials provided with the distribution. 419 // 420 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 421 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 422 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 423 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 424 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 425 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 426 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 427 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 428 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 429 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 430 431 // Public definitions for little- and big-endian systems. 432 // This file should be included as <endian.h> in userspace and as 433 // <sys/endian.h> in the kernel. 434 // 435 // System headers that need endian information but that can't or don't 436 // want to export the public names here should include <sys/_endian.h> 437 // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. 438 439 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 440 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 441 442 // Copyright (c) 1991, 1993 443 // The Regents of the University of California. All rights reserved. 444 // 445 // This code is derived from software contributed to Berkeley by 446 // Berkeley Software Design, Inc. 447 // 448 // Redistribution and use in source and binary forms, with or without 449 // modification, are permitted provided that the following conditions 450 // are met: 451 // 1. Redistributions of source code must retain the above copyright 452 // notice, this list of conditions and the following disclaimer. 453 // 2. Redistributions in binary form must reproduce the above copyright 454 // notice, this list of conditions and the following disclaimer in the 455 // documentation and/or other materials provided with the distribution. 456 // 3. Neither the name of the University nor the names of its contributors 457 // may be used to endorse or promote products derived from this software 458 // without specific prior written permission. 459 // 460 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 461 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 462 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 463 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 464 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 465 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 466 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 467 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 468 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 469 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 470 // SUCH DAMAGE. 471 // 472 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 473 474 // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ 475 476 // - 477 // Copyright (c) 1997 Niklas Hallqvist. All rights reserved. 478 // 479 // Redistribution and use in source and binary forms, with or without 480 // modification, are permitted provided that the following conditions 481 // are met: 482 // 1. Redistributions of source code must retain the above copyright 483 // notice, this list of conditions and the following disclaimer. 484 // 2. Redistributions in binary form must reproduce the above copyright 485 // notice, this list of conditions and the following disclaimer in the 486 // documentation and/or other materials provided with the distribution. 487 // 488 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 489 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 490 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 491 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 492 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 493 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 494 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 495 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 496 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 497 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 498 499 // Internal endianness macros. This pulls in <machine/endian.h> to 500 // get the correct setting direction for the platform and sets internal 501 // ('__' prefix) macros appropriately. 502 503 // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ 504 505 // - 506 // Copyright (c) 1990, 1993 507 // The Regents of the University of California. All rights reserved. 508 // 509 // Redistribution and use in source and binary forms, with or without 510 // modification, are permitted provided that the following conditions 511 // are met: 512 // 1. Redistributions of source code must retain the above copyright 513 // notice, this list of conditions and the following disclaimer. 514 // 2. Redistributions in binary form must reproduce the above copyright 515 // notice, this list of conditions and the following disclaimer in the 516 // documentation and/or other materials provided with the distribution. 517 // 3. Neither the name of the University nor the names of its contributors 518 // may be used to endorse or promote products derived from this software 519 // without specific prior written permission. 520 // 521 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 522 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 523 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 524 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 525 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 526 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 527 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 528 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 529 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 530 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 531 // SUCH DAMAGE. 532 // 533 // @(#)types.h 8.3 (Berkeley) 1/5/94 534 535 // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ 536 // - 537 // Copyright (c) 1990, 1993 538 // The Regents of the University of California. All rights reserved. 539 // 540 // Redistribution and use in source and binary forms, with or without 541 // modification, are permitted provided that the following conditions 542 // are met: 543 // 1. Redistributions of source code must retain the above copyright 544 // notice, this list of conditions and the following disclaimer. 545 // 2. Redistributions in binary form must reproduce the above copyright 546 // notice, this list of conditions and the following disclaimer in the 547 // documentation and/or other materials provided with the distribution. 548 // 3. Neither the name of the University nor the names of its contributors 549 // may be used to endorse or promote products derived from this software 550 // without specific prior written permission. 551 // 552 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 553 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 554 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 555 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 556 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 557 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 558 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 559 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 560 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 561 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 562 // SUCH DAMAGE. 563 // 564 // @(#)types.h 8.3 (Berkeley) 1/5/94 565 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 566 567 // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned 568 // value for all data types (int, long, ...). The result is an 569 // unsigned long and must be cast to any desired pointer type. 570 // 571 // _ALIGNED_POINTER is a boolean macro that checks whether an address 572 // is valid to fetch data elements of type t from on this architecture. 573 // This does not reflect the optimal alignment, just the possibility 574 // (within reasonable limits). 575 576 // 7.18.1.1 Exact-width integer types 577 type X__int8_t = int8 /* _types.h:60:22 */ 578 type X__uint8_t = uint8 /* _types.h:61:24 */ 579 type X__int16_t = int16 /* _types.h:62:17 */ 580 type X__uint16_t = uint16 /* _types.h:63:25 */ 581 type X__int32_t = int32 /* _types.h:64:15 */ 582 type X__uint32_t = uint32 /* _types.h:65:23 */ 583 // LONGLONG 584 type X__int64_t = int64 /* _types.h:67:20 */ 585 // LONGLONG 586 type X__uint64_t = uint64 /* _types.h:69:28 */ 587 588 // 7.18.1.2 Minimum-width integer types 589 type X__int_least8_t = X__int8_t /* _types.h:72:19 */ 590 type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ 591 type X__int_least16_t = X__int16_t /* _types.h:74:20 */ 592 type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ 593 type X__int_least32_t = X__int32_t /* _types.h:76:20 */ 594 type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ 595 type X__int_least64_t = X__int64_t /* _types.h:78:20 */ 596 type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ 597 598 // 7.18.1.3 Fastest minimum-width integer types 599 type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ 600 type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ 601 type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ 602 type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ 603 type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ 604 type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ 605 type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ 606 type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ 607 608 // 7.18.1.4 Integer types capable of holding object pointers 609 type X__intptr_t = int64 /* _types.h:104:16 */ 610 type X__uintptr_t = uint64 /* _types.h:105:24 */ 611 612 // 7.18.1.5 Greatest-width integer types 613 type X__intmax_t = X__int64_t /* _types.h:108:20 */ 614 type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ 615 616 // Register size 617 type X__register_t = int64 /* _types.h:112:16 */ 618 619 // VM system types 620 type X__vaddr_t = uint64 /* _types.h:115:24 */ 621 type X__paddr_t = uint64 /* _types.h:116:24 */ 622 type X__vsize_t = uint64 /* _types.h:117:24 */ 623 type X__psize_t = uint64 /* _types.h:118:24 */ 624 625 // Standard system types 626 type X__double_t = float64 /* _types.h:121:18 */ 627 type X__float_t = float32 /* _types.h:122:17 */ 628 type X__ptrdiff_t = int64 /* _types.h:123:16 */ 629 type X__size_t = uint64 /* _types.h:124:24 */ 630 type X__ssize_t = int64 /* _types.h:125:16 */ 631 type X__va_list = X__builtin_va_list /* _types.h:127:27 */ 632 633 // Wide character support types 634 type X__wchar_t = int32 /* _types.h:137:15 */ 635 type X__wint_t = int32 /* _types.h:140:15 */ 636 type X__rune_t = int32 /* _types.h:141:15 */ 637 type X__wctrans_t = uintptr /* _types.h:142:14 */ 638 type X__wctype_t = uintptr /* _types.h:143:14 */ 639 640 type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file 641 type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O 642 type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC 643 type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers 644 type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id 645 type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number 646 type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number 647 type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count 648 type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count 649 type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id 650 type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid 651 type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address 652 type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type 653 type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number 654 type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) 655 type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions 656 type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count 657 type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size 658 type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id 659 type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit 660 type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type 661 type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size 662 type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls 663 type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) 664 type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time 665 type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers 666 type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id 667 type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds 668 669 // mbstate_t is an opaque object to keep conversion state, during multibyte 670 // stream conversions. The content must not be referenced by user programs. 671 type X__mbstate_t = struct { 672 F__ccgo_pad1 [0]uint64 673 F__mbstate8 [128]int8 674 } /* _types.h:75:3 */ 675 676 // Tell sys/endian.h we have MD variants of the swap macros. 677 678 // Note that these macros evaluate their arguments several times. 679 680 // Public names 681 682 // These are specified to be function-like macros to match the spec 683 684 // POSIX names 685 686 // original BSD names 687 688 // these were exposed here before 689 690 // ancient stuff 691 692 type U_char = uint8 /* types.h:51:23 */ 693 type U_short = uint16 /* types.h:52:24 */ 694 type U_int = uint32 /* types.h:53:22 */ 695 type U_long = uint64 /* types.h:54:23 */ 696 697 type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility 698 type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility 699 type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility 700 type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility 701 702 type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id 703 type Register_t = X__register_t /* types.h:62:22 */ // register-sized type 704 705 // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE 706 // but the rest of the includes are not ready for that yet. 707 708 type Int8_t = X__int8_t /* types.h:75:19 */ 709 710 type Uint8_t = X__uint8_t /* types.h:80:20 */ 711 712 type Int16_t = X__int16_t /* types.h:85:20 */ 713 714 type Uint16_t = X__uint16_t /* types.h:90:21 */ 715 716 type Int32_t = X__int32_t /* types.h:95:20 */ 717 718 type Uint32_t = X__uint32_t /* types.h:100:21 */ 719 720 type Int64_t = X__int64_t /* types.h:105:20 */ 721 722 type Uint64_t = X__uint64_t /* types.h:110:21 */ 723 724 // BSD-style unsigned bits types 725 type U_int8_t = X__uint8_t /* types.h:114:19 */ 726 type U_int16_t = X__uint16_t /* types.h:115:20 */ 727 type U_int32_t = X__uint32_t /* types.h:116:20 */ 728 type U_int64_t = X__uint64_t /* types.h:117:20 */ 729 730 // quads, deprecated in favor of 64 bit int types 731 type Quad_t = X__int64_t /* types.h:120:19 */ 732 type U_quad_t = X__uint64_t /* types.h:121:20 */ 733 734 // VM system types 735 type Vaddr_t = X__vaddr_t /* types.h:125:19 */ 736 type Paddr_t = X__paddr_t /* types.h:126:19 */ 737 type Vsize_t = X__vsize_t /* types.h:127:19 */ 738 type Psize_t = X__psize_t /* types.h:128:19 */ 739 740 // Standard system types 741 type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file 742 type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O 743 type Caddr_t = uintptr /* types.h:134:14 */ // core address 744 type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address 745 type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address 746 type Dev_t = X__dev_t /* types.h:137:18 */ // device number 747 type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number 748 type Gid_t = X__gid_t /* types.h:139:18 */ // group id 749 type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid 750 type Ino_t = X__ino_t /* types.h:141:18 */ // inode number 751 type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) 752 type Mode_t = X__mode_t /* types.h:143:18 */ // permissions 753 type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count 754 type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit 755 type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size 756 type Uid_t = X__uid_t /* types.h:147:18 */ // user id 757 type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds 758 type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) 759 type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count 760 type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count 761 762 // The following types may be defined in multiple header files. 763 type Clock_t = X__clock_t /* types.h:158:19 */ 764 765 type Clockid_t = X__clockid_t /* types.h:163:21 */ 766 767 type Pid_t = X__pid_t /* types.h:168:18 */ 768 769 type Ssize_t = X__ssize_t /* types.h:178:19 */ 770 771 type Time_t = X__time_t /* types.h:183:18 */ 772 773 type Timer_t = X__timer_t /* types.h:188:19 */ 774 775 type Off_t = X__off_t /* types.h:193:18 */ 776 777 // Major, minor numbers, dev_t's. 778 779 // File status flags: these are used by open(2), fcntl(2). 780 // They are also used (indirectly) in the kernel file structure f_flags, 781 // which is a superset of the open/fcntl flags. Open flags and f_flags 782 // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). 783 // Open/fcntl flags begin with O_; kernel-internal flags begin with F. 784 // open-only flags 785 786 // Kernel encoding of open mode; separate read and write bits that are 787 // independently testable: 1 greater than the above. 788 // 789 // XXX 790 // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, 791 // which was documented to use FREAD/FWRITE, continues to work. 792 793 // POSIX 1003.1 specifies a higher granularity for synchronous operations 794 // than we support. Since synchronicity is all or nothing in OpenBSD 795 // we just define these to be the same as O_SYNC. 796 797 // defined by POSIX 1003.1; BSD default, this bit is not required 798 799 // defined by POSIX Issue 7 800 801 // The O_* flags used to have only F* names, which were used in the kernel 802 // and by fcntl. We retain the F* names for the kernel f_flags field 803 // and for backward compatibility for fcntl. 804 805 // Constants used for fcntl(2) 806 807 // command values 808 809 // file descriptor flags (F_GETFD, F_SETFD) 810 811 // record locking flags (F_GETLK, F_SETLK, F_SETLKW) 812 813 // Advisory file segment locking data type - 814 // information passed to system by user 815 type Flock = struct { 816 Fl_start Off_t 817 Fl_len Off_t 818 Fl_pid Pid_t 819 Fl_type int16 820 Fl_whence int16 821 } /* fcntl.h:180:1 */ 822 823 var _ int8 /* gen.c:2:13: */