# 1 "" # 1 "/usr/src/contrib/atf/atf-c/tc.c" /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* expanded by -frewrite-includes */ #include "atf-c/tc.h" #endif /* expanded by -frewrite-includes */ # 26 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/tc.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_TC_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/tc.h" #define ATF_C_TC_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/tc.h" # 1 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 1 3 4 /*===---- stdbool.h - Standard header for booleans -------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __STDBOOL_H #define __STDBOOL_H /* Don't define bool, true, and false in C++, except as a GNU extension. */ #ifndef __cplusplus #define bool _Bool #define true 1 #define false 0 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 19 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 3 4 /* Define _Bool as a GNU extension. */ #define _Bool bool #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 22 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 3 4 /* For C++98, define bool, false, true as a GNU extension. */ #define bool bool #define false false #define true true #endif # 27 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 3 4 #endif # 28 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 3 4 #define __bool_true_false_are_defined 1 #endif /* __STDBOOL_H */ # 32 "/opt/llvm/lib/clang/10.0.0/include/stdbool.h" 3 4 # 30 "/usr/src/contrib/atf/atf-c/tc.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/tc.h" # 1 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 17 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 19 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 30 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 33 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 42 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 69 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 101 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 31 "/usr/src/contrib/atf/atf-c/tc.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/tc.h" # 1 "/usr/src/contrib/atf/atf-c/defs.h" 1 /* * Automated Testing Framework (atf) * * Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DEFS_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "/usr/src/contrib/atf/atf-c/defs.h" #define ATF_C_DEFS_H #define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) __attribute__((__format__(__printf__, a, b))) #define ATF_DEFS_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) #define ATF_DEFS_ATTRIBUTE_UNUSED __attribute__((__unused__)) #endif /* !defined(ATF_C_DEFS_H) */ # 38 "/usr/src/contrib/atf/atf-c/defs.h" # 33 "/usr/src/contrib/atf/atf-c/tc.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/tc.h" # 1 "/usr/src/contrib/atf/atf-c/error_fwd.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_ERROR_FWD_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/error_fwd.h" #define ATF_C_ERROR_FWD_H /* --------------------------------------------------------------------- * The "atf_error" type. * --------------------------------------------------------------------- */ struct atf_error; typedef struct atf_error *atf_error_t; #endif /* !defined(ATF_C_ERROR_FWD_H) */ # 37 "/usr/src/contrib/atf/atf-c/error_fwd.h" # 34 "/usr/src/contrib/atf/atf-c/tc.h" 2 struct atf_tc; typedef void (*atf_tc_head_t)(struct atf_tc *); typedef void (*atf_tc_body_t)(const struct atf_tc *); typedef void (*atf_tc_cleanup_t)(const struct atf_tc *); /* --------------------------------------------------------------------- * The "atf_tc_pack" type. * --------------------------------------------------------------------- */ /* For static initialization only. */ struct atf_tc_pack { const char *m_ident; const char *const *m_config; atf_tc_head_t m_head; atf_tc_body_t m_body; atf_tc_cleanup_t m_cleanup; }; typedef const struct atf_tc_pack atf_tc_pack_t; /* --------------------------------------------------------------------- * The "atf_tc" type. * --------------------------------------------------------------------- */ struct atf_tc_impl; struct atf_tc { struct atf_tc_impl *pimpl; }; typedef struct atf_tc atf_tc_t; /* Constructors/destructors. */ atf_error_t atf_tc_init(atf_tc_t *, const char *, atf_tc_head_t, atf_tc_body_t, atf_tc_cleanup_t, const char *const *); atf_error_t atf_tc_init_pack(atf_tc_t *, atf_tc_pack_t *, const char *const *); void atf_tc_fini(atf_tc_t *); /* Getters. */ const char *atf_tc_get_ident(const atf_tc_t *); const char *atf_tc_get_config_var(const atf_tc_t *, const char *); const char *atf_tc_get_config_var_wd(const atf_tc_t *, const char *, const char *); bool atf_tc_get_config_var_as_bool(const atf_tc_t *, const char *); bool atf_tc_get_config_var_as_bool_wd(const atf_tc_t *, const char *, const bool); long atf_tc_get_config_var_as_long(const atf_tc_t *, const char *); long atf_tc_get_config_var_as_long_wd(const atf_tc_t *, const char *, const long); const char *atf_tc_get_md_var(const atf_tc_t *, const char *); char **atf_tc_get_md_vars(const atf_tc_t *); bool atf_tc_has_config_var(const atf_tc_t *, const char *); bool atf_tc_has_md_var(const atf_tc_t *, const char *); /* Modifiers. */ atf_error_t atf_tc_set_md_var(atf_tc_t *, const char *, const char *, ...); /* --------------------------------------------------------------------- * Free functions. * --------------------------------------------------------------------- */ atf_error_t atf_tc_run(const atf_tc_t *, const char *); atf_error_t atf_tc_cleanup(const atf_tc_t *); /* To be run from test case bodies only. */ void atf_tc_fail(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2) ATF_DEFS_ATTRIBUTE_NORETURN; void atf_tc_fail_nonfatal(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2); void atf_tc_pass(void) ATF_DEFS_ATTRIBUTE_NORETURN; void atf_tc_require_prog(const char *); void atf_tc_skip(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2) ATF_DEFS_ATTRIBUTE_NORETURN; void atf_tc_expect_pass(void); void atf_tc_expect_fail(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2); void atf_tc_expect_exit(const int, const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3); void atf_tc_expect_signal(const int, const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3); void atf_tc_expect_death(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2); void atf_tc_expect_timeout(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2); /* To be run from test case bodies only; internal to macros.h. */ void atf_tc_fail_check(const char *, const size_t, const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4); void atf_tc_fail_requirement(const char *, const size_t, const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4) ATF_DEFS_ATTRIBUTE_NORETURN; void atf_tc_check_errno(const char *, const size_t, const int, const char *, const bool); void atf_tc_require_errno(const char *, const size_t, const int, const char *, const bool); #endif /* !defined(ATF_C_TC_H) */ # 137 "/usr/src/contrib/atf/atf-c/tc.h" # 27 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ /* * Testing against Clang-specific extensions. */ #ifndef __has_attribute #define __has_attribute(x) 0 #endif # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __has_extension #define __has_extension __has_feature #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __has_feature #define __has_feature(x) 0 #endif # 53 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __has_include #define __has_include(x) 0 #endif # 56 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __has_builtin #define __has_builtin(x) 0 #endif # 59 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_DECLS extern "C" { #define __END_DECLS } #else # 64 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_DECLS #define __END_DECLS #endif # 67 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_ASM 3 #define __GNUCLIKE_MATH_BUILTIN_CONSTANTS #else # 80 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __GNUCLIKE_ASM 2 #endif # 82 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #undef __GNUCLIKE_BUILTIN_CONSTANT_P #endif # 95 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __GNUC_VA_LIST_COMPATIBILITY 1 #endif # 105 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __compiler_membar() __asm __volatile(" " : : : "memory") #endif # 112 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __INTEL_COMPILER #define __GNUCLIKE_BUILTIN_NEXT_ARG 1 #define __GNUCLIKE_MATH_BUILTIN_RELOPS #endif # 117 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __GNUC_PREREQ__(ma, mi) \ (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) #else # 141 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __GNUC_PREREQ__(ma, mi) 0 #endif # 143 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __inline inline /* convert to C++ keyword */ #else # 169 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __inline /* delete GCC keyword */ #endif /* ! __CC_SUPPORTS___INLINE */ # 172 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* !__cplusplus */ # 173 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #else /* !(__STDC__ || __cplusplus) */ # 175 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* !__CC_SUPPORTS___INLINE */ # 199 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* !(__STDC__ || __cplusplus) */ # 200 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __dead2 #define __pure2 #define __unused #endif # 216 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __alloc_size(x) #define __alloc_size2(n, x) #endif # 238 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __alloc_align(x) __attribute__((__alloc_align__(x))) #else # 241 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __alloc_align(x) #endif # 243 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) #endif # 247 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Alignas(x) alignas(x) #else # 259 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 263 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Alignof(x) alignof(x) #else # 267 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Alignof(x) __alignof(x) #endif # 269 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Noreturn [[noreturn]] #else # 282 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Noreturn __dead2 #endif # 284 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Static_assert(x, y) struct __hack #endif # 299 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 300 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Thread_local thread_local #else # 311 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Thread_local __thread #endif # 313 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 314 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ # 316 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __min_size(x) static (x) #else # 348 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __min_size(x) (x) #endif # 350 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __malloc_like __attribute__((__malloc__)) #define __pure __attribute__((__pure__)) #else # 355 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __malloc_like #define __pure #endif # 358 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __always_inline __attribute__((__always_inline__)) #else # 362 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __always_inline #endif # 364 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __noinline __attribute__ ((__noinline__)) #else # 368 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __noinline #endif # 370 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) #else # 375 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __fastcall #define __result_use_check #endif # 378 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __returns_twice __attribute__((__returns_twice__)) #else # 382 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __returns_twice #endif # 384 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __unreachable() __builtin_unreachable() #else # 388 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __unreachable() ((void)0) #endif # 390 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __func__ NULL #endif # 395 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __LONG_LONG_SUPPORTED #endif # 399 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __LONG_LONG_SUPPORTED #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif # 406 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif # 409 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 410 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __restrict #else # 421 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __restrict restrict #endif # 423 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 424 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __predict_true(exp) (exp) #define __predict_false(exp) (exp) #endif # 460 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __null_sentinel #define __exported #define __hidden #endif # 470 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 /* * We define this here since , , and * 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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __offsetof(type, field) __builtin_offsetof(type, field) #else # 478 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __offsetof(type, field) \ (__offsetof__ (reinterpret_cast <__size_t> \ (&reinterpret_cast \ (static_cast (0)->field)))) #endif # 487 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 488 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __containerof(x, s, m) \ __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) #endif # 506 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else # 537 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __printf0like(fmtarg, firstvararg) #endif # 539 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* __GNUC__ || __INTEL_COMPILER */ # 571 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else # 578 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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$"); */ #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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) #else # 597 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __FBSDID(s) struct __hack #endif # 599 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 600 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __RCSID #ifndef NO__RCSID #define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) #else # 605 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __RCSID(s) struct __hack #endif # 607 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 608 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __RCSID_SOURCE(s) struct __hack #endif # 615 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 616 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __SCCSID #ifndef NO__SCCSID #define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) #else # 621 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __SCCSID(s) struct __hack #endif # 623 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 624 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __COPYRIGHT #ifndef NO__COPYRIGHT #define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) #else # 629 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __COPYRIGHT(s) struct __hack #endif # 631 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 632 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __DECONST #define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) #endif # 636 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __DEVOLATILE #define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) #endif # 640 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #ifndef __DEQUALIFY #define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) #endif # 644 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 /*- * The following definitions are an extension of the behavior originally * implemented in , 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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199209 #endif # 679 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __XSI_VISIBLE 500 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199506 #endif # 695 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 696 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _POSIX_C_SOURCE 198808 #endif # 704 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 199009 #define __ISO_C_VISIBLE 1990 #else # 724 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __POSIX_VISIBLE 198808 #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ # 727 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #else # 728 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 766 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __EXT1_VISIBLE 1 #else # 773 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __EXT1_VISIBLE 0 #endif # 775 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif /* __STDC_WANT_LIB_EXT1__ */ # 776 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__mips) || defined(__riscv) || \ (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 779 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __NO_TLS 1 #endif # 781 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 787 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 787 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 # 788 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #endif # 789 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 794 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define _Nonnull #define _Nullable #define _Null_unspecified #define __NULLABILITY_PRAGMA_PUSH #define __NULLABILITY_PRAGMA_POP #else # 800 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 804 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 814 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 819 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 822 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 836 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __lock_annotate(x) __attribute__((x)) #else # 838 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __lock_annotate(x) #endif # 840 "/usr/obj/usr/src/powerpc.powerpc/tmp/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) /* * Function or variable should not be sanitized, i.e. by AddressSanitizer. * GCC has the nosanitize attribute, but as a function attribute only, and * warns on use as a variable attribute. */ #if 0 /* disabled by -frewrite-includes */ #if __has_attribute(no_sanitize) && defined(__clang__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 882 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __nosanitizeaddress __attribute__((no_sanitize("address"))) #else # 884 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 #define __nosanitizeaddress #endif # 886 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 /* 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_ */ # 892 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/cdefs.h" 3 4 # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 2 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1987, 1991, 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. * * @(#)endian.h 8.1 (Berkeley) 6/10/93 * $FreeBSD$ */ #ifndef _MACHINE_ENDIAN_H_ #define _MACHINE_ENDIAN_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * 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$ */ #ifndef _SYS__TYPES_H_ #define _SYS__TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 2002 Mike Barcroft * 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$ */ #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/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 /* * 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 # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 #ifndef lint __extension__ #endif # 64 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 /* LONGLONG */ typedef long long __int64_t; #ifndef lint __extension__ #endif # 69 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 /* LONGLONG */ typedef unsigned long long __uint64_t; #endif # 72 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 /* * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ #ifndef _STANDALONE typedef double __double_t; typedef float __float_t; #endif # 81 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 #ifdef __LP64__ typedef __int64_t __critical_t; typedef __int64_t __intfptr_t; typedef __int64_t __intptr_t; #else # 86 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __int32_t __critical_t; typedef __int32_t __intfptr_t; typedef __int32_t __intptr_t; #endif # 90 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_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 */ #else # 106 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ typedef __int32_t __register_t; typedef __int32_t __segsz_t; /* segment size (in pages) */ typedef __uint32_t __size_t; /* sizeof() */ typedef __int32_t __ssize_t; /* byte count or error */ #endif # 112 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __int64_t __time_t; /* time()... */ #ifdef __LP64__ typedef __uint64_t __uintfptr_t; typedef __uint64_t __uintptr_t; #else # 117 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __uint32_t __uintfptr_t; typedef __uint32_t __uintptr_t; #endif # 120 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_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 # 135 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; #ifdef BOOKE typedef __uint64_t __vm_paddr_t; #else # 140 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __uint32_t __vm_paddr_t; #endif # 142 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 typedef __uint32_t __vm_size_t; #endif # 144 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_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_ */ # 150 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_types.h" 3 4 # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 typedef __uint_least16_t __char16_t; typedef __uint_least32_t __char32_t; #endif # 100 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 #define _CHAR16_T_DECLARED #define _CHAR32_T_DECLARED #endif # 105 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 #error "No support for your compiler for stdargs" #endif # 137 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 #define __GNUC_VA_LIST typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif # 142 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 , with its associated * namespace pollution. */ #define __INO64 #endif /* !_SYS__TYPES_H_ */ # 151 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_types.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 2 3 4 /* * Define the order of 32-bit words in 64-bit words. */ #ifdef __LITTLE_ENDIAN__ #define _QUAD_HIGHWORD 1 #define _QUAD_LOWWORD 0 #else # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define _QUAD_HIGHWORD 0 #define _QUAD_LOWWORD 1 #endif # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 /* * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__ * and __LITTLE_ENDIAN__ (resp). */ #ifdef _BIG_ENDIAN #undef _BIG_ENDIAN #endif # 59 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #ifdef _LITTLE_ENDIAN #undef _LITTLE_ENDIAN #endif # 62 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 /* * 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 */ #ifdef __LITTLE_ENDIAN__ #define _BYTE_ORDER _LITTLE_ENDIAN #else # 74 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define _BYTE_ORDER _BIG_ENDIAN #endif # 76 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 /* * 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 */ # 82 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/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 # 87 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 89 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define __is_constant(x) __builtin_constant_p(x) #else # 91 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define __is_constant(x) 0 #endif # 93 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define __bswap16_const(x) ((((__uint16_t)(x) >> 8) & 0xff) | \ (((__uint16_t)(x) << 8) & 0xff00)) #define __bswap32_const(x) ((((__uint32_t)(x) >> 24) & 0xff) | \ (((__uint32_t)(x) >> 8) & 0xff00) | \ (((__uint32_t)(x)<< 8) & 0xff0000) | \ (((__uint32_t)(x) << 24) & 0xff000000)) #define __bswap64_const(x) ((((__uint64_t)(x) >> 56) & 0xff) | \ (((__uint64_t)(x) >> 40) & 0xff00) | \ (((__uint64_t)(x) >> 24) & 0xff0000) | \ (((__uint64_t)(x) >> 8) & 0xff000000) | \ (((__uint64_t)(x) << 8) & ((__uint64_t)0xff << 32)) | \ (((__uint64_t)(x) << 24) & ((__uint64_t)0xff << 40)) | \ (((__uint64_t)(x) << 40) & ((__uint64_t)0xff << 48)) | \ (((__uint64_t)(x) << 56) & ((__uint64_t)0xff << 56))) static __inline __uint16_t __bswap16_var(__uint16_t _x) { return ((_x >> 8) | ((_x << 8) & 0xff00)); } static __inline __uint32_t __bswap32_var(__uint32_t _x) { return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) | ((_x << 24) & 0xff000000)); } static __inline __uint64_t __bswap64_var(__uint64_t _x) { return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | ((_x << 24) & ((__uint64_t)0xff << 40)) | ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } #define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ __bswap16_var(x))) #define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ __bswap32_var(x)) #define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ __bswap64_var(x)) #ifdef __LITTLE_ENDIAN__ #define __htonl(x) (__bswap32((__uint32_t)(x))) #define __htons(x) (__bswap16((__uint16_t)(x))) #define __ntohl(x) (__bswap32((__uint32_t)(x))) #define __ntohs(x) (__bswap16((__uint16_t)(x))) #else # 147 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #define __htonl(x) ((__uint32_t)(x)) #define __htons(x) ((__uint16_t)(x)) #define __ntohl(x) ((__uint32_t)(x)) #define __ntohs(x) ((__uint16_t)(x)) #endif # 152 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 #endif /* !_MACHINE_ENDIAN_H_ */ # 154 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/endian.h" 3 4 # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 * 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$ */ #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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_pthreadtypes.h" 3 4 # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #endif # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 /* * XXX POSIX sized integrals that should appear only in . */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 65 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011 David E. O'Brien * Copyright (c) 2001 Mike Barcroft * 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$ */ #ifndef _SYS__STDINT_H_ #define _SYS__STDINT_H_ #ifndef _INT8_T_DECLARED typedef __int8_t int8_t; #define _INT8_T_DECLARED #endif # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _INT16_T_DECLARED typedef __int16_t int16_t; #define _INT16_T_DECLARED #endif # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _INT32_T_DECLARED typedef __int32_t int32_t; #define _INT32_T_DECLARED #endif # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _INT64_T_DECLARED typedef __int64_t int64_t; #define _INT64_T_DECLARED #endif # 54 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT8_T_DECLARED typedef __uint8_t uint8_t; #define _UINT8_T_DECLARED #endif # 59 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT16_T_DECLARED typedef __uint16_t uint16_t; #define _UINT16_T_DECLARED #endif # 64 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT32_T_DECLARED typedef __uint32_t uint32_t; #define _UINT32_T_DECLARED #endif # 69 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINT64_T_DECLARED typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif # 74 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _INTPTR_T_DECLARED typedef __intptr_t intptr_t; #define _INTPTR_T_DECLARED #endif # 79 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINTPTR_T_DECLARED typedef __uintptr_t uintptr_t; #define _UINTPTR_T_DECLARED #endif # 83 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _INTMAX_T_DECLARED typedef __intmax_t intmax_t; #define _INTMAX_T_DECLARED #endif # 87 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #ifndef _UINTMAX_T_DECLARED typedef __uintmax_t uintmax_t; #define _UINTMAX_T_DECLARED #endif # 91 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 #endif /* !_SYS__STDINT_H_ */ # 93 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_stdint.h" 3 4 # 66 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _CLOCK_T_DECLARED typedef __clock_t clock_t; #define _CLOCK_T_DECLARED #endif # 97 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _CLOCKID_T_DECLARED typedef __clockid_t clockid_t; #define _CLOCKID_T_DECLARED #endif # 102 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _MODE_T_DECLARED typedef __mode_t mode_t; /* permissions */ #define _MODE_T_DECLARED #endif # 163 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif # 209 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 219 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _TIMER_T_DECLARED typedef __timer_t timer_t; #define _TIMER_T_DECLARED #endif # 224 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _MQD_T_DECLARED typedef __mqd_t mqd_t; #define _MQD_T_DECLARED #endif # 229 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 /* * Types suitable for exporting physical addresses, virtual addresses * (pointers), and memory object sizes from the kernel independent of native * word size. These should be used in place of vm_paddr_t, (u)intptr_t, and * size_t in structs which contain such types that are shared with userspace. */ typedef __uint64_t kpaddr_t; 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 */ # 295 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 299 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 typedef int _Bool; #endif # 301 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 typedef _Bool bool; #endif /* !__bool_true_false_are_defined && !__cplusplus */ # 303 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #define offsetof(type, field) __offsetof(type, field) #endif /* !_KERNEL */ # 307 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 320 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 363 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 372 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #define __bitcount(x) __bitcount32((unsigned int)(x)) #endif # 374 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 376 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 377 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_SELECT_H_ #define _SYS_SELECT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_sigset.h" 3 4 typedef unsigned int osigset_t; #endif # 60 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_sigset.h" 3 4 #endif /* !_SYS__SIGSET_H_ */ # 62 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_sigset.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timeval.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * 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$ */ #ifndef _SYS__TIMEVAL_H_ #define _SYS__TIMEVAL_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timeval.h" 3 4 # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timeval.h" 3 4 #ifndef _SUSECONDS_T_DECLARED typedef __suseconds_t suseconds_t; #define _SUSECONDS_T_DECLARED #endif # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timeval.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 45 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timeval.h" 3 4 # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_TIMESPEC_H_ #define _SYS_TIMESPEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/timespec.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/timespec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/timespec.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS__TIMESPEC_H_ #define _SYS__TIMESPEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timespec.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timespec.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 45 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_timespec.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/timespec.h" 3 4 # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 typedef __fd_mask fd_mask; #endif # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #ifndef _SIGSET_T_DECLARED #define _SIGSET_T_DECLARED typedef __sigset_t sigset_t; #endif # 53 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #define NFDBITS _NFDBITS #endif # 68 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #ifndef _howmany #define _howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif # 72 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #define fds_bits __fds_bits #endif # 79 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #define FD_COPY(f, t) (void)(*(t) = *(f)) #endif # 85 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 109 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 #endif /* _SYS_SELECT_H_ */ # 111 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/select.h" 3 4 # 378 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 _Major, int _Minor) { return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); } /* * These declarations belong elsewhere, but are repeated here and in * 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 # 421 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _LSEEK_DECLARED #define _LSEEK_DECLARED off_t lseek(int, off_t, int); #endif # 425 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _MMAP_DECLARED #define _MMAP_DECLARED void * mmap(void *, size_t, int, int, int, off_t); #endif # 429 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #ifndef _TRUNCATE_DECLARED #define _TRUNCATE_DECLARED int truncate(const char *, off_t); #endif # 433 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 435 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #endif /* __BSD_VISIBLE */ # 437 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 #endif /* !_SYS_TYPES_H_ */ # 439 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/types.h" 3 4 # 29 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.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. * * @(#)stat.h 8.12 (Berkeley) 6/16/95 * $FreeBSD$ */ #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 # 45 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _BLKSIZE_T_DECLARED typedef __blksize_t blksize_t; #define _BLKSIZE_T_DECLARED #endif # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _BLKCNT_T_DECLARED typedef __blkcnt_t blkcnt_t; #define _BLKCNT_T_DECLARED #endif # 56 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _DEV_T_DECLARED typedef __dev_t dev_t; #define _DEV_T_DECLARED #endif # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _FFLAGS_T_DECLARED typedef __fflags_t fflags_t; #define _FFLAGS_T_DECLARED #endif # 66 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _GID_T_DECLARED typedef __gid_t gid_t; #define _GID_T_DECLARED #endif # 71 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _INO_T_DECLARED typedef __ino_t ino_t; #define _INO_T_DECLARED #endif # 76 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _MODE_T_DECLARED typedef __mode_t mode_t; #define _MODE_T_DECLARED #endif # 81 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _NLINK_T_DECLARED typedef __nlink_t nlink_t; #define _NLINK_T_DECLARED #endif # 86 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED #endif # 91 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _UID_T_DECLARED typedef __uid_t uid_t; #define _UID_T_DECLARED #endif # 96 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_KERNEL) && __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 /* * XXX We get miscellaneous namespace pollution with this. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 101 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.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 * $FreeBSD$ */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; #define DST_NONE 0 /* not on dst */ #define DST_USA 1 /* USA style dst */ #define DST_AUST 2 /* Australian style dst */ #define DST_WET 3 /* Western European dst */ #define DST_MET 4 /* Middle European dst */ #define DST_EET 5 /* Eastern European dst */ #define DST_CAN 6 /* Canada */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 55 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 struct bintime { time_t sec; uint64_t frac; }; static __inline void bintime_addx(struct bintime *_bt, uint64_t _x) { uint64_t _u; _u = _bt->frac; _bt->frac += _x; if (_u > _bt->frac) _bt->sec++; } static __inline void bintime_add(struct bintime *_bt, const struct bintime *_bt2) { uint64_t _u; _u = _bt->frac; _bt->frac += _bt2->frac; if (_u > _bt->frac) _bt->sec++; _bt->sec += _bt2->sec; } static __inline void bintime_sub(struct bintime *_bt, const struct bintime *_bt2) { uint64_t _u; _u = _bt->frac; _bt->frac -= _bt2->frac; if (_u < _bt->frac) _bt->sec--; _bt->sec -= _bt2->sec; } static __inline void bintime_mul(struct bintime *_bt, u_int _x) { uint64_t _p1, _p2; _p1 = (_bt->frac & 0xffffffffull) * _x; _p2 = (_bt->frac >> 32) * _x + (_p1 >> 32); _bt->sec *= _x; _bt->sec += (_p2 >> 32); _bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull); } static __inline void bintime_shift(struct bintime *_bt, int _exp) { if (_exp > 0) { _bt->sec <<= _exp; _bt->sec |= _bt->frac >> (64 - _exp); _bt->frac <<= _exp; } else if (_exp < 0) { _bt->frac >>= -_exp; _bt->frac |= (uint64_t)_bt->sec << (64 + _exp); _bt->sec >>= -_exp; } } #define bintime_clear(a) ((a)->sec = (a)->frac = 0) #define bintime_isset(a) ((a)->sec || (a)->frac) #define bintime_cmp(a, b, cmp) \ (((a)->sec == (b)->sec) ? \ ((a)->frac cmp (b)->frac) : \ ((a)->sec cmp (b)->sec)) #define SBT_1S ((sbintime_t)1 << 32) #define SBT_1M (SBT_1S * 60) #define SBT_1MS (SBT_1S / 1000) #define SBT_1US (SBT_1S / 1000000) #define SBT_1NS (SBT_1S / 1000000000) /* beware rounding, see nstosbt() */ #define SBT_MAX 0x7fffffffffffffffLL static __inline int sbintime_getsec(sbintime_t _sbt) { return (_sbt >> 32); } static __inline sbintime_t bttosbt(const struct bintime _bt) { return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32)); } static __inline struct bintime sbttobt(sbintime_t _sbt) { struct bintime _bt; _bt.sec = _sbt >> 32; _bt.frac = _sbt << 32; return (_bt); } /* * Decimal<->sbt conversions. Multiplying or dividing by SBT_1NS results in * large roundoff errors which sbttons() and nstosbt() avoid. Millisecond and * microsecond functions are also provided for completeness. * * These functions return the smallest sbt larger or equal to the * number of seconds requested so that sbttoX(Xtosbt(y)) == y. Unlike * top of second computations below, which require that we tick at the * top of second, these need to be rounded up so we do whatever for at * least as long as requested. * * The naive computation we'd do is this * ((unit * 2^64 / SIFACTOR) + 2^32-1) >> 32 * However, that overflows. Instead, we compute * ((unit * 2^63 / SIFACTOR) + 2^31-1) >> 32 * and use pre-computed constants that are the ceil of the 2^63 / SIFACTOR * term to ensure we are using exactly the right constant. We use the lesser * evil of ull rather than a uint64_t cast to ensure we have well defined * right shift semantics. With these changes, we get all the ns, us and ms * conversions back and forth right. * Note: This file is used for both kernel and userland includes, so we can't * rely on KASSERT being defined, nor can we pollute the namespace by including * assert.h. */ static __inline int64_t sbttons(sbintime_t _sbt) { uint64_t ns; #ifdef KASSERT KASSERT(_sbt >= 0, ("Negative values illegal for sbttons: %jx", _sbt)); #endif # 192 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 ns = _sbt; if (ns >= SBT_1S) ns = (ns >> 32) * 1000000000; else ns = 0; return (ns + (1000000000 * (_sbt & 0xffffffffu) >> 32)); } static __inline sbintime_t nstosbt(int64_t _ns) { sbintime_t sb = 0; #ifdef KASSERT KASSERT(_ns >= 0, ("Negative values illegal for nstosbt: %jd", _ns)); #endif # 209 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 if (_ns >= SBT_1S) { sb = (_ns / 1000000000) * SBT_1S; _ns = _ns % 1000000000; } /* 9223372037 = ceil(2^63 / 1000000000) */ sb += ((_ns * 9223372037ull) + 0x7fffffff) >> 31; return (sb); } static __inline int64_t sbttous(sbintime_t _sbt) { return ((1000000 * _sbt) >> 32); } static __inline sbintime_t ustosbt(int64_t _us) { sbintime_t sb = 0; #ifdef KASSERT KASSERT(_us >= 0, ("Negative values illegal for ustosbt: %jd", _us)); #endif # 233 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 if (_us >= SBT_1S) { sb = (_us / 1000000) * SBT_1S; _us = _us % 1000000; } /* 9223372036855 = ceil(2^63 / 1000000) */ sb += ((_us * 9223372036855ull) + 0x7fffffff) >> 31; return (sb); } static __inline int64_t sbttoms(sbintime_t _sbt) { return ((1000 * _sbt) >> 32); } static __inline sbintime_t mstosbt(int64_t _ms) { sbintime_t sb = 0; #ifdef KASSERT KASSERT(_ms >= 0, ("Negative values illegal for mstosbt: %jd", _ms)); #endif # 257 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 if (_ms >= SBT_1S) { sb = (_ms / 1000) * SBT_1S; _ms = _ms % 1000; } /* 9223372036854776 = ceil(2^63 / 1000) */ sb += ((_ms * 9223372036854776ull) + 0x7fffffff) >> 31; return (sb); } /*- * Background information: * * When converting between timestamps on parallel timescales of differing * resolutions it is historical and scientific practice to round down rather * than doing 4/5 rounding. * * The date changes at midnight, not at noon. * * Even at 15:59:59.999999999 it's not four'o'clock. * * time_second ticks after N.999999999 not after N.4999999999 */ static __inline void bintime2timespec(const struct bintime *_bt, struct timespec *_ts) { _ts->tv_sec = _bt->sec; _ts->tv_nsec = ((uint64_t)1000000000 * (uint32_t)(_bt->frac >> 32)) >> 32; } static __inline void timespec2bintime(const struct timespec *_ts, struct bintime *_bt) { _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; } static __inline void bintime2timeval(const struct bintime *_bt, struct timeval *_tv) { _tv->tv_sec = _bt->sec; _tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32; } static __inline void timeval2bintime(const struct timeval *_tv, struct bintime *_bt) { _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; } static __inline struct timespec sbttots(sbintime_t _sbt) { struct timespec _ts; _ts.tv_sec = _sbt >> 32; _ts.tv_nsec = sbttons((uint32_t)_sbt); return (_ts); } static __inline sbintime_t tstosbt(struct timespec _ts) { return (((sbintime_t)_ts.tv_sec << 32) + nstosbt(_ts.tv_nsec)); } static __inline struct timeval sbttotv(sbintime_t _sbt) { struct timeval _tv; _tv.tv_sec = _sbt >> 32; _tv.tv_usec = sbttous((uint32_t)_sbt); return (_tv); } static __inline sbintime_t tvtosbt(struct timeval _tv) { return (((sbintime_t)_tv.tv_sec << 32) + ustosbt(_tv.tv_usec)); } #endif /* __BSD_VISIBLE */ # 349 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #ifdef _KERNEL /* * Simple macros to convert ticks to milliseconds * or microseconds and vice-versa. The answer * will always be at least 1. Note the return * value is a uint32_t however we step up the * operations to 64 bit to avoid any overflow/underflow * problems. */ #define TICKS_2_MSEC(t) max(1, (uint32_t)(hz == 1000) ? \ (t) : (((uint64_t)(t) * (uint64_t)1000)/(uint64_t)hz)) #define TICKS_2_USEC(t) max(1, (uint32_t)(hz == 1000) ? \ ((t) * 1000) : (((uint64_t)(t) * (uint64_t)1000000)/(uint64_t)hz)) #define MSEC_2_TICKS(m) max(1, (uint32_t)((hz == 1000) ? \ (m) : ((uint64_t)(m) * (uint64_t)hz)/(uint64_t)1000)) #define USEC_2_TICKS(u) max(1, (uint32_t)((hz == 1000) ? \ ((u) / 1000) : ((uint64_t)(u) * (uint64_t)hz)/(uint64_t)1000000)) #endif # 369 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 /* Operations on timespecs */ #define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) #define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) #define timespeccmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #define timespecadd(tsp, usp, vsp) \ do { \ (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ if ((vsp)->tv_nsec >= 1000000000L) { \ (vsp)->tv_sec++; \ (vsp)->tv_nsec -= 1000000000L; \ } \ } while (0) #define timespecsub(tsp, usp, vsp) \ do { \ (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ if ((vsp)->tv_nsec < 0) { \ (vsp)->tv_sec--; \ (vsp)->tv_nsec += 1000000000L; \ } \ } while (0) #ifdef _KERNEL /* Operations on timevals. */ #define timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timevalcmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) /* timevaladd and timevalsub are not inlined */ #endif /* _KERNEL */ # 410 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #define timeradd(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ if ((vvp)->tv_usec >= 1000000) { \ (vvp)->tv_sec++; \ (vvp)->tv_usec -= 1000000; \ } \ } while (0) #define timersub(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) #endif # 438 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 /* * Names of the interval timers, and structure * defining a timer setting. */ #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; /* * Getkerninfo clock information structure */ struct clockinfo { int hz; /* clock frequency */ int tick; /* micro-seconds per hz tick */ int spare; int stathz; /* statistics clock frequency */ int profhz; /* profiling clock frequency */ }; /* These macros are also in time.h. */ #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ #define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ #define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ #define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 #define CLOCK_PROCESS_CPUTIME_ID 15 #endif # 480 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #ifndef TIMER_ABSTIME #define TIMER_RELTIME 0x0 /* relative timer */ #define TIMER_ABSTIME 0x1 /* absolute timer */ #endif # 485 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #define CPUCLOCK_WHICH_PID 0 #define CPUCLOCK_WHICH_TID 1 #endif # 490 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #ifdef _KERNEL /* * Kernel to clock driver interface. */ void inittodr(time_t base); void resettodr(void); extern volatile time_t time_second; extern volatile time_t time_uptime; extern struct bintime tc_tick_bt; extern sbintime_t tc_tick_sbt; extern struct bintime tick_bt; extern sbintime_t tick_sbt; extern int tc_precexp; extern int tc_timepercentage; extern struct bintime bt_timethreshold; extern struct bintime bt_tickthreshold; extern sbintime_t sbt_timethreshold; extern sbintime_t sbt_tickthreshold; extern volatile int rtc_generation; /* * Functions for looking at our clock: [get]{bin,nano,micro}[up]time() * * Functions without the "get" prefix returns the best timestamp * we can produce in the given format. * * "bin" == struct bintime == seconds + 64 bit fraction of seconds. * "nano" == struct timespec == seconds + nanoseconds. * "micro" == struct timeval == seconds + microseconds. * * Functions containing "up" returns time relative to boot and * should be used for calculating time intervals. * * Functions without "up" returns UTC time. * * Functions with the "get" prefix returns a less precise result * much faster than the functions without "get" prefix and should * be used where a precision of 1/hz seconds is acceptable or where * performance is priority. (NB: "precision", _not_ "resolution" !) */ void binuptime(struct bintime *bt); void nanouptime(struct timespec *tsp); void microuptime(struct timeval *tvp); static __inline sbintime_t sbinuptime(void) { struct bintime _bt; binuptime(&_bt); return (bttosbt(_bt)); } void bintime(struct bintime *bt); void nanotime(struct timespec *tsp); void microtime(struct timeval *tvp); void getbinuptime(struct bintime *bt); void getnanouptime(struct timespec *tsp); void getmicrouptime(struct timeval *tvp); static __inline sbintime_t getsbinuptime(void) { struct bintime _bt; getbinuptime(&_bt); return (bttosbt(_bt)); } void getbintime(struct bintime *bt); void getnanotime(struct timespec *tsp); void getmicrotime(struct timeval *tvp); void getboottime(struct timeval *boottime); void getboottimebin(struct bintime *boottimebin); /* Other functions */ int itimerdecr(struct itimerval *itp, int usec); int itimerfix(struct timeval *tv); int ppsratecheck(struct timeval *, int *, int); int ratecheck(struct timeval *, const struct timeval *); void timevaladd(struct timeval *t1, const struct timeval *t2); void timevalsub(struct timeval *t1, const struct timeval *t2); int tvtohz(struct timeval *tv); #define TC_DEFAULTPERC 5 #define BT2FREQ(bt) \ (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ ((bt)->frac >> 1)) #define SBT2FREQ(sbt) ((SBT_1S + ((sbt) >> 1)) / (sbt)) #define FREQ2BT(freq, bt) \ { \ (bt)->sec = 0; \ (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ } #define TIMESEL(sbt, sbt2) \ (((sbt2) >= sbt_timethreshold) ? \ ((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0)) #else /* !_KERNEL */ # 600 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 600 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 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. * * @(#)time.h 8.3 (Berkeley) 1/21/94 */ /* * $FreeBSD$ */ #ifndef _TIME_H_ #define _TIME_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* * Frequency of the clock ticks reported by times(). Deprecated - use * sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) */ #define CLK_TCK 128 #endif # 57 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* Frequency of the clock ticks reported by clock(). */ #define CLOCKS_PER_SEC 128 #ifndef _CLOCK_T_DECLARED typedef __clock_t clock_t; #define _CLOCK_T_DECLARED #endif # 65 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #ifndef _TIME_T_DECLARED typedef __time_t time_t; #define _TIME_T_DECLARED #endif # 70 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 75 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 77 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* * New in POSIX 1003.1b-1993. */ #ifndef _CLOCKID_T_DECLARED typedef __clockid_t clockid_t; #define _CLOCKID_T_DECLARED #endif # 84 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #ifndef _TIMER_T_DECLARED typedef __timer_t timer_t; #define _TIMER_T_DECLARED #endif # 89 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 90 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 91 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #endif /* __POSIX_VISIBLE >= 199309 */ # 92 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 94 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED #endif # 98 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #endif # 99 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* These macros are also in sys/time.h. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #define CLOCK_REALTIME 0 #ifdef __BSD_VISIBLE #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #endif # 107 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ #define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ #define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ #define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 #define CLOCK_PROCESS_CPUTIME_ID 15 #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ # 119 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 121 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 122 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #define TIMER_RELTIME 0x0 /* relative timer */ #endif # 124 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #define TIMER_ABSTIME 0x1 /* absolute timer */ #endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ # 126 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 struct tm { int tm_sec; /* seconds after the minute [0-60] */ int tm_min; /* minutes after the hour [0-59] */ int tm_hour; /* hours since midnight [0-23] */ int tm_mday; /* day of the month [1-31] */ int tm_mon; /* months since January [0-11] */ int tm_year; /* years since 1900 */ int tm_wday; /* days since Sunday [0-6] */ int tm_yday; /* days since January 1 [0-365] */ int tm_isdst; /* Daylight Savings Time flag */ long tm_gmtoff; /* offset from UTC in seconds */ char *tm_zone; /* timezone abbreviation */ }; #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 142 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 extern char *tzname[]; #endif # 144 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 __BEGIN_DECLS char *asctime(const struct tm *); clock_t clock(void); char *ctime(const time_t *); #ifndef _STANDALONE double difftime(time_t, time_t); #endif # 152 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* XXX missing: getdate() */ struct tm *gmtime(const time_t *); struct tm *localtime(const time_t *); time_t mktime(struct tm *); size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict); time_t time(time_t *); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 160 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 struct sigevent; int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict); int timer_delete(timer_t); int timer_gettime(timer_t, struct itimerspec *); int timer_getoverrun(timer_t); int timer_settime(timer_t, int, const struct itimerspec *__restrict, struct itimerspec *__restrict); #endif # 168 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 169 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 void tzset(void); #endif # 171 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 173 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 int clock_getres(clockid_t, struct timespec *); int clock_gettime(clockid_t, struct timespec *); int clock_settime(clockid_t, const struct timespec *); int nanosleep(const struct timespec *, struct timespec *); #endif /* __POSIX_VISIBLE >= 199309 */ # 178 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 180 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 int clock_getcpuclockid(pid_t, clockid_t *); int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); #endif # 183 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 185 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 char *asctime_r(const struct tm *, char *); char *ctime_r(const time_t *, char *); struct tm *gmtime_r(const time_t *, struct tm *); struct tm *localtime_r(const time_t *, struct tm *); #endif # 190 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 192 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict); #endif # 195 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 197 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 char *timezone(int, int); /* XXX XSI conflict */ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); int timer_oshandle_np(timer_t timerid); time_t time2posix(time_t t); time_t posix2time(time_t t); #endif /* __BSD_VISIBLE */ # 205 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.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 */ # 207 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 207 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_time.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * This software was developed by David Chisnall 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 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$ */ #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_time.h" 3 4 /* * This file is included from both locale.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 locale.h. */ #ifndef _XLOCALE_LOCALE1_H #define _XLOCALE_LOCALE1_H size_t strftime_l(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict, locale_t) __strftimelike(3, 0); #endif /* _XLOCALE_LOCALE1_H */ # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_time.h" 3 4 #ifdef _XLOCALE_H_ #ifndef _XLOCALE_LOCALE2_H #define _XLOCALE_LOCALE2_H char *strptime_l(const char * __restrict, const char * __restrict, struct tm * __restrict, locale_t); #endif /* _XLOCALE_LOCALE2_H */ # 60 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_time.h" 3 4 #endif /* _XLOCALE_H_ */ # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_time.h" 3 4 # 208 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 2 3 4 #endif # 209 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ (defined(__cplusplus) && __cplusplus >= 201703) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 212 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 212 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 213 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ int timespec_get(struct timespec *ts, int base); #endif # 217 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 __END_DECLS #endif /* !_TIME_H_ */ # 221 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/time.h" 3 4 # 601 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 602 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 603 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 603 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 604 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 __BEGIN_DECLS int setitimer(int, const struct itimerval *, struct itimerval *); int utimes(const char *, const struct timeval *); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 610 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 int adjtime(const struct timeval *, struct timeval *); int clock_getcpuclockid2(id_t, int, clockid_t *); int futimes(int, const struct timeval *); int futimesat(int, const char *, const struct timeval [2]); int lutimes(const char *, const struct timeval *); int settimeofday(const struct timeval *, const struct timezone *); #endif # 617 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 619 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 int getitimer(int, struct itimerval *); int gettimeofday(struct timeval *, struct timezone *); #endif # 622 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 626 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 #endif /* !_SYS_TIME_H_ */ # 628 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/time.h" 3 4 # 102 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 2 3 4 #endif # 103 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifdef _KERNEL struct ostat { __uint16_t st_dev; /* inode's device */ __uint32_t st_ino; /* inode's number */ mode_t st_mode; /* inode protection mode */ __uint16_t st_nlink; /* number of hard links */ __uint16_t st_uid; /* user ID of the file's owner */ __uint16_t st_gid; /* group ID of the file's group */ __uint16_t st_rdev; /* device type */ __int32_t st_size; /* file size, in bytes */ struct timespec st_atim; /* time of last access */ struct timespec st_mtim; /* time of last data modification */ struct timespec st_ctim; /* time of last file status change */ __int32_t st_blksize; /* optimal blocksize for I/O */ __int32_t st_blocks; /* blocks allocated for file */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ }; #endif # 123 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(_WANT_FREEBSD11_STAT) || defined(_KERNEL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 125 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct freebsd11_stat { __uint32_t st_dev; /* inode's device */ __uint32_t st_ino; /* inode's number */ mode_t st_mode; /* inode protection mode */ __uint16_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __uint32_t st_rdev; /* device type */ struct timespec st_atim; /* time of last access */ struct timespec st_mtim; /* time of last data modification */ struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ __int32_t st_lspare; struct timespec st_birthtim; /* time of file creation */ /* * Explicitly pad st_birthtim to 16 bytes so that the size of * struct stat is backwards compatible. We use bitfields instead * of an array of chars so that this doesn't require a C99 compiler * to compile if the size of the padding is 0. We use 2 bitfields * to cover up to 64 bits on 32-bit machines. We assume that * CHAR_BIT is 8... */ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); }; #endif /* _WANT_FREEBSD11_STAT || _KERNEL */ # 155 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__i386__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 157 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define __STAT_TIME_T_EXT 1 #endif # 159 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct stat { dev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ nlink_t st_nlink; /* number of hard links */ mode_t st_mode; /* inode protection mode */ __int16_t st_padding0; uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __int32_t st_padding1; dev_t st_rdev; /* device type */ #ifdef __STAT_TIME_T_EXT __int32_t st_atim_ext; #endif # 173 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct timespec st_atim; /* time of last access */ #ifdef __STAT_TIME_T_EXT __int32_t st_mtim_ext; #endif # 177 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct timespec st_mtim; /* time of last data modification */ #ifdef __STAT_TIME_T_EXT __int32_t st_ctim_ext; #endif # 181 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct timespec st_ctim; /* time of last file status change */ #ifdef __STAT_TIME_T_EXT __int32_t st_btim_ext; #endif # 185 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 struct timespec st_birthtim; /* time of file creation */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint64_t st_gen; /* file generation number */ __uint64_t st_spare[10]; }; #ifdef _KERNEL struct nstat { __uint32_t st_dev; /* inode's device */ __uint32_t st_ino; /* inode's number */ __uint32_t st_mode; /* inode protection mode */ __uint32_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ __uint32_t st_rdev; /* device type */ struct timespec st_atim; /* time of last access */ struct timespec st_mtim; /* time of last data modification */ struct timespec st_ctim; /* time of last file status change */ off_t st_size; /* file size, in bytes */ blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/O */ fflags_t st_flags; /* user defined flags for file */ __uint32_t st_gen; /* file generation number */ struct timespec st_birthtim; /* time of file creation */ /* * See comment in the definition of struct freebsd11_stat * above about the following padding. */ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); }; #endif # 220 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _KERNEL #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 226 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define st_birthtime st_birthtim.tv_sec #define st_atimensec st_atim.tv_nsec #define st_mtimensec st_mtim.tv_nsec #define st_ctimensec st_ctim.tv_nsec #define st_birthtimensec st_birthtim.tv_nsec #endif # 232 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 /* For compatibility. */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 235 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define st_atimespec st_atim #define st_mtimespec st_mtim #define st_ctimespec st_ctim #define st_birthtimespec st_birthtim #endif # 240 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #endif /* !_KERNEL */ # 241 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 245 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_ISTXT 0001000 /* sticky bit */ #endif # 247 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_IRWXU 0000700 /* RWX mask for owner */ #define S_IRUSR 0000400 /* R for owner */ #define S_IWUSR 0000200 /* W for owner */ #define S_IXUSR 0000100 /* X for owner */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 254 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR #define S_IEXEC S_IXUSR #endif # 258 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_IRWXG 0000070 /* RWX mask for group */ #define S_IRGRP 0000040 /* R for group */ #define S_IWGRP 0000020 /* W for group */ #define S_IXGRP 0000010 /* X for group */ #define S_IRWXO 0000007 /* RWX mask for other */ #define S_IROTH 0000004 /* R for other */ #define S_IWOTH 0000002 /* W for other */ #define S_IXOTH 0000001 /* X for other */ #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 270 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_IFMT 0170000 /* type of file mask */ #define S_IFIFO 0010000 /* named pipe (fifo) */ #define S_IFCHR 0020000 /* character special */ #define S_IFDIR 0040000 /* directory */ #define S_IFBLK 0060000 /* block special */ #define S_IFREG 0100000 /* regular */ #define S_IFLNK 0120000 /* symbolic link */ #define S_IFSOCK 0140000 /* socket */ #define S_ISVTX 0001000 /* save swapped text even after use */ #endif # 280 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 281 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_IFWHT 0160000 /* whiteout */ #endif # 283 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */ #define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */ #define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */ #define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */ #define S_ISFIFO(m) (((m) & 0170000) == 0010000) /* fifo or socket */ #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 290 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */ #define S_ISSOCK(m) (((m) & 0170000) == 0140000) /* socket */ #endif # 293 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 294 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */ #endif # 296 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 298 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ /* 7777 */ #define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) /* 0666 */ #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) #define S_BLKSIZE 512 /* block size used in the stat struct */ /* * Definitions of flags stored in file flags word. * * Super-user and owner changeable flags. */ #define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */ #define UF_NODUMP 0x00000001 /* do not dump file */ #define UF_IMMUTABLE 0x00000002 /* file may not be changed */ #define UF_APPEND 0x00000004 /* writes to file may only append */ #define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */ #define UF_NOUNLINK 0x00000010 /* file may not be removed or renamed */ /* * These two bits are defined in MacOS X. They are not currently used in * FreeBSD. */ #if 0 /* disabled by -frewrite-includes */ #if 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 322 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define UF_COMPRESSED 0x00000020 /* file is compressed */ #define UF_TRACKED 0x00000040 /* renames and deletes are tracked */ #endif # 325 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define UF_SYSTEM 0x00000080 /* Windows system file bit */ #define UF_SPARSE 0x00000100 /* sparse file */ #define UF_OFFLINE 0x00000200 /* file is offline */ #define UF_REPARSE 0x00000400 /* Windows reparse point file bit */ #define UF_ARCHIVE 0x00000800 /* file needs to be archived */ #define UF_READONLY 0x00001000 /* Windows readonly file bit */ /* This is the same as the MacOS X definition of UF_HIDDEN. */ #define UF_HIDDEN 0x00008000 /* file is hidden */ /* * Super-user changeable flags. */ #define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */ #define SF_ARCHIVED 0x00010000 /* file is archived */ #define SF_IMMUTABLE 0x00020000 /* file may not be changed */ #define SF_APPEND 0x00040000 /* writes to file may only append */ #define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */ #define SF_SNAPSHOT 0x00200000 /* snapshot inode */ #ifdef _KERNEL /* * Shorthand abbreviations of above. */ #define OPAQUE (UF_OPAQUE) #define APPEND (UF_APPEND | SF_APPEND) #define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE) #define NOUNLINK (UF_NOUNLINK | SF_NOUNLINK) #endif # 354 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #endif /* __BSD_VISIBLE */ # 356 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.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 */ # 358 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #define UTIME_NOW -1 #define UTIME_OMIT -2 #endif # 361 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #ifndef _KERNEL __BEGIN_DECLS #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 365 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int chflags(const char *, unsigned long); int chflagsat(int, const char *, unsigned long, int); #endif # 368 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int chmod(const char *, mode_t); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 370 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int fchflags(int, unsigned long); #endif # 372 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.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 */ # 373 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int fchmod(int, mode_t); #endif # 375 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.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 */ # 376 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int fchmodat(int, const char *, mode_t, int); int futimens(int fd, const struct timespec times[2]); int utimensat(int fd, const char *path, const struct timespec times[2], int flag); #endif # 381 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int fstat(int, struct stat *); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 383 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int lchflags(const char *, unsigned long); int lchmod(const char *, mode_t); #endif # 386 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.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 */ # 387 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int lstat(const char * __restrict, struct stat * __restrict); #endif # 389 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int mkdir(const char *, mode_t); int mkfifo(const char *, mode_t); #if 0 /* disabled by -frewrite-includes */ #if !defined(_MKNOD_DECLARED) && __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 392 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int mknod(const char *, mode_t, dev_t); #define _MKNOD_DECLARED #endif # 395 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int stat(const char * __restrict, struct stat * __restrict); mode_t umask(mode_t); #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200809 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 398 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int fstatat(int, const char *, struct stat *, int); int mkdirat(int, const char *, mode_t); int mkfifoat(int, const char *, mode_t); #endif # 402 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE >= 700 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 403 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 int mknodat(int, const char *, mode_t, dev_t); #endif # 405 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 407 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 #endif /* !_SYS_STAT_H_ */ # 409 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/stat.h" 3 4 # 30 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.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$ */ #ifndef _SYS_UIO_H_ #define _SYS_UIO_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS__IOVEC_H_ #define _SYS__IOVEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_iovec.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_iovec.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_iovec.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_uio.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$ */ #ifndef _SYS__UIO_H_ #define _SYS__UIO_H_ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_uio.h" 3 4 enum uio_rw { UIO_READ, UIO_WRITE }; /* Segment flag values. */ enum uio_seg { UIO_USERSPACE, /* from user data space */ UIO_SYSSPACE, /* from system space */ UIO_NOCOPY /* don't copy, already in object */ }; #endif /* __BSD_VISIBLE */ # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_uio.h" 3 4 #endif /* !_SYS__UIO_H_ */ # 53 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_uio.h" 3 4 # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 2 3 4 #ifndef _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED #endif # 52 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 #ifdef _KERNEL struct uio { struct iovec *uio_iov; /* scatter/gather list */ int uio_iovcnt; /* length of scatter/gather list */ off_t uio_offset; /* offset in target object */ ssize_t uio_resid; /* remaining bytes to process */ enum uio_seg uio_segflg; /* address space */ enum uio_rw uio_rw; /* operation */ struct thread *uio_td; /* owner */ }; /* * Limits * * N.B.: UIO_MAXIOV must be no less than IOV_MAX from * which in turn must be no less than _XOPEN_IOV_MAX from . If * we ever make this tunable (probably pointless), then IOV_MAX should be * removed from and applications would be expected to use * sysconf(3) to find out the correct value, or else assume the worst * (_XOPEN_IOV_MAX). Perhaps UIO_MAXIOV should be simply defined as * IOV_MAX. */ #define UIO_MAXIOV 1024 /* max 1K of iov's */ struct vm_object; struct vm_page; struct bus_dma_segment; struct uio *cloneuio(struct uio *uiop); int copyinfrom(const void * __restrict src, void * __restrict dst, size_t len, int seg); int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error); int copyinstrfrom(const void * __restrict src, void * __restrict dst, size_t len, size_t * __restrict copied, int seg); int copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop); int copyout_map(struct thread *td, vm_offset_t *addr, size_t sz); int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz); int physcopyin(void *src, vm_paddr_t dst, size_t len); int physcopyout(vm_paddr_t src, void *dst, size_t len); int physcopyin_vlist(struct bus_dma_segment *src, off_t offset, vm_paddr_t dst, size_t len); int physcopyout_vlist(vm_paddr_t src, struct bus_dma_segment *dst, off_t offset, size_t len); int uiomove(void *cp, int n, struct uio *uio); int uiomove_frombuf(void *buf, int buflen, struct uio *uio); int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n, struct uio *uio); int uiomove_nofault(void *cp, int n, struct uio *uio); int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio); #else /* !_KERNEL */ # 106 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 __BEGIN_DECLS ssize_t readv(int, const struct iovec *, int); ssize_t writev(int, const struct iovec *, int); #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 111 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 ssize_t preadv(int, const struct iovec *, int, off_t); ssize_t pwritev(int, const struct iovec *, int, off_t); #endif # 114 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 __END_DECLS #endif /* _KERNEL */ # 117 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 #endif /* !_SYS_UIO_H_ */ # 119 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/uio.h" 3 4 # 31 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #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/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 # 45 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 __BEGIN_DECLS int * __error(void); __END_DECLS #define errno (* __error()) #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 #ifndef _POSIX_SOURCE #define ELAST 97 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ # 189 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 #endif /* __EXT1_VISIBLE */ # 207 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 #endif # 208 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 #endif # 210 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/errno.h" 3 4 # 33 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_FCNTL_H_ #define _SYS_FCNTL_H_ /* * This file includes the definitions for open and fcntl * described by POSIX for ; it also includes * related kernel definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #ifndef _MODE_T_DECLARED typedef __mode_t mode_t; #define _MODE_T_DECLARED #endif # 56 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED #endif # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED #endif # 66 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define FREAD 0x0001 #define FWRITE 0x0002 #endif # 92 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif # 104 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 /* Attempt to bypass buffer cache */ #define O_DIRECT 0x00010000 #endif # 118 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define O_DIRECTORY 0x00020000 /* Fail if not directory */ #define O_EXEC 0x00040000 /* Open for execute only */ #endif # 123 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #ifdef _KERNEL #define FEXEC O_EXEC #endif # 126 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 128 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 133 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 135 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define O_VERIFY 0x00200000 /* open only after verification */ #define O_BENEATH 0x00400000 /* Fail if not under cwd */ #endif # 138 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 162 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 172 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #endif # 173 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 180 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 187 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 195 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 /* Read ahead */ #define FRDAHEAD O_CREAT #endif # 198 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 200 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 0x0100 /* Check access using effective user and group ID */ #define AT_SYMLINK_NOFOLLOW 0x0200 /* Do not follow symbolic links */ #define AT_SYMLINK_FOLLOW 0x0400 /* Follow symbolic link */ #define AT_REMOVEDIR 0x0800 /* Remove directory instead of file */ #define AT_BENEATH 0x1000 /* Fail if not under dirfd */ #endif # 217 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 229 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 232 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 233 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 238 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 242 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 246 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 247 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ #endif # 249 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 250 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #define F_DUP2FD_CLOEXEC 18 /* Like F_DUP2FD, but FD_CLOEXEC is set */ #define F_ADD_SEALS 19 #define F_GET_SEALS 20 /* Seals (F_ADD_SEALS, F_GET_SEALS). */ #define F_SEAL_SEAL 0x0001 /* Prevent adding sealings */ #define F_SEAL_SHRINK 0x0002 /* May not shrink */ #define F_SEAL_GROW 0x0004 /* May not grow */ #define F_SEAL_WRITE 0x0008 /* May not write */ #endif /* __BSD_VISIBLE */ # 260 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 269 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 272 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 279 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 294 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 306 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 308 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 314 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 316 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 # 326 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #ifdef __BSD_VISIBLE /* * Magic value that specify that corresponding file descriptor to filename * is unknown and sanitary check should be omitted in the funlinkat() and * similar syscalls. */ #define FD_NONE -200 #endif # 336 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 343 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 int flock(int, int); #endif # 345 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 346 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 int openat(int, const char *, int, ...); #endif # 348 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 349 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 int posix_fadvise(int, off_t, off_t, int); int posix_fallocate(int, off_t, off_t); #endif # 352 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 __END_DECLS #endif # 354 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 #endif /* !_SYS_FCNTL_H_ */ # 356 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/fcntl.h" 3 4 # 34 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 1 3 4 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __STDARG_H #define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST #endif # 17 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 3 4 #define va_start(ap, param) __builtin_va_start(ap, param) #define va_end(ap) __builtin_va_end(ap) #define va_arg(ap, type) __builtin_va_arg(ap, type) /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ #define __va_copy(d,s) __builtin_va_copy(d,s) #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 3 4 #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif # 29 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 3 4 #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 typedef __builtin_va_list __gnuc_va_list; #endif # 34 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 3 4 #endif /* __STDARG_H */ # 36 "/opt/llvm/lib/clang/10.0.0/include/stdarg.h" 3 4 # 35 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/src/contrib/atf/atf-c/tc.c" # 36 "/usr/src/contrib/atf/atf-c/tc.c" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * 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. * * @(#)stdio.h 8.5 (Berkeley) 4/29/95 * $FreeBSD$ */ #ifndef _STDIO_H_ #define _STDIO_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 __NULLABILITY_PRAGMA_PUSH typedef __off_t fpos_t; #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 53 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif # 58 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.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 */ # 60 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _OFF_T_DECLARED #define _OFF_T_DECLARED typedef __off_t off_t; #endif # 64 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _SSIZE_T_DECLARED #define _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #endif # 68 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #endif # 69 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _OFF64_T_DECLARED #define _OFF64_T_DECLARED typedef __off64_t off64_t; #endif # 74 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.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 */ # 76 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _VA_LIST_DECLARED typedef __va_list va_list; #define _VA_LIST_DECLARED #endif # 80 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #endif # 81 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define _FSTDIO /* Define for new stdio with functions. */ /* * NB: to fit things in six character monocase externals, the stdio * code uses the prefix `__s' for stdio objects, typically followed * by a three-character attempt at a mnemonic. */ /* stdio buffers */ struct __sbuf { unsigned char *_base; int _size; }; /* * stdio state variables. * * The following always hold: * * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), * _lbfsize is -_bf._size, else _lbfsize is 0 * if _flags&__SRD, _w is 0 * if _flags&__SWR, _r is 0 * * This ensures that the getc and putc macros (or inline functions) never * try to write or read from a file that is in `read' or `write' mode. * (Moreover, they can, and do, automatically switch from read mode to * write mode, and back, on "r+" and "w+" files.) * * _lbfsize is used only to make the inline line-buffered output stream * code as compact as possible. * * _ub, _up, and _ur are used when ungetc() pushes back more characters * than fit in the current _bf, or when ungetc() pushes back a character * that does not match the previous one in _bf. When this happens, * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. * * Certain members of __sFILE are accessed directly via macros or * inline functions. To preserve ABI compat, these members must not * be disturbed. These members are marked below with (*). */ struct __sFILE { unsigned char *_p; /* (*) current position in (some) buffer */ int _r; /* (*) read space left for getc() */ int _w; /* (*) write space left for putc() */ short _flags; /* (*) flags, below; this FILE is free if 0 */ short _file; /* (*) fileno, if Unix descriptor, else -1 */ struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ /* operations */ void *_cookie; /* (*) cookie passed to io functions */ int (* _Nullable _close)(void *); int (* _Nullable _read)(void *, char *, int); fpos_t (* _Nullable _seek)(void *, fpos_t, int); int (* _Nullable _write)(void *, const char *, int); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ unsigned char *_up; /* saved _p when _p is doing ungetc data */ int _ur; /* saved _r when _r is counting ungetc data */ /* tricks to meet minimum requirements even when malloc() fails */ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ unsigned char _nbuf[1]; /* guarantee a getc() buffer */ /* separate buffer for fgetln() when line crosses buffer boundary */ struct __sbuf _lb; /* buffer for fgetln() */ /* Unix stdio files get aligned to block boundaries on fseek() */ int _blksize; /* stat.st_blksize (may be != _bf._size) */ fpos_t _offset; /* current lseek offset */ struct pthread_mutex *_fl_mutex; /* used for MT-safety */ struct pthread *_fl_owner; /* current owner */ int _fl_count; /* recursive lock count */ int _orientation; /* orientation for fwide() */ __mbstate_t _mbstate; /* multibyte conversion state */ int _flags2; /* additional flags */ }; #ifndef _STDFILE_DECLARED #define _STDFILE_DECLARED typedef struct __sFILE FILE; #endif # 167 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _STDSTREAM_DECLARED __BEGIN_DECLS extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; __END_DECLS #define _STDSTREAM_DECLARED #endif # 175 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define __SLBF 0x0001 /* line buffered */ #define __SNBF 0x0002 /* unbuffered */ #define __SRD 0x0004 /* OK to read */ #define __SWR 0x0008 /* OK to write */ /* RD and WR are never simultaneously asserted */ #define __SRW 0x0010 /* open for reading & writing */ #define __SEOF 0x0020 /* found EOF */ #define __SERR 0x0040 /* found error */ #define __SMBF 0x0080 /* _bf._base is from malloc */ #define __SAPP 0x0100 /* fdopen()ed in append mode */ #define __SSTR 0x0200 /* this is an sprintf/snprintf string */ #define __SOPT 0x0400 /* do fseek() optimization */ #define __SNPT 0x0800 /* do not do fseek() optimization */ #define __SOFF 0x1000 /* set iff _offset is in fact correct */ #define __SMOD 0x2000 /* true => fgetln modified _p text */ #define __SALC 0x4000 /* allocate string space dynamically */ #define __SIGN 0x8000 /* ignore this file in _fwalk */ #define __S2OAP 0x0001 /* O_APPEND mode is set */ /* * The following three definitions are for ANSI C, which took them * from System V, which brilliantly took internal interface macros and * made them official arguments to setvbuf(), without renaming them. * Hence, these ugly _IOxxx names are *supposed* to appear in user code. * * Although numbered as their counterparts above, the implementation * does not rely on this. */ #define _IOFBF 0 /* setvbuf should set fully buffered */ #define _IOLBF 1 /* setvbuf should set line buffered */ #define _IONBF 2 /* setvbuf should set unbuffered */ #define BUFSIZ 1024 /* size of buffer used by setbuf */ #define EOF (-1) /* * FOPEN_MAX is a minimum maximum, and is the number of streams that * stdio can provide without attempting to allocate further resources * (which could fail). Do not use this for anything. */ /* must be == _POSIX_STREAM_MAX */ #ifndef FOPEN_MAX #define FOPEN_MAX 20 /* must be <= OPEN_MAX */ #endif # 221 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define FILENAME_MAX 1024 /* must be <= PATH_MAX */ /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 225 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define P_tmpdir "/tmp/" #endif # 227 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ #define TMP_MAX 308915776 #ifndef SEEK_SET #define SEEK_SET 0 /* set file offset to offset */ #endif # 233 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef SEEK_CUR #define SEEK_CUR 1 /* set file offset to current plus offset */ #endif # 236 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef SEEK_END #define SEEK_END 2 /* set file offset to EOF plus offset */ #endif # 239 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define stdin __stdinp #define stdout __stdoutp #define stderr __stderrp __BEGIN_DECLS #ifdef _XLOCALE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 246 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 # 247 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #endif # 248 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * Functions defined in ANSI C standard. */ void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE * __restrict, fpos_t * __restrict); char *fgets(char * __restrict, int, FILE * __restrict); FILE *fopen(const char * __restrict, const char * __restrict); int fprintf(FILE * __restrict, const char * __restrict, ...); int fputc(int, FILE *); int fputs(const char * __restrict, FILE * __restrict); size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict); int fscanf(FILE * __restrict, const char * __restrict, ...); int fseek(FILE *, long, int); int fsetpos(FILE *, const fpos_t *); long ftell(FILE *); size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); int getc(FILE *); int getchar(void); #if 0 /* disabled by -frewrite-includes */ #if __EXT1_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 273 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 char *gets_s(char *, rsize_t); #endif # 275 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 void perror(const char *); int printf(const char * __restrict, ...); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); int rename(const char *, const char *); void rewind(FILE *); int scanf(const char * __restrict, ...); void setbuf(FILE * __restrict, char * __restrict); int setvbuf(FILE * __restrict, char * __restrict, int, size_t); int sprintf(char * __restrict, const char * __restrict, ...); int sscanf(const char * __restrict, const char * __restrict, ...); FILE *tmpfile(void); char *tmpnam(char *); int ungetc(int, FILE *); int vfprintf(FILE * __restrict, const char * __restrict, __va_list); int vprintf(const char * __restrict, __va_list); int vsprintf(char * __restrict, const char * __restrict, __va_list); #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 298 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); int vsnprintf(char * __restrict, size_t, const char * __restrict, __va_list) __printflike(3, 0); #endif # 303 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __ISO_C_VISIBLE >= 1999 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 304 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int vfscanf(FILE * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); #endif # 310 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * Functions defined in all versions of POSIX 1003.1. */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 315 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ #endif # 317 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 319 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ char *ctermid(char *); FILE *fdopen(int, const char *); int fileno(FILE *); #endif /* __POSIX_VISIBLE */ # 325 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 199209 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 327 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int pclose(FILE *); FILE *popen(const char *, const char *); #endif # 330 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.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 */ # 332 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int ftrylockfile(FILE *); void flockfile(FILE *); void funlockfile(FILE *); /* * These are normally used through macros as defined below, but POSIX * requires functions as well. */ int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); #endif # 345 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 346 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 void clearerr_unlocked(FILE *); int feof_unlocked(FILE *); int ferror_unlocked(FILE *); int fileno_unlocked(FILE *); #endif # 351 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 353 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int fseeko(FILE *, __off_t, int); __off_t ftello(FILE *); #endif # 356 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 358 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int getw(FILE *); int putw(int, FILE *); #endif /* BSD or X/Open before issue 6 */ # 361 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __XSI_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 363 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 char *tempnam(const char *, const char *); #endif # 365 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.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 */ # 367 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); /* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); int dprintf(int, const char * __restrict, ...) __printflike(2, 3); #endif /* __POSIX_VISIBLE >= 200809 */ # 377 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * Routines that are purely local. */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 382 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 int asprintf(char **, const char *, ...) __printflike(2, 3); char *ctermid_r(char *); void fcloseall(void); int fdclose(FILE *, int *); char *fgetln(FILE *, size_t *); const char *fmtcheck(const char *, const char *) __format_arg(2); int fpurge(FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char **, const char *, __va_list) __printflike(2, 0); /* * The system error table contains messages for the first sys_nerr * positive errno values. Use strerror() or strerror_r() from * instead. */ extern const int sys_nerr; extern const char * const sys_errlist[]; /* * Stdio function-access interface. */ FILE *funopen(const void *, int (* _Nullable)(void *, char *, int), int (* _Nullable)(void *, const char *, int), fpos_t (* _Nullable)(void *, fpos_t, int), int (* _Nullable)(void *)); #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) typedef __ssize_t cookie_read_function_t(void *, char *, size_t); typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); typedef int cookie_seek_function_t(void *, off64_t *, int); typedef int cookie_close_function_t(void *); typedef struct { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; FILE *fopencookie(void *, const char *, cookie_io_functions_t); /* * Portability hacks. See . */ #ifndef _FTRUNCATE_DECLARED #define _FTRUNCATE_DECLARED int ftruncate(int, __off_t); #endif # 432 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _LSEEK_DECLARED #define _LSEEK_DECLARED __off_t lseek(int, __off_t, int); #endif # 436 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _MMAP_DECLARED #define _MMAP_DECLARED void *mmap(void *, size_t, int, int, int, __off_t); #endif # 440 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef _TRUNCATE_DECLARED #define _TRUNCATE_DECLARED int truncate(const char *, __off_t); #endif # 444 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #endif /* __BSD_VISIBLE */ # 445 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * Functions internal to the implementation. */ int __srget(FILE *); int __swbuf(int, FILE *); /* * The __sfoo macros are here so that we can * define function versions in the C library. */ #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) #if 0 /* disabled by -frewrite-includes */ #if defined(__GNUC__) && defined(__STDC__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 458 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } #else # 465 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * This has been tuned to generate reasonable code on the vax using pcc. */ #define __sputc(c, p) \ (--(p)->_w < 0 ? \ (p)->_w >= (p)->_lbfsize ? \ (*(p)->_p = (c)), *(p)->_p != '\n' ? \ (int)*(p)->_p++ : \ __swbuf('\n', p) : \ __swbuf((int)(c), p) : \ (*(p)->_p = (c), (int)*(p)->_p++)) #endif # 477 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef __LIBC_ISTHREADED_DECLARED #define __LIBC_ISTHREADED_DECLARED extern int __isthreaded; #endif # 482 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #ifndef __cplusplus #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0) #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) #define __sfileno(p) ((p)->_file) #define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) #define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) #define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p)) #if 0 /* disabled by -frewrite-includes */ #if __POSIX_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 496 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) #endif # 498 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp)) #define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp)) #define getchar() getc(stdin) #define putchar(x) putc(x, stdout) #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 506 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 /* * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 * B.8.2.7 for the rationale behind the *_unlocked() macros. */ #define feof_unlocked(p) __sfeof(p) #define ferror_unlocked(p) __sferror(p) #define clearerr_unlocked(p) __sclearerr(p) #define fileno_unlocked(p) __sfileno(p) #endif # 515 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.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 */ # 516 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #define getc_unlocked(fp) __sgetc(fp) #define putc_unlocked(x, fp) __sputc(x, fp) #define getchar_unlocked() getc_unlocked(stdin) #define putchar_unlocked(x) putc_unlocked(x, stdout) #endif # 522 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 #endif /* __cplusplus */ # 523 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 __END_DECLS __NULLABILITY_PRAGMA_POP #endif /* !_STDIO_H_ */ # 528 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdio.h" 3 4 # 37 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _STDLIB_H_ #define _STDLIB_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #ifndef _RUNE_T_DECLARED typedef __rune_t rune_t; #define _RUNE_T_DECLARED #endif # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 55 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #ifndef __cplusplus #ifndef _WCHAR_T_DECLARED typedef ___wchar_t wchar_t; #define _WCHAR_T_DECLARED #endif # 61 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #endif # 62 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 #endif /* expanded by -frewrite-includes */ # 80 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 # 81 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #endif # 82 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 _Noreturn void _Exit(int); #endif /* __ISO_C_VISIBLE >= 1999 */ # 158 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 char *realpath(const char * __restrict, char * __restrict); #endif # 175 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 int rand_r(unsigned *); /* (TSF) */ #endif # 178 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 int getsubopt(char **, char *const *, char **); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); #define _MKDTEMP_DECLARED #endif # 190 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #ifndef _MKSTEMP_DECLARED int mkstemp(char *); #define _MKSTEMP_DECLARED #endif # 194 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ # 195 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 /* XXX XSI requires pollution from 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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 char *mktemp(char *); #define _MKTEMP_DECLARED #endif # 220 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 int mkostemp(char *, int); int mkostemps(char *, int, int); int mkostempsat(int, 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 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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; #endif # 331 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 __END_DECLS __NULLABILITY_PRAGMA_POP #endif /* !_STDLIB_H_ */ # 348 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/stdlib.h" 3 4 # 38 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _STRING_H_ #define _STRING_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 /* * Prototype functions which were historically defined in , but * are required by POSIX to be prototyped in . */ #if 0 /* disabled by -frewrite-includes */ #if __BSD_VISIBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 1 3 4 /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Mike Barcroft * 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$ */ #ifndef _STRINGS_H_ #define _STRINGS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 void explicit_bzero(void *, size_t); #endif # 51 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 int ffs(int) __pure2; #endif # 54 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 int ffsl(long) __pure2; int ffsll(long long) __pure2; #ifndef HAVE_INLINE_FLS int fls(int) __pure2; #endif # 60 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 #ifndef HAVE_INLINE_FLSL int flsl(long) __pure2; #endif # 63 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 int flsll(long long) __pure2; #endif # 65 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 66 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 char *index(const char *, int) __pure; /* LEGACY */ char *rindex(const char *, int) __pure; /* LEGACY */ #endif # 69 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 */ # 73 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 73 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 33 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_strings.h" 3 4 # 74 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 2 3 4 #endif # 75 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 __END_DECLS #endif /* _STRINGS_H_ */ # 78 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/strings.h" 3 4 # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 2 3 4 #endif # 49 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 54 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif # 59 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 void *memrchr(const void *, int, size_t) __pure; #endif # 63 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 void *memmem(const void *, size_t, const void *, size_t) __pure; #endif # 68 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strcasestr(const char *, const char *) __pure; #endif # 77 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strchrnul(const char*, int) __pure; #endif # 82 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strdup(const char *) __malloc_like; #endif # 89 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 int strerror_r(int, char *, size_t); #endif # 93 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 void strmode(int, char *); #endif # 101 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strnstr(const char *, const char *, size_t) __pure; #endif # 111 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strsep(char **, const char *); #endif # 116 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strsignal(int); #endif # 119 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 char *strtok_r(char *, const char *, char **); #endif # 125 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 void swab(const void * __restrict, void * __restrict, ssize_t); #endif /* _SWAB_DECLARED */ # 138 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 144 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _LOCALE_T_DEFINED #define _LOCALE_T_DEFINED typedef struct _xlocale *locale_t; #endif # 35 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_string.h" 3 4 #endif /* _XLOCALE_H_ */ # 62 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/xlocale/_string.h" 3 4 # 145 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 2 3 4 #endif # 146 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED typedef size_t rsize_t; #endif # 153 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; #endif # 158 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 __END_DECLS #endif /* _STRING_H_ */ # 165 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/string.h" 3 4 # 39 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _UNISTD_H_ #define _UNISTD_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include /* XXX adds too much pollution. */ #endif /* expanded by -frewrite-includes */ # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef _SYS_UNISTD_H_ #define _SYS_UNISTD_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/unistd.h" 3 4 # 39 "/usr/obj/usr/src/powerpc.powerpc/tmp/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 . 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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/unistd.h" 3 4 #define _XOPEN_SHM 1 #define _XOPEN_STREAMS (-1) #endif # 86 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/unistd.h" 3 4 #endif /* !_SYS_UNISTD_H_ */ # 203 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/unistd.h" 3 4 # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 1 "/usr/obj/usr/src/powerpc.powerpc/tmp/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$ */ #ifndef NULL #if 0 /* disabled by -frewrite-includes */ #if !defined(__cplusplus) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL ((void *)0) #else # 36 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL __null #else # 41 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL (0L) #else # 44 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #define NULL 0 #endif /* __LP64__ */ # 46 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* __GNUG__ */ # 47 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif /* !__cplusplus */ # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 #endif # 50 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/_null.h" 3 4 # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 43 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _GID_T_DECLARED typedef __gid_t gid_t; #define _GID_T_DECLARED #endif # 48 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED #endif # 53 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED #endif # 58 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif # 63 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _SSIZE_T_DECLARED typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif # 68 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _UID_T_DECLARED typedef __uid_t uid_t; #define _UID_T_DECLARED #endif # 73 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _USECONDS_T_DECLARED typedef __useconds_t useconds_t; #define _USECONDS_T_DECLARED #endif # 78 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #define _SC_NPROCESSORS_CONF 57 #define _SC_NPROCESSORS_ONLN 58 #define _SC_CPUSET_SIZE 122 #endif # 296 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #define _CS_PATH 1 /* default value of PATH */ #endif # 304 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #endif # 385 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #endif # 400 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 int getlogin_r(char *, int); #endif # 404 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 int gethostname(char *, size_t); int setegid(gid_t); int seteuid(uid_t); #endif # 415 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ # 431 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 int symlink(const char * __restrict, const char * __restrict); #endif # 450 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 void sync(void); #endif /* __XSI_VISIBLE */ # 468 "/usr/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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/obj/usr/src/powerpc.powerpc/tmp/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 *); ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned int); 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 # 529 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _MKNOD_DECLARED int mknod(const char *, mode_t, dev_t); #define _MKNOD_DECLARED #endif # 533 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #ifndef _MKSTEMP_DECLARED int mkstemp(char *); #define _MKSTEMP_DECLARED #endif # 537 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 int mkstemps(char *, int); #ifndef _MKTEMP_DECLARED char *mktemp(char *); #define _MKTEMP_DECLARED #endif # 542 "/usr/obj/usr/src/powerpc.powerpc/tmp/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); 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 # 564 "/usr/obj/usr/src/powerpc.powerpc/tmp/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() */ int funlinkat(int, const char *, int, int); #ifndef _OPTRESET_DECLARED #define _OPTRESET_DECLARED extern int optreset; /* getopt(3) external variable */ #endif # 593 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 #endif /* __BSD_VISIBLE */ # 594 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 __END_DECLS #endif /* !_UNISTD_H_ */ # 597 "/usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/unistd.h" 3 4 # 40 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/defs.h" #endif /* expanded by -frewrite-includes */ # 41 "/usr/src/contrib/atf/atf-c/tc.c" # 42 "/usr/src/contrib/atf/atf-c/tc.c" #if 0 /* expanded by -frewrite-includes */ #include "atf-c/detail/env.h" #endif /* expanded by -frewrite-includes */ # 42 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/detail/env.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_ENV_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/env.h" #define ATF_C_DETAIL_ENV_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/env.h" # 30 "/usr/src/contrib/atf/atf-c/detail/env.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/usr/src/contrib/atf/atf-c/detail/env.h" # 32 "/usr/src/contrib/atf/atf-c/detail/env.h" const char *atf_env_get(const char *); const char *atf_env_get_with_default(const char *, const char *); bool atf_env_has(const char *); atf_error_t atf_env_set(const char *, const char *); atf_error_t atf_env_unset(const char *); #endif /* !defined(ATF_C_DETAIL_ENV_H) */ # 40 "/usr/src/contrib/atf/atf-c/detail/env.h" # 43 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/detail/fs.h" #endif /* expanded by -frewrite-includes */ # 43 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/detail/fs.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_FS_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/fs.h" #define ATF_C_DETAIL_FS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 30 "/usr/src/contrib/atf/atf-c/detail/fs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 31 "/usr/src/contrib/atf/atf-c/detail/fs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 33 "/usr/src/contrib/atf/atf-c/detail/fs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 34 "/usr/src/contrib/atf/atf-c/detail/fs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 1 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_DYNSTR_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" #define ATF_C_DETAIL_DYNSTR_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" # 30 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" # 31 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" # 1 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 32 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" # 34 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" /* --------------------------------------------------------------------- * The "atf_dynstr" type. * --------------------------------------------------------------------- */ struct atf_dynstr { char *m_data; size_t m_datasize; size_t m_length; }; typedef struct atf_dynstr atf_dynstr_t; /* Constants */ extern const size_t atf_dynstr_npos; /* Constructors and destructors */ atf_error_t atf_dynstr_init(atf_dynstr_t *); atf_error_t atf_dynstr_init_ap(atf_dynstr_t *, const char *, va_list); atf_error_t atf_dynstr_init_fmt(atf_dynstr_t *, const char *, ...); atf_error_t atf_dynstr_init_raw(atf_dynstr_t *, const void *, size_t); atf_error_t atf_dynstr_init_rep(atf_dynstr_t *, size_t, char); atf_error_t atf_dynstr_init_substr(atf_dynstr_t *, const atf_dynstr_t *, size_t, size_t); atf_error_t atf_dynstr_copy(atf_dynstr_t *, const atf_dynstr_t *); void atf_dynstr_fini(atf_dynstr_t *); char *atf_dynstr_fini_disown(atf_dynstr_t *); /* Getters */ const char *atf_dynstr_cstring(const atf_dynstr_t *); size_t atf_dynstr_length(const atf_dynstr_t *); size_t atf_dynstr_rfind_ch(const atf_dynstr_t *, char); /* Modifiers */ atf_error_t atf_dynstr_append_ap(atf_dynstr_t *, const char *, va_list); atf_error_t atf_dynstr_append_fmt(atf_dynstr_t *, const char *, ...); void atf_dynstr_clear(atf_dynstr_t *); atf_error_t atf_dynstr_prepend_ap(atf_dynstr_t *, const char *, va_list); atf_error_t atf_dynstr_prepend_fmt(atf_dynstr_t *, const char *, ...); /* Operators */ bool atf_equal_dynstr_cstring(const atf_dynstr_t *, const char *); bool atf_equal_dynstr_dynstr(const atf_dynstr_t *, const atf_dynstr_t *); #endif /* !defined(ATF_C_DETAIL_DYNSTR_H) */ # 78 "/usr/src/contrib/atf/atf-c/detail/dynstr.h" # 36 "/usr/src/contrib/atf/atf-c/detail/fs.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 37 "/usr/src/contrib/atf/atf-c/detail/fs.h" /* --------------------------------------------------------------------- * The "atf_fs_path" type. * --------------------------------------------------------------------- */ struct atf_fs_path { atf_dynstr_t m_data; }; typedef struct atf_fs_path atf_fs_path_t; /* Constructors/destructors. */ atf_error_t atf_fs_path_init_ap(atf_fs_path_t *, const char *, va_list); atf_error_t atf_fs_path_init_fmt(atf_fs_path_t *, const char *, ...); atf_error_t atf_fs_path_copy(atf_fs_path_t *, const atf_fs_path_t *); void atf_fs_path_fini(atf_fs_path_t *); /* Getters. */ atf_error_t atf_fs_path_branch_path(const atf_fs_path_t *, atf_fs_path_t *); const char *atf_fs_path_cstring(const atf_fs_path_t *); atf_error_t atf_fs_path_leaf_name(const atf_fs_path_t *, atf_dynstr_t *); bool atf_fs_path_is_absolute(const atf_fs_path_t *); bool atf_fs_path_is_root(const atf_fs_path_t *); /* Modifiers. */ atf_error_t atf_fs_path_append_ap(atf_fs_path_t *, const char *, va_list); atf_error_t atf_fs_path_append_fmt(atf_fs_path_t *, const char *, ...); atf_error_t atf_fs_path_append_path(atf_fs_path_t *, const atf_fs_path_t *); atf_error_t atf_fs_path_to_absolute(const atf_fs_path_t *, atf_fs_path_t *); /* Operators. */ bool atf_equal_fs_path_fs_path(const atf_fs_path_t *, const atf_fs_path_t *); /* --------------------------------------------------------------------- * The "atf_fs_stat" type. * --------------------------------------------------------------------- */ struct atf_fs_stat { int m_type; struct stat m_sb; }; typedef struct atf_fs_stat atf_fs_stat_t; /* Constants. */ extern const int atf_fs_stat_blk_type; extern const int atf_fs_stat_chr_type; extern const int atf_fs_stat_dir_type; extern const int atf_fs_stat_fifo_type; extern const int atf_fs_stat_lnk_type; extern const int atf_fs_stat_reg_type; extern const int atf_fs_stat_sock_type; extern const int atf_fs_stat_wht_type; /* Constructors/destructors. */ atf_error_t atf_fs_stat_init(atf_fs_stat_t *, const atf_fs_path_t *); void atf_fs_stat_copy(atf_fs_stat_t *, const atf_fs_stat_t *); void atf_fs_stat_fini(atf_fs_stat_t *); /* Getters. */ dev_t atf_fs_stat_get_device(const atf_fs_stat_t *); ino_t atf_fs_stat_get_inode(const atf_fs_stat_t *); mode_t atf_fs_stat_get_mode(const atf_fs_stat_t *); off_t atf_fs_stat_get_size(const atf_fs_stat_t *); int atf_fs_stat_get_type(const atf_fs_stat_t *); bool atf_fs_stat_is_owner_readable(const atf_fs_stat_t *); bool atf_fs_stat_is_owner_writable(const atf_fs_stat_t *); bool atf_fs_stat_is_owner_executable(const atf_fs_stat_t *); bool atf_fs_stat_is_group_readable(const atf_fs_stat_t *); bool atf_fs_stat_is_group_writable(const atf_fs_stat_t *); bool atf_fs_stat_is_group_executable(const atf_fs_stat_t *); bool atf_fs_stat_is_other_readable(const atf_fs_stat_t *); bool atf_fs_stat_is_other_writable(const atf_fs_stat_t *); bool atf_fs_stat_is_other_executable(const atf_fs_stat_t *); /* --------------------------------------------------------------------- * Free functions. * --------------------------------------------------------------------- */ extern const int atf_fs_access_f; extern const int atf_fs_access_r; extern const int atf_fs_access_w; extern const int atf_fs_access_x; atf_error_t atf_fs_eaccess(const atf_fs_path_t *, int); atf_error_t atf_fs_exists(const atf_fs_path_t *, bool *); atf_error_t atf_fs_getcwd(atf_fs_path_t *); atf_error_t atf_fs_mkdtemp(atf_fs_path_t *); atf_error_t atf_fs_mkstemp(atf_fs_path_t *, int *); atf_error_t atf_fs_rmdir(const atf_fs_path_t *); atf_error_t atf_fs_unlink(const atf_fs_path_t *); #endif /* !defined(ATF_C_DETAIL_FS_H) */ # 129 "/usr/src/contrib/atf/atf-c/detail/fs.h" # 44 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/detail/map.h" #endif /* expanded by -frewrite-includes */ # 44 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/detail/map.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_MAP_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/map.h" #define ATF_C_DETAIL_MAP_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/map.h" # 30 "/usr/src/contrib/atf/atf-c/detail/map.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/detail/map.h" # 31 "/usr/src/contrib/atf/atf-c/detail/map.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/detail/map.h" # 1 "/usr/src/contrib/atf/atf-c/detail/list.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_LIST_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/list.h" #define ATF_C_DETAIL_LIST_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/list.h" # 30 "/usr/src/contrib/atf/atf-c/detail/list.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/detail/list.h" # 31 "/usr/src/contrib/atf/atf-c/detail/list.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/usr/src/contrib/atf/atf-c/detail/list.h" # 1 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 32 "/usr/src/contrib/atf/atf-c/detail/list.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/detail/list.h" # 34 "/usr/src/contrib/atf/atf-c/detail/list.h" /* --------------------------------------------------------------------- * The "atf_list_citer" type. * --------------------------------------------------------------------- */ struct atf_list_citer { const struct atf_list *m_list; const void *m_entry; }; typedef struct atf_list_citer atf_list_citer_t; /* Getters. */ const void *atf_list_citer_data(const atf_list_citer_t); atf_list_citer_t atf_list_citer_next(const atf_list_citer_t); /* Operators. */ bool atf_equal_list_citer_list_citer(const atf_list_citer_t, const atf_list_citer_t); /* --------------------------------------------------------------------- * The "atf_list_iter" type. * --------------------------------------------------------------------- */ struct atf_list_iter { struct atf_list *m_list; void *m_entry; }; typedef struct atf_list_iter atf_list_iter_t; /* Getters. */ void *atf_list_iter_data(const atf_list_iter_t); atf_list_iter_t atf_list_iter_next(const atf_list_iter_t); /* Operators. */ bool atf_equal_list_iter_list_iter(const atf_list_iter_t, const atf_list_iter_t); /* --------------------------------------------------------------------- * The "atf_list" type. * --------------------------------------------------------------------- */ struct atf_list { void *m_begin; void *m_end; size_t m_size; }; typedef struct atf_list atf_list_t; /* Constructors and destructors */ atf_error_t atf_list_init(atf_list_t *); void atf_list_fini(atf_list_t *); /* Getters. */ atf_list_iter_t atf_list_begin(atf_list_t *); atf_list_citer_t atf_list_begin_c(const atf_list_t *); atf_list_iter_t atf_list_end(atf_list_t *); atf_list_citer_t atf_list_end_c(const atf_list_t *); void *atf_list_index(atf_list_t *, const size_t); const void *atf_list_index_c(const atf_list_t *, const size_t); size_t atf_list_size(const atf_list_t *); char **atf_list_to_charpp(const atf_list_t *); /* Modifiers. */ atf_error_t atf_list_append(atf_list_t *, void *, bool); void atf_list_append_list(atf_list_t *, atf_list_t *); /* Macros. */ #define atf_list_for_each(iter, list) \ for (iter = atf_list_begin(list); \ !atf_equal_list_iter_list_iter((iter), atf_list_end(list)); \ iter = atf_list_iter_next(iter)) #define atf_list_for_each_c(iter, list) \ for (iter = atf_list_begin_c(list); \ !atf_equal_list_citer_list_citer((iter), atf_list_end_c(list)); \ iter = atf_list_citer_next(iter)) #endif /* !defined(ATF_C_DETAIL_LIST_H) */ # 112 "/usr/src/contrib/atf/atf-c/detail/list.h" # 33 "/usr/src/contrib/atf/atf-c/detail/map.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/detail/map.h" # 34 "/usr/src/contrib/atf/atf-c/detail/map.h" /* --------------------------------------------------------------------- * The "atf_map_citer" type. * --------------------------------------------------------------------- */ struct atf_map_citer { const struct atf_map *m_map; const void *m_entry; atf_list_citer_t m_listiter; }; typedef struct atf_map_citer atf_map_citer_t; /* Getters. */ const char *atf_map_citer_key(const atf_map_citer_t); const void *atf_map_citer_data(const atf_map_citer_t); atf_map_citer_t atf_map_citer_next(const atf_map_citer_t); /* Operators. */ bool atf_equal_map_citer_map_citer(const atf_map_citer_t, const atf_map_citer_t); /* --------------------------------------------------------------------- * The "atf_map_iter" type. * --------------------------------------------------------------------- */ struct atf_map_iter { struct atf_map *m_map; void *m_entry; atf_list_iter_t m_listiter; }; typedef struct atf_map_iter atf_map_iter_t; /* Getters. */ const char *atf_map_iter_key(const atf_map_iter_t); void *atf_map_iter_data(const atf_map_iter_t); atf_map_iter_t atf_map_iter_next(const atf_map_iter_t); /* Operators. */ bool atf_equal_map_iter_map_iter(const atf_map_iter_t, const atf_map_iter_t); /* --------------------------------------------------------------------- * The "atf_map" type. * --------------------------------------------------------------------- */ /* A list-based map. Typically very inefficient, but our maps are small * enough. */ struct atf_map { atf_list_t m_list; }; typedef struct atf_map atf_map_t; /* Constructors and destructors */ atf_error_t atf_map_init(atf_map_t *); atf_error_t atf_map_init_charpp(atf_map_t *, const char *const *); void atf_map_fini(atf_map_t *); /* Getters. */ atf_map_iter_t atf_map_begin(atf_map_t *); atf_map_citer_t atf_map_begin_c(const atf_map_t *); atf_map_iter_t atf_map_end(atf_map_t *); atf_map_citer_t atf_map_end_c(const atf_map_t *); atf_map_iter_t atf_map_find(atf_map_t *, const char *); atf_map_citer_t atf_map_find_c(const atf_map_t *, const char *); size_t atf_map_size(const atf_map_t *); char **atf_map_to_charpp(const atf_map_t *); /* Modifiers. */ atf_error_t atf_map_insert(atf_map_t *, const char *, void *, bool); /* Macros. */ #define atf_map_for_each(iter, map) \ for (iter = atf_map_begin(map); \ !atf_equal_map_iter_map_iter((iter), atf_map_end(map)); \ iter = atf_map_iter_next(iter)) #define atf_map_for_each_c(iter, map) \ for (iter = atf_map_begin_c(map); \ !atf_equal_map_citer_map_citer((iter), atf_map_end_c(map)); \ iter = atf_map_citer_next(iter)) #endif /* !defined(ATF_C_DETAIL_MAP_H) */ # 115 "/usr/src/contrib/atf/atf-c/detail/map.h" # 45 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/detail/sanity.h" #endif /* expanded by -frewrite-includes */ # 45 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/detail/sanity.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_SANITY_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/sanity.h" #define ATF_C_DETAIL_SANITY_H void atf_sanity_inv(const char *, int, const char *); void atf_sanity_pre(const char *, int, const char *); void atf_sanity_post(const char *, int, const char *); #if 0 /* disabled by -frewrite-includes */ #if !defined(NDEBUG) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/src/contrib/atf/atf-c/detail/sanity.h" #define INV(x) \ do { \ if (!(x)) \ atf_sanity_inv(__FILE__, __LINE__, #x); \ } while (0) #define PRE(x) \ do { \ if (!(x)) \ atf_sanity_pre(__FILE__, __LINE__, #x); \ } while (0) #define POST(x) \ do { \ if (!(x)) \ atf_sanity_post(__FILE__, __LINE__, #x); \ } while (0) #else /* defined(NDEBUG) */ # 52 "/usr/src/contrib/atf/atf-c/detail/sanity.h" #define INV(x) \ do { \ } while (0) #define PRE(x) \ do { \ } while (0) #define POST(x) \ do { \ } while (0) #endif /* !defined(NDEBUG) */ # 66 "/usr/src/contrib/atf/atf-c/detail/sanity.h" #define UNREACHABLE INV(0) #endif /* !defined(ATF_C_DETAIL_SANITY_H) */ # 70 "/usr/src/contrib/atf/atf-c/detail/sanity.h" # 46 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/detail/text.h" #endif /* expanded by -frewrite-includes */ # 46 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/detail/text.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_DETAIL_TEXT_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/detail/text.h" #define ATF_C_DETAIL_TEXT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/detail/text.h" # 30 "/usr/src/contrib/atf/atf-c/detail/text.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/usr/src/contrib/atf/atf-c/detail/text.h" # 31 "/usr/src/contrib/atf/atf-c/detail/text.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/detail/text.h" # 33 "/usr/src/contrib/atf/atf-c/detail/text.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/src/contrib/atf/atf-c/detail/text.h" # 34 "/usr/src/contrib/atf/atf-c/detail/text.h" atf_error_t atf_text_for_each_word(const char *, const char *, atf_error_t (*)(const char *, void *), void *); atf_error_t atf_text_format(char **, const char *, ...); atf_error_t atf_text_format_ap(char **, const char *, va_list); atf_error_t atf_text_split(const char *, const char *, atf_list_t *); atf_error_t atf_text_to_bool(const char *, bool *); atf_error_t atf_text_to_long(const char *, long *); #endif /* !defined(ATF_C_DETAIL_TEXT_H) */ # 45 "/usr/src/contrib/atf/atf-c/detail/text.h" # 47 "/usr/src/contrib/atf/atf-c/tc.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "atf-c/error.h" #endif /* expanded by -frewrite-includes */ # 47 "/usr/src/contrib/atf/atf-c/tc.c" # 1 "/usr/src/contrib/atf/atf-c/error.h" 1 /* Copyright (c) 2008 The NetBSD Foundation, Inc. * 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 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. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(ATF_C_ERROR_H) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/src/contrib/atf/atf-c/error.h" #define ATF_C_ERROR_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/usr/src/contrib/atf/atf-c/error.h" # 30 "/usr/src/contrib/atf/atf-c/error.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/usr/src/contrib/atf/atf-c/error.h" # 32 "/usr/src/contrib/atf/atf-c/error.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/usr/src/contrib/atf/atf-c/error.h" # 1 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/opt/llvm/lib/clang/10.0.0/include/stddef.h" 3 4 # 33 "/usr/src/contrib/atf/atf-c/error.h" 2 /* --------------------------------------------------------------------- * The "atf_error" type. * --------------------------------------------------------------------- */ struct atf_error { bool m_free; const char *m_type; void *m_data; void (*m_format)(struct atf_error *, char *, size_t); }; atf_error_t atf_error_new(const char *, void *, size_t, void (*)(const atf_error_t, char *, size_t)); void atf_error_free(atf_error_t); atf_error_t atf_no_error(void); bool atf_is_error(const atf_error_t); bool atf_error_is(const atf_error_t, const char *); const void *atf_error_data(const atf_error_t); void atf_error_format(const atf_error_t, char *, size_t); /* --------------------------------------------------------------------- * Common error types. * --------------------------------------------------------------------- */ atf_error_t atf_libc_error(int, const char *, ...); int atf_libc_error_code(const atf_error_t); const char *atf_libc_error_msg(const atf_error_t); atf_error_t atf_no_memory_error(void); #endif /* !defined(ATF_C_ERROR_H) */ # 68 "/usr/src/contrib/atf/atf-c/error.h" # 48 "/usr/src/contrib/atf/atf-c/tc.c" 2 /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ enum expect_type { EXPECT_PASS, EXPECT_FAIL, EXPECT_EXIT, EXPECT_SIGNAL, EXPECT_DEATH, EXPECT_TIMEOUT, }; struct context { const atf_tc_t *tc; const char *resfile; size_t fail_count; enum expect_type expect; atf_dynstr_t expect_reason; size_t expect_previous_fail_count; size_t expect_fail_count; int expect_exitcode; int expect_signo; }; static void context_init(struct context *, const atf_tc_t *, const char *); static void check_fatal_error(atf_error_t); static void report_fatal_error(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN; static atf_error_t write_resfile(const int, const char *, const int, const atf_dynstr_t *); static void create_resfile(const char *, const char *, const int, atf_dynstr_t *); static void error_in_expect(struct context *, const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN; static void validate_expect(struct context *); static void expected_failure(struct context *, atf_dynstr_t *) ATF_DEFS_ATTRIBUTE_NORETURN; static void fail_requirement(struct context *, atf_dynstr_t *) ATF_DEFS_ATTRIBUTE_NORETURN; static void fail_check(struct context *, atf_dynstr_t *); static void pass(struct context *) ATF_DEFS_ATTRIBUTE_NORETURN; static void skip(struct context *, atf_dynstr_t *) ATF_DEFS_ATTRIBUTE_NORETURN; static void format_reason_ap(atf_dynstr_t *, const char *, const size_t, const char *, va_list); static void format_reason_fmt(atf_dynstr_t *, const char *, const size_t, const char *, ...); static void errno_test(struct context *, const char *, const size_t, const int, const char *, const bool, void (*)(struct context *, atf_dynstr_t *)); static atf_error_t check_prog_in_dir(const char *, void *); static atf_error_t check_prog(struct context *, const char *); static void context_init(struct context *ctx, const atf_tc_t *tc, const char *resfile) { ctx->tc = tc; ctx->resfile = resfile; ctx->fail_count = 0; ctx->expect = EXPECT_PASS; check_fatal_error(atf_dynstr_init(&ctx->expect_reason)); ctx->expect_previous_fail_count = 0; ctx->expect_fail_count = 0; ctx->expect_exitcode = 0; ctx->expect_signo = 0; } static void check_fatal_error(atf_error_t err) { if (atf_is_error(err)) { char buf[1024]; atf_error_format(err, buf, sizeof(buf)); fprintf(stderr, "FATAL ERROR: %s\n", buf); atf_error_free(err); abort(); } } static void report_fatal_error(const char *msg, ...) { va_list ap; fprintf(stderr, "FATAL ERROR: "); va_start(ap, msg); vfprintf(stderr, msg, ap); va_end(ap); fprintf(stderr, "\n"); abort(); } /** Writes to a results file. * * The results file is supposed to be already open. * * This function returns an error code instead of exiting in case of error * because the caller needs to clean up the reason object before terminating. */ static atf_error_t write_resfile(const int fd, const char *result, const int arg, const atf_dynstr_t *reason) { static char NL[] = "\n", CS[] = ": "; char buf[64]; const char *r; struct iovec iov[5]; ssize_t ret; int count = 0; INV(arg == -1 || reason != NULL); #define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) iov[count].iov_base = UNCONST(result); iov[count++].iov_len = strlen(result); if (reason != NULL) { if (arg != -1) { iov[count].iov_base = buf; iov[count++].iov_len = snprintf(buf, sizeof(buf), "(%d)", arg); } iov[count].iov_base = CS; iov[count++].iov_len = sizeof(CS) - 1; r = atf_dynstr_cstring(reason); iov[count].iov_base = UNCONST(r); iov[count++].iov_len = strlen(r); } #undef UNCONST iov[count].iov_base = NL; iov[count++].iov_len = sizeof(NL) - 1; while ((ret = writev(fd, iov, count)) == -1 && errno == EINTR) continue; /* Retry. */ if (ret != -1) return atf_no_error(); return atf_libc_error( errno, "Failed to write results file; result %s, reason %s", result, reason == NULL ? "null" : atf_dynstr_cstring(reason)); } /** Creates a results file. * * The input reason is released in all cases. * * An error in this function is considered to be fatal, hence why it does * not return any error code. */ static void create_resfile(const char *resfile, const char *result, const int arg, atf_dynstr_t *reason) { atf_error_t err; if (strcmp("/dev/stdout", resfile) == 0) { err = write_resfile(STDOUT_FILENO, result, arg, reason); } else if (strcmp("/dev/stderr", resfile) == 0) { err = write_resfile(STDERR_FILENO, result, arg, reason); } else { const int fd = open(resfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd == -1) { err = atf_libc_error(errno, "Cannot create results file '%s'", resfile); } else { err = write_resfile(fd, result, arg, reason); close(fd); } } if (reason != NULL) atf_dynstr_fini(reason); check_fatal_error(err); } /** Fails a test case if validate_expect fails. */ static void error_in_expect(struct context *ctx, const char *fmt, ...) { atf_dynstr_t reason; va_list ap; va_start(ap, fmt); format_reason_ap(&reason, NULL, 0, fmt, ap); va_end(ap); ctx->expect = EXPECT_PASS; /* Ensure fail_requirement really fails. */ fail_requirement(ctx, &reason); } /** Ensures that the "expect" state is correct. * * Call this function before modifying the current value of expect. */ static void validate_expect(struct context *ctx) { if (ctx->expect == EXPECT_DEATH) { error_in_expect(ctx, "Test case was expected to terminate abruptly " "but it continued execution"); } else if (ctx->expect == EXPECT_EXIT) { error_in_expect(ctx, "Test case was expected to exit cleanly but it " "continued execution"); } else if (ctx->expect == EXPECT_FAIL) { if (ctx->expect_fail_count == ctx->expect_previous_fail_count) error_in_expect(ctx, "Test case was expecting a failure but none " "were raised"); else INV(ctx->expect_fail_count > ctx->expect_previous_fail_count); } else if (ctx->expect == EXPECT_PASS) { /* Nothing to validate. */ } else if (ctx->expect == EXPECT_SIGNAL) { error_in_expect(ctx, "Test case was expected to receive a termination " "signal but it continued execution"); } else if (ctx->expect == EXPECT_TIMEOUT) { error_in_expect(ctx, "Test case was expected to hang but it continued " "execution"); } else UNREACHABLE; } static void expected_failure(struct context *ctx, atf_dynstr_t *reason) { check_fatal_error(atf_dynstr_prepend_fmt(reason, "%s: ", atf_dynstr_cstring(&ctx->expect_reason))); create_resfile(ctx->resfile, "expected_failure", -1, reason); exit(EXIT_SUCCESS); } static void fail_requirement(struct context *ctx, atf_dynstr_t *reason) { if (ctx->expect == EXPECT_FAIL) { expected_failure(ctx, reason); } else if (ctx->expect == EXPECT_PASS) { create_resfile(ctx->resfile, "failed", -1, reason); exit(EXIT_FAILURE); } else { error_in_expect(ctx, "Test case raised a failure but was not " "expecting one; reason was %s", atf_dynstr_cstring(reason)); } UNREACHABLE; } static void fail_check(struct context *ctx, atf_dynstr_t *reason) { if (ctx->expect == EXPECT_FAIL) { fprintf(stderr, "*** Expected check failure: %s: %s\n", atf_dynstr_cstring(&ctx->expect_reason), atf_dynstr_cstring(reason)); ctx->expect_fail_count++; } else if (ctx->expect == EXPECT_PASS) { fprintf(stderr, "*** Check failed: %s\n", atf_dynstr_cstring(reason)); ctx->fail_count++; } else { error_in_expect(ctx, "Test case raised a failure but was not " "expecting one; reason was %s", atf_dynstr_cstring(reason)); } atf_dynstr_fini(reason); } static void pass(struct context *ctx) { if (ctx->expect == EXPECT_FAIL) { error_in_expect(ctx, "Test case was expecting a failure but got " "a pass instead"); } else if (ctx->expect == EXPECT_PASS) { create_resfile(ctx->resfile, "passed", -1, NULL); exit(EXIT_SUCCESS); } else { error_in_expect(ctx, "Test case asked to explicitly pass but was " "not expecting such condition"); } UNREACHABLE; } static void skip(struct context *ctx, atf_dynstr_t *reason) { if (ctx->expect == EXPECT_PASS) { create_resfile(ctx->resfile, "skipped", -1, reason); exit(EXIT_SUCCESS); } else { error_in_expect(ctx, "Can only skip a test case when running in " "expect pass mode"); } UNREACHABLE; } /** Formats a failure/skip reason message. * * The formatted reason is stored in out_reason. out_reason is initialized * in this function and is supposed to be released by the caller. In general, * the reason will eventually be fed to create_resfile, which will release * it. * * Errors in this function are fatal. Rationale being: reasons are used to * create results files; if we can't format the reason correctly, the result * of the test program will be bogus. So it's better to just exit with a * fatal error. */ static void format_reason_ap(atf_dynstr_t *out_reason, const char *source_file, const size_t source_line, const char *reason, va_list ap) { atf_error_t err; if (source_file != NULL) { err = atf_dynstr_init_fmt(out_reason, "%s:%zd: ", source_file, source_line); } else { PRE(source_line == 0); err = atf_dynstr_init(out_reason); } if (!atf_is_error(err)) { va_list ap2; va_copy(ap2, ap); err = atf_dynstr_append_ap(out_reason, reason, ap2); va_end(ap2); } check_fatal_error(err); } static void format_reason_fmt(atf_dynstr_t *out_reason, const char *source_file, const size_t source_line, const char *reason, ...) { va_list ap; va_start(ap, reason); format_reason_ap(out_reason, source_file, source_line, reason, ap); va_end(ap); } static void errno_test(struct context *ctx, const char *file, const size_t line, const int exp_errno, const char *expr_str, const bool expr_result, void (*fail_func)(struct context *, atf_dynstr_t *)) { const int actual_errno = errno; if (expr_result) { if (exp_errno != actual_errno) { atf_dynstr_t reason; format_reason_fmt(&reason, file, line, "Expected errno %d, got %d, " "in %s", exp_errno, actual_errno, expr_str); fail_func(ctx, &reason); } } else { atf_dynstr_t reason; format_reason_fmt(&reason, file, line, "Expected true value in %s", expr_str); fail_func(ctx, &reason); } } struct prog_found_pair { const char *prog; bool found; }; static atf_error_t check_prog_in_dir(const char *dir, void *data) { struct prog_found_pair *pf = data; atf_error_t err; if (pf->found) err = atf_no_error(); else { atf_fs_path_t p; err = atf_fs_path_init_fmt(&p, "%s/%s", dir, pf->prog); if (atf_is_error(err)) goto out_p; err = atf_fs_eaccess(&p, atf_fs_access_x); if (!atf_is_error(err)) pf->found = true; else { atf_error_free(err); INV(!pf->found); err = atf_no_error(); } out_p: atf_fs_path_fini(&p); } return err; } static atf_error_t check_prog(struct context *ctx, const char *prog) { atf_error_t err; atf_fs_path_t p; err = atf_fs_path_init_fmt(&p, "%s", prog); if (atf_is_error(err)) goto out; if (atf_fs_path_is_absolute(&p)) { err = atf_fs_eaccess(&p, atf_fs_access_x); if (atf_is_error(err)) { atf_dynstr_t reason; atf_error_free(err); atf_fs_path_fini(&p); format_reason_fmt(&reason, NULL, 0, "The required program %s could " "not be found", prog); skip(ctx, &reason); } } else { const char *path = atf_env_get("PATH"); struct prog_found_pair pf; atf_fs_path_t bp; err = atf_fs_path_branch_path(&p, &bp); if (atf_is_error(err)) goto out_p; if (strcmp(atf_fs_path_cstring(&bp), ".") != 0) { atf_fs_path_fini(&bp); atf_fs_path_fini(&p); report_fatal_error("Relative paths are not allowed when searching " "for a program (%s)", prog); UNREACHABLE; } pf.prog = prog; pf.found = false; err = atf_text_for_each_word(path, ":", check_prog_in_dir, &pf); if (atf_is_error(err)) goto out_bp; if (!pf.found) { atf_dynstr_t reason; atf_fs_path_fini(&bp); atf_fs_path_fini(&p); format_reason_fmt(&reason, NULL, 0, "The required program %s could " "not be found in the PATH", prog); fail_requirement(ctx, &reason); } out_bp: atf_fs_path_fini(&bp); } out_p: atf_fs_path_fini(&p); out: return err; } /* --------------------------------------------------------------------- * The "atf_tc" type. * --------------------------------------------------------------------- */ struct atf_tc_impl { const char *m_ident; atf_map_t m_vars; atf_map_t m_config; atf_tc_head_t m_head; atf_tc_body_t m_body; atf_tc_cleanup_t m_cleanup; }; /* * Constructors/destructors. */ atf_error_t atf_tc_init(atf_tc_t *tc, const char *ident, atf_tc_head_t head, atf_tc_body_t body, atf_tc_cleanup_t cleanup, const char *const *config) { atf_error_t err; tc->pimpl = malloc(sizeof(struct atf_tc_impl)); if (tc->pimpl == NULL) { err = atf_no_memory_error(); goto err; } tc->pimpl->m_ident = ident; tc->pimpl->m_head = head; tc->pimpl->m_body = body; tc->pimpl->m_cleanup = cleanup; err = atf_map_init_charpp(&tc->pimpl->m_config, config); if (atf_is_error(err)) goto err; err = atf_map_init(&tc->pimpl->m_vars); if (atf_is_error(err)) goto err_vars; err = atf_tc_set_md_var(tc, "ident", ident); if (atf_is_error(err)) goto err_map; if (cleanup != NULL) { err = atf_tc_set_md_var(tc, "has.cleanup", "true"); if (atf_is_error(err)) goto err_map; } /* XXX Should the head be able to return error codes? */ if (tc->pimpl->m_head != NULL) tc->pimpl->m_head(tc); if (strcmp(atf_tc_get_md_var(tc, "ident"), ident) != 0) { report_fatal_error("Test case head modified the read-only 'ident' " "property"); UNREACHABLE; } INV(!atf_is_error(err)); return err; err_map: atf_map_fini(&tc->pimpl->m_vars); err_vars: atf_map_fini(&tc->pimpl->m_config); err: return err; } atf_error_t atf_tc_init_pack(atf_tc_t *tc, const atf_tc_pack_t *pack, const char *const *config) { return atf_tc_init(tc, pack->m_ident, pack->m_head, pack->m_body, pack->m_cleanup, config); } void atf_tc_fini(atf_tc_t *tc) { atf_map_fini(&tc->pimpl->m_vars); free(tc->pimpl); } /* * Getters. */ const char * atf_tc_get_ident(const atf_tc_t *tc) { return tc->pimpl->m_ident; } const char * atf_tc_get_config_var(const atf_tc_t *tc, const char *name) { const char *val; atf_map_citer_t iter; PRE(atf_tc_has_config_var(tc, name)); iter = atf_map_find_c(&tc->pimpl->m_config, name); val = atf_map_citer_data(iter); INV(val != NULL); return val; } const char * atf_tc_get_config_var_wd(const atf_tc_t *tc, const char *name, const char *defval) { const char *val; if (!atf_tc_has_config_var(tc, name)) val = defval; else val = atf_tc_get_config_var(tc, name); return val; } bool atf_tc_get_config_var_as_bool(const atf_tc_t *tc, const char *name) { bool val; const char *strval; atf_error_t err; strval = atf_tc_get_config_var(tc, name); err = atf_text_to_bool(strval, &val); if (atf_is_error(err)) { atf_error_free(err); atf_tc_fail("Configuration variable %s does not have a valid " "boolean value; found %s", name, strval); } return val; } bool atf_tc_get_config_var_as_bool_wd(const atf_tc_t *tc, const char *name, const bool defval) { bool val; if (!atf_tc_has_config_var(tc, name)) val = defval; else val = atf_tc_get_config_var_as_bool(tc, name); return val; } long atf_tc_get_config_var_as_long(const atf_tc_t *tc, const char *name) { long val; const char *strval; atf_error_t err; strval = atf_tc_get_config_var(tc, name); err = atf_text_to_long(strval, &val); if (atf_is_error(err)) { atf_error_free(err); atf_tc_fail("Configuration variable %s does not have a valid " "long value; found %s", name, strval); } return val; } long atf_tc_get_config_var_as_long_wd(const atf_tc_t *tc, const char *name, const long defval) { long val; if (!atf_tc_has_config_var(tc, name)) val = defval; else val = atf_tc_get_config_var_as_long(tc, name); return val; } const char * atf_tc_get_md_var(const atf_tc_t *tc, const char *name) { const char *val; atf_map_citer_t iter; PRE(atf_tc_has_md_var(tc, name)); iter = atf_map_find_c(&tc->pimpl->m_vars, name); val = atf_map_citer_data(iter); INV(val != NULL); return val; } char ** atf_tc_get_md_vars(const atf_tc_t *tc) { return atf_map_to_charpp(&tc->pimpl->m_vars); } bool atf_tc_has_config_var(const atf_tc_t *tc, const char *name) { atf_map_citer_t end, iter; iter = atf_map_find_c(&tc->pimpl->m_config, name); end = atf_map_end_c(&tc->pimpl->m_config); return !atf_equal_map_citer_map_citer(iter, end); } bool atf_tc_has_md_var(const atf_tc_t *tc, const char *name) { atf_map_citer_t end, iter; iter = atf_map_find_c(&tc->pimpl->m_vars, name); end = atf_map_end_c(&tc->pimpl->m_vars); return !atf_equal_map_citer_map_citer(iter, end); } /* * Modifiers. */ atf_error_t atf_tc_set_md_var(atf_tc_t *tc, const char *name, const char *fmt, ...) { atf_error_t err; char *value; va_list ap; va_start(ap, fmt); err = atf_text_format_ap(&value, fmt, ap); va_end(ap); if (!atf_is_error(err)) err = atf_map_insert(&tc->pimpl->m_vars, name, value, true); else free(value); return err; } /* --------------------------------------------------------------------- * Free functions, as they should be publicly but they can't. * --------------------------------------------------------------------- */ static void _atf_tc_fail(struct context *, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN; static void _atf_tc_fail_nonfatal(struct context *, const char *, va_list); static void _atf_tc_fail_check(struct context *, const char *, const size_t, const char *, va_list); static void _atf_tc_fail_requirement(struct context *, const char *, const size_t, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN; static void _atf_tc_pass(struct context *) ATF_DEFS_ATTRIBUTE_NORETURN; static void _atf_tc_require_prog(struct context *, const char *); static void _atf_tc_skip(struct context *, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN; static void _atf_tc_check_errno(struct context *, const char *, const size_t, const int, const char *, const bool); static void _atf_tc_require_errno(struct context *, const char *, const size_t, const int, const char *, const bool); static void _atf_tc_expect_pass(struct context *); static void _atf_tc_expect_fail(struct context *, const char *, va_list); static void _atf_tc_expect_exit(struct context *, const int, const char *, va_list); static void _atf_tc_expect_signal(struct context *, const int, const char *, va_list); static void _atf_tc_expect_death(struct context *, const char *, va_list); static void _atf_tc_fail(struct context *ctx, const char *fmt, va_list ap) { va_list ap2; atf_dynstr_t reason; va_copy(ap2, ap); format_reason_ap(&reason, NULL, 0, fmt, ap2); va_end(ap2); fail_requirement(ctx, &reason); UNREACHABLE; } static void _atf_tc_fail_nonfatal(struct context *ctx, const char *fmt, va_list ap) { va_list ap2; atf_dynstr_t reason; va_copy(ap2, ap); format_reason_ap(&reason, NULL, 0, fmt, ap2); va_end(ap2); fail_check(ctx, &reason); } static void _atf_tc_fail_check(struct context *ctx, const char *file, const size_t line, const char *fmt, va_list ap) { va_list ap2; atf_dynstr_t reason; va_copy(ap2, ap); format_reason_ap(&reason, file, line, fmt, ap2); va_end(ap2); fail_check(ctx, &reason); } static void _atf_tc_fail_requirement(struct context *ctx, const char *file, const size_t line, const char *fmt, va_list ap) { va_list ap2; atf_dynstr_t reason; va_copy(ap2, ap); format_reason_ap(&reason, file, line, fmt, ap2); va_end(ap2); fail_requirement(ctx, &reason); UNREACHABLE; } static void _atf_tc_pass(struct context *ctx) { pass(ctx); UNREACHABLE; } static void _atf_tc_require_prog(struct context *ctx, const char *prog) { check_fatal_error(check_prog(ctx, prog)); } static void _atf_tc_skip(struct context *ctx, const char *fmt, va_list ap) { atf_dynstr_t reason; va_list ap2; va_copy(ap2, ap); format_reason_ap(&reason, NULL, 0, fmt, ap2); va_end(ap2); skip(ctx, &reason); } static void _atf_tc_check_errno(struct context *ctx, const char *file, const size_t line, const int exp_errno, const char *expr_str, const bool expr_result) { errno_test(ctx, file, line, exp_errno, expr_str, expr_result, fail_check); } static void _atf_tc_require_errno(struct context *ctx, const char *file, const size_t line, const int exp_errno, const char *expr_str, const bool expr_result) { errno_test(ctx, file, line, exp_errno, expr_str, expr_result, fail_requirement); } static void _atf_tc_expect_pass(struct context *ctx) { validate_expect(ctx); ctx->expect = EXPECT_PASS; } static void _atf_tc_expect_fail(struct context *ctx, const char *reason, va_list ap) { va_list ap2; validate_expect(ctx); ctx->expect = EXPECT_FAIL; atf_dynstr_fini(&ctx->expect_reason); va_copy(ap2, ap); check_fatal_error(atf_dynstr_init_ap(&ctx->expect_reason, reason, ap2)); va_end(ap2); ctx->expect_previous_fail_count = ctx->expect_fail_count; } static void _atf_tc_expect_exit(struct context *ctx, const int exitcode, const char *reason, va_list ap) { va_list ap2; atf_dynstr_t formatted; validate_expect(ctx); ctx->expect = EXPECT_EXIT; va_copy(ap2, ap); check_fatal_error(atf_dynstr_init_ap(&formatted, reason, ap2)); va_end(ap2); create_resfile(ctx->resfile, "expected_exit", exitcode, &formatted); } static void _atf_tc_expect_signal(struct context *ctx, const int signo, const char *reason, va_list ap) { va_list ap2; atf_dynstr_t formatted; validate_expect(ctx); ctx->expect = EXPECT_SIGNAL; va_copy(ap2, ap); check_fatal_error(atf_dynstr_init_ap(&formatted, reason, ap2)); va_end(ap2); create_resfile(ctx->resfile, "expected_signal", signo, &formatted); } static void _atf_tc_expect_death(struct context *ctx, const char *reason, va_list ap) { va_list ap2; atf_dynstr_t formatted; validate_expect(ctx); ctx->expect = EXPECT_DEATH; va_copy(ap2, ap); check_fatal_error(atf_dynstr_init_ap(&formatted, reason, ap2)); va_end(ap2); create_resfile(ctx->resfile, "expected_death", -1, &formatted); } static void _atf_tc_expect_timeout(struct context *ctx, const char *reason, va_list ap) { va_list ap2; atf_dynstr_t formatted; validate_expect(ctx); ctx->expect = EXPECT_TIMEOUT; va_copy(ap2, ap); check_fatal_error(atf_dynstr_init_ap(&formatted, reason, ap2)); va_end(ap2); create_resfile(ctx->resfile, "expected_timeout", -1, &formatted); } /* --------------------------------------------------------------------- * Free functions. * --------------------------------------------------------------------- */ static struct context Current; atf_error_t atf_tc_run(const atf_tc_t *tc, const char *resfile) { context_init(&Current, tc, resfile); tc->pimpl->m_body(tc); validate_expect(&Current); if (Current.fail_count > 0) { atf_dynstr_t reason; format_reason_fmt(&reason, NULL, 0, "%d checks failed; see output for " "more details", Current.fail_count); fail_requirement(&Current, &reason); } else if (Current.expect_fail_count > 0) { atf_dynstr_t reason; format_reason_fmt(&reason, NULL, 0, "%d checks failed as expected; " "see output for more details", Current.expect_fail_count); expected_failure(&Current, &reason); } else { pass(&Current); } UNREACHABLE; return atf_no_error(); } atf_error_t atf_tc_cleanup(const atf_tc_t *tc) { if (tc->pimpl->m_cleanup != NULL) tc->pimpl->m_cleanup(tc); return atf_no_error(); /* XXX */ } /* --------------------------------------------------------------------- * Free functions that depend on Current. * --------------------------------------------------------------------- */ /* * All the functions below provide delegates to other internal functions * (prefixed by _) that take the current test case as an argument to * prevent them from accessing global state. This is to keep the side- * effects of the internal functions clearer and easier to understand. * * The public API should never have hid the fact that it needs access to * the current test case (other than maybe in the macros), but changing it * is hard. TODO: Revisit in the future. */ void atf_tc_fail(const char *fmt, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, fmt); _atf_tc_fail(&Current, fmt, ap); va_end(ap); } void atf_tc_fail_nonfatal(const char *fmt, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, fmt); _atf_tc_fail_nonfatal(&Current, fmt, ap); va_end(ap); } void atf_tc_fail_check(const char *file, const size_t line, const char *fmt, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, fmt); _atf_tc_fail_check(&Current, file, line, fmt, ap); va_end(ap); } void atf_tc_fail_requirement(const char *file, const size_t line, const char *fmt, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, fmt); _atf_tc_fail_requirement(&Current, file, line, fmt, ap); va_end(ap); } void atf_tc_pass(void) { PRE(Current.tc != NULL); _atf_tc_pass(&Current); } void atf_tc_require_prog(const char *prog) { PRE(Current.tc != NULL); _atf_tc_require_prog(&Current, prog); } void atf_tc_skip(const char *fmt, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, fmt); _atf_tc_skip(&Current, fmt, ap); va_end(ap); } void atf_tc_check_errno(const char *file, const size_t line, const int exp_errno, const char *expr_str, const bool expr_result) { PRE(Current.tc != NULL); _atf_tc_check_errno(&Current, file, line, exp_errno, expr_str, expr_result); } void atf_tc_require_errno(const char *file, const size_t line, const int exp_errno, const char *expr_str, const bool expr_result) { PRE(Current.tc != NULL); _atf_tc_require_errno(&Current, file, line, exp_errno, expr_str, expr_result); } void atf_tc_expect_pass(void) { PRE(Current.tc != NULL); _atf_tc_expect_pass(&Current); } void atf_tc_expect_fail(const char *reason, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, reason); _atf_tc_expect_fail(&Current, reason, ap); va_end(ap); } void atf_tc_expect_exit(const int exitcode, const char *reason, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, reason); _atf_tc_expect_exit(&Current, exitcode, reason, ap); va_end(ap); } void atf_tc_expect_signal(const int signo, const char *reason, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, reason); _atf_tc_expect_signal(&Current, signo, reason, ap); va_end(ap); } void atf_tc_expect_death(const char *reason, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, reason); _atf_tc_expect_death(&Current, reason, ap); va_end(ap); } void atf_tc_expect_timeout(const char *reason, ...) { va_list ap; PRE(Current.tc != NULL); va_start(ap, reason); _atf_tc_expect_timeout(&Current, reason, ap); va_end(ap); }