gtsocial-umbx

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

stdlib_freebsd_386.go (30521B)


      1 // Code generated by 'ccgo stdlib/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 stdlib/stdlib_freebsd_386.go -pkgname stdlib', DO NOT EDIT.
      2 
      3 package stdlib
      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 	EXIT_FAILURE         = 1          // stdlib.h:73:1:
     19 	EXIT_SUCCESS         = 0          // stdlib.h:74:1:
     20 	RAND_MAX             = 0x7fffffff // stdlib.h:80:1:
     21 	X_ERRNO_T_DEFINED    = 0          // stdlib.h:344:1:
     22 	X_FILE_OFFSET_BITS   = 64         // <builtin>:25:1:
     23 	X_ILP32              = 1          // <predefined>:1:1:
     24 	X_MACHINE__LIMITS_H_ = 0          // _limits.h:36:1:
     25 	X_MACHINE__TYPES_H_  = 0          // _types.h:42:1:
     26 	X_MKDTEMP_DECLARED   = 0          // stdlib.h:192:1:
     27 	X_MKSTEMP_DECLARED   = 0          // stdlib.h:196:1:
     28 	X_MKTEMP_DECLARED    = 0          // stdlib.h:221:1:
     29 	X_Nonnull            = 0          // cdefs.h:790:1:
     30 	X_Null_unspecified   = 0          // cdefs.h:792:1:
     31 	X_Nullable           = 0          // cdefs.h:791:1:
     32 	X_RSIZE_T_DEFINED    = 0          // stdlib.h:339:1:
     33 	X_RUNE_T_DECLARED    = 0          // stdlib.h:47:1:
     34 	X_SIZE_T_DECLARED    = 0          // stdlib.h:53:1:
     35 	X_STDLIB_H_          = 0          // stdlib.h:36:1:
     36 	X_SYS_CDEFS_H_       = 0          // cdefs.h:39:1:
     37 	X_SYS__TYPES_H_      = 0          // _types.h:32:1:
     38 	X_WCHAR_T_DECLARED   = 0          // stdlib.h:59:1:
     39 	I386                 = 1          // <predefined>:335:1:
     40 	Unix                 = 1          // <predefined>:336:1:
     41 )
     42 
     43 type Ptrdiff_t = int32 /* <builtin>:3:26 */
     44 
     45 type Size_t = uint32 /* <builtin>:9:23 */
     46 
     47 type Wchar_t = int32 /* <builtin>:15:24 */
     48 
     49 type X__builtin_va_list = uintptr /* <builtin>:46:14 */
     50 type X__float128 = float64        /* <builtin>:47:21 */
     51 
     52 // -
     53 // SPDX-License-Identifier: BSD-3-Clause
     54 //
     55 // Copyright (c) 1990, 1993
     56 //	The Regents of the University of California.  All rights reserved.
     57 //
     58 // Redistribution and use in source and binary forms, with or without
     59 // modification, are permitted provided that the following conditions
     60 // are met:
     61 // 1. Redistributions of source code must retain the above copyright
     62 //    notice, this list of conditions and the following disclaimer.
     63 // 2. Redistributions in binary form must reproduce the above copyright
     64 //    notice, this list of conditions and the following disclaimer in the
     65 //    documentation and/or other materials provided with the distribution.
     66 // 3. Neither the name of the University nor the names of its contributors
     67 //    may be used to endorse or promote products derived from this software
     68 //    without specific prior written permission.
     69 //
     70 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     71 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     72 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     73 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     74 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     75 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     76 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     77 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     78 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     79 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     80 // SUCH DAMAGE.
     81 //
     82 //	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
     83 // $FreeBSD$
     84 
     85 // -
     86 // SPDX-License-Identifier: BSD-3-Clause
     87 //
     88 // Copyright (c) 1991, 1993
     89 //	The Regents of the University of California.  All rights reserved.
     90 //
     91 // This code is derived from software contributed to Berkeley by
     92 // Berkeley Software Design, Inc.
     93 //
     94 // Redistribution and use in source and binary forms, with or without
     95 // modification, are permitted provided that the following conditions
     96 // are met:
     97 // 1. Redistributions of source code must retain the above copyright
     98 //    notice, this list of conditions and the following disclaimer.
     99 // 2. Redistributions in binary form must reproduce the above copyright
    100 //    notice, this list of conditions and the following disclaimer in the
    101 //    documentation and/or other materials provided with the distribution.
    102 // 3. Neither the name of the University nor the names of its contributors
    103 //    may be used to endorse or promote products derived from this software
    104 //    without specific prior written permission.
    105 //
    106 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    107 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    108 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    109 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    110 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    111 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    112 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    113 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    114 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    115 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    116 // SUCH DAMAGE.
    117 //
    118 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
    119 // $FreeBSD$
    120 
    121 // Testing against Clang-specific extensions.
    122 
    123 // This code has been put in place to help reduce the addition of
    124 // compiler specific defines in FreeBSD code.  It helps to aid in
    125 // having a compiler-agnostic source tree.
    126 
    127 // Compiler memory barriers, specific to gcc and clang.
    128 
    129 // XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
    130 
    131 // Macro to test if we're using a specific version of gcc or later.
    132 
    133 // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
    134 // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
    135 // The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
    136 // mode -- there must be no spaces between its arguments, and for nested
    137 // __CONCAT's, all the __CONCAT's must be at the left.  __CONCAT can also
    138 // concatenate double-quoted strings produced by the __STRING macro, but
    139 // this only works with ANSI C.
    140 //
    141 // __XSTRING is like __STRING, but it expands any macros in its argument
    142 // first.  It is only available with ANSI C.
    143 
    144 // Compiler-dependent macros to help declare dead (non-returning) and
    145 // pure (no side effects) functions, and unused variables.  They are
    146 // null except for versions of gcc that are known to support the features
    147 // properly (old versions of gcc-2 supported the dead and pure features
    148 // in a different (wrong) way).  If we do not provide an implementation
    149 // for a given compiler, let the compile fail if it is told to use
    150 // a feature that we cannot live without.
    151 
    152 // Keywords added in C11.
    153 
    154 // Emulation of C11 _Generic().  Unlike the previously defined C11
    155 // keywords, it is not possible to implement this using exactly the same
    156 // syntax.  Therefore implement something similar under the name
    157 // __generic().  Unlike _Generic(), this macro can only distinguish
    158 // between a single type, so it requires nested invocations to
    159 // distinguish multiple cases.
    160 
    161 // C99 Static array indices in function parameter declarations.  Syntax such as:
    162 // void bar(int myArray[static 10]);
    163 // is allowed in C99 but not in C++.  Define __min_size appropriately so
    164 // headers using it can be compiled in either language.  Use like this:
    165 // void bar(int myArray[__min_size(10)]);
    166 
    167 // XXX: should use `#if __STDC_VERSION__ < 199901'.
    168 
    169 // C++11 exposes a load of C99 stuff
    170 
    171 // GCC 2.95 provides `__restrict' as an extension to C90 to support the
    172 // C99-specific `restrict' type qualifier.  We happen to use `__restrict' as
    173 // a way to define the `restrict' type qualifier without disturbing older
    174 // software that is unaware of C99 keywords.
    175 
    176 // GNU C version 2.96 adds explicit branch prediction so that
    177 // the CPU back-end can hint the processor and also so that
    178 // code blocks can be reordered such that the predicted path
    179 // sees a more linear flow, thus improving cache behavior, etc.
    180 //
    181 // The following two macros provide us with a way to utilize this
    182 // compiler feature.  Use __predict_true() if you expect the expression
    183 // to evaluate to true, and __predict_false() if you expect the
    184 // expression to evaluate to false.
    185 //
    186 // A few notes about usage:
    187 //
    188 //	* Generally, __predict_false() error condition checks (unless
    189 //	  you have some _strong_ reason to do otherwise, in which case
    190 //	  document it), and/or __predict_true() `no-error' condition
    191 //	  checks, assuming you want to optimize for the no-error case.
    192 //
    193 //	* Other than that, if you don't know the likelihood of a test
    194 //	  succeeding from empirical or other `hard' evidence, don't
    195 //	  make predictions.
    196 //
    197 //	* These are meant to be used in places that are run `a lot'.
    198 //	  It is wasteful to make predictions in code that is run
    199 //	  seldomly (e.g. at subsystem initialization time) as the
    200 //	  basic block reordering that this affects can often generate
    201 //	  larger code.
    202 
    203 // We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
    204 // require it.
    205 
    206 // Given the pointer x to the member m of the struct s, return
    207 // a pointer to the containing structure.  When using GCC, we first
    208 // assign pointer x to a local variable, to check that its type is
    209 // compatible with member m.
    210 
    211 // Compiler-dependent macros to declare that functions take printf-like
    212 // or scanf-like arguments.  They are null except for versions of gcc
    213 // that are known to support the features properly (old versions of gcc-2
    214 // didn't permit keeping the keywords out of the application namespace).
    215 
    216 // Compiler-dependent macros that rely on FreeBSD-specific extensions.
    217 
    218 // Embed the rcs id of a source file in the resulting library.  Note that in
    219 // more recent ELF binutils, we use .ident allowing the ID to be stripped.
    220 // Usage:
    221 //	__FBSDID("$FreeBSD$");
    222 
    223 // -
    224 // The following definitions are an extension of the behavior originally
    225 // implemented in <sys/_posix.h>, but with a different level of granularity.
    226 // POSIX.1 requires that the macros we test be defined before any standard
    227 // header file is included.
    228 //
    229 // Here's a quick run-down of the versions:
    230 //  defined(_POSIX_SOURCE)		1003.1-1988
    231 //  _POSIX_C_SOURCE == 1		1003.1-1990
    232 //  _POSIX_C_SOURCE == 2		1003.2-1992 C Language Binding Option
    233 //  _POSIX_C_SOURCE == 199309		1003.1b-1993
    234 //  _POSIX_C_SOURCE == 199506		1003.1c-1995, 1003.1i-1995,
    235 //					and the omnibus ISO/IEC 9945-1: 1996
    236 //  _POSIX_C_SOURCE == 200112		1003.1-2001
    237 //  _POSIX_C_SOURCE == 200809		1003.1-2008
    238 //
    239 // In addition, the X/Open Portability Guide, which is now the Single UNIX
    240 // Specification, defines a feature-test macro which indicates the version of
    241 // that specification, and which subsumes _POSIX_C_SOURCE.
    242 //
    243 // Our macros begin with two underscores to avoid namespace screwage.
    244 
    245 // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
    246 
    247 // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
    248 
    249 // Deal with various X/Open Portability Guides and Single UNIX Spec.
    250 
    251 // Deal with all versions of POSIX.  The ordering relative to the tests above is
    252 // important.
    253 // -
    254 // Deal with _ANSI_SOURCE:
    255 // If it is defined, and no other compilation environment is explicitly
    256 // requested, then define our internal feature-test macros to zero.  This
    257 // makes no difference to the preprocessor (undefined symbols in preprocessing
    258 // expressions are defined to have value zero), but makes it more convenient for
    259 // a test program to print out the values.
    260 //
    261 // If a program mistakenly defines _ANSI_SOURCE and some other macro such as
    262 // _POSIX_C_SOURCE, we will assume that it wants the broader compilation
    263 // environment (and in fact we will never get here).
    264 
    265 // User override __EXT1_VISIBLE
    266 
    267 // Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
    268 // translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
    269 
    270 // Nullability qualifiers: currently only supported by Clang.
    271 
    272 // Type Safety Checking
    273 //
    274 // Clang provides additional attributes to enable checking type safety
    275 // properties that cannot be enforced by the C type system.
    276 
    277 // Lock annotations.
    278 //
    279 // Clang provides support for doing basic thread-safety tests at
    280 // compile-time, by marking which locks will/should be held when
    281 // entering/leaving a functions.
    282 //
    283 // Furthermore, it is also possible to annotate variables and structure
    284 // members to enforce that they are only accessed when certain locks are
    285 // held.
    286 
    287 // Structure implements a lock.
    288 
    289 // Function acquires an exclusive or shared lock.
    290 
    291 // Function attempts to acquire an exclusive or shared lock.
    292 
    293 // Function releases a lock.
    294 
    295 // Function asserts that an exclusive or shared lock is held.
    296 
    297 // Function requires that an exclusive or shared lock is or is not held.
    298 
    299 // Function should not be analyzed.
    300 
    301 // Function or variable should not be sanitized, e.g., by AddressSanitizer.
    302 // GCC has the nosanitize attribute, but as a function attribute only, and
    303 // warns on use as a variable attribute.
    304 
    305 // Guard variables and structure members by lock.
    306 
    307 // Alignment builtins for better type checking and improved code generation.
    308 // Provide fallback versions for other compilers (GCC/Clang < 10):
    309 
    310 // -
    311 // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
    312 //
    313 // Copyright (c) 2003 Marcel Moolenaar
    314 // All rights reserved.
    315 //
    316 // Redistribution and use in source and binary forms, with or without
    317 // modification, are permitted provided that the following conditions
    318 // are met:
    319 //
    320 // 1. Redistributions of source code must retain the above copyright
    321 //    notice, this list of conditions and the following disclaimer.
    322 // 2. Redistributions in binary form must reproduce the above copyright
    323 //    notice, this list of conditions and the following disclaimer in the
    324 //    documentation and/or other materials provided with the distribution.
    325 //
    326 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    327 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    328 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    329 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
    330 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    331 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    332 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    333 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    334 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    335 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    336 //
    337 // $FreeBSD$
    338 
    339 // -
    340 // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
    341 //
    342 // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
    343 // All rights reserved.
    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 //
    354 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
    355 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    356 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    357 // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
    358 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    359 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    360 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    361 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    362 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    363 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    364 // SUCH DAMAGE.
    365 //
    366 // $FreeBSD$
    367 
    368 // -
    369 // SPDX-License-Identifier: BSD-3-Clause
    370 //
    371 // Copyright (c) 1991, 1993
    372 //	The Regents of the University of California.  All rights reserved.
    373 //
    374 // This code is derived from software contributed to Berkeley by
    375 // Berkeley Software Design, Inc.
    376 //
    377 // Redistribution and use in source and binary forms, with or without
    378 // modification, are permitted provided that the following conditions
    379 // are met:
    380 // 1. Redistributions of source code must retain the above copyright
    381 //    notice, this list of conditions and the following disclaimer.
    382 // 2. Redistributions in binary form must reproduce the above copyright
    383 //    notice, this list of conditions and the following disclaimer in the
    384 //    documentation and/or other materials provided with the distribution.
    385 // 3. Neither the name of the University nor the names of its contributors
    386 //    may be used to endorse or promote products derived from this software
    387 //    without specific prior written permission.
    388 //
    389 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    390 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    391 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    392 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    393 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    394 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    395 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    396 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    397 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    398 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    399 // SUCH DAMAGE.
    400 //
    401 //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
    402 // $FreeBSD$
    403 
    404 // -
    405 // This file is in the public domain.
    406 // $FreeBSD$
    407 
    408 // -
    409 // SPDX-License-Identifier: BSD-4-Clause
    410 //
    411 // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
    412 // Copyright (c) 1990, 1993
    413 //	The Regents of the University of California.  All rights reserved.
    414 //
    415 // Redistribution and use in source and binary forms, with or without
    416 // modification, are permitted provided that the following conditions
    417 // are met:
    418 // 1. Redistributions of source code must retain the above copyright
    419 //    notice, this list of conditions and the following disclaimer.
    420 // 2. Redistributions in binary form must reproduce the above copyright
    421 //    notice, this list of conditions and the following disclaimer in the
    422 //    documentation and/or other materials provided with the distribution.
    423 // 3. All advertising materials mentioning features or use of this software
    424 //    must display the following acknowledgement:
    425 //	This product includes software developed by the University of
    426 //	California, Berkeley and its contributors.
    427 // 4. Neither the name of the University nor the names of its contributors
    428 //    may be used to endorse or promote products derived from this software
    429 //    without specific prior written permission.
    430 //
    431 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    432 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    433 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    434 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    435 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    436 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    437 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    438 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    439 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    440 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    441 // SUCH DAMAGE.
    442 //
    443 //	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
    444 //	From: @(#)types.h	8.3 (Berkeley) 1/5/94
    445 // $FreeBSD$
    446 
    447 // -
    448 // This file is in the public domain.
    449 // $FreeBSD$
    450 
    451 // -
    452 // SPDX-License-Identifier: BSD-3-Clause
    453 //
    454 // Copyright (c) 1988, 1993
    455 //	The Regents of the University of California.  All rights reserved.
    456 //
    457 // Redistribution and use in source and binary forms, with or without
    458 // modification, are permitted provided that the following conditions
    459 // are met:
    460 // 1. Redistributions of source code must retain the above copyright
    461 //    notice, this list of conditions and the following disclaimer.
    462 // 2. Redistributions in binary form must reproduce the above copyright
    463 //    notice, this list of conditions and the following disclaimer in the
    464 //    documentation and/or other materials provided with the distribution.
    465 // 3. Neither the name of the University nor the names of its contributors
    466 //    may be used to endorse or promote products derived from this software
    467 //    without specific prior written permission.
    468 //
    469 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    470 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    471 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    472 // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    473 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    474 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    475 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    476 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    477 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    478 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    479 // SUCH DAMAGE.
    480 //
    481 //	@(#)limits.h	8.3 (Berkeley) 1/4/94
    482 // $FreeBSD$
    483 
    484 // According to ANSI (section 2.2.4.2), the values below must be usable by
    485 // #if preprocessing directives.  Additionally, the expression must have the
    486 // same type as would an expression that is an object of the corresponding
    487 // type converted according to the integral promotions.  The subtraction for
    488 // INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
    489 // unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
    490 
    491 // max value for an unsigned long long
    492 
    493 // Minimum signal stack size.
    494 
    495 // Basic types upon which most other types are built.
    496 type X__int8_t = int8     /* _types.h:55:22 */
    497 type X__uint8_t = uint8   /* _types.h:56:24 */
    498 type X__int16_t = int16   /* _types.h:57:17 */
    499 type X__uint16_t = uint16 /* _types.h:58:25 */
    500 type X__int32_t = int32   /* _types.h:59:15 */
    501 type X__uint32_t = uint32 /* _types.h:60:23 */
    502 
    503 type X__int64_t = int64 /* _types.h:66:20 */
    504 
    505 type X__uint64_t = uint64 /* _types.h:68:28 */
    506 
    507 // Standard type definitions.
    508 type X__clock_t = uint32             /* _types.h:84:23 */
    509 type X__critical_t = X__int32_t      /* _types.h:85:19 */
    510 type X__double_t = float64           /* _types.h:87:21 */
    511 type X__float_t = float64            /* _types.h:88:21 */
    512 type X__intfptr_t = X__int32_t       /* _types.h:90:19 */
    513 type X__intptr_t = X__int32_t        /* _types.h:91:19 */
    514 type X__intmax_t = X__int64_t        /* _types.h:93:19 */
    515 type X__int_fast8_t = X__int32_t     /* _types.h:94:19 */
    516 type X__int_fast16_t = X__int32_t    /* _types.h:95:19 */
    517 type X__int_fast32_t = X__int32_t    /* _types.h:96:19 */
    518 type X__int_fast64_t = X__int64_t    /* _types.h:97:19 */
    519 type X__int_least8_t = X__int8_t     /* _types.h:98:18 */
    520 type X__int_least16_t = X__int16_t   /* _types.h:99:19 */
    521 type X__int_least32_t = X__int32_t   /* _types.h:100:19 */
    522 type X__int_least64_t = X__int64_t   /* _types.h:101:19 */
    523 type X__ptrdiff_t = X__int32_t       /* _types.h:112:19 */
    524 type X__register_t = X__int32_t      /* _types.h:113:19 */
    525 type X__segsz_t = X__int32_t         /* _types.h:114:19 */
    526 type X__size_t = X__uint32_t         /* _types.h:115:20 */
    527 type X__ssize_t = X__int32_t         /* _types.h:116:19 */
    528 type X__time_t = X__int32_t          /* _types.h:117:19 */
    529 type X__uintfptr_t = X__uint32_t     /* _types.h:118:20 */
    530 type X__uintptr_t = X__uint32_t      /* _types.h:119:20 */
    531 type X__uintmax_t = X__uint64_t      /* _types.h:121:20 */
    532 type X__uint_fast8_t = X__uint32_t   /* _types.h:122:20 */
    533 type X__uint_fast16_t = X__uint32_t  /* _types.h:123:20 */
    534 type X__uint_fast32_t = X__uint32_t  /* _types.h:124:20 */
    535 type X__uint_fast64_t = X__uint64_t  /* _types.h:125:20 */
    536 type X__uint_least8_t = X__uint8_t   /* _types.h:126:19 */
    537 type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
    538 type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
    539 type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
    540 type X__u_register_t = X__uint32_t   /* _types.h:136:20 */
    541 type X__vm_offset_t = X__uint32_t    /* _types.h:137:20 */
    542 type X__vm_paddr_t = X__uint64_t     /* _types.h:138:20 */
    543 type X__vm_size_t = X__uint32_t      /* _types.h:139:20 */
    544 type X___wchar_t = int32             /* _types.h:141:14 */
    545 
    546 // Standard type definitions.
    547 type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // file block size
    548 type X__blkcnt_t = X__int64_t    /* _types.h:41:19 */ // file block count
    549 type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // clock_gettime()...
    550 type X__fflags_t = X__uint32_t   /* _types.h:43:20 */ // file flags
    551 type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
    552 type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
    553 type X__gid_t = X__uint32_t      /* _types.h:46:20 */
    554 type X__id_t = X__int64_t        /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
    555 type X__ino_t = X__uint64_t      /* _types.h:48:20 */ // inode number
    556 type X__key_t = int32            /* _types.h:49:15 */ // IPC key (for Sys V IPC)
    557 type X__lwpid_t = X__int32_t     /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
    558 type X__mode_t = X__uint16_t     /* _types.h:51:20 */ // permissions
    559 type X__accmode_t = int32        /* _types.h:52:14 */ // access permissions
    560 type X__nl_item = int32          /* _types.h:53:14 */
    561 type X__nlink_t = X__uint64_t    /* _types.h:54:20 */ // link count
    562 type X__off_t = X__int64_t       /* _types.h:55:19 */ // file offset
    563 type X__off64_t = X__int64_t     /* _types.h:56:19 */ // file offset (alias)
    564 type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process [group]
    565 type X__rlim_t = X__int64_t      /* _types.h:58:19 */ // resource limit - intentionally
    566 // signed, because of legacy code
    567 // that uses -1 for RLIM_INFINITY
    568 type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
    569 type X__socklen_t = X__uint32_t  /* _types.h:62:20 */
    570 type X__suseconds_t = int32      /* _types.h:63:15 */ // microseconds (signed)
    571 type X__timer_t = uintptr        /* _types.h:64:24 */ // timer_gettime()...
    572 type X__mqd_t = uintptr          /* _types.h:65:21 */ // mq_open()...
    573 type X__uid_t = X__uint32_t      /* _types.h:66:20 */
    574 type X__useconds_t = uint32      /* _types.h:67:22 */ // microseconds (unsigned)
    575 type X__cpuwhich_t = int32       /* _types.h:68:14 */ // which parameter for cpuset.
    576 type X__cpulevel_t = int32       /* _types.h:69:14 */ // level parameter for cpuset.
    577 type X__cpusetid_t = int32       /* _types.h:70:14 */ // cpuset identifier.
    578 type X__daddr_t = X__int64_t     /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
    579 
    580 // Unusual type definitions.
    581 // rune_t is declared to be an “int” instead of the more natural
    582 // “unsigned long” or “long”.  Two things are happening here.  It is not
    583 // unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
    584 // it looks like 10646 will be a 31 bit standard.  This means that if your
    585 // ints cannot hold 32 bits, you will be in trouble.  The reason an int was
    586 // chosen over a long is that the is*() and to*() routines take ints (says
    587 // ANSI C), but they use __ct_rune_t instead of int.
    588 //
    589 // NOTE: rune_t is not covered by ANSI nor other standards, and should not
    590 // be instantiated outside of lib/libc/locale.  Use wchar_t.  wint_t and
    591 // rune_t must be the same type.  Also, wint_t should be able to hold all
    592 // members of the largest character set plus one extra value (WEOF), and
    593 // must be at least 16 bits.
    594 type X__ct_rune_t = int32     /* _types.h:91:14 */ // arg type for ctype funcs
    595 type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
    596 type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
    597 
    598 // Clang already provides these types as built-ins, but only in C++ mode.
    599 type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
    600 type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
    601 // In C++11, char16_t and char32_t are built-in types.
    602 
    603 type X__max_align_t = struct {
    604 	F__max_align1 int64
    605 	F__max_align2 float64
    606 } /* _types.h:111:3 */
    607 
    608 type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
    609 
    610 type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
    611 
    612 // mbstate_t is an opaque object to keep conversion state during multibyte
    613 // stream conversions.
    614 type X__mbstate_t = struct {
    615 	F__ccgo_pad1 [0]uint32
    616 	F__mbstate8  [128]int8
    617 } /* _types.h:124:3 */
    618 
    619 type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
    620 
    621 // Types for varargs. These are all provided by builtin types these
    622 // days, so centralize their definition.
    623 type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
    624 type X__gnuc_va_list = X__va_list    /* _types.h:140:20 */ // compatibility w/GNU headers
    625 
    626 // When the following macro is defined, the system uses 64-bit inode numbers.
    627 // Programs can use this to avoid including <sys/param.h>, with its associated
    628 // namespace pollution.
    629 
    630 type Rune_t = X__rune_t /* stdlib.h:46:18 */
    631 
    632 type Div_t = struct {
    633 	Fquot int32
    634 	Frem  int32
    635 } /* stdlib.h:66:3 */
    636 
    637 type Ldiv_t = struct {
    638 	Fquot int32
    639 	Frem  int32
    640 } /* stdlib.h:71:3 */
    641 
    642 // Functions added in C99 which we make conditionally available in the
    643 // BSD^C89 namespace if the compiler supports `long long'.
    644 // The #if test is more complicated than it ought to be because
    645 // __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
    646 // is not supported in the compilation environment (which therefore means
    647 // that it can't really be ISO C99).
    648 //
    649 // (The only other extension made by C99 in thie header is _Exit().)
    650 // LONGLONG
    651 type Lldiv_t = struct {
    652 	Fquot int64
    653 	Frem  int64
    654 } /* stdlib.h:142:3 */ // getsubopt(3) external variable
    655 
    656 type Rsize_t = Size_t /* stdlib.h:340:16 */
    657 
    658 type Errno_t = int32 /* stdlib.h:345:13 */
    659 
    660 // K.3.6
    661 type Constraint_handler_t = uintptr /* stdlib.h:349:14 */
    662 
    663 var _ int8 /* gen.c:2:13: */