FreeBSD Bugzilla – Attachment 217066 Details for
Bug 248513
Buildworld fails on 12-STABLE r363128
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
msgio-55c433.c
msgio-55c433.c (text/plain), 335.37 KB, created by
Remko Catersels
on 2020-08-07 10:44:47 UTC
(
hide
)
Description:
msgio-55c433.c
Filename:
MIME Type:
Creator:
Remko Catersels
Created:
2020-08-07 10:44:47 UTC
Size:
335.37 KB
patch
obsolete
># 1 "<built-in>" ># 1 "/usr/src/lib/libnv/msgio.c" >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2013 The FreeBSD Foundation > * Copyright (c) 2013 Mariusz Zaborski <oshogbo@FreeBSD.org> > * All rights reserved. > * > * This software was developed by Pawel Jakub Dawidek under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 33 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/sys/cdefs.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Berkeley Software Design, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 > * $FreeBSD: stable/12/sys/sys/cdefs.h 337399 2018-08-06 23:51:08Z jhb $ > */ > >#ifndef _SYS_CDEFS_H_ >#define _SYS_CDEFS_H_ > >/* > * Testing against Clang-specific extensions. > */ >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif ># 47 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_extension >#define __has_extension __has_feature >#endif ># 50 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_feature >#define __has_feature(x) 0 >#endif ># 53 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_include >#define __has_include(x) 0 >#endif ># 56 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif ># 59 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 61 "/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS extern "C" { >#define __END_DECLS } >#else ># 64 "/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS >#define __END_DECLS >#endif ># 67 "/usr/include/sys/cdefs.h" 3 4 > >/* > * This code has been put in place to help reduce the addition of > * compiler specific defines in FreeBSD code. It helps to aid in > * having a compiler-agnostic source tree. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 75 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC__ >= 3 || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 77 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_ASM 3 >#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS >#else ># 80 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_ASM 2 >#endif ># 82 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE___TYPEOF 1 >#define __GNUCLIKE___OFFSETOF 1 >#define __GNUCLIKE___SECTION 1 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 >#endif ># 89 "/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 >#if 0 /* disabled by -frewrite-includes */ >#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ > __INTEL_COMPILER < 800 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 93 "/usr/include/sys/cdefs.h" 3 4 >#undef __GNUCLIKE_BUILTIN_CONSTANT_P >#endif ># 95 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 97 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUCLIKE_BUILTIN_VARARGS 1 >#define __GNUCLIKE_BUILTIN_STDARG 1 >#define __GNUCLIKE_BUILTIN_VAALIST 1 >#endif ># 101 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 103 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_VA_LIST_COMPATIBILITY 1 >#endif ># 105 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler memory barriers, specific to gcc and clang. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 110 "/usr/include/sys/cdefs.h" 3 4 >#define __compiler_membar() __asm __volatile(" " : : : "memory") >#endif ># 112 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __INTEL_COMPILER >#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 >#define __GNUCLIKE_MATH_BUILTIN_RELOPS >#endif ># 117 "/usr/include/sys/cdefs.h" 3 4 > >#define __GNUCLIKE_BUILTIN_MEMCPY 1 > >/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ >#define __CC_SUPPORTS_INLINE 1 >#define __CC_SUPPORTS___INLINE 1 >#define __CC_SUPPORTS___INLINE__ 1 > >#define __CC_SUPPORTS___FUNC__ 1 >#define __CC_SUPPORTS_WARNING 1 > >#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > >#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 133 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Macro to test if we're using a specific version of gcc or later. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 138 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) \ > (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) >#else ># 141 "/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) 0 >#endif ># 143 "/usr/include/sys/cdefs.h" 3 4 > >/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI > * mode -- there must be no spaces between its arguments, and for nested > * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also > * concatenate double-quoted strings produced by the __STRING macro, but > * this only works with ANSI C. > * > * __XSTRING is like __STRING, but it expands any macros in its argument > * first. It is only available with ANSI C. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__STDC__) || defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 157 "/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) protos /* full-blown ANSI C */ >#define __CONCAT1(x,y) x ## y >#define __CONCAT(x,y) __CONCAT1(x,y) >#define __STRING(x) #x /* stringify without expanding x */ >#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ > >#define __const const /* define reserved names to standard */ >#define __signed signed >#define __volatile volatile >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 167 "/usr/include/sys/cdefs.h" 3 4 >#define __inline inline /* convert to C++ keyword */ >#else ># 169 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !(defined(__CC_SUPPORTS___INLINE)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 170 "/usr/include/sys/cdefs.h" 3 4 >#define __inline /* delete GCC keyword */ >#endif /* ! __CC_SUPPORTS___INLINE */ ># 172 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !__cplusplus */ ># 173 "/usr/include/sys/cdefs.h" 3 4 > >#else /* !(__STDC__ || __cplusplus) */ ># 175 "/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) () /* traditional C preprocessor */ >#define __CONCAT(x,y) x/**/y >#define __STRING(x) "x" > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__CC_SUPPORTS___INLINE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 180 "/usr/include/sys/cdefs.h" 3 4 >#define __const /* delete pseudo-ANSI C keywords */ >#define __inline >#define __signed >#define __volatile >/* > * In non-ANSI C environments, new programs will want ANSI-only C keywords > * deleted from the program and old programs will want them left alone. > * When using a compiler other than gcc, programs using the ANSI C keywords > * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. > * When using "gcc -traditional", we assume that this is the intent; if > * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. > */ >#ifndef NO_ANSI_KEYWORDS >#define const /* delete ANSI C keywords */ >#define inline >#define signed >#define volatile >#endif /* !NO_ANSI_KEYWORDS */ ># 198 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !__CC_SUPPORTS___INLINE */ ># 199 "/usr/include/sys/cdefs.h" 3 4 >#endif /* !(__STDC__ || __cplusplus) */ ># 200 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to help declare dead (non-returning) and > * pure (no side effects) functions, and unused variables. They are > * null except for versions of gcc that are known to support the features > * properly (old versions of gcc-2 supported the dead and pure features > * in a different (wrong) way). If we do not provide an implementation > * for a given compiler, let the compile fail if it is told to use > * a feature that we cannot live without. > */ >#define __weak_symbol __attribute__((__weak__)) >#if 0 /* disabled by -frewrite-includes */ >#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 212 "/usr/include/sys/cdefs.h" 3 4 >#define __dead2 >#define __pure2 >#define __unused >#endif ># 216 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 217 "/usr/include/sys/cdefs.h" 3 4 >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused >/* XXX Find out what to do for __packed, __aligned and __section */ >#endif ># 222 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 223 "/usr/include/sys/cdefs.h" 3 4 >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused __attribute__((__unused__)) >#define __used __attribute__((__used__)) >#define __packed __attribute__((__packed__)) >#define __aligned(x) __attribute__((__aligned__(x))) >#define __section(x) __attribute__((__section__(x))) >#endif ># 231 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 232 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_size(x) __attribute__((__alloc_size__(x))) >#define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) >#else ># 235 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_size(x) >#define __alloc_size2(n, x) >#endif ># 238 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 239 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_align(x) __attribute__((__alloc_align__(x))) >#else ># 241 "/usr/include/sys/cdefs.h" 3 4 >#define __alloc_align(x) >#endif ># 243 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__GNUC_PREREQ__(2, 95) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 245 "/usr/include/sys/cdefs.h" 3 4 >#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) >#endif ># 247 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Keywords added in C11. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 253 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_alignas) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 255 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_alignas) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 257 "/usr/include/sys/cdefs.h" 3 4 >#define _Alignas(x) alignas(x) >#else ># 259 "/usr/include/sys/cdefs.h" 3 4 >/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ >#define _Alignas(x) __aligned(x) >#endif ># 262 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 263 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 265 "/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) alignof(x) >#else ># 267 "/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) __alignof(x) >#endif ># 269 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) && !__has_extension(c_atomic) && \ > !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 272 "/usr/include/sys/cdefs.h" 3 4 >/* > * No native support for _Atomic(). Place object in structure to prevent > * most forms of direct non-atomic access. > */ >#define _Atomic(T) struct { T volatile __val; } >#endif ># 278 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 280 "/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn [[noreturn]] >#else ># 282 "/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn __dead2 >#endif ># 284 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_static_assert) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 286 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 288 "/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) static_assert(x, y) >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 290 "/usr/include/sys/cdefs.h" 3 4 >/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(__COUNTER__) >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 292 "/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) >#define __Static_assert(x, y) ___Static_assert(x, y) >#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ > __unused >#else ># 297 "/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) struct __hack >#endif ># 299 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 300 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_thread_local) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 302 "/usr/include/sys/cdefs.h" 3 4 >/* > * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode > * without actually supporting the thread_local keyword. Don't check for > * the presence of C++11 when defining _Thread_local. > */ >#if 0 /* disabled by -frewrite-includes */ >#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ > __has_extension(cxx_thread_local) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 309 "/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local thread_local >#else ># 311 "/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local __thread >#endif ># 313 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 314 "/usr/include/sys/cdefs.h" 3 4 > >#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ ># 316 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Emulation of C11 _Generic(). Unlike the previously defined C11 > * keywords, it is not possible to implement this using exactly the same > * syntax. Therefore implement something similar under the name > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ > __has_extension(c_generic_selections) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 328 "/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > _Generic(expr, t: yes, default: no) >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 331 "/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > __builtin_choose_expr( \ > __builtin_types_compatible_p(__typeof(expr), t), yes, no) >#endif ># 335 "/usr/include/sys/cdefs.h" 3 4 > >/* > * C99 Static array indices in function parameter declarations. Syntax such as: > * void bar(int myArray[static 10]); > * is allowed in C99 but not in C++. Define __min_size appropriately so > * headers using it can be compiled in either language. Use like this: > * void bar(int myArray[__min_size(10)]); > */ >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) && \ > (defined(__clang__) || __GNUC_PREREQ__(4, 6)) && \ > (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 346 "/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) static (x) >#else ># 348 "/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) (x) >#endif ># 350 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(2, 96) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 352 "/usr/include/sys/cdefs.h" 3 4 >#define __malloc_like __attribute__((__malloc__)) >#define __pure __attribute__((__pure__)) >#else ># 355 "/usr/include/sys/cdefs.h" 3 4 >#define __malloc_like >#define __pure >#endif ># 358 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 360 "/usr/include/sys/cdefs.h" 3 4 >#define __always_inline __attribute__((__always_inline__)) >#else ># 362 "/usr/include/sys/cdefs.h" 3 4 >#define __always_inline >#endif ># 364 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(3, 1) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 366 "/usr/include/sys/cdefs.h" 3 4 >#define __noinline __attribute__ ((__noinline__)) >#else ># 368 "/usr/include/sys/cdefs.h" 3 4 >#define __noinline >#endif ># 370 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(3, 4) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 372 "/usr/include/sys/cdefs.h" 3 4 >#define __fastcall __attribute__((__fastcall__)) >#define __result_use_check __attribute__((__warn_unused_result__)) >#else ># 375 "/usr/include/sys/cdefs.h" 3 4 >#define __fastcall >#define __result_use_check >#endif ># 378 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 1) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 380 "/usr/include/sys/cdefs.h" 3 4 >#define __returns_twice __attribute__((__returns_twice__)) >#else ># 382 "/usr/include/sys/cdefs.h" 3 4 >#define __returns_twice >#endif ># 384 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 386 "/usr/include/sys/cdefs.h" 3 4 >#define __unreachable() __builtin_unreachable() >#else ># 388 "/usr/include/sys/cdefs.h" 3 4 >#define __unreachable() ((void)0) >#endif ># 390 "/usr/include/sys/cdefs.h" 3 4 > >/* XXX: should use `#if __STDC_VERSION__ < 199901'. */ >#if 0 /* disabled by -frewrite-includes */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 393 "/usr/include/sys/cdefs.h" 3 4 >#define __func__ NULL >#endif ># 395 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 397 "/usr/include/sys/cdefs.h" 3 4 >#define __LONG_LONG_SUPPORTED >#endif ># 399 "/usr/include/sys/cdefs.h" 3 4 > >/* C++11 exposes a load of C99 stuff */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 402 "/usr/include/sys/cdefs.h" 3 4 >#define __LONG_LONG_SUPPORTED >#ifndef __STDC_LIMIT_MACROS >#define __STDC_LIMIT_MACROS >#endif ># 406 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __STDC_CONSTANT_MACROS >#define __STDC_CONSTANT_MACROS >#endif ># 409 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 410 "/usr/include/sys/cdefs.h" 3 4 > >/* > * GCC 2.95 provides `__restrict' as an extension to C90 to support the > * C99-specific `restrict' type qualifier. We happen to use `__restrict' as > * a way to define the `restrict' type qualifier without disturbing older > * software that is unaware of C99 keywords. > */ >#if 0 /* disabled by -frewrite-includes */ >#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 418 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 419 "/usr/include/sys/cdefs.h" 3 4 >#define __restrict >#else ># 421 "/usr/include/sys/cdefs.h" 3 4 >#define __restrict restrict >#endif ># 423 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 424 "/usr/include/sys/cdefs.h" 3 4 > >/* > * GNU C version 2.96 adds explicit branch prediction so that > * the CPU back-end can hint the processor and also so that > * code blocks can be reordered such that the predicted path > * sees a more linear flow, thus improving cache behavior, etc. > * > * The following two macros provide us with a way to utilize this > * compiler feature. Use __predict_true() if you expect the expression > * to evaluate to true, and __predict_false() if you expect the > * expression to evaluate to false. > * > * A few notes about usage: > * > * * Generally, __predict_false() error condition checks (unless > * you have some _strong_ reason to do otherwise, in which case > * document it), and/or __predict_true() `no-error' condition > * checks, assuming you want to optimize for the no-error case. > * > * * Other than that, if you don't know the likelihood of a test > * succeeding from empirical or other `hard' evidence, don't > * make predictions. > * > * * These are meant to be used in places that are run `a lot'. > * It is wasteful to make predictions in code that is run > * seldomly (e.g. at subsystem initialization time) as the > * basic block reordering that this affects can often generate > * larger code. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(2, 96) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 454 "/usr/include/sys/cdefs.h" 3 4 >#define __predict_true(exp) __builtin_expect((exp), 1) >#define __predict_false(exp) __builtin_expect((exp), 0) >#else ># 457 "/usr/include/sys/cdefs.h" 3 4 >#define __predict_true(exp) (exp) >#define __predict_false(exp) (exp) >#endif ># 460 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 0) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 462 "/usr/include/sys/cdefs.h" 3 4 >#define __null_sentinel __attribute__((__sentinel__)) >#define __exported __attribute__((__visibility__("default"))) >#define __hidden __attribute__((__visibility__("hidden"))) >#else ># 466 "/usr/include/sys/cdefs.h" 3 4 >#define __null_sentinel >#define __exported >#define __hidden >#endif ># 470 "/usr/include/sys/cdefs.h" 3 4 > >/* > * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> > * require it. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(4, 1) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 476 "/usr/include/sys/cdefs.h" 3 4 >#define __offsetof(type, field) __builtin_offsetof(type, field) >#else ># 478 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __cplusplus >#define __offsetof(type, field) \ > ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) >#else ># 482 "/usr/include/sys/cdefs.h" 3 4 >#define __offsetof(type, field) \ > (__offsetof__ (reinterpret_cast <__size_t> \ > (&reinterpret_cast <const volatile char &> \ > (static_cast<type *> (0)->field)))) >#endif ># 487 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 488 "/usr/include/sys/cdefs.h" 3 4 >#define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > >/* > * Given the pointer x to the member m of the struct s, return > * a pointer to the containing structure. When using GCC, we first > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC_PREREQ__(3, 1) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 498 "/usr/include/sys/cdefs.h" 3 4 >#define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >}) >#else ># 503 "/usr/include/sys/cdefs.h" 3 4 >#define __containerof(x, s, m) \ > __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) >#endif ># 506 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to declare that functions take printf-like > * or scanf-like arguments. They are null except for versions of gcc > * that are known to support the features properly (old versions of gcc-2 > * didn't permit keeping the keywords out of the application namespace). > */ >#if 0 /* disabled by -frewrite-includes */ >#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 514 "/usr/include/sys/cdefs.h" 3 4 >#define __printflike(fmtarg, firstvararg) >#define __scanflike(fmtarg, firstvararg) >#define __format_arg(fmtarg) >#define __strfmonlike(fmtarg, firstvararg) >#define __strftimelike(fmtarg, firstvararg) >#else ># 520 "/usr/include/sys/cdefs.h" 3 4 >#define __printflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf__, fmtarg, firstvararg))) >#define __scanflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) >#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) >#define __strfmonlike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) >#define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >#endif ># 530 "/usr/include/sys/cdefs.h" 3 4 > >/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ > defined(__GNUC__) && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 534 "/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >#else ># 537 "/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) >#endif ># 539 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 541 "/usr/include/sys/cdefs.h" 3 4 >#ifndef __INTEL_COMPILER >#define __strong_reference(sym,aliassym) \ > extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) >#endif ># 545 "/usr/include/sys/cdefs.h" 3 4 >#ifdef __STDC__ >#define __weak_reference(sym,alias) \ > __asm__(".weak " #alias); \ > __asm__(".equ " #alias ", " #sym) >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@" #verid) >#define __sym_default(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@@@" #verid) >#else ># 558 "/usr/include/sys/cdefs.h" 3 4 >#define __weak_reference(sym,alias) \ > __asm__(".weak alias"); \ > __asm__(".equ alias, sym") >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning.sym"); \ > __asm__(".asciz \"msg\""); \ > __asm__(".previous") >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver impl, sym@verid") >#define __sym_default(impl,sym,verid) \ > __asm__(".symver impl, sym@@@verid") >#endif /* __STDC__ */ ># 570 "/usr/include/sys/cdefs.h" 3 4 >#endif /* __GNUC__ || __INTEL_COMPILER */ ># 571 "/usr/include/sys/cdefs.h" 3 4 > >#define __GLOBL1(sym) __asm__(".globl " #sym) >#define __GLOBL(sym) __GLOBL1(sym) > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 576 "/usr/include/sys/cdefs.h" 3 4 >#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") >#else ># 578 "/usr/include/sys/cdefs.h" 3 4 >/* > * The following definition might not work well if used in header files, > * but it should be better than nothing. If you want a "do nothing" > * version, then it should generate some harmless declaration, such as: > * #define __IDSTRING(name,string) struct __hack > */ >#define __IDSTRING(name,string) static const char name[] __unused = string >#endif ># 586 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Embed the rcs id of a source file in the resulting library. Note that in > * more recent ELF binutils, we use .ident allowing the ID to be stripped. > * Usage: > * __FBSDID("$FreeBSD: stable/12/sys/sys/cdefs.h 337399 2018-08-06 23:51:08Z jhb $"); > */ >#ifndef __FBSDID >#if 0 /* disabled by -frewrite-includes */ >#if !defined(STRIP_FBSDID) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 595 "/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 597 "/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) struct __hack >#endif ># 599 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 600 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID >#ifndef NO__RCSID >#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 605 "/usr/include/sys/cdefs.h" 3 4 >#define __RCSID(s) struct __hack >#endif ># 607 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 608 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID_SOURCE >#ifndef NO__RCSID_SOURCE >#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) >#else ># 613 "/usr/include/sys/cdefs.h" 3 4 >#define __RCSID_SOURCE(s) struct __hack >#endif ># 615 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 616 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __SCCSID >#ifndef NO__SCCSID >#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) >#else ># 621 "/usr/include/sys/cdefs.h" 3 4 >#define __SCCSID(s) struct __hack >#endif ># 623 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 624 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __COPYRIGHT >#ifndef NO__COPYRIGHT >#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) >#else ># 629 "/usr/include/sys/cdefs.h" 3 4 >#define __COPYRIGHT(s) struct __hack >#endif ># 631 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 632 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DECONST >#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) >#endif ># 636 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEVOLATILE >#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) >#endif ># 640 "/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEQUALIFY >#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) >#endif ># 644 "/usr/include/sys/cdefs.h" 3 4 > >/*- > * The following definitions are an extension of the behavior originally > * implemented in <sys/_posix.h>, but with a different level of granularity. > * POSIX.1 requires that the macros we test be defined before any standard > * header file is included. > * > * Here's a quick run-down of the versions: > * defined(_POSIX_SOURCE) 1003.1-1988 > * _POSIX_C_SOURCE == 1 1003.1-1990 > * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option > * _POSIX_C_SOURCE == 199309 1003.1b-1993 > * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, > * and the omnibus ISO/IEC 9945-1: 1996 > * _POSIX_C_SOURCE == 200112 1003.1-2001 > * _POSIX_C_SOURCE == 200809 1003.1-2008 > * > * In addition, the X/Open Portability Guide, which is now the Single UNIX > * Specification, defines a feature-test macro which indicates the version of > * that specification, and which subsumes _POSIX_C_SOURCE. > * > * Our macros begin with two underscores to avoid namespace screwage. > */ > >/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 670 "/usr/include/sys/cdefs.h" 3 4 >#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ >#define _POSIX_C_SOURCE 199009 >#endif ># 673 "/usr/include/sys/cdefs.h" 3 4 > >/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 676 "/usr/include/sys/cdefs.h" 3 4 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199209 >#endif ># 679 "/usr/include/sys/cdefs.h" 3 4 > >/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ >#ifdef _XOPEN_SOURCE >#if 0 /* disabled by -frewrite-includes */ >#if _XOPEN_SOURCE - 0 >= 700 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 683 "/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 700 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200809 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _XOPEN_SOURCE - 0 >= 600 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 687 "/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 600 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200112 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _XOPEN_SOURCE - 0 >= 500 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 691 "/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 500 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199506 >#endif ># 695 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 696 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Deal with all versions of POSIX. The ordering relative to the tests above is > * important. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 702 "/usr/include/sys/cdefs.h" 3 4 >#define _POSIX_C_SOURCE 198808 >#endif ># 704 "/usr/include/sys/cdefs.h" 3 4 >#ifdef _POSIX_C_SOURCE >#if 0 /* disabled by -frewrite-includes */ >#if _POSIX_C_SOURCE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 706 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __ISO_C_VISIBLE 1999 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 709 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200112 >#define __ISO_C_VISIBLE 1999 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199506 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 712 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199506 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 715 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199309 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199209 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 718 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199209 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199009 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 721 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199009 >#define __ISO_C_VISIBLE 1990 >#else ># 724 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 198808 >#define __ISO_C_VISIBLE 0 >#endif /* _POSIX_C_SOURCE */ ># 727 "/usr/include/sys/cdefs.h" 3 4 >#else ># 728 "/usr/include/sys/cdefs.h" 3 4 >/*- > * Deal with _ANSI_SOURCE: > * If it is defined, and no other compilation environment is explicitly > * requested, then define our internal feature-test macros to zero. This > * makes no difference to the preprocessor (undefined symbols in preprocessing > * expressions are defined to have value zero), but makes it more convenient for > * a test program to print out the values. > * > * If a program mistakenly defines _ANSI_SOURCE and some other macro such as > * _POSIX_C_SOURCE, we will assume that it wants the broader compilation > * environment (and in fact we will never get here). > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_ANSI_SOURCE) /* Hide almost everything. */ >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 741 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1990 >#define __EXT1_VISIBLE 0 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 747 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1999 >#define __EXT1_VISIBLE 0 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 753 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 0 >#else /* Default environment: show everything. */ ># 759 "/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __XSI_VISIBLE 700 >#define __BSD_VISIBLE 1 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 1 >#endif ># 765 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 766 "/usr/include/sys/cdefs.h" 3 4 > >/* User override __EXT1_VISIBLE */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__STDC_WANT_LIB_EXT1__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 769 "/usr/include/sys/cdefs.h" 3 4 >#undef __EXT1_VISIBLE >#if 0 /* disabled by -frewrite-includes */ >#if __STDC_WANT_LIB_EXT1__ >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 771 "/usr/include/sys/cdefs.h" 3 4 >#define __EXT1_VISIBLE 1 >#else ># 773 "/usr/include/sys/cdefs.h" 3 4 >#define __EXT1_VISIBLE 0 >#endif ># 775 "/usr/include/sys/cdefs.h" 3 4 >#endif /* __STDC_WANT_LIB_EXT1__ */ ># 776 "/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__mips) || defined(__powerpc64__) || defined(__riscv) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 778 "/usr/include/sys/cdefs.h" 3 4 >#define __NO_TLS 1 >#endif ># 780 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h > * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__arm__) && !defined(__ARM_ARCH) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 786 "/usr/include/sys/cdefs.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/acle-compat.h> >#endif /* expanded by -frewrite-includes */ ># 786 "/usr/include/sys/cdefs.h" 3 4 ># 787 "/usr/include/sys/cdefs.h" 3 4 >#endif ># 788 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Nullability qualifiers: currently only supported by Clang. > */ >#if 0 /* disabled by -frewrite-includes */ >#if !(defined(__clang__) && __has_feature(nullability)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 793 "/usr/include/sys/cdefs.h" 3 4 >#define _Nonnull >#define _Nullable >#define _Null_unspecified >#define __NULLABILITY_PRAGMA_PUSH >#define __NULLABILITY_PRAGMA_POP >#else ># 799 "/usr/include/sys/cdefs.h" 3 4 >#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ > _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") >#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") >#endif ># 803 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Type Safety Checking > * > * Clang provides additional attributes to enable checking type safety > * properties that cannot be enforced by the C type system. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if __has_attribute(__argument_with_type_tag__) && \ > __has_attribute(__type_tag_for_datatype__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 813 "/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ > __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) >#define __datatype_type_tag(kind, type) \ > __attribute__((__type_tag_for_datatype__(kind, type))) >#else ># 818 "/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) >#define __datatype_type_tag(kind, type) >#endif ># 821 "/usr/include/sys/cdefs.h" 3 4 > >/* > * Lock annotations. > * > * Clang provides support for doing basic thread-safety tests at > * compile-time, by marking which locks will/should be held when > * entering/leaving a functions. > * > * Furthermore, it is also possible to annotate variables and structure > * members to enforce that they are only accessed when certain locks are > * held. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if __has_extension(c_thread_safety_attributes) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 835 "/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) __attribute__((x)) >#else ># 837 "/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) >#endif ># 839 "/usr/include/sys/cdefs.h" 3 4 > >/* Structure implements a lock. */ >#define __lockable __lock_annotate(lockable) > >/* Function acquires an exclusive or shared lock. */ >#define __locks_exclusive(...) \ > __lock_annotate(exclusive_lock_function(__VA_ARGS__)) >#define __locks_shared(...) \ > __lock_annotate(shared_lock_function(__VA_ARGS__)) > >/* Function attempts to acquire an exclusive or shared lock. */ >#define __trylocks_exclusive(...) \ > __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) >#define __trylocks_shared(...) \ > __lock_annotate(shared_trylock_function(__VA_ARGS__)) > >/* Function releases a lock. */ >#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) > >/* Function asserts that an exclusive or shared lock is held. */ >#define __asserts_exclusive(...) \ > __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) >#define __asserts_shared(...) \ > __lock_annotate(assert_shared_lock(__VA_ARGS__)) > >/* Function requires that an exclusive or shared lock is or is not held. */ >#define __requires_exclusive(...) \ > __lock_annotate(exclusive_locks_required(__VA_ARGS__)) >#define __requires_shared(...) \ > __lock_annotate(shared_locks_required(__VA_ARGS__)) >#define __requires_unlocked(...) \ > __lock_annotate(locks_excluded(__VA_ARGS__)) > >/* Function should not be analyzed. */ >#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) > >/* Guard variables and structure members by lock. */ >#define __guarded_by(x) __lock_annotate(guarded_by(x)) >#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > >#endif /* !_SYS_CDEFS_H_ */ ># 880 "/usr/include/sys/cdefs.h" 3 4 ># 34 "/usr/src/lib/libnv/msgio.c" 2 >__FBSDID("$FreeBSD: stable/12/lib/libnv/msgio.c 350130 2019-07-19 15:07:31Z markj $"); > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/param.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/sys/param.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)param.h 8.3 (Berkeley) 4/4/95 > * $FreeBSD: stable/12/sys/sys/param.h 362916 2020-07-04 03:27:51Z delphij $ > */ > >#ifndef _SYS_PARAM_H_ >#define _SYS_PARAM_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/sys/_null.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2003 Marcel Moolenaar > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/_null.h 326256 2017-11-27 15:01:59Z pfg $ > */ > >#ifndef NULL > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 34 "/usr/include/sys/_null.h" 3 4 >#define NULL ((void *)0) >#else ># 36 "/usr/include/sys/_null.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 37 "/usr/include/sys/_null.h" 3 4 >#define NULL nullptr >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 39 "/usr/include/sys/_null.h" 3 4 >#define NULL __null >#else ># 41 "/usr/include/sys/_null.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if defined(__LP64__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 42 "/usr/include/sys/_null.h" 3 4 >#define NULL (0L) >#else ># 44 "/usr/include/sys/_null.h" 3 4 >#define NULL 0 >#endif /* __LP64__ */ ># 46 "/usr/include/sys/_null.h" 3 4 >#endif /* __GNUG__ */ ># 47 "/usr/include/sys/_null.h" 3 4 >#endif /* !__cplusplus */ ># 48 "/usr/include/sys/_null.h" 3 4 > >#endif ># 50 "/usr/include/sys/_null.h" 3 4 ># 44 "/usr/include/sys/param.h" 2 3 4 > >#define BSD 199506 /* System version (year & month). */ >#define BSD4_3 1 >#define BSD4_4 1 > >/* > * __FreeBSD_version numbers are documented in the Porter's Handbook. > * If you bump the version for any reason, you should update the documentation > * there. > * Currently this lives here in the doc/ repository: > * > * head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml > * > * scheme is: <major><two digit minor>Rxx > * 'R' is in the range 0 to 4 if this is a release branch or > * X.0-CURRENT before releng/X.0 is created, otherwise 'R' is > * in the range 5 to 9. > */ >#undef __FreeBSD_version >#define __FreeBSD_version 1201519 /* Master, propagated to newvers */ > >/* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, > * which by definition is always true on FreeBSD. This macro is also defined > * on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD. > * > * It is tempting to use this macro in userland code when we want to enable > * kernel-specific routines, and in fact it's fine to do this in code that > * is part of FreeBSD itself. However, be aware that as presence of this > * macro is still not widespread (e.g. older FreeBSD versions, 3rd party > * compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in > * external applications without also checking for __FreeBSD__ as an > * alternative. > */ >#undef __FreeBSD_kernel__ >#define __FreeBSD_kernel__ > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) || defined(IN_RTLD) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 82 "/usr/include/sys/param.h" 3 4 >#define P_OSREL_SIGWAIT 700000 >#define P_OSREL_SIGSEGV 700004 >#define P_OSREL_MAP_ANON 800104 >#define P_OSREL_MAP_FSTRICT 1100036 >#define P_OSREL_SHUTDOWN_ENOTCONN 1100077 >#define P_OSREL_MAP_GUARD 1200035 >#define P_OSREL_WRFSBASE 1200041 >#define P_OSREL_CK_CYLGRP 1200046 >#define P_OSREL_VMTOTAL64 1200054 > >#define P_OSREL_MAJOR(x) ((x) / 100000) >#endif ># 94 "/usr/include/sys/param.h" 3 4 > >#ifndef LOCORE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> >#endif /* expanded by -frewrite-includes */ ># 96 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/sys/types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)types.h 8.6 (Berkeley) 2/19/95 > * $FreeBSD: stable/12/sys/sys/types.h 360400 2020-04-27 22:27:46Z kevans $ > */ > >#ifndef _SYS_TYPES_H_ >#define _SYS_TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/sys/types.h" 3 4 ># 44 "/usr/include/sys/types.h" 3 4 > >/* Machine type dependent parameters. */ >#if 0 /* expanded by -frewrite-includes */ >#include <machine/endian.h> >#endif /* expanded by -frewrite-includes */ ># 46 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/endian.h 232266 2012-02-28 19:39:54Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/endian.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/endian.h" 3 4 ># 1 "/usr/include/x86/endian.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)endian.h 7.8 (Berkeley) 4/3/91 > * $FreeBSD: stable/12/sys/x86/include/endian.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _MACHINE_ENDIAN_H_ >#define _MACHINE_ENDIAN_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/x86/endian.h" 3 4 ># 39 "/usr/include/x86/endian.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/x86/endian.h" 3 4 ># 1 "/usr/include/sys/_types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/_types.h 350956 2019-08-12 20:21:36Z asomers $ > */ > >#ifndef _SYS__TYPES_H_ >#define _SYS__TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/include/sys/_types.h" 3 4 ># 35 "/usr/include/sys/_types.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/include/sys/_types.h" 3 4 ># 1 "/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_types.h 232261 2012-02-28 18:15:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_types.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_types.h" 3 4 ># 1 "/usr/include/x86/_types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-4-Clause > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 > * From: @(#)types.h 8.3 (Berkeley) 1/5/94 > * $FreeBSD: stable/12/sys/x86/include/_types.h 329859 2018-02-23 04:04:25Z imp $ > */ > >#ifndef _MACHINE__TYPES_H_ >#define _MACHINE__TYPES_H_ > >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 47 "/usr/include/x86/_types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/include/x86/_types.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 1 "/usr/include/x86/_limits.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)limits.h 8.3 (Berkeley) 1/4/94 > * $FreeBSD: stable/12/sys/x86/include/_limits.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _MACHINE__LIMITS_H_ >#define _MACHINE__LIMITS_H_ > >/* > * According to ANSI (section 2.2.4.2), the values below must be usable by > * #if preprocessing directives. Additionally, the expression must have the > * same type as would an expression that is an object of the corresponding > * type converted according to the integral promotions. The subtraction for > * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an > * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). > */ > >#define __CHAR_BIT 8 /* number of bits in a char */ > >#define __SCHAR_MAX 0x7f /* max value for a signed char */ >#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ > >#define __UCHAR_MAX 0xff /* max value for an unsigned char */ > >#define __USHRT_MAX 0xffff /* max value for an unsigned short */ >#define __SHRT_MAX 0x7fff /* max value for a short */ >#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ > >#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ >#define __INT_MAX 0x7fffffff /* max value for an int */ >#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ > >#ifdef __LP64__ >#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ >#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ >#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ >#else ># 67 "/usr/include/x86/_limits.h" 3 4 >#define __ULONG_MAX 0xffffffffUL >#define __LONG_MAX 0x7fffffffL >#define __LONG_MIN (-0x7fffffffL - 1) >#endif ># 71 "/usr/include/x86/_limits.h" 3 4 > > /* max value for an unsigned long long */ >#define __ULLONG_MAX 0xffffffffffffffffULL >#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ >#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ > >#ifdef __LP64__ >#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ >#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ >#define __OFF_MAX __LONG_MAX /* max value for an off_t */ >#define __OFF_MIN __LONG_MIN /* min value for an off_t */ >/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ >#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ >#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ >#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ >#define __LONG_BIT 64 >#else ># 88 "/usr/include/x86/_limits.h" 3 4 >#define __SSIZE_MAX __INT_MAX >#define __SIZE_T_MAX __UINT_MAX >#define __OFF_MAX __LLONG_MAX >#define __OFF_MIN __LLONG_MIN >#define __UQUAD_MAX __ULLONG_MAX >#define __QUAD_MAX __LLONG_MAX >#define __QUAD_MIN __LLONG_MIN >#define __LONG_BIT 32 >#endif ># 97 "/usr/include/x86/_limits.h" 3 4 > >#define __WORD_BIT 32 > >/* Minimum signal stack size. */ >#define __MINSIGSTKSZ (512 * 4) > >#endif /* !_MACHINE__LIMITS_H_ */ ># 104 "/usr/include/x86/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 2 3 4 ># 49 "/usr/include/x86/_types.h" 2 3 4 > >#define __NO_STRICT_ALIGNMENT > >/* > * Basic types upon which most other types are built. > */ >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef short __int16_t; >typedef unsigned short __uint16_t; >typedef int __int32_t; >typedef unsigned int __uint32_t; >#ifdef __LP64__ >typedef long __int64_t; >typedef unsigned long __uint64_t; >#else ># 65 "/usr/include/x86/_types.h" 3 4 >__extension__ >typedef long long __int64_t; >__extension__ >typedef unsigned long long __uint64_t; >#endif ># 70 "/usr/include/x86/_types.h" 3 4 > >/* > * Standard type definitions. > */ >#ifdef __LP64__ >typedef __int32_t __clock_t; /* clock()... */ >typedef __int64_t __critical_t; >#ifndef _STANDALONE >typedef double __double_t; >typedef float __float_t; >#endif ># 81 "/usr/include/x86/_types.h" 3 4 >typedef __int64_t __intfptr_t; >typedef __int64_t __intptr_t; >#else ># 84 "/usr/include/x86/_types.h" 3 4 >typedef unsigned long __clock_t; >typedef __int32_t __critical_t; >#ifndef _STANDALONE >typedef long double __double_t; >typedef long double __float_t; >#endif ># 90 "/usr/include/x86/_types.h" 3 4 >typedef __int32_t __intfptr_t; >typedef __int32_t __intptr_t; >#endif ># 93 "/usr/include/x86/_types.h" 3 4 >typedef __int64_t __intmax_t; >typedef __int32_t __int_fast8_t; >typedef __int32_t __int_fast16_t; >typedef __int32_t __int_fast32_t; >typedef __int64_t __int_fast64_t; >typedef __int8_t __int_least8_t; >typedef __int16_t __int_least16_t; >typedef __int32_t __int_least32_t; >typedef __int64_t __int_least64_t; >#ifdef __LP64__ >typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ >typedef __int64_t __register_t; >typedef __int64_t __segsz_t; /* segment size (in pages) */ >typedef __uint64_t __size_t; /* sizeof() */ >typedef __int64_t __ssize_t; /* byte count or error */ >typedef __int64_t __time_t; /* time()... */ >typedef __uint64_t __uintfptr_t; >typedef __uint64_t __uintptr_t; >#else ># 112 "/usr/include/x86/_types.h" 3 4 >typedef __int32_t __ptrdiff_t; >typedef __int32_t __register_t; >typedef __int32_t __segsz_t; >typedef __uint32_t __size_t; >typedef __int32_t __ssize_t; >typedef __int32_t __time_t; >typedef __uint32_t __uintfptr_t; >typedef __uint32_t __uintptr_t; >#endif ># 121 "/usr/include/x86/_types.h" 3 4 >typedef __uint64_t __uintmax_t; >typedef __uint32_t __uint_fast8_t; >typedef __uint32_t __uint_fast16_t; >typedef __uint32_t __uint_fast32_t; >typedef __uint64_t __uint_fast64_t; >typedef __uint8_t __uint_least8_t; >typedef __uint16_t __uint_least16_t; >typedef __uint32_t __uint_least32_t; >typedef __uint64_t __uint_least64_t; >#ifdef __LP64__ >typedef __uint64_t __u_register_t; >typedef __uint64_t __vm_offset_t; >typedef __uint64_t __vm_paddr_t; >typedef __uint64_t __vm_size_t; >#else ># 136 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __u_register_t; >typedef __uint32_t __vm_offset_t; >#ifdef PAE >typedef __uint64_t __vm_paddr_t; >#else ># 141 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_paddr_t; >#endif ># 143 "/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __vm_size_t; >#endif ># 145 "/usr/include/x86/_types.h" 3 4 >typedef int ___wchar_t; > >#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ >#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > >#endif /* !_MACHINE__TYPES_H_ */ ># 151 "/usr/include/x86/_types.h" 3 4 ># 7 "/usr/include/machine/_types.h" 2 3 4 ># 36 "/usr/include/sys/_types.h" 2 3 4 > >/* > * Standard type definitions. > */ >typedef __int32_t __blksize_t; /* file block size */ >typedef __int64_t __blkcnt_t; /* file block count */ >typedef __int32_t __clockid_t; /* clock_gettime()... */ >typedef __uint32_t __fflags_t; /* file flags */ >typedef __uint64_t __fsblkcnt_t; >typedef __uint64_t __fsfilcnt_t; >typedef __uint32_t __gid_t; >typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ >typedef __uint64_t __ino_t; /* inode number */ >typedef long __key_t; /* IPC key (for Sys V IPC) */ >typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ >typedef __uint16_t __mode_t; /* permissions */ >typedef int __accmode_t; /* access permissions */ >typedef int __nl_item; >typedef __uint64_t __nlink_t; /* link count */ >typedef __int64_t __off_t; /* file offset */ >typedef __int64_t __off64_t; /* file offset (alias) */ >typedef __int32_t __pid_t; /* process [group] */ >typedef __int64_t __rlim_t; /* resource limit - intentionally */ > /* signed, because of legacy code */ > /* that uses -1 for RLIM_INFINITY */ >typedef __uint8_t __sa_family_t; >typedef __uint32_t __socklen_t; >typedef long __suseconds_t; /* microseconds (signed) */ >typedef struct __timer *__timer_t; /* timer_gettime()... */ >typedef struct __mq *__mqd_t; /* mq_open()... */ >typedef __uint32_t __uid_t; >typedef unsigned int __useconds_t; /* microseconds (unsigned) */ >typedef int __cpuwhich_t; /* which parameter for cpuset. */ >typedef int __cpulevel_t; /* level parameter for cpuset. */ >typedef int __cpusetid_t; /* cpuset identifier. */ >typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ > >/* > * Unusual type definitions. > */ >/* > * rune_t is declared to be an ``int'' instead of the more natural > * ``unsigned long'' or ``long''. Two things are happening here. It is not > * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, > * it looks like 10646 will be a 31 bit standard. This means that if your > * ints cannot hold 32 bits, you will be in trouble. The reason an int was > * chosen over a long is that the is*() and to*() routines take ints (says > * ANSI C), but they use __ct_rune_t instead of int. > * > * NOTE: rune_t is not covered by ANSI nor other standards, and should not > * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and > * rune_t must be the same type. Also, wint_t should be able to hold all > * members of the largest character set plus one extra value (WEOF), and > * must be at least 16 bits. > */ >typedef int __ct_rune_t; /* arg type for ctype funcs */ >typedef __ct_rune_t __rune_t; /* rune_t (see above) */ >typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > >/* Clang already provides these types as built-ins, but only in C++ mode. */ >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__clang__) || !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 97 "/usr/include/sys/_types.h" 3 4 >typedef __uint_least16_t __char16_t; >typedef __uint_least32_t __char32_t; >#endif ># 100 "/usr/include/sys/_types.h" 3 4 >/* In C++11, char16_t and char32_t are built-in types. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 102 "/usr/include/sys/_types.h" 3 4 >#define _CHAR16_T_DECLARED >#define _CHAR32_T_DECLARED >#endif ># 105 "/usr/include/sys/_types.h" 3 4 > >typedef struct { > long long __max_align1 __aligned(_Alignof(long long)); >#ifndef _STANDALONE > long double __max_align2 __aligned(_Alignof(long double)); >#endif ># 111 "/usr/include/sys/_types.h" 3 4 >} __max_align_t; > >typedef __uint64_t __dev_t; /* device number */ > >typedef __uint32_t __fixpt_t; /* fixed point number */ > >/* > * mbstate_t is an opaque object to keep conversion state during multibyte > * stream conversions. > */ >typedef union { > char __mbstate8[128]; > __int64_t _mbstateL; /* for alignment */ >} __mbstate_t; > >typedef __uintmax_t __rman_res_t; > >/* > * Types for varargs. These are all provided by builtin types these > * days, so centralize their definition. > */ >#ifdef __GNUCLIKE_BUILTIN_VARARGS >typedef __builtin_va_list __va_list; /* internally known to gcc */ >#else ># 135 "/usr/include/sys/_types.h" 3 4 >#error "No support for your compiler for stdargs" >#endif ># 137 "/usr/include/sys/_types.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ > && !defined(__NO_GNUC_VA_LIST) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 139 "/usr/include/sys/_types.h" 3 4 >#define __GNUC_VA_LIST >typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ >#endif ># 142 "/usr/include/sys/_types.h" 3 4 > >/* > * When the following macro is defined, the system uses 64-bit inode numbers. > * Programs can use this to avoid including <sys/param.h>, with its associated > * namespace pollution. > */ >#define __INO64 > >#endif /* !_SYS__TYPES_H_ */ ># 151 "/usr/include/sys/_types.h" 3 4 ># 40 "/usr/include/x86/endian.h" 2 3 4 > >/* > * Define the order of 32-bit words in 64-bit words. > */ >#define _QUAD_HIGHWORD 1 >#define _QUAD_LOWWORD 0 > >/* > * Definitions for byte order, according to byte significance from low > * address to high. > */ >#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ >#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ >#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ > >#define _BYTE_ORDER _LITTLE_ENDIAN > >/* > * Deprecated variants that don't have enough underscores to be useful in more > * strict namespaces. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 62 "/usr/include/x86/endian.h" 3 4 >#define LITTLE_ENDIAN _LITTLE_ENDIAN >#define BIG_ENDIAN _BIG_ENDIAN >#define PDP_ENDIAN _PDP_ENDIAN >#define BYTE_ORDER _BYTE_ORDER >#endif ># 67 "/usr/include/x86/endian.h" 3 4 > >#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) >#define __bswap32_gen(x) \ > (((__uint32_t)__bswap16((x) & 0xffff) << 16) | __bswap16((x) >> 16)) >#define __bswap64_gen(x) \ > (((__uint64_t)__bswap32((x) & 0xffffffff) << 32) | __bswap32((x) >> 32)) > >#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P >#define __bswap16(x) \ > ((__uint16_t)(__builtin_constant_p(x) ? \ > __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))) >#define __bswap32(x) \ > (__builtin_constant_p(x) ? \ > __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) >#define __bswap64(x) \ > (__builtin_constant_p(x) ? \ > __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x)) >#else ># 85 "/usr/include/x86/endian.h" 3 4 >/* XXX these are broken for use in static initializers. */ >#define __bswap16(x) __bswap16_var(x) >#define __bswap32(x) __bswap32_var(x) >#define __bswap64(x) __bswap64_var(x) >#endif ># 90 "/usr/include/x86/endian.h" 3 4 > >/* These are defined as functions to avoid multiple evaluation of x. */ > >static __inline __uint16_t >__bswap16_var(__uint16_t _x) >{ > > return (__bswap16_gen(_x)); >} > >static __inline __uint32_t >__bswap32_var(__uint32_t _x) >{ > >#ifdef __GNUCLIKE_ASM > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 108 "/usr/include/x86/endian.h" 3 4 > return (__bswap32_gen(_x)); >#endif ># 110 "/usr/include/x86/endian.h" 3 4 >} > >static __inline __uint64_t >__bswap64_var(__uint64_t _x) >{ > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__amd64__) && defined(__GNUCLIKE_ASM) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 117 "/usr/include/x86/endian.h" 3 4 > __asm("bswap %0" : "+r" (_x)); > return (_x); >#else ># 120 "/usr/include/x86/endian.h" 3 4 > /* > * It is important for the optimizations that the following is not > * really generic, but expands to 2 __bswap32_var()'s. > */ > return (__bswap64_gen(_x)); >#endif ># 126 "/usr/include/x86/endian.h" 3 4 >} > >#define __htonl(x) __bswap32(x) >#define __htons(x) __bswap16(x) >#define __ntohl(x) __bswap32(x) >#define __ntohs(x) __bswap16(x) > >#endif /* !_MACHINE_ENDIAN_H_ */ ># 134 "/usr/include/x86/endian.h" 3 4 ># 7 "/usr/include/machine/endian.h" 2 3 4 ># 47 "/usr/include/sys/types.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/include/sys/types.h" 3 4 ># 48 "/usr/include/sys/types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/_pthreadtypes.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY > * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER > * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/_pthreadtypes.h 326256 2017-11-27 15:01:59Z pfg $ > */ > >#ifndef _SYS__PTHREADTYPES_H_ >#define _SYS__PTHREADTYPES_H_ > >/* > * Forward structure definitions. > * > * These are mostly opaque to the user. > */ >struct pthread; >struct pthread_attr; >struct pthread_cond; >struct pthread_cond_attr; >struct pthread_mutex; >struct pthread_mutex_attr; >struct pthread_once; >struct pthread_rwlock; >struct pthread_rwlockattr; >struct pthread_barrier; >struct pthread_barrier_attr; >struct pthread_spinlock; > >/* > * Primitive system data type definitions required by P1003.1c. > * > * Note that P1003.1c specifies that there are no defined comparison > * or assignment operators for the types pthread_attr_t, pthread_cond_t, > * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. > */ >#ifndef _PTHREAD_T_DECLARED >typedef struct pthread *pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 70 "/usr/include/sys/_pthreadtypes.h" 3 4 >typedef struct pthread_attr *pthread_attr_t; >typedef struct pthread_mutex *pthread_mutex_t; >typedef struct pthread_mutex_attr *pthread_mutexattr_t; >typedef struct pthread_cond *pthread_cond_t; >typedef struct pthread_cond_attr *pthread_condattr_t; >typedef int pthread_key_t; >typedef struct pthread_once pthread_once_t; >typedef struct pthread_rwlock *pthread_rwlock_t; >typedef struct pthread_rwlockattr *pthread_rwlockattr_t; >typedef struct pthread_barrier *pthread_barrier_t; >typedef struct pthread_barrierattr *pthread_barrierattr_t; >typedef struct pthread_spinlock *pthread_spinlock_t; > >/* > * Additional type definitions: > * > * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for > * use in header symbols. > */ >typedef void *pthread_addr_t; >typedef void *(*pthread_startroutine_t)(void *); > >/* > * Once definitions. > */ >struct pthread_once { > int state; > pthread_mutex_t mutex; >}; > >#endif /* ! _SYS__PTHREADTYPES_H_ */ ># 101 "/usr/include/sys/_pthreadtypes.h" 3 4 ># 50 "/usr/include/sys/types.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 52 "/usr/include/sys/types.h" 3 4 >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; >#ifndef _KERNEL >typedef unsigned short ushort; /* Sys V compatibility */ >typedef unsigned int uint; /* Sys V compatibility */ >#endif ># 60 "/usr/include/sys/types.h" 3 4 >#endif ># 61 "/usr/include/sys/types.h" 3 4 > >/* > * XXX POSIX sized integrals that should appear only in <sys/stdint.h>. > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 65 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/_stdint.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/_stdint.h 326256 2017-11-27 15:01:59Z pfg $ > */ > >#ifndef _SYS__STDINT_H_ >#define _SYS__STDINT_H_ > >#ifndef _INT8_T_DECLARED >typedef __int8_t int8_t; >#define _INT8_T_DECLARED >#endif ># 39 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT16_T_DECLARED >typedef __int16_t int16_t; >#define _INT16_T_DECLARED >#endif ># 44 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT32_T_DECLARED >typedef __int32_t int32_t; >#define _INT32_T_DECLARED >#endif ># 49 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT64_T_DECLARED >typedef __int64_t int64_t; >#define _INT64_T_DECLARED >#endif ># 54 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 59 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 64 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 69 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 74 "/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INTPTR_T_DECLARED >typedef __intptr_t intptr_t; >#define _INTPTR_T_DECLARED >#endif ># 79 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 83 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _INTMAX_T_DECLARED >typedef __intmax_t intmax_t; >#define _INTMAX_T_DECLARED >#endif ># 87 "/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTMAX_T_DECLARED >typedef __uintmax_t uintmax_t; >#define _UINTMAX_T_DECLARED >#endif ># 91 "/usr/include/sys/_stdint.h" 3 4 > >#endif /* !_SYS__STDINT_H_ */ ># 93 "/usr/include/sys/_stdint.h" 3 4 ># 66 "/usr/include/sys/types.h" 2 3 4 > >typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ >typedef __uint16_t u_int16_t; >typedef __uint32_t u_int32_t; >typedef __uint64_t u_int64_t; > >typedef __uint64_t u_quad_t; /* quads (deprecated) */ >typedef __int64_t quad_t; >typedef quad_t * qaddr_t; > >typedef char * caddr_t; /* core address */ >typedef const char * c_caddr_t; /* core address, pointer to const */ > >#ifndef _BLKSIZE_T_DECLARED >typedef __blksize_t blksize_t; >#define _BLKSIZE_T_DECLARED >#endif ># 83 "/usr/include/sys/types.h" 3 4 > >typedef __cpuwhich_t cpuwhich_t; >typedef __cpulevel_t cpulevel_t; >typedef __cpusetid_t cpusetid_t; > >#ifndef _BLKCNT_T_DECLARED >typedef __blkcnt_t blkcnt_t; >#define _BLKCNT_T_DECLARED >#endif ># 92 "/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 97 "/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 102 "/usr/include/sys/types.h" 3 4 > >typedef __critical_t critical_t; /* Critical section value */ >typedef __daddr_t daddr_t; /* disk address */ > >#ifndef _DEV_T_DECLARED >typedef __dev_t dev_t; /* device number or struct cdev */ >#define _DEV_T_DECLARED >#endif ># 110 "/usr/include/sys/types.h" 3 4 > >#ifndef _FFLAGS_T_DECLARED >typedef __fflags_t fflags_t; /* file flags */ >#define _FFLAGS_T_DECLARED >#endif ># 115 "/usr/include/sys/types.h" 3 4 > >typedef __fixpt_t fixpt_t; /* fixed point number */ > >#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ >typedef __fsblkcnt_t fsblkcnt_t; >typedef __fsfilcnt_t fsfilcnt_t; >#define _FSBLKCNT_T_DECLARED >#endif ># 123 "/usr/include/sys/types.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; /* group id */ >#define _GID_T_DECLARED >#endif ># 128 "/usr/include/sys/types.h" 3 4 > >#ifndef _IN_ADDR_T_DECLARED >typedef __uint32_t in_addr_t; /* base type for internet address */ >#define _IN_ADDR_T_DECLARED >#endif ># 133 "/usr/include/sys/types.h" 3 4 > >#ifndef _IN_PORT_T_DECLARED >typedef __uint16_t in_port_t; >#define _IN_PORT_T_DECLARED >#endif ># 138 "/usr/include/sys/types.h" 3 4 > >#ifndef _ID_T_DECLARED >typedef __id_t id_t; /* can hold a uid_t or pid_t */ >#define _ID_T_DECLARED >#endif ># 143 "/usr/include/sys/types.h" 3 4 > >#ifndef _INO_T_DECLARED >typedef __ino_t ino_t; /* inode number */ >#define _INO_T_DECLARED >#endif ># 148 "/usr/include/sys/types.h" 3 4 > >#ifndef _KEY_T_DECLARED >typedef __key_t key_t; /* IPC key (for Sys V IPC) */ >#define _KEY_T_DECLARED >#endif ># 153 "/usr/include/sys/types.h" 3 4 > >#ifndef _LWPID_T_DECLARED >typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ >#define _LWPID_T_DECLARED >#endif ># 158 "/usr/include/sys/types.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; /* permissions */ >#define _MODE_T_DECLARED >#endif ># 163 "/usr/include/sys/types.h" 3 4 > >#ifndef _ACCMODE_T_DECLARED >typedef __accmode_t accmode_t; /* access permissions */ >#define _ACCMODE_T_DECLARED >#endif ># 168 "/usr/include/sys/types.h" 3 4 > >#ifndef _NLINK_T_DECLARED >typedef __nlink_t nlink_t; /* link count */ >#define _NLINK_T_DECLARED >#endif ># 173 "/usr/include/sys/types.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; /* file offset */ >#define _OFF_T_DECLARED >#endif ># 178 "/usr/include/sys/types.h" 3 4 > >#ifndef _OFF64_T_DECLARED >typedef __off64_t off64_t; /* file offset (alias) */ >#define _OFF64_T_DECLARED >#endif ># 183 "/usr/include/sys/types.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; /* process id */ >#define _PID_T_DECLARED >#endif ># 188 "/usr/include/sys/types.h" 3 4 > >typedef __register_t register_t; > >#ifndef _RLIM_T_DECLARED >typedef __rlim_t rlim_t; /* resource limit */ >#define _RLIM_T_DECLARED >#endif ># 195 "/usr/include/sys/types.h" 3 4 > >typedef __int64_t sbintime_t; > >typedef __segsz_t segsz_t; /* segment size (in pages) */ > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 204 "/usr/include/sys/types.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 209 "/usr/include/sys/types.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; /* microseconds (signed) */ >#define _SUSECONDS_T_DECLARED >#endif ># 214 "/usr/include/sys/types.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 219 "/usr/include/sys/types.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 224 "/usr/include/sys/types.h" 3 4 > >#ifndef _MQD_T_DECLARED >typedef __mqd_t mqd_t; >#define _MQD_T_DECLARED >#endif ># 229 "/usr/include/sys/types.h" 3 4 > >typedef __u_register_t u_register_t; > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; /* user id */ >#define _UID_T_DECLARED >#endif ># 236 "/usr/include/sys/types.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; /* microseconds (unsigned) */ >#define _USECONDS_T_DECLARED >#endif ># 241 "/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_IOCTL_T_DECLARED >#define _CAP_IOCTL_T_DECLARED >typedef unsigned long cap_ioctl_t; >#endif ># 246 "/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_RIGHTS_T_DECLARED >#define _CAP_RIGHTS_T_DECLARED >struct cap_rights; > >typedef struct cap_rights cap_rights_t; >#endif ># 253 "/usr/include/sys/types.h" 3 4 > >/* > * Types suitable for exporting size and pointers (as virtual addresses) > * from the kernel independent of native word size. These should be > * used in place of size_t and (u)intptr_t in structs which contain such > * types that are shared with userspace. > */ >typedef __uint64_t kvaddr_t; >typedef __uint64_t ksize_t; > >typedef __vm_offset_t vm_offset_t; >typedef __uint64_t vm_ooffset_t; >typedef __vm_paddr_t vm_paddr_t; >typedef __uint64_t vm_pindex_t; >typedef __vm_size_t vm_size_t; > >typedef __rman_res_t rman_res_t; > >#ifdef _KERNEL >typedef int boolean_t; >typedef struct device *device_t; >typedef __intfptr_t intfptr_t; > >/* > * XXX this is fixed width for historical reasons. It should have had type > * __int_fast32_t. Fixed-width types should not be used unless binary > * compatibility is essential. Least-width types should be used even less > * since they provide smaller benefits. > * > * XXX should be MD. > * > * XXX this is bogus in -current, but still used for spl*(). > */ >typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ > >typedef __uintfptr_t uintfptr_t; >typedef __uint64_t uoff_t; >typedef char vm_memattr_t; /* memory attribute codes */ >typedef struct vm_page *vm_page_t; > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 294 "/usr/include/sys/types.h" 3 4 >#define __bool_true_false_are_defined 1 >#define false 0 >#define true 1 >#if 0 /* disabled by -frewrite-includes */ >#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 298 "/usr/include/sys/types.h" 3 4 >typedef int _Bool; >#endif ># 300 "/usr/include/sys/types.h" 3 4 >typedef _Bool bool; >#endif /* !__bool_true_false_are_defined && !__cplusplus */ ># 302 "/usr/include/sys/types.h" 3 4 > >#define offsetof(type, field) __offsetof(type, field) > >#endif /* _KERNEL */ ># 306 "/usr/include/sys/types.h" 3 4 > >/* > * The following are all things that really shouldn't exist in this header, > * since its purpose is to provide typedefs, not miscellaneous doodads. > */ > >#ifdef __POPCNT__ >#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) >#define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) >#define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) >#define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) >#define __bitcount(x) __builtin_popcount((unsigned int)(x)) >#else ># 319 "/usr/include/sys/types.h" 3 4 >/* > * Population count algorithm using SWAR approach > * - "SIMD Within A Register". > */ >static __inline __uint16_t >__bitcount16(__uint16_t _x) >{ > > _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); > _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f; > _x = (_x + (_x >> 8)) & 0x00ff; > return (_x); >} > >static __inline __uint32_t >__bitcount32(__uint32_t _x) >{ > > _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); > _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)) & 0x000000ff; > return (_x); >} > >#ifdef __LP64__ >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); > _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)); > _x = (_x + (_x >> 32)) & 0x000000ff; > return (_x); >} > >#define __bitcountl(x) __bitcount64((unsigned long)(x)) >#else ># 362 "/usr/include/sys/types.h" 3 4 >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > return (__bitcount32(_x >> 32) + __bitcount32(_x)); >} > >#define __bitcountl(x) __bitcount32((unsigned long)(x)) >#endif ># 371 "/usr/include/sys/types.h" 3 4 >#define __bitcount(x) __bitcount32((unsigned int)(x)) >#endif ># 373 "/usr/include/sys/types.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 375 "/usr/include/sys/types.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/select.h> >#endif /* expanded by -frewrite-includes */ ># 376 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/select.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/select.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS_SELECT_H_ >#define _SYS_SELECT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/sys/select.h" 3 4 ># 38 "/usr/include/sys/select.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/select.h" 3 4 ># 39 "/usr/include/sys/select.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/sys/_sigset.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: stable/12/sys/sys/_sigset.h 356193 2019-12-30 00:49:49Z kib $ > */ > >#ifndef _SYS__SIGSET_H_ >#define _SYS__SIGSET_H_ > >/* > * sigset_t macros. > */ >#define _SIG_WORDS 4 >#define _SIG_MAXSIG 128 >#define _SIG_IDX(sig) ((sig) - 1) >#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) >#define _SIG_BIT(sig) (1U << (_SIG_IDX(sig) & 31)) >#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) > >typedef struct __sigset { > __uint32_t __bits[_SIG_WORDS]; >} __sigset_t; > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) && defined(COMPAT_43) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 58 "/usr/include/sys/_sigset.h" 3 4 >typedef unsigned int osigset_t; >#endif ># 60 "/usr/include/sys/_sigset.h" 3 4 > >#endif /* !_SYS__SIGSET_H_ */ ># 62 "/usr/include/sys/_sigset.h" 3 4 ># 41 "/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timeval.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/sys/_timeval.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/_timeval.h 326256 2017-11-27 15:01:59Z pfg $ > */ > >#ifndef _SYS__TIMEVAL_H_ >#define _SYS__TIMEVAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/include/sys/_timeval.h" 3 4 ># 35 "/usr/include/sys/_timeval.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; >#define _SUSECONDS_T_DECLARED >#endif ># 40 "/usr/include/sys/_timeval.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 45 "/usr/include/sys/_timeval.h" 3 4 > >/* > * Structure returned by gettimeofday(2) system call, and used in other calls. > */ >struct timeval { > time_t tv_sec; /* seconds */ > suseconds_t tv_usec; /* and microseconds */ >}; > >#endif /* !_SYS__TIMEVAL_H_ */ ># 55 "/usr/include/sys/_timeval.h" 3 4 ># 42 "/usr/include/sys/select.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/timespec.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/sys/timespec.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: stable/12/sys/sys/timespec.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS_TIMESPEC_H_ >#define _SYS_TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/sys/timespec.h" 3 4 ># 40 "/usr/include/sys/timespec.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/sys/timespec.h" 3 4 ># 1 "/usr/include/sys/_timespec.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)time.h 8.5 (Berkeley) 5/4/95 > * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp > * $FreeBSD: stable/12/sys/sys/_timespec.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS__TIMESPEC_H_ >#define _SYS__TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/sys/_timespec.h" 3 4 ># 40 "/usr/include/sys/_timespec.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 45 "/usr/include/sys/_timespec.h" 3 4 > >struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ >}; > >#endif /* !_SYS__TIMESPEC_H_ */ ># 52 "/usr/include/sys/_timespec.h" 3 4 ># 41 "/usr/include/sys/timespec.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 43 "/usr/include/sys/timespec.h" 3 4 >#define TIMEVAL_TO_TIMESPEC(tv, ts) \ > do { \ > (ts)->tv_sec = (tv)->tv_sec; \ > (ts)->tv_nsec = (tv)->tv_usec * 1000; \ > } while (0) >#define TIMESPEC_TO_TIMEVAL(tv, ts) \ > do { \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = (ts)->tv_nsec / 1000; \ > } while (0) > >#endif /* __BSD_VISIBLE */ ># 55 "/usr/include/sys/timespec.h" 3 4 > >/* > * Structure defined by POSIX.1b to be like a itimerval, but with > * timespecs. Used in the timer_*() system calls. > */ >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >#endif /* _SYS_TIMESPEC_H_ */ ># 66 "/usr/include/sys/timespec.h" 3 4 ># 43 "/usr/include/sys/select.h" 2 3 4 > >typedef unsigned long __fd_mask; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 46 "/usr/include/sys/select.h" 3 4 >typedef __fd_mask fd_mask; >#endif ># 48 "/usr/include/sys/select.h" 3 4 > >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 53 "/usr/include/sys/select.h" 3 4 > >/* > * Select uses bit masks of file descriptors in longs. These macros > * manipulate such bit fields (the filesystem macros use chars). > * FD_SETSIZE may be defined by the user, but the default here should > * be enough for most uses. > */ >#ifndef FD_SETSIZE >#define FD_SETSIZE 1024 >#endif ># 63 "/usr/include/sys/select.h" 3 4 > >#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 66 "/usr/include/sys/select.h" 3 4 >#define NFDBITS _NFDBITS >#endif ># 68 "/usr/include/sys/select.h" 3 4 > >#ifndef _howmany >#define _howmany(x, y) (((x) + ((y) - 1)) / (y)) >#endif ># 72 "/usr/include/sys/select.h" 3 4 > >typedef struct fd_set { > __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; >} fd_set; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 77 "/usr/include/sys/select.h" 3 4 >#define fds_bits __fds_bits >#endif ># 79 "/usr/include/sys/select.h" 3 4 > >#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) >#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 83 "/usr/include/sys/select.h" 3 4 >#define FD_COPY(f, t) (void)(*(t) = *(f)) >#endif ># 85 "/usr/include/sys/select.h" 3 4 >#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) >#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) >#define FD_ZERO(p) do { \ > fd_set *_p; \ > __size_t _n; \ > \ > _p = (p); \ > _n = _howmany(FD_SETSIZE, _NFDBITS); \ > while (_n > 0) \ > _p->__fds_bits[--_n] = 0; \ >} while (0) > >#ifndef _KERNEL > >__BEGIN_DECLS >int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, > const struct timespec *__restrict, const sigset_t *__restrict); >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >/* XXX missing restrict type-qualifier */ >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 107 "/usr/include/sys/select.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 109 "/usr/include/sys/select.h" 3 4 > >#endif /* _SYS_SELECT_H_ */ ># 111 "/usr/include/sys/select.h" 3 4 ># 377 "/usr/include/sys/types.h" 2 3 4 > >/* > * The major and minor numbers are encoded in dev_t as MMMmmmMm (where > * letters correspond to bytes). The encoding of the lower 4 bytes is > * constrained by compatibility with 16-bit and 32-bit dev_t's. The > * encoding of of the upper 4 bytes is the least unnatural one consistent > * with this and other constraints. Also, the decoding of the m bytes by > * minor() is unnatural to maximize compatibility subject to not discarding > * bits. The upper m byte is shifted into the position of the lower M byte > * instead of shifting 3 upper m bytes to close the gap. Compatibility for > * minor() is achieved iff the upper m byte is 0. > */ >#define major(d) __major(d) >static __inline int >__major(dev_t _d) >{ > return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); >} >#define minor(d) __minor(d) >static __inline int >__minor(dev_t _d) >{ > return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); >} >#define makedev(M, m) __makedev((M), (m)) >static __inline dev_t >__makedev(int _M, int _m) >{ > return (((dev_t)(_M & 0xffffff00) << 32) | ((_M & 0xff) << 8) | > ((dev_t)(_m & 0xff00) << 24) | (_m & 0xffff00ff)); >} > >/* > * These declarations belong elsewhere, but are repeated here and in > * <stdio.h> to give broken programs a better chance of working with > * 64-bit off_t's. > */ >#ifndef _KERNEL >__BEGIN_DECLS >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 420 "/usr/include/sys/types.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 424 "/usr/include/sys/types.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void * mmap(void *, size_t, int, int, int, off_t); >#endif ># 428 "/usr/include/sys/types.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 432 "/usr/include/sys/types.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 434 "/usr/include/sys/types.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 436 "/usr/include/sys/types.h" 3 4 > >#endif /* !_SYS_TYPES_H_ */ ># 438 "/usr/include/sys/types.h" 3 4 ># 97 "/usr/include/sys/param.h" 2 3 4 >#endif ># 98 "/usr/include/sys/param.h" 3 4 > >/* > * Machine-independent constants (some used in following include files). > * Redefined constants are from POSIX 1003.1 limits file. > * > * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>) > */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/syslimits.h> >#endif /* expanded by -frewrite-includes */ ># 105 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/sys/syslimits.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: stable/12/sys/sys/syslimits.h 355968 2019-12-21 02:40:40Z pfg $ > */ > >#ifndef _SYS_SYSLIMITS_H_ >#define _SYS_SYSLIMITS_H_ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_STANDALONE) && !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 39 "/usr/include/sys/syslimits.h" 3 4 >#ifndef _SYS_CDEFS_H_ >#error this file needs sys/cdefs.h as a prerequisite >#endif ># 42 "/usr/include/sys/syslimits.h" 3 4 >#ifdef __CC_SUPPORTS_WARNING >#warning "No user-serviceable parts inside." >#endif ># 45 "/usr/include/sys/syslimits.h" 3 4 >#endif ># 46 "/usr/include/sys/syslimits.h" 3 4 > >/* > * Do not add any new variables here. (See the comment at the end of > * the file for why.) > */ >#ifndef __ILP32__ >#define ARG_MAX (2 * 256 * 1024) /* max bytes for an exec function */ >#else ># 54 "/usr/include/sys/syslimits.h" 3 4 >#define ARG_MAX (256 * 1024) /* max bytes for KVA-starved archs */ >#endif ># 56 "/usr/include/sys/syslimits.h" 3 4 >#ifndef CHILD_MAX >#define CHILD_MAX 40 /* max simultaneous processes */ >#endif ># 59 "/usr/include/sys/syslimits.h" 3 4 >#define MAX_CANON 255 /* max bytes in term canon input line */ >#define MAX_INPUT 255 /* max bytes in terminal input */ >#define NAME_MAX 255 /* max bytes in a file name */ >#ifndef NGROUPS_MAX >#define NGROUPS_MAX 1023 /* max supplemental group id's */ >#endif ># 65 "/usr/include/sys/syslimits.h" 3 4 >#ifndef OPEN_MAX >#define OPEN_MAX 64 /* max open files per process */ >#endif ># 68 "/usr/include/sys/syslimits.h" 3 4 >#define PATH_MAX 1024 /* max bytes in pathname */ >#define PIPE_BUF 512 /* max bytes for atomic pipe writes */ >#define IOV_MAX 1024 /* max elements in i/o vector */ > >/* > * We leave the following values undefined to force applications to either > * assume conservative values or call sysconf() to get the current value. > * > * HOST_NAME_MAX > * > * (We should do this for most of the values currently defined here, > * but many programs are not prepared to deal with this yet.) > */ >#endif ># 82 "/usr/include/sys/syslimits.h" 3 4 ># 106 "/usr/include/sys/param.h" 2 3 4 > >#define MAXCOMLEN 19 /* max command name remembered */ >#define MAXINTERP PATH_MAX /* max interpreter file name length */ >#define MAXLOGNAME 33 /* max login name length (incl. NUL) */ >#define MAXUPRC CHILD_MAX /* max simultaneous processes */ >#define NCARGS ARG_MAX /* max bytes for an exec function */ >#define NGROUPS (NGROUPS_MAX+1) /* max number groups */ >#define NOFILE OPEN_MAX /* max open files per process */ >#define NOGROUP 65535 /* marker for empty group set member */ >#define MAXHOSTNAMELEN 256 /* max hostname size */ >#define SPECNAMELEN 63 /* max length of devicename */ > >/* More types and definitions used throughout the kernel. */ >#ifdef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 120 "/usr/include/sys/param.h" 3 4 ># 121 "/usr/include/sys/param.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/errno.h> >#endif /* expanded by -frewrite-includes */ ># 121 "/usr/include/sys/param.h" 3 4 ># 122 "/usr/include/sys/param.h" 3 4 >#ifndef LOCORE >#if 0 /* expanded by -frewrite-includes */ >#include <sys/time.h> >#endif /* expanded by -frewrite-includes */ ># 123 "/usr/include/sys/param.h" 3 4 ># 124 "/usr/include/sys/param.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/priority.h> >#endif /* expanded by -frewrite-includes */ ># 124 "/usr/include/sys/param.h" 3 4 ># 125 "/usr/include/sys/param.h" 3 4 >#endif ># 126 "/usr/include/sys/param.h" 3 4 > >#ifndef FALSE >#define FALSE 0 >#endif ># 130 "/usr/include/sys/param.h" 3 4 >#ifndef TRUE >#define TRUE 1 >#endif ># 133 "/usr/include/sys/param.h" 3 4 >#endif ># 134 "/usr/include/sys/param.h" 3 4 > >#ifndef _KERNEL >/* Signals. */ >#if 0 /* expanded by -frewrite-includes */ >#include <sys/signal.h> >#endif /* expanded by -frewrite-includes */ ># 137 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/sys/signal.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.4 (Berkeley) 5/4/95 > * $FreeBSD: stable/12/sys/sys/signal.h 353102 2019-10-04 12:18:03Z kib $ > */ > >#ifndef _SYS_SIGNAL_H_ >#define _SYS_SIGNAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/sys/signal.h" 3 4 ># 44 "/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/sys/signal.h" 3 4 ># 45 "/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/sys/signal.h" 3 4 ># 46 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> /* __MINSIGSTKSZ */ >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/include/sys/signal.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 3 4 ># 48 "/usr/include/sys/signal.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/include/sys/signal.h" 3 4 ># 1 "/usr/include/machine/signal.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/signal.h 247047 2013-02-20 17:39:52Z kib $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/signal.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/signal.h" 3 4 ># 1 "/usr/include/x86/signal.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * Copyright (c) 2003 Peter Wemm. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)signal.h 8.1 (Berkeley) 6/11/93 > * $FreeBSD: stable/12/sys/x86/include/signal.h 331650 2018-03-27 20:57:51Z jhb $ > */ > >#ifndef _X86_SIGNAL_H >#define _X86_SIGNAL_H 1 > >/* > * Machine-dependent signal definitions > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/include/x86/signal.h" 3 4 ># 44 "/usr/include/x86/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/x86/signal.h" 3 4 ># 45 "/usr/include/x86/signal.h" 3 4 > >#ifdef __i386__ >typedef int sig_atomic_t; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 50 "/usr/include/x86/signal.h" 3 4 >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > int sc_onstack; /* sigstack state to restore */ > int sc_gs; /* machine state (struct trapframe) */ > int sc_fs; > int sc_es; > int sc_ds; > int sc_edi; > int sc_esi; > int sc_ebp; > int sc_isp; > int sc_ebx; > int sc_edx; > int sc_ecx; > int sc_eax; > int sc_trapno; > int sc_err; > int sc_eip; > int sc_cs; > int sc_efl; > int sc_esp; > int sc_ss; > int sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/npx.h> for > * the following fields. > */ > int sc_fpformat; > int sc_ownedfp; > int sc_flags; > int sc_fpstate[128] __aligned(16); > > int sc_fsbase; > int sc_gsbase; > > int sc_xfpustate; > int sc_xfpustate_len; > > int sc_spare2[4]; >}; > >#define sc_sp sc_esp >#define sc_fp sc_ebp >#define sc_pc sc_eip >#define sc_ps sc_efl >#define sc_eflags sc_efl > >#endif /* __BSD_VISIBLE */ ># 98 "/usr/include/x86/signal.h" 3 4 >#endif /* __i386__ */ ># 99 "/usr/include/x86/signal.h" 3 4 > >#ifdef __amd64__ >typedef long sig_atomic_t; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 104 "/usr/include/x86/signal.h" 3 4 >/* > * Information pushed on stack when a signal is delivered. > * This is used by the kernel to restore state following > * execution of the signal handler. It is also made available > * to the handler to allow it to restore state properly if > * a non-standard exit is performed. > * > * The sequence of the fields/registers after sc_mask in struct > * sigcontext must match those in mcontext_t and struct trapframe. > */ >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > long sc_onstack; /* sigstack state to restore */ > long sc_rdi; /* machine state (struct trapframe) */ > long sc_rsi; > long sc_rdx; > long sc_rcx; > long sc_r8; > long sc_r9; > long sc_rax; > long sc_rbx; > long sc_rbp; > long sc_r10; > long sc_r11; > long sc_r12; > long sc_r13; > long sc_r14; > long sc_r15; > int sc_trapno; > short sc_fs; > short sc_gs; > long sc_addr; > int sc_flags; > short sc_es; > short sc_ds; > long sc_err; > long sc_rip; > long sc_cs; > long sc_rflags; > long sc_rsp; > long sc_ss; > long sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/fpu.h> for the following > * fields. > */ > long sc_fpformat; > long sc_ownedfp; > long sc_fpstate[64] __aligned(16); > > long sc_fsbase; > long sc_gsbase; > > long sc_xfpustate; > long sc_xfpustate_len; > > long sc_spare[4]; >}; >#endif /* __BSD_VISIBLE */ ># 163 "/usr/include/x86/signal.h" 3 4 >#endif /* __amd64__ */ ># 164 "/usr/include/x86/signal.h" 3 4 > >#endif ># 166 "/usr/include/x86/signal.h" 3 4 ># 7 "/usr/include/machine/signal.h" 2 3 4 ># 49 "/usr/include/sys/signal.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 51 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 52 "/usr/include/sys/signal.h" 3 4 ># 53 "/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 53 "/usr/include/sys/signal.h" 3 4 ># 54 "/usr/include/sys/signal.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 59 "/usr/include/sys/signal.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 64 "/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 200809 */ ># 66 "/usr/include/sys/signal.h" 3 4 > >/* > * System defined signals. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 71 "/usr/include/sys/signal.h" 3 4 >#define SIGHUP 1 /* hangup */ >#endif ># 73 "/usr/include/sys/signal.h" 3 4 >#define SIGINT 2 /* interrupt */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 75 "/usr/include/sys/signal.h" 3 4 >#define SIGQUIT 3 /* quit */ >#endif ># 77 "/usr/include/sys/signal.h" 3 4 >#define SIGILL 4 /* illegal instr. (not reset when caught) */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 79 "/usr/include/sys/signal.h" 3 4 >#define SIGTRAP 5 /* trace trap (not reset when caught) */ >#endif ># 81 "/usr/include/sys/signal.h" 3 4 >#define SIGABRT 6 /* abort() */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 83 "/usr/include/sys/signal.h" 3 4 >#define SIGIOT SIGABRT /* compatibility */ >#define SIGEMT 7 /* EMT instruction */ >#endif ># 86 "/usr/include/sys/signal.h" 3 4 >#define SIGFPE 8 /* floating point exception */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 88 "/usr/include/sys/signal.h" 3 4 >#define SIGKILL 9 /* kill (cannot be caught or ignored) */ >#endif ># 90 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 91 "/usr/include/sys/signal.h" 3 4 >#define SIGBUS 10 /* bus error */ >#endif ># 93 "/usr/include/sys/signal.h" 3 4 >#define SIGSEGV 11 /* segmentation violation */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 95 "/usr/include/sys/signal.h" 3 4 >#define SIGSYS 12 /* non-existent system call invoked */ >#endif ># 97 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 98 "/usr/include/sys/signal.h" 3 4 >#define SIGPIPE 13 /* write on a pipe with no one to read it */ >#define SIGALRM 14 /* alarm clock */ >#endif ># 101 "/usr/include/sys/signal.h" 3 4 >#define SIGTERM 15 /* software termination signal from kill */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 103 "/usr/include/sys/signal.h" 3 4 >#define SIGURG 16 /* urgent condition on IO channel */ >#endif ># 105 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 106 "/usr/include/sys/signal.h" 3 4 >#define SIGSTOP 17 /* sendable stop signal not from tty */ >#define SIGTSTP 18 /* stop signal from tty */ >#define SIGCONT 19 /* continue a stopped process */ >#define SIGCHLD 20 /* to parent on child stop or exit */ >#define SIGTTIN 21 /* to readers pgrp upon background tty read */ >#define SIGTTOU 22 /* like TTIN if (tp->t_local<OSTOP) */ >#endif ># 113 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 114 "/usr/include/sys/signal.h" 3 4 >#define SIGIO 23 /* input/output possible signal */ >#endif ># 116 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 117 "/usr/include/sys/signal.h" 3 4 >#define SIGXCPU 24 /* exceeded CPU time limit */ >#define SIGXFSZ 25 /* exceeded file size limit */ >#define SIGVTALRM 26 /* virtual time alarm */ >#define SIGPROF 27 /* profiling time alarm */ >#endif ># 122 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 123 "/usr/include/sys/signal.h" 3 4 >#define SIGWINCH 28 /* window size changes */ >#define SIGINFO 29 /* information request */ >#endif ># 126 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 127 "/usr/include/sys/signal.h" 3 4 >#define SIGUSR1 30 /* user defined signal 1 */ >#define SIGUSR2 31 /* user defined signal 2 */ >#endif ># 130 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 131 "/usr/include/sys/signal.h" 3 4 >#define SIGTHR 32 /* reserved by thread library. */ >#define SIGLWP SIGTHR >#define SIGLIBRT 33 /* reserved by real-time library. */ >#endif ># 135 "/usr/include/sys/signal.h" 3 4 > >#define SIGRTMIN 65 >#define SIGRTMAX 126 > >#define SIG_DFL ((__sighandler_t *)0) >#define SIG_IGN ((__sighandler_t *)1) >#define SIG_ERR ((__sighandler_t *)-1) >/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ >#define SIG_HOLD ((__sighandler_t *)3) > >/* > * Type of a signal handling function. > * > * Language spec sez signal handlers take exactly one arg, even though we > * actually supply three. Ugh! > * > * We don't try to hide the difference by leaving out the args because > * that would cause warnings about conformant programs. Nonconformant > * programs can avoid the warnings by casting to (__sighandler_t *) or > * sig_t before calling signal() or assigning to sa_handler or sv_handler. > * > * The kernel should reverse the cast before calling the function. It > * has no way to do this, but on most machines 1-arg and 3-arg functions > * have the same calling protocol so there is no problem in practice. > * A bit in sa_flags could be used to specify the number of args. > */ >typedef void __sighandler_t(int); > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 164 "/usr/include/sys/signal.h" 3 4 >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 168 "/usr/include/sys/signal.h" 3 4 >#endif ># 169 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 171 "/usr/include/sys/signal.h" 3 4 >union sigval { > /* Members as suggested by Annex C of POSIX 1003.1b. */ > int sival_int; > void *sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > void *sigval_ptr; >}; > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 181 "/usr/include/sys/signal.h" 3 4 >union sigval32 { > int sival_int; > uint32_t sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > uint32_t sigval_ptr; >}; >#endif ># 189 "/usr/include/sys/signal.h" 3 4 >#endif ># 190 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 192 "/usr/include/sys/signal.h" 3 4 > >struct pthread_attr; > >struct sigevent { > int sigev_notify; /* Notification type */ > int sigev_signo; /* Signal number */ > union sigval sigev_value; /* Signal value */ > union { > __lwpid_t _threadid; > struct { > void (*_function)(union sigval); > struct pthread_attr **_attribute; > } _sigev_thread; > unsigned short _kevent_flags; > long __spare__[8]; > } _sigev_un; >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 211 "/usr/include/sys/signal.h" 3 4 >#define sigev_notify_kqueue sigev_signo >#define sigev_notify_kevent_flags _sigev_un._kevent_flags >#define sigev_notify_thread_id _sigev_un._threadid >#endif ># 215 "/usr/include/sys/signal.h" 3 4 >#define sigev_notify_function _sigev_un._sigev_thread._function >#define sigev_notify_attributes _sigev_un._sigev_thread._attribute > >#define SIGEV_NONE 0 /* No async notification. */ >#define SIGEV_SIGNAL 1 /* Generate a queued signal. */ >#define SIGEV_THREAD 2 /* Call back from another pthread. */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 222 "/usr/include/sys/signal.h" 3 4 >#define SIGEV_KEVENT 3 /* Generate a kevent. */ >#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */ >#endif ># 225 "/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 199309 */ ># 227 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 229 "/usr/include/sys/signal.h" 3 4 >typedef struct __siginfo { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > /* > * Cause of signal, one of the SI_ macros or signal-specific > * values, i.e. one of the FPE_... values for SIGFPE. This > * value is equivalent to the second argument to an old-style > * FreeBSD signal handler. > */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > void *si_addr; /* faulting instruction */ > union sigval si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > long _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > long __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >} siginfo_t; > >#define si_trapno _reason._fault._trapno >#define si_timerid _reason._timer._timerid >#define si_overrun _reason._timer._overrun >#define si_mqd _reason._mesgq._mqd >#define si_band _reason._poll._band > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 272 "/usr/include/sys/signal.h" 3 4 >struct siginfo32 { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > uint32_t si_addr; /* faulting instruction */ > union sigval32 si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > int32_t _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > int32_t __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >}; >#endif ># 302 "/usr/include/sys/signal.h" 3 4 > >/** si_code **/ >/* codes for SIGILL */ >#define ILL_ILLOPC 1 /* Illegal opcode. */ >#define ILL_ILLOPN 2 /* Illegal operand. */ >#define ILL_ILLADR 3 /* Illegal addressing mode. */ >#define ILL_ILLTRP 4 /* Illegal trap. */ >#define ILL_PRVOPC 5 /* Privileged opcode. */ >#define ILL_PRVREG 6 /* Privileged register. */ >#define ILL_COPROC 7 /* Coprocessor error. */ >#define ILL_BADSTK 8 /* Internal stack error. */ > >/* codes for SIGBUS */ >#define BUS_ADRALN 1 /* Invalid address alignment. */ >#define BUS_ADRERR 2 /* Nonexistent physical address. */ >#define BUS_OBJERR 3 /* Object-specific hardware error. */ >#define BUS_OOMERR 100 /* Non-standard: No memory. */ > >/* codes for SIGSEGV */ >#define SEGV_MAPERR 1 /* Address not mapped to object. */ >#define SEGV_ACCERR 2 /* Invalid permissions for mapped */ > /* object. */ >#define SEGV_PKUERR 100 /* x86: PKU violation */ > >/* codes for SIGFPE */ >#define FPE_INTOVF 1 /* Integer overflow. */ >#define FPE_INTDIV 2 /* Integer divide by zero. */ >#define FPE_FLTDIV 3 /* Floating point divide by zero. */ >#define FPE_FLTOVF 4 /* Floating point overflow. */ >#define FPE_FLTUND 5 /* Floating point underflow. */ >#define FPE_FLTRES 6 /* Floating point inexact result. */ >#define FPE_FLTINV 7 /* Invalid floating point operation. */ >#define FPE_FLTSUB 8 /* Subscript out of range. */ > >/* codes for SIGTRAP */ >#define TRAP_BRKPT 1 /* Process breakpoint. */ >#define TRAP_TRACE 2 /* Process trace trap. */ >#define TRAP_DTRACE 3 /* DTrace induced trap. */ >#define TRAP_CAP 4 /* Capabilities protective trap. */ > >/* codes for SIGCHLD */ >#define CLD_EXITED 1 /* Child has exited */ >#define CLD_KILLED 2 /* Child has terminated abnormally but */ > /* did not create a core file */ >#define CLD_DUMPED 3 /* Child has terminated abnormally and */ > /* created a core file */ >#define CLD_TRAPPED 4 /* Traced child has trapped */ >#define CLD_STOPPED 5 /* Child has stopped */ >#define CLD_CONTINUED 6 /* Stopped child has continued */ > >/* codes for SIGPOLL */ >#define POLL_IN 1 /* Data input available */ >#define POLL_OUT 2 /* Output buffers available */ >#define POLL_MSG 3 /* Input message available */ >#define POLL_ERR 4 /* I/O Error */ >#define POLL_PRI 5 /* High priority input available */ >#define POLL_HUP 6 /* Device disconnected */ > >#endif ># 361 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 363 "/usr/include/sys/signal.h" 3 4 >struct __siginfo; > >/* > * Signal vector "template" used in sigaction call. > */ >struct sigaction { > union { > void (*__sa_handler)(int); > void (*__sa_sigaction)(int, struct __siginfo *, void *); > } __sigaction_u; /* signal handler */ > int sa_flags; /* see signal options below */ > sigset_t sa_mask; /* signal mask to apply */ >}; > >#define sa_handler __sigaction_u.__sa_handler >#endif ># 379 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 381 "/usr/include/sys/signal.h" 3 4 >/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */ >#define sa_sigaction __sigaction_u.__sa_sigaction >#endif ># 384 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 386 "/usr/include/sys/signal.h" 3 4 >#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ >#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ ># 388 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 390 "/usr/include/sys/signal.h" 3 4 >#define SA_ONSTACK 0x0001 /* take signal on signal stack */ >#define SA_RESTART 0x0002 /* restart system call on signal return */ >#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ >#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ >#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ >#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ >#endif ># 397 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 399 "/usr/include/sys/signal.h" 3 4 >#define NSIG 32 /* number of old signals (counting 0) */ >#endif ># 401 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 403 "/usr/include/sys/signal.h" 3 4 >#define SI_NOINFO 0 /* No signal info besides si_signo. */ >#define SI_USER 0x10001 /* Signal sent by kill(). */ >#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */ >#define SI_TIMER 0x10003 /* Signal generated by expiration of */ > /* a timer set by timer_settime(). */ >#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */ > /* an asynchronous I/O request.*/ >#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ > /* message on an empty message queue. */ >#define SI_KERNEL 0x10006 >#define SI_LWP 0x10007 /* Signal sent by thr_kill */ >#endif ># 415 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 416 "/usr/include/sys/signal.h" 3 4 >#define SI_UNDEFINED 0 >#endif ># 418 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 420 "/usr/include/sys/signal.h" 3 4 >typedef __sighandler_t *sig_t; /* type of pointer to a signal function */ >typedef void __siginfohandler_t(int, struct __siginfo *, void *); >#endif ># 423 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 425 "/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 426 "/usr/include/sys/signal.h" 3 4 >#define __stack_t sigaltstack >#endif ># 428 "/usr/include/sys/signal.h" 3 4 >typedef struct __stack_t stack_t; > >#define SS_ONSTACK 0x0001 /* take signal on alternate stack */ >#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ >#define MINSIGSTKSZ __MINSIGSTKSZ /* minimum stack size */ >#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ >#endif ># 435 "/usr/include/sys/signal.h" 3 4 > >/* > * Structure used in sigaltstack call. Its definition is always > * needed for __ucontext. If __BSD_VISIBLE is defined, the structure > * tag is actually sigaltstack. > */ >struct __stack_t { > void *ss_sp; /* signal stack base */ > __size_t ss_size; /* signal stack length */ > int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 448 "/usr/include/sys/signal.h" 3 4 >/* > * 4.3 compatibility: > * Signal vector "template" used in sigvec call. > */ >struct sigvec { > __sighandler_t *sv_handler; /* signal handler */ > int sv_mask; /* signal mask to apply */ > int sv_flags; /* see signal options below */ >}; > >#define SV_ONSTACK SA_ONSTACK >#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */ >#define SV_RESETHAND SA_RESETHAND >#define SV_NODEFER SA_NODEFER >#define SV_NOCLDSTOP SA_NOCLDSTOP >#define SV_SIGINFO SA_SIGINFO >#define sv_onstack sv_flags /* isn't compatibility wonderful! */ >#endif ># 466 "/usr/include/sys/signal.h" 3 4 > >/* Keep this in one place only */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) && defined(COMPAT_43) && \ > !defined(__i386__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 470 "/usr/include/sys/signal.h" 3 4 >struct osigcontext { > int _not_used; >}; >#endif ># 474 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 476 "/usr/include/sys/signal.h" 3 4 >/* > * Structure used in sigstack call. > */ >struct sigstack { > void *ss_sp; /* signal stack pointer */ > int ss_onstack; /* current status */ >}; >#endif ># 484 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 486 "/usr/include/sys/signal.h" 3 4 >/* > * Macro for converting signal number to a mask suitable for > * sigblock(). > */ >#define sigmask(m) (1 << ((m)-1)) >#endif ># 492 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 494 "/usr/include/sys/signal.h" 3 4 >#define BADSIG SIG_ERR >#endif ># 496 "/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 498 "/usr/include/sys/signal.h" 3 4 >/* > * Flags for sigprocmask: > */ >#define SIG_BLOCK 1 /* block specified signal set */ >#define SIG_UNBLOCK 2 /* unblock specified signal set */ >#define SIG_SETMASK 3 /* set specified signal set */ >#endif ># 505 "/usr/include/sys/signal.h" 3 4 > >/* > * For historical reasons; programs expect signal's return value to be > * defined by <sys/signal.h>. > */ >__BEGIN_DECLS >__sighandler_t *signal(int, __sighandler_t *); >__END_DECLS > >#endif /* !_SYS_SIGNAL_H_ */ ># 515 "/usr/include/sys/signal.h" 3 4 ># 138 "/usr/include/sys/param.h" 2 3 4 >#endif ># 139 "/usr/include/sys/param.h" 3 4 > >/* Machine type dependent parameters. */ >#if 0 /* expanded by -frewrite-includes */ >#include <machine/param.h> >#endif /* expanded by -frewrite-includes */ ># 141 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/machine/param.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-4-Clause > * > * Copyright (c) 2002 David E. O'Brien. All rights reserved. > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * the Systems Programming Group of the University of Utah Computer > * Science Department and Ralph Campbell. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)param.h 8.1 (Berkeley) 6/10/93 > * $FreeBSD: stable/12/sys/amd64/include/param.h 325966 2017-11-18 14:26:50Z pfg $ > */ > > >#ifndef _AMD64_INCLUDE_PARAM_H_ >#define _AMD64_INCLUDE_PARAM_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_align.h> >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/include/machine/param.h" 3 4 ># 1 "/usr/include/machine/_align.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_align.h 215856 2010-11-26 10:59:20Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_align.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_align.h" 3 4 ># 1 "/usr/include/x86/_align.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-4-Clause > * > * Copyright (c) 2001 David E. O'Brien > * Copyright (c) 1990 The Regents of the University of California. > * All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * William Jolitz. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the University of > * California, Berkeley and its contributors. > * 4. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * from: @(#)param.h 5.8 (Berkeley) 6/28/91 > * $FreeBSD: stable/12/sys/x86/include/_align.h 325966 2017-11-18 14:26:50Z pfg $ > */ > >#ifndef _X86_INCLUDE__ALIGN_H_ >#define _X86_INCLUDE__ALIGN_H_ > >/* > * Round p (pointer or byte index) up to a correctly-aligned value > * for all data types (int, long, ...). The result is unsigned int > * and must be cast to any desired pointer type. > */ >#define _ALIGNBYTES (sizeof(__register_t) - 1) >#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) > >#endif /* !_X86_INCLUDE__ALIGN_H_ */ ># 55 "/usr/include/x86/_align.h" 3 4 ># 7 "/usr/include/machine/_align.h" 2 3 4 ># 49 "/usr/include/machine/param.h" 2 3 4 > >/* > * Machine dependent constants for AMD64. > */ > > >#define __HAVE_ACPI >#define __PCI_REROUTE_INTERRUPT > >#ifndef MACHINE >#define MACHINE "amd64" >#endif ># 61 "/usr/include/machine/param.h" 3 4 >#ifndef MACHINE_ARCH >#define MACHINE_ARCH "amd64" >#endif ># 64 "/usr/include/machine/param.h" 3 4 >#ifndef MACHINE_ARCH32 >#define MACHINE_ARCH32 "i386" >#endif ># 67 "/usr/include/machine/param.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(SMP) || defined(KLD_MODULE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 69 "/usr/include/machine/param.h" 3 4 >#ifndef MAXCPU >#define MAXCPU 256 >#endif ># 72 "/usr/include/machine/param.h" 3 4 >#else ># 73 "/usr/include/machine/param.h" 3 4 >#define MAXCPU 1 >#endif ># 75 "/usr/include/machine/param.h" 3 4 > >#ifndef MAXMEMDOM >#define MAXMEMDOM 8 >#endif ># 79 "/usr/include/machine/param.h" 3 4 > >#define ALIGNBYTES _ALIGNBYTES >#define ALIGN(p) _ALIGN(p) >/* > * ALIGNED_POINTER is a boolean macro that checks whether an address > * is valid to fetch data elements of type t from on this architecture. > * This does not reflect the optimal alignment, just the possibility > * (within reasonable limits). > */ >#define ALIGNED_POINTER(p, t) 1 > >/* > * CACHE_LINE_SIZE is the compile-time maximum cache line size for an > * architecture. It should be used with appropriate caution. > */ >#define CACHE_LINE_SHIFT 6 >#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) > >/* Size of the level 1 page table units */ >#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) >#define NPTEPGSHIFT 9 /* LOG2(NPTEPG) */ >#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ >#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ >#define PAGE_MASK (PAGE_SIZE-1) >/* Size of the level 2 page directory units */ >#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t))) >#define NPDEPGSHIFT 9 /* LOG2(NPDEPG) */ >#define PDRSHIFT 21 /* LOG2(NBPDR) */ >#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */ >#define PDRMASK (NBPDR-1) >/* Size of the level 3 page directory pointer table units */ >#define NPDPEPG (PAGE_SIZE/(sizeof (pdp_entry_t))) >#define NPDPEPGSHIFT 9 /* LOG2(NPDPEPG) */ >#define PDPSHIFT 30 /* LOG2(NBPDP) */ >#define NBPDP (1<<PDPSHIFT) /* bytes/page dir ptr table */ >#define PDPMASK (NBPDP-1) >/* Size of the level 4 page-map level-4 table units */ >#define NPML4EPG (PAGE_SIZE/(sizeof (pml4_entry_t))) >#define NPML4EPGSHIFT 9 /* LOG2(NPML4EPG) */ >#define PML4SHIFT 39 /* LOG2(NBPML4) */ >#define NBPML4 (1UL<<PML4SHIFT)/* bytes/page map lev4 table */ >#define PML4MASK (NBPML4-1) > >#define MAXPAGESIZES 3 /* maximum number of supported page sizes */ > >#define IOPAGES 2 /* pages of i/o permission bitmap */ >/* > * I/O permission bitmap has a bit for each I/O port plus an additional > * byte at the end with all bits set. See section "I/O Permission Bit Map" > * in the Intel SDM for more details. > */ >#define IOPERM_BITMAP_SIZE (IOPAGES * PAGE_SIZE + 1) > >#ifndef KSTACK_PAGES >#define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ >#endif ># 135 "/usr/include/machine/param.h" 3 4 >#define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ > >/* > * Mach derived conversion macros > */ >#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK)) >#define trunc_2mpage(x) ((unsigned long)(x) & ~PDRMASK) >#define round_2mpage(x) ((((unsigned long)(x)) + PDRMASK) & ~PDRMASK) >#define trunc_1gpage(x) ((unsigned long)(x) & ~PDPMASK) > >#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) >#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) > >#define amd64_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) >#define amd64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) > >#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) > >#define INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \ > || ((va) >= VM_MIN_KERNEL_ADDRESS && (va) < VM_MAX_KERNEL_ADDRESS)) > >#ifdef SMP >#define SC_TABLESIZE 1024 /* Must be power of 2. */ >#endif ># 160 "/usr/include/machine/param.h" 3 4 > >#endif /* !_AMD64_INCLUDE_PARAM_H_ */ ># 162 "/usr/include/machine/param.h" 3 4 ># 142 "/usr/include/sys/param.h" 2 3 4 >#ifndef _KERNEL >#if 0 /* expanded by -frewrite-includes */ >#include <sys/limits.h> >#endif /* expanded by -frewrite-includes */ ># 143 "/usr/include/sys/param.h" 3 4 ># 1 "/usr/include/sys/limits.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/limits.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS_LIMITS_H_ >#define _SYS_LIMITS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/sys/limits.h" 3 4 ># 38 "/usr/include/sys/limits.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/limits.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 3 4 ># 39 "/usr/include/sys/limits.h" 2 3 4 > >#define CHAR_BIT __CHAR_BIT /* number of bits in a char */ > >#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */ >#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */ > >#define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */ > >#ifdef __CHAR_UNSIGNED__ >#define CHAR_MAX UCHAR_MAX /* max value for a char */ >#define CHAR_MIN 0 /* min value for a char */ >#else ># 51 "/usr/include/sys/limits.h" 3 4 >#define CHAR_MAX SCHAR_MAX >#define CHAR_MIN SCHAR_MIN >#endif ># 54 "/usr/include/sys/limits.h" 3 4 > >#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */ >#define SHRT_MAX __SHRT_MAX /* max value for a short */ >#define SHRT_MIN __SHRT_MIN /* min value for a short */ > >#define UINT_MAX __UINT_MAX /* max value for an unsigned int */ >#define INT_MAX __INT_MAX /* max value for an int */ >#define INT_MIN __INT_MIN /* min value for an int */ > >#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */ >#define LONG_MAX __LONG_MAX /* max for a long */ >#define LONG_MIN __LONG_MIN /* min for a long */ > >#ifdef __LONG_LONG_SUPPORTED >#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */ >#define LLONG_MAX __LLONG_MAX /* max for a long long */ >#define LLONG_MIN __LLONG_MIN /* min for a long long */ >#endif ># 72 "/usr/include/sys/limits.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 74 "/usr/include/sys/limits.h" 3 4 >#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */ >#endif ># 76 "/usr/include/sys/limits.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 78 "/usr/include/sys/limits.h" 3 4 >#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */ > >#define OFF_MAX __OFF_MAX /* max value for an off_t */ >#define OFF_MIN __OFF_MIN /* min value for an off_t */ >#endif ># 83 "/usr/include/sys/limits.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 85 "/usr/include/sys/limits.h" 3 4 >#define GID_MAX UINT_MAX /* max value for a gid_t */ >#define UID_MAX UINT_MAX /* max value for a uid_t */ > >#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */ >#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ >#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */ >#endif ># 92 "/usr/include/sys/limits.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 94 "/usr/include/sys/limits.h" 3 4 >#define LONG_BIT __LONG_BIT >#define WORD_BIT __WORD_BIT >#endif ># 97 "/usr/include/sys/limits.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 99 "/usr/include/sys/limits.h" 3 4 >#define MQ_PRIO_MAX 64 >#endif ># 101 "/usr/include/sys/limits.h" 3 4 > >#endif /* !_SYS_LIMITS_H_ */ ># 103 "/usr/include/sys/limits.h" 3 4 ># 144 "/usr/include/sys/param.h" 2 3 4 >#endif ># 145 "/usr/include/sys/param.h" 3 4 > >#ifndef DEV_BSHIFT >#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ >#endif ># 149 "/usr/include/sys/param.h" 3 4 >#define DEV_BSIZE (1<<DEV_BSHIFT) > >#ifndef BLKDEV_IOSIZE >#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */ >#endif ># 154 "/usr/include/sys/param.h" 3 4 >#ifndef DFLTPHYS >#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ >#endif ># 157 "/usr/include/sys/param.h" 3 4 >#ifndef MAXPHYS >#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ >#endif ># 160 "/usr/include/sys/param.h" 3 4 >#ifndef MAXDUMPPGS >#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) >#endif ># 163 "/usr/include/sys/param.h" 3 4 > >/* > * Constants related to network buffer management. > * MCLBYTES must be no larger than PAGE_SIZE. > */ >#ifndef MSIZE >#define MSIZE 256 /* size of an mbuf */ >#endif ># 171 "/usr/include/sys/param.h" 3 4 > >#ifndef MCLSHIFT >#define MCLSHIFT 11 /* convert bytes to mbuf clusters */ >#endif /* MCLSHIFT */ ># 175 "/usr/include/sys/param.h" 3 4 > >#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */ > >#if 0 /* disabled by -frewrite-includes */ >#if PAGE_SIZE < 2048 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 179 "/usr/include/sys/param.h" 3 4 >#define MJUMPAGESIZE MCLBYTES >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif PAGE_SIZE <= 8192 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 1 /* evaluated by -frewrite-includes */ ># 181 "/usr/include/sys/param.h" 3 4 >#define MJUMPAGESIZE PAGE_SIZE >#else ># 183 "/usr/include/sys/param.h" 3 4 >#define MJUMPAGESIZE (8 * 1024) >#endif ># 185 "/usr/include/sys/param.h" 3 4 > >#define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */ >#define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */ > >/* > * Some macros for units conversion > */ > >/* clicks to bytes */ >#ifndef ctob >#define ctob(x) ((x)<<PAGE_SHIFT) >#endif ># 197 "/usr/include/sys/param.h" 3 4 > >/* bytes to clicks */ >#ifndef btoc >#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT) >#endif ># 202 "/usr/include/sys/param.h" 3 4 > >/* > * btodb() is messy and perhaps slow because `bytes' may be an off_t. We > * want to shift an unsigned type to avoid sign extension and we don't > * want to widen `bytes' unnecessarily. Assume that the result fits in > * a daddr_t. > */ >#ifndef btodb >#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ > (sizeof (bytes) > sizeof(long) \ > ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \ > : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) >#endif ># 215 "/usr/include/sys/param.h" 3 4 > >#ifndef dbtob >#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ > ((off_t)(db) << DEV_BSHIFT) >#endif ># 220 "/usr/include/sys/param.h" 3 4 > >#define PRIMASK 0x0ff >#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ >#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ > >#define NZERO 0 /* default "nice" */ > >#define NBBY 8 /* number of bits in a byte */ >#define NBPW sizeof(int) /* number of bytes per word (integer) */ > >#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ > >#define NODEV (dev_t)(-1) /* non-existent device */ > >/* > * File system parameters and macros. > * > * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes > * per block. MAXBSIZE may be made larger without effecting > * any existing filesystems as long as it does not exceed MAXPHYS, > * and may be made smaller at the risk of not being able to use > * filesystems which require a block size exceeding MAXBSIZE. > * > * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must > * be >= MAXBSIZE and can be set differently for different > * architectures by defining it in <machine/param.h>. > * Making this larger allows NFS to do larger reads/writes. > * > * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the > * minimum KVM memory reservation the kernel is willing to make. > * Filesystems can of course request smaller chunks. Actual > * backing memory uses a chunk size of a page (PAGE_SIZE). > * The default value here can be overridden on a per-architecture > * basis by defining it in <machine/param.h>. > * > * If you make BKVASIZE too small you risk seriously fragmenting > * the buffer KVM map which may slow things down a bit. If you > * make it too big the kernel will not be able to optimally use > * the KVM memory reserved for the buffer cache and will wind > * up with too-few buffers. > * > * The default is 16384, roughly 2x the block size used by a > * normal UFS filesystem. > */ >#define MAXBSIZE 65536 /* must be power of 2 */ >#ifndef MAXBCACHEBUF >#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ >#endif ># 268 "/usr/include/sys/param.h" 3 4 >#ifndef BKVASIZE >#define BKVASIZE 16384 /* must be power of 2 */ >#endif ># 271 "/usr/include/sys/param.h" 3 4 >#define BKVAMASK (BKVASIZE-1) > >/* > * MAXPATHLEN defines the longest permissible path length after expanding > * symbolic links. It is used to allocate a temporary buffer from the buffer > * pool in which to do the name expansion, hence should be a power of two, > * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the > * maximum number of symbolic links that may be expanded in a path name. > * It should be set high enough to allow all legitimate uses, but halt > * infinite loops reasonably quickly. > */ >#define MAXPATHLEN PATH_MAX >#define MAXSYMLINKS 32 > >/* Bit map related macros. */ >#define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) >#define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) >#define isset(a,i) \ > (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) >#define isclr(a,i) \ > ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) > >/* Macros for counting and rounding. */ >#ifndef howmany >#define howmany(x, y) (((x)+((y)-1))/(y)) >#endif ># 297 "/usr/include/sys/param.h" 3 4 >#define nitems(x) (sizeof((x)) / sizeof((x)[0])) >#define rounddown(x, y) (((x)/(y))*(y)) >#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ >#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ >#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ >#define powerof2(x) ((((x)-1)&(x))==0) > >/* Macros for min/max. */ >#define MIN(a,b) (((a)<(b))?(a):(b)) >#define MAX(a,b) (((a)>(b))?(a):(b)) > >#ifdef _KERNEL >/* > * Basic byte order function prototypes for non-inline functions. > */ >#ifndef LOCORE >#ifndef _BYTEORDER_PROTOTYPED >#define _BYTEORDER_PROTOTYPED >__BEGIN_DECLS >__uint32_t htonl(__uint32_t); >__uint16_t htons(__uint16_t); >__uint32_t ntohl(__uint32_t); >__uint16_t ntohs(__uint16_t); >__END_DECLS >#endif ># 322 "/usr/include/sys/param.h" 3 4 >#endif ># 323 "/usr/include/sys/param.h" 3 4 > >#ifndef _BYTEORDER_FUNC_DEFINED >#define _BYTEORDER_FUNC_DEFINED >#define htonl(x) __htonl(x) >#define htons(x) __htons(x) >#define ntohl(x) __ntohl(x) >#define ntohs(x) __ntohs(x) >#endif /* !_BYTEORDER_FUNC_DEFINED */ ># 331 "/usr/include/sys/param.h" 3 4 >#endif /* _KERNEL */ ># 332 "/usr/include/sys/param.h" 3 4 > >/* > * Scale factor for scaled integers used to count %cpu time and load avgs. > * > * The number of CPU `tick's that map to a unique `%age' can be expressed > * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that > * can be calculated (assuming 32 bits) can be closely approximated using > * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). > * > * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', > * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. > */ >#define FSHIFT 11 /* bits to right of fixed binary point */ >#define FSCALE (1<<FSHIFT) > >#define dbtoc(db) /* calculates devblks to pages */ \ > ((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT)) > >#define ctodb(db) /* calculates pages to devblks */ \ > ((db) << (PAGE_SHIFT - DEV_BSHIFT)) > >/* > * Old spelling of __containerof(). > */ >#define member2struct(s, m, x) \ > ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) > >/* > * Access a variable length array that has been declared as a fixed > * length array. > */ >#define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset]) > >#endif /* _SYS_PARAM_H_ */ ># 366 "/usr/include/sys/param.h" 3 4 ># 37 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/socket.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/sys/socket.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)socket.h 8.4 (Berkeley) 2/21/94 > * $FreeBSD: stable/12/sys/sys/socket.h 338136 2018-08-21 14:04:30Z tuexen $ > */ > >#ifndef _SYS_SOCKET_H_ >#define _SYS_SOCKET_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/socket.h" 3 4 ># 39 "/usr/include/sys/socket.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/sys/socket.h" 3 4 ># 40 "/usr/include/sys/socket.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_iovec.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/sys/socket.h" 3 4 ># 1 "/usr/include/sys/_iovec.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)uio.h 8.5 (Berkeley) 2/22/94 > * $FreeBSD: stable/12/sys/sys/_iovec.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS__IOVEC_H_ >#define _SYS__IOVEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/_iovec.h" 3 4 ># 39 "/usr/include/sys/_iovec.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 44 "/usr/include/sys/_iovec.h" 3 4 > >struct iovec { > void *iov_base; /* Base address. */ > size_t iov_len; /* Length. */ >}; > >#endif /* !_SYS__IOVEC_H_ */ ># 51 "/usr/include/sys/_iovec.h" 3 4 ># 41 "/usr/include/sys/socket.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_align.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/sys/socket.h" 3 4 ># 1 "/usr/include/machine/_align.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_align.h 215856 2010-11-26 10:59:20Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_align.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_align.h" 3 4 ># 7 "/usr/include/machine/_align.h" 3 4 ># 42 "/usr/include/sys/socket.h" 2 3 4 > >/* > * Definitions related to sockets: types, address families, options. > */ > >/* > * Data types. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 51 "/usr/include/sys/socket.h" 3 4 >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; >#define _GID_T_DECLARED >#endif ># 55 "/usr/include/sys/socket.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 60 "/usr/include/sys/socket.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 65 "/usr/include/sys/socket.h" 3 4 >#endif ># 66 "/usr/include/sys/socket.h" 3 4 > >#ifndef _SA_FAMILY_T_DECLARED >typedef __sa_family_t sa_family_t; >#define _SA_FAMILY_T_DECLARED >#endif ># 71 "/usr/include/sys/socket.h" 3 4 > >#ifndef _SOCKLEN_T_DECLARED >typedef __socklen_t socklen_t; >#define _SOCKLEN_T_DECLARED >#endif ># 76 "/usr/include/sys/socket.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 81 "/usr/include/sys/socket.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 83 "/usr/include/sys/socket.h" 3 4 >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 87 "/usr/include/sys/socket.h" 3 4 >#endif ># 88 "/usr/include/sys/socket.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 93 "/usr/include/sys/socket.h" 3 4 > >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 98 "/usr/include/sys/socket.h" 3 4 > >/* > * Types > */ >#define SOCK_STREAM 1 /* stream socket */ >#define SOCK_DGRAM 2 /* datagram socket */ >#define SOCK_RAW 3 /* raw-protocol interface */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 106 "/usr/include/sys/socket.h" 3 4 >#define SOCK_RDM 4 /* reliably-delivered message */ >#endif ># 108 "/usr/include/sys/socket.h" 3 4 >#define SOCK_SEQPACKET 5 /* sequenced packet stream */ > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 111 "/usr/include/sys/socket.h" 3 4 >/* > * Creation flags, OR'ed into socket() and socketpair() type argument. > */ >#define SOCK_CLOEXEC 0x10000000 >#define SOCK_NONBLOCK 0x20000000 >#ifdef _KERNEL >/* > * Flags for accept1(), kern_accept4() and solisten_dequeue, in addition > * to SOCK_CLOEXEC and SOCK_NONBLOCK. > */ >#define ACCEPT4_INHERIT 0x1 >#define ACCEPT4_COMPAT 0x2 >#endif /* _KERNEL */ ># 124 "/usr/include/sys/socket.h" 3 4 >#endif /* __BSD_VISIBLE */ ># 125 "/usr/include/sys/socket.h" 3 4 > >/* > * Option flags per-socket. > */ >#define SO_DEBUG 0x00000001 /* turn on debugging info recording */ >#define SO_ACCEPTCONN 0x00000002 /* socket has had listen() */ >#define SO_REUSEADDR 0x00000004 /* allow local address reuse */ >#define SO_KEEPALIVE 0x00000008 /* keep connections alive */ >#define SO_DONTROUTE 0x00000010 /* just use interface addresses */ >#define SO_BROADCAST 0x00000020 /* permit sending of broadcast msgs */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 136 "/usr/include/sys/socket.h" 3 4 >#define SO_USELOOPBACK 0x00000040 /* bypass hardware when possible */ >#endif ># 138 "/usr/include/sys/socket.h" 3 4 >#define SO_LINGER 0x00000080 /* linger on close if data present */ >#define SO_OOBINLINE 0x00000100 /* leave received OOB data in line */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 141 "/usr/include/sys/socket.h" 3 4 >#define SO_REUSEPORT 0x00000200 /* allow local address & port reuse */ >#define SO_TIMESTAMP 0x00000400 /* timestamp received dgram traffic */ >#define SO_NOSIGPIPE 0x00000800 /* no SIGPIPE from EPIPE */ >#define SO_ACCEPTFILTER 0x00001000 /* there is an accept filter */ >#define SO_BINTIME 0x00002000 /* timestamp received dgram traffic */ >#endif ># 147 "/usr/include/sys/socket.h" 3 4 >#define SO_NO_OFFLOAD 0x00004000 /* socket cannot be offloaded */ >#define SO_NO_DDP 0x00008000 /* disable direct data placement */ >#define SO_REUSEPORT_LB 0x00010000 /* reuse with load balancing */ > >/* > * Additional options, not kept in so_options. > */ >#define SO_SNDBUF 0x1001 /* send buffer size */ >#define SO_RCVBUF 0x1002 /* receive buffer size */ >#define SO_SNDLOWAT 0x1003 /* send low-water mark */ >#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ >#define SO_SNDTIMEO 0x1005 /* send timeout */ >#define SO_RCVTIMEO 0x1006 /* receive timeout */ >#define SO_ERROR 0x1007 /* get error status and clear */ >#define SO_TYPE 0x1008 /* get socket type */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 163 "/usr/include/sys/socket.h" 3 4 >#define SO_LABEL 0x1009 /* socket's MAC label */ >#define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */ >#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */ >#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */ >#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ >#define SO_SETFIB 0x1014 /* use this FIB to route */ >#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ >#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ >#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ >#define SO_TS_CLOCK 0x1017 /* clock type used for SO_TIMESTAMP */ >#define SO_MAX_PACING_RATE 0x1018 /* socket's max TX pacing rate (Linux name) */ >#define SO_DOMAIN 0x1019 /* get socket domain */ >#endif ># 176 "/usr/include/sys/socket.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 178 "/usr/include/sys/socket.h" 3 4 >#define SO_TS_REALTIME_MICRO 0 /* microsecond resolution, realtime */ >#define SO_TS_BINTIME 1 /* sub-nanosecond resolution, realtime */ >#define SO_TS_REALTIME 2 /* nanosecond resolution, realtime */ >#define SO_TS_MONOTONIC 3 /* nanosecond resolution, monotonic */ >#define SO_TS_DEFAULT SO_TS_REALTIME_MICRO >#define SO_TS_CLOCK_MAX SO_TS_MONOTONIC >#endif ># 185 "/usr/include/sys/socket.h" 3 4 > >/* > * Space reserved for new socket options added by third-party vendors. > * This range applies to all socket option levels. New socket options > * in FreeBSD should always use an option value less than SO_VENDOR. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 192 "/usr/include/sys/socket.h" 3 4 >#define SO_VENDOR 0x80000000 >#endif ># 194 "/usr/include/sys/socket.h" 3 4 > >/* > * Structure used for manipulating linger option. > */ >struct linger { > int l_onoff; /* option on/off */ > int l_linger; /* linger time */ >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 204 "/usr/include/sys/socket.h" 3 4 >struct accept_filter_arg { > char af_name[16]; > char af_arg[256-16]; >}; >#endif ># 209 "/usr/include/sys/socket.h" 3 4 > >/* > * Level number for (get/set)sockopt() to apply to socket itself. > */ >#define SOL_SOCKET 0xffff /* options for socket level */ > >/* > * Address families. > */ >#define AF_UNSPEC 0 /* unspecified */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 220 "/usr/include/sys/socket.h" 3 4 >#define AF_LOCAL AF_UNIX /* local to host (pipes, portals) */ >#endif ># 222 "/usr/include/sys/socket.h" 3 4 >#define AF_UNIX 1 /* standardized name for AF_LOCAL */ >#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 225 "/usr/include/sys/socket.h" 3 4 >#define AF_IMPLINK 3 /* arpanet imp addresses */ >#define AF_PUP 4 /* pup protocols: e.g. BSP */ >#define AF_CHAOS 5 /* mit CHAOS protocols */ >#define AF_NETBIOS 6 /* SMB protocols */ >#define AF_ISO 7 /* ISO protocols */ >#define AF_OSI AF_ISO >#define AF_ECMA 8 /* European computer manufacturers */ >#define AF_DATAKIT 9 /* datakit protocols */ >#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ >#define AF_SNA 11 /* IBM SNA */ >#define AF_DECnet 12 /* DECnet */ >#define AF_DLI 13 /* DEC Direct data link interface */ >#define AF_LAT 14 /* LAT */ >#define AF_HYLINK 15 /* NSC Hyperchannel */ >#define AF_APPLETALK 16 /* Apple Talk */ >#define AF_ROUTE 17 /* Internal Routing Protocol */ >#define AF_LINK 18 /* Link layer interface */ >#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ >#define AF_COIP 20 /* connection-oriented IP, aka ST II */ >#define AF_CNT 21 /* Computer Network Technology */ >#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ >#define AF_IPX 23 /* Novell Internet Protocol */ >#define AF_SIP 24 /* Simple Internet Protocol */ >#define pseudo_AF_PIP 25 /* Help Identify PIP packets */ >#define AF_ISDN 26 /* Integrated Services Digital Network*/ >#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ >#define pseudo_AF_KEY 27 /* Internal key-management function */ >#endif ># 253 "/usr/include/sys/socket.h" 3 4 >#define AF_INET6 28 /* IPv6 */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 255 "/usr/include/sys/socket.h" 3 4 >#define AF_NATM 29 /* native ATM access */ >#define AF_ATM 30 /* ATM */ >#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers > * in interface output routine > */ >#define AF_NETGRAPH 32 /* Netgraph sockets */ >#define AF_SLOW 33 /* 802.3ad slow protocol */ >#define AF_SCLUSTER 34 /* Sitara cluster protocol */ >#define AF_ARP 35 >#define AF_BLUETOOTH 36 /* Bluetooth sockets */ >#define AF_IEEE80211 37 /* IEEE 802.11 protocol */ >#define AF_INET_SDP 40 /* OFED Socket Direct Protocol ipv4 */ >#define AF_INET6_SDP 42 /* OFED Socket Direct Protocol ipv6 */ >#define AF_MAX 42 >/* > * When allocating a new AF_ constant, please only allocate > * even numbered constants for FreeBSD until 134 as odd numbered AF_ > * constants 39-133 are now reserved for vendors. > */ >#define AF_VENDOR00 39 >#define AF_VENDOR01 41 >#define AF_VENDOR02 43 >#define AF_VENDOR03 45 >#define AF_VENDOR04 47 >#define AF_VENDOR05 49 >#define AF_VENDOR06 51 >#define AF_VENDOR07 53 >#define AF_VENDOR08 55 >#define AF_VENDOR09 57 >#define AF_VENDOR10 59 >#define AF_VENDOR11 61 >#define AF_VENDOR12 63 >#define AF_VENDOR13 65 >#define AF_VENDOR14 67 >#define AF_VENDOR15 69 >#define AF_VENDOR16 71 >#define AF_VENDOR17 73 >#define AF_VENDOR18 75 >#define AF_VENDOR19 77 >#define AF_VENDOR20 79 >#define AF_VENDOR21 81 >#define AF_VENDOR22 83 >#define AF_VENDOR23 85 >#define AF_VENDOR24 87 >#define AF_VENDOR25 89 >#define AF_VENDOR26 91 >#define AF_VENDOR27 93 >#define AF_VENDOR28 95 >#define AF_VENDOR29 97 >#define AF_VENDOR30 99 >#define AF_VENDOR31 101 >#define AF_VENDOR32 103 >#define AF_VENDOR33 105 >#define AF_VENDOR34 107 >#define AF_VENDOR35 109 >#define AF_VENDOR36 111 >#define AF_VENDOR37 113 >#define AF_VENDOR38 115 >#define AF_VENDOR39 117 >#define AF_VENDOR40 119 >#define AF_VENDOR41 121 >#define AF_VENDOR42 123 >#define AF_VENDOR43 125 >#define AF_VENDOR44 127 >#define AF_VENDOR45 129 >#define AF_VENDOR46 131 >#define AF_VENDOR47 133 >#endif ># 323 "/usr/include/sys/socket.h" 3 4 > >/* > * Structure used by kernel to store most > * addresses. > */ >struct sockaddr { > unsigned char sa_len; /* total length */ > sa_family_t sa_family; /* address family */ > char sa_data[14]; /* actually longer; address value */ >}; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 334 "/usr/include/sys/socket.h" 3 4 >#define SOCK_MAXADDRLEN 255 /* longest possible addresses */ > >/* > * Structure used by kernel to pass protocol > * information in raw sockets. > */ >struct sockproto { > unsigned short sp_family; /* address family */ > unsigned short sp_protocol; /* protocol */ >}; >#endif ># 345 "/usr/include/sys/socket.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sockaddr_storage.h> >#endif /* expanded by -frewrite-includes */ ># 346 "/usr/include/sys/socket.h" 3 4 ># 1 "/usr/include/sys/_sockaddr_storage.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)socket.h 8.4 (Berkeley) 2/21/94 > * $FreeBSD: stable/12/sys/sys/_sockaddr_storage.h 326023 2017-11-20 19:43:44Z pfg $ > */ > >#ifndef _SYS__SOCKADDR_STORAGE_H_ >#define _SYS__SOCKADDR_STORAGE_H_ > >/* > * RFC 2553: protocol-independent placeholder for socket addresses > */ >#define _SS_MAXSIZE 128U >#define _SS_ALIGNSIZE (sizeof(__int64_t)) >#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \ > sizeof(sa_family_t)) >#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \ > sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE) > >struct sockaddr_storage { > unsigned char ss_len; /* address length */ > sa_family_t ss_family; /* address family */ > char __ss_pad1[_SS_PAD1SIZE]; > __int64_t __ss_align; /* force desired struct alignment */ > char __ss_pad2[_SS_PAD2SIZE]; >}; > >#endif /* !_SYS__SOCKADDR_STORAGE_H_ */ ># 57 "/usr/include/sys/_sockaddr_storage.h" 3 4 ># 347 "/usr/include/sys/socket.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 349 "/usr/include/sys/socket.h" 3 4 >/* > * Protocol families, same as address families for now. > */ >#define PF_UNSPEC AF_UNSPEC >#define PF_LOCAL AF_LOCAL >#define PF_UNIX PF_LOCAL /* backward compatibility */ >#define PF_INET AF_INET >#define PF_IMPLINK AF_IMPLINK >#define PF_PUP AF_PUP >#define PF_CHAOS AF_CHAOS >#define PF_NETBIOS AF_NETBIOS >#define PF_ISO AF_ISO >#define PF_OSI AF_ISO >#define PF_ECMA AF_ECMA >#define PF_DATAKIT AF_DATAKIT >#define PF_CCITT AF_CCITT >#define PF_SNA AF_SNA >#define PF_DECnet AF_DECnet >#define PF_DLI AF_DLI >#define PF_LAT AF_LAT >#define PF_HYLINK AF_HYLINK >#define PF_APPLETALK AF_APPLETALK >#define PF_ROUTE AF_ROUTE >#define PF_LINK AF_LINK >#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ >#define PF_COIP AF_COIP >#define PF_CNT AF_CNT >#define PF_SIP AF_SIP >#define PF_IPX AF_IPX >#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ >#define PF_PIP pseudo_AF_PIP >#define PF_ISDN AF_ISDN >#define PF_KEY pseudo_AF_KEY >#define PF_INET6 AF_INET6 >#define PF_NATM AF_NATM >#define PF_ATM AF_ATM >#define PF_NETGRAPH AF_NETGRAPH >#define PF_SLOW AF_SLOW >#define PF_SCLUSTER AF_SCLUSTER >#define PF_ARP AF_ARP >#define PF_BLUETOOTH AF_BLUETOOTH >#define PF_IEEE80211 AF_IEEE80211 >#define PF_INET_SDP AF_INET_SDP >#define PF_INET6_SDP AF_INET6_SDP > >#define PF_MAX AF_MAX > >/* > * Definitions for network related sysctl, CTL_NET. > * > * Second level is protocol family. > * Third level is protocol number. > * > * Further levels are defined by the individual families. > */ > >/* > * PF_ROUTE - Routing table > * > * Three additional levels are defined: > * Fourth: address family, 0 is wildcard > * Fifth: type of info, defined below > * Sixth: flag(s) to mask with for NET_RT_FLAGS > */ >#define NET_RT_DUMP 1 /* dump; may limit to a.f. */ >#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ >#define NET_RT_IFLIST 3 /* survey interface list */ >#define NET_RT_IFMALIST 4 /* return multicast address list */ >#define NET_RT_IFLISTL 5 /* Survey interface list, using 'l'en > * versions of msghdr structs. */ >#endif /* __BSD_VISIBLE */ ># 420 "/usr/include/sys/socket.h" 3 4 > >/* > * Maximum queue length specifiable by listen. > */ >#define SOMAXCONN 128 > >/* > * Message header for recvmsg and sendmsg calls. > * Used value-result for recvmsg, value only for sendmsg. > */ >struct msghdr { > void *msg_name; /* optional address */ > socklen_t msg_namelen; /* size of address */ > struct iovec *msg_iov; /* scatter/gather array */ > int msg_iovlen; /* # elements in msg_iov */ > void *msg_control; /* ancillary data, see below */ > socklen_t msg_controllen; /* ancillary data buffer len */ > int msg_flags; /* flags on received message */ >}; > >#define MSG_OOB 0x00000001 /* process out-of-band data */ >#define MSG_PEEK 0x00000002 /* peek at incoming message */ >#define MSG_DONTROUTE 0x00000004 /* send without using routing tables */ >#define MSG_EOR 0x00000008 /* data completes record */ >#define MSG_TRUNC 0x00000010 /* data discarded before delivery */ >#define MSG_CTRUNC 0x00000020 /* control data lost before delivery */ >#define MSG_WAITALL 0x00000040 /* wait for full request or error */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 448 "/usr/include/sys/socket.h" 3 4 >#define MSG_DONTWAIT 0x00000080 /* this message should be nonblocking */ >#define MSG_EOF 0x00000100 /* data completes connection */ >/* 0x00000200 unused */ >/* 0x00000400 unused */ >/* 0x00000800 unused */ >/* 0x00001000 unused */ >#define MSG_NOTIFICATION 0x00002000 /* SCTP notification */ >#define MSG_NBIO 0x00004000 /* FIONBIO mode, used by fifofs */ >#define MSG_COMPAT 0x00008000 /* used in sendit() */ >#endif ># 458 "/usr/include/sys/socket.h" 3 4 >#ifdef _KERNEL >#define MSG_SOCALLBCK 0x00010000 /* for use by socket callbacks - soreceive (TCP) */ >#endif ># 461 "/usr/include/sys/socket.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 462 "/usr/include/sys/socket.h" 3 4 >#define MSG_NOSIGNAL 0x00020000 /* do not generate SIGPIPE on EOF */ >#endif ># 464 "/usr/include/sys/socket.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 465 "/usr/include/sys/socket.h" 3 4 >#define MSG_CMSG_CLOEXEC 0x00040000 /* make received fds close-on-exec */ >#define MSG_WAITFORONE 0x00080000 /* for recvmmsg() */ >#endif ># 468 "/usr/include/sys/socket.h" 3 4 >#ifdef _KERNEL >#define MSG_MORETOCOME 0x00100000 /* additional data pending */ >#endif ># 471 "/usr/include/sys/socket.h" 3 4 > >/* > * Header for ancillary data objects in msg_control buffer. > * Used for additional information with/about a datagram > * not expressible by flags. The format is a sequence > * of message elements headed by cmsghdr structures. > */ >struct cmsghdr { > socklen_t cmsg_len; /* data byte count, including hdr */ > int cmsg_level; /* originating protocol */ > int cmsg_type; /* protocol-specific type */ >/* followed by u_char cmsg_data[]; */ >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 486 "/usr/include/sys/socket.h" 3 4 >/* > * While we may have more groups than this, the cmsgcred struct must > * be able to fit in an mbuf and we have historically supported a > * maximum of 16 groups. >*/ >#define CMGROUP_MAX 16 > >/* > * Credentials structure, used to verify the identity of a peer > * process that has sent us a message. This is allocated by the > * peer process but filled in by the kernel. This prevents the > * peer from lying about its identity. (Note that cmcred_groups[0] > * is the effective GID.) > */ >struct cmsgcred { > pid_t cmcred_pid; /* PID of sending process */ > uid_t cmcred_uid; /* real UID of sending process */ > uid_t cmcred_euid; /* effective UID of sending process */ > gid_t cmcred_gid; /* real GID of sending process */ > short cmcred_ngroups; /* number or groups */ > gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ >}; > >/* > * Socket credentials. > */ >struct sockcred { > uid_t sc_uid; /* real user id */ > uid_t sc_euid; /* effective user id */ > gid_t sc_gid; /* real group id */ > gid_t sc_egid; /* effective group id */ > int sc_ngroups; /* number of supplemental groups */ > gid_t sc_groups[1]; /* variable length */ >}; > >/* > * Compute size of a sockcred structure with groups. > */ >#define SOCKCREDSIZE(ngrps) \ > (sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1))) > >#endif /* __BSD_VISIBLE */ ># 528 "/usr/include/sys/socket.h" 3 4 > >/* given pointer to struct cmsghdr, return pointer to data */ >#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ > _ALIGN(sizeof(struct cmsghdr))) > >/* given pointer to struct cmsghdr, return pointer to next cmsghdr */ >#define CMSG_NXTHDR(mhdr, cmsg) \ > ((char *)(cmsg) == (char *)0 ? CMSG_FIRSTHDR(mhdr) : \ > ((char *)(cmsg) + _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \ > _ALIGN(sizeof(struct cmsghdr)) > \ > (char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \ > (struct cmsghdr *)0 : \ > (struct cmsghdr *)(void *)((char *)(cmsg) + \ > _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) > >/* > * RFC 2292 requires to check msg_controllen, in case that the kernel returns > * an empty list for some reasons. > */ >#define CMSG_FIRSTHDR(mhdr) \ > ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ > (struct cmsghdr *)(mhdr)->msg_control : \ > (struct cmsghdr *)0) > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 553 "/usr/include/sys/socket.h" 3 4 >/* RFC 2292 additions */ >#define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l)) >#define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (l)) >#endif ># 557 "/usr/include/sys/socket.h" 3 4 > >#ifdef _KERNEL >#define CMSG_ALIGN(n) _ALIGN(n) >#endif ># 561 "/usr/include/sys/socket.h" 3 4 > >/* "Socket"-level control message types: */ >#define SCM_RIGHTS 0x01 /* access rights (array of int) */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 565 "/usr/include/sys/socket.h" 3 4 >#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ >#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ >#define SCM_BINTIME 0x04 /* timestamp (struct bintime) */ >#define SCM_REALTIME 0x05 /* timestamp (struct timespec) */ >#define SCM_MONOTONIC 0x06 /* timestamp (struct timespec) */ >#define SCM_TIME_INFO 0x07 /* timestamp info */ > >struct sock_timestamp_info { > __uint32_t st_info_flags; > __uint32_t st_info_pad0; > __uint64_t st_info_rsv[7]; >}; > >#define ST_INFO_HW 0x0001 /* SCM_TIMESTAMP was hw */ >#define ST_INFO_HW_HPREC 0x0002 /* SCM_TIMESTAMP was hw-assisted > on entrance */ >#endif ># 582 "/usr/include/sys/socket.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 584 "/usr/include/sys/socket.h" 3 4 >/* > * 4.3 compat sockaddr, move to compat file later > */ >struct osockaddr { > unsigned short sa_family; /* address family */ > char sa_data[14]; /* up to 14 bytes of direct address */ >}; > >/* > * 4.3-compat message header (move to compat file later). > */ >struct omsghdr { > char *msg_name; /* optional address */ > int msg_namelen; /* size of address */ > struct iovec *msg_iov; /* scatter/gather array */ > int msg_iovlen; /* # elements in msg_iov */ > char *msg_accrights; /* access rights sent/received */ > int msg_accrightslen; >}; >#endif ># 604 "/usr/include/sys/socket.h" 3 4 > >/* > * howto arguments for shutdown(2), specified by Posix.1g. > */ >#define SHUT_RD 0 /* shut down the reading side */ >#define SHUT_WR 1 /* shut down the writing side */ >#define SHUT_RDWR 2 /* shut down both sides */ > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 613 "/usr/include/sys/socket.h" 3 4 >/* for SCTP */ >/* we cheat and use the SHUT_XX defines for these */ >#define PRU_FLUSH_RD SHUT_RD >#define PRU_FLUSH_WR SHUT_WR >#define PRU_FLUSH_RDWR SHUT_RDWR >#endif ># 619 "/usr/include/sys/socket.h" 3 4 > > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 622 "/usr/include/sys/socket.h" 3 4 >/* > * sendfile(2) header/trailer struct > */ >struct sf_hdtr { > struct iovec *headers; /* pointer to an array of header struct iovec's */ > int hdr_cnt; /* number of header iovec's */ > struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ > int trl_cnt; /* number of trailer iovec's */ >}; > >/* > * Sendfile-specific flag(s) > */ >#define SF_NODISKIO 0x00000001 >#define SF_MNOWAIT 0x00000002 /* obsolete */ >#define SF_SYNC 0x00000004 >#define SF_USER_READAHEAD 0x00000008 >#define SF_NOCACHE 0x00000010 >#define SF_FLAGS(rh, flags) (((rh) << 16) | (flags)) > >#ifdef _KERNEL >#define SF_READAHEAD(flags) ((flags) >> 16) >#endif /* _KERNEL */ ># 645 "/usr/include/sys/socket.h" 3 4 > >/* > * Sendmmsg/recvmmsg specific structure(s) > */ >struct mmsghdr { > struct msghdr msg_hdr; /* message header */ > ssize_t msg_len; /* message length */ >}; >#endif /* __BSD_VISIBLE */ ># 654 "/usr/include/sys/socket.h" 3 4 > >#ifndef _KERNEL > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 657 "/usr/include/sys/socket.h" 3 4 ># 658 "/usr/include/sys/socket.h" 3 4 > >__BEGIN_DECLS >int accept(int, struct sockaddr * __restrict, socklen_t * __restrict); >int bind(int, const struct sockaddr *, socklen_t); >int connect(int, const struct sockaddr *, socklen_t); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 664 "/usr/include/sys/socket.h" 3 4 >int accept4(int, struct sockaddr * __restrict, socklen_t * __restrict, int); >int bindat(int, int, const struct sockaddr *, socklen_t); >int connectat(int, int, const struct sockaddr *, socklen_t); >#endif ># 668 "/usr/include/sys/socket.h" 3 4 >int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict); >int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict); >int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); >int listen(int, int); >ssize_t recv(int, void *, size_t, int); >ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, socklen_t * __restrict); >ssize_t recvmsg(int, struct msghdr *, int); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 676 "/usr/include/sys/socket.h" 3 4 >struct timespec; >ssize_t recvmmsg(int, struct mmsghdr * __restrict, size_t, int, > const struct timespec * __restrict); >#endif ># 680 "/usr/include/sys/socket.h" 3 4 >ssize_t send(int, const void *, size_t, int); >ssize_t sendto(int, const void *, > size_t, int, const struct sockaddr *, socklen_t); >ssize_t sendmsg(int, const struct msghdr *, int); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 685 "/usr/include/sys/socket.h" 3 4 >int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int); >ssize_t sendmmsg(int, struct mmsghdr * __restrict, size_t, int); >int setfib(int); >#endif ># 689 "/usr/include/sys/socket.h" 3 4 >int setsockopt(int, int, int, const void *, socklen_t); >int shutdown(int, int); >int sockatmark(int); >int socket(int, int, int); >int socketpair(int, int, int, int *); >__END_DECLS > >#endif /* !_KERNEL */ ># 697 "/usr/include/sys/socket.h" 3 4 > >#ifdef _KERNEL >struct socket; > >struct tcpcb *so_sototcpcb(struct socket *so); >struct inpcb *so_sotoinpcb(struct socket *so); >struct sockbuf *so_sockbuf_snd(struct socket *); >struct sockbuf *so_sockbuf_rcv(struct socket *); > >int so_state_get(const struct socket *); >void so_state_set(struct socket *, int); > >int so_options_get(const struct socket *); >void so_options_set(struct socket *, int); > >int so_error_get(const struct socket *); >void so_error_set(struct socket *, int); > >int so_linger_get(const struct socket *); >void so_linger_set(struct socket *, int); > >struct protosw *so_protosw_get(const struct socket *); >void so_protosw_set(struct socket *, struct protosw *); > >void so_sorwakeup_locked(struct socket *so); >void so_sowwakeup_locked(struct socket *so); > >void so_sorwakeup(struct socket *so); >void so_sowwakeup(struct socket *so); > >void so_lock(struct socket *so); >void so_unlock(struct socket *so); > >#endif /* _KERNEL */ ># 731 "/usr/include/sys/socket.h" 3 4 >#endif /* !_SYS_SOCKET_H_ */ ># 732 "/usr/include/sys/socket.h" 3 4 ># 38 "/usr/src/lib/libnv/msgio.c" 2 > >#if 0 /* expanded by -frewrite-includes */ >#include <errno.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/errno.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)errno.h 8.5 (Berkeley) 1/21/94 > * $FreeBSD: stable/12/sys/sys/errno.h 357296 2020-01-30 16:11:19Z mav $ > */ > >#ifndef _SYS_ERRNO_H_ >#define _SYS_ERRNO_H_ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_KERNEL) && !defined(_STANDALONE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 44 "/usr/include/errno.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/include/errno.h" 3 4 ># 45 "/usr/include/errno.h" 3 4 >__BEGIN_DECLS >int * __error(void); >__END_DECLS >#define errno (* __error()) >#endif ># 50 "/usr/include/errno.h" 3 4 > >#define EPERM 1 /* Operation not permitted */ >#define ENOENT 2 /* No such file or directory */ >#define ESRCH 3 /* No such process */ >#define EINTR 4 /* Interrupted system call */ >#define EIO 5 /* Input/output error */ >#define ENXIO 6 /* Device not configured */ >#define E2BIG 7 /* Argument list too long */ >#define ENOEXEC 8 /* Exec format error */ >#define EBADF 9 /* Bad file descriptor */ >#define ECHILD 10 /* No child processes */ >#define EDEADLK 11 /* Resource deadlock avoided */ > /* 11 was EAGAIN */ >#define ENOMEM 12 /* Cannot allocate memory */ >#define EACCES 13 /* Permission denied */ >#define EFAULT 14 /* Bad address */ >#ifndef _POSIX_SOURCE >#define ENOTBLK 15 /* Block device required */ >#endif ># 69 "/usr/include/errno.h" 3 4 >#define EBUSY 16 /* Device busy */ >#define EEXIST 17 /* File exists */ >#define EXDEV 18 /* Cross-device link */ >#define ENODEV 19 /* Operation not supported by device */ >#define ENOTDIR 20 /* Not a directory */ >#define EISDIR 21 /* Is a directory */ >#define EINVAL 22 /* Invalid argument */ >#define ENFILE 23 /* Too many open files in system */ >#define EMFILE 24 /* Too many open files */ >#define ENOTTY 25 /* Inappropriate ioctl for device */ >#ifndef _POSIX_SOURCE >#define ETXTBSY 26 /* Text file busy */ >#endif ># 82 "/usr/include/errno.h" 3 4 >#define EFBIG 27 /* File too large */ >#define ENOSPC 28 /* No space left on device */ >#define ESPIPE 29 /* Illegal seek */ >#define EROFS 30 /* Read-only filesystem */ >#define EMLINK 31 /* Too many links */ >#define EPIPE 32 /* Broken pipe */ > >/* math software */ >#define EDOM 33 /* Numerical argument out of domain */ >#define ERANGE 34 /* Result too large */ > >/* non-blocking and interrupt i/o */ >#define EAGAIN 35 /* Resource temporarily unavailable */ >#ifndef _POSIX_SOURCE >#define EWOULDBLOCK EAGAIN /* Operation would block */ >#define EINPROGRESS 36 /* Operation now in progress */ >#define EALREADY 37 /* Operation already in progress */ > >/* ipc/network software -- argument errors */ >#define ENOTSOCK 38 /* Socket operation on non-socket */ >#define EDESTADDRREQ 39 /* Destination address required */ >#define EMSGSIZE 40 /* Message too long */ >#define EPROTOTYPE 41 /* Protocol wrong type for socket */ >#define ENOPROTOOPT 42 /* Protocol not available */ >#define EPROTONOSUPPORT 43 /* Protocol not supported */ >#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ >#define EOPNOTSUPP 45 /* Operation not supported */ >#define ENOTSUP EOPNOTSUPP /* Operation not supported */ >#define EPFNOSUPPORT 46 /* Protocol family not supported */ >#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ >#define EADDRINUSE 48 /* Address already in use */ >#define EADDRNOTAVAIL 49 /* Can't assign requested address */ > >/* ipc/network software -- operational errors */ >#define ENETDOWN 50 /* Network is down */ >#define ENETUNREACH 51 /* Network is unreachable */ >#define ENETRESET 52 /* Network dropped connection on reset */ >#define ECONNABORTED 53 /* Software caused connection abort */ >#define ECONNRESET 54 /* Connection reset by peer */ >#define ENOBUFS 55 /* No buffer space available */ >#define EISCONN 56 /* Socket is already connected */ >#define ENOTCONN 57 /* Socket is not connected */ >#define ESHUTDOWN 58 /* Can't send after socket shutdown */ >#define ETOOMANYREFS 59 /* Too many references: can't splice */ >#define ETIMEDOUT 60 /* Operation timed out */ >#define ECONNREFUSED 61 /* Connection refused */ > >#define ELOOP 62 /* Too many levels of symbolic links */ >#endif /* _POSIX_SOURCE */ ># 131 "/usr/include/errno.h" 3 4 >#define ENAMETOOLONG 63 /* File name too long */ > >/* should be rearranged */ >#ifndef _POSIX_SOURCE >#define EHOSTDOWN 64 /* Host is down */ >#define EHOSTUNREACH 65 /* No route to host */ >#endif /* _POSIX_SOURCE */ ># 138 "/usr/include/errno.h" 3 4 >#define ENOTEMPTY 66 /* Directory not empty */ > >/* quotas & mush */ >#ifndef _POSIX_SOURCE >#define EPROCLIM 67 /* Too many processes */ >#define EUSERS 68 /* Too many users */ >#define EDQUOT 69 /* Disc quota exceeded */ > >/* Network File System */ >#define ESTALE 70 /* Stale NFS file handle */ >#define EREMOTE 71 /* Too many levels of remote in path */ >#define EBADRPC 72 /* RPC struct is bad */ >#define ERPCMISMATCH 73 /* RPC version wrong */ >#define EPROGUNAVAIL 74 /* RPC prog. not avail */ >#define EPROGMISMATCH 75 /* Program version wrong */ >#define EPROCUNAVAIL 76 /* Bad procedure for program */ >#endif /* _POSIX_SOURCE */ ># 155 "/usr/include/errno.h" 3 4 > >#define ENOLCK 77 /* No locks available */ >#define ENOSYS 78 /* Function not implemented */ > >#ifndef _POSIX_SOURCE >#define EFTYPE 79 /* Inappropriate file type or format */ >#define EAUTH 80 /* Authentication error */ >#define ENEEDAUTH 81 /* Need authenticator */ >#define EIDRM 82 /* Identifier removed */ >#define ENOMSG 83 /* No message of desired type */ >#define EOVERFLOW 84 /* Value too large to be stored in data type */ >#define ECANCELED 85 /* Operation canceled */ >#define EILSEQ 86 /* Illegal byte sequence */ >#define ENOATTR 87 /* Attribute not found */ > >#define EDOOFUS 88 /* Programming error */ >#endif /* _POSIX_SOURCE */ ># 172 "/usr/include/errno.h" 3 4 > >#define EBADMSG 89 /* Bad message */ >#define EMULTIHOP 90 /* Multihop attempted */ >#define ENOLINK 91 /* Link has been severed */ >#define EPROTO 92 /* Protocol error */ > >#ifndef _POSIX_SOURCE >#define ENOTCAPABLE 93 /* Capabilities insufficient */ >#define ECAPMODE 94 /* Not permitted in capability mode */ >#define ENOTRECOVERABLE 95 /* State not recoverable */ >#define EOWNERDEAD 96 /* Previous owner died */ >#define EINTEGRITY 97 /* Integrity check failed */ >#endif /* _POSIX_SOURCE */ ># 185 "/usr/include/errno.h" 3 4 > >#ifndef _POSIX_SOURCE >#define ELAST 97 /* Must be equal largest errno */ >#endif /* _POSIX_SOURCE */ ># 189 "/usr/include/errno.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 191 "/usr/include/errno.h" 3 4 >/* pseudo-errors returned inside kernel to modify return to process */ >#define ERESTART (-1) /* restart syscall */ >#define EJUSTRETURN (-2) /* don't modify regs, just return */ >#define ENOIOCTL (-3) /* ioctl not handled by this layer */ >#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ >#define ERELOOKUP (-5) /* retry the directory lookup */ >#endif ># 198 "/usr/include/errno.h" 3 4 > >#ifndef _KERNEL >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 201 "/usr/include/errno.h" 3 4 >/* ISO/IEC 9899:2011 K.3.2.2 */ >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 206 "/usr/include/errno.h" 3 4 >#endif /* __EXT1_VISIBLE */ ># 207 "/usr/include/errno.h" 3 4 >#endif ># 208 "/usr/include/errno.h" 3 4 > >#endif ># 210 "/usr/include/errno.h" 3 4 ># 40 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <fcntl.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/fcntl.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1983, 1990, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)fcntl.h 8.3 (Berkeley) 1/21/94 > * $FreeBSD: stable/12/sys/sys/fcntl.h 357706 2020-02-09 22:15:35Z kevans $ > */ > >#ifndef _SYS_FCNTL_H_ >#define _SYS_FCNTL_H_ > >/* > * This file includes the definitions for open and fcntl > * described by POSIX for <fcntl.h>; it also includes > * related kernel definitions. > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 49 "/usr/include/fcntl.h" 3 4 ># 50 "/usr/include/fcntl.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 50 "/usr/include/fcntl.h" 3 4 ># 51 "/usr/include/fcntl.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; >#define _MODE_T_DECLARED >#endif ># 56 "/usr/include/fcntl.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 61 "/usr/include/fcntl.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 66 "/usr/include/fcntl.h" 3 4 > >/* > * File status flags: these are used by open(2), fcntl(2). > * They are also used (indirectly) in the kernel file structure f_flags, > * which is a superset of the open/fcntl flags. Open flags and f_flags > * are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). > * Open/fcntl flags begin with O_; kernel-internal flags begin with F. > */ >/* open-only flags */ >#define O_RDONLY 0x0000 /* open for reading only */ >#define O_WRONLY 0x0001 /* open for writing only */ >#define O_RDWR 0x0002 /* open for reading and writing */ >#define O_ACCMODE 0x0003 /* mask for above modes */ > >/* > * Kernel encoding of open mode; separate read and write bits that are > * independently testable: 1 greater than the above. > * > * XXX > * FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, > * which was documented to use FREAD/FWRITE, continues to work. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 89 "/usr/include/fcntl.h" 3 4 >#define FREAD 0x0001 >#define FWRITE 0x0002 >#endif ># 92 "/usr/include/fcntl.h" 3 4 >#define O_NONBLOCK 0x0004 /* no delay */ >#define O_APPEND 0x0008 /* set append mode */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 95 "/usr/include/fcntl.h" 3 4 >#define O_SHLOCK 0x0010 /* open with shared file lock */ >#define O_EXLOCK 0x0020 /* open with exclusive file lock */ >#define O_ASYNC 0x0040 /* signal pgrp when data ready */ >#define O_FSYNC 0x0080 /* synchronous writes */ >#endif ># 100 "/usr/include/fcntl.h" 3 4 >#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 102 "/usr/include/fcntl.h" 3 4 >#define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >#endif ># 104 "/usr/include/fcntl.h" 3 4 >#define O_CREAT 0x0200 /* create if nonexistent */ >#define O_TRUNC 0x0400 /* truncate to zero length */ >#define O_EXCL 0x0800 /* error if already exists */ >#ifdef _KERNEL >#define FHASLOCK 0x4000 /* descriptor holds advisory lock */ >#endif ># 110 "/usr/include/fcntl.h" 3 4 > >/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */ >#define O_NOCTTY 0x8000 /* don't assign controlling terminal */ > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 115 "/usr/include/fcntl.h" 3 4 >/* Attempt to bypass buffer cache */ >#define O_DIRECT 0x00010000 >#endif ># 118 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 120 "/usr/include/fcntl.h" 3 4 >#define O_DIRECTORY 0x00020000 /* Fail if not directory */ >#define O_EXEC 0x00040000 /* Open for execute only */ >#define O_SEARCH O_EXEC >#endif ># 124 "/usr/include/fcntl.h" 3 4 >#ifdef _KERNEL >#define FEXEC O_EXEC >#define FSEARCH O_SEARCH >#endif ># 128 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 130 "/usr/include/fcntl.h" 3 4 >/* Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. */ >#define O_TTY_INIT 0x00080000 /* Restore default termios attributes */ > >#define O_CLOEXEC 0x00100000 >#endif ># 135 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 137 "/usr/include/fcntl.h" 3 4 >#define O_VERIFY 0x00200000 /* open only after verification */ >#endif ># 139 "/usr/include/fcntl.h" 3 4 > >/* > * XXX missing O_DSYNC, O_RSYNC. > */ > >#ifdef _KERNEL > >/* Only for devfs d_close() flags. */ >#define FLASTCLOSE O_DIRECTORY >#define FREVOKE O_VERIFY >/* Only for fo_close() from half-succeeded open */ >#define FOPENFAILED O_TTY_INIT > >/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */ >#define FFLAGS(oflags) ((oflags) & O_EXEC ? (oflags) : (oflags) + 1) >#define OFLAGS(fflags) ((fflags) & O_EXEC ? (fflags) : (fflags) - 1) > >/* bits to save after open */ >#define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT|FEXEC) >/* bits settable by fcntl(F_SETFL, ...) */ >#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FRDAHEAD|O_DIRECT) > >#if 0 /* disabled by -frewrite-includes */ >#if defined(COMPAT_FREEBSD7) || defined(COMPAT_FREEBSD6) || \ > defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 163 "/usr/include/fcntl.h" 3 4 >/* > * Set by shm_open(3) in older libc's to get automatic MAP_ASYNC > * behavior for POSIX shared memory objects (which are otherwise > * implemented as plain files). > */ >#define FPOSIXSHM O_NOFOLLOW >#undef FCNTLFLAGS >#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|FRDAHEAD| \ > O_DIRECT) >#endif ># 173 "/usr/include/fcntl.h" 3 4 >#endif ># 174 "/usr/include/fcntl.h" 3 4 > >/* > * The O_* flags used to have only F* names, which were used in the kernel > * and by fcntl. We retain the F* names for the kernel f_flag field > * and for backward compatibility for fcntl. These flags are deprecated. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 181 "/usr/include/fcntl.h" 3 4 >#define FAPPEND O_APPEND /* kernel/compat */ >#define FASYNC O_ASYNC /* kernel/compat */ >#define FFSYNC O_FSYNC /* kernel */ >#define FNONBLOCK O_NONBLOCK /* kernel */ >#define FNDELAY O_NONBLOCK /* compat */ >#define O_NDELAY O_NONBLOCK /* compat */ >#endif ># 188 "/usr/include/fcntl.h" 3 4 > >/* > * We are out of bits in f_flag (which is a short). However, > * the flag bits not set in FMASK are only meaningful in the > * initial open syscall. Those bits can thus be given a > * different meaning for fcntl(2). > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 196 "/usr/include/fcntl.h" 3 4 >/* Read ahead */ >#define FRDAHEAD O_CREAT >#endif ># 199 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 201 "/usr/include/fcntl.h" 3 4 >/* > * Magic value that specify the use of the current working directory > * to determine the target of relative file paths in the openat() and > * similar syscalls. > */ >#define AT_FDCWD -100 > >/* > * Miscellaneous flags for the *at() syscalls. > */ >#define AT_EACCESS 0x100 /* Check access using effective user and group ID */ >#define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symbolic links */ >#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic link */ >#define AT_REMOVEDIR 0x800 /* Remove directory instead of file */ >#endif ># 216 "/usr/include/fcntl.h" 3 4 > >/* > * Constants used for fcntl(2) > */ > >/* command values */ >#define F_DUPFD 0 /* duplicate file descriptor */ >#define F_GETFD 1 /* get file descriptor flags */ >#define F_SETFD 2 /* set file descriptor flags */ >#define F_GETFL 3 /* get file status flags */ >#define F_SETFL 4 /* set file status flags */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 228 "/usr/include/fcntl.h" 3 4 >#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ >#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ >#endif ># 231 "/usr/include/fcntl.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 232 "/usr/include/fcntl.h" 3 4 >#define F_OGETLK 7 /* get record locking information */ >#define F_OSETLK 8 /* set record locking information */ >#define F_OSETLKW 9 /* F_SETLK; wait if blocked */ >#define F_DUP2FD 10 /* duplicate file descriptor to arg */ >#endif ># 237 "/usr/include/fcntl.h" 3 4 >#define F_GETLK 11 /* get record locking information */ >#define F_SETLK 12 /* set record locking information */ >#define F_SETLKW 13 /* F_SETLK; wait if blocked */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 241 "/usr/include/fcntl.h" 3 4 >#define F_SETLK_REMOTE 14 /* debugging support for remote locks */ >#define F_READAHEAD 15 /* read ahead */ >#define F_RDAHEAD 16 /* Darwin compatible read ahead */ >#endif ># 245 "/usr/include/fcntl.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 246 "/usr/include/fcntl.h" 3 4 >#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ >#endif ># 248 "/usr/include/fcntl.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 249 "/usr/include/fcntl.h" 3 4 >#define F_DUP2FD_CLOEXEC 18 /* Like F_DUP2FD, but FD_CLOEXEC is set */ >#endif ># 251 "/usr/include/fcntl.h" 3 4 > >/* file descriptor flags (F_GETFD, F_SETFD) */ >#define FD_CLOEXEC 1 /* close-on-exec flag */ > >/* record locking flags (F_GETLK, F_SETLK, F_SETLKW) */ >#define F_RDLCK 1 /* shared or read lock */ >#define F_UNLCK 2 /* unlock */ >#define F_WRLCK 3 /* exclusive or write lock */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 260 "/usr/include/fcntl.h" 3 4 >#define F_UNLCKSYS 4 /* purge locks for a given system ID */ >#define F_CANCEL 5 /* cancel an async lock request */ >#endif ># 263 "/usr/include/fcntl.h" 3 4 >#ifdef _KERNEL >#define F_WAIT 0x010 /* Wait until lock is granted */ >#define F_FLOCK 0x020 /* Use flock(2) semantics for lock */ >#define F_POSIX 0x040 /* Use POSIX semantics for lock */ >#define F_REMOTE 0x080 /* Lock owner is remote NFS client */ >#define F_NOINTR 0x100 /* Ignore signals when waiting */ >#endif ># 270 "/usr/include/fcntl.h" 3 4 > >/* > * Advisory file segment locking data type - > * information passed to system by user > */ >struct flock { > off_t l_start; /* starting offset */ > off_t l_len; /* len = 0 means until end of file */ > pid_t l_pid; /* lock owner */ > short l_type; /* lock type: read/write, etc. */ > short l_whence; /* type of l_start */ > int l_sysid; /* remote system id or zero for local */ >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 285 "/usr/include/fcntl.h" 3 4 >/* > * Old advisory file segment locking data type, > * before adding l_sysid. > */ >struct __oflock { > off_t l_start; /* starting offset */ > off_t l_len; /* len = 0 means until end of file */ > pid_t l_pid; /* lock owner */ > short l_type; /* lock type: read/write, etc. */ > short l_whence; /* type of l_start */ >}; >#endif ># 297 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 299 "/usr/include/fcntl.h" 3 4 >/* lock operations for flock(2) */ >#define LOCK_SH 0x01 /* shared file lock */ >#define LOCK_EX 0x02 /* exclusive file lock */ >#define LOCK_NB 0x04 /* don't block when locking */ >#define LOCK_UN 0x08 /* unlock file */ >#endif ># 305 "/usr/include/fcntl.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 307 "/usr/include/fcntl.h" 3 4 >/* > * Advice to posix_fadvise > */ >#define POSIX_FADV_NORMAL 0 /* no special treatment */ >#define POSIX_FADV_RANDOM 1 /* expect random page references */ >#define POSIX_FADV_SEQUENTIAL 2 /* expect sequential page references */ >#define POSIX_FADV_WILLNEED 3 /* will need these pages */ >#define POSIX_FADV_DONTNEED 4 /* dont need these pages */ >#define POSIX_FADV_NOREUSE 5 /* access data only once */ >#endif ># 317 "/usr/include/fcntl.h" 3 4 > >#ifndef _KERNEL >__BEGIN_DECLS >int open(const char *, int, ...); >int creat(const char *, mode_t); >int fcntl(int, int, ...); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 324 "/usr/include/fcntl.h" 3 4 >int flock(int, int); >#endif ># 326 "/usr/include/fcntl.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 327 "/usr/include/fcntl.h" 3 4 >int openat(int, const char *, int, ...); >#endif ># 329 "/usr/include/fcntl.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 330 "/usr/include/fcntl.h" 3 4 >int posix_fadvise(int, off_t, off_t, int); >int posix_fallocate(int, off_t, off_t); >#endif ># 333 "/usr/include/fcntl.h" 3 4 >__END_DECLS >#endif ># 335 "/usr/include/fcntl.h" 3 4 > >#endif /* !_SYS_FCNTL_H_ */ ># 337 "/usr/include/fcntl.h" 3 4 ># 41 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdbool.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/stdbool.h" 1 3 4 >/* > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/include/stdbool.h 326192 2017-11-25 17:09:43Z pfg $ > */ > >#ifndef __bool_true_false_are_defined >#define __bool_true_false_are_defined 1 > >#ifndef __cplusplus > >#define false 0 >#define true 1 > >#define bool _Bool >#if 0 /* disabled by -frewrite-includes */ >#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 41 "/usr/include/stdbool.h" 3 4 >typedef int _Bool; >#endif ># 43 "/usr/include/stdbool.h" 3 4 > >#endif /* !__cplusplus */ ># 45 "/usr/include/stdbool.h" 3 4 >#endif /* __bool_true_false_are_defined */ ># 46 "/usr/include/stdbool.h" 3 4 ># 42 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdint.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/stdint.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/sys/stdint.h 326256 2017-11-27 15:01:59Z pfg $ > */ > >#ifndef _SYS_STDINT_H_ >#define _SYS_STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/include/stdint.h" 3 4 ># 35 "/usr/include/stdint.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/include/stdint.h" 3 4 ># 36 "/usr/include/stdint.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/machine/_stdint.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_stdint.h 232264 2012-02-28 18:38:33Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_stdint.h" 3 4 ># 1 "/usr/include/x86/_stdint.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-4-Clause > * > * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 2001 The NetBSD Foundation, Inc. > * All rights reserved. > * > * This code is derived from software contributed to The NetBSD Foundation > * by Klaus Klein. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by the NetBSD > * Foundation, Inc. and its contributors. > * 4. Neither the name of The NetBSD Foundation nor the names of its > * contributors may be used to endorse or promote products derived > * from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS > * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS > * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > * POSSIBILITY OF SUCH DAMAGE. > * > * $FreeBSD: stable/12/sys/x86/include/_stdint.h 326263 2017-11-27 15:11:47Z pfg $ > */ > >#ifndef _MACHINE__STDINT_H_ >#define _MACHINE__STDINT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <machine/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/include/x86/_stdint.h" 3 4 ># 1 "/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ >/* $FreeBSD: stable/12/sys/amd64/include/_limits.h 232262 2012-02-28 18:24:28Z tijl $ */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 6 "/usr/include/machine/_limits.h" 3 4 ># 7 "/usr/include/machine/_limits.h" 3 4 ># 46 "/usr/include/x86/_stdint.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 48 "/usr/include/x86/_stdint.h" 3 4 > >#define INT8_C(c) (c) >#define INT16_C(c) (c) >#define INT32_C(c) (c) > >#define UINT8_C(c) (c) >#define UINT16_C(c) (c) >#define UINT32_C(c) (c ## U) > >#ifdef __LP64__ >#define INT64_C(c) (c ## L) >#define UINT64_C(c) (c ## UL) >#else ># 61 "/usr/include/x86/_stdint.h" 3 4 >#define INT64_C(c) (c ## LL) >#define UINT64_C(c) (c ## ULL) >#endif ># 64 "/usr/include/x86/_stdint.h" 3 4 > >#define INTMAX_C(c) INT64_C(c) >#define UINTMAX_C(c) UINT64_C(c) > >#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ ># 69 "/usr/include/x86/_stdint.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 71 "/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.1 Limits of exact-width integer types > */ >#define INT8_MIN (-0x7f-1) >#define INT16_MIN (-0x7fff-1) >#define INT32_MIN (-0x7fffffff-1) > >#define INT8_MAX 0x7f >#define INT16_MAX 0x7fff >#define INT32_MAX 0x7fffffff > >#define UINT8_MAX 0xff >#define UINT16_MAX 0xffff >#define UINT32_MAX 0xffffffffU > >#ifdef __LP64__ >#define INT64_MIN (-0x7fffffffffffffff-1) >#define INT64_MAX 0x7fffffffffffffff >#define UINT64_MAX 0xffffffffffffffff >#else ># 93 "/usr/include/x86/_stdint.h" 3 4 >#define INT64_MIN (-0x7fffffffffffffffLL-1) >#define INT64_MAX 0x7fffffffffffffffLL >#define UINT64_MAX 0xffffffffffffffffULL >#endif ># 97 "/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.2 Limits of minimum-width integer types > */ >/* Minimum values of minimum-width signed integer types. */ >#define INT_LEAST8_MIN INT8_MIN >#define INT_LEAST16_MIN INT16_MIN >#define INT_LEAST32_MIN INT32_MIN >#define INT_LEAST64_MIN INT64_MIN > >/* Maximum values of minimum-width signed integer types. */ >#define INT_LEAST8_MAX INT8_MAX >#define INT_LEAST16_MAX INT16_MAX >#define INT_LEAST32_MAX INT32_MAX >#define INT_LEAST64_MAX INT64_MAX > >/* Maximum values of minimum-width unsigned integer types. */ >#define UINT_LEAST8_MAX UINT8_MAX >#define UINT_LEAST16_MAX UINT16_MAX >#define UINT_LEAST32_MAX UINT32_MAX >#define UINT_LEAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.3 Limits of fastest minimum-width integer types > */ >/* Minimum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MIN INT32_MIN >#define INT_FAST16_MIN INT32_MIN >#define INT_FAST32_MIN INT32_MIN >#define INT_FAST64_MIN INT64_MIN > >/* Maximum values of fastest minimum-width signed integer types. */ >#define INT_FAST8_MAX INT32_MAX >#define INT_FAST16_MAX INT32_MAX >#define INT_FAST32_MAX INT32_MAX >#define INT_FAST64_MAX INT64_MAX > >/* Maximum values of fastest minimum-width unsigned integer types. */ >#define UINT_FAST8_MAX UINT32_MAX >#define UINT_FAST16_MAX UINT32_MAX >#define UINT_FAST32_MAX UINT32_MAX >#define UINT_FAST64_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.2.4 Limits of integer types capable of holding object pointers > */ >#ifdef __LP64__ >#define INTPTR_MIN INT64_MIN >#define INTPTR_MAX INT64_MAX >#define UINTPTR_MAX UINT64_MAX >#else ># 151 "/usr/include/x86/_stdint.h" 3 4 >#define INTPTR_MIN INT32_MIN >#define INTPTR_MAX INT32_MAX >#define UINTPTR_MAX UINT32_MAX >#endif ># 155 "/usr/include/x86/_stdint.h" 3 4 > >/* > * ISO/IEC 9899:1999 > * 7.18.2.5 Limits of greatest-width integer types > */ >#define INTMAX_MIN INT64_MIN >#define INTMAX_MAX INT64_MAX >#define UINTMAX_MAX UINT64_MAX > >/* > * ISO/IEC 9899:1999 > * 7.18.3 Limits of other integer types > */ >#ifdef __LP64__ >/* Limits of ptrdiff_t. */ >#define PTRDIFF_MIN INT64_MIN >#define PTRDIFF_MAX INT64_MAX > >/* Limits of sig_atomic_t. */ >#define SIG_ATOMIC_MIN __LONG_MIN >#define SIG_ATOMIC_MAX __LONG_MAX > >/* Limit of size_t. */ >#define SIZE_MAX UINT64_MAX >#else ># 180 "/usr/include/x86/_stdint.h" 3 4 >#define PTRDIFF_MIN INT32_MIN >#define PTRDIFF_MAX INT32_MAX >#define SIG_ATOMIC_MIN INT32_MIN >#define SIG_ATOMIC_MAX INT32_MAX >#define SIZE_MAX UINT32_MAX >#endif ># 186 "/usr/include/x86/_stdint.h" 3 4 > >/* Limits of wint_t. */ >#define WINT_MIN INT32_MIN >#define WINT_MAX INT32_MAX > >#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ ># 192 "/usr/include/x86/_stdint.h" 3 4 > >#endif /* !_MACHINE__STDINT_H_ */ ># 194 "/usr/include/x86/_stdint.h" 3 4 ># 7 "/usr/include/machine/_stdint.h" 2 3 4 ># 38 "/usr/include/stdint.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/stdint.h" 3 4 ># 39 "/usr/include/stdint.h" 3 4 > >typedef __int_least8_t int_least8_t; >typedef __int_least16_t int_least16_t; >typedef __int_least32_t int_least32_t; >typedef __int_least64_t int_least64_t; > >typedef __uint_least8_t uint_least8_t; >typedef __uint_least16_t uint_least16_t; >typedef __uint_least32_t uint_least32_t; >typedef __uint_least64_t uint_least64_t; > >typedef __int_fast8_t int_fast8_t; >typedef __int_fast16_t int_fast16_t; >typedef __int_fast32_t int_fast32_t; >typedef __int_fast64_t int_fast64_t; > >typedef __uint_fast8_t uint_fast8_t; >typedef __uint_fast16_t uint_fast16_t; >typedef __uint_fast32_t uint_fast32_t; >typedef __uint_fast64_t uint_fast64_t; > >/* GNU and Darwin define this and people seem to think it's portable */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 62 "/usr/include/stdint.h" 3 4 >#define __WORDSIZE 64 >#else ># 64 "/usr/include/stdint.h" 3 4 >#define __WORDSIZE 32 >#endif ># 66 "/usr/include/stdint.h" 3 4 > >/* Limits of wchar_t. */ >#define WCHAR_MIN __WCHAR_MIN >#define WCHAR_MAX __WCHAR_MAX > >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 72 "/usr/include/stdint.h" 3 4 >/* ISO/IEC 9899:2011 K.3.4.4 */ >#ifndef RSIZE_MAX >#define RSIZE_MAX (SIZE_MAX >> 1) >#endif ># 76 "/usr/include/stdint.h" 3 4 >#endif /* __EXT1_VISIBLE */ ># 77 "/usr/include/stdint.h" 3 4 > >#endif /* !_SYS_STDINT_H_ */ ># 79 "/usr/include/stdint.h" 3 4 ># 43 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 43 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/stdlib.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 > * $FreeBSD: stable/12/include/stdlib.h 338331 2018-08-26 18:04:54Z delphij $ > */ > >#ifndef _STDLIB_H_ >#define _STDLIB_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/stdlib.h" 3 4 ># 39 "/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/stdlib.h" 3 4 ># 40 "/usr/include/stdlib.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/stdlib.h" 3 4 ># 41 "/usr/include/stdlib.h" 3 4 > >__NULLABILITY_PRAGMA_PUSH > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 45 "/usr/include/stdlib.h" 3 4 >#ifndef _RUNE_T_DECLARED >typedef __rune_t rune_t; >#define _RUNE_T_DECLARED >#endif ># 49 "/usr/include/stdlib.h" 3 4 >#endif ># 50 "/usr/include/stdlib.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 55 "/usr/include/stdlib.h" 3 4 > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 61 "/usr/include/stdlib.h" 3 4 >#endif ># 62 "/usr/include/stdlib.h" 3 4 > >typedef struct { > int quot; /* quotient */ > int rem; /* remainder */ >} div_t; > >typedef struct { > long quot; > long rem; >} ldiv_t; > >#define EXIT_FAILURE 1 >#define EXIT_SUCCESS 0 > >#define RAND_MAX 0x7ffffffd > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 80 "/usr/include/stdlib.h" 3 4 ># 81 "/usr/include/stdlib.h" 3 4 >#endif ># 82 "/usr/include/stdlib.h" 3 4 >extern int __mb_cur_max; >extern int ___mb_cur_max(void); >#define MB_CUR_MAX ((size_t)___mb_cur_max()) > >_Noreturn void abort(void); >int abs(int) __pure2; >int atexit(void (* _Nonnull)(void)); >double atof(const char *); >int atoi(const char *); >long atol(const char *); >void *bsearch(const void *, const void *, size_t, > size_t, int (*)(const void * _Nonnull, const void *)); >void *calloc(size_t, size_t) __malloc_like __result_use_check > __alloc_size2(1, 2); >div_t div(int, int) __pure2; >_Noreturn void exit(int); >void free(void *); >char *getenv(const char *); >long labs(long) __pure2; >ldiv_t ldiv(long, long) __pure2; >void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); >int mblen(const char *, size_t); >size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); >int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); >void qsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >int rand(void); >void *realloc(void *, size_t) __result_use_check __alloc_size(2); >void srand(unsigned); >double strtod(const char * __restrict, char ** __restrict); >float strtof(const char * __restrict, char ** __restrict); >long strtol(const char * __restrict, char ** __restrict, int); >long double > strtold(const char * __restrict, char ** __restrict); >unsigned long > strtoul(const char * __restrict, char ** __restrict, int); >int system(const char *); >int wctomb(char *, wchar_t); >size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > >/* > * Functions added in C99 which we make conditionally available in the > * BSD^C89 namespace if the compiler supports `long long'. > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > * that it can't really be ISO C99). > * > * (The only other extension made by C99 in thie header is _Exit().) > */ >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 133 "/usr/include/stdlib.h" 3 4 >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >typedef struct { > long long quot; > long long rem; >} lldiv_t; > >/* LONGLONG */ >long long > atoll(const char *); >/* LONGLONG */ >long long > llabs(long long) __pure2; >/* LONGLONG */ >lldiv_t lldiv(long long, long long) __pure2; >/* LONGLONG */ >long long > strtoll(const char * __restrict, char ** __restrict, int); >/* LONGLONG */ >unsigned long long > strtoull(const char * __restrict, char ** __restrict, int); >#endif /* __LONG_LONG_SUPPORTED */ ># 155 "/usr/include/stdlib.h" 3 4 > >_Noreturn void _Exit(int); >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 158 "/usr/include/stdlib.h" 3 4 > >/* > * If we're in a mode greater than C99, expose C11 functions. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 163 "/usr/include/stdlib.h" 3 4 >void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); >int at_quick_exit(void (*)(void)); >_Noreturn void > quick_exit(int); >#endif /* __ISO_C_VISIBLE >= 2011 */ ># 169 "/usr/include/stdlib.h" 3 4 >/* > * Extensions made by POSIX relative to C. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 173 "/usr/include/stdlib.h" 3 4 >char *realpath(const char * __restrict, char * __restrict); >#endif ># 175 "/usr/include/stdlib.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 176 "/usr/include/stdlib.h" 3 4 >int rand_r(unsigned *); /* (TSF) */ >#endif ># 178 "/usr/include/stdlib.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 179 "/usr/include/stdlib.h" 3 4 >int posix_memalign(void **, size_t, size_t); /* (ADV) */ >int setenv(const char *, const char *, int); >int unsetenv(const char *); >#endif ># 183 "/usr/include/stdlib.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 185 "/usr/include/stdlib.h" 3 4 >int getsubopt(char **, char *const *, char **); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 190 "/usr/include/stdlib.h" 3 4 >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 194 "/usr/include/stdlib.h" 3 4 >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 195 "/usr/include/stdlib.h" 3 4 > >/* > * The only changes to the XSI namespace in revision 6 were the deletion > * of the ttyslot() and valloc() functions, which FreeBSD never declared > * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which > * FreeBSD also does not have, and mktemp(), are to be deleted. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 203 "/usr/include/stdlib.h" 3 4 >/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */ >long a64l(const char *); >double drand48(void); >/* char *ecvt(double, int, int * __restrict, int * __restrict); */ >double erand48(unsigned short[3]); >/* char *fcvt(double, int, int * __restrict, int * __restrict); */ >/* char *gcvt(double, int, int * __restrict, int * __restrict); */ >int grantpt(int); >char *initstate(unsigned int, char *, size_t); >long jrand48(unsigned short[3]); >char *l64a(long); >void lcong48(unsigned short[7]); >long lrand48(void); >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 217 "/usr/include/stdlib.h" 3 4 >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 220 "/usr/include/stdlib.h" 3 4 >long mrand48(void); >long nrand48(unsigned short[3]); >int posix_openpt(int); >char *ptsname(int); >int putenv(char *); >long random(void); >unsigned short > *seed48(unsigned short[3]); >char *setstate(/* const */ char *); >void srand48(long); >void srandom(unsigned int); >int unlockpt(int); >#endif /* __XSI_VISIBLE */ ># 233 "/usr/include/stdlib.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 235 "/usr/include/stdlib.h" 3 4 >extern const char *malloc_conf; >extern void (*malloc_message)(void *, const char *); > >/* > * The alloca() function can't be implemented in C, and on some > * platforms it can't be implemented at all as a callable function. > * The GNU C compiler provides a built-in alloca() which we can use. > * On platforms where alloca() is not in libc, programs which use it > * will fail to link when compiled with non-GNU compilers. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC__ >= 2 || defined(__INTEL_COMPILER) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 246 "/usr/include/stdlib.h" 3 4 >#undef alloca /* some GNU bits try to get cute and define this on their own */ >#define alloca(sz) __builtin_alloca(sz) >#endif ># 249 "/usr/include/stdlib.h" 3 4 > >void abort2(const char *, int, void **) __dead2; >__uint32_t > arc4random(void); >void arc4random_buf(void *, size_t); >__uint32_t > arc4random_uniform(__uint32_t); > >#ifdef __BLOCKS__ >int atexit_b(void (^ _Nonnull)(void)); >void *bsearch_b(const void *, const void *, size_t, > size_t, int (^ _Nonnull)(const void *, const void *)); >#endif ># 262 "/usr/include/stdlib.h" 3 4 >char *getbsize(int *, long *); > /* getcap(3) functions */ >char *cgetcap(char *, const char *, int); >int cgetclose(void); >int cgetent(char **, char **, const char *); >int cgetfirst(char **, char **); >int cgetmatch(const char *, const char *); >int cgetnext(char **, char **); >int cgetnum(char *, const char *, long *); >int cgetset(const char *); >int cgetstr(char *, const char *, char **); >int cgetustr(char *, const char *, char **); > >int daemon(int, int); >int daemonfd(int, int); >char *devname(__dev_t, __mode_t); >char *devname_r(__dev_t, __mode_t, char *, int); >char *fdevname(int); >char *fdevname_r(int, char *, int); >int getloadavg(double [], int); >const char * > getprogname(void); > >int heapsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >#ifdef __BLOCKS__ >int heapsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >void qsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >#endif ># 293 "/usr/include/stdlib.h" 3 4 >int l64a_r(long, char *, int); >int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >#endif ># 298 "/usr/include/stdlib.h" 3 4 >int mkostemp(char *, int); >int mkostemps(char *, int, int); >void qsort_r(void *, size_t, size_t, void *, > int (*)(void *, const void *, const void *)); >int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void *reallocarray(void *, size_t, size_t) __result_use_check > __alloc_size2(2, 3); >void *reallocf(void *, size_t) __result_use_check __alloc_size(2); >int rpmatch(const char *); >void setprogname(const char *); >int sradixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void sranddev(void); >void srandomdev(void); >long long > strtonum(const char *, long long, long long, const char **); > >/* Deprecated interfaces, to be removed. */ >__int64_t > strtoq(const char *, char **, int); >__uint64_t > strtouq(const char *, char **, int); > >extern char *suboptarg; /* getsubopt(3) external variable */ >#endif /* __BSD_VISIBLE */ ># 324 "/usr/include/stdlib.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 326 "/usr/include/stdlib.h" 3 4 > >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 331 "/usr/include/stdlib.h" 3 4 > >/* K.3.6 */ >typedef void (*constraint_handler_t)(const char * __restrict, > void * __restrict, errno_t); >/* K.3.6.1.1 */ >constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); >/* K.3.6.1.2 */ >_Noreturn void abort_handler_s(const char * __restrict, void * __restrict, > errno_t); >/* K3.6.1.3 */ >void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); >#endif /* __EXT1_VISIBLE */ ># 343 "/usr/include/stdlib.h" 3 4 > >__END_DECLS >__NULLABILITY_PRAGMA_POP > >#endif /* !_STDLIB_H_ */ ># 348 "/usr/include/stdlib.h" 3 4 ># 44 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <string.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/string.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)string.h 8.1 (Berkeley) 6/2/93 > * $FreeBSD: stable/12/include/string.h 326024 2017-11-20 19:45:28Z pfg $ > */ > >#ifndef _STRING_H_ >#define _STRING_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/string.h" 3 4 ># 39 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/string.h" 3 4 ># 40 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/string.h" 3 4 ># 41 "/usr/include/string.h" 3 4 > >/* > * Prototype functions which were historically defined in <string.h>, but > * are required by POSIX to be prototyped in <strings.h>. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 47 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <strings.h> >#endif /* expanded by -frewrite-includes */ ># 47 "/usr/include/string.h" 3 4 ># 1 "/usr/include/strings.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/include/strings.h 326192 2017-11-25 17:09:43Z pfg $ > */ > >#ifndef _STRINGS_H_ >#define _STRINGS_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/usr/include/strings.h" 3 4 ># 35 "/usr/include/strings.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/usr/include/strings.h" 3 4 ># 36 "/usr/include/strings.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 41 "/usr/include/strings.h" 3 4 > >__BEGIN_DECLS >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 44 "/usr/include/strings.h" 3 4 >int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ >void bcopy(const void *, void *, size_t); /* LEGACY */ >void bzero(void *, size_t); /* LEGACY */ >#endif ># 48 "/usr/include/strings.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 49 "/usr/include/strings.h" 3 4 >void explicit_bzero(void *, size_t); >#endif ># 51 "/usr/include/strings.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 52 "/usr/include/strings.h" 3 4 >int ffs(int) __pure2; >#endif ># 54 "/usr/include/strings.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 55 "/usr/include/strings.h" 3 4 >int ffsl(long) __pure2; >int ffsll(long long) __pure2; >int fls(int) __pure2; >int flsl(long) __pure2; >int flsll(long long) __pure2; >#endif ># 61 "/usr/include/strings.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 62 "/usr/include/strings.h" 3 4 >char *index(const char *, int) __pure; /* LEGACY */ >char *rindex(const char *, int) __pure; /* LEGACY */ >#endif ># 65 "/usr/include/strings.h" 3 4 >int strcasecmp(const char *, const char *) __pure; >int strncasecmp(const char *, const char *, size_t) __pure; > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 69 "/usr/include/strings.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_strings.h> >#endif /* expanded by -frewrite-includes */ ># 69 "/usr/include/strings.h" 3 4 ># 1 "/usr/include/xlocale/_strings.h" 1 3 4 >/*- > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/include/xlocale/_strings.h 266865 2014-05-30 01:09:07Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 33 "/usr/include/xlocale/_strings.h" 3 4 > >/* > * This file is included from both strings.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRINGS1_H >#define _XLOCALE_STRINGS1_H > >/* > * POSIX2008 functions > */ >int strcasecmp_l(const char *, const char *, locale_t); >int strncasecmp_l(const char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRINGS1_H */ ># 49 "/usr/include/xlocale/_strings.h" 3 4 ># 70 "/usr/include/strings.h" 2 3 4 >#endif ># 71 "/usr/include/strings.h" 3 4 >__END_DECLS > >#endif /* _STRINGS_H_ */ ># 74 "/usr/include/strings.h" 3 4 ># 48 "/usr/include/string.h" 2 3 4 >#endif ># 49 "/usr/include/string.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 54 "/usr/include/string.h" 3 4 > >__BEGIN_DECLS >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >= 600 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 57 "/usr/include/string.h" 3 4 >void *memccpy(void * __restrict, const void * __restrict, int, size_t); >#endif ># 59 "/usr/include/string.h" 3 4 >void *memchr(const void *, int, size_t) __pure; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 61 "/usr/include/string.h" 3 4 >void *memrchr(const void *, int, size_t) __pure; >#endif ># 63 "/usr/include/string.h" 3 4 >int memcmp(const void *, const void *, size_t) __pure; >void *memcpy(void * __restrict, const void * __restrict, size_t); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 66 "/usr/include/string.h" 3 4 >void *memmem(const void *, size_t, const void *, size_t) __pure; >#endif ># 68 "/usr/include/string.h" 3 4 >void *memmove(void *, const void *, size_t); >void *memset(void *, int, size_t); >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 71 "/usr/include/string.h" 3 4 >char *stpcpy(char * __restrict, const char * __restrict); >char *stpncpy(char * __restrict, const char * __restrict, size_t); >#endif ># 74 "/usr/include/string.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 75 "/usr/include/string.h" 3 4 >char *strcasestr(const char *, const char *) __pure; >#endif ># 77 "/usr/include/string.h" 3 4 >char *strcat(char * __restrict, const char * __restrict); >char *strchr(const char *, int) __pure; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 80 "/usr/include/string.h" 3 4 >char *strchrnul(const char*, int) __pure; >#endif ># 82 "/usr/include/string.h" 3 4 >int strcmp(const char *, const char *) __pure; >int strcoll(const char *, const char *); >char *strcpy(char * __restrict, const char * __restrict); >size_t strcspn(const char *, const char *) __pure; >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 87 "/usr/include/string.h" 3 4 >char *strdup(const char *) __malloc_like; >#endif ># 89 "/usr/include/string.h" 3 4 >char *strerror(int); >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 91 "/usr/include/string.h" 3 4 >int strerror_r(int, char *, size_t); >#endif ># 93 "/usr/include/string.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 94 "/usr/include/string.h" 3 4 >size_t strlcat(char * __restrict, const char * __restrict, size_t); >size_t strlcpy(char * __restrict, const char * __restrict, size_t); >#endif ># 97 "/usr/include/string.h" 3 4 >size_t strlen(const char *) __pure; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 99 "/usr/include/string.h" 3 4 >void strmode(int, char *); >#endif ># 101 "/usr/include/string.h" 3 4 >char *strncat(char * __restrict, const char * __restrict, size_t); >int strncmp(const char *, const char *, size_t) __pure; >char *strncpy(char * __restrict, const char * __restrict, size_t); >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 105 "/usr/include/string.h" 3 4 >char *strndup(const char *, size_t) __malloc_like; >size_t strnlen(const char *, size_t) __pure; >#endif ># 108 "/usr/include/string.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 109 "/usr/include/string.h" 3 4 >char *strnstr(const char *, const char *, size_t) __pure; >#endif ># 111 "/usr/include/string.h" 3 4 >char *strpbrk(const char *, const char *) __pure; >char *strrchr(const char *, int) __pure; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 114 "/usr/include/string.h" 3 4 >char *strsep(char **, const char *); >#endif ># 116 "/usr/include/string.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 117 "/usr/include/string.h" 3 4 >char *strsignal(int); >#endif ># 119 "/usr/include/string.h" 3 4 >size_t strspn(const char *, const char *) __pure; >char *strstr(const char *, const char *) __pure; >char *strtok(char * __restrict, const char * __restrict); >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 123 "/usr/include/string.h" 3 4 >char *strtok_r(char *, const char *, char **); >#endif ># 125 "/usr/include/string.h" 3 4 >size_t strxfrm(char * __restrict, const char * __restrict, size_t); >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 127 "/usr/include/string.h" 3 4 > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif /* _SIZE_T_DECLARED */ ># 135 "/usr/include/string.h" 3 4 > >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 138 "/usr/include/string.h" 3 4 > >int timingsafe_bcmp(const void *, const void *, size_t); >int timingsafe_memcmp(const void *, const void *, size_t); >#endif /* __BSD_VISIBLE */ ># 142 "/usr/include/string.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 144 "/usr/include/string.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_string.h> >#endif /* expanded by -frewrite-includes */ ># 144 "/usr/include/string.h" 3 4 ># 1 "/usr/include/xlocale/_string.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2011, 2012 The FreeBSD Foundation > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/include/xlocale/_string.h 326192 2017-11-25 17:09:43Z pfg $ > */ > >#ifndef _LOCALE_T_DEFINED >#define _LOCALE_T_DEFINED >typedef struct _xlocale *locale_t; >#endif ># 35 "/usr/include/xlocale/_string.h" 3 4 > >/* > * This file is included from both string.h and xlocale.h. We need to expose > * the declarations unconditionally if we are included from xlocale.h, but only > * if we are in POSIX2008 mode if included from string.h. > */ > >#ifndef _XLOCALE_STRING1_H >#define _XLOCALE_STRING1_H > >/* > * POSIX2008 functions > */ >int strcoll_l(const char *, const char *, locale_t); >size_t strxfrm_l(char *, const char *, size_t, locale_t); >#endif /* _XLOCALE_STRING1_H */ ># 51 "/usr/include/xlocale/_string.h" 3 4 > >/* > * xlocale extensions > */ >#ifdef _XLOCALE_H_ >#ifndef _XLOCALE_STRING2_H >#define _XLOCALE_STRING2_H >char *strcasestr_l(const char *, const char *, locale_t); > >#endif /* _XLOCALE_STRING2_H */ ># 61 "/usr/include/xlocale/_string.h" 3 4 >#endif /* _XLOCALE_H_ */ ># 62 "/usr/include/xlocale/_string.h" 3 4 ># 145 "/usr/include/string.h" 2 3 4 >#endif ># 146 "/usr/include/string.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 148 "/usr/include/string.h" 3 4 > >#ifndef _RSIZE_T_DEFINED >#define _RSIZE_T_DEFINED >typedef size_t rsize_t; >#endif ># 153 "/usr/include/string.h" 3 4 > >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 158 "/usr/include/string.h" 3 4 > >/* ISO/IEC 9899:2011 K.3.7.4.1.1 */ >errno_t memset_s(void *, rsize_t, int, rsize_t); >#endif /* __EXT1_VISIBLE */ ># 162 "/usr/include/string.h" 3 4 >__END_DECLS > >#endif /* _STRING_H_ */ ># 165 "/usr/include/string.h" 3 4 ># 45 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <unistd.h> >#endif /* expanded by -frewrite-includes */ ># 45 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/unistd.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)unistd.h 8.12 (Berkeley) 4/27/95 > * $FreeBSD: stable/12/include/unistd.h 357180 2020-01-27 22:13:42Z kevans $ > */ > >#ifndef _UNISTD_H_ >#define _UNISTD_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/unistd.h" 3 4 ># 39 "/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/types.h> /* XXX adds too much pollution. */ >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/include/unistd.h" 3 4 ># 40 "/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/unistd.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/sys/unistd.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1989, 1993 > * The Regents of the University of California. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)unistd.h 8.2 (Berkeley) 1/7/94 > * $FreeBSD: stable/12/sys/sys/unistd.h 353789 2019-10-21 01:24:21Z kevans $ > */ > >#ifndef _SYS_UNISTD_H_ >#define _SYS_UNISTD_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/include/sys/unistd.h" 3 4 ># 39 "/usr/include/sys/unistd.h" 3 4 > >/* > * POSIX options and option groups we unconditionally do or don't > * implement. Those options which are implemented (or not) entirely > * in user mode are defined in <unistd.h>. Please keep this list in > * alphabetical order. > * > * Anything which is defined as zero below **must** have an > * implementation for the corresponding sysconf() which is able to > * determine conclusively whether or not the feature is supported. > * Anything which is defined as other than -1 below **must** have > * complete headers, types, and function declarations as specified by > * the POSIX standard; however, if the relevant sysconf() function > * returns -1, the functions may be stubbed out. > */ >#define _POSIX_ADVISORY_INFO 200112L >#define _POSIX_ASYNCHRONOUS_IO 200112L >#define _POSIX_CHOWN_RESTRICTED 1 >#define _POSIX_CLOCK_SELECTION (-1) >#define _POSIX_CPUTIME 200112L >#define _POSIX_FSYNC 200112L >#define _POSIX_IPV6 0 >#define _POSIX_JOB_CONTROL 1 >#define _POSIX_MAPPED_FILES 200112L >#define _POSIX_MEMLOCK (-1) >#define _POSIX_MEMLOCK_RANGE 200112L >#define _POSIX_MEMORY_PROTECTION 200112L >#define _POSIX_MESSAGE_PASSING 200112L >#define _POSIX_MONOTONIC_CLOCK 200112L >#define _POSIX_NO_TRUNC 1 >#define _POSIX_PRIORITIZED_IO (-1) >#define _POSIX_PRIORITY_SCHEDULING 0 >#define _POSIX_RAW_SOCKETS 200112L >#define _POSIX_REALTIME_SIGNALS 200112L >#define _POSIX_SEMAPHORES 200112L >#define _POSIX_SHARED_MEMORY_OBJECTS 200112L >#define _POSIX_SPORADIC_SERVER (-1) >#define _POSIX_SYNCHRONIZED_IO (-1) >#define _POSIX_TIMEOUTS 200112L >#define _POSIX_TIMERS 200112L >#define _POSIX_TYPED_MEMORY_OBJECTS (-1) >#define _POSIX_VDISABLE 0xff > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 83 "/usr/include/sys/unistd.h" 3 4 >#define _XOPEN_SHM 1 >#define _XOPEN_STREAMS (-1) >#endif ># 86 "/usr/include/sys/unistd.h" 3 4 > >/* > * Although we have saved user/group IDs, we do not use them in setuid > * as described in POSIX 1003.1, because the feature does not work for > * root. We use the saved IDs in seteuid/setegid, which are not currently > * part of the POSIX 1003.1 specification. XXX revisit for 1003.1-2001 > * as this is now mandatory. > */ >#ifdef _NOT_AVAILABLE >#define _POSIX_SAVED_IDS 1 /* saved set-user-ID and set-group-ID */ >#endif ># 97 "/usr/include/sys/unistd.h" 3 4 > >/* Define the POSIX.1 version we target for compliance. */ >#define _POSIX_VERSION 200112L > >/* access function */ >#define F_OK 0 /* test for existence of file */ >#define X_OK 0x01 /* test for execute or search permission */ >#define W_OK 0x02 /* test for write permission */ >#define R_OK 0x04 /* test for read permission */ > >/* whence values for lseek(2) */ >#ifndef SEEK_SET >#define SEEK_SET 0 /* set file offset to offset */ >#define SEEK_CUR 1 /* set file offset to current plus offset */ >#define SEEK_END 2 /* set file offset to EOF plus offset */ >#endif ># 113 "/usr/include/sys/unistd.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 114 "/usr/include/sys/unistd.h" 3 4 >#define SEEK_DATA 3 /* set file offset to next data past offset */ >#define SEEK_HOLE 4 /* set file offset to next hole past offset */ >#endif ># 117 "/usr/include/sys/unistd.h" 3 4 > >#ifndef _POSIX_SOURCE >/* whence values for lseek(2); renamed by POSIX 1003.1 */ >#define L_SET SEEK_SET >#define L_INCR SEEK_CUR >#define L_XTND SEEK_END >#endif ># 124 "/usr/include/sys/unistd.h" 3 4 > >/* configurable pathname variables */ >#define _PC_LINK_MAX 1 >#define _PC_MAX_CANON 2 >#define _PC_MAX_INPUT 3 >#define _PC_NAME_MAX 4 >#define _PC_PATH_MAX 5 >#define _PC_PIPE_BUF 6 >#define _PC_CHOWN_RESTRICTED 7 >#define _PC_NO_TRUNC 8 >#define _PC_VDISABLE 9 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 137 "/usr/include/sys/unistd.h" 3 4 >#define _PC_ASYNC_IO 53 >#define _PC_PRIO_IO 54 >#define _PC_SYNC_IO 55 >#endif ># 141 "/usr/include/sys/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 143 "/usr/include/sys/unistd.h" 3 4 >#define _PC_ALLOC_SIZE_MIN 10 >#define _PC_FILESIZEBITS 12 >#define _PC_REC_INCR_XFER_SIZE 14 >#define _PC_REC_MAX_XFER_SIZE 15 >#define _PC_REC_MIN_XFER_SIZE 16 >#define _PC_REC_XFER_ALIGN 17 >#define _PC_SYMLINK_MAX 18 >#endif ># 151 "/usr/include/sys/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 153 "/usr/include/sys/unistd.h" 3 4 >#define _PC_ACL_EXTENDED 59 >#define _PC_ACL_PATH_MAX 60 >#define _PC_CAP_PRESENT 61 >#define _PC_INF_PRESENT 62 >#define _PC_MAC_PRESENT 63 >#define _PC_ACL_NFS4 64 >#endif ># 160 "/usr/include/sys/unistd.h" 3 4 > >/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */ >#define _PC_MIN_HOLE_SIZE 21 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 165 "/usr/include/sys/unistd.h" 3 4 >/* > * rfork() options. > * > * XXX currently, some operations without RFPROC set are not supported. > */ >#define RFNAMEG (1<<0) /* UNIMPL new plan9 `name space' */ >#define RFENVG (1<<1) /* UNIMPL copy plan9 `env space' */ >#define RFFDG (1<<2) /* copy fd table */ >#define RFNOTEG (1<<3) /* UNIMPL create new plan9 `note group' */ >#define RFPROC (1<<4) /* change child (else changes curproc) */ >#define RFMEM (1<<5) /* share `address space' */ >#define RFNOWAIT (1<<6) /* give child to init */ >#define RFCNAMEG (1<<10) /* UNIMPL zero plan9 `name space' */ >#define RFCENVG (1<<11) /* UNIMPL zero plan9 `env space' */ >#define RFCFDG (1<<12) /* close all fds, zero fd table */ >#define RFTHREAD (1<<13) /* enable kernel thread support */ >#define RFSIGSHARE (1<<14) /* share signal handlers */ >#define RFLINUXTHPN (1<<16) /* do linux clone exit parent notification */ >#define RFSTOPPED (1<<17) /* leave child in a stopped state */ >#define RFHIGHPID (1<<18) /* use a pid higher than 10 (idleproc) */ >#define RFTSIGZMB (1<<19) /* select signal for exit parent notification */ >#define RFTSIGSHIFT 20 /* selected signal number is in bits 20-27 */ >#define RFTSIGMASK 0xFF >#define RFTSIGNUM(flags) (((flags) >> RFTSIGSHIFT) & RFTSIGMASK) >#define RFTSIGFLAGS(signum) ((signum) << RFTSIGSHIFT) >#define RFPROCDESC (1<<28) /* return a process descriptor */ >/* kernel: parent sleeps until child exits (vfork) */ >#define RFPPWAIT (1<<31) >/* user: vfork(2) semantics, clear signals */ >#define RFSPAWN (1U<<31) >#define RFFLAGS (RFFDG | RFPROC | RFMEM | RFNOWAIT | RFCFDG | \ > RFTHREAD | RFSIGSHARE | RFLINUXTHPN | RFSTOPPED | RFHIGHPID | RFTSIGZMB | \ > RFPROCDESC | RFSPAWN | RFPPWAIT) >#define RFKERNELONLY (RFSTOPPED | RFHIGHPID | RFPROCDESC) > >#endif /* __BSD_VISIBLE */ ># 201 "/usr/include/sys/unistd.h" 3 4 > >#endif /* !_SYS_UNISTD_H_ */ ># 203 "/usr/include/sys/unistd.h" 3 4 ># 41 "/usr/include/unistd.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_null.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/usr/include/unistd.h" 3 4 ># 42 "/usr/include/unistd.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/usr/include/unistd.h" 3 4 ># 43 "/usr/include/unistd.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; >#define _GID_T_DECLARED >#endif ># 48 "/usr/include/unistd.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; >#define _OFF_T_DECLARED >#endif ># 53 "/usr/include/unistd.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; >#define _PID_T_DECLARED >#endif ># 58 "/usr/include/unistd.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 63 "/usr/include/unistd.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 68 "/usr/include/unistd.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 73 "/usr/include/unistd.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; >#define _USECONDS_T_DECLARED >#endif ># 78 "/usr/include/unistd.h" 3 4 > >#define STDIN_FILENO 0 /* standard input file descriptor */ >#define STDOUT_FILENO 1 /* standard output file descriptor */ >#define STDERR_FILENO 2 /* standard error file descriptor */ > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 84 "/usr/include/unistd.h" 3 4 >#define F_ULOCK 0 /* unlock locked section */ >#define F_LOCK 1 /* lock a section for exclusive use */ >#define F_TLOCK 2 /* test and lock a section for exclusive use */ >#define F_TEST 3 /* test a section for locks by other procs */ >#endif ># 89 "/usr/include/unistd.h" 3 4 > >/* > * POSIX options and option groups we unconditionally do or don't > * implement. This list includes those options which are exclusively > * implemented (or not) in user mode. Please keep this list in > * alphabetical order. > * > * Anything which is defined as zero below **must** have an > * implementation for the corresponding sysconf() which is able to > * determine conclusively whether or not the feature is supported. > * Anything which is defined as other than -1 below **must** have > * complete headers, types, and function declarations as specified by > * the POSIX standard; however, if the relevant sysconf() function > * returns -1, the functions may be stubbed out. > */ >#define _POSIX_BARRIERS 200112L >#define _POSIX_CPUTIME 200112L >#define _POSIX_READER_WRITER_LOCKS 200112L >#define _POSIX_REGEXP 1 >#define _POSIX_SHELL 1 >#define _POSIX_SPAWN 200112L >#define _POSIX_SPIN_LOCKS 200112L >#define _POSIX_THREAD_ATTR_STACKADDR 200112L >#define _POSIX_THREAD_ATTR_STACKSIZE 200112L >#define _POSIX_THREAD_CPUTIME 200112L >#define _POSIX_THREAD_PRIO_INHERIT 200112L >#define _POSIX_THREAD_PRIO_PROTECT 200112L >#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L >#define _POSIX_THREAD_PROCESS_SHARED 200112L >#define _POSIX_THREAD_SAFE_FUNCTIONS -1 >#define _POSIX_THREAD_SPORADIC_SERVER -1 >#define _POSIX_THREADS 200112L >#define _POSIX_TRACE -1 >#define _POSIX_TRACE_EVENT_FILTER -1 >#define _POSIX_TRACE_INHERIT -1 >#define _POSIX_TRACE_LOG -1 >#define _POSIX2_C_BIND 200112L /* mandatory */ >#define _POSIX2_C_DEV -1 /* need c99 utility */ >#define _POSIX2_CHAR_TERM 1 >#define _POSIX2_FORT_DEV -1 /* need fort77 utility */ >#define _POSIX2_FORT_RUN 200112L >#define _POSIX2_LOCALEDEF -1 >#define _POSIX2_PBS -1 >#define _POSIX2_PBS_ACCOUNTING -1 >#define _POSIX2_PBS_CHECKPOINT -1 >#define _POSIX2_PBS_LOCATE -1 >#define _POSIX2_PBS_MESSAGE -1 >#define _POSIX2_PBS_TRACK -1 >#define _POSIX2_SW_DEV -1 /* XXX ??? */ >#define _POSIX2_UPE 200112L >#define _V6_ILP32_OFF32 -1 >#define _V6_ILP32_OFFBIG 0 >#define _V6_LP64_OFF64 0 >#define _V6_LPBIG_OFFBIG -1 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 145 "/usr/include/unistd.h" 3 4 >#define _XOPEN_CRYPT -1 /* XXX ??? */ >#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */ >#define _XOPEN_LEGACY -1 >#define _XOPEN_REALTIME -1 >#define _XOPEN_REALTIME_THREADS -1 >#define _XOPEN_UNIX -1 >#endif ># 152 "/usr/include/unistd.h" 3 4 > >/* Define the POSIX.2 version we target for compliance. */ >#define _POSIX2_VERSION 199212L > >/* > * POSIX-style system configuration variable accessors (for the > * sysconf function). The kernel does not directly implement the > * sysconf() interface; rather, a C library stub translates references > * to sysconf() into calls to sysctl() using a giant switch statement. > * Those that are marked `user' are implemented entirely in the C > * library and never query the kernel. pathconf() is implemented > * directly by the kernel so those are not defined here. > */ >#define _SC_ARG_MAX 1 >#define _SC_CHILD_MAX 2 >#define _SC_CLK_TCK 3 >#define _SC_NGROUPS_MAX 4 >#define _SC_OPEN_MAX 5 >#define _SC_JOB_CONTROL 6 >#define _SC_SAVED_IDS 7 >#define _SC_VERSION 8 >#define _SC_BC_BASE_MAX 9 /* user */ >#define _SC_BC_DIM_MAX 10 /* user */ >#define _SC_BC_SCALE_MAX 11 /* user */ >#define _SC_BC_STRING_MAX 12 /* user */ >#define _SC_COLL_WEIGHTS_MAX 13 /* user */ >#define _SC_EXPR_NEST_MAX 14 /* user */ >#define _SC_LINE_MAX 15 /* user */ >#define _SC_RE_DUP_MAX 16 /* user */ >#define _SC_2_VERSION 17 /* user */ >#define _SC_2_C_BIND 18 /* user */ >#define _SC_2_C_DEV 19 /* user */ >#define _SC_2_CHAR_TERM 20 /* user */ >#define _SC_2_FORT_DEV 21 /* user */ >#define _SC_2_FORT_RUN 22 /* user */ >#define _SC_2_LOCALEDEF 23 /* user */ >#define _SC_2_SW_DEV 24 /* user */ >#define _SC_2_UPE 25 /* user */ >#define _SC_STREAM_MAX 26 /* user */ >#define _SC_TZNAME_MAX 27 /* user */ > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 194 "/usr/include/unistd.h" 3 4 >#define _SC_ASYNCHRONOUS_IO 28 >#define _SC_MAPPED_FILES 29 >#define _SC_MEMLOCK 30 >#define _SC_MEMLOCK_RANGE 31 >#define _SC_MEMORY_PROTECTION 32 >#define _SC_MESSAGE_PASSING 33 >#define _SC_PRIORITIZED_IO 34 >#define _SC_PRIORITY_SCHEDULING 35 >#define _SC_REALTIME_SIGNALS 36 >#define _SC_SEMAPHORES 37 >#define _SC_FSYNC 38 >#define _SC_SHARED_MEMORY_OBJECTS 39 >#define _SC_SYNCHRONIZED_IO 40 >#define _SC_TIMERS 41 >#define _SC_AIO_LISTIO_MAX 42 >#define _SC_AIO_MAX 43 >#define _SC_AIO_PRIO_DELTA_MAX 44 >#define _SC_DELAYTIMER_MAX 45 >#define _SC_MQ_OPEN_MAX 46 >#define _SC_PAGESIZE 47 >#define _SC_RTSIG_MAX 48 >#define _SC_SEM_NSEMS_MAX 49 >#define _SC_SEM_VALUE_MAX 50 >#define _SC_SIGQUEUE_MAX 51 >#define _SC_TIMER_MAX 52 >#endif ># 220 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 222 "/usr/include/unistd.h" 3 4 >#define _SC_2_PBS 59 /* user */ >#define _SC_2_PBS_ACCOUNTING 60 /* user */ >#define _SC_2_PBS_CHECKPOINT 61 /* user */ >#define _SC_2_PBS_LOCATE 62 /* user */ >#define _SC_2_PBS_MESSAGE 63 /* user */ >#define _SC_2_PBS_TRACK 64 /* user */ >#define _SC_ADVISORY_INFO 65 >#define _SC_BARRIERS 66 /* user */ >#define _SC_CLOCK_SELECTION 67 >#define _SC_CPUTIME 68 >#define _SC_FILE_LOCKING 69 >#define _SC_GETGR_R_SIZE_MAX 70 /* user */ >#define _SC_GETPW_R_SIZE_MAX 71 /* user */ >#define _SC_HOST_NAME_MAX 72 >#define _SC_LOGIN_NAME_MAX 73 >#define _SC_MONOTONIC_CLOCK 74 >#define _SC_MQ_PRIO_MAX 75 >#define _SC_READER_WRITER_LOCKS 76 /* user */ >#define _SC_REGEXP 77 /* user */ >#define _SC_SHELL 78 /* user */ >#define _SC_SPAWN 79 /* user */ >#define _SC_SPIN_LOCKS 80 /* user */ >#define _SC_SPORADIC_SERVER 81 >#define _SC_THREAD_ATTR_STACKADDR 82 /* user */ >#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */ >#define _SC_THREAD_CPUTIME 84 /* user */ >#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */ >#define _SC_THREAD_KEYS_MAX 86 /* user */ >#define _SC_THREAD_PRIO_INHERIT 87 /* user */ >#define _SC_THREAD_PRIO_PROTECT 88 /* user */ >#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */ >#define _SC_THREAD_PROCESS_SHARED 90 /* user */ >#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */ >#define _SC_THREAD_SPORADIC_SERVER 92 /* user */ >#define _SC_THREAD_STACK_MIN 93 /* user */ >#define _SC_THREAD_THREADS_MAX 94 /* user */ >#define _SC_TIMEOUTS 95 /* user */ >#define _SC_THREADS 96 /* user */ >#define _SC_TRACE 97 /* user */ >#define _SC_TRACE_EVENT_FILTER 98 /* user */ >#define _SC_TRACE_INHERIT 99 /* user */ >#define _SC_TRACE_LOG 100 /* user */ >#define _SC_TTY_NAME_MAX 101 /* user */ >#define _SC_TYPED_MEMORY_OBJECTS 102 >#define _SC_V6_ILP32_OFF32 103 /* user */ >#define _SC_V6_ILP32_OFFBIG 104 /* user */ >#define _SC_V6_LP64_OFF64 105 /* user */ >#define _SC_V6_LPBIG_OFFBIG 106 /* user */ >#define _SC_IPV6 118 >#define _SC_RAW_SOCKETS 119 >#define _SC_SYMLOOP_MAX 120 >#endif ># 274 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 276 "/usr/include/unistd.h" 3 4 >#define _SC_ATEXIT_MAX 107 /* user */ >#define _SC_IOV_MAX 56 >#define _SC_PAGE_SIZE _SC_PAGESIZE >#define _SC_XOPEN_CRYPT 108 /* user */ >#define _SC_XOPEN_ENH_I18N 109 /* user */ >#define _SC_XOPEN_LEGACY 110 /* user */ >#define _SC_XOPEN_REALTIME 111 >#define _SC_XOPEN_REALTIME_THREADS 112 >#define _SC_XOPEN_SHM 113 >#define _SC_XOPEN_STREAMS 114 >#define _SC_XOPEN_UNIX 115 >#define _SC_XOPEN_VERSION 116 >#define _SC_XOPEN_XCU_VERSION 117 /* user */ >#endif ># 290 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 292 "/usr/include/unistd.h" 3 4 >#define _SC_NPROCESSORS_CONF 57 >#define _SC_NPROCESSORS_ONLN 58 >#define _SC_CPUSET_SIZE 122 >#endif ># 296 "/usr/include/unistd.h" 3 4 > >/* Extensions found in Solaris and Linux. */ >#define _SC_PHYS_PAGES 121 > >/* Keys for the confstr(3) function. */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199209 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 302 "/usr/include/unistd.h" 3 4 >#define _CS_PATH 1 /* default value of PATH */ >#endif ># 304 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 306 "/usr/include/unistd.h" 3 4 >#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 >#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 >#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 >#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 >#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 >#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 >#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 >#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 >#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 >#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 >#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 >#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 >#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 >#endif ># 320 "/usr/include/unistd.h" 3 4 > >__BEGIN_DECLS >/* 1003.1-1990 */ >void _exit(int) __dead2; >int access(const char *, int); >unsigned int alarm(unsigned int); >int chdir(const char *); >int chown(const char *, uid_t, gid_t); >int close(int); >void closefrom(int); >int dup(int); >int dup2(int, int); >int execl(const char *, const char *, ...) __null_sentinel; >int execle(const char *, const char *, ...); >int execlp(const char *, const char *, ...) __null_sentinel; >int execv(const char *, char * const *); >int execve(const char *, char * const *, char * const *); >int execvp(const char *, char * const *); >pid_t fork(void); >long fpathconf(int, int); >char *getcwd(char *, size_t); >gid_t getegid(void); >uid_t geteuid(void); >gid_t getgid(void); >int getgroups(int, gid_t []); >char *getlogin(void); >pid_t getpgrp(void); >pid_t getpid(void); >pid_t getppid(void); >uid_t getuid(void); >int isatty(int); >int link(const char *, const char *); >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 356 "/usr/include/unistd.h" 3 4 >long pathconf(const char *, int); >int pause(void); >int pipe(int *); >ssize_t read(int, void *, size_t); >int rmdir(const char *); >int setgid(gid_t); >int setpgid(pid_t, pid_t); >pid_t setsid(void); >int setuid(uid_t); >unsigned int sleep(unsigned int); >long sysconf(int); >pid_t tcgetpgrp(int); >int tcsetpgrp(int, pid_t); >char *ttyname(int); >int ttyname_r(int, char *, size_t); >int unlink(const char *); >ssize_t write(int, const void *, size_t); > >/* 1003.2-1992 */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 376 "/usr/include/unistd.h" 3 4 >size_t confstr(int, char *, size_t); >#ifndef _GETOPT_DECLARED >#define _GETOPT_DECLARED >int getopt(int, char * const [], const char *); > >extern char *optarg; /* getopt(3) external variables */ >extern int optind, opterr, optopt; >#endif /* _GETOPT_DECLARED */ ># 384 "/usr/include/unistd.h" 3 4 >#endif ># 385 "/usr/include/unistd.h" 3 4 > >/* ISO/IEC 9945-1: 1996 */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 388 "/usr/include/unistd.h" 3 4 >int fsync(int); >int fdatasync(int); > >/* > * ftruncate() was in the POSIX Realtime Extension (it's used for shared > * memory), but truncate() was not. > */ >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 399 "/usr/include/unistd.h" 3 4 >#endif ># 400 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 402 "/usr/include/unistd.h" 3 4 >int getlogin_r(char *, int); >#endif ># 404 "/usr/include/unistd.h" 3 4 > >/* 1003.1-2001 */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 407 "/usr/include/unistd.h" 3 4 >int fchown(int, uid_t, gid_t); >ssize_t readlink(const char * __restrict, char * __restrict, size_t); >#endif ># 410 "/usr/include/unistd.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 411 "/usr/include/unistd.h" 3 4 >int gethostname(char *, size_t); >int setegid(gid_t); >int seteuid(uid_t); >#endif ># 415 "/usr/include/unistd.h" 3 4 > >/* 1003.1-2008 */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 418 "/usr/include/unistd.h" 3 4 >int getsid(pid_t _pid); >int fchdir(int); >int getpgid(pid_t _pid); >int lchown(const char *, uid_t, gid_t); >ssize_t pread(int, void *, size_t, off_t); >ssize_t pwrite(int, const void *, size_t, off_t); > >/* See comment at ftruncate() above. */ >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 430 "/usr/include/unistd.h" 3 4 >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 431 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 433 "/usr/include/unistd.h" 3 4 >int faccessat(int, const char *, int, int); >int fchownat(int, const char *, uid_t, gid_t, int); >int fexecve(int, char *const [], char *const []); >int linkat(int, const char *, int, const char *, int); >ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); >int symlinkat(const char *, int, const char *); >int unlinkat(int, const char *, int); >#endif /* __POSIX_VISIBLE >= 200809 */ ># 441 "/usr/include/unistd.h" 3 4 > >/* > * symlink() was originally in POSIX.1a, which was withdrawn after > * being overtaken by events (1003.1-2001). It was in XPG4.2, and of > * course has been in BSD since 4.2. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 448 "/usr/include/unistd.h" 3 4 >int symlink(const char * __restrict, const char * __restrict); >#endif ># 450 "/usr/include/unistd.h" 3 4 > >/* X/Open System Interfaces */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 453 "/usr/include/unistd.h" 3 4 >char *crypt(const char *, const char *); >long gethostid(void); >int lockf(int, int, off_t); >int nice(int); >int setregid(gid_t, gid_t); >int setreuid(uid_t, uid_t); > >#ifndef _SWAB_DECLARED >#define _SWAB_DECLARED >void swab(const void * __restrict, void * __restrict, ssize_t); >#endif /* _SWAB_DECLARED */ ># 464 "/usr/include/unistd.h" 3 4 > >void sync(void); > >#endif /* __XSI_VISIBLE */ ># 468 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if (__XSI_VISIBLE && __XSI_VISIBLE <= 500) || __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 470 "/usr/include/unistd.h" 3 4 >int brk(const void *); >int chroot(const char *); >int getdtablesize(void); >int getpagesize(void) __pure2; >char *getpass(const char *); >void *sbrk(intptr_t); >#endif ># 477 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if (__XSI_VISIBLE && __XSI_VISIBLE <= 600) || __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 479 "/usr/include/unistd.h" 3 4 >char *getwd(char *); /* obsoleted by getcwd() */ >useconds_t > ualarm(useconds_t, useconds_t); >int usleep(useconds_t); >pid_t vfork(void) __returns_twice; >#endif ># 485 "/usr/include/unistd.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 487 "/usr/include/unistd.h" 3 4 >struct timeval; /* select(2) */ > >struct crypt_data { > int initialized; /* For compatibility with glibc. */ > char __buf[256]; /* Buffer returned by crypt_r(). */ >}; > >int acct(const char *); >int async_daemon(void); >int check_utility_compat(const char *); >const char * > crypt_get_format(void); >char *crypt_r(const char *, const char *, struct crypt_data *); >int crypt_set_format(const char *); >int dup3(int, int, int); >int eaccess(const char *, int); >void endusershell(void); >int exect(const char *, char * const *, char * const *); >int execvP(const char *, const char *, char * const *); >int feature_present(const char *); >char *fflagstostr(u_long); >int getdomainname(char *, int); >int getentropy(void *, size_t); >int getgrouplist(const char *, gid_t, gid_t *, int *); >int getloginclass(char *, size_t); >mode_t getmode(const void *, mode_t); >int getosreldate(void); >int getpeereid(int, uid_t *, gid_t *); >int getresgid(gid_t *, gid_t *, gid_t *); >int getresuid(uid_t *, uid_t *, uid_t *); >char *getusershell(void); >int initgroups(const char *, gid_t); >int iruserok(unsigned long, int, const char *, const char *); >int iruserok_sa(const void *, int, int, const char *, const char *); >int issetugid(void); >void __FreeBSD_libc_enter_restricted_mode(void); >long lpathconf(const char *, int); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 528 "/usr/include/unistd.h" 3 4 >#ifndef _MKNOD_DECLARED >int mknod(const char *, mode_t, dev_t); >#define _MKNOD_DECLARED >#endif ># 532 "/usr/include/unistd.h" 3 4 >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 536 "/usr/include/unistd.h" 3 4 >int mkstemps(char *, int); >#ifndef _MKTEMP_DECLARED >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 541 "/usr/include/unistd.h" 3 4 >int nfssvc(int, void *); >int nlm_syscall(int, int, int, char **); >int pipe2(int *, int); >int profil(char *, size_t, vm_offset_t, int); >int rcmd(char **, int, const char *, const char *, const char *, int *); >int rcmd_af(char **, int, const char *, > const char *, const char *, int *, int); >int rcmdsh(char **, int, const char *, > const char *, const char *, const char *); >char *re_comp(const char *); >int re_exec(const char *); >int reboot(int); >int revoke(const char *); >pid_t rfork(int) __returns_twice; >pid_t rfork_thread(int, void *, int (*)(void *), void *); >int rresvport(int *); >int rresvport_af(int *, int); >int ruserok(const char *, int, const char *, const char *); >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 563 "/usr/include/unistd.h" 3 4 >int setdomainname(const char *, int); >int setgroups(int, const gid_t *); >void sethostid(long); >int sethostname(const char *, int); >int setlogin(const char *); >int setloginclass(const char *); >void *setmode(const char *); >int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */ >void setproctitle(const char *_fmt, ...) __printf0like(1, 2); >void setproctitle_fast(const char *_fmt, ...) __printf0like(1, 2); >int setresgid(gid_t, gid_t, gid_t); >int setresuid(uid_t, uid_t, uid_t); >int setrgid(gid_t); >int setruid(uid_t); >void setusershell(void); >int strtofflags(char **, u_long *, u_long *); >int swapon(const char *); >int swapoff(const char *); >int syscall(int, ...); >off_t __syscall(quad_t, ...); >int undelete(const char *); >int unwhiteout(const char *); >void *valloc(size_t); /* obsoleted by malloc() */ > >#ifndef _OPTRESET_DECLARED >#define _OPTRESET_DECLARED >extern int optreset; /* getopt(3) external variable */ >#endif ># 591 "/usr/include/unistd.h" 3 4 >#endif /* __BSD_VISIBLE */ ># 592 "/usr/include/unistd.h" 3 4 >__END_DECLS > >#endif /* !_UNISTD_H_ */ ># 595 "/usr/include/unistd.h" 3 4 ># 46 "/usr/src/lib/libnv/msgio.c" 2 > >#ifdef HAVE_PJDLOG >#if 0 /* expanded by -frewrite-includes */ >#include <pjdlog.h> >#endif /* expanded by -frewrite-includes */ ># 48 "/usr/src/lib/libnv/msgio.c" ># 49 "/usr/src/lib/libnv/msgio.c" >#endif ># 50 "/usr/src/lib/libnv/msgio.c" > >#if 0 /* expanded by -frewrite-includes */ >#include "common_impl.h" >#endif /* expanded by -frewrite-includes */ ># 51 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/src/lib/libnv/common_impl.h" 1 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2013 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by Pawel Jakub Dawidek under sponsorship from > * the FreeBSD Foundation. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/lib/libnv/common_impl.h 341079 2018-11-27 17:00:47Z markj $ > */ > >#ifndef _COMMON_IMPL_H_ >#define _COMMON_IMPL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <errno.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/usr/src/lib/libnv/common_impl.h" ># 38 "/usr/src/lib/libnv/common_impl.h" >#if 0 /* expanded by -frewrite-includes */ >#include <fcntl.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/usr/src/lib/libnv/common_impl.h" ># 39 "/usr/src/lib/libnv/common_impl.h" >#if 0 /* expanded by -frewrite-includes */ >#include <stdbool.h> >#endif /* expanded by -frewrite-includes */ ># 39 "/usr/src/lib/libnv/common_impl.h" ># 40 "/usr/src/lib/libnv/common_impl.h" > >static inline bool >fd_is_valid(int fd) >{ > > return (fcntl(fd, F_GETFD) != -1 || errno != EBADF); >} > >#endif /* !_COMMON_IMPL_H_ */ ># 49 "/usr/src/lib/libnv/common_impl.h" ># 52 "/usr/src/lib/libnv/msgio.c" 2 >#if 0 /* expanded by -frewrite-includes */ >#include "msgio.h" >#endif /* expanded by -frewrite-includes */ ># 52 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/src/lib/libnv/msgio.h" 1 >/*- > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2013 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by Pawel Jakub Dawidek under sponsorship from > * the FreeBSD Foundation. > * > * Copyright (c) 2013 Mariusz Zaborski <oshogbo@FreeBSD.org> > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: stable/12/lib/libnv/msgio.h 326219 2017-11-26 02:00:33Z pfg $ > */ > >#ifndef _MSGIO_H_ >#define _MSGIO_H_ > >struct cmsgcred; >struct iovec; >struct msghdr; > >int cred_send(int sock); >int cred_recv(int sock, struct cmsgcred *cred); > >int fd_send(int sock, const int *fds, size_t nfds); >int fd_recv(int sock, int *fds, size_t nfds); > >int buf_send(int sock, void *buf, size_t size); >int buf_recv(int sock, void *buf, size_t size); > >#endif /* !_MSGIO_H_ */ ># 53 "/usr/src/lib/libnv/msgio.h" ># 53 "/usr/src/lib/libnv/msgio.c" 2 > >#ifndef HAVE_PJDLOG >#if 0 /* expanded by -frewrite-includes */ >#include <assert.h> >#endif /* expanded by -frewrite-includes */ ># 55 "/usr/src/lib/libnv/msgio.c" ># 1 "/usr/include/assert.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in the > * documentation and/or other materials provided with the distribution. > * 3. Neither the name of the University nor the names of its contributors > * may be used to endorse or promote products derived from this software > * without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * @(#)assert.h 8.2 (Berkeley) 1/21/94 > * $FreeBSD: stable/12/include/assert.h 326024 2017-11-20 19:45:28Z pfg $ > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/usr/include/assert.h" 3 4 ># 41 "/usr/include/assert.h" 3 4 > >/* > * Unlike other ANSI header files, <assert.h> may usefully be included > * multiple times, with and without NDEBUG defined. > */ > >#undef assert >#undef _assert > >#ifdef NDEBUG >#define assert(e) ((void)0) >#define _assert(e) ((void)0) >#else ># 54 "/usr/include/assert.h" 3 4 >#define _assert(e) assert(e) > >#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ > __LINE__, #e)) >#endif /* NDEBUG */ ># 59 "/usr/include/assert.h" 3 4 > >#ifndef _ASSERT_H_ >#define _ASSERT_H_ > >/* > * Static assertions. In principle we could define static_assert for > * C++ older than C++11, but this breaks if _Static_assert is > * implemented as a macro. > * > * C++ template parameters may contain commas, even if not enclosed in > * parentheses, causing the _Static_assert macro to be invoked with more > * than two parameters. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 73 "/usr/include/assert.h" 3 4 >#define static_assert _Static_assert >#endif ># 75 "/usr/include/assert.h" 3 4 > >__BEGIN_DECLS >void __assert(const char *, const char *, int, const char *) __dead2; >__END_DECLS > >#endif /* !_ASSERT_H_ */ ># 81 "/usr/include/assert.h" 3 4 ># 56 "/usr/src/lib/libnv/msgio.c" 2 >#define PJDLOG_ASSERT(...) assert(__VA_ARGS__) >#define PJDLOG_RASSERT(expr, ...) assert(expr) >#define PJDLOG_ABORT(...) abort() >#endif ># 60 "/usr/src/lib/libnv/msgio.c" > >/* > * To work around limitations in 32-bit emulation on 64-bit kernels, use a > * machine-independent limit on the number of FDs per message. Each control > * message contains 1 FD and requires 12 bytes for the header, 4 pad bytes, > * 4 bytes for the descriptor, and another 4 pad bytes. > */ >#define PKG_MAX_SIZE (MCLBYTES / 24) > >static int >msghdr_add_fd(struct cmsghdr *cmsg, int fd) >{ > > PJDLOG_ASSERT(fd >= 0); > > cmsg->cmsg_level = SOL_SOCKET; > cmsg->cmsg_type = SCM_RIGHTS; > cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); > bcopy(&fd, CMSG_DATA(cmsg), sizeof(fd)); > > return (0); >} > >static int >msghdr_get_fd(struct cmsghdr *cmsg) >{ > int fd; > > if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || > cmsg->cmsg_type != SCM_RIGHTS || > cmsg->cmsg_len != CMSG_LEN(sizeof(fd))) { > errno = EINVAL; > return (-1); > } > > bcopy(CMSG_DATA(cmsg), &fd, sizeof(fd)); >#ifndef MSG_CMSG_CLOEXEC > /* > * If the MSG_CMSG_CLOEXEC flag is not available we cannot set the > * close-on-exec flag atomically, but we still want to set it for > * consistency. > */ > (void) fcntl(fd, F_SETFD, FD_CLOEXEC); >#endif ># 104 "/usr/src/lib/libnv/msgio.c" > > return (fd); >} > >static void >fd_wait(int fd, bool doread) >{ > fd_set fds; > > PJDLOG_ASSERT(fd >= 0); > > FD_ZERO(&fds); > FD_SET(fd, &fds); > (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, > NULL, NULL); >} > >static int >msg_recv(int sock, struct msghdr *msg) >{ > int flags; > > PJDLOG_ASSERT(sock >= 0); > >#ifdef MSG_CMSG_CLOEXEC > flags = MSG_CMSG_CLOEXEC; >#else ># 131 "/usr/src/lib/libnv/msgio.c" > flags = 0; >#endif ># 133 "/usr/src/lib/libnv/msgio.c" > > for (;;) { > fd_wait(sock, true); > if (recvmsg(sock, msg, flags) == -1) { > if (errno == EINTR) > continue; > return (-1); > } > break; > } > > return (0); >} > >static int >msg_send(int sock, const struct msghdr *msg) >{ > > PJDLOG_ASSERT(sock >= 0); > > for (;;) { > fd_wait(sock, false); > if (sendmsg(sock, msg, 0) == -1) { > if (errno == EINTR) > continue; > return (-1); > } > break; > } > > return (0); >} > >int >cred_send(int sock) >{ > unsigned char credbuf[CMSG_SPACE(sizeof(struct cmsgcred))]; > struct msghdr msg; > struct cmsghdr *cmsg; > struct iovec iov; > uint8_t dummy; > > bzero(credbuf, sizeof(credbuf)); > bzero(&msg, sizeof(msg)); > bzero(&iov, sizeof(iov)); > > /* > * XXX: We send one byte along with the control message, because > * setting msg_iov to NULL only works if this is the first > * packet send over the socket. Once we send some data we > * won't be able to send credentials anymore. This is most > * likely a kernel bug. > */ > dummy = 0; > iov.iov_base = &dummy; > iov.iov_len = sizeof(dummy); > > msg.msg_iov = &iov; > msg.msg_iovlen = 1; > msg.msg_control = credbuf; > msg.msg_controllen = sizeof(credbuf); > > cmsg = CMSG_FIRSTHDR(&msg); > cmsg->cmsg_len = CMSG_LEN(sizeof(struct cmsgcred)); > cmsg->cmsg_level = SOL_SOCKET; > cmsg->cmsg_type = SCM_CREDS; > > if (msg_send(sock, &msg) == -1) > return (-1); > > return (0); >} > >int >cred_recv(int sock, struct cmsgcred *cred) >{ > unsigned char credbuf[CMSG_SPACE(sizeof(struct cmsgcred))]; > struct msghdr msg; > struct cmsghdr *cmsg; > struct iovec iov; > uint8_t dummy; > > bzero(credbuf, sizeof(credbuf)); > bzero(&msg, sizeof(msg)); > bzero(&iov, sizeof(iov)); > > iov.iov_base = &dummy; > iov.iov_len = sizeof(dummy); > > msg.msg_iov = &iov; > msg.msg_iovlen = 1; > msg.msg_control = credbuf; > msg.msg_controllen = sizeof(credbuf); > > if (msg_recv(sock, &msg) == -1) > return (-1); > > cmsg = CMSG_FIRSTHDR(&msg); > if (cmsg == NULL || > cmsg->cmsg_len != CMSG_LEN(sizeof(struct cmsgcred)) || > cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_CREDS) { > errno = EINVAL; > return (-1); > } > bcopy(CMSG_DATA(cmsg), cred, sizeof(*cred)); > > return (0); >} > >static int >fd_package_send(int sock, const int *fds, size_t nfds) >{ > struct msghdr msg; > struct cmsghdr *cmsg; > struct iovec iov; > unsigned int i; > int serrno, ret; > uint8_t dummy; > > PJDLOG_ASSERT(sock >= 0); > PJDLOG_ASSERT(fds != NULL); > PJDLOG_ASSERT(nfds > 0); > > bzero(&msg, sizeof(msg)); > > /* > * XXX: Look into cred_send function for more details. > */ > dummy = 0; > iov.iov_base = &dummy; > iov.iov_len = sizeof(dummy); > > msg.msg_iov = &iov; > msg.msg_iovlen = 1; > msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int)); > msg.msg_control = calloc(1, msg.msg_controllen); > if (msg.msg_control == NULL) > return (-1); > > ret = -1; > > for (i = 0, cmsg = CMSG_FIRSTHDR(&msg); i < nfds && cmsg != NULL; > i++, cmsg = CMSG_NXTHDR(&msg, cmsg)) { > if (msghdr_add_fd(cmsg, fds[i]) == -1) > goto end; > } > > if (msg_send(sock, &msg) == -1) > goto end; > > ret = 0; >end: > serrno = errno; > free(msg.msg_control); > errno = serrno; > return (ret); >} > >static int >fd_package_recv(int sock, int *fds, size_t nfds) >{ > struct msghdr msg; > struct cmsghdr *cmsg; > unsigned int i; > int serrno, ret; > struct iovec iov; > uint8_t dummy; > > PJDLOG_ASSERT(sock >= 0); > PJDLOG_ASSERT(nfds > 0); > PJDLOG_ASSERT(fds != NULL); > > bzero(&msg, sizeof(msg)); > bzero(&iov, sizeof(iov)); > > /* > * XXX: Look into cred_send function for more details. > */ > iov.iov_base = &dummy; > iov.iov_len = sizeof(dummy); > > msg.msg_iov = &iov; > msg.msg_iovlen = 1; > msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int)); > msg.msg_control = calloc(1, msg.msg_controllen); > if (msg.msg_control == NULL) > return (-1); > > ret = -1; > > if (msg_recv(sock, &msg) == -1) > goto end; > > for (i = 0, cmsg = CMSG_FIRSTHDR(&msg); i < nfds && cmsg != NULL; > i++, cmsg = CMSG_NXTHDR(&msg, cmsg)) { > fds[i] = msghdr_get_fd(cmsg); > if (fds[i] < 0) > break; > } > > if (cmsg != NULL || i < nfds) { > int fd; > > /* > * We need to close all received descriptors, even if we have > * different control message (eg. SCM_CREDS) in between. > */ > for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; > cmsg = CMSG_NXTHDR(&msg, cmsg)) { > fd = msghdr_get_fd(cmsg); > if (fd >= 0) > close(fd); > } > errno = EINVAL; > goto end; > } > > ret = 0; >end: > serrno = errno; > free(msg.msg_control); > errno = serrno; > return (ret); >} > >int >fd_recv(int sock, int *fds, size_t nfds) >{ > unsigned int i, step, j; > int ret, serrno; > > if (nfds == 0 || fds == NULL) { > errno = EINVAL; > return (-1); > } > > ret = i = step = 0; > while (i < nfds) { > if (PKG_MAX_SIZE < nfds - i) > step = PKG_MAX_SIZE; > else > step = nfds - i; > ret = fd_package_recv(sock, fds + i, step); > if (ret != 0) { > /* Close all received descriptors. */ > serrno = errno; > for (j = 0; j < i; j++) > close(fds[j]); > errno = serrno; > break; > } > i += step; > } > > return (ret); >} > >int >fd_send(int sock, const int *fds, size_t nfds) >{ > unsigned int i, step; > int ret; > > if (nfds == 0 || fds == NULL) { > errno = EINVAL; > return (-1); > } > > ret = i = step = 0; > while (i < nfds) { > if (PKG_MAX_SIZE < nfds - i) > step = PKG_MAX_SIZE; > else > step = nfds - i; > ret = fd_package_send(sock, fds + i, step); > if (ret != 0) > break; > i += step; > } > > return (ret); >} > >int >buf_send(int sock, void *buf, size_t size) >{ > ssize_t done; > unsigned char *ptr; > > PJDLOG_ASSERT(sock >= 0); > PJDLOG_ASSERT(size > 0); > PJDLOG_ASSERT(buf != NULL); > > ptr = buf; > do { > fd_wait(sock, false); > done = send(sock, ptr, size, 0); > if (done == -1) { > if (errno == EINTR) > continue; > return (-1); > } else if (done == 0) { > errno = ENOTCONN; > return (-1); > } > size -= done; > ptr += done; > } while (size > 0); > > return (0); >} > >int >buf_recv(int sock, void *buf, size_t size) >{ > ssize_t done; > unsigned char *ptr; > > PJDLOG_ASSERT(sock >= 0); > PJDLOG_ASSERT(buf != NULL); > > ptr = buf; > while (size > 0) { > fd_wait(sock, true); > done = recv(sock, ptr, size, 0); > if (done == -1) { > if (errno == EINTR) > continue; > return (-1); > } else if (done == 0) { > errno = ENOTCONN; > return (-1); > } > size -= done; > ptr += done; > } > > return (0); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 248513
: 217066 |
217067