# 1 "" # 1 "common.c" /* $NetBSD: common.c,v 1.7 2017/06/11 19:34:43 joerg Exp $ */ /*- * Copyright (c) 2009, 2017 Joerg Sonnenberger . * 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDERS 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 #endif /* expanded by -frewrite-includes */ # 32 "common.c" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 1 /* $NetBSD: nbcompat.h,v 1.43 2009/04/13 11:30:46 joerg Exp $ */ /*- * Copyright (c) 2003 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 #endif /* expanded by -frewrite-includes */ # 29 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" 1 /* nbcompat/config.h. Generated from config.h.in by configure. */ /* nbcompat/config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define to 1 if the `pread' function is broken. */ /* #undef BROKEN_PREAD */ /* Define to 1 if the `pwrite' function is broken. */ /* #undef BROKEN_PWRITE */ /* Define to 1 if the `getpgrp' function requires zero arguments. */ #ifndef GETPGRP_VOID #define GETPGRP_VOID 1 #endif # 17 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_ASSERT_H #define HAVE_ASSERT_H 1 #endif # 25 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_BSD_LIBUTIL_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_CTYPE_H #define HAVE_CTYPE_H 1 #endif # 33 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `asprintf(char **, const char *, ...)', and to 0 if you don't. */ #ifndef HAVE_DECL_ASPRINTF #define HAVE_DECL_ASPRINTF 1 #endif # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `endgrent', and to 0 if you don't. */ #ifndef HAVE_DECL_ENDGRENT #define HAVE_DECL_ENDGRENT 0 #endif # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `endpwent', and to 0 if you don't. */ #ifndef HAVE_DECL_ENDPWENT #define HAVE_DECL_ENDPWENT 0 #endif # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `isblank(int)', and to 0 if you don't. */ #ifndef HAVE_DECL_ISBLANK #define HAVE_DECL_ISBLANK 1 #endif # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */ #ifndef HAVE_DECL_OPTARG #define HAVE_DECL_OPTARG 1 #endif # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `optind', and to 0 if you don't. */ #ifndef HAVE_DECL_OPTIND #define HAVE_DECL_OPTIND 1 #endif # 69 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `optreset', and to 0 if you don't. */ #ifndef HAVE_DECL_OPTRESET #define HAVE_DECL_OPTRESET 1 #endif # 75 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `setpassent', and to 0 if you don't. */ #ifndef HAVE_DECL_SETPASSENT #define HAVE_DECL_SETPASSENT 0 #endif # 81 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `snprintf(char *, size_t, const char *, ...)', and to 0 if you don't. */ #ifndef HAVE_DECL_SNPRINTF #define HAVE_DECL_SNPRINTF 1 #endif # 87 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `strdup(const char *)', and to 0 if you don't. */ #ifndef HAVE_DECL_STRDUP #define HAVE_DECL_STRDUP 1 #endif # 93 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #ifndef HAVE_DECL_STRERROR_R #define HAVE_DECL_STRERROR_R 1 #endif # 99 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_DIRENT_H #define HAVE_DIRENT_H 1 #endif # 104 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define if dirfd is either a function or a macro. */ #ifndef HAVE_DIRFD #define HAVE_DIRFD 1 #endif # 109 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `dd_fd' is a member of `DIR'. */ #ifndef HAVE_DIR_DD_FD #define HAVE_DIR_DD_FD 1 #endif # 114 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_ENDIAN_H */ /* Define to 1 if you have the `err' function. */ #ifndef HAVE_ERR #define HAVE_ERR 1 #endif # 122 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_ERRNO_H #define HAVE_ERRNO_H 1 #endif # 127 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_ERR_H #define HAVE_ERR_H 1 #endif # 132 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_FCNTL_H #define HAVE_FCNTL_H 1 #endif # 137 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `fgetln' function. */ #ifndef HAVE_FGETLN #define HAVE_FGETLN 1 #endif # 142 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `fnmatch' function. */ #ifndef HAVE_FNMATCH #define HAVE_FNMATCH 1 #endif # 147 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_FNMATCH_H #define HAVE_FNMATCH_H 1 #endif # 152 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `fork' function. */ #ifndef HAVE_FORK #define HAVE_FORK 1 #endif # 157 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `fparseln' function. */ #ifndef HAVE_FPARSELN #define HAVE_FPARSELN 1 #endif # 162 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `fsid_t'. */ #ifndef HAVE_FSID_T #define HAVE_FSID_T 1 #endif # 167 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_FTS_H #define HAVE_FTS_H 1 #endif # 172 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `gai_strerror' function. */ #ifndef HAVE_GAI_STRERROR #define HAVE_GAI_STRERROR 1 #endif # 177 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getaddrinfo' function. */ #ifndef HAVE_GETADDRINFO #define HAVE_GETADDRINFO 1 #endif # 182 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getdelim' function. */ #ifndef HAVE_GETDELIM #define HAVE_GETDELIM 1 #endif # 187 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getenv' function. */ #ifndef HAVE_GETENV #define HAVE_GETENV 1 #endif # 192 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getline' function. */ #ifndef HAVE_GETLINE #define HAVE_GETLINE 1 #endif # 197 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getmode' function. */ #ifndef HAVE_GETMODE #define HAVE_GETMODE 1 #endif # 202 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getnameinfo' function. */ #ifndef HAVE_GETNAMEINFO #define HAVE_GETNAMEINFO 1 #endif # 207 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_GETOPT_H #define HAVE_GETOPT_H 1 #endif # 212 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `getpassphrase' function. */ /* #undef HAVE_GETPASSPHRASE */ /* Define to 1 if you have the `getpgrp' function. */ #ifndef HAVE_GETPGRP #define HAVE_GETPGRP 1 #endif # 220 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `gid_from_group' function. */ #ifndef HAVE_GID_FROM_GROUP #define HAVE_GID_FROM_GROUP 1 #endif # 225 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_GLOB_H #define HAVE_GLOB_H 1 #endif # 230 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `group_from_gid' function. */ #ifndef HAVE_GROUP_FROM_GID #define HAVE_GROUP_FROM_GID 1 #endif # 235 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_GRP_H #define HAVE_GRP_H 1 #endif # 240 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_INTTYPES_H #define HAVE_INTTYPES_H 1 #endif # 245 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `issetugid' function. */ #ifndef HAVE_ISSETUGID #define HAVE_ISSETUGID 1 #endif # 250 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `lchflags' function. */ #ifndef HAVE_LCHFLAGS #define HAVE_LCHFLAGS 1 #endif # 255 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `lchmod' function. */ #ifndef HAVE_LCHMOD #define HAVE_LCHMOD 1 #endif # 260 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `lchown' function. */ #ifndef HAVE_LCHOWN #define HAVE_LCHOWN 1 #endif # 265 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #undef HAVE_LIBNSL */ /* Define to 1 if you have the `util' library (-lutil). */ #ifndef HAVE_LIBUTIL #define HAVE_LIBUTIL 1 #endif # 273 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBUTIL_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_LIMITS_H #define HAVE_LIMITS_H 1 #endif # 281 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `long double'. */ #ifndef HAVE_LONG_DOUBLE #define HAVE_LONG_DOUBLE 1 #endif # 286 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `long long'. */ #ifndef HAVE_LONG_LONG #define HAVE_LONG_LONG 1 #endif # 291 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `lutimes' function. */ #ifndef HAVE_LUTIMES #define HAVE_LUTIMES 1 #endif # 296 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_MACHINE_ENDIAN_H #define HAVE_MACHINE_ENDIAN_H 1 #endif # 301 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_MD5_H #define HAVE_MD5_H 1 #endif # 306 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_MEMORY_H #define HAVE_MEMORY_H 1 #endif # 311 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `mkdtemp' function. */ #ifndef HAVE_MKDTEMP #define HAVE_MKDTEMP 1 #endif # 316 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `mkstemp' function. */ #ifndef HAVE_MKSTEMP #define HAVE_MKSTEMP 1 #endif # 321 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the `fts_*' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_FTS */ /* Define to 1 if the `glob' function is built into the library. */ #ifndef HAVE_NBCOMPAT_GLOB #define HAVE_NBCOMPAT_GLOB 1 #endif # 329 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the `MD5*' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_MD5 */ /* Define to 1 if the `MD5Init' function is built into the library. */ /* #undef HAVE_NBCOMPAT_MD5INIT */ /* Define to 1 if the `poll' function is built into the library. */ /* #undef HAVE_NBCOMPAT_POLL */ /* Define to 1 if the `queue' macros are supplied by the library. */ #ifndef HAVE_NBCOMPAT_QUEUE #define HAVE_NBCOMPAT_QUEUE 1 #endif # 343 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the `regex' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_REGEX */ /* Define to 1 if the `RMD160*' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_RMD160 */ /* Define to 1 if the `SHA1*' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_SHA1 */ /* Define to 1 if the `SHA2*' functions are built into the library. */ /* #undef HAVE_NBCOMPAT_SHA2 */ /* Define to 1 if the `vis' function is built into the library. */ /* #undef HAVE_NBCOMPAT_VIS */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NDIR_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_NETDB_H #define HAVE_NETDB_H 1 #endif # 366 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_PATHS_H #define HAVE_PATHS_H 1 #endif # 371 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_POLL_H #define HAVE_POLL_H 1 #endif # 376 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses %lld). */ /* #undef HAVE_PRINTF_QD */ /* Define to 1 if you have the `pwcache_groupdb' function. */ #ifndef HAVE_PWCACHE_GROUPDB #define HAVE_PWCACHE_GROUPDB 1 #endif # 385 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `pwcache_userdb' function. */ #ifndef HAVE_PWCACHE_USERDB #define HAVE_PWCACHE_USERDB 1 #endif # 390 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_PWD_H #define HAVE_PWD_H 1 #endif # 395 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_REGEX_H #define HAVE_REGEX_H 1 #endif # 400 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_RMD160_H #define HAVE_RMD160_H 1 #endif # 405 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `select' function. */ #ifndef HAVE_SELECT #define HAVE_SELECT 1 #endif # 410 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setenv' function. */ #ifndef HAVE_SETENV #define HAVE_SETENV 1 #endif # 415 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setgroupent' function. */ #ifndef HAVE_SETGROUPENT #define HAVE_SETGROUPENT 1 #endif # 420 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setlocale' function. */ #ifndef HAVE_SETLOCALE #define HAVE_SETLOCALE 1 #endif # 425 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setmode' function. */ #ifndef HAVE_SETMODE #define HAVE_SETMODE 1 #endif # 430 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setpassent' function. */ #ifndef HAVE_SETPASSENT #define HAVE_SETPASSENT 1 #endif # 435 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `setprogname' function. */ #ifndef HAVE_SETPROGNAME #define HAVE_SETPROGNAME 1 #endif # 440 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SHA1_H #define HAVE_SHA1_H 1 #endif # 445 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SHA2_H #define HAVE_SHA2_H 1 #endif # 450 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `shquote' function. */ #ifndef HAVE_SHQUOTE #define HAVE_SHQUOTE 1 #endif # 455 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SIGNAL_H #define HAVE_SIGNAL_H 1 #endif # 460 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `socklen_t'. */ #ifndef HAVE_SOCKLEN_T #define HAVE_SOCKLEN_T 1 #endif # 465 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `statvfs' function. */ #ifndef HAVE_STATVFS #define HAVE_STATVFS 1 #endif # 470 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STDARG_H #define HAVE_STDARG_H 1 #endif # 475 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if stdbool.h conforms to C99. */ #ifndef HAVE_STDBOOL_H #define HAVE_STDBOOL_H 1 #endif # 480 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STDDEF_H #define HAVE_STDDEF_H 1 #endif # 485 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STDINT_H #define HAVE_STDINT_H 1 #endif # 490 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STDIO_H #define HAVE_STDIO_H 1 #endif # 495 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STDLIB_H #define HAVE_STDLIB_H 1 #endif # 500 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strerror' function. */ #ifndef HAVE_STRERROR #define HAVE_STRERROR 1 #endif # 505 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strerror_r' function. */ #ifndef HAVE_STRERROR_R #define HAVE_STRERROR_R 1 #endif # 510 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STRINGS_H #define HAVE_STRINGS_H 1 #endif # 515 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_STRING_H #define HAVE_STRING_H 1 #endif # 520 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strlcat' function. */ #ifndef HAVE_STRLCAT #define HAVE_STRLCAT 1 #endif # 525 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strlcpy' function. */ #ifndef HAVE_STRLCPY #define HAVE_STRLCPY 1 #endif # 530 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strmode' function. */ #ifndef HAVE_STRMODE #define HAVE_STRMODE 1 #endif # 535 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strsep' function. */ #ifndef HAVE_STRSEP #define HAVE_STRSEP 1 #endif # 540 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strsvis' function. */ #ifndef HAVE_STRSVIS #define HAVE_STRSVIS 1 #endif # 545 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strtoll' function. */ #ifndef HAVE_STRTOLL #define HAVE_STRTOLL 1 #endif # 550 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `struct addrinfo'. */ #ifndef HAVE_STRUCT_ADDRINFO #define HAVE_STRUCT_ADDRINFO 1 #endif # 555 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `d_namlen' is a member of `struct dirent'. */ #ifndef HAVE_STRUCT_DIRENT_D_NAMLEN #define HAVE_STRUCT_DIRENT_D_NAMLEN 1 #endif # 560 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `struct in6_addr'. */ #ifndef HAVE_STRUCT_IN6_ADDR #define HAVE_STRUCT_IN6_ADDR 1 #endif # 565 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `struct option'. */ #ifndef HAVE_STRUCT_OPTION #define HAVE_STRUCT_OPTION 1 #endif # 570 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `struct sockaddr_in6'. */ #ifndef HAVE_STRUCT_SOCKADDR_IN6 #define HAVE_STRUCT_SOCKADDR_IN6 1 #endif # 575 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #ifndef HAVE_STRUCT_SOCKADDR_STORAGE #define HAVE_STRUCT_SOCKADDR_STORAGE 1 #endif # 580 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `f_flags' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_FLAGS */ /* Define to 1 if `f_fsize' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_FSIZE */ /* Define to 1 if `f_iosize' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_IOSIZE */ /* Define to 1 if you have the `strunvis' function. */ #ifndef HAVE_STRUNVIS #define HAVE_STRUNVIS 1 #endif # 594 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `strvis' function. */ #ifndef HAVE_STRVIS #define HAVE_STRVIS 1 #endif # 599 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `svis' function. */ #ifndef HAVE_SVIS #define HAVE_SVIS 1 #endif # 604 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYSEXITS_H #define HAVE_SYSEXITS_H 1 #endif # 609 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_CDEFS_H #define HAVE_SYS_CDEFS_H 1 #endif # 617 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_DIR_H #define HAVE_SYS_DIR_H 1 #endif # 622 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_ENDIAN_H #define HAVE_SYS_ENDIAN_H 1 #endif # 627 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_FILE_H #define HAVE_SYS_FILE_H 1 #endif # 632 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MKDEV_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_MMAN_H #define HAVE_SYS_MMAN_H 1 #endif # 640 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_MOUNT_H #define HAVE_SYS_MOUNT_H 1 #endif # 645 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_PARAM_H #define HAVE_SYS_PARAM_H 1 #endif # 653 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_POLL_H #define HAVE_SYS_POLL_H 1 #endif # 658 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_QUEUE_H #define HAVE_SYS_QUEUE_H 1 #endif # 663 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_SOCKET_H #define HAVE_SYS_SOCKET_H 1 #endif # 668 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_STATFS_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_STATVFS_H #define HAVE_SYS_STATVFS_H 1 #endif # 676 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_STAT_H #define HAVE_SYS_STAT_H 1 #endif # 681 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_TIME_H #define HAVE_SYS_TIME_H 1 #endif # 686 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_TTYCOM_H #define HAVE_SYS_TTYCOM_H 1 #endif # 691 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_TYPES_H #define HAVE_SYS_TYPES_H 1 #endif # 696 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_SYS_UIO_H #define HAVE_SYS_UIO_H 1 #endif # 701 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_VFS_H */ /* Define to 1 if you have the header file. */ #ifndef HAVE_TERMCAP_H #define HAVE_TERMCAP_H 1 #endif # 709 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_TIME_H #define HAVE_TIME_H 1 #endif # 714 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_TZFILE_H #define HAVE_TZFILE_H 1 #endif # 719 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `uid_from_user' function. */ #ifndef HAVE_UID_FROM_USER #define HAVE_UID_FROM_USER 1 #endif # 724 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `uintptr_t'. */ #ifndef HAVE_UINTPTR_T #define HAVE_UINTPTR_T 1 #endif # 729 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_UNISTD_H #define HAVE_UNISTD_H 1 #endif # 734 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `unsetenv' function. */ #ifndef HAVE_UNSETENV #define HAVE_UNSETENV 1 #endif # 739 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `unvis' function. */ #ifndef HAVE_UNVIS #define HAVE_UNVIS 1 #endif # 744 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `user_from_uid' function. */ #ifndef HAVE_USER_FROM_UID #define HAVE_USER_FROM_UID 1 #endif # 749 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `usleep' function. */ #ifndef HAVE_USLEEP #define HAVE_USLEEP 1 #endif # 754 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_UTIL_H #define HAVE_UTIL_H 1 #endif # 759 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `utimes' function. */ #ifndef HAVE_UTIMES #define HAVE_UTIMES 1 #endif # 764 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_UTIME_H #define HAVE_UTIME_H 1 #endif # 769 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the `va_copy' function is supported. */ #ifndef HAVE_VA_COPY #define HAVE_VA_COPY 1 #endif # 774 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `vfork' function. */ #ifndef HAVE_VFORK #define HAVE_VFORK 1 #endif # 779 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vis' function. */ #ifndef HAVE_VIS #define HAVE_VIS 1 #endif # 787 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the header file. */ #ifndef HAVE_VIS_H #define HAVE_VIS_H 1 #endif # 792 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the `warn' function. */ #ifndef HAVE_WARN #define HAVE_WARN 1 #endif # 797 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `fork' works. */ #ifndef HAVE_WORKING_FORK #define HAVE_WORKING_FORK 1 #endif # 802 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */ #ifndef HAVE_WORKING_LONG_LONG #define HAVE_WORKING_LONG_LONG 1 #endif # 807 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if `vfork' works. */ #ifndef HAVE_WORKING_VFORK #define HAVE_WORKING_VFORK 1 #endif # 812 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the system has the type `_Bool'. */ #ifndef HAVE__BOOL #define HAVE__BOOL 1 #endif # 817 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* define if your compiler has __attribute__ */ #ifndef HAVE___ATTRIBUTE__ #define HAVE___ATTRIBUTE__ 1 #endif # 822 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if the `__builtin_va_copy' function is supported. */ #ifndef HAVE___BUILTIN_VA_COPY #define HAVE___BUILTIN_VA_COPY 1 #endif # 827 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to the address where bug reports for this package should be sent. */ /* #define PACKAGE_BUGREPORT "joerg@NetBSD.org" */ /* Define to the full name of this package. */ /* #define PACKAGE_NAME "libnbcompat" */ /* Define to the full name and version of this package. */ /* #define PACKAGE_STRING "libnbcompat 20150419" */ /* Define to the one symbol short name of this package. */ /* #define PACKAGE_TARNAME "libnbcompat" */ /* Define to the home page for this package. */ /* #define PACKAGE_URL "" */ /* Define to the version of this package. */ /* #define PACKAGE_VERSION "20150419" */ /* The size of `off_t', as computed by sizeof. */ #ifndef SIZEOF_OFF_T #define SIZEOF_OFF_T 8 #endif # 850 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if you have the ANSI C header files. */ #ifndef STDC_HEADERS #define STDC_HEADERS 1 #endif # 855 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ /* Define to 1 if you can safely include both and . */ #ifndef TIME_WITH_SYS_TIME #define TIME_WITH_SYS_TIME 1 #endif # 863 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif # 869 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 870 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif # 875 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 876 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif # 881 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 882 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif # 887 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 888 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif # 893 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 894 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ #ifndef WORDS_BIGENDIAN # define WORDS_BIGENDIAN 1 #endif # 903 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" # endif # 904 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #else # 905 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif # 908 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" #endif # 909 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT32_T */ /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT64_T */ /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT8_T */ /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef int16_t */ /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef int32_t */ /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef int64_t */ /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef int8_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef uint16_t */ /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef uint32_t */ /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef uint64_t */ /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef uint8_t */ /* Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ /* #undef uintptr_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ /* NBCOMPAT template section follows. */ #ifndef HAVE___ATTRIBUTE__ # define __attribute__(x) #endif # 986 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/nbconfig.h" # 30 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" 1 /* $NetBSD: cdefs.h,v 1.3 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_SYS_CDEFS_H_ #define _NBCOMPAT_SYS_CDEFS_H_ #if HAVE_SYS_CDEFS_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # 1 "/usr/include/sys/cdefs.h" 1 3 4 /* $NetBSD: cdefs.h,v 1.133 2017/07/15 13:46:02 christos Exp $ */ /* * 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 */ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ #ifdef _KERNEL_OPT #if 0 /* expanded by -frewrite-includes */ #include "opt_diagnostic.h" #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/cdefs.h" 3 4 # 41 "/usr/include/sys/cdefs.h" 3 4 #endif # 42 "/usr/include/sys/cdefs.h" 3 4 /* * Macro to test if we're using a GNU C compiler of a specific vintage * or later, for e.g. features that appeared in a particular version * of GNU C. Usage: * * #if __GNUC_PREREQ__(major, minor) * ...cool feature... * #else * ...delete feature... * #endif */ #ifdef __GNUC__ #define __GNUC_PREREQ__(x, y) \ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else # 59 "/usr/include/sys/cdefs.h" 3 4 #define __GNUC_PREREQ__(x, y) 0 #endif # 61 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 62 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/machine/cdefs.h" 1 3 4 /* $NetBSD: cdefs.h,v 1.3 2012/01/20 14:08:05 joerg Exp $ */ #ifndef _X86_64_CDEFS_H_ #define _X86_64_CDEFS_H_ #define __ALIGNBYTES (sizeof(long) - 1) #endif /* !_X86_64_CDEFS_H_ */ # 9 "/usr/include/machine/cdefs.h" 3 4 # 63 "/usr/include/sys/cdefs.h" 2 3 4 #ifdef __ELF__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 64 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/sys/cdefs_elf.h" 1 3 4 /* $NetBSD: cdefs_elf.h,v 1.53 2017/08/10 19:03:27 joerg Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #ifndef _SYS_CDEFS_ELF_H_ #define _SYS_CDEFS_ELF_H_ #ifdef __LEADING_UNDERSCORE #define _C_LABEL(x) __CONCAT(_,x) #define _C_LABEL_STRING(x) "_"x #else # 37 "/usr/include/sys/cdefs_elf.h" 3 4 #define _C_LABEL(x) x #define _C_LABEL_STRING(x) x #endif # 40 "/usr/include/sys/cdefs_elf.h" 3 4 #if __STDC__ #define ___RENAME(x) __asm(___STRING(_C_LABEL(x))) #else # 44 "/usr/include/sys/cdefs_elf.h" 3 4 #ifdef __LEADING_UNDERSCORE #define ___RENAME(x) ____RENAME(_/**/x) #define ____RENAME(x) __asm(___STRING(x)) #else # 48 "/usr/include/sys/cdefs_elf.h" 3 4 #define ___RENAME(x) __asm(___STRING(x)) #endif # 50 "/usr/include/sys/cdefs_elf.h" 3 4 #endif # 51 "/usr/include/sys/cdefs_elf.h" 3 4 #define __indr_reference(sym,alias) /* nada, since we do weak refs */ #if __STDC__ #define __strong_alias(alias,sym) \ __asm(".global " _C_LABEL_STRING(#alias) "\n" \ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym)); #define __weak_alias(alias,sym) \ __asm(".weak " _C_LABEL_STRING(#alias) "\n" \ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym)); /* Do not use __weak_extern, use __weak_reference instead */ #define __weak_extern(sym) \ __asm(".weak " _C_LABEL_STRING(#sym)); #if __GNUC_PREREQ__(4, 0) #define __weak __attribute__((__weak__)) #else # 70 "/usr/include/sys/cdefs_elf.h" 3 4 #define __weak #endif # 72 "/usr/include/sys/cdefs_elf.h" 3 4 #if __GNUC_PREREQ__(4, 0) #define __weak_reference(sym) __attribute__((__weakref__(#sym))) #else # 76 "/usr/include/sys/cdefs_elf.h" 3 4 #define __weak_reference(sym) ; __asm(".weak " _C_LABEL_STRING(#sym)) #endif # 78 "/usr/include/sys/cdefs_elf.h" 3 4 #if __GNUC_PREREQ__(4, 2) #define __weakref_visible static #else # 82 "/usr/include/sys/cdefs_elf.h" 3 4 #define __weakref_visible extern #endif # 84 "/usr/include/sys/cdefs_elf.h" 3 4 #define __warn_references(sym,msg) \ __asm(".pushsection .gnu.warning." #sym "\n" \ ".ascii \"" msg "\"\n" \ ".popsection"); #else /* !__STDC__ */ # 91 "/usr/include/sys/cdefs_elf.h" 3 4 #ifdef __LEADING_UNDERSCORE #define __weak_alias(alias,sym) ___weak_alias(_/**/alias,_/**/sym) #define ___weak_alias(alias,sym) \ __asm(".weak alias\nalias = sym"); #else # 97 "/usr/include/sys/cdefs_elf.h" 3 4 #define __weak_alias(alias,sym) \ __asm(".weak alias\nalias = sym"); #endif # 100 "/usr/include/sys/cdefs_elf.h" 3 4 #ifdef __LEADING_UNDERSCORE #define __weak_extern(sym) ___weak_extern(_/**/sym) #define ___weak_extern(sym) \ __asm(".weak sym"); #else # 105 "/usr/include/sys/cdefs_elf.h" 3 4 #define __weak_extern(sym) \ __asm(".weak sym"); #endif # 108 "/usr/include/sys/cdefs_elf.h" 3 4 #define __warn_references(sym,msg) \ __asm(".pushsection .gnu.warning.sym\n" \ ".ascii \"" msg "\"\n" \ ".popsection"); #endif /* !__STDC__ */ # 114 "/usr/include/sys/cdefs_elf.h" 3 4 #if __arm__ #define __ifunc(name, resolver) \ __asm(".globl " _C_LABEL_STRING(#name) "\n" \ ".type " _C_LABEL_STRING(#name) ", %gnu_indirect_function\n" \ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #define __hidden_ifunc(name, resolver) \ __asm(".globl " _C_LABEL_STRING(#name) "\n" \ ".hidden " _C_LABEL_STRING(#name) "\n" \ ".type " _C_LABEL_STRING(#name) ", %gnu_indirect_function\n" \ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #else # 126 "/usr/include/sys/cdefs_elf.h" 3 4 #define __ifunc(name, resolver) \ __asm(".globl " _C_LABEL_STRING(#name) "\n" \ ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #define __hidden_ifunc(name, resolver) \ __asm(".globl " _C_LABEL_STRING(#name) "\n" \ ".hidden " _C_LABEL_STRING(#name) "\n" \ ".type " _C_LABEL_STRING(#name) ", @gnu_indirect_function\n" \ _C_LABEL_STRING(#name) " = " _C_LABEL_STRING(#resolver)) #endif # 136 "/usr/include/sys/cdefs_elf.h" 3 4 #if __STDC__ #define __SECTIONSTRING(_sec, _str) \ __asm(".pushsection " #_sec "\n" \ ".asciz \"" _str "\"\n" \ ".popsection") #else # 143 "/usr/include/sys/cdefs_elf.h" 3 4 #define __SECTIONSTRING(_sec, _str) \ __asm(".pushsection _sec\n" \ ".asciz \"" _str "\"\n" \ ".popsection") #endif # 148 "/usr/include/sys/cdefs_elf.h" 3 4 #define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s) #define __RCSID(_s) __IDSTRING(rcsid,_s) #define __SCCSID(_s) #define __SCCSID2(_s) #define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s) #define __KERNEL_RCSID(_n, _s) __RCSID(_s) #define __KERNEL_SCCSID(_n, _s) #define __KERNEL_COPYRIGHT(_n, _s) __COPYRIGHT(_s) #ifndef __lint__ #define __link_set_make_entry(set, sym) \ static void const * const __link_set_##set##_sym_##sym \ __section("link_set_" #set) __used = (const void *)&sym #define __link_set_make_entry2(set, sym, n) \ static void const * const __link_set_##set##_sym_##sym##_##n \ __section("link_set_" #set) __used = (const void *)&sym[n] #else # 168 "/usr/include/sys/cdefs_elf.h" 3 4 #define __link_set_make_entry(set, sym) \ extern void const * const __link_set_##set##_sym_##sym #define __link_set_make_entry2(set, sym, n) \ extern void const * const __link_set_##set##_sym_##sym##_##n #endif /* __lint__ */ # 173 "/usr/include/sys/cdefs_elf.h" 3 4 #define __link_set_add_text(set, sym) __link_set_make_entry(set, sym) #define __link_set_add_rodata(set, sym) __link_set_make_entry(set, sym) #define __link_set_add_data(set, sym) __link_set_make_entry(set, sym) #define __link_set_add_bss(set, sym) __link_set_make_entry(set, sym) #define __link_set_add_text2(set, sym, n) __link_set_make_entry2(set, sym, n) #define __link_set_add_rodata2(set, sym, n) __link_set_make_entry2(set, sym, n) #define __link_set_add_data2(set, sym, n) __link_set_make_entry2(set, sym, n) #define __link_set_add_bss2(set, sym, n) __link_set_make_entry2(set, sym, n) #define __link_set_start(set) (__start_link_set_##set) #define __link_set_end(set) (__stop_link_set_##set) #define __link_set_decl(set, ptype) \ extern ptype * const __link_set_start(set)[] __dso_hidden; \ __asm__(".hidden " __STRING(__stop_link_set_##set)); \ extern ptype * const __link_set_end(set)[] __weak __dso_hidden #define __link_set_count(set) \ (__link_set_end(set) - __link_set_start(set)) #ifdef _KERNEL /* * On multiprocessor systems we can gain an improvement in performance * by being mindful of which cachelines data is placed in. * * __read_mostly: * * It makes sense to ensure that rarely modified data is not * placed in the same cacheline as frequently modified data. * To mitigate the phenomenon known as "false-sharing" we * can annotate rarely modified variables with __read_mostly. * All such variables are placed into the .data.read_mostly * section in the kernel ELF. * * Prime candidates for __read_mostly annotation are variables * which are hardly ever modified and which are used in code * hot-paths, e.g. pmap_initialized. * * __cacheline_aligned: * * Some data structures (mainly locks) benefit from being aligned * on a cacheline boundary, and having a cacheline to themselves. * This way, the modification of other data items cannot adversely * affect the lock and vice versa. * * Any variables annotated with __cacheline_aligned will be * placed into the .data.cacheline_aligned ELF section. */ #define __read_mostly \ __attribute__((__section__(".data.read_mostly"))) #define __cacheline_aligned \ __attribute__((__aligned__(COHERENCY_UNIT), \ __section__(".data.cacheline_aligned"))) #endif /* _KERNEL */ # 232 "/usr/include/sys/cdefs_elf.h" 3 4 #endif /* !_SYS_CDEFS_ELF_H_ */ # 234 "/usr/include/sys/cdefs_elf.h" 3 4 # 65 "/usr/include/sys/cdefs.h" 2 3 4 #else # 66 "/usr/include/sys/cdefs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 66 "/usr/include/sys/cdefs.h" 3 4 # 67 "/usr/include/sys/cdefs.h" 3 4 #endif # 68 "/usr/include/sys/cdefs.h" 3 4 #ifdef __GNUC__ #define __strict_weak_alias(alias,sym) \ __unused static __typeof__(alias) *__weak_alias_##alias = &sym; \ __weak_alias(alias,sym) #else # 74 "/usr/include/sys/cdefs.h" 3 4 #define __strict_weak_alias(alias,sym) __weak_alias(alias,sym) #endif # 76 "/usr/include/sys/cdefs.h" 3 4 /* * Optional marker for size-optimised MD calling convention. */ #ifndef __compactcall #define __compactcall #endif # 83 "/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 -- make sure you don't put spaces * in between its arguments. __CONCAT can also concatenate double-quoted * strings produced by the __STRING macro, but this only works with ANSI C. */ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) #if __STDC__ || defined(__cplusplus) #define __P(protos) protos /* full-blown ANSI C */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __const const /* define reserved names to standard */ #define __signed signed #define __volatile volatile #if defined(__cplusplus) || defined(__PCC__) #define __inline inline /* convert to C++/C99 keyword */ #else # 106 "/usr/include/sys/cdefs.h" 3 4 #if !defined(__GNUC__) && !defined(__lint__) #define __inline /* delete GCC keyword */ #endif /* !__GNUC__ && !__lint__ */ # 109 "/usr/include/sys/cdefs.h" 3 4 #endif /* !__cplusplus */ # 110 "/usr/include/sys/cdefs.h" 3 4 #else /* !(__STDC__ || __cplusplus) */ # 112 "/usr/include/sys/cdefs.h" 3 4 #define __P(protos) () /* traditional C preprocessor */ #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" #ifndef __GNUC__ #define __const /* delete pseudo-ANSI C keywords */ #define __inline #define __signed #define __volatile #endif /* !__GNUC__ */ # 122 "/usr/include/sys/cdefs.h" 3 4 /* * 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. * Programs using the ANSI C keywords const, inline etc. as normal * identifiers should define -DNO_ANSI_KEYWORDS. */ #ifndef NO_ANSI_KEYWORDS #define const __const /* convert ANSI C keywords */ #define inline __inline #define signed __signed #define volatile __volatile #endif /* !NO_ANSI_KEYWORDS */ # 135 "/usr/include/sys/cdefs.h" 3 4 #endif /* !(__STDC__ || __cplusplus) */ # 136 "/usr/include/sys/cdefs.h" 3 4 /* * Used for internal auditing of the NetBSD source tree. */ #ifdef __AUDIT__ #define __aconst __const #else # 143 "/usr/include/sys/cdefs.h" 3 4 #define __aconst #endif # 145 "/usr/include/sys/cdefs.h" 3 4 /* * Compile Time Assertion. */ #ifdef __COUNTER__ #define __CTASSERT(x) __CTASSERT0(x, __ctassert, __COUNTER__) #else # 152 "/usr/include/sys/cdefs.h" 3 4 #define __CTASSERT(x) __CTASSERT99(x, __INCLUDE_LEVEL__, __LINE__) #define __CTASSERT99(x, a, b) __CTASSERT0(x, __CONCAT(__ctassert,a), \ __CONCAT(_,b)) #endif # 156 "/usr/include/sys/cdefs.h" 3 4 #define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) #define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1] __unused /* * The following macro is used to remove const cast-away warnings * from gcc -Wcast-qual; it should be used with caution because it * can hide valid errors; in particular most valid uses are in * situations where the API requires it, not to cast away string * constants. We don't use *intptr_t on purpose here and we are * explicit about unsigned long so that we don't have additional * dependencies. */ #define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) /* * The following macro is used to remove the volatile cast-away warnings * from gcc -Wcast-qual; as above it should be used with caution * because it can hide valid errors or warnings. Valid uses include * making it possible to pass a volatile pointer to memset(). * For the same reasons as above, we use unsigned long and not intptr_t. */ #define __UNVOLATILE(a) ((void *)(unsigned long)(volatile void *)(a)) /* * GCC2 provides __extension__ to suppress warnings for various GNU C * language extensions under "-ansi -pedantic". */ #if !__GNUC_PREREQ__(2, 0) #define __extension__ /* delete __extension__ if non-gcc or gcc1 */ #endif # 186 "/usr/include/sys/cdefs.h" 3 4 /* * GCC1 and some versions of GCC2 declare dead (non-returning) and * pure (no side effects) functions using "volatile" and "const"; * unfortunately, these then cause warnings under "-ansi -pedantic". * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of * these work for GNU C++ (modulo a slight glitch in the C++ grammar * in the distribution version of 2.5.5). * * GCC defines a pure function as depending only on its arguments and * global variables. Typical examples are strlen and sqrt. * * GCC defines a const function as depending only on its arguments. * Therefore calling a const function again with identical arguments * will always produce the same result. * * Rounding modes for floating point operations are considered global * variables and prevent sqrt from being a const function. * * Calls to const functions can be optimised away and moved around * without limitations. */ #if !__GNUC_PREREQ__(2, 0) && !defined(__lint__) #define __attribute__(x) #endif # 211 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(2, 5) #define __dead __attribute__((__noreturn__)) #elif defined(__GNUC__) # 215 "/usr/include/sys/cdefs.h" 3 4 #define __dead __volatile #else # 217 "/usr/include/sys/cdefs.h" 3 4 #define __dead #endif # 219 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(2, 96) #define __pure __attribute__((__pure__)) #elif defined(__GNUC__) # 223 "/usr/include/sys/cdefs.h" 3 4 #define __pure __const #else # 225 "/usr/include/sys/cdefs.h" 3 4 #define __pure #endif # 227 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(2, 5) #define __constfunc __attribute__((__const__)) #else # 231 "/usr/include/sys/cdefs.h" 3 4 #define __constfunc #endif # 233 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(3, 0) #define __noinline __attribute__((__noinline__)) #else # 237 "/usr/include/sys/cdefs.h" 3 4 #define __noinline /* nothing */ #endif # 239 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(3, 0) #define __always_inline __attribute__((__always_inline__)) #else # 243 "/usr/include/sys/cdefs.h" 3 4 #define __always_inline /* nothing */ #endif # 245 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(4, 1) #define __returns_twice __attribute__((__returns_twice__)) #else # 249 "/usr/include/sys/cdefs.h" 3 4 #define __returns_twice /* nothing */ #endif # 251 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(4, 5) #define __noclone __attribute__((__noclone__)) #else # 255 "/usr/include/sys/cdefs.h" 3 4 #define __noclone /* nothing */ #endif # 257 "/usr/include/sys/cdefs.h" 3 4 /* * __unused: Note that item or function might be unused. */ #if __GNUC_PREREQ__(2, 7) || defined(__lint__) #define __unused __attribute__((__unused__)) #else # 264 "/usr/include/sys/cdefs.h" 3 4 #define __unused /* delete */ #endif # 266 "/usr/include/sys/cdefs.h" 3 4 /* * __used: Note that item is needed, even if it appears to be unused. */ #if __GNUC_PREREQ__(3, 1) #define __used __attribute__((__used__)) #else # 273 "/usr/include/sys/cdefs.h" 3 4 #define __used __unused #endif # 275 "/usr/include/sys/cdefs.h" 3 4 /* * __diagused: Note that item is used in diagnostic code, but may be * unused in non-diagnostic code. */ #if (defined(_KERNEL) && defined(DIAGNOSTIC)) \ || (!defined(_KERNEL) && !defined(NDEBUG)) #define __diagused /* empty */ #else # 284 "/usr/include/sys/cdefs.h" 3 4 #define __diagused __unused #endif # 286 "/usr/include/sys/cdefs.h" 3 4 /* * __debugused: Note that item is used in debug code, but may be * unused in non-debug code. */ #if defined(DEBUG) #define __debugused /* empty */ #else # 294 "/usr/include/sys/cdefs.h" 3 4 #define __debugused __unused #endif # 296 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(3, 1) #define __noprofile __attribute__((__no_instrument_function__)) #else # 300 "/usr/include/sys/cdefs.h" 3 4 #define __noprofile /* nothing */ #endif # 302 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(4, 6) || defined(__clang__) #define __unreachable() __builtin_unreachable() #else # 306 "/usr/include/sys/cdefs.h" 3 4 #define __unreachable() do {} while (/*CONSTCOND*/0) #endif # 308 "/usr/include/sys/cdefs.h" 3 4 /* * To be used when an empty body is required like: * * #ifdef DEBUG * # define dprintf(a) printf(a) * #else * # define dprintf(a) __nothing * #endif * * We use ((void)0) instead of do {} while (0) so that it * works on , expressions. */ #define __nothing ((void)0) #if defined(__cplusplus) #define __BEGIN_EXTERN_C extern "C" { #define __END_EXTERN_C } #define __static_cast(x,y) static_cast(y) #else # 328 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_EXTERN_C #define __END_EXTERN_C #define __static_cast(x,y) (x)y #endif # 332 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(4, 0) # define __dso_public __attribute__((__visibility__("default"))) # define __dso_hidden __attribute__((__visibility__("hidden"))) # define __BEGIN_PUBLIC_DECLS \ _Pragma("GCC visibility push(default)") __BEGIN_EXTERN_C # define __END_PUBLIC_DECLS __END_EXTERN_C _Pragma("GCC visibility pop") # define __BEGIN_HIDDEN_DECLS \ _Pragma("GCC visibility push(hidden)") __BEGIN_EXTERN_C # define __END_HIDDEN_DECLS __END_EXTERN_C _Pragma("GCC visibility pop") #else # 343 "/usr/include/sys/cdefs.h" 3 4 # define __dso_public # define __dso_hidden # define __BEGIN_PUBLIC_DECLS __BEGIN_EXTERN_C # define __END_PUBLIC_DECLS __END_EXTERN_C # define __BEGIN_HIDDEN_DECLS __BEGIN_EXTERN_C # define __END_HIDDEN_DECLS __END_EXTERN_C #endif # 350 "/usr/include/sys/cdefs.h" 3 4 #if __GNUC_PREREQ__(4, 2) # define __dso_protected __attribute__((__visibility__("protected"))) #else # 353 "/usr/include/sys/cdefs.h" 3 4 # define __dso_protected #endif # 355 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_DECLS __BEGIN_PUBLIC_DECLS #define __END_DECLS __END_PUBLIC_DECLS /* * Non-static C99 inline functions are optional bodies. They don't * create global symbols if not used, but can be replaced if desirable. * This differs from the behavior of GCC before version 4.3. The nearest * equivalent for older GCC is `extern inline'. For newer GCC, use the * gnu_inline attribute additionally to get the old behavior. * * For C99 compilers other than GCC, the C99 behavior is expected. */ #if defined(__GNUC__) && defined(__GNUC_STDC_INLINE__) #define __c99inline extern __attribute__((__gnu_inline__)) __inline #elif defined(__GNUC__) # 371 "/usr/include/sys/cdefs.h" 3 4 #define __c99inline extern __inline #elif defined(__STDC_VERSION__) # 373 "/usr/include/sys/cdefs.h" 3 4 #define __c99inline __inline #endif # 375 "/usr/include/sys/cdefs.h" 3 4 #if defined(__lint__) #define __thread /* delete */ #define __packed __packed #define __aligned(x) /* delete */ #define __section(x) /* delete */ #elif __GNUC_PREREQ__(2, 7) || defined(__PCC__) # 382 "/usr/include/sys/cdefs.h" 3 4 #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #elif defined(_MSC_VER) # 386 "/usr/include/sys/cdefs.h" 3 4 #define __packed /* ignore */ #else # 388 "/usr/include/sys/cdefs.h" 3 4 #define __packed error: no __packed for this compiler #define __aligned(x) error: no __aligned for this compiler #define __section(x) error: no __section for this compiler #endif # 392 "/usr/include/sys/cdefs.h" 3 4 /* * C99 defines the restrict type qualifier keyword, which was made available * in GCC 2.92. */ #if defined(__lint__) #define __restrict /* delete __restrict when not supported */ #elif __STDC_VERSION__ >= 199901L # 400 "/usr/include/sys/cdefs.h" 3 4 #define __restrict restrict #elif __GNUC_PREREQ__(2, 92) # 402 "/usr/include/sys/cdefs.h" 3 4 #define __restrict __restrict__ #else # 404 "/usr/include/sys/cdefs.h" 3 4 #define __restrict /* delete __restrict when not supported */ #endif # 406 "/usr/include/sys/cdefs.h" 3 4 /* * C99 defines __func__ predefined identifier, which was made available * in GCC 2.95. */ #if !(__STDC_VERSION__ >= 199901L) #if __GNUC_PREREQ__(2, 6) #define __func__ __PRETTY_FUNCTION__ #elif __GNUC_PREREQ__(2, 4) # 415 "/usr/include/sys/cdefs.h" 3 4 #define __func__ __FUNCTION__ #else # 417 "/usr/include/sys/cdefs.h" 3 4 #define __func__ "" #endif # 419 "/usr/include/sys/cdefs.h" 3 4 #endif /* !(__STDC_VERSION__ >= 199901L) */ # 420 "/usr/include/sys/cdefs.h" 3 4 #if defined(_KERNEL) #if defined(NO_KERNEL_RCSIDS) #undef __KERNEL_RCSID #define __KERNEL_RCSID(_n, _s) /* nothing */ #endif /* NO_KERNEL_RCSIDS */ # 426 "/usr/include/sys/cdefs.h" 3 4 #endif /* _KERNEL */ # 427 "/usr/include/sys/cdefs.h" 3 4 #if !defined(_STANDALONE) && !defined(_KERNEL) #if defined(__GNUC__) || defined(__PCC__) #define __RENAME(x) ___RENAME(x) #elif defined(__lint__) # 432 "/usr/include/sys/cdefs.h" 3 4 #define __RENAME(x) __symbolrename(x) #else # 434 "/usr/include/sys/cdefs.h" 3 4 #error "No function renaming possible" #endif /* __GNUC__ */ # 436 "/usr/include/sys/cdefs.h" 3 4 #else /* _STANDALONE || _KERNEL */ # 437 "/usr/include/sys/cdefs.h" 3 4 #define __RENAME(x) no renaming in kernel/standalone environment #endif # 439 "/usr/include/sys/cdefs.h" 3 4 /* * A barrier to stop the optimizer from moving code or assume live * register values. This is gcc specific, the version is more or less * arbitrary, might work with older compilers. */ #if __GNUC_PREREQ__(2, 95) #define __insn_barrier() __asm __volatile("":::"memory") #else # 448 "/usr/include/sys/cdefs.h" 3 4 #define __insn_barrier() /* */ #endif # 450 "/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 use 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 __GNUC_PREREQ__(2, 96) #define __predict_true(exp) __builtin_expect((exp) != 0, 1) #define __predict_false(exp) __builtin_expect((exp) != 0, 0) #else # 483 "/usr/include/sys/cdefs.h" 3 4 #define __predict_true(exp) (exp) #define __predict_false(exp) (exp) #endif # 486 "/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 __GNUC_PREREQ__(2, 7) #define __printflike(fmtarg, firstvararg) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) #ifndef __syslog_attribute__ #define __syslog__ __printf__ #endif # 499 "/usr/include/sys/cdefs.h" 3 4 #define __sysloglike(fmtarg, firstvararg) \ __attribute__((__format__ (__syslog__, fmtarg, firstvararg))) #define __scanflike(fmtarg, firstvararg) \ __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) #define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) #else # 505 "/usr/include/sys/cdefs.h" 3 4 #define __printflike(fmtarg, firstvararg) /* nothing */ #define __scanflike(fmtarg, firstvararg) /* nothing */ #define __sysloglike(fmtarg, firstvararg) /* nothing */ #define __format_arg(fmtarg) /* nothing */ #endif # 510 "/usr/include/sys/cdefs.h" 3 4 /* * Macros for manipulating "link sets". Link sets are arrays of pointers * to objects, which are gathered up by the linker. * * Object format-specific code has provided us with the following macros: * * __link_set_add_text(set, sym) * Add a reference to the .text symbol `sym' to `set'. * * __link_set_add_rodata(set, sym) * Add a reference to the .rodata symbol `sym' to `set'. * * __link_set_add_data(set, sym) * Add a reference to the .data symbol `sym' to `set'. * * __link_set_add_bss(set, sym) * Add a reference to the .bss symbol `sym' to `set'. * * __link_set_decl(set, ptype) * Provide an extern declaration of the set `set', which * contains an array of pointers to type `ptype'. This * macro must be used by any code which wishes to reference * the elements of a link set. * * __link_set_start(set) * This points to the first slot in the link set. * * __link_set_end(set) * This points to the (non-existent) slot after the last * entry in the link set. * * __link_set_count(set) * Count the number of entries in link set `set'. * * In addition, we provide the following macros for accessing link sets: * * __link_set_foreach(pvar, set) * Iterate over the link set `set'. Because a link set is * an array of pointers, pvar must be declared as "type **pvar", * and the actual entry accessed as "*pvar". * * __link_set_entry(set, idx) * Access the link set entry at index `idx' from set `set'. */ #define __link_set_foreach(pvar, set) \ for (pvar = __link_set_start(set); pvar < __link_set_end(set); pvar++) #define __link_set_entry(set, idx) (__link_set_start(set)[idx]) /* * Return the natural alignment in bytes for the given type */ #if __GNUC_PREREQ__(4, 1) #define __alignof(__t) __alignof__(__t) #else # 566 "/usr/include/sys/cdefs.h" 3 4 #define __alignof(__t) (sizeof(struct { char __x; __t __y; }) - sizeof(__t)) #endif # 568 "/usr/include/sys/cdefs.h" 3 4 /* * Return the number of elements in a statically-allocated array, * __x. */ #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) #ifndef __ASSEMBLER__ /* __BIT(n): nth bit, where __BIT(0) == 0x1. */ #define __BIT(__n) \ (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \ ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1)))) /* __BITS(m, n): bits m through n, m < n. */ #define __BITS(__m, __n) \ ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1)) #endif /* !__ASSEMBLER__ */ # 585 "/usr/include/sys/cdefs.h" 3 4 /* find least significant bit that is set */ #define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) #define __PRIuBIT PRIuMAX #define __PRIuBITS __PRIuBIT #define __PRIxBIT PRIxMAX #define __PRIxBITS __PRIxBIT #define __SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask)) #define __SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask)) #define __SHIFTOUT_MASK(__mask) __SHIFTOUT((__mask), (__mask)) /* * Only to be used in other headers that are included from both c or c++ * NOT to be used in code. */ #ifdef __cplusplus #define __CAST(__dt, __st) static_cast<__dt>(__st) #else # 606 "/usr/include/sys/cdefs.h" 3 4 #define __CAST(__dt, __st) ((__dt)(__st)) #endif # 608 "/usr/include/sys/cdefs.h" 3 4 #define __CASTV(__dt, __st) __CAST(__dt, __CAST(void *, __st)) #define __CASTCV(__dt, __st) __CAST(__dt, __CAST(const void *, __st)) #define __USE(a) ((void)(a)) #define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \ (~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL) #ifndef __ASSEMBLER__ static __inline long long __zeroll(void) { return 0; } static __inline unsigned long long __zeroull(void) { return 0; } #else # 621 "/usr/include/sys/cdefs.h" 3 4 #define __zeroll() (0LL) #define __zeroull() (0ULL) #endif # 624 "/usr/include/sys/cdefs.h" 3 4 #define __negative_p(x) (!((x) > 0) && ((x) != 0)) #define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1)))) #define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1)))) #define __type_min_u(t) ((t)0ULL) #define __type_max_u(t) ((t)~0ULL) #define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1) #define __type_min(t) (__type_is_signed(t) ? __type_min_s(t) : __type_min_u(t)) #define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t)) #define __type_fit_u(t, a) (/*LINTED*/!__negative_p(a) && \ (uintmax_t)((a) + __zeroull()) <= (uintmax_t)__type_max_u(t)) #define __type_fit_s(t, a) (/*LINTED*/__negative_p(a) ? \ ((intmax_t)((a) + __zeroll()) >= (intmax_t)__type_min_s(t)) : \ ((intmax_t)((a) + __zeroll()) >= (intmax_t)0 && \ (intmax_t)((a) + __zeroll()) <= (intmax_t)__type_max_s(t))) /* * return true if value 'a' fits in type 't' */ #define __type_fit(t, a) (__type_is_signed(t) ? \ __type_fit_s(t, a) : __type_fit_u(t, a)) #endif /* !_SYS_CDEFS_H_ */ # 651 "/usr/include/sys/cdefs.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" /* * Declare macros and functions that may be missing in . */ #ifndef __IDSTRING # define __IDSTRING(name,string) \ static const char name[] __attribute__((__unused__)) = string #endif # 47 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __COPYRIGHT # define __COPYRIGHT(_s) __IDSTRING(copyright,_s) #endif # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __RCSID # define __RCSID(_s) __IDSTRING(rcsid,_s) #endif # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __P # if defined(__STDC__) || defined(__cplusplus) # define __P(protos) protos /* full-blown ANSI C */ # else # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # define __P(protos) () /* traditional C preprocessor */ # endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __CONCAT # if defined(__STDC__) || defined(__cplusplus) # define __CONCAT(x,y) x ## y # else # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # define __CONCAT(x,y) x/**/y # endif # 70 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif # 71 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __BEGIN_DECLS # if defined(__cplusplus) # define __BEGIN_DECLS extern "C" { # else # 76 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # define __BEGIN_DECLS # endif # 78 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif # 79 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __END_DECLS # if defined(__cplusplus) # define __END_DECLS }; # else # 84 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # define __END_DECLS # endif # 86 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif # 87 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #ifndef __restrict /* * C99 defines the restrict type qualifier keyword, which was made available * in GCC 2.92. */ # if __STDC_VERSION__ >= 199901L # define __restrict restrict # else # 96 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # define __restrict /* delete __restrict when not supported */ # endif # 98 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif # 99 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" #endif /* !_NBCOMPAT_SYS_CDEFS_H_ */ # 101 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/cdefs.h" # 32 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" 1 /* $NetBSD: types.h,v 1.4 2008/12/14 07:50:49 obache Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_SYS_TYPES_H_ #define _NBCOMPAT_SYS_TYPES_H_ #if HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # 1 "/usr/include/sys/types.h" 1 3 4 /* $NetBSD: types.h,v 1.98 2017/01/14 01:02:08 christos Exp $ */ /*- * 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.4 (Berkeley) 1/21/94 */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 43 "/usr/include/sys/types.h" 2 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/types.h" 1 3 4 /* $NetBSD: types.h,v 1.52 2017/01/26 15:55:09 christos Exp $ */ /*- * Copyright (c) 1990 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. * * @(#)types.h 7.5 (Berkeley) 3/9/91 */ #ifndef _X86_64_TYPES_H_ #define _X86_64_TYPES_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/machine/types.h" 3 4 # 40 "/usr/include/machine/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/machine/types.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 41 "/usr/include/machine/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/machine/types.h" 3 4 # 1 "/usr/include/machine/int_types.h" 1 3 4 /* $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 1990 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. * * from: @(#)types.h 7.5 (Berkeley) 3/9/91 */ #ifndef _AMD64_INT_TYPES_H_ #define _AMD64_INT_TYPES_H_ #ifdef __UINTPTR_TYPE__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/machine/int_types.h" 3 4 # 1 "/usr/include/sys/common_int_types.h" 1 3 4 /* $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Joerg Sonnenberger. * * 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. */ #ifndef _SYS_COMMON_INT_TYPES_H_ #define _SYS_COMMON_INT_TYPES_H_ #ifndef __UINTPTR_TYPE__ #error Your compiler does not provide exact width type macros. #endif # 38 "/usr/include/sys/common_int_types.h" 3 4 /* * 7.18.1 Integer types */ /* 7.18.1.1 Exact-width integer types */ typedef __INT8_TYPE__ __int8_t; typedef __UINT8_TYPE__ __uint8_t; typedef __INT16_TYPE__ __int16_t; typedef __UINT16_TYPE__ __uint16_t; typedef __INT32_TYPE__ __int32_t; typedef __UINT32_TYPE__ __uint32_t; typedef __INT64_TYPE__ __int64_t; typedef __UINT64_TYPE__ __uint64_t; #define __BIT_TYPES_DEFINED__ /* 7.18.1.4 Integer types capable of holding object pointers */ typedef __INTPTR_TYPE__ __intptr_t; typedef __UINTPTR_TYPE__ __uintptr_t; #endif /* _SYS_COMMON_INT_TYPES_H_ */ # 62 "/usr/include/sys/common_int_types.h" 3 4 # 39 "/usr/include/machine/int_types.h" 2 3 4 #else # 40 "/usr/include/machine/int_types.h" 3 4 #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/machine/int_types.h" 3 4 # 44 "/usr/include/machine/int_types.h" 3 4 /* * 7.18.1 Integer types */ /* 7.18.1.1 Exact-width integer types */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short int __int16_t; typedef unsigned short int __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long int __int64_t; typedef unsigned long int __uint64_t; #define __BIT_TYPES_DEFINED__ /* 7.18.1.4 Integer types capable of holding object pointers */ typedef long __intptr_t; typedef unsigned long __uintptr_t; #else /* __x86_64__ */ # 68 "/usr/include/machine/int_types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 69 "/usr/include/machine/int_types.h" 3 4 # 70 "/usr/include/machine/int_types.h" 3 4 #endif /* __x86_64__ */ # 72 "/usr/include/machine/int_types.h" 3 4 #endif # 74 "/usr/include/machine/int_types.h" 3 4 #endif /* !_AMD64_INT_TYPES_H_ */ # 76 "/usr/include/machine/int_types.h" 3 4 # 42 "/usr/include/machine/types.h" 2 3 4 #if defined(_KERNEL) typedef struct label_t { long val[8]; } label_t; #endif # 48 "/usr/include/machine/types.h" 3 4 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) typedef unsigned long paddr_t; typedef unsigned long psize_t; typedef unsigned long vaddr_t; typedef unsigned long vsize_t; #define PRIxPADDR "lx" #define PRIxPSIZE "lx" #define PRIuPSIZE "lu" #define PRIxVADDR "lx" #define PRIxVSIZE "lx" #define PRIuVSIZE "lu" typedef int pmc_evid_t; typedef __uint64_t pmc_ctr_t; typedef long int register_t; typedef int register32_t; #define PRIxREGISTER "lx" #define PRIxREGISTER32 "x" #endif # 69 "/usr/include/machine/types.h" 3 4 typedef long int __register_t; typedef unsigned char __cpu_simple_lock_nv_t; /* __cpu_simple_lock_t used to be a full word. */ #define __CPU_SIMPLE_LOCK_PAD #define __SIMPLELOCK_LOCKED 1 #define __SIMPLELOCK_UNLOCKED 0 /* The amd64 does not have strict alignment requirements. */ #define __NO_STRICT_ALIGNMENT #define __HAVE_NEW_STYLE_BUS_H #define __HAVE_CPU_COUNTER #define __HAVE_CPU_DATA_FIRST #define __HAVE_CPU_BOOTCONF #define __HAVE_MD_CPU_OFFLINE #define __HAVE_SYSCALL_INTERN #define __HAVE_MINIMAL_EMUL #define __HAVE_ATOMIC64_OPS #define __HAVE_MM_MD_KERNACC #define __HAVE_ATOMIC_AS_MEMBAR #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE___LWP_GETPRIVATE_FAST #define __HAVE_TLS_VARIANT_II #define __HAVE_COMMON___TLS_GET_ADDR #define __HAVE_INTR_CONTROL #define __HAVE_CPU_RNG #define __HAVE_COMPAT_NETBSD32 #ifdef _KERNEL_OPT #define __HAVE_RAS #if 0 /* expanded by -frewrite-includes */ #include "opt_xen.h" #endif /* expanded by -frewrite-includes */ # 103 "/usr/include/machine/types.h" 3 4 # 104 "/usr/include/machine/types.h" 3 4 #if defined(__x86_64__) && !defined(XEN) #define __HAVE_DIRECT_MAP 1 #define __HAVE_MM_MD_DIRECT_MAPPED_IO #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS #define __HAVE_CPU_UAREA_ROUTINES #if !defined(NO_PCI_MSI_MSIX) #define __HAVE_PCI_MSI_MSIX #endif # 112 "/usr/include/machine/types.h" 3 4 #endif # 113 "/usr/include/machine/types.h" 3 4 #endif # 114 "/usr/include/machine/types.h" 3 4 #else /* !__x86_64__ */ # 116 "/usr/include/machine/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 117 "/usr/include/machine/types.h" 3 4 # 118 "/usr/include/machine/types.h" 3 4 #endif /* __x86_64__ */ # 120 "/usr/include/machine/types.h" 3 4 #endif /* _X86_64_TYPES_H_ */ # 122 "/usr/include/machine/types.h" 3 4 # 46 "/usr/include/sys/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/ansi.h" 1 3 4 /* $NetBSD: ansi.h,v 1.10 2011/07/17 20:54:36 joerg Exp $ */ /*- * 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. * * @(#)ansi.h 8.2 (Berkeley) 1/4/94 */ #ifndef _X86_64_ANSI_H_ #define _X86_64_ANSI_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/machine/ansi.h" 3 4 # 40 "/usr/include/machine/ansi.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/machine/ansi.h" 3 4 # 42 "/usr/include/machine/ansi.h" 3 4 /* * Types which are fundamental to the implementation and may appear in * more than one standard header are defined here. Standard headers * then use: * #ifdef _BSD_SIZE_T_ * typedef _BSD_SIZE_T_ size_t; * #undef _BSD_SIZE_T_ * #endif */ #define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */ #define _BSD_TIME_T_ __int64_t /* time() */ #define _BSD_CLOCKID_T_ int /* clockid_t */ #define _BSD_TIMER_T_ int /* timer_t */ #define _BSD_SUSECONDS_T_ int /* suseconds_t */ #define _BSD_USECONDS_T_ unsigned int /* useconds_t */ #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_WINT_T_ int /* wint_t */ #else /* !__x86_64__ */ # 65 "/usr/include/machine/ansi.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 66 "/usr/include/machine/ansi.h" 3 4 # 67 "/usr/include/machine/ansi.h" 3 4 #endif /* __x86_64__ */ # 69 "/usr/include/machine/ansi.h" 3 4 #endif /* _X86_64_ANSI_H_ */ # 71 "/usr/include/machine/ansi.h" 3 4 # 48 "/usr/include/sys/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/sys/types.h" 3 4 # 49 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 51 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/ansi.h" 1 3 4 /* $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jun-ichiro itojun Hagino and by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _SYS_ANSI_H_ #define _SYS_ANSI_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/ansi.h" 3 4 # 36 "/usr/include/sys/ansi.h" 3 4 typedef char * __caddr_t; /* core address */ typedef __uint32_t __gid_t; /* group id */ typedef __uint32_t __in_addr_t; /* IP(v4) address */ typedef __uint16_t __in_port_t; /* "Internet" port number */ typedef __uint32_t __mode_t; /* file permissions */ typedef __int64_t __off_t; /* file offset */ typedef __int32_t __pid_t; /* process id */ typedef __uint8_t __sa_family_t; /* socket address family */ typedef unsigned int __socklen_t; /* socket-related datum length */ typedef __uint32_t __uid_t; /* user id */ typedef __uint64_t __fsblkcnt_t; /* fs block count (statvfs) */ typedef __uint64_t __fsfilcnt_t; /* fs file count */ struct __tag_wctrans_t; typedef struct __tag_wctrans_t *__wctrans_t; struct __tag_wctype_t; typedef struct __tag_wctype_t *__wctype_t; /* * mbstate_t is an opaque object to keep conversion state, during multibyte * stream conversions. The content must not be referenced by user programs. */ typedef union { __int64_t __mbstateL; /* for alignment */ char __mbstate8[128]; } __mbstate_t; #define _BSD_WCTRANS_T_ __wctrans_t /* wctrans_t */ #define _BSD_WCTYPE_T_ __wctype_t /* wctype_t */ #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #ifdef __lint__ typedef char *__va_list; #else # 72 "/usr/include/sys/ansi.h" 3 4 typedef __builtin_va_list __va_list; #endif # 74 "/usr/include/sys/ansi.h" 3 4 #endif /* !_SYS_ANSI_H_ */ # 76 "/usr/include/sys/ansi.h" 3 4 # 52 "/usr/include/sys/types.h" 2 3 4 #ifndef int8_t typedef __int8_t int8_t; #define int8_t __int8_t #endif # 57 "/usr/include/sys/types.h" 3 4 #ifndef uint8_t typedef __uint8_t uint8_t; #define uint8_t __uint8_t #endif # 62 "/usr/include/sys/types.h" 3 4 #ifndef int16_t typedef __int16_t int16_t; #define int16_t __int16_t #endif # 67 "/usr/include/sys/types.h" 3 4 #ifndef uint16_t typedef __uint16_t uint16_t; #define uint16_t __uint16_t #endif # 72 "/usr/include/sys/types.h" 3 4 #ifndef int32_t typedef __int32_t int32_t; #define int32_t __int32_t #endif # 77 "/usr/include/sys/types.h" 3 4 #ifndef uint32_t typedef __uint32_t uint32_t; #define uint32_t __uint32_t #endif # 82 "/usr/include/sys/types.h" 3 4 #ifndef int64_t typedef __int64_t int64_t; #define int64_t __int64_t #endif # 87 "/usr/include/sys/types.h" 3 4 #ifndef uint64_t typedef __uint64_t uint64_t; #define uint64_t __uint64_t #endif # 92 "/usr/include/sys/types.h" 3 4 typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 98 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/endian.h" 1 3 4 /* $NetBSD: endian.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 3 "/usr/include/machine/endian.h" 3 4 # 1 "/usr/include/sys/endian.h" 1 3 4 /* $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $ */ /* * 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/11/93 */ #ifndef _SYS_ENDIAN_H_ #define _SYS_ENDIAN_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/endian.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/sys/endian.h" 2 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 */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #ifndef _LOCORE /* C-family endian-ness definitions */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/usr/include/sys/endian.h" 3 4 # 54 "/usr/include/sys/endian.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 54 "/usr/include/sys/endian.h" 3 4 # 55 "/usr/include/sys/endian.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 55 "/usr/include/sys/endian.h" 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 /* $NetBSD: types.h,v 1.98 2017/01/14 01:02:08 christos Exp $ */ /*- * 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.4 (Berkeley) 1/21/94 */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/types.h" 3 4 # 43 "/usr/include/sys/types.h" 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/sys/types.h" 3 4 # 46 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/sys/types.h" 3 4 # 48 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/sys/types.h" 3 4 # 49 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 51 "/usr/include/sys/types.h" 3 4 # 52 "/usr/include/sys/types.h" 3 4 #ifndef int8_t typedef __int8_t int8_t; #define int8_t __int8_t #endif # 57 "/usr/include/sys/types.h" 3 4 #ifndef uint8_t typedef __uint8_t uint8_t; #define uint8_t __uint8_t #endif # 62 "/usr/include/sys/types.h" 3 4 #ifndef int16_t typedef __int16_t int16_t; #define int16_t __int16_t #endif # 67 "/usr/include/sys/types.h" 3 4 #ifndef uint16_t typedef __uint16_t uint16_t; #define uint16_t __uint16_t #endif # 72 "/usr/include/sys/types.h" 3 4 #ifndef int32_t typedef __int32_t int32_t; #define int32_t __int32_t #endif # 77 "/usr/include/sys/types.h" 3 4 #ifndef uint32_t typedef __uint32_t uint32_t; #define uint32_t __uint32_t #endif # 82 "/usr/include/sys/types.h" 3 4 #ifndef int64_t typedef __int64_t int64_t; #define int64_t __int64_t #endif # 87 "/usr/include/sys/types.h" 3 4 #ifndef uint64_t typedef __uint64_t uint64_t; #define uint64_t __uint64_t #endif # 92 "/usr/include/sys/types.h" 3 4 typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 98 "/usr/include/sys/types.h" 3 4 # 99 "/usr/include/sys/types.h" 3 4 #if defined(_NETBSD_SOURCE) typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; /* Sys V compatibility */ typedef unsigned short ushort; /* Sys V compatibility */ typedef unsigned int uint; /* Sys V compatibility */ typedef unsigned long ulong; /* Sys V compatibility */ #endif # 111 "/usr/include/sys/types.h" 3 4 typedef uint64_t u_quad_t; /* quads */ typedef int64_t quad_t; typedef quad_t * qaddr_t; /* * The types longlong_t and u_longlong_t exist for use with the * Sun-derived XDR routines involving these types, and their usage * in other contexts is discouraged. Further note that these types * may not be equivalent to "long long" and "unsigned long long", * they are only guaranteed to be signed and unsigned 64-bit types * respectively. Portable programs that need 64-bit types should use * the C99 types int64_t and uint64_t instead. */ typedef int64_t longlong_t; /* for XDR */ typedef uint64_t u_longlong_t; /* for XDR */ typedef int64_t blkcnt_t; /* fs block count */ typedef int32_t blksize_t; /* fs optimal block size */ #ifndef fsblkcnt_t typedef __fsblkcnt_t fsblkcnt_t; /* fs block count (statvfs) */ #define fsblkcnt_t __fsblkcnt_t #endif # 136 "/usr/include/sys/types.h" 3 4 #ifndef fsfilcnt_t typedef __fsfilcnt_t fsfilcnt_t; /* fs file count */ #define fsfilcnt_t __fsfilcnt_t #endif # 141 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) /* We don't and shouldn't use caddr_t in the kernel anymore */ #ifndef caddr_t typedef __caddr_t caddr_t; /* core address */ #define caddr_t __caddr_t #endif # 148 "/usr/include/sys/types.h" 3 4 #endif # 149 "/usr/include/sys/types.h" 3 4 #ifdef __daddr_t typedef __daddr_t daddr_t; /* disk address */ #undef __daddr_t #else # 154 "/usr/include/sys/types.h" 3 4 typedef int64_t daddr_t; /* disk address */ #endif # 156 "/usr/include/sys/types.h" 3 4 typedef uint64_t dev_t; /* device number */ typedef uint32_t fixpt_t; /* fixed point number */ #ifndef gid_t typedef __gid_t gid_t; /* group id */ #define gid_t __gid_t #endif # 164 "/usr/include/sys/types.h" 3 4 typedef uint32_t id_t; /* group id, process id or user id */ typedef uint64_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ #ifndef mode_t typedef __mode_t mode_t; /* permissions */ #define mode_t __mode_t #endif # 173 "/usr/include/sys/types.h" 3 4 typedef uint32_t nlink_t; /* link count */ #ifndef off_t typedef __off_t off_t; /* file offset */ #define off_t __off_t #endif # 180 "/usr/include/sys/types.h" 3 4 #ifndef pid_t typedef __pid_t pid_t; /* process id */ #define pid_t __pid_t #endif # 185 "/usr/include/sys/types.h" 3 4 typedef int32_t lwpid_t; /* LWP id */ typedef uint64_t rlim_t; /* resource limit */ typedef int32_t segsz_t; /* segment size */ typedef int32_t swblk_t; /* swap offset */ #ifndef uid_t typedef __uid_t uid_t; /* user id */ #define uid_t __uid_t #endif # 194 "/usr/include/sys/types.h" 3 4 typedef int mqd_t; typedef unsigned long cpuid_t; typedef int psetid_t; typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t; #if defined(_KERNEL) || defined(_STANDALONE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 205 "/usr/include/sys/types.h" 3 4 # 206 "/usr/include/sys/types.h" 3 4 /* * Deprecated Mach-style boolean_t type. Should not be used by new code. */ typedef int boolean_t; #ifndef TRUE #define TRUE 1 #endif # 214 "/usr/include/sys/types.h" 3 4 #ifndef FALSE #define FALSE 0 #endif # 217 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _STANDALONE */ # 219 "/usr/include/sys/types.h" 3 4 #if defined(_KERNEL) || defined(_LIBC) || defined(_KMEMUSER) /* * semctl(2)'s argument structure. This is here for the benefit of * . It is not in the user's namespace in SUSv2. * The SUSv2 semctl(2) takes variable arguments. */ union __semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ unsigned short *array; /* array for GETALL & SETALL */ }; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 231 "/usr/include/sys/types.h" 3 4 # 232 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _LIBC || _KMEMUSER */ # 233 "/usr/include/sys/types.h" 3 4 /* * These belong in unistd.h, but are placed here too to ensure that * long arguments will be promoted to off_t if the program fails to * include that header or explicitly cast them to off_t. */ #if defined(_NETBSD_SOURCE) #ifndef __OFF_T_SYSCALLS_DECLARED #define __OFF_T_SYSCALLS_DECLARED #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 243 "/usr/include/sys/types.h" 3 4 # 244 "/usr/include/sys/types.h" 3 4 __BEGIN_DECLS off_t lseek(int, off_t, int); int ftruncate(int, off_t); int truncate(const char *, off_t); __END_DECLS #endif /* !_KERNEL */ # 250 "/usr/include/sys/types.h" 3 4 #endif /* __OFF_T_SYSCALLS_DECLARED */ # 251 "/usr/include/sys/types.h" 3 4 #endif /* defined(_NETBSD_SOURCE) */ # 252 "/usr/include/sys/types.h" 3 4 #if defined(_NETBSD_SOURCE) /* Major, minor numbers, dev_t's. */ typedef int32_t __devmajor_t, __devminor_t; #define devmajor_t __devmajor_t #define devminor_t __devminor_t #define NODEVMAJOR (-1) #define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8)) #define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \ (((uint32_t)(x) & 0x000000ff) >> 0))) #define makedev(x,y) ((dev_t)((((dev_t)(x) << 8) & 0x000fff00U) | \ (((dev_t)(y) << 12) & 0xfff00000U) | \ (((dev_t)(y) << 0) & 0x000000ffU))) #endif # 266 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCK_T_ typedef _BSD_CLOCK_T_ clock_t; #undef _BSD_CLOCK_T_ #endif # 271 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_PTRDIFF_T_ typedef _BSD_PTRDIFF_T_ ptrdiff_t; #undef _BSD_PTRDIFF_T_ #endif # 276 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #define _SIZE_T #undef _BSD_SIZE_T_ #endif # 282 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SSIZE_T_ typedef _BSD_SSIZE_T_ ssize_t; #undef _BSD_SSIZE_T_ #endif # 287 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 292 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCKID_T_ typedef _BSD_CLOCKID_T_ clockid_t; #undef _BSD_CLOCKID_T_ #endif # 297 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIMER_T_ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif # 302 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SUSECONDS_T_ typedef _BSD_SUSECONDS_T_ suseconds_t; #undef _BSD_SUSECONDS_T_ #endif # 307 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_USECONDS_T_ typedef _BSD_USECONDS_T_ useconds_t; #undef _BSD_USECONDS_T_ #endif # 312 "/usr/include/sys/types.h" 3 4 #ifdef _NETBSD_SOURCE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 314 "/usr/include/sys/types.h" 3 4 # 315 "/usr/include/sys/types.h" 3 4 #define NBBY 8 typedef struct kauth_cred *kauth_cred_t; typedef int pri_t; #endif # 323 "/usr/include/sys/types.h" 3 4 #if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER)) /* * Forward structure declarations for function prototypes. We include the * common structures that cross subsystem boundaries here; others are mostly * used in the same place that the structure is defined. */ struct lwp; typedef struct lwp lwp_t; struct __ucontext; struct proc; typedef struct proc proc_t; struct pgrp; struct rusage; struct file; typedef struct file file_t; struct buf; typedef struct buf buf_t; struct tty; struct uio; #endif # 344 "/usr/include/sys/types.h" 3 4 #ifdef _KERNEL #define SET(t, f) ((t) |= (f)) #define ISSET(t, f) ((t) & (f)) #define CLR(t, f) ((t) &= ~(f)) #endif # 350 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) #if (_POSIX_C_SOURCE - 0L) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 354 "/usr/include/sys/types.h" 3 4 # 355 "/usr/include/sys/types.h" 3 4 #endif # 356 "/usr/include/sys/types.h" 3 4 #endif # 357 "/usr/include/sys/types.h" 3 4 #endif /* !_SYS_TYPES_H_ */ # 359 "/usr/include/sys/types.h" 3 4 # 56 "/usr/include/sys/endian.h" 2 3 4 #ifndef in_addr_t typedef __in_addr_t in_addr_t; #define in_addr_t __in_addr_t #endif # 61 "/usr/include/sys/endian.h" 3 4 #ifndef in_port_t typedef __in_port_t in_port_t; #define in_port_t __in_port_t #endif # 66 "/usr/include/sys/endian.h" 3 4 __BEGIN_DECLS uint32_t htonl(uint32_t) __constfunc; uint16_t htons(uint16_t) __constfunc; uint32_t ntohl(uint32_t) __constfunc; uint16_t ntohs(uint16_t) __constfunc; __END_DECLS #endif /* !_LOCORE */ # 75 "/usr/include/sys/endian.h" 3 4 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ # 76 "/usr/include/sys/endian.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 78 "/usr/include/sys/endian.h" 3 4 # 1 "/usr/include/machine/endian_machdep.h" 1 3 4 /* $NetBSD: endian_machdep.h,v 1.4 2006/01/30 21:52:38 dsl Exp $ */ #define _BYTE_ORDER _LITTLE_ENDIAN # 79 "/usr/include/sys/endian.h" 2 3 4 /* * Define the order of 32-bit words in 64-bit words. */ #if _BYTE_ORDER == _LITTLE_ENDIAN #define _QUAD_HIGHWORD 1 #define _QUAD_LOWWORD 0 #endif # 87 "/usr/include/sys/endian.h" 3 4 #if _BYTE_ORDER == _BIG_ENDIAN #define _QUAD_HIGHWORD 0 #define _QUAD_LOWWORD 1 #endif # 92 "/usr/include/sys/endian.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) /* * Traditional names for byteorder. These are defined as the numeric * sequences so that third party code can "#define XXX_ENDIAN" and not * cause errors. */ #define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ #define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ #define BYTE_ORDER _BYTE_ORDER #ifndef _LOCORE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 107 "/usr/include/sys/endian.h" 3 4 # 1 "/usr/include/machine/bswap.h" 1 3 4 /* $NetBSD: bswap.h,v 1.3 2008/10/26 00:08:15 mrg Exp $ */ /* Written by Manuel Bouyer. Public domain */ #ifndef _X86_64_BSWAP_H_ #define _X86_64_BSWAP_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 10 "/usr/include/machine/bswap.h" 3 4 # 1 "/usr/include/machine/byte_swap.h" 1 3 4 /* $NetBSD: byte_swap.h,v 1.7 2010/01/14 02:06:04 joerg Exp $ */ /*- * Copyright (c) 1998, 2010 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Charles M. Hannum. * * 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. */ /* * Copy of the i386 version. 64 bit versions may be added later. */ #ifndef _AMD64_BYTE_SWAP_H_ #define _AMD64_BYTE_SWAP_H_ #ifdef __x86_64__ #ifdef __GNUC__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/machine/byte_swap.h" 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 /* $NetBSD: types.h,v 1.98 2017/01/14 01:02:08 christos Exp $ */ /*- * 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.4 (Berkeley) 1/21/94 */ #ifndef _SYS_TYPES_H_ #define _SYS_TYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/types.h" 3 4 # 43 "/usr/include/sys/types.h" 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/sys/types.h" 3 4 # 46 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/sys/types.h" 3 4 # 48 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/sys/types.h" 3 4 # 49 "/usr/include/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 51 "/usr/include/sys/types.h" 3 4 # 52 "/usr/include/sys/types.h" 3 4 #ifndef int8_t typedef __int8_t int8_t; #define int8_t __int8_t #endif # 57 "/usr/include/sys/types.h" 3 4 #ifndef uint8_t typedef __uint8_t uint8_t; #define uint8_t __uint8_t #endif # 62 "/usr/include/sys/types.h" 3 4 #ifndef int16_t typedef __int16_t int16_t; #define int16_t __int16_t #endif # 67 "/usr/include/sys/types.h" 3 4 #ifndef uint16_t typedef __uint16_t uint16_t; #define uint16_t __uint16_t #endif # 72 "/usr/include/sys/types.h" 3 4 #ifndef int32_t typedef __int32_t int32_t; #define int32_t __int32_t #endif # 77 "/usr/include/sys/types.h" 3 4 #ifndef uint32_t typedef __uint32_t uint32_t; #define uint32_t __uint32_t #endif # 82 "/usr/include/sys/types.h" 3 4 #ifndef int64_t typedef __int64_t int64_t; #define int64_t __int64_t #endif # 87 "/usr/include/sys/types.h" 3 4 #ifndef uint64_t typedef __uint64_t uint64_t; #define uint64_t __uint64_t #endif # 92 "/usr/include/sys/types.h" 3 4 typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 98 "/usr/include/sys/types.h" 3 4 # 99 "/usr/include/sys/types.h" 3 4 #if defined(_NETBSD_SOURCE) typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; /* Sys V compatibility */ typedef unsigned short ushort; /* Sys V compatibility */ typedef unsigned int uint; /* Sys V compatibility */ typedef unsigned long ulong; /* Sys V compatibility */ #endif # 111 "/usr/include/sys/types.h" 3 4 typedef uint64_t u_quad_t; /* quads */ typedef int64_t quad_t; typedef quad_t * qaddr_t; /* * The types longlong_t and u_longlong_t exist for use with the * Sun-derived XDR routines involving these types, and their usage * in other contexts is discouraged. Further note that these types * may not be equivalent to "long long" and "unsigned long long", * they are only guaranteed to be signed and unsigned 64-bit types * respectively. Portable programs that need 64-bit types should use * the C99 types int64_t and uint64_t instead. */ typedef int64_t longlong_t; /* for XDR */ typedef uint64_t u_longlong_t; /* for XDR */ typedef int64_t blkcnt_t; /* fs block count */ typedef int32_t blksize_t; /* fs optimal block size */ #ifndef fsblkcnt_t typedef __fsblkcnt_t fsblkcnt_t; /* fs block count (statvfs) */ #define fsblkcnt_t __fsblkcnt_t #endif # 136 "/usr/include/sys/types.h" 3 4 #ifndef fsfilcnt_t typedef __fsfilcnt_t fsfilcnt_t; /* fs file count */ #define fsfilcnt_t __fsfilcnt_t #endif # 141 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) /* We don't and shouldn't use caddr_t in the kernel anymore */ #ifndef caddr_t typedef __caddr_t caddr_t; /* core address */ #define caddr_t __caddr_t #endif # 148 "/usr/include/sys/types.h" 3 4 #endif # 149 "/usr/include/sys/types.h" 3 4 #ifdef __daddr_t typedef __daddr_t daddr_t; /* disk address */ #undef __daddr_t #else # 154 "/usr/include/sys/types.h" 3 4 typedef int64_t daddr_t; /* disk address */ #endif # 156 "/usr/include/sys/types.h" 3 4 typedef uint64_t dev_t; /* device number */ typedef uint32_t fixpt_t; /* fixed point number */ #ifndef gid_t typedef __gid_t gid_t; /* group id */ #define gid_t __gid_t #endif # 164 "/usr/include/sys/types.h" 3 4 typedef uint32_t id_t; /* group id, process id or user id */ typedef uint64_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ #ifndef mode_t typedef __mode_t mode_t; /* permissions */ #define mode_t __mode_t #endif # 173 "/usr/include/sys/types.h" 3 4 typedef uint32_t nlink_t; /* link count */ #ifndef off_t typedef __off_t off_t; /* file offset */ #define off_t __off_t #endif # 180 "/usr/include/sys/types.h" 3 4 #ifndef pid_t typedef __pid_t pid_t; /* process id */ #define pid_t __pid_t #endif # 185 "/usr/include/sys/types.h" 3 4 typedef int32_t lwpid_t; /* LWP id */ typedef uint64_t rlim_t; /* resource limit */ typedef int32_t segsz_t; /* segment size */ typedef int32_t swblk_t; /* swap offset */ #ifndef uid_t typedef __uid_t uid_t; /* user id */ #define uid_t __uid_t #endif # 194 "/usr/include/sys/types.h" 3 4 typedef int mqd_t; typedef unsigned long cpuid_t; typedef int psetid_t; typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t; #if defined(_KERNEL) || defined(_STANDALONE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 205 "/usr/include/sys/types.h" 3 4 # 206 "/usr/include/sys/types.h" 3 4 /* * Deprecated Mach-style boolean_t type. Should not be used by new code. */ typedef int boolean_t; #ifndef TRUE #define TRUE 1 #endif # 214 "/usr/include/sys/types.h" 3 4 #ifndef FALSE #define FALSE 0 #endif # 217 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _STANDALONE */ # 219 "/usr/include/sys/types.h" 3 4 #if defined(_KERNEL) || defined(_LIBC) || defined(_KMEMUSER) /* * semctl(2)'s argument structure. This is here for the benefit of * . It is not in the user's namespace in SUSv2. * The SUSv2 semctl(2) takes variable arguments. */ union __semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ unsigned short *array; /* array for GETALL & SETALL */ }; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 231 "/usr/include/sys/types.h" 3 4 # 232 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _LIBC || _KMEMUSER */ # 233 "/usr/include/sys/types.h" 3 4 /* * These belong in unistd.h, but are placed here too to ensure that * long arguments will be promoted to off_t if the program fails to * include that header or explicitly cast them to off_t. */ #if defined(_NETBSD_SOURCE) #ifndef __OFF_T_SYSCALLS_DECLARED #define __OFF_T_SYSCALLS_DECLARED #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 243 "/usr/include/sys/types.h" 3 4 # 244 "/usr/include/sys/types.h" 3 4 __BEGIN_DECLS off_t lseek(int, off_t, int); int ftruncate(int, off_t); int truncate(const char *, off_t); __END_DECLS #endif /* !_KERNEL */ # 250 "/usr/include/sys/types.h" 3 4 #endif /* __OFF_T_SYSCALLS_DECLARED */ # 251 "/usr/include/sys/types.h" 3 4 #endif /* defined(_NETBSD_SOURCE) */ # 252 "/usr/include/sys/types.h" 3 4 #if defined(_NETBSD_SOURCE) /* Major, minor numbers, dev_t's. */ typedef int32_t __devmajor_t, __devminor_t; #define devmajor_t __devmajor_t #define devminor_t __devminor_t #define NODEVMAJOR (-1) #define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8)) #define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \ (((uint32_t)(x) & 0x000000ff) >> 0))) #define makedev(x,y) ((dev_t)((((dev_t)(x) << 8) & 0x000fff00U) | \ (((dev_t)(y) << 12) & 0xfff00000U) | \ (((dev_t)(y) << 0) & 0x000000ffU))) #endif # 266 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCK_T_ typedef _BSD_CLOCK_T_ clock_t; #undef _BSD_CLOCK_T_ #endif # 271 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_PTRDIFF_T_ typedef _BSD_PTRDIFF_T_ ptrdiff_t; #undef _BSD_PTRDIFF_T_ #endif # 276 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #define _SIZE_T #undef _BSD_SIZE_T_ #endif # 282 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SSIZE_T_ typedef _BSD_SSIZE_T_ ssize_t; #undef _BSD_SSIZE_T_ #endif # 287 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 292 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCKID_T_ typedef _BSD_CLOCKID_T_ clockid_t; #undef _BSD_CLOCKID_T_ #endif # 297 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIMER_T_ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif # 302 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SUSECONDS_T_ typedef _BSD_SUSECONDS_T_ suseconds_t; #undef _BSD_SUSECONDS_T_ #endif # 307 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_USECONDS_T_ typedef _BSD_USECONDS_T_ useconds_t; #undef _BSD_USECONDS_T_ #endif # 312 "/usr/include/sys/types.h" 3 4 #ifdef _NETBSD_SOURCE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 314 "/usr/include/sys/types.h" 3 4 # 315 "/usr/include/sys/types.h" 3 4 #define NBBY 8 typedef struct kauth_cred *kauth_cred_t; typedef int pri_t; #endif # 323 "/usr/include/sys/types.h" 3 4 #if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER)) /* * Forward structure declarations for function prototypes. We include the * common structures that cross subsystem boundaries here; others are mostly * used in the same place that the structure is defined. */ struct lwp; typedef struct lwp lwp_t; struct __ucontext; struct proc; typedef struct proc proc_t; struct pgrp; struct rusage; struct file; typedef struct file file_t; struct buf; typedef struct buf buf_t; struct tty; struct uio; #endif # 344 "/usr/include/sys/types.h" 3 4 #ifdef _KERNEL #define SET(t, f) ((t) |= (f)) #define ISSET(t, f) ((t) & (f)) #define CLR(t, f) ((t) &= ~(f)) #endif # 350 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) #if (_POSIX_C_SOURCE - 0L) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 354 "/usr/include/sys/types.h" 3 4 # 355 "/usr/include/sys/types.h" 3 4 #endif # 356 "/usr/include/sys/types.h" 3 4 #endif # 357 "/usr/include/sys/types.h" 3 4 #endif /* !_SYS_TYPES_H_ */ # 359 "/usr/include/sys/types.h" 3 4 # 43 "/usr/include/machine/byte_swap.h" 2 3 4 __BEGIN_DECLS #define __BYTE_SWAP_U64_VARIABLE __byte_swap_u64_variable static __inline uint64_t __byte_swap_u64_variable(uint64_t); static __inline uint64_t __byte_swap_u64_variable(uint64_t x) { __asm volatile ( "bswap %1" : "=r" (x) : "0" (x)); return (x); } #define __BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable static __inline uint32_t __byte_swap_u32_variable(uint32_t); static __inline uint32_t __byte_swap_u32_variable(uint32_t x) { __asm volatile ( "bswap %1" : "=r" (x) : "0" (x)); return (x); } #define __BYTE_SWAP_U16_VARIABLE __byte_swap_u16_variable static __inline uint16_t __byte_swap_u16_variable(uint16_t); static __inline uint16_t __byte_swap_u16_variable(uint16_t x) { __asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); return (x); } __END_DECLS #endif # 74 "/usr/include/machine/byte_swap.h" 3 4 #else /* __x86_64__ */ # 76 "/usr/include/machine/byte_swap.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 77 "/usr/include/machine/byte_swap.h" 3 4 # 78 "/usr/include/machine/byte_swap.h" 3 4 #endif /* __x86_64__ */ # 80 "/usr/include/machine/byte_swap.h" 3 4 #endif /* !_AMD64_BYTE_SWAP_H_ */ # 82 "/usr/include/machine/byte_swap.h" 3 4 # 11 "/usr/include/machine/bswap.h" 2 3 4 #define __BSWAP_RENAME #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/usr/include/machine/bswap.h" 3 4 # 1 "/usr/include/sys/bswap.h" 1 3 4 /* $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ */ /* Written by Manuel Bouyer. Public domain */ #ifndef _SYS_BSWAP_H_ #define _SYS_BSWAP_H_ #ifndef _LOCORE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 9 "/usr/include/sys/bswap.h" 3 4 # 1 "/usr/include/sys/stdint.h" 1 3 4 /* $NetBSD: stdint.h,v 1.7 2013/04/22 21:26:48 joerg Exp $ */ /*- * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _SYS_STDINT_H_ #define _SYS_STDINT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/stdint.h" 3 4 # 36 "/usr/include/sys/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/stdint.h" 3 4 # 37 "/usr/include/sys/stdint.h" 3 4 #ifndef int8_t typedef __int8_t int8_t; #define int8_t __int8_t #endif # 42 "/usr/include/sys/stdint.h" 3 4 #ifndef uint8_t typedef __uint8_t uint8_t; #define uint8_t __uint8_t #endif # 47 "/usr/include/sys/stdint.h" 3 4 #ifndef int16_t typedef __int16_t int16_t; #define int16_t __int16_t #endif # 52 "/usr/include/sys/stdint.h" 3 4 #ifndef uint16_t typedef __uint16_t uint16_t; #define uint16_t __uint16_t #endif # 57 "/usr/include/sys/stdint.h" 3 4 #ifndef int32_t typedef __int32_t int32_t; #define int32_t __int32_t #endif # 62 "/usr/include/sys/stdint.h" 3 4 #ifndef uint32_t typedef __uint32_t uint32_t; #define uint32_t __uint32_t #endif # 67 "/usr/include/sys/stdint.h" 3 4 #ifndef int64_t typedef __int64_t int64_t; #define int64_t __int64_t #endif # 72 "/usr/include/sys/stdint.h" 3 4 #ifndef uint64_t typedef __uint64_t uint64_t; #define uint64_t __uint64_t #endif # 77 "/usr/include/sys/stdint.h" 3 4 #ifndef intptr_t typedef __intptr_t intptr_t; #define intptr_t __intptr_t #endif # 82 "/usr/include/sys/stdint.h" 3 4 #ifndef uintptr_t typedef __uintptr_t uintptr_t; #define uintptr_t __uintptr_t #endif # 87 "/usr/include/sys/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 88 "/usr/include/sys/stdint.h" 3 4 # 1 "/usr/include/machine/int_mwgwtypes.h" 1 3 4 /* $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_INT_MWGWTYPES_H_ #define _AMD64_INT_MWGWTYPES_H_ #ifdef __UINT_FAST64_TYPE__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/machine/int_mwgwtypes.h" 3 4 # 1 "/usr/include/sys/common_int_mwgwtypes.h" 1 3 4 /* $NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Joerg Sonnenberger. * * 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. */ #ifndef _SYS_COMMON_INT_MWGWTYPES_H_ #define _SYS_COMMON_INT_MWGWTYPES_H_ #ifndef __UINT_FAST64_TYPE__ #error Your compiler does not provide min/fast width type macros. #endif # 38 "/usr/include/sys/common_int_mwgwtypes.h" 3 4 /* * 7.18.1 Integer types */ /* 7.18.1.2 Minimum-width integer types */ typedef __INT_LEAST8_TYPE__ int_least8_t; typedef __UINT_LEAST8_TYPE__ uint_least8_t; typedef __INT_LEAST16_TYPE__ int_least16_t; typedef __UINT_LEAST16_TYPE__ uint_least16_t; typedef __INT_LEAST32_TYPE__ int_least32_t; typedef __UINT_LEAST32_TYPE__ uint_least32_t; typedef __INT_LEAST64_TYPE__ int_least64_t; typedef __UINT_LEAST64_TYPE__ uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ typedef __INT_FAST8_TYPE__ int_fast8_t; typedef __UINT_FAST8_TYPE__ uint_fast8_t; typedef __INT_FAST16_TYPE__ int_fast16_t; typedef __UINT_FAST16_TYPE__ uint_fast16_t; typedef __INT_FAST32_TYPE__ int_fast32_t; typedef __UINT_FAST32_TYPE__ uint_fast32_t; typedef __INT_FAST64_TYPE__ int_fast64_t; typedef __UINT_FAST64_TYPE__ uint_fast64_t; /* 7.18.1.5 Greatest-width integer types */ typedef __INTMAX_TYPE__ intmax_t; typedef __UINTMAX_TYPE__ uintmax_t; #endif /* _SYS_COMMON_INT_MWGWTYPES_H_ */ # 70 "/usr/include/sys/common_int_mwgwtypes.h" 3 4 # 37 "/usr/include/machine/int_mwgwtypes.h" 2 3 4 #else # 38 "/usr/include/machine/int_mwgwtypes.h" 3 4 #ifdef __x86_64__ /* * 7.18.1 Integer types */ /* 7.18.1.2 Minimum-width integer types */ typedef signed char int_least8_t; typedef unsigned char uint_least8_t; typedef short int int_least16_t; typedef unsigned short int uint_least16_t; typedef int int_least32_t; typedef unsigned int uint_least32_t; typedef long int int_least64_t; typedef unsigned long int uint_least64_t; /* 7.18.1.3 Fastest minimum-width integer types */ typedef int int_fast8_t; typedef unsigned int uint_fast8_t; typedef int int_fast16_t; typedef unsigned int uint_fast16_t; typedef int int_fast32_t; typedef unsigned int uint_fast32_t; typedef long int int_fast64_t; typedef unsigned long int uint_fast64_t; /* 7.18.1.5 Greatest-width integer types */ typedef long int intmax_t; typedef unsigned long int uintmax_t; #else /* __x86_64__ */ # 72 "/usr/include/machine/int_mwgwtypes.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 73 "/usr/include/machine/int_mwgwtypes.h" 3 4 # 74 "/usr/include/machine/int_mwgwtypes.h" 3 4 #endif /* __x86_64__ */ # 76 "/usr/include/machine/int_mwgwtypes.h" 3 4 #endif # 78 "/usr/include/machine/int_mwgwtypes.h" 3 4 #endif /* !_AMD64_INT_MWGWTYPES_H_ */ # 80 "/usr/include/machine/int_mwgwtypes.h" 3 4 # 89 "/usr/include/sys/stdint.h" 2 3 4 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) || \ (__cplusplus >= 201103L) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 92 "/usr/include/sys/stdint.h" 3 4 # 1 "/usr/include/machine/int_limits.h" 1 3 4 /* $NetBSD: int_limits.h,v 1.9 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_INT_LIMITS_H_ #define _AMD64_INT_LIMITS_H_ #ifdef __SIG_ATOMIC_MAX__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/machine/int_limits.h" 3 4 # 1 "/usr/include/sys/common_int_limits.h" 1 3 4 /* $NetBSD: common_int_limits.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Joerg Sonnenberger. * * 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. */ #ifndef _SYS_COMMON_INT_LIMITS_H_ #define _SYS_COMMON_INT_LIMITS_H_ #ifndef __SIG_ATOMIC_MAX__ #error Your compiler does not provide limit macros. #endif # 38 "/usr/include/sys/common_int_limits.h" 3 4 /* * 7.18.2 Limits of specified-width integer types */ /* 7.18.2.1 Limits of exact-width integer types */ /* minimum values of exact-width signed integer types */ #define INT8_MIN (-__INT8_MAX__-1) #define INT16_MIN (-__INT16_MAX__-1) #define INT32_MIN (-__INT32_MAX__-1) #define INT64_MIN (-__INT64_MAX__-1) /* maximum values of exact-width signed integer types */ #define INT8_MAX __INT8_MAX__ #define INT16_MAX __INT16_MAX__ #define INT32_MAX __INT32_MAX__ #define INT64_MAX __INT64_MAX__ /* maximum values of exact-width unsigned integer types */ #define UINT8_MAX __UINT8_MAX__ #define UINT16_MAX __UINT16_MAX__ #define UINT32_MAX __UINT32_MAX__ #define UINT64_MAX __UINT64_MAX__ /* 7.18.2.2 Limits of minimum-width integer types */ /* minimum values of minimum-width signed integer types */ #define INT_LEAST8_MIN (-__INT_LEAST8_MAX__-1) #define INT_LEAST16_MIN (-__INT_LEAST16_MAX__-1) #define INT_LEAST32_MIN (-__INT_LEAST32_MAX__-1) #define INT_LEAST64_MIN (-__INT_LEAST64_MAX__-1) /* maximum values of minimum-width signed integer types */ #define INT_LEAST8_MAX __INT_LEAST8_MAX__ #define INT_LEAST16_MAX __INT_LEAST16_MAX__ #define INT_LEAST32_MAX __INT_LEAST32_MAX__ #define INT_LEAST64_MAX __INT_LEAST64_MAX__ /* maximum values of minimum-width unsigned integer types */ #define UINT_LEAST8_MAX __UINT_LEAST8_MAX__ #define UINT_LEAST16_MAX __UINT_LEAST16_MAX__ #define UINT_LEAST32_MAX __UINT_LEAST32_MAX__ #define UINT_LEAST64_MAX __UINT_LEAST64_MAX__ /* 7.18.2.3 Limits of fastest minimum-width integer types */ /* minimum values of fastest minimum-width signed integer types */ #define INT_FAST8_MIN (-__INT_FAST8_MAX__-1) #define INT_FAST16_MIN (-__INT_FAST16_MAX__-1) #define INT_FAST32_MIN (-__INT_FAST32_MAX__-1) #define INT_FAST64_MIN (-__INT_FAST64_MAX__-1) /* maximum values of fastest minimum-width signed integer types */ #define INT_FAST8_MAX __INT_FAST8_MAX__ #define INT_FAST16_MAX __INT_FAST16_MAX__ #define INT_FAST32_MAX __INT_FAST32_MAX__ #define INT_FAST64_MAX __INT_FAST64_MAX__ /* maximum values of fastest minimum-width unsigned integer types */ #define UINT_FAST8_MAX __UINT_FAST8_MAX__ #define UINT_FAST16_MAX __UINT_FAST16_MAX__ #define UINT_FAST32_MAX __UINT_FAST32_MAX__ #define UINT_FAST64_MAX __UINT_FAST64_MAX__ /* 7.18.2.4 Limits of integer types capable of holding object pointers */ #define INTPTR_MIN (-__INTPTR_MAX__-1) #define INTPTR_MAX __INTPTR_MAX__ #define UINTPTR_MAX __UINTPTR_MAX__ /* 7.18.2.5 Limits of greatest-width integer types */ #define INTMAX_MIN (-__INTMAX_MAX__-1) #define INTMAX_MAX __INTMAX_MAX__ #define UINTMAX_MAX __UINTMAX_MAX__ /* * 7.18.3 Limits of other integer types */ /* limits of ptrdiff_t */ #define PTRDIFF_MIN (-__PTRDIFF_MAX__-1) #define PTRDIFF_MAX __PTRDIFF_MAX__ /* limits of sig_atomic_t */ #define SIG_ATOMIC_MIN (-__SIG_ATOMIC_MAX__-1) #define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__ /* limit of size_t */ #define SIZE_MAX __SIZE_MAX__ #endif /* _SYS_COMMON_INT_LIMITS_H_ */ # 131 "/usr/include/sys/common_int_limits.h" 3 4 # 37 "/usr/include/machine/int_limits.h" 2 3 4 #else # 38 "/usr/include/machine/int_limits.h" 3 4 #ifdef __x86_64__ /* * 7.18.2 Limits of specified-width integer types */ /* 7.18.2.1 Limits of exact-width integer types */ /* minimum values of exact-width signed integer types */ #define INT8_MIN (-0x7f-1) /* int8_t */ #define INT16_MIN (-0x7fff-1) /* int16_t */ #define INT32_MIN (-0x7fffffff-1) /* int32_t */ #define INT64_MIN (-0x7fffffffffffffffL-1) /* int64_t */ /* maximum values of exact-width signed integer types */ #define INT8_MAX 0x7f /* int8_t */ #define INT16_MAX 0x7fff /* int16_t */ #define INT32_MAX 0x7fffffff /* int32_t */ #define INT64_MAX 0x7fffffffffffffffL /* int64_t */ /* maximum values of exact-width unsigned integer types */ #define UINT8_MAX 0xff /* uint8_t */ #define UINT16_MAX 0xffff /* uint16_t */ #define UINT32_MAX 0xffffffffU /* uint32_t */ #define UINT64_MAX 0xffffffffffffffffUL /* uint64_t */ /* 7.18.2.2 Limits of minimum-width integer types */ /* minimum values of minimum-width signed integer types */ #define INT_LEAST8_MIN (-0x7f-1) /* int_least8_t */ #define INT_LEAST16_MIN (-0x7fff-1) /* int_least16_t */ #define INT_LEAST32_MIN (-0x7fffffff-1) /* int_least32_t */ #define INT_LEAST64_MIN (-0x7fffffffffffffffL-1) /* int_least64_t */ /* maximum values of minimum-width signed integer types */ #define INT_LEAST8_MAX 0x7f /* int_least8_t */ #define INT_LEAST16_MAX 0x7fff /* int_least16_t */ #define INT_LEAST32_MAX 0x7fffffff /* int_least32_t */ #define INT_LEAST64_MAX 0x7fffffffffffffffL /* int_least64_t */ /* maximum values of minimum-width unsigned integer types */ #define UINT_LEAST8_MAX 0xff /* uint_least8_t */ #define UINT_LEAST16_MAX 0xffff /* uint_least16_t */ #define UINT_LEAST32_MAX 0xffffffffU /* uint_least32_t */ #define UINT_LEAST64_MAX 0xffffffffffffffffUL /* uint_least64_t */ /* 7.18.2.3 Limits of fastest minimum-width integer types */ /* minimum values of fastest minimum-width signed integer types */ #define INT_FAST8_MIN (-0x7fffffff-1) /* int_fast8_t */ #define INT_FAST16_MIN (-0x7fffffff-1) /* int_fast16_t */ #define INT_FAST32_MIN (-0x7fffffff-1) /* int_fast32_t */ #define INT_FAST64_MIN (-0x7fffffffffffffffLL-1) /* int_fast64_t */ /* maximum values of fastest minimum-width signed integer types */ #define INT_FAST8_MAX 0x7fffffff /* int_fast8_t */ #define INT_FAST16_MAX 0x7fffffff /* int_fast16_t */ #define INT_FAST32_MAX 0x7fffffff /* int_fast32_t */ #define INT_FAST64_MAX 0x7fffffffffffffffLL /* int_fast64_t */ /* maximum values of fastest minimum-width unsigned integer types */ #define UINT_FAST8_MAX 0xffffffffU /* uint_fast8_t */ #define UINT_FAST16_MAX 0xffffffffU /* uint_fast16_t */ #define UINT_FAST32_MAX 0xffffffffU /* uint_fast32_t */ #define UINT_FAST64_MAX 0xffffffffffffffffULL /* uint_fast64_t */ /* 7.18.2.4 Limits of integer types capable of holding object pointers */ #define INTPTR_MIN (-0x7fffffffffffffffL-1) /* intptr_t */ #define INTPTR_MAX 0x7fffffffffffffffL /* intptr_t */ #define UINTPTR_MAX 0xffffffffffffffffUL /* uintptr_t */ /* 7.18.2.5 Limits of greatest-width integer types */ #define INTMAX_MIN (-0x7fffffffffffffffL-1) /* intmax_t */ #define INTMAX_MAX 0x7fffffffffffffffL /* intmax_t */ #define UINTMAX_MAX 0xffffffffffffffffUL /* uintmax_t */ /* * 7.18.3 Limits of other integer types */ /* limits of ptrdiff_t */ #define PTRDIFF_MIN (-0x7fffffffffffffffL-1) /* ptrdiff_t */ #define PTRDIFF_MAX 0x7fffffffffffffffL /* ptrdiff_t */ /* limits of sig_atomic_t */ #define SIG_ATOMIC_MIN (-0x7fffffff-1) /* sig_atomic_t */ #define SIG_ATOMIC_MAX 0x7fffffff /* sig_atomic_t */ /* limit of size_t */ #define SIZE_MAX 0xffffffffffffffffUL /* size_t */ #else /* __x86_64__ */ # 134 "/usr/include/machine/int_limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 135 "/usr/include/machine/int_limits.h" 3 4 # 136 "/usr/include/machine/int_limits.h" 3 4 #endif /* __x86_64__ */ # 138 "/usr/include/machine/int_limits.h" 3 4 #endif # 140 "/usr/include/machine/int_limits.h" 3 4 #endif /* !_AMD64_INT_LIMITS_H_ */ # 142 "/usr/include/machine/int_limits.h" 3 4 # 93 "/usr/include/sys/stdint.h" 2 3 4 #endif # 94 "/usr/include/sys/stdint.h" 3 4 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) || \ (__cplusplus >= 201103L) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 97 "/usr/include/sys/stdint.h" 3 4 # 1 "/usr/include/machine/int_const.h" 1 3 4 /* $NetBSD: int_const.h,v 1.5 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_INT_CONST_H_ #define _AMD64_INT_CONST_H_ #ifdef __INTMAX_C_SUFFIX__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/machine/int_const.h" 3 4 # 1 "/usr/include/sys/common_int_const.h" 1 3 4 /* $NetBSD: common_int_const.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Joerg Sonnenberger. * * 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. */ #ifndef _SYS_COMMON_INT_CONST_H_ #define _SYS_COMMON_INT_CONST_H_ #ifndef __INTMAX_C_SUFFIX__ #error Your compiler does not provide inter constant suffix macros. #endif # 38 "/usr/include/sys/common_int_const.h" 3 4 #define __int_join_(c,suffix) c ## suffix #define __int_join(c,suffix) __int_join_(c,suffix) /* * 7.18.4 Macros for integer constants */ /* 7.18.4.1 Macros for minimum-width integer constants */ #define INT8_C(c) __int_join(c, __INT8_C_SUFFIX__) #define INT16_C(c) __int_join(c, __INT16_C_SUFFIX__) #define INT32_C(c) __int_join(c, __INT32_C_SUFFIX__) #define INT64_C(c) __int_join(c, __INT64_C_SUFFIX__) #define UINT8_C(c) __int_join(c, __UINT8_C_SUFFIX__) #define UINT16_C(c) __int_join(c, __UINT16_C_SUFFIX__) #define UINT32_C(c) __int_join(c, __UINT32_C_SUFFIX__) #define UINT64_C(c) __int_join(c, __UINT64_C_SUFFIX__) /* 7.18.4.2 Macros for greatest-width integer constants */ #define INTMAX_C(c) __int_join(c, __INTMAX_C_SUFFIX__) #define UINTMAX_C(c) __int_join(c, __UINTMAX_C_SUFFIX__) #endif /* _SYS_COMMON_INT_CONST_H_ */ # 63 "/usr/include/sys/common_int_const.h" 3 4 # 37 "/usr/include/machine/int_const.h" 2 3 4 #else # 38 "/usr/include/machine/int_const.h" 3 4 #ifdef __x86_64__ /* * 7.18.4 Macros for integer constants */ /* 7.18.4.1 Macros for minimum-width integer constants */ #define INT8_C(c) c #define INT16_C(c) c #define INT32_C(c) c #define INT64_C(c) c ## L #define UINT8_C(c) c #define UINT16_C(c) c #define UINT32_C(c) c ## U #define UINT64_C(c) c ## UL /* 7.18.4.2 Macros for greatest-width integer constants */ #define INTMAX_C(c) c ## L #define UINTMAX_C(c) c ## UL #else /* __x86_64__ */ # 63 "/usr/include/machine/int_const.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 64 "/usr/include/machine/int_const.h" 3 4 # 65 "/usr/include/machine/int_const.h" 3 4 #endif /* __x86_64__ */ # 67 "/usr/include/machine/int_const.h" 3 4 #endif # 69 "/usr/include/machine/int_const.h" 3 4 #endif /* !_AMD64_INT_CONST_H_ */ # 71 "/usr/include/machine/int_const.h" 3 4 # 98 "/usr/include/sys/stdint.h" 2 3 4 #endif # 99 "/usr/include/sys/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 100 "/usr/include/sys/stdint.h" 3 4 # 1 "/usr/include/machine/wchar_limits.h" 1 3 4 /* $NetBSD: wchar_limits.h,v 1.3 2008/04/28 20:23:12 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_WCHAR_LIMITS_H_ #define _AMD64_WCHAR_LIMITS_H_ /* * 7.18.3 Limits of other integer types */ /* limits of wchar_t */ #define WCHAR_MIN (-0x7fffffff-1) /* wchar_t */ #define WCHAR_MAX 0x7fffffff /* wchar_t */ /* limits of wint_t */ #define WINT_MIN (-0x7fffffff-1) /* wint_t */ #define WINT_MAX 0x7fffffff /* wint_t */ #endif /* !_AMD64_WCHAR_LIMITS_H_ */ # 48 "/usr/include/machine/wchar_limits.h" 3 4 # 101 "/usr/include/sys/stdint.h" 2 3 4 #endif /* !_SYS_STDINT_H_ */ # 103 "/usr/include/sys/stdint.h" 3 4 # 10 "/usr/include/sys/bswap.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/usr/include/sys/bswap.h" 3 4 # 1 "/usr/include/machine/bswap.h" 1 3 4 /* $NetBSD: bswap.h,v 1.3 2008/10/26 00:08:15 mrg Exp $ */ /* Written by Manuel Bouyer. Public domain */ #ifndef _X86_64_BSWAP_H_ #define _X86_64_BSWAP_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 10 "/usr/include/machine/bswap.h" 3 4 # 11 "/usr/include/machine/bswap.h" 3 4 #define __BSWAP_RENAME #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/usr/include/machine/bswap.h" 3 4 # 14 "/usr/include/machine/bswap.h" 3 4 #else /* __x86_64__ */ # 16 "/usr/include/machine/bswap.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/usr/include/machine/bswap.h" 3 4 # 18 "/usr/include/machine/bswap.h" 3 4 #endif /* __x86_64__ */ # 20 "/usr/include/machine/bswap.h" 3 4 #endif /* !_X86_64_BSWAP_H_ */ # 22 "/usr/include/machine/bswap.h" 3 4 # 12 "/usr/include/sys/bswap.h" 2 3 4 __BEGIN_DECLS /* Always declare the functions in case their address is taken (etc) */ #if defined(_KERNEL) || defined(_STANDALONE) || !defined(__BSWAP_RENAME) uint16_t bswap16(uint16_t) __constfunc; uint32_t bswap32(uint32_t) __constfunc; #else # 19 "/usr/include/sys/bswap.h" 3 4 uint16_t bswap16(uint16_t) __RENAME(__bswap16) __constfunc; uint32_t bswap32(uint32_t) __RENAME(__bswap32) __constfunc; #endif # 22 "/usr/include/sys/bswap.h" 3 4 uint64_t bswap64(uint64_t) __constfunc; __END_DECLS #if defined(__GNUC__) && !defined(__lint__) /* machine/byte_swap.h might have defined inline versions */ #ifndef __BYTE_SWAP_U64_VARIABLE #define __BYTE_SWAP_U64_VARIABLE bswap64 #endif # 31 "/usr/include/sys/bswap.h" 3 4 #ifndef __BYTE_SWAP_U32_VARIABLE #define __BYTE_SWAP_U32_VARIABLE bswap32 #endif # 35 "/usr/include/sys/bswap.h" 3 4 #ifndef __BYTE_SWAP_U16_VARIABLE #define __BYTE_SWAP_U16_VARIABLE bswap16 #endif # 39 "/usr/include/sys/bswap.h" 3 4 #define __byte_swap_u64_constant(x) \ (__CAST(uint64_t, \ ((((x) & 0xff00000000000000ull) >> 56) | \ (((x) & 0x00ff000000000000ull) >> 40) | \ (((x) & 0x0000ff0000000000ull) >> 24) | \ (((x) & 0x000000ff00000000ull) >> 8) | \ (((x) & 0x00000000ff000000ull) << 8) | \ (((x) & 0x0000000000ff0000ull) << 24) | \ (((x) & 0x000000000000ff00ull) << 40) | \ (((x) & 0x00000000000000ffull) << 56)))) #define __byte_swap_u32_constant(x) \ (__CAST(uint32_t, \ ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)))) #define __byte_swap_u16_constant(x) \ (__CAST(uint16_t, \ ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)))) #define bswap64(x) \ __CAST(uint64_t, __builtin_constant_p((x)) ? \ __byte_swap_u64_constant(x) : __BYTE_SWAP_U64_VARIABLE(x)) #define bswap32(x) \ __CAST(uint32_t, __builtin_constant_p((x)) ? \ __byte_swap_u32_constant(x) : __BYTE_SWAP_U32_VARIABLE(x)) #define bswap16(x) \ __CAST(uint16_t, __builtin_constant_p((x)) ? \ __byte_swap_u16_constant(x) : __BYTE_SWAP_U16_VARIABLE(x)) #endif /* __GNUC__ && !__lint__ */ # 76 "/usr/include/sys/bswap.h" 3 4 #endif /* !_LOCORE */ # 77 "/usr/include/sys/bswap.h" 3 4 #endif /* !_SYS_BSWAP_H_ */ # 79 "/usr/include/sys/bswap.h" 3 4 # 14 "/usr/include/machine/bswap.h" 2 3 4 #else /* __x86_64__ */ # 16 "/usr/include/machine/bswap.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/usr/include/machine/bswap.h" 3 4 # 18 "/usr/include/machine/bswap.h" 3 4 #endif /* __x86_64__ */ # 20 "/usr/include/machine/bswap.h" 3 4 #endif /* !_X86_64_BSWAP_H_ */ # 22 "/usr/include/machine/bswap.h" 3 4 # 108 "/usr/include/sys/endian.h" 2 3 4 /* * Macros for network/external number representation conversion. */ #if BYTE_ORDER == BIG_ENDIAN && !defined(__lint__) #define ntohl(x) (x) #define ntohs(x) (x) #define htonl(x) (x) #define htons(x) (x) #define NTOHL(x) (void) (x) #define NTOHS(x) (void) (x) #define HTONL(x) (void) (x) #define HTONS(x) (void) (x) #else /* LITTLE_ENDIAN || !defined(__lint__) */ # 124 "/usr/include/sys/endian.h" 3 4 #define ntohl(x) bswap32(__CAST(uint32_t, (x))) #define ntohs(x) bswap16(__CAST(uint16_t, (x))) #define htonl(x) bswap32(__CAST(uint32_t, (x))) #define htons(x) bswap16(__CAST(uint16_t, (x))) #define NTOHL(x) (x) = ntohl(__CAST(uint32_t, (x))) #define NTOHS(x) (x) = ntohs(__CAST(uint16_t, (x))) #define HTONL(x) (x) = htonl(__CAST(uint32_t, (x))) #define HTONS(x) (x) = htons(__CAST(uint16_t, (x))) #endif /* LITTLE_ENDIAN || !defined(__lint__) */ # 135 "/usr/include/sys/endian.h" 3 4 /* * Macros to convert to a specific endianness. */ #if BYTE_ORDER == BIG_ENDIAN #define htobe16(x) (x) #define htobe32(x) (x) #define htobe64(x) (x) #define htole16(x) bswap16(__CAST(uint16_t, (x))) #define htole32(x) bswap32(__CAST(uint32_t, (x))) #define htole64(x) bswap64(__CAST(uint64_t, (x))) #define HTOBE16(x) __CAST(void, (x)) #define HTOBE32(x) __CAST(void, (x)) #define HTOBE64(x) __CAST(void, (x)) #define HTOLE16(x) (x) = bswap16(__CAST(uint16_t, (x))) #define HTOLE32(x) (x) = bswap32(__CAST(uint32_t, (x))) #define HTOLE64(x) (x) = bswap64(__CAST(uint64_t, (x))) #else /* LITTLE_ENDIAN */ # 157 "/usr/include/sys/endian.h" 3 4 #define htobe16(x) bswap16(__CAST(uint16_t, (x))) #define htobe32(x) bswap32(__CAST(uint32_t, (x))) #define htobe64(x) bswap64(__CAST(uint64_t, (x))) #define htole16(x) (x) #define htole32(x) (x) #define htole64(x) (x) #define HTOBE16(x) (x) = bswap16(__CAST(uint16_t, (x))) #define HTOBE32(x) (x) = bswap32(__CAST(uint32_t, (x))) #define HTOBE64(x) (x) = bswap64(__CAST(uint64_t, (x))) #define HTOLE16(x) __CAST(void, (x)) #define HTOLE32(x) __CAST(void, (x)) #define HTOLE64(x) __CAST(void, (x)) #endif /* LITTLE_ENDIAN */ # 173 "/usr/include/sys/endian.h" 3 4 #define be16toh(x) htobe16(x) #define be32toh(x) htobe32(x) #define be64toh(x) htobe64(x) #define le16toh(x) htole16(x) #define le32toh(x) htole32(x) #define le64toh(x) htole64(x) #define BE16TOH(x) HTOBE16(x) #define BE32TOH(x) HTOBE32(x) #define BE64TOH(x) HTOBE64(x) #define LE16TOH(x) HTOLE16(x) #define LE32TOH(x) HTOLE32(x) #define LE64TOH(x) HTOLE64(x) /* * Routines to encode/decode big- and little-endian multi-octet values * to/from an octet stream. */ #if __GNUC_PREREQ__(2, 95) #define __GEN_ENDIAN_ENC(bits, endian) \ static __inline void __unused \ endian ## bits ## enc(void *dst, uint ## bits ## _t u) \ { \ u = hto ## endian ## bits (u); \ __builtin_memcpy(dst, &u, sizeof(u)); \ } __GEN_ENDIAN_ENC(16, be) __GEN_ENDIAN_ENC(32, be) __GEN_ENDIAN_ENC(64, be) __GEN_ENDIAN_ENC(16, le) __GEN_ENDIAN_ENC(32, le) __GEN_ENDIAN_ENC(64, le) #undef __GEN_ENDIAN_ENC #define __GEN_ENDIAN_DEC(bits, endian) \ static __inline uint ## bits ## _t __unused \ endian ## bits ## dec(const void *buf) \ { \ uint ## bits ## _t u; \ __builtin_memcpy(&u, buf, sizeof(u)); \ return endian ## bits ## toh (u); \ } __GEN_ENDIAN_DEC(16, be) __GEN_ENDIAN_DEC(32, be) __GEN_ENDIAN_DEC(64, be) __GEN_ENDIAN_DEC(16, le) __GEN_ENDIAN_DEC(32, le) __GEN_ENDIAN_DEC(64, le) #undef __GEN_ENDIAN_DEC #else /* !(GCC >= 2.95) */ # 229 "/usr/include/sys/endian.h" 3 4 static __inline void __unused be16enc(void *buf, uint16_t u) { uint8_t *p = __CAST(uint8_t *, buf); p[0] = __CAST(uint8_t, ((__CAST(unsigned, u) >> 8) & 0xff)); p[1] = __CAST(uint8_t, (u & 0xff)); } static __inline void __unused le16enc(void *buf, uint16_t u) { uint8_t *p = __CAST(uint8_t *, buf); p[0] = __CAST(uint8_t, (u & 0xff)); p[1] = __CAST(uint8_t, ((__CAST(unsigned, u) >> 8) & 0xff)); } static __inline uint16_t __unused be16dec(const void *buf) { const uint8_t *p = __CAST(const uint8_t *, buf); return ((__CAST(uint16_t, p[0]) << 8) | p[1]); } static __inline uint16_t __unused le16dec(const void *buf) { const uint8_t *p = __CAST(const uint8_t *, buf); return (p[0] | (__CAST(uint16_t, p[1]) << 8)); } static __inline void __unused be32enc(void *buf, uint32_t u) { uint8_t *p = __CAST(uint8_t *, buf); p[0] = __CAST(uint8_t, ((u >> 24) & 0xff)); p[1] = __CAST(uint8_t, ((u >> 16) & 0xff)); p[2] = __CAST(uint8_t, ((u >> 8) & 0xff)); p[3] = __CAST(uint8_t, (u & 0xff)); } static __inline void __unused le32enc(void *buf, uint32_t u) { uint8_t *p = __CAST(uint8_t *, buf); p[0] = __CAST(uint8_t, (u & 0xff)); p[1] = __CAST(uint8_t, ((u >> 8) & 0xff)); p[2] = __CAST(uint8_t, ((u >> 16) & 0xff)); p[3] = __CAST(uint8_t, ((u >> 24) & 0xff)); } static __inline uint32_t __unused be32dec(const void *buf) { const uint8_t *p = __CAST(const uint8_t *, buf); return ((__CAST(uint32_t, be16dec(p)) << 16) | be16dec(p + 2)); } static __inline uint32_t __unused le32dec(const void *buf) { const uint8_t *p = __CAST(const uint8_t *, buf); return (le16dec(p) | (__CAST(uint32_t, le16dec(p + 2)) << 16)); } static __inline void __unused be64enc(void *buf, uint64_t u) { uint8_t *p = __CAST(uint8_t *, buf); be32enc(p, __CAST(uint32_t, (u >> 32))); be32enc(p + 4, __CAST(uint32_t, (u & 0xffffffffULL))); } static __inline void __unused le64enc(void *buf, uint64_t u) { uint8_t *p = __CAST(uint8_t *, buf); le32enc(p, __CAST(uint32_t, (u & 0xffffffffULL))); le32enc(p + 4, __CAST(uint32_t, (u >> 32))); } static __inline uint64_t __unused be64dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; return ((__CAST(uint64_t, be32dec(p)) << 32) | be32dec(p + 4)); } static __inline uint64_t __unused le64dec(const void *buf) { const uint8_t *p = (const uint8_t *)buf; return (le32dec(p) | (__CAST(uint64_t, le32dec(p + 4)) << 32)); } #endif /* GCC >= 2.95 */ # 337 "/usr/include/sys/endian.h" 3 4 #endif /* !_LOCORE */ # 339 "/usr/include/sys/endian.h" 3 4 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ # 340 "/usr/include/sys/endian.h" 3 4 #endif /* !_SYS_ENDIAN_H_ */ # 341 "/usr/include/sys/endian.h" 3 4 # 4 "/usr/include/machine/endian.h" 2 3 4 # 99 "/usr/include/sys/types.h" 2 3 4 #if defined(_NETBSD_SOURCE) typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; /* Sys V compatibility */ typedef unsigned short ushort; /* Sys V compatibility */ typedef unsigned int uint; /* Sys V compatibility */ typedef unsigned long ulong; /* Sys V compatibility */ #endif # 111 "/usr/include/sys/types.h" 3 4 typedef uint64_t u_quad_t; /* quads */ typedef int64_t quad_t; typedef quad_t * qaddr_t; /* * The types longlong_t and u_longlong_t exist for use with the * Sun-derived XDR routines involving these types, and their usage * in other contexts is discouraged. Further note that these types * may not be equivalent to "long long" and "unsigned long long", * they are only guaranteed to be signed and unsigned 64-bit types * respectively. Portable programs that need 64-bit types should use * the C99 types int64_t and uint64_t instead. */ typedef int64_t longlong_t; /* for XDR */ typedef uint64_t u_longlong_t; /* for XDR */ typedef int64_t blkcnt_t; /* fs block count */ typedef int32_t blksize_t; /* fs optimal block size */ #ifndef fsblkcnt_t typedef __fsblkcnt_t fsblkcnt_t; /* fs block count (statvfs) */ #define fsblkcnt_t __fsblkcnt_t #endif # 136 "/usr/include/sys/types.h" 3 4 #ifndef fsfilcnt_t typedef __fsfilcnt_t fsfilcnt_t; /* fs file count */ #define fsfilcnt_t __fsfilcnt_t #endif # 141 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) /* We don't and shouldn't use caddr_t in the kernel anymore */ #ifndef caddr_t typedef __caddr_t caddr_t; /* core address */ #define caddr_t __caddr_t #endif # 148 "/usr/include/sys/types.h" 3 4 #endif # 149 "/usr/include/sys/types.h" 3 4 #ifdef __daddr_t typedef __daddr_t daddr_t; /* disk address */ #undef __daddr_t #else # 154 "/usr/include/sys/types.h" 3 4 typedef int64_t daddr_t; /* disk address */ #endif # 156 "/usr/include/sys/types.h" 3 4 typedef uint64_t dev_t; /* device number */ typedef uint32_t fixpt_t; /* fixed point number */ #ifndef gid_t typedef __gid_t gid_t; /* group id */ #define gid_t __gid_t #endif # 164 "/usr/include/sys/types.h" 3 4 typedef uint32_t id_t; /* group id, process id or user id */ typedef uint64_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ #ifndef mode_t typedef __mode_t mode_t; /* permissions */ #define mode_t __mode_t #endif # 173 "/usr/include/sys/types.h" 3 4 typedef uint32_t nlink_t; /* link count */ #ifndef off_t typedef __off_t off_t; /* file offset */ #define off_t __off_t #endif # 180 "/usr/include/sys/types.h" 3 4 #ifndef pid_t typedef __pid_t pid_t; /* process id */ #define pid_t __pid_t #endif # 185 "/usr/include/sys/types.h" 3 4 typedef int32_t lwpid_t; /* LWP id */ typedef uint64_t rlim_t; /* resource limit */ typedef int32_t segsz_t; /* segment size */ typedef int32_t swblk_t; /* swap offset */ #ifndef uid_t typedef __uid_t uid_t; /* user id */ #define uid_t __uid_t #endif # 194 "/usr/include/sys/types.h" 3 4 typedef int mqd_t; typedef unsigned long cpuid_t; typedef int psetid_t; typedef volatile __cpu_simple_lock_nv_t __cpu_simple_lock_t; #if defined(_KERNEL) || defined(_STANDALONE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 205 "/usr/include/sys/types.h" 3 4 # 206 "/usr/include/sys/types.h" 3 4 /* * Deprecated Mach-style boolean_t type. Should not be used by new code. */ typedef int boolean_t; #ifndef TRUE #define TRUE 1 #endif # 214 "/usr/include/sys/types.h" 3 4 #ifndef FALSE #define FALSE 0 #endif # 217 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _STANDALONE */ # 219 "/usr/include/sys/types.h" 3 4 #if defined(_KERNEL) || defined(_LIBC) || defined(_KMEMUSER) /* * semctl(2)'s argument structure. This is here for the benefit of * . It is not in the user's namespace in SUSv2. * The SUSv2 semctl(2) takes variable arguments. */ union __semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ unsigned short *array; /* array for GETALL & SETALL */ }; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 231 "/usr/include/sys/types.h" 3 4 # 232 "/usr/include/sys/types.h" 3 4 #endif /* _KERNEL || _LIBC || _KMEMUSER */ # 233 "/usr/include/sys/types.h" 3 4 /* * These belong in unistd.h, but are placed here too to ensure that * long arguments will be promoted to off_t if the program fails to * include that header or explicitly cast them to off_t. */ #if defined(_NETBSD_SOURCE) #ifndef __OFF_T_SYSCALLS_DECLARED #define __OFF_T_SYSCALLS_DECLARED #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 243 "/usr/include/sys/types.h" 3 4 # 244 "/usr/include/sys/types.h" 3 4 __BEGIN_DECLS off_t lseek(int, off_t, int); int ftruncate(int, off_t); int truncate(const char *, off_t); __END_DECLS #endif /* !_KERNEL */ # 250 "/usr/include/sys/types.h" 3 4 #endif /* __OFF_T_SYSCALLS_DECLARED */ # 251 "/usr/include/sys/types.h" 3 4 #endif /* defined(_NETBSD_SOURCE) */ # 252 "/usr/include/sys/types.h" 3 4 #if defined(_NETBSD_SOURCE) /* Major, minor numbers, dev_t's. */ typedef int32_t __devmajor_t, __devminor_t; #define devmajor_t __devmajor_t #define devminor_t __devminor_t #define NODEVMAJOR (-1) #define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8)) #define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \ (((uint32_t)(x) & 0x000000ff) >> 0))) #define makedev(x,y) ((dev_t)((((dev_t)(x) << 8) & 0x000fff00U) | \ (((dev_t)(y) << 12) & 0xfff00000U) | \ (((dev_t)(y) << 0) & 0x000000ffU))) #endif # 266 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCK_T_ typedef _BSD_CLOCK_T_ clock_t; #undef _BSD_CLOCK_T_ #endif # 271 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_PTRDIFF_T_ typedef _BSD_PTRDIFF_T_ ptrdiff_t; #undef _BSD_PTRDIFF_T_ #endif # 276 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #define _SIZE_T #undef _BSD_SIZE_T_ #endif # 282 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SSIZE_T_ typedef _BSD_SSIZE_T_ ssize_t; #undef _BSD_SSIZE_T_ #endif # 287 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 292 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_CLOCKID_T_ typedef _BSD_CLOCKID_T_ clockid_t; #undef _BSD_CLOCKID_T_ #endif # 297 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_TIMER_T_ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif # 302 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_SUSECONDS_T_ typedef _BSD_SUSECONDS_T_ suseconds_t; #undef _BSD_SUSECONDS_T_ #endif # 307 "/usr/include/sys/types.h" 3 4 #ifdef _BSD_USECONDS_T_ typedef _BSD_USECONDS_T_ useconds_t; #undef _BSD_USECONDS_T_ #endif # 312 "/usr/include/sys/types.h" 3 4 #ifdef _NETBSD_SOURCE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 314 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/fd_set.h" 1 3 4 /* $NetBSD: fd_set.h,v 1.6 2015/11/06 15:41:25 christos Exp $ */ /*- * 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. * * from: @(#)types.h 8.4 (Berkeley) 1/21/94 */ #ifndef _SYS_FD_SET_H_ #define _SYS_FD_SET_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/fd_set.h" 3 4 # 38 "/usr/include/sys/fd_set.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/fd_set.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 39 "/usr/include/sys/fd_set.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/fd_set.h" 3 4 # 40 "/usr/include/sys/fd_set.h" 3 4 /* * Implementation dependent defines, hidden from user space. * POSIX does not specify them. */ typedef __uint32_t __fd_mask; /* 32 = 2 ^ 5 */ #define __NFDBITS (32) #define __NFDSHIFT (5) #define __NFDMASK (__NFDBITS - 1) /* * Select uses bit fields of file descriptors. These macros manipulate * such bit fields. Note: FD_SETSIZE may be defined by the user. */ #ifndef FD_SETSIZE #define FD_SETSIZE 256 #endif # 61 "/usr/include/sys/fd_set.h" 3 4 #define __NFD_LEN(a) (((a) + (__NFDBITS - 1)) / __NFDBITS) #define __NFD_SIZE __NFD_LEN(FD_SETSIZE) #define __NFD_BYTES(a) (__NFD_LEN(a) * sizeof(__fd_mask)) typedef struct fd_set { __fd_mask fds_bits[__NFD_SIZE]; } fd_set; #define FD_SET(n, p) \ ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] |= (1 << ((n) & __NFDMASK))) #define FD_CLR(n, p) \ ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] &= ~(1 << ((n) & __NFDMASK))) #define FD_ISSET(n, p) \ ((p)->fds_bits[(unsigned)(n) >> __NFDSHIFT] & (1 << ((n) & __NFDMASK))) #if __GNUC_PREREQ__(2, 95) #define FD_ZERO(p) (void)__builtin_memset((p), 0, sizeof(*(p))) #else # 79 "/usr/include/sys/fd_set.h" 3 4 #define FD_ZERO(p) do { \ fd_set *__fds = (p); \ unsigned int __i; \ for (__i = 0; __i < __NFD_SIZE; __i++) \ __fds->fds_bits[__i] = 0; \ } while (/* CONSTCOND */ 0) #endif /* GCC 2.95 */ # 86 "/usr/include/sys/fd_set.h" 3 4 /* * Expose our internals if we are not required to hide them. */ #if defined(_NETBSD_SOURCE) #define fd_mask __fd_mask #define NFDBITS __NFDBITS #if __GNUC_PREREQ__(2, 95) #define FD_COPY(f, t) (void)__builtin_memcpy((t), (f), sizeof(*(f))) #else # 98 "/usr/include/sys/fd_set.h" 3 4 #define FD_COPY(f, t) do { \ fd_set *__f = (f), *__t = (t); \ unsigned int __i; \ for (__i = 0; __i < __NFD_SIZE; __i++) \ __t->fds_bits[__i] = __f->fds_bits[__i]; \ } while (/* CONSTCOND */ 0) #endif /* GCC 2.95 */ # 105 "/usr/include/sys/fd_set.h" 3 4 #endif /* _NETBSD_SOURCE */ # 107 "/usr/include/sys/fd_set.h" 3 4 #endif /* _SYS_FD_SET_H_ */ # 109 "/usr/include/sys/fd_set.h" 3 4 # 315 "/usr/include/sys/types.h" 2 3 4 #define NBBY 8 typedef struct kauth_cred *kauth_cred_t; typedef int pri_t; #endif # 323 "/usr/include/sys/types.h" 3 4 #if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER)) /* * Forward structure declarations for function prototypes. We include the * common structures that cross subsystem boundaries here; others are mostly * used in the same place that the structure is defined. */ struct lwp; typedef struct lwp lwp_t; struct __ucontext; struct proc; typedef struct proc proc_t; struct pgrp; struct rusage; struct file; typedef struct file file_t; struct buf; typedef struct buf buf_t; struct tty; struct uio; #endif # 344 "/usr/include/sys/types.h" 3 4 #ifdef _KERNEL #define SET(t, f) ((t) |= (f)) #define ISSET(t, f) ((t) & (f)) #define CLR(t, f) ((t) &= ~(f)) #endif # 350 "/usr/include/sys/types.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) #if (_POSIX_C_SOURCE - 0L) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 354 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/pthread_types.h" 1 3 4 /* $NetBSD: pthread_types.h,v 1.22 2016/07/20 21:02:04 christos Exp $ */ /*- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Nathan J. Williams. * * 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. */ #ifndef _LIB_PTHREAD_TYPES_H #define _LIB_PTHREAD_TYPES_H /* * We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the * POSIX spinlock object. * * C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer. * This does not work for volatile types. Since C++ does not touch the guts * of those types, we do not include volatile in the C++ definitions. */ typedef __cpu_simple_lock_t pthread_spin_t; #ifdef __cplusplus typedef __cpu_simple_lock_nv_t __pthread_spin_t; #define __pthread_volatile #else # 48 "/usr/include/pthread_types.h" 3 4 typedef pthread_spin_t __pthread_spin_t; #define __pthread_volatile volatile #endif # 51 "/usr/include/pthread_types.h" 3 4 /* * Copied from PTQ_HEAD in pthread_queue.h */ #define _PTQ_HEAD(name, type) \ struct name { \ struct type *ptqh_first;/* first element */ \ struct type **ptqh_last;/* addr of last next element */ \ } _PTQ_HEAD(pthread_queue_struct_t, __pthread_st); typedef struct pthread_queue_struct_t pthread_queue_t; struct __pthread_st; struct __pthread_attr_st; struct __pthread_mutex_st; struct __pthread_mutexattr_st; struct __pthread_cond_st; struct __pthread_condattr_st; struct __pthread_spin_st; struct __pthread_rwlock_st; struct __pthread_rwlockattr_st; struct __pthread_barrier_st; struct __pthread_barrierattr_st; typedef struct __pthread_st *pthread_t; typedef struct __pthread_attr_st pthread_attr_t; typedef struct __pthread_mutex_st pthread_mutex_t; typedef struct __pthread_mutexattr_st pthread_mutexattr_t; typedef struct __pthread_cond_st pthread_cond_t; typedef struct __pthread_condattr_st pthread_condattr_t; typedef struct __pthread_once_st pthread_once_t; typedef struct __pthread_spinlock_st pthread_spinlock_t; typedef struct __pthread_rwlock_st pthread_rwlock_t; typedef struct __pthread_rwlockattr_st pthread_rwlockattr_t; typedef struct __pthread_barrier_st pthread_barrier_t; typedef struct __pthread_barrierattr_st pthread_barrierattr_t; typedef int pthread_key_t; struct __pthread_attr_st { unsigned int pta_magic; int pta_flags; void *pta_private; }; /* * ptm_owner is the actual lock field which is locked via CAS operation. * This structure's layout is designed to compatible with the previous * version used in SA pthreads. */ #ifdef __CPU_SIMPLE_LOCK_PAD /* * If __SIMPLE_UNLOCKED != 0 and we have to pad, we have to worry about * endianness. Currently that isn't an issue but put in a check in case * something changes in the future. */ #if __SIMPLELOCK_UNLOCKED != 0 #error __CPU_SIMPLE_LOCK_PAD incompatible with __SIMPLELOCK_UNLOCKED == 0 #endif # 111 "/usr/include/pthread_types.h" 3 4 #endif # 112 "/usr/include/pthread_types.h" 3 4 struct __pthread_mutex_st { unsigned int ptm_magic; __pthread_spin_t ptm_errorcheck; #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad1[3]; #if (__STDC_VERSION__ - 0) >= 199901L #define _PTHREAD_MUTEX_PAD(a) .a = { 0, 0, 0 }, #else # 120 "/usr/include/pthread_types.h" 3 4 #define _PTHREAD_MUTEX_PAD(a) { 0, 0, 0 }, #endif # 122 "/usr/include/pthread_types.h" 3 4 #else # 123 "/usr/include/pthread_types.h" 3 4 #define _PTHREAD_MUTEX_PAD(a) #endif # 125 "/usr/include/pthread_types.h" 3 4 union { unsigned char ptm_ceiling; __pthread_spin_t ptm_unused; }; #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad2[3]; #endif # 132 "/usr/include/pthread_types.h" 3 4 __pthread_volatile pthread_t ptm_owner; pthread_t * __pthread_volatile ptm_waiters; unsigned int ptm_recursed; void *ptm_spare2; /* unused - backwards compat */ }; #define _PT_MUTEX_MAGIC 0x33330003 #define _PT_MUTEX_DEAD 0xDEAD0003 #if (__STDC_VERSION__ - 0) >= 199901L #define _PTHREAD_MUTEX_INI(a, b) .a = b #define _PTHREAD_MUTEX_UNI(a) .a = 0 #else # 145 "/usr/include/pthread_types.h" 3 4 #define _PTHREAD_MUTEX_INI(a, b) b #define _PTHREAD_MUTEX_UNI(a) { 0 } #endif # 148 "/usr/include/pthread_types.h" 3 4 #define _PTHREAD_MUTEX_INITIALIZER { \ _PTHREAD_MUTEX_INI(ptm_magic, _PT_MUTEX_MAGIC), \ _PTHREAD_MUTEX_INI(ptm_errorcheck, __SIMPLELOCK_UNLOCKED), \ _PTHREAD_MUTEX_PAD(ptm_pad1) \ _PTHREAD_MUTEX_UNI(ptm_ceiling), \ _PTHREAD_MUTEX_PAD(ptm_pad2) \ _PTHREAD_MUTEX_INI(ptm_owner, NULL), \ _PTHREAD_MUTEX_INI(ptm_waiters, NULL), \ _PTHREAD_MUTEX_INI(ptm_recursed, 0), \ _PTHREAD_MUTEX_INI(ptm_spare2, NULL), \ } struct __pthread_mutexattr_st { unsigned int ptma_magic; void *ptma_private; }; #define _PT_MUTEXATTR_MAGIC 0x44440004 #define _PT_MUTEXATTR_DEAD 0xDEAD0004 struct __pthread_cond_st { unsigned int ptc_magic; /* Protects the queue of waiters */ __pthread_spin_t ptc_lock; pthread_queue_t ptc_waiters; pthread_mutex_t *ptc_mutex; /* Current mutex */ void *ptc_private; }; #define _PT_COND_MAGIC 0x55550005 #define _PT_COND_DEAD 0xDEAD0005 #define _PTHREAD_COND_INITIALIZER { _PT_COND_MAGIC, \ __SIMPLELOCK_UNLOCKED, \ {NULL, NULL}, \ NULL, \ NULL \ } struct __pthread_condattr_st { unsigned int ptca_magic; void *ptca_private; }; #define _PT_CONDATTR_MAGIC 0x66660006 #define _PT_CONDATTR_DEAD 0xDEAD0006 struct __pthread_once_st { pthread_mutex_t pto_mutex; int pto_done; }; #define _PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 } struct __pthread_spinlock_st { unsigned int pts_magic; __pthread_spin_t pts_spin; int pts_flags; }; #define _PT_SPINLOCK_MAGIC 0x77770007 #define _PT_SPINLOCK_DEAD 0xDEAD0007 #define _PT_SPINLOCK_PSHARED 0x00000001 /* PTHREAD_SPINLOCK_INITIALIZER is an extension not specified by POSIX. */ #define _PTHREAD_SPINLOCK_INITIALIZER { _PT_SPINLOCK_MAGIC, \ __SIMPLELOCK_UNLOCKED, \ 0 \ } struct __pthread_rwlock_st { unsigned int ptr_magic; /* Protects data below */ __pthread_spin_t ptr_interlock; pthread_queue_t ptr_rblocked; pthread_queue_t ptr_wblocked; unsigned int ptr_nreaders; __pthread_volatile pthread_t ptr_owner; void *ptr_private; }; #define _PT_RWLOCK_MAGIC 0x99990009 #define _PT_RWLOCK_DEAD 0xDEAD0009 #define _PTHREAD_RWLOCK_INITIALIZER { _PT_RWLOCK_MAGIC, \ __SIMPLELOCK_UNLOCKED, \ {NULL, NULL}, \ {NULL, NULL}, \ 0, \ NULL, \ NULL, \ } struct __pthread_rwlockattr_st { unsigned int ptra_magic; void *ptra_private; }; #define _PT_RWLOCKATTR_MAGIC 0x99990909 #define _PT_RWLOCKATTR_DEAD 0xDEAD0909 struct __pthread_barrier_st { unsigned int ptb_magic; /* Protects data below */ pthread_spin_t ptb_lock; pthread_queue_t ptb_waiters; unsigned int ptb_initcount; unsigned int ptb_curcount; unsigned int ptb_generation; void *ptb_private; }; #define _PT_BARRIER_MAGIC 0x88880008 #define _PT_BARRIER_DEAD 0xDEAD0008 struct __pthread_barrierattr_st { unsigned int ptba_magic; void *ptba_private; }; #define _PT_BARRIERATTR_MAGIC 0x88880808 #define _PT_BARRIERATTR_DEAD 0xDEAD0808 #endif /* _LIB_PTHREAD_TYPES_H */ # 281 "/usr/include/pthread_types.h" 3 4 # 355 "/usr/include/sys/types.h" 2 3 4 #endif # 356 "/usr/include/sys/types.h" 3 4 #endif # 357 "/usr/include/sys/types.h" 3 4 #endif /* !_SYS_TYPES_H_ */ # 359 "/usr/include/sys/types.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" /* * BSD code generally assumes that this types are present, so pull this in * here for platforms like Mac OS X. */ #if HAVE_INTTYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # 1 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 1 3 4 /*===---- inttypes.h - Standard header for integer printf macros ----------===*\ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * \*===----------------------------------------------------------------------===*/ #ifndef __CLANG_INTTYPES_H #define __CLANG_INTTYPES_H #if defined(_MSC_VER) && _MSC_VER < 1800 #error MSVC does not have inttypes.h prior to Visual Studio 2013 #endif # 29 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 30 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 3 4 # 1 "/usr/include/inttypes.h" 1 3 4 /* $NetBSD: inttypes.h,v 1.11 2015/01/16 18:35:59 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _INTTYPES_H_ #define _INTTYPES_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/inttypes.h" 3 4 # 36 "/usr/include/inttypes.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/inttypes.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 37 "/usr/include/inttypes.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/inttypes.h" 3 4 # 1 "/usr/include/sys/inttypes.h" 1 3 4 /* $NetBSD: inttypes.h,v 1.6 2013/04/22 21:26:48 joerg Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus J. Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _SYS_INTTYPES_H_ #define _SYS_INTTYPES_H_ /* * 7.8 Format conversion of integer types */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/inttypes.h" 3 4 # 40 "/usr/include/sys/inttypes.h" 3 4 #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) || \ (__cplusplus >= 201103L) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/inttypes.h" 3 4 # 1 "/usr/include/machine/int_fmtio.h" 1 3 4 /* $NetBSD: int_fmtio.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_INT_FMTIO_H_ #define _AMD64_INT_FMTIO_H_ #ifdef __INTPTR_FMTd__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/machine/int_fmtio.h" 3 4 # 1 "/usr/include/sys/common_int_fmtio.h" 1 3 4 /* $NetBSD: common_int_fmtio.h,v 1.1 2014/07/25 21:43:13 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Joerg Sonnenberger. * * 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. */ #ifndef _SYS_COMMON_INT_FMTIO_H_ #define _SYS_COMMON_INT_FMTIO_H_ #ifndef __INTPTR_FMTd__ #error Your compiler does not provide format string macros. #endif # 38 "/usr/include/sys/common_int_fmtio.h" 3 4 /* * 7.8.1 Macros for format specifiers */ /* fprintf macros for signed integers */ #define PRId8 __INT8_FMTd__ #define PRId16 __INT16_FMTd__ #define PRId32 __INT32_FMTd__ #define PRId64 __INT64_FMTd__ #define PRIdLEAST8 __INT_LEAST8_FMTd__ #define PRIdLEAST16 __INT_LEAST16_FMTd__ #define PRIdLEAST32 __INT_LEAST32_FMTd__ #define PRIdLEAST64 __INT_LEAST64_FMTd__ #define PRIdFAST8 __INT_FAST8_FMTd__ #define PRIdFAST16 __INT_FAST16_FMTd__ #define PRIdFAST32 __INT_FAST32_FMTd__ #define PRIdFAST64 __INT_FAST64_FMTd__ #define PRIdMAX __INTMAX_FMTd__ #define PRIdPTR __INTPTR_FMTd__ #define PRIi8 __INT8_FMTi__ #define PRIi16 __INT16_FMTi__ #define PRIi32 __INT32_FMTi__ #define PRIi64 __INT64_FMTi__ #define PRIiLEAST8 __INT_LEAST8_FMTi__ #define PRIiLEAST16 __INT_LEAST16_FMTi__ #define PRIiLEAST32 __INT_LEAST32_FMTi__ #define PRIiLEAST64 __INT_LEAST64_FMTi__ #define PRIiFAST8 __INT_FAST8_FMTi__ #define PRIiFAST16 __INT_FAST16_FMTi__ #define PRIiFAST32 __INT_FAST32_FMTi__ #define PRIiFAST64 __INT_FAST64_FMTi__ #define PRIiMAX __INTMAX_FMTi__ #define PRIiPTR __INTPTR_FMTi__ /* fprintf macros for unsigned integers */ #define PRIo8 __UINT8_FMTo__ #define PRIo16 __UINT16_FMTo__ #define PRIo32 __UINT32_FMTo__ #define PRIo64 __UINT64_FMTo__ #define PRIoLEAST8 __UINT_LEAST8_FMTo__ #define PRIoLEAST16 __UINT_LEAST16_FMTo__ #define PRIoLEAST32 __UINT_LEAST32_FMTo__ #define PRIoLEAST64 __UINT_LEAST64_FMTo__ #define PRIoFAST8 __UINT_FAST8_FMTo__ #define PRIoFAST16 __UINT_FAST16_FMTo__ #define PRIoFAST32 __UINT_FAST32_FMTo__ #define PRIoFAST64 __UINT_FAST64_FMTo__ #define PRIoMAX __UINTMAX_FMTo__ #define PRIoPTR __UINTPTR_FMTo__ #define PRIu8 __UINT8_FMTu__ #define PRIu16 __UINT16_FMTu__ #define PRIu32 __UINT32_FMTu__ #define PRIu64 __UINT64_FMTu__ #define PRIuLEAST8 __UINT_LEAST8_FMTu__ #define PRIuLEAST16 __UINT_LEAST16_FMTu__ #define PRIuLEAST32 __UINT_LEAST32_FMTu__ #define PRIuLEAST64 __UINT_LEAST64_FMTu__ #define PRIuFAST8 __UINT_FAST8_FMTu__ #define PRIuFAST16 __UINT_FAST16_FMTu__ #define PRIuFAST32 __UINT_FAST32_FMTu__ #define PRIuFAST64 __UINT_FAST64_FMTu__ #define PRIuMAX __UINTMAX_FMTu__ #define PRIuPTR __UINTPTR_FMTu__ #define PRIx8 __UINT8_FMTx__ #define PRIx16 __UINT16_FMTx__ #define PRIx32 __UINT32_FMTx__ #define PRIx64 __UINT64_FMTx__ #define PRIxLEAST8 __UINT_LEAST8_FMTx__ #define PRIxLEAST16 __UINT_LEAST16_FMTx__ #define PRIxLEAST32 __UINT_LEAST32_FMTx__ #define PRIxLEAST64 __UINT_LEAST64_FMTx__ #define PRIxFAST8 __UINT_FAST8_FMTx__ #define PRIxFAST16 __UINT_FAST16_FMTx__ #define PRIxFAST32 __UINT_FAST32_FMTx__ #define PRIxFAST64 __UINT_FAST64_FMTx__ #define PRIxMAX __UINTMAX_FMTx__ #define PRIxPTR __UINTPTR_FMTx__ #define PRIX8 __UINT8_FMTX__ #define PRIX16 __UINT16_FMTX__ #define PRIX32 __UINT32_FMTX__ #define PRIX64 __UINT64_FMTX__ #define PRIXLEAST8 __UINT_LEAST8_FMTX__ #define PRIXLEAST16 __UINT_LEAST16_FMTX__ #define PRIXLEAST32 __UINT_LEAST32_FMTX__ #define PRIXLEAST64 __UINT_LEAST64_FMTX__ #define PRIXFAST8 __UINT_FAST8_FMTX__ #define PRIXFAST16 __UINT_FAST16_FMTX__ #define PRIXFAST32 __UINT_FAST32_FMTX__ #define PRIXFAST64 __UINT_FAST64_FMTX__ #define PRIXMAX __UINTMAX_FMTX__ #define PRIXPTR __UINTPTR_FMTX__ /* fscanf macros for signed integers */ #define SCNd8 __INT8_FMTd__ #define SCNd16 __INT16_FMTd__ #define SCNd32 __INT32_FMTd__ #define SCNd64 __INT64_FMTd__ #define SCNdLEAST8 __INT_LEAST8_FMTd__ #define SCNdLEAST16 __INT_LEAST16_FMTd__ #define SCNdLEAST32 __INT_LEAST32_FMTd__ #define SCNdLEAST64 __INT_LEAST64_FMTd__ #define SCNdFAST8 __INT_FAST8_FMTd__ #define SCNdFAST16 __INT_FAST16_FMTd__ #define SCNdFAST32 __INT_FAST32_FMTd__ #define SCNdFAST64 __INT_FAST64_FMTd__ #define SCNdMAX __INTMAX_FMTd__ #define SCNdPTR __INTPTR_FMTd__ #define SCNi8 __INT8_FMTi__ #define SCNi16 __INT16_FMTi__ #define SCNi32 __INT32_FMTi__ #define SCNi64 __INT64_FMTi__ #define SCNiLEAST8 __INT_LEAST8_FMTi__ #define SCNiLEAST16 __INT_LEAST16_FMTi__ #define SCNiLEAST32 __INT_LEAST32_FMTi__ #define SCNiLEAST64 __INT_LEAST64_FMTi__ #define SCNiFAST8 __INT_FAST8_FMTi__ #define SCNiFAST16 __INT_FAST16_FMTi__ #define SCNiFAST32 __INT_FAST32_FMTi__ #define SCNiFAST64 __INT_FAST64_FMTi__ #define SCNiMAX __INTMAX_FMTi__ #define SCNiPTR __INTPTR_FMTi__ /* fscanf macros for unsigned integers */ #define SCNo8 __UINT8_FMTo__ #define SCNo16 __UINT16_FMTo__ #define SCNo32 __UINT32_FMTo__ #define SCNo64 __UINT64_FMTo__ #define SCNoLEAST8 __UINT_LEAST8_FMTo__ #define SCNoLEAST16 __UINT_LEAST16_FMTo__ #define SCNoLEAST32 __UINT_LEAST32_FMTo__ #define SCNoLEAST64 __UINT_LEAST64_FMTo__ #define SCNoFAST8 __UINT_FAST8_FMTo__ #define SCNoFAST16 __UINT_FAST16_FMTo__ #define SCNoFAST32 __UINT_FAST32_FMTo__ #define SCNoFAST64 __UINT_FAST64_FMTo__ #define SCNoMAX __UINTMAX_FMTo__ #define SCNoPTR __UINTPTR_FMTo__ #define SCNu8 __UINT8_FMTu__ #define SCNu16 __UINT16_FMTu__ #define SCNu32 __UINT32_FMTu__ #define SCNu64 __UINT64_FMTu__ #define SCNuLEAST8 __UINT_LEAST8_FMTu__ #define SCNuLEAST16 __UINT_LEAST16_FMTu__ #define SCNuLEAST32 __UINT_LEAST32_FMTu__ #define SCNuLEAST64 __UINT_LEAST64_FMTu__ #define SCNuFAST8 __UINT_FAST8_FMTu__ #define SCNuFAST16 __UINT_FAST16_FMTu__ #define SCNuFAST32 __UINT_FAST32_FMTu__ #define SCNuFAST64 __UINT_FAST64_FMTu__ #define SCNuMAX __UINTMAX_FMTu__ #define SCNuPTR __UINTPTR_FMTu__ #define SCNx8 __UINT8_FMTx__ #define SCNx16 __UINT16_FMTx__ #define SCNx32 __UINT32_FMTx__ #define SCNx64 __UINT64_FMTx__ #define SCNxLEAST8 __UINT_LEAST8_FMTx__ #define SCNxLEAST16 __UINT_LEAST16_FMTx__ #define SCNxLEAST32 __UINT_LEAST32_FMTx__ #define SCNxLEAST64 __UINT_LEAST64_FMTx__ #define SCNxFAST8 __UINT_FAST8_FMTx__ #define SCNxFAST16 __UINT_FAST16_FMTx__ #define SCNxFAST32 __UINT_FAST32_FMTx__ #define SCNxFAST64 __UINT_FAST64_FMTx__ #define SCNxMAX __UINTMAX_FMTx__ #define SCNxPTR __UINTPTR_FMTx__ #define SCNX8 __UINT8_FMTX__ #define SCNX16 __UINT16_FMTX__ #define SCNX32 __UINT32_FMTX__ #define SCNX64 __UINT64_FMTX__ #define SCNXLEAST8 __UINT_LEAST8_FMTX__ #define SCNXLEAST16 __UINT_LEAST16_FMTX__ #define SCNXLEAST32 __UINT_LEAST32_FMTX__ #define SCNXLEAST64 __UINT_LEAST64_FMTX__ #define SCNXFAST8 __UINT_FAST8_FMTX__ #define SCNXFAST16 __UINT_FAST16_FMTX__ #define SCNXFAST32 __UINT_FAST32_FMTX__ #define SCNXFAST64 __UINT_FAST64_FMTX__ #define SCNXMAX __UINTMAX_FMTX__ #define SCNXPTR __UINTPTR_FMTX__ #endif /* _SYS_COMMON_INT_FMTIO_H_ */ # 231 "/usr/include/sys/common_int_fmtio.h" 3 4 # 37 "/usr/include/machine/int_fmtio.h" 2 3 4 #else # 38 "/usr/include/machine/int_fmtio.h" 3 4 #ifdef __x86_64__ /* * 7.8.1 Macros for format specifiers */ /* fprintf macros for signed integers */ #define PRId8 "d" /* int8_t */ #define PRId16 "d" /* int16_t */ #define PRId32 "d" /* int32_t */ #define PRId64 "ld" /* int64_t */ #define PRIdLEAST8 "d" /* int_least8_t */ #define PRIdLEAST16 "d" /* int_least16_t */ #define PRIdLEAST32 "d" /* int_least32_t */ #define PRIdLEAST64 "ld" /* int_least64_t */ #define PRIdFAST8 "d" /* int_fast8_t */ #define PRIdFAST16 "d" /* int_fast16_t */ #define PRIdFAST32 "d" /* int_fast32_t */ #define PRIdFAST64 "ld" /* int_fast64_t */ #define PRIdMAX "ld" /* intmax_t */ #define PRIdPTR "ld" /* intptr_t */ #define PRIi8 "i" /* int8_t */ #define PRIi16 "i" /* int16_t */ #define PRIi32 "i" /* int32_t */ #define PRIi64 "li" /* int64_t */ #define PRIiLEAST8 "i" /* int_least8_t */ #define PRIiLEAST16 "i" /* int_least16_t */ #define PRIiLEAST32 "i" /* int_least32_t */ #define PRIiLEAST64 "li" /* int_least64_t */ #define PRIiFAST8 "i" /* int_fast8_t */ #define PRIiFAST16 "i" /* int_fast16_t */ #define PRIiFAST32 "i" /* int_fast32_t */ #define PRIiFAST64 "li" /* int_fast64_t */ #define PRIiMAX "li" /* intmax_t */ #define PRIiPTR "li" /* intptr_t */ /* fprintf macros for unsigned integers */ #define PRIo8 "o" /* uint8_t */ #define PRIo16 "o" /* uint16_t */ #define PRIo32 "o" /* uint32_t */ #define PRIo64 "lo" /* uint64_t */ #define PRIoLEAST8 "o" /* uint_least8_t */ #define PRIoLEAST16 "o" /* uint_least16_t */ #define PRIoLEAST32 "o" /* uint_least32_t */ #define PRIoLEAST64 "lo" /* uint_least64_t */ #define PRIoFAST8 "o" /* uint_fast8_t */ #define PRIoFAST16 "o" /* uint_fast16_t */ #define PRIoFAST32 "o" /* uint_fast32_t */ #define PRIoFAST64 "lo" /* uint_fast64_t */ #define PRIoMAX "lo" /* uintmax_t */ #define PRIoPTR "lo" /* uintptr_t */ #define PRIu8 "u" /* uint8_t */ #define PRIu16 "u" /* uint16_t */ #define PRIu32 "u" /* uint32_t */ #define PRIu64 "lu" /* uint64_t */ #define PRIuLEAST8 "u" /* uint_least8_t */ #define PRIuLEAST16 "u" /* uint_least16_t */ #define PRIuLEAST32 "u" /* uint_least32_t */ #define PRIuLEAST64 "lu" /* uint_least64_t */ #define PRIuFAST8 "u" /* uint_fast8_t */ #define PRIuFAST16 "u" /* uint_fast16_t */ #define PRIuFAST32 "u" /* uint_fast32_t */ #define PRIuFAST64 "lu" /* uint_fast64_t */ #define PRIuMAX "lu" /* uintmax_t */ #define PRIuPTR "lu" /* uintptr_t */ #define PRIx8 "x" /* uint8_t */ #define PRIx16 "x" /* uint16_t */ #define PRIx32 "x" /* uint32_t */ #define PRIx64 "lx" /* uint64_t */ #define PRIxLEAST8 "x" /* uint_least8_t */ #define PRIxLEAST16 "x" /* uint_least16_t */ #define PRIxLEAST32 "x" /* uint_least32_t */ #define PRIxLEAST64 "lx" /* uint_least64_t */ #define PRIxFAST8 "x" /* uint_fast8_t */ #define PRIxFAST16 "x" /* uint_fast16_t */ #define PRIxFAST32 "x" /* uint_fast32_t */ #define PRIxFAST64 "lx" /* uint_fast64_t */ #define PRIxMAX "lx" /* uintmax_t */ #define PRIxPTR "lx" /* uintptr_t */ #define PRIX8 "X" /* uint8_t */ #define PRIX16 "X" /* uint16_t */ #define PRIX32 "X" /* uint32_t */ #define PRIX64 "lX" /* uint64_t */ #define PRIXLEAST8 "X" /* uint_least8_t */ #define PRIXLEAST16 "X" /* uint_least16_t */ #define PRIXLEAST32 "X" /* uint_least32_t */ #define PRIXLEAST64 "lX" /* uint_least64_t */ #define PRIXFAST8 "X" /* uint_fast8_t */ #define PRIXFAST16 "X" /* uint_fast16_t */ #define PRIXFAST32 "X" /* uint_fast32_t */ #define PRIXFAST64 "lX" /* uint_fast64_t */ #define PRIXMAX "lX" /* uintmax_t */ #define PRIXPTR "lX" /* uintptr_t */ /* fscanf macros for signed integers */ #define SCNd8 "hhd" /* int8_t */ #define SCNd16 "hd" /* int16_t */ #define SCNd32 "d" /* int32_t */ #define SCNd64 "ld" /* int64_t */ #define SCNdLEAST8 "hhd" /* int_least8_t */ #define SCNdLEAST16 "hd" /* int_least16_t */ #define SCNdLEAST32 "d" /* int_least32_t */ #define SCNdLEAST64 "ld" /* int_least64_t */ #define SCNdFAST8 "d" /* int_fast8_t */ #define SCNdFAST16 "d" /* int_fast16_t */ #define SCNdFAST32 "d" /* int_fast32_t */ #define SCNdFAST64 "ld" /* int_fast64_t */ #define SCNdMAX "ld" /* intmax_t */ #define SCNdPTR "ld" /* intptr_t */ #define SCNi8 "hhi" /* int8_t */ #define SCNi16 "hi" /* int16_t */ #define SCNi32 "i" /* int32_t */ #define SCNi64 "li" /* int64_t */ #define SCNiLEAST8 "hhi" /* int_least8_t */ #define SCNiLEAST16 "hi" /* int_least16_t */ #define SCNiLEAST32 "i" /* int_least32_t */ #define SCNiLEAST64 "li" /* int_least64_t */ #define SCNiFAST8 "i" /* int_fast8_t */ #define SCNiFAST16 "i" /* int_fast16_t */ #define SCNiFAST32 "i" /* int_fast32_t */ #define SCNiFAST64 "li" /* int_fast64_t */ #define SCNiMAX "li" /* intmax_t */ #define SCNiPTR "li" /* intptr_t */ /* fscanf macros for unsigned integers */ #define SCNo8 "hho" /* uint8_t */ #define SCNo16 "ho" /* uint16_t */ #define SCNo32 "o" /* uint32_t */ #define SCNo64 "lo" /* uint64_t */ #define SCNoLEAST8 "hho" /* uint_least8_t */ #define SCNoLEAST16 "ho" /* uint_least16_t */ #define SCNoLEAST32 "o" /* uint_least32_t */ #define SCNoLEAST64 "lo" /* uint_least64_t */ #define SCNoFAST8 "o" /* uint_fast8_t */ #define SCNoFAST16 "o" /* uint_fast16_t */ #define SCNoFAST32 "o" /* uint_fast32_t */ #define SCNoFAST64 "lo" /* uint_fast64_t */ #define SCNoMAX "lo" /* uintmax_t */ #define SCNoPTR "lo" /* uintptr_t */ #define SCNu8 "hhu" /* uint8_t */ #define SCNu16 "hu" /* uint16_t */ #define SCNu32 "u" /* uint32_t */ #define SCNu64 "lu" /* uint64_t */ #define SCNuLEAST8 "hhu" /* uint_least8_t */ #define SCNuLEAST16 "hu" /* uint_least16_t */ #define SCNuLEAST32 "u" /* uint_least32_t */ #define SCNuLEAST64 "lu" /* uint_least64_t */ #define SCNuFAST8 "u" /* uint_fast8_t */ #define SCNuFAST16 "u" /* uint_fast16_t */ #define SCNuFAST32 "u" /* uint_fast32_t */ #define SCNuFAST64 "lu" /* uint_fast64_t */ #define SCNuMAX "lu" /* uintmax_t */ #define SCNuPTR "lu" /* uintptr_t */ #define SCNx8 "hhx" /* uint8_t */ #define SCNx16 "hx" /* uint16_t */ #define SCNx32 "x" /* uint32_t */ #define SCNx64 "lx" /* uint64_t */ #define SCNxLEAST8 "hhx" /* uint_least8_t */ #define SCNxLEAST16 "hx" /* uint_least16_t */ #define SCNxLEAST32 "x" /* uint_least32_t */ #define SCNxLEAST64 "lx" /* uint_least64_t */ #define SCNxFAST8 "x" /* uint_fast8_t */ #define SCNxFAST16 "x" /* uint_fast16_t */ #define SCNxFAST32 "x" /* uint_fast32_t */ #define SCNxFAST64 "lx" /* uint_fast64_t */ #define SCNxMAX "lx" /* uintmax_t */ #define SCNxPTR "lx" /* uintptr_t */ #else /* __x86_64__ */ # 219 "/usr/include/machine/int_fmtio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 220 "/usr/include/machine/int_fmtio.h" 3 4 # 221 "/usr/include/machine/int_fmtio.h" 3 4 #endif /* __x86_64__ */ # 223 "/usr/include/machine/int_fmtio.h" 3 4 #endif # 225 "/usr/include/machine/int_fmtio.h" 3 4 #endif /* !_AMD64_INT_FMTIO_H_ */ # 227 "/usr/include/machine/int_fmtio.h" 3 4 # 44 "/usr/include/sys/inttypes.h" 2 3 4 #endif # 45 "/usr/include/sys/inttypes.h" 3 4 #endif /* !_SYS_INTTYPES_H_ */ # 47 "/usr/include/sys/inttypes.h" 3 4 # 38 "/usr/include/inttypes.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/inttypes.h" 3 4 # 39 "/usr/include/inttypes.h" 3 4 #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif # 44 "/usr/include/inttypes.h" 3 4 __BEGIN_DECLS intmax_t strtoimax(const char * __restrict, char ** __restrict, int); uintmax_t strtoumax(const char * __restrict, char ** __restrict, int); intmax_t wcstoimax(const wchar_t * __restrict, wchar_t ** __restrict, int); uintmax_t wcstoumax(const wchar_t * __restrict, wchar_t ** __restrict, int); intmax_t imaxabs(intmax_t); typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; imaxdiv_t imaxdiv(intmax_t, intmax_t); #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 69 "/usr/include/inttypes.h" 3 4 intmax_t strtoimax_l(const char * __restrict, char ** __restrict, int, locale_t); uintmax_t strtoumax_l(const char * __restrict, char ** __restrict, int, locale_t); intmax_t wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); uintmax_t wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); #endif # 78 "/usr/include/inttypes.h" 3 4 #if defined(_NETBSD_SOURCE) intmax_t strtoi(const char * __restrict, char ** __restrict, int, intmax_t, intmax_t, int *); uintmax_t strtou(const char * __restrict, char ** __restrict, int, uintmax_t, uintmax_t, int *); /* i18n variations */ intmax_t strtoi_l(const char * __restrict, char ** __restrict, int, intmax_t, intmax_t, int *, locale_t); uintmax_t strtou_l(const char * __restrict, char ** __restrict, int, uintmax_t, uintmax_t, int *, locale_t); #endif /* defined(_NETBSD_SOURCE) */ # 92 "/usr/include/inttypes.h" 3 4 __END_DECLS #endif /* !_INTTYPES_H_ */ # 96 "/usr/include/inttypes.h" 3 4 # 31 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 2 3 4 #if defined(_MSC_VER) && _MSC_VER < 1900 /* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x". * This triggers format warnings, so fix it up here. */ #undef PRId32 #undef PRIdLEAST32 #undef PRIdFAST32 #undef PRIi32 #undef PRIiLEAST32 #undef PRIiFAST32 #undef PRIo32 #undef PRIoLEAST32 #undef PRIoFAST32 #undef PRIu32 #undef PRIuLEAST32 #undef PRIuFAST32 #undef PRIx32 #undef PRIxLEAST32 #undef PRIxFAST32 #undef PRIX32 #undef PRIXLEAST32 #undef PRIXFAST32 #undef SCNd32 #undef SCNdLEAST32 #undef SCNdFAST32 #undef SCNi32 #undef SCNiLEAST32 #undef SCNiFAST32 #undef SCNo32 #undef SCNoLEAST32 #undef SCNoFAST32 #undef SCNu32 #undef SCNuLEAST32 #undef SCNuFAST32 #undef SCNx32 #undef SCNxLEAST32 #undef SCNxFAST32 #define PRId32 "d" #define PRIdLEAST32 "d" #define PRIdFAST32 "d" #define PRIi32 "i" #define PRIiLEAST32 "i" #define PRIiFAST32 "i" #define PRIo32 "o" #define PRIoLEAST32 "o" #define PRIoFAST32 "o" #define PRIu32 "u" #define PRIuLEAST32 "u" #define PRIuFAST32 "u" #define PRIx32 "x" #define PRIxLEAST32 "x" #define PRIxFAST32 "x" #define PRIX32 "X" #define PRIXLEAST32 "X" #define PRIXFAST32 "X" #define SCNd32 "d" #define SCNdLEAST32 "d" #define SCNdFAST32 "d" #define SCNi32 "i" #define SCNiLEAST32 "i" #define SCNiFAST32 "i" #define SCNo32 "o" #define SCNoLEAST32 "o" #define SCNoFAST32 "o" #define SCNu32 "u" #define SCNuLEAST32 "u" #define SCNuFAST32 "u" #define SCNx32 "x" #define SCNxLEAST32 "x" #define SCNxFAST32 "x" #endif # 105 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 3 4 #endif /* __CLANG_INTTYPES_H */ # 107 "/usr/local/lib/clang/6.0.0/include/inttypes.h" 3 4 # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" 2 #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" #if HAVE_STDINT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # 1 "/usr/local/lib/clang/6.0.0/include/stdint.h" 1 3 4 /*===---- stdint.h - Standard header for sized integer types --------------===*\ * * Copyright (c) 2009 Chris Lattner * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * \*===----------------------------------------------------------------------===*/ #ifndef __CLANG_STDINT_H #define __CLANG_STDINT_H /* If we're hosted, fall back to the system's stdint.h, which might have * additional definitions. */ #if __STDC_HOSTED__ && (1)/*__has_include_next()*/ // C99 7.18.3 Limits of other integer types // // Footnote 219, 220: C++ implementations should define these macros only when // __STDC_LIMIT_MACROS is defined before is included. // // Footnote 222: C++ implementations should define these macros only when // __STDC_CONSTANT_MACROS is defined before is included. // // C++11 [cstdint.syn]p2: // // The macros defined by are provided unconditionally. In particular, // the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in // footnotes 219, 220, and 222 in the C standard) play no role in C++. // // C11 removed the problematic footnotes. // // Work around this inconsistency by always defining those macros in C++ mode, // so that a C library implementation which follows the C99 standard can be // used in C++. # ifdef __cplusplus # if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # endif # 57 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # if !defined(__STDC_CONSTANT_MACROS) # define __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # endif # 61 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # endif # 62 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include_next #endif /* expanded by -frewrite-includes */ # 63 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # 64 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # undef __STDC_LIMIT_MACROS # undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # endif # 69 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # undef __STDC_CONSTANT_MACROS # undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # endif # 73 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #else # 75 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* C99 7.18.1.1 Exact-width integer types. * C99 7.18.1.2 Minimum-width integer types. * C99 7.18.1.3 Fastest minimum-width integer types. * * The standard requires that exact-width type be defined for 8-, 16-, 32-, and * 64-bit types if they are implemented. Other exact width types are optional. * This implementation defines an exact-width types for every integer width * that is represented in the standard integer types. * * The standard also requires minimum-width types be defined for 8-, 16-, 32-, * and 64-bit widths regardless of whether there are corresponding exact-width * types. * * To accommodate targets that are missing types that are exactly 8, 16, 32, or * 64 bits wide, this implementation takes an approach of cascading * redefintions, redefining __int_leastN_t to successively smaller exact-width * types. It is therefore important that the types are defined in order of * descending widths. * * We currently assume that the minimum-width types and the fastest * minimum-width types are the same. This is allowed by the standard, but is * suboptimal. * * In violation of the standard, some targets do not implement a type that is * wide enough to represent all of the required widths (8-, 16-, 32-, 64-bit). * To accommodate these targets, a required minimum-width type is only * defined if there exists an exact-width type of equal or greater width. */ #ifdef __INT64_TYPE__ # ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/ typedef __INT64_TYPE__ int64_t; # endif /* __int8_t_defined */ # 109 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 typedef __UINT64_TYPE__ uint64_t; # define __int_least64_t int64_t # define __uint_least64_t uint64_t # define __int_least32_t int64_t # define __uint_least32_t uint64_t # define __int_least16_t int64_t # define __uint_least16_t uint64_t # define __int_least8_t int64_t # define __uint_least8_t uint64_t #endif /* __INT64_TYPE__ */ # 119 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least64_t typedef __int_least64_t int_least64_t; typedef __uint_least64_t uint_least64_t; typedef __int_least64_t int_fast64_t; typedef __uint_least64_t uint_fast64_t; #endif /* __int_least64_t */ # 126 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT56_TYPE__ typedef __INT56_TYPE__ int56_t; typedef __UINT56_TYPE__ uint56_t; typedef int56_t int_least56_t; typedef uint56_t uint_least56_t; typedef int56_t int_fast56_t; typedef uint56_t uint_fast56_t; # define __int_least32_t int56_t # define __uint_least32_t uint56_t # define __int_least16_t int56_t # define __uint_least16_t uint56_t # define __int_least8_t int56_t # define __uint_least8_t uint56_t #endif /* __INT56_TYPE__ */ # 141 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT48_TYPE__ typedef __INT48_TYPE__ int48_t; typedef __UINT48_TYPE__ uint48_t; typedef int48_t int_least48_t; typedef uint48_t uint_least48_t; typedef int48_t int_fast48_t; typedef uint48_t uint_fast48_t; # define __int_least32_t int48_t # define __uint_least32_t uint48_t # define __int_least16_t int48_t # define __uint_least16_t uint48_t # define __int_least8_t int48_t # define __uint_least8_t uint48_t #endif /* __INT48_TYPE__ */ # 157 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT40_TYPE__ typedef __INT40_TYPE__ int40_t; typedef __UINT40_TYPE__ uint40_t; typedef int40_t int_least40_t; typedef uint40_t uint_least40_t; typedef int40_t int_fast40_t; typedef uint40_t uint_fast40_t; # define __int_least32_t int40_t # define __uint_least32_t uint40_t # define __int_least16_t int40_t # define __uint_least16_t uint40_t # define __int_least8_t int40_t # define __uint_least8_t uint40_t #endif /* __INT40_TYPE__ */ # 173 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT32_TYPE__ # ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/ typedef __INT32_TYPE__ int32_t; # endif /* __int8_t_defined */ # 180 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # ifndef __uint32_t_defined /* more glibc compatibility */ # define __uint32_t_defined typedef __UINT32_TYPE__ uint32_t; # endif /* __uint32_t_defined */ # 185 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define __int_least32_t int32_t # define __uint_least32_t uint32_t # define __int_least16_t int32_t # define __uint_least16_t uint32_t # define __int_least8_t int32_t # define __uint_least8_t uint32_t #endif /* __INT32_TYPE__ */ # 193 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least32_t typedef __int_least32_t int_least32_t; typedef __uint_least32_t uint_least32_t; typedef __int_least32_t int_fast32_t; typedef __uint_least32_t uint_fast32_t; #endif /* __int_least32_t */ # 200 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT24_TYPE__ typedef __INT24_TYPE__ int24_t; typedef __UINT24_TYPE__ uint24_t; typedef int24_t int_least24_t; typedef uint24_t uint_least24_t; typedef int24_t int_fast24_t; typedef uint24_t uint_fast24_t; # define __int_least16_t int24_t # define __uint_least16_t uint24_t # define __int_least8_t int24_t # define __uint_least8_t uint24_t #endif /* __INT24_TYPE__ */ # 213 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT16_TYPE__ #ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/ typedef __INT16_TYPE__ int16_t; #endif /* __int8_t_defined */ # 218 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 typedef __UINT16_TYPE__ uint16_t; # define __int_least16_t int16_t # define __uint_least16_t uint16_t # define __int_least8_t int16_t # define __uint_least8_t uint16_t #endif /* __INT16_TYPE__ */ # 224 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least16_t typedef __int_least16_t int_least16_t; typedef __uint_least16_t uint_least16_t; typedef __int_least16_t int_fast16_t; typedef __uint_least16_t uint_fast16_t; #endif /* __int_least16_t */ # 231 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT8_TYPE__ #ifndef __int8_t_defined /* glibc sys/types.h also defines int8_t*/ typedef __INT8_TYPE__ int8_t; #endif /* __int8_t_defined */ # 237 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 typedef __UINT8_TYPE__ uint8_t; # define __int_least8_t int8_t # define __uint_least8_t uint8_t #endif /* __INT8_TYPE__ */ # 241 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least8_t typedef __int_least8_t int_least8_t; typedef __uint_least8_t uint_least8_t; typedef __int_least8_t int_fast8_t; typedef __uint_least8_t uint_fast8_t; #endif /* __int_least8_t */ # 248 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* prevent glibc sys/types.h from defining conflicting types */ #ifndef __int8_t_defined # define __int8_t_defined #endif /* __int8_t_defined */ # 253 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* C99 7.18.1.4 Integer types capable of holding object pointers. */ #define __stdint_join3(a,b,c) a ## b ## c #ifndef _INTPTR_T #ifndef __intptr_t_defined typedef __INTPTR_TYPE__ intptr_t; #define __intptr_t_defined #define _INTPTR_T #endif # 264 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif # 265 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifndef _UINTPTR_T typedef __UINTPTR_TYPE__ uintptr_t; #define _UINTPTR_T #endif # 270 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* C99 7.18.1.5 Greatest-width integer types. */ typedef __INTMAX_TYPE__ intmax_t; typedef __UINTMAX_TYPE__ uintmax_t; /* C99 7.18.4 Macros for minimum-width integer constants. * * The standard requires that integer constant macros be defined for all the * minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-width * types are required, the corresponding integer constant macros are defined * here. This implementation also defines minimum-width types for every other * integer width that the target implements, so corresponding macros are * defined below, too. * * These macros are defined using the same successive-shrinking approach as * the type definitions above. It is likewise important that macros are defined * in order of decending width. * * Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]). */ #define __int_c_join(a, b) a ## b #define __int_c(v, suffix) __int_c_join(v, suffix) #define __uint_c(v, suffix) __int_c_join(v##U, suffix) #ifdef __INT64_TYPE__ # ifdef __INT64_C_SUFFIX__ # define __int64_c_suffix __INT64_C_SUFFIX__ # define __int32_c_suffix __INT64_C_SUFFIX__ # define __int16_c_suffix __INT64_C_SUFFIX__ # define __int8_c_suffix __INT64_C_SUFFIX__ # else # 305 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # undef __int64_c_suffix # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT64_C_SUFFIX__ */ # 310 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT64_TYPE__ */ # 311 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least64_t # ifdef __int64_c_suffix # define INT64_C(v) __int_c(v, __int64_c_suffix) # define UINT64_C(v) __uint_c(v, __int64_c_suffix) # else # 317 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT64_C(v) v # define UINT64_C(v) v ## U # endif /* __int64_c_suffix */ # 320 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __int_least64_t */ # 321 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT56_TYPE__ # ifdef __INT56_C_SUFFIX__ # define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__) # define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__) # define __int32_c_suffix __INT56_C_SUFFIX__ # define __int16_c_suffix __INT56_C_SUFFIX__ # define __int8_c_suffix __INT56_C_SUFFIX__ # else # 331 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT56_C(v) v # define UINT56_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT56_C_SUFFIX__ */ # 337 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT56_TYPE__ */ # 338 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT48_TYPE__ # ifdef __INT48_C_SUFFIX__ # define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__) # define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__) # define __int32_c_suffix __INT48_C_SUFFIX__ # define __int16_c_suffix __INT48_C_SUFFIX__ # define __int8_c_suffix __INT48_C_SUFFIX__ # else # 348 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT48_C(v) v # define UINT48_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT48_C_SUFFIX__ */ # 354 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT48_TYPE__ */ # 355 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT40_TYPE__ # ifdef __INT40_C_SUFFIX__ # define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__) # define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__) # define __int32_c_suffix __INT40_C_SUFFIX__ # define __int16_c_suffix __INT40_C_SUFFIX__ # define __int8_c_suffix __INT40_C_SUFFIX__ # else # 365 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT40_C(v) v # define UINT40_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT40_C_SUFFIX__ */ # 371 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT40_TYPE__ */ # 372 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT32_TYPE__ # ifdef __INT32_C_SUFFIX__ # define __int32_c_suffix __INT32_C_SUFFIX__ # define __int16_c_suffix __INT32_C_SUFFIX__ # define __int8_c_suffix __INT32_C_SUFFIX__ #else # 380 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT32_C_SUFFIX__ */ # 384 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT32_TYPE__ */ # 385 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least32_t # ifdef __int32_c_suffix # define INT32_C(v) __int_c(v, __int32_c_suffix) # define UINT32_C(v) __uint_c(v, __int32_c_suffix) # else # 391 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT32_C(v) v # define UINT32_C(v) v ## U # endif /* __int32_c_suffix */ # 394 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __int_least32_t */ # 395 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT24_TYPE__ # ifdef __INT24_C_SUFFIX__ # define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__) # define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__) # define __int16_c_suffix __INT24_C_SUFFIX__ # define __int8_c_suffix __INT24_C_SUFFIX__ # else # 404 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT24_C(v) v # define UINT24_C(v) v ## U # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT24_C_SUFFIX__ */ # 409 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT24_TYPE__ */ # 410 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT16_TYPE__ # ifdef __INT16_C_SUFFIX__ # define __int16_c_suffix __INT16_C_SUFFIX__ # define __int8_c_suffix __INT16_C_SUFFIX__ #else # 417 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT16_C_SUFFIX__ */ # 420 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT16_TYPE__ */ # 421 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least16_t # ifdef __int16_c_suffix # define INT16_C(v) __int_c(v, __int16_c_suffix) # define UINT16_C(v) __uint_c(v, __int16_c_suffix) # else # 427 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT16_C(v) v # define UINT16_C(v) v ## U # endif /* __int16_c_suffix */ # 430 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __int_least16_t */ # 431 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT8_TYPE__ # ifdef __INT8_C_SUFFIX__ # define __int8_c_suffix __INT8_C_SUFFIX__ #else # 437 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # undef __int8_c_suffix # endif /* __INT8_C_SUFFIX__ */ # 439 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __INT8_TYPE__ */ # 440 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __int_least8_t # ifdef __int8_c_suffix # define INT8_C(v) __int_c(v, __int8_c_suffix) # define UINT8_C(v) __uint_c(v, __int8_c_suffix) # else # 446 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define INT8_C(v) v # define UINT8_C(v) v ## U # endif /* __int8_c_suffix */ # 449 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __int_least8_t */ # 450 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* C99 7.18.2.1 Limits of exact-width integer types. * C99 7.18.2.2 Limits of minimum-width integer types. * C99 7.18.2.3 Limits of fastest minimum-width integer types. * * The presence of limit macros are completely optional in C99. This * implementation defines limits for all of the types (exact- and * minimum-width) that it defines above, using the limits of the minimum-width * type for any types that do not have exact-width representations. * * As in the type definitions, this section takes an approach of * successive-shrinking to determine which limits to use for the standard (8, * 16, 32, 64) bit widths when they don't have exact representations. It is * therefore important that the defintions be kept in order of decending * widths. * * Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]). */ #ifdef __INT64_TYPE__ # define INT64_MAX INT64_C( 9223372036854775807) # define INT64_MIN (-INT64_C( 9223372036854775807)-1) # define UINT64_MAX UINT64_C(18446744073709551615) # define __INT_LEAST64_MIN INT64_MIN # define __INT_LEAST64_MAX INT64_MAX # define __UINT_LEAST64_MAX UINT64_MAX # define __INT_LEAST32_MIN INT64_MIN # define __INT_LEAST32_MAX INT64_MAX # define __UINT_LEAST32_MAX UINT64_MAX # define __INT_LEAST16_MIN INT64_MIN # define __INT_LEAST16_MAX INT64_MAX # define __UINT_LEAST16_MAX UINT64_MAX # define __INT_LEAST8_MIN INT64_MIN # define __INT_LEAST8_MAX INT64_MAX # define __UINT_LEAST8_MAX UINT64_MAX #endif /* __INT64_TYPE__ */ # 488 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT_LEAST64_MIN # define INT_LEAST64_MIN __INT_LEAST64_MIN # define INT_LEAST64_MAX __INT_LEAST64_MAX # define UINT_LEAST64_MAX __UINT_LEAST64_MAX # define INT_FAST64_MIN __INT_LEAST64_MIN # define INT_FAST64_MAX __INT_LEAST64_MAX # define UINT_FAST64_MAX __UINT_LEAST64_MAX #endif /* __INT_LEAST64_MIN */ # 497 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT56_TYPE__ # define INT56_MAX INT56_C(36028797018963967) # define INT56_MIN (-INT56_C(36028797018963967)-1) # define UINT56_MAX UINT56_C(72057594037927935) # define INT_LEAST56_MIN INT56_MIN # define INT_LEAST56_MAX INT56_MAX # define UINT_LEAST56_MAX UINT56_MAX # define INT_FAST56_MIN INT56_MIN # define INT_FAST56_MAX INT56_MAX # define UINT_FAST56_MAX UINT56_MAX # define __INT_LEAST32_MIN INT56_MIN # define __INT_LEAST32_MAX INT56_MAX # define __UINT_LEAST32_MAX UINT56_MAX # define __INT_LEAST16_MIN INT56_MIN # define __INT_LEAST16_MAX INT56_MAX # define __UINT_LEAST16_MAX UINT56_MAX # define __INT_LEAST8_MIN INT56_MIN # define __INT_LEAST8_MAX INT56_MAX # define __UINT_LEAST8_MAX UINT56_MAX #endif /* __INT56_TYPE__ */ # 519 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT48_TYPE__ # define INT48_MAX INT48_C(140737488355327) # define INT48_MIN (-INT48_C(140737488355327)-1) # define UINT48_MAX UINT48_C(281474976710655) # define INT_LEAST48_MIN INT48_MIN # define INT_LEAST48_MAX INT48_MAX # define UINT_LEAST48_MAX UINT48_MAX # define INT_FAST48_MIN INT48_MIN # define INT_FAST48_MAX INT48_MAX # define UINT_FAST48_MAX UINT48_MAX # define __INT_LEAST32_MIN INT48_MIN # define __INT_LEAST32_MAX INT48_MAX # define __UINT_LEAST32_MAX UINT48_MAX # define __INT_LEAST16_MIN INT48_MIN # define __INT_LEAST16_MAX INT48_MAX # define __UINT_LEAST16_MAX UINT48_MAX # define __INT_LEAST8_MIN INT48_MIN # define __INT_LEAST8_MAX INT48_MAX # define __UINT_LEAST8_MAX UINT48_MAX #endif /* __INT48_TYPE__ */ # 541 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT40_TYPE__ # define INT40_MAX INT40_C(549755813887) # define INT40_MIN (-INT40_C(549755813887)-1) # define UINT40_MAX UINT40_C(1099511627775) # define INT_LEAST40_MIN INT40_MIN # define INT_LEAST40_MAX INT40_MAX # define UINT_LEAST40_MAX UINT40_MAX # define INT_FAST40_MIN INT40_MIN # define INT_FAST40_MAX INT40_MAX # define UINT_FAST40_MAX UINT40_MAX # define __INT_LEAST32_MIN INT40_MIN # define __INT_LEAST32_MAX INT40_MAX # define __UINT_LEAST32_MAX UINT40_MAX # define __INT_LEAST16_MIN INT40_MIN # define __INT_LEAST16_MAX INT40_MAX # define __UINT_LEAST16_MAX UINT40_MAX # define __INT_LEAST8_MIN INT40_MIN # define __INT_LEAST8_MAX INT40_MAX # define __UINT_LEAST8_MAX UINT40_MAX #endif /* __INT40_TYPE__ */ # 563 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT32_TYPE__ # define INT32_MAX INT32_C(2147483647) # define INT32_MIN (-INT32_C(2147483647)-1) # define UINT32_MAX UINT32_C(4294967295) # define __INT_LEAST32_MIN INT32_MIN # define __INT_LEAST32_MAX INT32_MAX # define __UINT_LEAST32_MAX UINT32_MAX # define __INT_LEAST16_MIN INT32_MIN # define __INT_LEAST16_MAX INT32_MAX # define __UINT_LEAST16_MAX UINT32_MAX # define __INT_LEAST8_MIN INT32_MIN # define __INT_LEAST8_MAX INT32_MAX # define __UINT_LEAST8_MAX UINT32_MAX #endif /* __INT32_TYPE__ */ # 579 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT_LEAST32_MIN # define INT_LEAST32_MIN __INT_LEAST32_MIN # define INT_LEAST32_MAX __INT_LEAST32_MAX # define UINT_LEAST32_MAX __UINT_LEAST32_MAX # define INT_FAST32_MIN __INT_LEAST32_MIN # define INT_FAST32_MAX __INT_LEAST32_MAX # define UINT_FAST32_MAX __UINT_LEAST32_MAX #endif /* __INT_LEAST32_MIN */ # 588 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT24_TYPE__ # define INT24_MAX INT24_C(8388607) # define INT24_MIN (-INT24_C(8388607)-1) # define UINT24_MAX UINT24_C(16777215) # define INT_LEAST24_MIN INT24_MIN # define INT_LEAST24_MAX INT24_MAX # define UINT_LEAST24_MAX UINT24_MAX # define INT_FAST24_MIN INT24_MIN # define INT_FAST24_MAX INT24_MAX # define UINT_FAST24_MAX UINT24_MAX # define __INT_LEAST16_MIN INT24_MIN # define __INT_LEAST16_MAX INT24_MAX # define __UINT_LEAST16_MAX UINT24_MAX # define __INT_LEAST8_MIN INT24_MIN # define __INT_LEAST8_MAX INT24_MAX # define __UINT_LEAST8_MAX UINT24_MAX #endif /* __INT24_TYPE__ */ # 607 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT16_TYPE__ #define INT16_MAX INT16_C(32767) #define INT16_MIN (-INT16_C(32767)-1) #define UINT16_MAX UINT16_C(65535) # define __INT_LEAST16_MIN INT16_MIN # define __INT_LEAST16_MAX INT16_MAX # define __UINT_LEAST16_MAX UINT16_MAX # define __INT_LEAST8_MIN INT16_MIN # define __INT_LEAST8_MAX INT16_MAX # define __UINT_LEAST8_MAX UINT16_MAX #endif /* __INT16_TYPE__ */ # 620 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT_LEAST16_MIN # define INT_LEAST16_MIN __INT_LEAST16_MIN # define INT_LEAST16_MAX __INT_LEAST16_MAX # define UINT_LEAST16_MAX __UINT_LEAST16_MAX # define INT_FAST16_MIN __INT_LEAST16_MIN # define INT_FAST16_MAX __INT_LEAST16_MAX # define UINT_FAST16_MAX __UINT_LEAST16_MAX #endif /* __INT_LEAST16_MIN */ # 629 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT8_TYPE__ # define INT8_MAX INT8_C(127) # define INT8_MIN (-INT8_C(127)-1) # define UINT8_MAX UINT8_C(255) # define __INT_LEAST8_MIN INT8_MIN # define __INT_LEAST8_MAX INT8_MAX # define __UINT_LEAST8_MAX UINT8_MAX #endif /* __INT8_TYPE__ */ # 639 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifdef __INT_LEAST8_MIN # define INT_LEAST8_MIN __INT_LEAST8_MIN # define INT_LEAST8_MAX __INT_LEAST8_MAX # define UINT_LEAST8_MAX __UINT_LEAST8_MAX # define INT_FAST8_MIN __INT_LEAST8_MIN # define INT_FAST8_MAX __INT_LEAST8_MAX # define UINT_FAST8_MAX __UINT_LEAST8_MAX #endif /* __INT_LEAST8_MIN */ # 648 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* Some utility macros */ #define __INTN_MIN(n) __stdint_join3( INT, n, _MIN) #define __INTN_MAX(n) __stdint_join3( INT, n, _MAX) #define __UINTN_MAX(n) __stdint_join3(UINT, n, _MAX) #define __INTN_C(n, v) __stdint_join3( INT, n, _C(v)) #define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v)) /* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */ /* C99 7.18.3 Limits of other integer types. */ #define INTPTR_MIN (-__INTPTR_MAX__-1) #define INTPTR_MAX __INTPTR_MAX__ #define UINTPTR_MAX __UINTPTR_MAX__ #define PTRDIFF_MIN (-__PTRDIFF_MAX__-1) #define PTRDIFF_MAX __PTRDIFF_MAX__ #define SIZE_MAX __SIZE_MAX__ /* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__ * is enabled. */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #define RSIZE_MAX (SIZE_MAX >> 1) #endif # 671 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* C99 7.18.2.5 Limits of greatest-width integer types. */ #define INTMAX_MIN (-__INTMAX_MAX__-1) #define INTMAX_MAX __INTMAX_MAX__ #define UINTMAX_MAX __UINTMAX_MAX__ /* C99 7.18.3 Limits of other integer types. */ #define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__) #define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__) #ifdef __WINT_UNSIGNED__ # define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0) # define WINT_MAX __UINTN_MAX(__WINT_WIDTH__) #else # 684 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define WINT_MIN __INTN_MIN(__WINT_WIDTH__) # define WINT_MAX __INTN_MAX(__WINT_WIDTH__) #endif # 687 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifndef WCHAR_MAX # define WCHAR_MAX __WCHAR_MAX__ #endif # 691 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #ifndef WCHAR_MIN # if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__) # define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__) # else # 695 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0) # endif # 697 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif # 698 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 /* 7.18.4.2 Macros for greatest-width integer constants. */ #define INTMAX_C(v) __int_c(v, __INTMAX_C_SUFFIX__) #define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__) #endif /* __STDC_HOSTED__ */ # 704 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 #endif /* __CLANG_STDINT_H */ # 705 "/usr/local/lib/clang/6.0.0/include/stdint.h" 3 4 # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" 2 #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" /* * Declare macros and functions that may be missing in . */ #if !defined(makedev) # if HAVE_SYS_MKDEV_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # if defined(mkdev) # define makedev mkdev # endif # 61 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" #endif # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" #endif /* !_NBCOMPAT_SYS_TYPES_H_ */ # 65 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/types.h" # 33 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" 1 /* $NetBSD: limits.h,v 1.3 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_LIMITS_H_ #define _NBCOMPAT_LIMITS_H_ #if HAVE_LIMITS_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" # 1 "/usr/local/lib/clang/6.0.0/include/limits.h" 1 3 4 /*===---- limits.h - Standard header for integer sizes --------------------===*\ * * Copyright (c) 2009 Chris Lattner * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * \*===----------------------------------------------------------------------===*/ #ifndef __CLANG_LIMITS_H #define __CLANG_LIMITS_H /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. Avert this #include_next madness. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ #define _GCC_LIMITS_H_ #endif # 33 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 /* System headers include a number of constants from POSIX in . Include it if we're hosted. */ #if __STDC_HOSTED__ && (1)/*__has_include_next()*/ #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 37 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 /* $NetBSD: limits.h,v 1.40 2016/08/04 06:43:43 christos Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)limits.h 8.2 (Berkeley) 1/4/94 */ #ifndef _LIMITS_H_ #define _LIMITS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/limits.h" 2 3 4 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_CHILD_MAX 25 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 /* * We have not implemented these yet * * _POSIX_THREAD_ATTR_STACKADDR * _POSIX_THREAD_ATTR_STACKSIZE * _POSIX_THREAD_CPUTIME * _POSIX_THREAD_PRIORITY_SCHEDULING * _POSIX_THREAD_PRIO_INHERIT * _POSIX_THREAD_PRIO_PROTECT * _POSIX_THREAD_PROCESS_SHARED * _POSIX_THREAD_SAFE_FUNCTIONS * _POSIX_THREAD_SPORADIC_SERVER */ /* * The following 3 are defined in * Open Group Base Specifications Issue 7 */ #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define _POSIX_THREAD_KEYS_MAX 128 #define _POSIX_THREAD_THREADS_MAX 64 /* * These are the correct names, defined in terms of the above * except for PTHREAD_KEYS_MAX which is bigger than standard * mandated minimum value _POSIX_THREAD_KEYS_MAX. */ #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define PTHREAD_KEYS_MAX 256 /* Not yet: PTHREAD_STACK_MIN */ #define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX #define _POSIX_TIMER_MAX 32 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 /* * X/Open CAE Specifications, * adopted in IEEE Std 1003.1-2001 XSI. */ #if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define _XOPEN_IOV_MAX 16 #define _XOPEN_NAME_MAX 256 #define _XOPEN_PATH_MAX 1024 #define PASS_MAX 128 /* Legacy */ #define CHARCLASS_NAME_MAX 14 #define NL_ARGMAX 9 #define NL_LANGMAX 14 #define NL_MSGMAX 32767 #define NL_NMAX 1 #define NL_SETMAX 255 #define NL_TEXTMAX 2048 /* IEEE Std 1003.1-2001 TSF */ #define _GETGR_R_SIZE_MAX 1024 #define _GETPW_R_SIZE_MAX 1024 /* Always ensure that this is consistent with */ #ifndef TMP_MAX #define TMP_MAX 308915776 /* Legacy */ #endif # 141 "/usr/include/limits.h" 3 4 #endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 142 "/usr/include/limits.h" 3 4 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 144 "/usr/include/limits.h" 3 4 #define MB_LEN_MAX 32 /* Allow ISO/IEC 2022 */ /* * X/Open Extended API set 2 (a.k.a. C063) * This hides unimplemented functions from GNU configure until * we are done implementing them. */ #if !defined(_INCOMPLETE_XOPEN_C063) #define __stub_fexecve #endif # 155 "/usr/include/limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 156 "/usr/include/limits.h" 3 4 # 1 "/usr/include/machine/limits.h" 1 3 4 /* $NetBSD: limits.h,v 1.14 2014/04/21 10:53:47 matt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)limits.h 7.2 (Berkeley) 6/28/90 */ #ifndef _X86_64_LIMITS_H_ #define _X86_64_LIMITS_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/machine/limits.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 40 "/usr/include/machine/limits.h" 2 3 4 #define CHAR_BIT 8 /* number of bits in a char */ #define UCHAR_MAX 0xff /* max value for an unsigned char */ #define SCHAR_MAX 0x7f /* max value for a signed char */ #define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ #define USHRT_MAX 0xffff /* max value for an unsigned short */ #define SHRT_MAX 0x7fff /* max value for a short */ #define SHRT_MIN (-0x7fff-1) /* min value for a short */ #define UINT_MAX 0xffffffffU /* max value for an unsigned int */ #define INT_MAX 0x7fffffff /* max value for an int */ #define INT_MIN (-0x7fffffff-1) /* min value for an int */ #define ULONG_MAX 0xffffffffffffffffUL /* max value for an unsigned long */ #define LONG_MAX 0x7fffffffffffffffL /* max value for a long */ #define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a long */ #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ defined(_NETBSD_SOURCE) #define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ #define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ #define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */ #endif # 69 "/usr/include/machine/limits.h" 3 4 #if defined(_NETBSD_SOURCE) #define SSIZE_MIN LONG_MIN /* min value for a ssize_t */ #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ #define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */ #define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */ #define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */ #endif /* _NETBSD_SOURCE */ # 79 "/usr/include/machine/limits.h" 3 4 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 80 "/usr/include/machine/limits.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define LONG_BIT 64 #define WORD_BIT 32 #define DBL_DIG __DBL_DIG__ #define DBL_MAX __DBL_MAX__ #define DBL_MIN __DBL_MIN__ #define FLT_DIG __FLT_DIG__ #define FLT_MAX __FLT_MAX__ #define FLT_MIN __FLT_MIN__ #endif # 93 "/usr/include/machine/limits.h" 3 4 #else /* __x86_64__ */ # 95 "/usr/include/machine/limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 96 "/usr/include/machine/limits.h" 3 4 # 97 "/usr/include/machine/limits.h" 3 4 #endif /* __x86_64__ */ # 99 "/usr/include/machine/limits.h" 3 4 #endif /* _X86_64_LIMITS_H_ */ # 101 "/usr/include/machine/limits.h" 3 4 # 157 "/usr/include/limits.h" 2 3 4 #ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 # define CHAR_MAX UCHAR_MAX #else # 162 "/usr/include/limits.h" 3 4 # define CHAR_MIN SCHAR_MIN # define CHAR_MAX SCHAR_MAX #endif # 165 "/usr/include/limits.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 166 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/syslimits.h" 1 3 4 /* $NetBSD: syslimits.h,v 1.28 2015/08/21 07:19:39 uebayasi Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)syslimits.h 8.1 (Berkeley) 6/2/93 */ #ifndef _SYS_SYSLIMITS_H_ #define _SYS_SYSLIMITS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/syslimits.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/sys/syslimits.h" 2 3 4 #if defined(_KERNEL_OPT) #if 0 /* expanded by -frewrite-includes */ #include "opt_syslimits.h" #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/syslimits.h" 3 4 # 41 "/usr/include/sys/syslimits.h" 3 4 #endif # 42 "/usr/include/sys/syslimits.h" 3 4 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define ARG_MAX (256 * 1024) /* max bytes for an exec function */ #ifndef CHILD_MAX #define CHILD_MAX 160 /* max simultaneous processes */ #endif # 49 "/usr/include/sys/syslimits.h" 3 4 #define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */ #define LINK_MAX 32767 /* max file link count */ #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ #define NAME_MAX 511 /* max bytes in a file name, must be */ /* kept in sync with MAXNAMLEN */ #define NGROUPS_MAX 16 /* max supplemental group id's */ #define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */ #ifndef OPEN_MAX #define OPEN_MAX 128 /* max open files per process */ #endif # 60 "/usr/include/sys/syslimits.h" 3 4 #define PATH_MAX 1024 /* max bytes in pathname */ #define PIPE_BUF 512 /* max bytes for atomic pipe writes */ #define BC_BASE_MAX INT_MAX /* max ibase/obase values in bc(1) */ #define BC_DIM_MAX 65535 /* max array elements in bc(1) */ #define BC_SCALE_MAX INT_MAX /* max scale value in bc(1) */ #define BC_STRING_MAX INT_MAX /* max const string length in bc(1) */ #define COLL_WEIGHTS_MAX 2 /* max weights for order keyword */ #define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */ #define LINE_MAX 2048 /* max bytes in an input line */ #define RE_DUP_MAX 255 /* max RE's in interval notation */ /* * IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #define LOGIN_NAME_MAX 17 /* max login name length incl. NUL */ #endif # 79 "/usr/include/sys/syslimits.h" 3 4 /* * X/Open CAE Specification Issue 5 Version 2 */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define IOV_MAX 1024 /* max # of iovec's for readv(2) etc. */ #define NZERO 20 /* default "nice" */ #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ # 87 "/usr/include/sys/syslimits.h" 3 4 #endif /* !_ANSI_SOURCE */ # 89 "/usr/include/sys/syslimits.h" 3 4 #endif /* !_SYS_SYSLIMITS_H_ */ # 91 "/usr/include/sys/syslimits.h" 3 4 # 167 "/usr/include/limits.h" 2 3 4 #endif /* !_LIMITS_H_ */ # 169 "/usr/include/limits.h" 3 4 # 38 "/usr/local/lib/clang/6.0.0/include/limits.h" 2 3 4 #endif # 39 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 /* Many system headers try to "help us out" by defining these. No really, we know how big each datatype is. */ #undef SCHAR_MIN #undef SCHAR_MAX #undef UCHAR_MAX #undef SHRT_MIN #undef SHRT_MAX #undef USHRT_MAX #undef INT_MIN #undef INT_MAX #undef UINT_MAX #undef LONG_MIN #undef LONG_MAX #undef ULONG_MAX #undef CHAR_BIT #undef CHAR_MIN #undef CHAR_MAX /* C90/99 5.2.4.2.1 */ #define SCHAR_MAX __SCHAR_MAX__ #define SHRT_MAX __SHRT_MAX__ #define INT_MAX __INT_MAX__ #define LONG_MAX __LONG_MAX__ #define SCHAR_MIN (-__SCHAR_MAX__-1) #define SHRT_MIN (-__SHRT_MAX__ -1) #define INT_MIN (-__INT_MAX__ -1) #define LONG_MIN (-__LONG_MAX__ -1L) #define UCHAR_MAX (__SCHAR_MAX__*2 +1) #define USHRT_MAX (__SHRT_MAX__ *2 +1) #define UINT_MAX (__INT_MAX__ *2U +1U) #define ULONG_MAX (__LONG_MAX__ *2UL+1UL) #ifndef MB_LEN_MAX #define MB_LEN_MAX 1 #endif # 78 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 #define CHAR_BIT __CHAR_BIT__ #ifdef __CHAR_UNSIGNED__ /* -funsigned-char */ #define CHAR_MIN 0 #define CHAR_MAX UCHAR_MAX #else # 85 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 #define CHAR_MIN SCHAR_MIN #define CHAR_MAX __SCHAR_MAX__ #endif # 88 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 /* C99 5.2.4.2.1: Added long long. C++11 18.3.3.2: same contents as the Standard C Library header . */ #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L #undef LLONG_MIN #undef LLONG_MAX #undef ULLONG_MAX #define LLONG_MAX __LONG_LONG_MAX__ #define LLONG_MIN (-__LONG_LONG_MAX__-1LL) #define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL) #endif # 102 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 /* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad that we don't have something like #pragma poison that could be used to deprecate a macro - the code should just use LLONG_MAX and friends. */ #if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__) #undef LONG_LONG_MIN #undef LONG_LONG_MAX #undef ULONG_LONG_MAX #define LONG_LONG_MAX __LONG_LONG_MAX__ #define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL) #define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL) #endif # 117 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 #endif /* __CLANG_LIMITS_H */ # 119 "/usr/local/lib/clang/6.0.0/include/limits.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" /* * Declare functions and macros that may be missing in . */ #ifndef UINT_MAX # define UINT_MAX 4294967295U #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #if !defined(LLONG_MAX) # if defined(LONG_LONG_MAX) # define LLONG_MAX LONG_LONG_MAX # else # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" # define LLONG_MAX (0x7fffffffffffffffLL) # endif # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #if !defined(LLONG_MIN) # if defined(LONG_LONG_MIN) # define LLONG_MIN LONG_LONG_MIN # else # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" # define LLONG_MIN (-0x7fffffffffffffffLL-1) # endif # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #endif # 61 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #if !defined(ULLONG_MAX) # define ULLONG_MAX (0xffffffffffffffffULL) /* max unsigned long long */ #endif # 64 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #ifndef GID_MAX # define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */ #endif # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #ifndef UID_MAX # define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */ #endif # 72 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" #endif /* !_NBCOMPAT_LIMITS_H_ */ # 74 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/limits.h" # 34 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" 1 /* $NetBSD: endian.h,v 1.3 2010/01/24 12:41:21 obache Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_ENDIAN_H_ #define _NBCOMPAT_ENDIAN_H_ #if HAVE_ENDIAN_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #if HAVE_SYS_ENDIAN_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #endif # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #if HAVE_MACHINE_ENDIAN_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # 1 "/usr/include/machine/endian.h" 1 3 4 /* $NetBSD: endian.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 3 "/usr/include/machine/endian.h" 3 4 # 4 "/usr/include/machine/endian.h" 3 4 # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" 2 #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #if HAVE_SYS_BYTEORDER_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" /* * Declare macros that may be missing in , , * and */ #ifndef LITTLE_ENDIAN # define LITTLE_ENDIAN 1234 #endif # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #ifndef BIG_ENDIAN # define BIG_ENDIAN 4321 #endif # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #ifndef BYTE_ORDER # if defined(_BIG_ENDIAN) # define BYTE_ORDER BIG_ENDIAN # elif defined(_LITTE_ENDIAN) # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # define BYTE_ORDER LITTLE_ENDIAN # elif defined(WORDS_BIGENDIAN) # 70 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # define BYTE_ORDER BIG_ENDIAN # else # 72 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # define BYTE_ORDER LITTLE_ENDIAN # endif # 74 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #endif # 75 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" #endif /* !_NBCOMPAT_ENDIAN_H_ */ # 77 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/endian.h" # 35 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" 1 /* $NetBSD: param.h,v 1.3 2009/02/19 00:51:12 abs Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_SYS_PARAM_H_ #define _NBCOMPAT_SYS_PARAM_H_ #if HAVE_SYS_PARAM_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" # 1 "/usr/include/sys/param.h" 1 3 4 /* $NetBSD: param.h,v 1.545 2017/08/28 01:27:34 kamil Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)param.h 8.3 (Berkeley) 4/4/95 */ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ #ifdef _KERNEL_OPT #if 0 /* expanded by -frewrite-includes */ #include "opt_param.h" #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/param.h" 3 4 # 44 "/usr/include/sys/param.h" 3 4 #endif # 45 "/usr/include/sys/param.h" 3 4 /* * Historic BSD #defines -- probably will remain untouched for all time. */ #define BSD 199506 /* System version (year & month). */ #define BSD4_3 1 #define BSD4_4 1 /* * #define __NetBSD_Version__ MMmmrrpp00 * * M = major version * m = minor version; a minor number of 99 indicates current. * r = 0 (*) * p = patchlevel * * When new releases are made, src/gnu/usr.bin/groff/tmac/mdoc.local * needs to be updated and the changes sent back to the groff maintainers. * * (*) Up to 2.0I "release" used to be "",A-Z,Z[A-Z] but numeric * e.g. NetBSD-1.2D = 102040000 ('D' == 4) * NetBSD-2.0H (200080000) was changed on 20041001 to: * 2.99.9 (299000900) */ #define __NetBSD_Version__ 899000200 /* NetBSD 8.99.2 */ #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \ (m) * 1000000) + (p) * 100) <= __NetBSD_Version__) /* * Historical NetBSD #define * * NetBSD 1.4 was the last release for which this value was incremented. * The value is now permanently fixed at 199905. It will never be * changed again. * * New code must use __NetBSD_Version__ instead, and should not even * count on NetBSD being defined. * */ #define NetBSD 199905 /* NetBSD version (year & month). */ /* * There macros determine if we are running in protected mode or not. * _HARDKERNEL: code uses kernel namespace and runs in hw priviledged mode * _SOFTKERNEL: code uses kernel namespace but runs without hw priviledges */ #if defined(_KERNEL) && !defined(_RUMPKERNEL) #define _HARDKERNEL #endif # 97 "/usr/include/sys/param.h" 3 4 #if defined(_KERNEL) && defined(_RUMPKERNEL) #define _SOFTKERNEL #endif # 100 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 101 "/usr/include/sys/param.h" 3 4 # 1 "/usr/include/sys/null.h" 1 3 4 /* $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ */ /* * Written by Klaus Klein , December 22, 1999. * Public domain. */ #ifndef _SYS_NULL_H_ #define _SYS_NULL_H_ #ifndef NULL #if !defined(__GNUG__) || __GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 90) #if !defined(__cplusplus) #define NULL ((void *)0) #else # 15 "/usr/include/sys/null.h" 3 4 #define NULL 0 #endif /* !__cplusplus */ # 17 "/usr/include/sys/null.h" 3 4 #else # 18 "/usr/include/sys/null.h" 3 4 #define NULL __null #endif # 20 "/usr/include/sys/null.h" 3 4 #endif # 21 "/usr/include/sys/null.h" 3 4 #endif /* _SYS_NULL_H_ */ # 22 "/usr/include/sys/null.h" 3 4 # 102 "/usr/include/sys/param.h" 2 3 4 #ifndef __ASSEMBLER__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 104 "/usr/include/sys/param.h" 3 4 # 105 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 105 "/usr/include/sys/param.h" 3 4 # 106 "/usr/include/sys/param.h" 3 4 /* * Machine-independent constants (some used in following include files). * Redefined constants are from POSIX 1003.1 limits file. * * MAXCOMLEN should be >= sizeof(ac_comm) (see ) * MAXHOSTNAMELEN should be >= (_POSIX_HOST_NAME_MAX + 1) (see ) * MAXLOGNAME should be >= UT_NAMESIZE (see ) */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 115 "/usr/include/sys/param.h" 3 4 # 116 "/usr/include/sys/param.h" 3 4 #define MAXCOMLEN 16 /* max command name remembered */ #define MAXINTERP PATH_MAX /* max interpreter file name length */ /* DEPRECATED: use LOGIN_NAME_MAX instead. */ #define MAXLOGNAME (LOGIN_NAME_MAX - 1) /* max login name length */ #define NCARGS ARG_MAX /* max bytes for an exec function */ #define NGROUPS NGROUPS_MAX /* max number groups */ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ #ifndef NOFILE #define NOFILE OPEN_MAX /* max open files per process */ #endif # 129 "/usr/include/sys/param.h" 3 4 #ifndef MAXUPRC /* max simultaneous processes */ #define MAXUPRC CHILD_MAX /* POSIX 1003.1-compliant default */ #else # 132 "/usr/include/sys/param.h" 3 4 #if (MAXUPRC - 0) < CHILD_MAX #error MAXUPRC less than CHILD_MAX. See options(4) for details. #endif /* (MAXUPRC - 0) < CHILD_MAX */ # 135 "/usr/include/sys/param.h" 3 4 #endif /* !defined(MAXUPRC) */ # 136 "/usr/include/sys/param.h" 3 4 /* Macros for min/max. */ #define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b)) #define MAX(a,b) ((/*CONSTCOND*/(a)>(b))?(a):(b)) /* More types and definitions used throughout the kernel. */ #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 143 "/usr/include/sys/param.h" 3 4 # 144 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 144 "/usr/include/sys/param.h" 3 4 # 145 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 145 "/usr/include/sys/param.h" 3 4 # 146 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 146 "/usr/include/sys/param.h" 3 4 # 147 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 147 "/usr/include/sys/param.h" 3 4 # 148 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 148 "/usr/include/sys/param.h" 3 4 # 149 "/usr/include/sys/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 149 "/usr/include/sys/param.h" 3 4 # 150 "/usr/include/sys/param.h" 3 4 #ifndef NPROC #define NPROC (20 + 16 * MAXUSERS) #endif # 153 "/usr/include/sys/param.h" 3 4 #ifndef NTEXT #define NTEXT (80 + NPROC / 8) /* actually the object cache */ #endif # 156 "/usr/include/sys/param.h" 3 4 #ifndef NVNODE #define NVNODE (NPROC + NTEXT + 100) #define NVNODE_IMPLICIT #endif # 160 "/usr/include/sys/param.h" 3 4 #ifndef VNODE_KMEM_MAXPCT #define VNODE_KMEM_MAXPCT 60 #endif # 163 "/usr/include/sys/param.h" 3 4 #ifndef BUFCACHE_VA_MAXPCT #define BUFCACHE_VA_MAXPCT 20 #endif # 166 "/usr/include/sys/param.h" 3 4 #define VNODE_COST 2048 /* assumed space in bytes */ #endif /* _KERNEL */ # 168 "/usr/include/sys/param.h" 3 4 /* Signals. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 170 "/usr/include/sys/param.h" 3 4 # 1 "/usr/include/sys/signal.h" 1 3 4 /* $NetBSD: signal.h,v 1.72 2017/04/21 15:10:35 christos Exp $ */ /* * 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 */ #ifndef _SYS_SIGNAL_H_ #define _SYS_SIGNAL_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/signal.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 43 "/usr/include/sys/signal.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/signal.h" 3 4 # 1 "/usr/include/sys/sigtypes.h" 1 3 4 /* $NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $ */ /* * 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 */ #ifndef _SYS_SIGTYPES_H_ #define _SYS_SIGTYPES_H_ /* * This header file defines various signal-related types. We also keep * the macros to manipulate sigset_t here, to encapsulate knowledge of * its internals. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/sys/sigtypes.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 49 "/usr/include/sys/sigtypes.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/sys/sigtypes.h" 3 4 # 50 "/usr/include/sys/sigtypes.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 50 "/usr/include/sys/sigtypes.h" 3 4 # 51 "/usr/include/sys/sigtypes.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 56 "/usr/include/sys/sigtypes.h" 3 4 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) typedef struct { __uint32_t __bits[4]; } sigset_t; /* * Macro for manipulating signal masks. */ #define __sigmask(n) (1U << (((unsigned int)(n) - 1) & 31)) #define __sigword(n) (((unsigned int)(n) - 1) >> 5) #define __sigaddset(s, n) ((s)->__bits[__sigword(n)] |= __sigmask(n)) #define __sigdelset(s, n) ((s)->__bits[__sigword(n)] &= ~__sigmask(n)) #define __sigismember(s, n) (((s)->__bits[__sigword(n)] & __sigmask(n)) != 0) #define __sigemptyset(s) ((s)->__bits[0] = 0x00000000, \ (s)->__bits[1] = 0x00000000, \ (s)->__bits[2] = 0x00000000, \ (s)->__bits[3] = 0x00000000) #define __sigsetequal(s1,s2) ((s1)->__bits[0] == (s2)->__bits[0] && \ (s1)->__bits[1] == (s2)->__bits[1] && \ (s1)->__bits[2] == (s2)->__bits[2] && \ (s1)->__bits[3] == (s2)->__bits[3]) #define __sigfillset(s) ((s)->__bits[0] = 0xffffffff, \ (s)->__bits[1] = 0xffffffff, \ (s)->__bits[2] = 0xffffffff, \ (s)->__bits[3] = 0xffffffff) #define __sigplusset(s, t) \ do { \ (t)->__bits[0] |= (s)->__bits[0]; \ (t)->__bits[1] |= (s)->__bits[1]; \ (t)->__bits[2] |= (s)->__bits[2]; \ (t)->__bits[3] |= (s)->__bits[3]; \ } while (/* CONSTCOND */ 0) #define __sigminusset(s, t) \ do { \ (t)->__bits[0] &= ~(s)->__bits[0]; \ (t)->__bits[1] &= ~(s)->__bits[1]; \ (t)->__bits[2] &= ~(s)->__bits[2]; \ (t)->__bits[3] &= ~(s)->__bits[3]; \ } while (/* CONSTCOND */ 0) #define __sigandset(s, t) \ do { \ (t)->__bits[0] &= (s)->__bits[0]; \ (t)->__bits[1] &= (s)->__bits[1]; \ (t)->__bits[2] &= (s)->__bits[2]; \ (t)->__bits[3] &= (s)->__bits[3]; \ } while (/* CONSTCOND */ 0) #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) typedef struct #if defined(_NETBSD_SOURCE) sigaltstack #endif /* _NETBSD_SOURCE */ # 112 "/usr/include/sys/sigtypes.h" 3 4 { void *ss_sp; /* signal stack base */ size_t ss_size; /* signal stack length */ int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ } stack_t; #endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 119 "/usr/include/sys/sigtypes.h" 3 4 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || ... */ # 121 "/usr/include/sys/sigtypes.h" 3 4 #endif /* !_SYS_SIGTYPES_H_ */ # 123 "/usr/include/sys/sigtypes.h" 3 4 # 44 "/usr/include/sys/signal.h" 2 3 4 #define _NSIG 64 #if defined(_NETBSD_SOURCE) #define NSIG _NSIG #endif /* _NETBSD_SOURCE */ # 51 "/usr/include/sys/signal.h" 3 4 #define SIGHUP 1 /* hangup */ #define SIGINT 2 /* interrupt */ #define SIGQUIT 3 /* quit */ #define SIGILL 4 /* illegal instruction (not reset when caught) */ #define SIGTRAP 5 /* trace trap (not reset when caught) */ #define SIGABRT 6 /* abort() */ #define SIGIOT SIGABRT /* compatibility */ #define SIGEMT 7 /* EMT instruction */ #define SIGFPE 8 /* floating point exception */ #define SIGKILL 9 /* kill (cannot be caught or ignored) */ #define SIGBUS 10 /* bus error */ #define SIGSEGV 11 /* segmentation violation */ #define SIGSYS 12 /* bad argument to system call */ #define SIGPIPE 13 /* write on a pipe with no one to read it */ #define SIGALRM 14 /* alarm clock */ #define SIGTERM 15 /* software termination signal from kill */ #define SIGURG 16 /* urgent condition on IO channel */ #define SIGSTOP 17 /* sendable stop signal not from tty */ #define SIGTSTP 18 /* stop signal from tty */ #define SIGCONT 19 /* continue a stopped process */ #define SIGCHLD 20 /* to parent on child stop or exit */ #define SIGTTIN 21 /* to readers pgrp upon background tty read */ #define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ #define SIGIO 23 /* input/output possible signal */ #define SIGXCPU 24 /* exceeded CPU time limit */ #define SIGXFSZ 25 /* exceeded file size limit */ #define SIGVTALRM 26 /* virtual time alarm */ #define SIGPROF 27 /* profiling time alarm */ #define SIGWINCH 28 /* window size changes */ #define SIGINFO 29 /* information request */ #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */ #define SIGPWR 32 /* power fail/restart (not reset when caught) */ #define SIGRTMIN 33 #define SIGRTMAX 63 #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 89 "/usr/include/sys/signal.h" 3 4 # 90 "/usr/include/sys/signal.h" 3 4 #endif # 91 "/usr/include/sys/signal.h" 3 4 #define SIG_DFL ((void (*)(int)) 0) #define SIG_IGN ((void (*)(int)) 1) #define SIG_ERR ((void (*)(int)) -1) #define SIG_HOLD ((void (*)(int)) 3) #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #ifdef _KERNEL #define sigaddset(s, n) __sigaddset(s, n) #define sigdelset(s, n) __sigdelset(s, n) #define sigismember(s, n) __sigismember(s, n) #define sigemptyset(s) __sigemptyset(s) #define sigfillset(s) __sigfillset(s) #define sigplusset(s, t) __sigplusset(s, t) #define sigminusset(s, t) __sigminusset(s, t) #endif /* _KERNEL */ # 109 "/usr/include/sys/signal.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 112 "/usr/include/sys/signal.h" 3 4 # 1 "/usr/include/sys/siginfo.h" 1 3 4 /* $NetBSD: siginfo.h,v 1.32 2017/03/01 00:19:22 kamil Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * 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. */ #ifndef _SYS_SIGINFO_H_ #define _SYS_SIGINFO_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/siginfo.h" 3 4 # 1 "/usr/include/machine/signal.h" 1 3 4 /* $NetBSD: signal.h,v 1.12 2013/01/02 19:40:23 dsl Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)signal.h 7.16 (Berkeley) 3/17/91 */ #ifndef _AMD64_SIGNAL_H_ #define _AMD64_SIGNAL_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/machine/signal.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 40 "/usr/include/machine/signal.h" 2 3 4 typedef int sig_atomic_t; #if defined(_NETBSD_SOURCE) /* * Get the "code" values */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/machine/signal.h" 3 4 # 1 "/usr/include/machine/trap.h" 1 3 4 /* $NetBSD: trap.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 3 "/usr/include/machine/trap.h" 3 4 # 1 "/usr/include/x86/trap.h" 1 3 4 /* $NetBSD: trap.h,v 1.2 2003/08/07 16:30:33 agc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. 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. * * @(#)trap.h 5.4 (Berkeley) 5/9/91 */ /* * Trap type values * also known in trap.c for name strings */ #define T_PRIVINFLT 0 /* privileged instruction */ #define T_BPTFLT 1 /* breakpoint trap */ #define T_ARITHTRAP 2 /* arithmetic trap */ #define T_ASTFLT 3 /* asynchronous system trap */ #define T_PROTFLT 4 /* protection fault */ #define T_TRCTRAP 5 /* trace trap */ #define T_PAGEFLT 6 /* page fault */ #define T_ALIGNFLT 7 /* alignment fault */ #define T_DIVIDE 8 /* integer divide fault */ #define T_NMI 9 /* non-maskable interrupt */ #define T_OFLOW 10 /* overflow trap */ #define T_BOUND 11 /* bounds check fault */ #define T_DNA 12 /* device not available fault */ #define T_DOUBLEFLT 13 /* double fault */ #define T_FPOPFLT 14 /* fp coprocessor operand fetch fault */ #define T_TSSFLT 15 /* invalid tss fault */ #define T_SEGNPFLT 16 /* segment not present fault */ #define T_STKFLT 17 /* stack fault */ #define T_MCA 18 /* machine check */ #define T_XMM 19 /* SSE FP exception */ #define T_RESERVED 20 /* reserved fault base */ /* Trap's coming from user mode */ #define T_USER 0x100 /* Flags kludged into the trap code */ #define TC_TSS 0x80000000 #define TC_FLAGMASK (TC_TSS) # 4 "/usr/include/machine/trap.h" 2 3 4 # 48 "/usr/include/machine/signal.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/machine/signal.h" 3 4 # 1 "/usr/include/machine/mcontext.h" 1 3 4 /* $NetBSD: mcontext.h,v 1.18 2014/05/12 22:50:03 uebayasi Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _AMD64_MCONTEXT_H_ #define _AMD64_MCONTEXT_H_ #ifdef __x86_64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/machine/mcontext.h" 3 4 # 1 "/usr/include/machine/frame_regs.h" 1 3 4 /* $NetBSD: frame_regs.h,v 1.7 2015/04/26 18:49:39 mrg Exp $ */ #ifndef _AMD64_FRAME_REGS_H_ #define _AMD64_FRAME_REGS_H_ /* * amd64 registers (and friends) ordered as in a trap/interrupt/syscall frame. * Also the indexes into the 'general register state' (__greg_t) passed to * userland. * Historically they were in the same order, but the order in the frames * has been changed to improve syscall efficiency. * * Notes: * 1) gdb (amd64nbsd-tdep.c) has a lookup table that assumes the __greg_t * ordering. * 2) src/lib/libc/arch/x86_64/gen/makecontext.c assumes that the first * 6 entries in the __greg_t array match the registers used to pass * function arguments. * 3) The 'struct reg' from machine/reg.h has to match __greg_t. * Since they are both arrays and indexed with the same tokens this * shouldn't be a problem, but is rather confusing. * This assumption is made in a lot of places! * 4) There might be other code out there that relies on the ordering. * * The first entries below match the registers used for syscall arguments * (%rcx is destroyed by the syscall instruction, the libc system call * stubs copy %rcx to %r10). * arg6-arg9 are copied from the user stack for system calls with more * than 6 args (SYS_MAXSYSARGS is 8, + 2 entries for SYS___SYSCALL). */ #define _FRAME_REG(greg, freg) \ greg(rdi, RDI, 0) /* tf_rdi */ \ greg(rsi, RSI, 1) /* tf_rsi */ \ greg(rdx, RDX, 2) /* tf_rdx */ \ greg(r10, R10, 6) /* tf_r10 */ \ greg(r8, R8, 4) /* tf_r8 */ \ greg(r9, R9, 5) /* tf_r9 */ \ freg(arg6, @, @) /* tf_arg6: syscall arg from stack */ \ freg(arg7, @, @) /* tf_arg7: syscall arg from stack */ \ freg(arg8, @, @) /* tf_arg8: syscall arg from stack */ \ freg(arg9, @, @) /* tf_arg9: syscall arg from stack */ \ greg(rcx, RCX, 3) /* tf_rcx */ \ greg(r11, R11, 7) /* tf_r11 */ \ greg(r12, R12, 8) /* tf_r12 */ \ greg(r13, R13, 9) /* tf_r13 */ \ greg(r14, R14, 10) /* tf_r14 */ \ greg(r15, R15, 11) /* tf_r15 */ \ greg(rbp, RBP, 12) /* tf_rbp */ \ greg(rbx, RBX, 13) /* tf_rbx */ \ greg(rax, RAX, 14) /* tf_rax */ \ greg(gs, GS, 15) /* tf_gs */ \ greg(fs, FS, 16) /* tf_fs */ \ greg(es, ES, 17) /* tf_es */ \ greg(ds, DS, 18) /* tf_ds */ \ greg(trapno, TRAPNO, /* tf_trapno */ \ 19) \ /* Below portion defined in hardware */ \ greg(err, ERR, 20) /* tf_err: Dummy inserted if not defined */ \ greg(rip, RIP, 21) /* tf_rip */ \ greg(cs, CS, 22) /* tf_cs */ \ greg(rflags, RFLAGS, /* tf_rflags */ \ 23) \ /* These are pushed unconditionally on the x86-64 */ \ greg(rsp, RSP, 24) /* tf_rsp */ \ greg(ss, SS, 25) /* tf_ss */ #define _FRAME_NOREG(reg, REG, idx) #define _FRAME_GREG(greg) _FRAME_REG(greg, _FRAME_NOREG) #endif # 72 "/usr/include/machine/frame_regs.h" 3 4 # 38 "/usr/include/machine/mcontext.h" 2 3 4 /* * General register state */ #define GREG_OFFSETS(reg, REG, idx) _REG_##REG = idx, enum { _FRAME_GREG(GREG_OFFSETS) _NGREG = 26 }; #undef GREG_OFFSETS typedef unsigned long __greg_t; typedef __greg_t __gregset_t[_NGREG]; /* These names are for compatibility */ #define _REG_URSP _REG_RSP #define _REG_RFL _REG_RFLAGS /* * Floating point register state * The format of __fpregset_t is that of the fxsave instruction * which requires 16 byte alignment. However the mcontext version * is never directly accessed. */ typedef char __fpregset_t[512] __aligned(8); typedef struct { __gregset_t __gregs; __greg_t _mc_tlsbase; __fpregset_t __fpregs; } mcontext_t; #define _UC_UCONTEXT_ALIGN (~0xf) /* AMD64 ABI 128-bytes "red zone". */ #define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_RSP] - 128) #define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.__gregs[_REG_RIP]) #define _UC_MACHINE_INTRV(uc) ((uc)->uc_mcontext.__gregs[_REG_RAX]) #define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) #define _UC_TLSBASE 0x00080000 /* * mcontext extensions to handle signal delivery. */ #define _UC_SETSTACK 0x00010000 #define _UC_CLRSTACK 0x00020000 #define __UCONTEXT_SIZE 784 static __inline void * __lwp_getprivate_fast(void) { void *__tmp; __asm volatile("movq %%fs:0, %0" : "=r" (__tmp)); return __tmp; } #ifdef _KERNEL /* * 32bit context definitions. */ #define _NGREG32 19 typedef unsigned int __greg32_t; typedef __greg32_t __gregset32_t[_NGREG32]; #define _REG32_GS 0 #define _REG32_FS 1 #define _REG32_ES 2 #define _REG32_DS 3 #define _REG32_EDI 4 #define _REG32_ESI 5 #define _REG32_EBP 6 #define _REG32_ESP 7 #define _REG32_EBX 8 #define _REG32_EDX 9 #define _REG32_ECX 10 #define _REG32_EAX 11 #define _REG32_TRAPNO 12 #define _REG32_ERR 13 #define _REG32_EIP 14 #define _REG32_CS 15 #define _REG32_EFL 16 #define _REG32_UESP 17 #define _REG32_SS 18 #define _UC_MACHINE32_SP(uc) ((uc)->uc_mcontext.__gregs[_REG32_UESP]) /* * Floating point register state */ typedef struct { union { struct { int __fp_state[27]; /* Environment and registers */ } __fpchip_state; struct { char __fp_xmm[512]; } __fp_xmm_state; } __fp_reg_set; int __fp_pad[33]; /* Historic padding */ } __fpregset32_t; typedef struct { __gregset32_t __gregs; __fpregset32_t __fpregs; uint32_t _mc_tlsbase; } mcontext32_t; #define _UC_FXSAVE 0x20 /* FP state is in FXSAVE format in XMM space */ #define _UC_MACHINE32_PAD 4 #define __UCONTEXT32_SIZE 776 #endif /* _KERNEL */ # 155 "/usr/include/machine/mcontext.h" 3 4 #else /* __x86_64__ */ # 157 "/usr/include/machine/mcontext.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 158 "/usr/include/machine/mcontext.h" 3 4 # 159 "/usr/include/machine/mcontext.h" 3 4 #endif /* __x86_64__ */ # 161 "/usr/include/machine/mcontext.h" 3 4 #endif /* !_AMD64_MCONTEXT_H_ */ # 163 "/usr/include/machine/mcontext.h" 3 4 # 49 "/usr/include/machine/signal.h" 2 3 4 #ifdef _KERNEL_OPT #if 0 /* expanded by -frewrite-includes */ #include "opt_compat_netbsd.h" #endif /* expanded by -frewrite-includes */ # 51 "/usr/include/machine/signal.h" 3 4 # 52 "/usr/include/machine/signal.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "opt_compat_netbsd32.h" #endif /* expanded by -frewrite-includes */ # 52 "/usr/include/machine/signal.h" 3 4 # 53 "/usr/include/machine/signal.h" 3 4 #endif # 54 "/usr/include/machine/signal.h" 3 4 #endif /* _NETBSD_SOURCE */ # 56 "/usr/include/machine/signal.h" 3 4 #else /* __x86_64__ */ # 58 "/usr/include/machine/signal.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 59 "/usr/include/machine/signal.h" 3 4 # 60 "/usr/include/machine/signal.h" 3 4 #endif /* __x86_64__ */ # 62 "/usr/include/machine/signal.h" 3 4 #endif /* !_AMD64_SIGNAL_H_ */ # 64 "/usr/include/machine/signal.h" 3 4 # 36 "/usr/include/sys/siginfo.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/siginfo.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 37 "/usr/include/sys/siginfo.h" 2 3 4 #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/siginfo.h" 3 4 # 39 "/usr/include/sys/siginfo.h" 3 4 #endif # 40 "/usr/include/sys/siginfo.h" 3 4 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; struct _ksiginfo { int _signo; int _code; int _errno; #ifdef _LP64 /* In _LP64 the union starts on an 8-byte boundary. */ int _pad; #endif # 54 "/usr/include/sys/siginfo.h" 3 4 union { struct { pid_t _pid; uid_t _uid; sigval_t _value; } _rt; struct { pid_t _pid; uid_t _uid; int _status; clock_t _utime; clock_t _stime; } _child; struct { void *_addr; int _trap; int _trap2; int _trap3; } _fault; struct { long _band; int _fd; } _poll; } _reason; }; #ifdef _KERNEL typedef struct ksiginfo { u_long ksi_flags; /* 4 or 8 bytes (LP64) */ TAILQ_ENTRY(ksiginfo) ksi_list; struct _ksiginfo ksi_info; lwpid_t ksi_lid; /* 0, or directed to LWP */ } ksiginfo_t; #define KSI_TRAP 0x01 /* signal caused by trap */ #define KSI_EMPTY 0x02 /* no additional information */ #define KSI_QUEUED 0x04 /* on a sigpend_t queue */ #define KSI_FROMPOOL 0x08 /* allocated from the ksiginfo pool */ /* Macros to initialize a ksiginfo_t. */ #define KSI_INIT(ksi) \ do { \ memset((ksi), 0, sizeof(*(ksi))); \ } while (/*CONSTCOND*/0) #define KSI_INIT_EMPTY(ksi) \ do { \ KSI_INIT((ksi)); \ (ksi)->ksi_flags = KSI_EMPTY; \ } while (/*CONSTCOND*/0) #define KSI_INIT_TRAP(ksi) \ do { \ KSI_INIT((ksi)); \ (ksi)->ksi_flags = KSI_TRAP; \ } while (/*CONSTCOND*/0) /* Copy the part of ksiginfo_t without the queue pointers */ #define KSI_COPY(fksi, tksi) \ do { \ (tksi)->ksi_info = (fksi)->ksi_info; \ (tksi)->ksi_flags = (fksi)->ksi_flags; \ } while (/*CONSTCOND*/0) /* Predicate macros to test how a ksiginfo_t was generated. */ #define KSI_TRAP_P(ksi) (((ksi)->ksi_flags & KSI_TRAP) != 0) #define KSI_EMPTY_P(ksi) (((ksi)->ksi_flags & KSI_EMPTY) != 0) /* * Old-style signal handler "code" arguments were only non-zero for * signals caused by traps. */ #define KSI_TRAPCODE(ksi) (KSI_TRAP_P(ksi) ? (ksi)->ksi_trap : 0) #endif /* _KERNEL */ # 132 "/usr/include/sys/siginfo.h" 3 4 typedef union siginfo { char si_pad[128]; /* Total size; for future expansion */ struct _ksiginfo _info; } siginfo_t; /** Field access macros */ #define si_signo _info._signo #define si_code _info._code #define si_errno _info._errno #define si_value _info._reason._rt._value #define si_pid _info._reason._child._pid #define si_uid _info._reason._child._uid #define si_status _info._reason._child._status #define si_utime _info._reason._child._utime #define si_stime _info._reason._child._stime #define si_addr _info._reason._fault._addr #define si_trap _info._reason._fault._trap #define si_trap2 _info._reason._fault._trap2 #define si_trap3 _info._reason._fault._trap3 #define si_band _info._reason._poll._band #define si_fd _info._reason._poll._fd #ifdef _KERNEL /** Field access macros */ #define ksi_signo ksi_info._signo #define ksi_code ksi_info._code #define ksi_errno ksi_info._errno #define ksi_value ksi_info._reason._rt._value #define ksi_pid ksi_info._reason._child._pid #define ksi_uid ksi_info._reason._child._uid #define ksi_status ksi_info._reason._child._status #define ksi_utime ksi_info._reason._child._utime #define ksi_stime ksi_info._reason._child._stime #define ksi_addr ksi_info._reason._fault._addr #define ksi_trap ksi_info._reason._fault._trap #define ksi_trap2 ksi_info._reason._fault._trap2 #define ksi_trap3 ksi_info._reason._fault._trap3 #define ksi_band ksi_info._reason._poll._band #define ksi_fd ksi_info._reason._poll._fd #endif /* _KERNEL */ # 179 "/usr/include/sys/siginfo.h" 3 4 /** si_code */ /* SIGILL */ #define ILL_ILLOPC 1 /* Illegal opcode */ #define ILL_ILLOPN 2 /* Illegal operand */ #define ILL_ILLADR 3 /* Illegal addressing mode */ #define ILL_ILLTRP 4 /* Illegal trap */ #define ILL_PRVOPC 5 /* Privileged opcode */ #define ILL_PRVREG 6 /* Privileged register */ #define ILL_COPROC 7 /* Coprocessor error */ #define ILL_BADSTK 8 /* Internal stack error */ /* SIGFPE */ #define FPE_INTDIV 1 /* Integer divide by zero */ #define FPE_INTOVF 2 /* Integer overflow */ #define FPE_FLTDIV 3 /* Floating point divide by zero */ #define FPE_FLTOVF 4 /* Floating point overflow */ #define FPE_FLTUND 5 /* Floating point underflow */ #define FPE_FLTRES 6 /* Floating point inexact result */ #define FPE_FLTINV 7 /* Invalid Floating point operation */ #define FPE_FLTSUB 8 /* Subscript out of range */ /* SIGSEGV */ #define SEGV_MAPERR 1 /* Address not mapped to object */ #define SEGV_ACCERR 2 /* Invalid permissions for mapped object*/ /* SIGBUS */ #define BUS_ADRALN 1 /* Invalid address alignment */ #define BUS_ADRERR 2 /* Non-existent physical address */ #define BUS_OBJERR 3 /* Object specific hardware error */ /* SIGTRAP */ #define TRAP_BRKPT 1 /* Process breakpoint */ #define TRAP_TRACE 2 /* Process trace trap */ #define TRAP_EXEC 3 /* Process exec trap */ #define TRAP_CHLD 4 /* Process child trap */ #define TRAP_LWP 5 /* Process lwp trap */ #define TRAP_DBREG 6 /* Process hardware debug register trap */ #define TRAP_SCE 7 /* Process syscall entry trap */ #define TRAP_SCX 8 /* Process syscall exit trap */ /* SIGCHLD */ #define CLD_EXITED 1 /* Child has exited */ #define CLD_KILLED 2 /* Child has terminated abnormally but */ /* did not create a core file */ #define CLD_DUMPED 3 /* Child has terminated abnormally and */ /* created a core file */ #define CLD_TRAPPED 4 /* Traced child has trapped */ #define CLD_STOPPED 5 /* Child has stopped */ #define CLD_CONTINUED 6 /* Stopped child has continued */ /* SIGIO */ #define POLL_IN 1 /* Data input available */ #define POLL_OUT 2 /* Output buffers available */ #define POLL_MSG 3 /* Input message available */ #define POLL_ERR 4 /* I/O Error */ #define POLL_PRI 5 /* High priority input available */ #define POLL_HUP 6 /* Device disconnected */ /** si_code */ #define SI_USER 0 /* Sent by kill(2) */ #define SI_QUEUE -1 /* Sent by the sigqueue(2) */ #define SI_TIMER -2 /* Generated by expiration of a timer */ /* set by timer_settime(2) */ #define SI_ASYNCIO -3 /* Generated by completion of an */ /* asynchronous I/O signal */ #define SI_MESGQ -4 /* Generated by arrival of a message on */ /* an empty message queue */ #if defined(_KERNEL) || defined(_NETBSD_SOURCE) #define SI_LWP -5 /* Generated by _lwp_kill(2) */ #define SI_NOINFO 32767 /* No signal specific info available */ #endif # 252 "/usr/include/sys/siginfo.h" 3 4 #endif /* !_SYS_SIGINFO_H_ */ # 254 "/usr/include/sys/siginfo.h" 3 4 # 113 "/usr/include/sys/signal.h" 2 3 4 #endif # 114 "/usr/include/sys/signal.h" 3 4 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 117 "/usr/include/sys/signal.h" 3 4 # 1 "/usr/include/sys/ucontext.h" 1 3 4 /* $NetBSD: ucontext.h,v 1.18 2013/03/06 18:16:58 pooka Exp $ */ /*- * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein, and by Jason R. Thorpe. * * 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. */ #ifndef _SYS_UCONTEXT_H_ #define _SYS_UCONTEXT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/ucontext.h" 3 4 # 36 "/usr/include/sys/ucontext.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/ucontext.h" 3 4 # 37 "/usr/include/sys/ucontext.h" 3 4 typedef struct __ucontext ucontext_t; struct __ucontext { unsigned int uc_flags; /* properties */ ucontext_t * uc_link; /* context to resume */ sigset_t uc_sigmask; /* signals blocked in this context */ stack_t uc_stack; /* the stack used by this context */ mcontext_t uc_mcontext; /* machine state */ #if defined(_UC_MACHINE_PAD) long __uc_pad[_UC_MACHINE_PAD]; #endif # 49 "/usr/include/sys/ucontext.h" 3 4 }; #ifndef _UC_UCONTEXT_ALIGN #define _UC_UCONTEXT_ALIGN (~0) #endif # 54 "/usr/include/sys/ucontext.h" 3 4 /* uc_flags */ #define _UC_SIGMASK 0x01 /* valid uc_sigmask */ #define _UC_STACK 0x02 /* valid uc_stack */ #define _UC_CPU 0x04 /* valid GPR context in uc_mcontext */ #define _UC_FPU 0x08 /* valid FPU context in uc_mcontext */ #define _UC_MD 0x400f0020 /* MD bits. see below */ /* * if your port needs more MD bits, please try to choose bits from _UC_MD * first, rather than picking random unused bits. * * _UC_MD details * * _UC_TLSBASE Context contains valid pthread private pointer * All ports must define this MD flag * 0x00040000 hppa, mips * 0x00000020 alpha * 0x00080000 all other ports * * _UC_SETSTACK Context uses signal stack * 0x00020000 arm * [undefined] alpha, powerpc and vax * 0x00010000 other ports * * _UC_CLRSTACK Context does not use signal stack * 0x00040000 arm * [undefined] alpha, powerpc and vax * 0x00020000 other ports * * _UC_POWERPC_VEC Context does not use signal stack * 0x00010000 powerpc only * * _UC_POWERPC_SPE Context contains valid SPE context * 0x00020000 powerpc only * * _UC_M68K_UC_USER Used by m68k machdep code, but undocumented * 0x40000000 m68k only * * _UC_ARM_VFP Unused * 0x00010000 arm only * * _UC_VM Context contains valid virtual 8086 context * 0x00040000 i386, amd64 only * * _UC_FXSAVE Context contains FPU context in that * is in FXSAVE format in XMM space * 0x00000020 i386, amd64 only */ #ifdef _KERNEL struct lwp; void getucontext(struct lwp *, ucontext_t *); int setucontext(struct lwp *, const ucontext_t *); void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *); int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int); int cpu_mcontext_validate(struct lwp *, const mcontext_t *); #ifdef __UCONTEXT_SIZE __CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE); #endif # 116 "/usr/include/sys/ucontext.h" 3 4 #endif /* _KERNEL */ # 117 "/usr/include/sys/ucontext.h" 3 4 #endif /* !_SYS_UCONTEXT_H_ */ # 119 "/usr/include/sys/ucontext.h" 3 4 # 118 "/usr/include/sys/signal.h" 2 3 4 #endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 119 "/usr/include/sys/signal.h" 3 4 /* * Signal vector "template" used in sigaction call. */ struct sigaction { union { void (*_sa_handler)(int); #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) void (*_sa_sigaction)(int, siginfo_t *, void *); #endif # 130 "/usr/include/sys/signal.h" 3 4 } _sa_u; /* signal handler */ sigset_t sa_mask; /* signal mask to apply */ int sa_flags; /* see signal options below */ }; #define sa_handler _sa_u._sa_handler #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #define sa_sigaction _sa_u._sa_sigaction #endif # 140 "/usr/include/sys/signal.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include /* sigcontext; codes for SIGILL, SIGFPE */ #endif /* expanded by -frewrite-includes */ # 141 "/usr/include/sys/signal.h" 3 4 # 142 "/usr/include/sys/signal.h" 3 4 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #define SA_ONSTACK 0x0001 /* take signal on signal stack */ #define SA_RESTART 0x0002 /* restart system call on signal return */ #define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ #define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ #endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 150 "/usr/include/sys/signal.h" 3 4 /* Only valid for SIGCHLD. */ #define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ #define SA_NOCLDWAIT 0x0020 /* do not generate zombies on unwaited child */ #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #define SA_SIGINFO 0x0040 /* take sa_sigaction handler */ #endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */ # 157 "/usr/include/sys/signal.h" 3 4 #if defined(_NETBSD_SOURCE) #define SA_NOKERNINFO 0x0080 /* siginfo does not print kernel info on tty */ #endif /*_NETBSD_SOURCE */ # 160 "/usr/include/sys/signal.h" 3 4 #ifdef _KERNEL #define SA_ALLBITS 0x00ff #endif # 163 "/usr/include/sys/signal.h" 3 4 /* * Flags for sigprocmask(): */ #define SIG_BLOCK 1 /* block specified signal set */ #define SIG_UNBLOCK 2 /* unblock specified signal set */ #define SIG_SETMASK 3 /* set specified signal set */ #if defined(_NETBSD_SOURCE) typedef void (*sig_t)(int); /* type of signal function */ #define SS_INIT /* Initializer for stack_t */ \ ((stack_t) { .ss_sp = NULL, .ss_flags = SS_DISABLE, .ss_size = 0 }) #endif # 178 "/usr/include/sys/signal.h" 3 4 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) /* * Flags used with stack_t/struct sigaltstack. */ #define SS_ONSTACK 0x0001 /* take signals on alternate stack */ #define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ #ifdef _KERNEL #define SS_ALLBITS 0x0005 #endif # 189 "/usr/include/sys/signal.h" 3 4 #define MINSIGSTKSZ 8192 /* minimum allowable stack */ #define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ #endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 192 "/usr/include/sys/signal.h" 3 4 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) /* * Structure used in sigstack call. */ struct sigstack { void *ss_sp; /* signal stack pointer */ int ss_onstack; /* current status */ }; #endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 203 "/usr/include/sys/signal.h" 3 4 #if defined(_NETBSD_SOURCE) && !defined(_KERNEL) /* * Macro for converting signal number to a mask suitable for * sigblock(). */ #define sigmask(n) __sigmask(n) #define BADSIG SIG_ERR #endif /* _NETBSD_SOURCE */ # 213 "/usr/include/sys/signal.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) struct sigevent { int sigev_notify; int sigev_signo; union sigval sigev_value; void (*sigev_notify_function)(union sigval); void /* pthread_attr_t */ *sigev_notify_attributes; }; #define SIGEV_NONE 0 #define SIGEV_SIGNAL 1 #define SIGEV_THREAD 2 #if defined(_NETBSD_SOURCE) #define SIGEV_SA 3 #endif # 230 "/usr/include/sys/signal.h" 3 4 #endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */ # 231 "/usr/include/sys/signal.h" 3 4 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 233 "/usr/include/sys/signal.h" 3 4 /* * For historical reasons; programs expect signal's return value to be * defined by . */ __BEGIN_DECLS void (*signal(int, void (*)(int)))(int); void (*bsd_signal(int, void (*)(int)))(int); #if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_NETBSD_SOURCE) int sigqueue(pid_t, int, const union sigval); #endif # 244 "/usr/include/sys/signal.h" 3 4 #if defined(_NETBSD_SOURCE) int sigqueueinfo(pid_t, const siginfo_t *); #endif # 247 "/usr/include/sys/signal.h" 3 4 __END_DECLS #endif /* !_SYS_SIGNAL_H_ */ # 249 "/usr/include/sys/signal.h" 3 4 # 171 "/usr/include/sys/param.h" 2 3 4 /* Machine type dependent parameters. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 173 "/usr/include/sys/param.h" 3 4 # 1 "/usr/include/machine/param.h" 1 3 4 /* $NetBSD: param.h,v 1.22 2017/06/14 12:27:24 maxv Exp $ */ #ifdef __x86_64__ #ifndef XEN /* Must be defined before cpu.h */ #define MAXCPUS 256 #endif # 9 "/usr/include/machine/param.h" 3 4 #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/usr/include/machine/param.h" 3 4 # 12 "/usr/include/machine/param.h" 3 4 #endif # 13 "/usr/include/machine/param.h" 3 4 #define _MACHINE amd64 #define MACHINE "amd64" #define _MACHINE_ARCH x86_64 #define MACHINE_ARCH "x86_64" #define MID_MACHINE MID_X86_64 #define ALIGNED_POINTER(p,t) 1 #define ALIGNBYTES32 (sizeof(int) - 1) #define ALIGN32(p) (((u_long)(p) + ALIGNBYTES32) &~ALIGNBYTES32) #define PGSHIFT 12 /* LOG2(NBPG) */ #define NBPG (1 << PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ #define NPTEPG (NBPG/(sizeof (pt_entry_t))) #define MAXIOMEM 0xffffffffffff /* * Maximum physical memory supported by the implementation. */ #define MAXPHYSMEM 0x100000000000ULL /* 16TB */ /* * XXXfvdl change this (after bootstrap) to take # of bits from * config info into account. */ #define KERNBASE 0xffffffff80000000 /* start of kernel virtual space */ #define KERNTEXTOFF 0xffffffff80200000 /* start of kernel text */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) #define KERNTEXTOFF_HI 0xffffffff #define KERNTEXTOFF_LO 0x80200000 #define KERNBASE_HI 0xffffffff #define KERNBASE_LO 0x80000000 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ #define DEV_BSIZE (1 << DEV_BSHIFT) #define BLKDEV_IOSIZE 2048 #ifndef MAXPHYS #define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ #endif # 57 "/usr/include/machine/param.h" 3 4 #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ #ifdef DIAGNOSTIC #define UPAGES 4 /* pages of u-area (1 for redzone) */ #else # 63 "/usr/include/machine/param.h" 3 4 #define UPAGES 3 /* pages of u-area */ #endif # 65 "/usr/include/machine/param.h" 3 4 #define USPACE (UPAGES * NBPG) /* total size of u-area */ #define INTRSTACKSIZE 4096 #ifndef MSGBUFSIZE #define MSGBUFSIZE (8*NBPG) /* default message buffer size */ #endif # 71 "/usr/include/machine/param.h" 3 4 /* * Constants related to network buffer management. * MCLBYTES must be no larger than NBPG (the software page size), and, * on machines that exchange pages of input or output buffers with mbuf * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple * of the hardware page size. */ #define MSIZE 512 /* size of an mbuf */ #ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to m_buf clusters */ /* 2K cluster can hold Ether frame */ #endif /* MCLSHIFT */ # 85 "/usr/include/machine/param.h" 3 4 #define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ #ifndef NFS_RSIZE #define NFS_RSIZE 32768 #endif # 91 "/usr/include/machine/param.h" 3 4 #ifndef NFS_WSIZE #define NFS_WSIZE 32768 #endif # 94 "/usr/include/machine/param.h" 3 4 /* * Minimum size of the kernel kmem_arena in PAGE_SIZE-sized * logical pages. * No enforced maximum on amd64. */ #define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT) #define NKMEMPAGES_MAX_UNLIMITED 1 /* * XXXfvdl the PD* stuff is different from i386. */ /* * Mach derived conversion macros */ #define x86_round_pdr(x) \ ((((unsigned long)(x)) + (NBPD_L2 - 1)) & ~(NBPD_L2 - 1)) #define x86_trunc_pdr(x) ((unsigned long)(x) & ~(NBPD_L2 - 1)) #define x86_btod(x) ((unsigned long)(x) >> L2_SHIFT) #define x86_dtob(x) ((unsigned long)(x) << L2_SHIFT) #define x86_round_page(x) ((((unsigned long)(x)) + PGOFSET) & ~PGOFSET) #define x86_trunc_page(x) ((unsigned long)(x) & ~PGOFSET) #define x86_btop(x) ((unsigned long)(x) >> PGSHIFT) #define x86_ptob(x) ((unsigned long)(x) << PGSHIFT) #define btop(x) x86_btop(x) #define ptob(x) x86_ptob(x) #define mstohz(ms) ((ms + 0UL) * hz / 1000) #else /* __x86_64__ */ # 125 "/usr/include/machine/param.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 126 "/usr/include/machine/param.h" 3 4 # 127 "/usr/include/machine/param.h" 3 4 #endif /* __x86_64__ */ # 129 "/usr/include/machine/param.h" 3 4 # 174 "/usr/include/sys/param.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 174 "/usr/include/sys/param.h" 3 4 # 175 "/usr/include/sys/param.h" 3 4 /* pages ("clicks") to disk blocks */ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) #define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) /* bytes to pages */ #define ctob(x) ((x) << PGSHIFT) #define btoc(x) (((x) + PGOFSET) >> PGSHIFT) /* bytes to disk blocks */ #define dbtob(x) ((x) << DEV_BSHIFT) #define btodb(x) ((x) >> DEV_BSHIFT) #ifndef COHERENCY_UNIT #define COHERENCY_UNIT 64 #endif # 191 "/usr/include/sys/param.h" 3 4 #ifndef CACHE_LINE_SIZE #define CACHE_LINE_SIZE 64 #endif # 194 "/usr/include/sys/param.h" 3 4 #ifndef MAXCPUS #define MAXCPUS 32 #endif # 197 "/usr/include/sys/param.h" 3 4 #ifndef MAX_LWP_PER_PROC #define MAX_LWP_PER_PROC 8000 #endif # 200 "/usr/include/sys/param.h" 3 4 /* * Stack macros. On most architectures, the stack grows down, * towards lower addresses; it is the rare architecture where * it grows up, towards higher addresses. * * STACK_GROW and STACK_SHRINK adjust a stack pointer by some * size, no questions asked. STACK_ALIGN aligns a stack pointer. * * STACK_ALLOC returns a pointer to allocated stack space of * some size; given such a pointer and a size, STACK_MAX gives * the maximum (in the "maxsaddr" sense) stack address of the * allocated memory. */ #if defined(_KERNEL) || defined(__EXPOSE_STACK) #ifndef STACK_ALIGNBYTES #define STACK_ALIGNBYTES __ALIGNBYTES #endif # 219 "/usr/include/sys/param.h" 3 4 #ifdef __MACHINE_STACK_GROWS_UP #define STACK_GROW(sp, _size) (((char *)(void *)(sp)) + (_size)) #define STACK_SHRINK(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_ALIGN(sp, bytes) \ ((char *)((((unsigned long)(sp)) + (bytes)) & ~(bytes))) #define STACK_ALLOC(sp, _size) ((char *)(void *)(sp)) #define STACK_MAX(p, _size) (((char *)(void *)(p)) + (_size)) #else # 228 "/usr/include/sys/param.h" 3 4 #define STACK_GROW(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_SHRINK(sp, _size) (((char *)(void *)(sp)) + (_size)) #define STACK_ALIGN(sp, bytes) \ ((char *)(((unsigned long)(sp)) & ~(bytes))) #define STACK_ALLOC(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_MAX(p, _size) ((char *)(void *)(p)) #endif # 235 "/usr/include/sys/param.h" 3 4 #define STACK_LEN_ALIGN(len, bytes) (((len) + (bytes)) & ~(bytes)) #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */ # 238 "/usr/include/sys/param.h" 3 4 /* * Round p (pointer or byte index) up to a correctly-aligned value for all * data types (int, long, ...). The result is u_int and must be cast to * any desired pointer type. * * ALIGNED_POINTER is a boolean macro that checks whether an address * is valid to fetch data elements of type t from on this architecture. * This does not reflect the optimal alignment, just the possibility * (within reasonable limits). * */ #define ALIGNBYTES __ALIGNBYTES #ifndef ALIGN #define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES) #endif # 254 "/usr/include/sys/param.h" 3 4 #ifndef ALIGNED_POINTER #define ALIGNED_POINTER(p,t) ((((uintptr_t)(p)) & (sizeof(t) - 1)) == 0) #endif # 257 "/usr/include/sys/param.h" 3 4 /* * Historic priority levels. These are meaningless and remain only * for source compatibility. Do not use in new code. */ #define PSWP 0 #define PVM 4 #define PINOD 8 #define PRIBIO 16 #define PVFS 20 #define PZERO 22 #define PSOCK 24 #define PWAIT 32 #define PLOCK 36 #define PPAUSE 40 #define PUSER 50 #define MAXPRI 127 #define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ #define PNORELOCK 0x200 /* OR'd with pri for tsleep to not relock */ /* * New priority levels. */ #define PRI_COUNT 224 #define PRI_NONE (-1) #define PRI_KERNEL_RT 192 #define NPRI_KERNEL_RT 32 #define MAXPRI_KERNEL_RT (PRI_KERNEL_RT + NPRI_KERNEL_RT - 1) #define PRI_USER_RT 128 #define NPRI_USER_RT 64 #define MAXPRI_USER_RT (PRI_USER_RT + NPRI_USER_RT - 1) #define PRI_KTHREAD 96 #define NPRI_KTHREAD 32 #define MAXPRI_KTHREAD (PRI_KTHREAD + NPRI_KTHREAD - 1) #define PRI_KERNEL 64 #define NPRI_KERNEL 32 #define MAXPRI_KERNEL (PRI_KERNEL + NPRI_KERNEL - 1) #define PRI_USER 0 #define NPRI_USER 64 #define MAXPRI_USER (PRI_USER + NPRI_USER - 1) /* Priority range used by POSIX real-time features */ #define SCHED_PRI_MIN 0 #define SCHED_PRI_MAX 63 /* * Kernel thread priorities. */ #define PRI_SOFTSERIAL MAXPRI_KERNEL_RT #define PRI_SOFTNET (MAXPRI_KERNEL_RT - schedppq * 1) #define PRI_SOFTBIO (MAXPRI_KERNEL_RT - schedppq * 2) #define PRI_SOFTCLOCK (MAXPRI_KERNEL_RT - schedppq * 3) #define PRI_XCALL MAXPRI_KTHREAD #define PRI_PGDAEMON (MAXPRI_KTHREAD - schedppq * 1) #define PRI_VM (MAXPRI_KTHREAD - schedppq * 2) #define PRI_IOFLUSH (MAXPRI_KTHREAD - schedppq * 3) #define PRI_BIO (MAXPRI_KTHREAD - schedppq * 4) #define PRI_IDLE PRI_USER /* * Miscellaneous. */ #define NBPW sizeof(int) /* number of bytes per word (integer) */ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ #define NODEV (dev_t)(-1) /* non-existent device */ /* * File system parameters and macros. * * The file system is made out of blocks of at most MAXBSIZE units, with * smaller units (fragments) only in the last direct block. MAXBSIZE * primarily determines the size of buffers in the buffer pool. It may be * made larger without any effect on existing file systems; however making * it smaller may make some file systems unmountable. */ #ifndef MAXBSIZE /* XXX */ #define MAXBSIZE MAXPHYS #endif # 344 "/usr/include/sys/param.h" 3 4 #define MAXFRAG 8 /* * MAXPATHLEN defines the longest permissible path length after expanding * symbolic links. It is used to allocate a temporary buffer from the buffer * pool in which to do the name expansion, hence should be a power of two, * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the * maximum number of symbolic links that may be expanded in a path name. * It should be set high enough to allow all legitimate uses, but halt * infinite loops reasonably quickly. * * MAXSYMLINKS should be >= _POSIX_SYMLOOP_MAX (see ) */ #define MAXPATHLEN PATH_MAX #define MAXSYMLINKS 32 /* * This is the maximum individual filename component length enforced by * namei. Filesystems cannot exceed this limit. The upper bound for that * limit is NAME_MAX. We don't bump it for now, for compatibility with * old binaries during the time where MAXNAMLEN was 511 and NAME_MAX was * 255 */ #define KERNEL_NAME_MAX 255 /* Bit map related macros. */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif # 379 "/usr/include/sys/param.h" 3 4 #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define rounddown(x,y) (((x)/(y))*(y)) /* * Rounding to powers of two. The naive definitions of roundup2 and * rounddown2, * * #define roundup2(x,m) (((x) + ((m) - 1)) & ~((m) - 1)) * #define rounddown2(x,m) ((x) & ~((m) - 1)), * * exhibit a quirk of integer arithmetic in C because the complement * happens in the type of m, not in the type of x. So if unsigned int * is 32-bit, and m is an unsigned int while x is a uint64_t, then * roundup2 and rounddown2 would have the unintended effect of clearing * the upper 32 bits of the result(!). These definitions avoid the * pitfalls of C arithmetic depending on the types of x and m, and * additionally avoid multiply evaluating their arguments. */ #define roundup2(x,m) ((((x) - 1) | ((m) - 1)) + 1) #define rounddown2(x,m) ((x) & ~((__typeof__(x))((m) - 1))) #define powerof2(x) ((((x)-1)&(x))==0) /* * Constants for setting the parameters of the kernel memory allocator. * * 2 ** MINBUCKET is the smallest unit of memory that will be * allocated. It must be at least large enough to hold a pointer. * * Units of memory less or equal to MAXALLOCSAVE will permanently * allocate physical memory; requests for these size pieces of * memory are quite fast. Allocations greater than MAXALLOCSAVE must * always allocate and free physical memory; requests for these * size allocations should be done infrequently as they will be slow. * * Constraints: NBPG <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and * MAXALLOCSAVE must be a power of two. */ #ifdef _LP64 #define MINBUCKET 5 /* 5 => min allocation of 32 bytes */ #else # 420 "/usr/include/sys/param.h" 3 4 #define MINBUCKET 4 /* 4 => min allocation of 16 bytes */ #endif # 422 "/usr/include/sys/param.h" 3 4 #define MAXALLOCSAVE (2 * NBPG) /* * Scale factor for scaled integers used to count %cpu time and load avgs. * * The number of CPU `tick's that map to a unique `%age' can be expressed * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that * can be calculated (assuming 32 bits) can be closely approximated using * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). * * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. */ #define FSHIFT 11 /* bits to right of fixed binary point */ #define FSCALE (1<. */ #ifndef UBC_WINSHIFT #define UBC_WINSHIFT 13 #endif # 457 "/usr/include/sys/param.h" 3 4 #ifndef UBC_NWINS #define UBC_NWINS 1024 #endif # 460 "/usr/include/sys/param.h" 3 4 #ifdef _KERNEL /* * macro to convert from milliseconds to hz without integer overflow * Default version using only 32bits arithmetics. * 64bit port can define 64bit version in their * 0x20000 is safe for hz < 20000 */ #ifndef mstohz #define mstohz(ms) \ (__predict_false((ms) >= 0x20000) ? \ ((ms +0u) / 1000u) * hz : \ ((ms +0u) * hz) / 1000u) #endif # 474 "/usr/include/sys/param.h" 3 4 #ifndef hztoms #define hztoms(t) \ (__predict_false((t) >= 0x20000) ? \ ((t +0u) / hz) * 1000u : \ ((t +0u) * 1000u) / hz) #endif # 480 "/usr/include/sys/param.h" 3 4 extern const int schedppq; extern size_t coherency_unit; #endif /* _KERNEL */ # 485 "/usr/include/sys/param.h" 3 4 /* * Minimum alignment of "struct lwp" needed by the architecture. * This counts when packing a lock byte into a word alongside a * pointer to an LWP. */ #ifndef MIN_LWP_ALIGNMENT #define MIN_LWP_ALIGNMENT 32 #endif # 494 "/usr/include/sys/param.h" 3 4 #endif /* !__ASSEMBLER__ */ # 495 "/usr/include/sys/param.h" 3 4 #endif /* !_SYS_PARAM_H_ */ # 497 "/usr/include/sys/param.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" /* * Declare macros and functions that may be missing in . */ #if !defined(MIN) # define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" #if !defined(MAX) # define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" /* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */ #if !defined(ARG_MAX) # define ARG_MAX sysconf(_SC_ARG_MAX) #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" #endif /* !_NBCOMPAT_SYS_PARAM_H_ */ # 56 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/param.h" # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if HAVE_ERRNO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/usr/include/errno.h" 1 3 4 /* $NetBSD: errno.h,v 1.11 2008/03/03 06:57:48 dholland Exp $ */ /* * 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. * * from: @(#)errno.h 8.5 (Berkeley) 1/21/94 */ #ifndef _ERRNO_H_ #define _ERRNO_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/errno.h" 3 4 # 43 "/usr/include/errno.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/errno.h" 3 4 # 1 "/usr/include/sys/errno.h" 1 3 4 /* $NetBSD: errno.h,v 1.40 2013/01/02 18:51:53 dsl Exp $ */ /* * 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 */ #ifndef _SYS_ERRNO_H_ #define _SYS_ERRNO_H_ #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 */ #define ENOTBLK 15 /* Block device required */ #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 */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #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 or too small */ /* non-blocking and interrupt i/o */ #define EAGAIN 35 /* Resource temporarily unavailable */ #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 option not available */ #define EPROTONOSUPPORT 43 /* Protocol not supported */ #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ #define EOPNOTSUPP 45 /* 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 */ #define ENAMETOOLONG 63 /* File name too long */ /* should be rearranged */ #define EHOSTDOWN 64 /* Host is down */ #define EHOSTUNREACH 65 /* No route to host */ #define ENOTEMPTY 66 /* Directory not empty */ /* quotas & mush */ #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 */ #define ENOLCK 77 /* No locks available */ #define ENOSYS 78 /* Function not implemented */ #define EFTYPE 79 /* Inappropriate file type or format */ #define EAUTH 80 /* Authentication error */ #define ENEEDAUTH 81 /* Need authenticator */ /* SystemV IPC */ #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 */ /* Wide/multibyte-character handling, ISO/IEC 9899/AMD1:1995 */ #define EILSEQ 85 /* Illegal byte sequence */ /* From IEEE Std 1003.1-2001 */ /* Base, Realtime, Threads or Thread Priority Scheduling option errors */ #define ENOTSUP 86 /* Not supported */ /* Realtime option errors */ #define ECANCELED 87 /* Operation canceled */ /* Realtime, XSI STREAMS option errors */ #define EBADMSG 88 /* Bad or Corrupt message */ /* XSI STREAMS option errors */ #define ENODATA 89 /* No message available */ #define ENOSR 90 /* No STREAM resources */ #define ENOSTR 91 /* Not a STREAM */ #define ETIME 92 /* STREAM ioctl timeout */ /* File system extended attribute errors */ #define ENOATTR 93 /* Attribute not found */ /* Realtime, XSI STREAMS option errors */ #define EMULTIHOP 94 /* Multihop attempted */ #define ENOLINK 95 /* Link has been severed */ #define EPROTO 96 /* Protocol error */ #define ELAST 96 /* Must equal largest errno */ #if defined(_KERNEL) || defined(_KMEMUSER) /* pseudo-errors returned inside kernel to modify return to process */ #define EJUSTRETURN -2 /* don't modify regs, just return */ #define ERESTART -3 /* restart syscall */ #define EPASSTHROUGH -4 /* ioctl not handled by this layer */ #define EDUPFD -5 /* Dup given fd */ #define EMOVEFD -6 /* Move given fd */ #endif # 185 "/usr/include/sys/errno.h" 3 4 #endif /* !_SYS_ERRNO_H_ */ # 187 "/usr/include/sys/errno.h" 3 4 # 44 "/usr/include/errno.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/errno.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 45 "/usr/include/errno.h" 2 3 4 __BEGIN_DECLS /* note: this appears in both errno.h and signal.h */ #ifndef __errno int *__errno(void); #define __errno __errno #endif # 53 "/usr/include/errno.h" 3 4 #ifndef errno #define errno (*__errno()) #endif # 57 "/usr/include/errno.h" 3 4 #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ extern const int sys_nerr __RENAME(__sys_nerr14); extern const char *const *sys_errlist __RENAME(__sys_errlist14); #endif # 63 "/usr/include/errno.h" 3 4 #endif # 64 "/usr/include/errno.h" 3 4 __END_DECLS #endif /* !_ERRNO_H_ */ # 67 "/usr/include/errno.h" 3 4 # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #endif # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_STDARG_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/usr/local/lib/clang/6.0.0/include/stdarg.h" 1 3 4 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #ifndef __STDARG_H #define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST #endif # 33 "/usr/local/lib/clang/6.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 __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__) #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif # 45 "/usr/local/lib/clang/6.0.0/include/stdarg.h" 3 4 #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 typedef __builtin_va_list __gnuc_va_list; #endif # 50 "/usr/local/lib/clang/6.0.0/include/stdarg.h" 3 4 #endif /* __STDARG_H */ # 52 "/usr/local/lib/clang/6.0.0/include/stdarg.h" 3 4 # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #endif # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_STDDEF_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/usr/local/lib/clang/6.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/usr/local/lib/clang/6.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 # 44 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 64 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif # 90 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif # 93 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 104 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #else # 105 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 107 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif # 113 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 # 119 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif # 120 "/usr/local/lib/clang/6.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) */ # 123 "/usr/local/lib/clang/6.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 defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 134 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 #endif # 138 "/usr/local/lib/clang/6.0.0/include/stddef.h" 3 4 # 47 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #endif # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" 1 /* $NetBSD: assert.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_ASSERT_H_ #define _NBCOMPAT_ASSERT_H_ #if HAVE_ASSERT_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" # 1 "/usr/include/assert.h" 1 3 4 /* $NetBSD: assert.h,v 1.22 2016/10/03 12:08:39 kamil Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)assert.h 8.2 (Berkeley) 1/21/94 */ /* * Unlike other ANSI header files, may usefully be included * multiple times, with and without NDEBUG defined. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/assert.h" 3 4 # 45 "/usr/include/assert.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/assert.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 46 "/usr/include/assert.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/assert.h" 3 4 # 47 "/usr/include/assert.h" 3 4 #undef assert #ifdef NDEBUG # ifndef __lint__ # define assert(e) (__static_cast(void,0)) # else /* !__lint__ */ # 54 "/usr/include/assert.h" 3 4 # define assert(e) # endif /* __lint__ */ # 56 "/usr/include/assert.h" 3 4 #else /* !NDEBUG */ # 57 "/usr/include/assert.h" 3 4 # if __STDC__ # define assert(e) \ ((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__, \ __assert_function__, #e)) # else /* PCC */ # 62 "/usr/include/assert.h" 3 4 # define assert(e) \ ((e) ? __static_cast(void,0) : __assert13(__FILE__, __LINE__, \ __assert_function__, "e")) # endif /* !__STDC__ */ # 66 "/usr/include/assert.h" 3 4 #endif /* NDEBUG */ # 67 "/usr/include/assert.h" 3 4 #undef _DIAGASSERT #if !defined(_DIAGNOSTIC) # if !defined(__lint__) # define _DIAGASSERT(e) (__static_cast(void,0)) # else /* !__lint__ */ # 73 "/usr/include/assert.h" 3 4 # define _DIAGASSERT(e) # endif /* __lint__ */ # 75 "/usr/include/assert.h" 3 4 #else /* _DIAGNOSTIC */ # 76 "/usr/include/assert.h" 3 4 # if __STDC__ # define _DIAGASSERT(e) \ ((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \ __assert_function__, #e)) # else /* !__STDC__ */ # 81 "/usr/include/assert.h" 3 4 # define _DIAGASSERT(e) \ ((e) ? __static_cast(void,0) : __diagassert13(__FILE__, __LINE__, \ __assert_function__, "e")) # endif # 85 "/usr/include/assert.h" 3 4 #endif /* _DIAGNOSTIC */ # 86 "/usr/include/assert.h" 3 4 #if defined(__lint__) #define __assert_function__ (__static_cast(const void *,0)) #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # 91 "/usr/include/assert.h" 3 4 #define __assert_function__ __func__ #elif __GNUC_PREREQ__(2, 6) # 93 "/usr/include/assert.h" 3 4 #define __assert_function__ __PRETTY_FUNCTION__ #else # 95 "/usr/include/assert.h" 3 4 #define __assert_function__ (__static_cast(const void *,0)) #endif # 97 "/usr/include/assert.h" 3 4 #ifndef __ASSERT_DECLARED #define __ASSERT_DECLARED __BEGIN_DECLS __dead void __assert(const char *, int, const char *); __dead void __assert13(const char *, int, const char *, const char *); void __diagassert(const char *, int, const char *); void __diagassert13(const char *, int, const char *, const char *); __END_DECLS #endif /* __ASSERT_DECLARED */ # 107 "/usr/include/assert.h" 3 4 #if ((__cplusplus - 0) < 201103L) #ifndef static_assert #define static_assert _Static_assert #endif /* static_assert */ # 112 "/usr/include/assert.h" 3 4 #endif # 113 "/usr/include/assert.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" /* * Declare macros and functions that may be missing in . */ #ifndef _DIAGASSERT #define _DIAGASSERT(cond) assert(cond) #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" #endif /* !_NBCOMPAT_ASSERT_H_ */ # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/assert.h" # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" 1 /* $NetBSD: ctype.h,v 1.3 2015/06/08 00:44:46 joerg Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_CTYPE_H_ #define _NBCOMPAT_CTYPE_H_ #if HAVE_CTYPE_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" # 1 "/usr/include/ctype.h" 1 3 4 /* $NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $ */ /* * Copyright (c) 1989 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. * * @(#)ctype.h 5.3 (Berkeley) 4/3/91 */ #ifndef _CTYPE_H_ #define _CTYPE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/ctype.h" 3 4 # 43 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 44 "/usr/include/ctype.h" 2 3 4 __BEGIN_DECLS int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 65 "/usr/include/ctype.h" 3 4 int isalnum_l(int, locale_t); int isalpha_l(int, locale_t); int isblank_l(int, locale_t); int iscntrl_l(int, locale_t); int isdigit_l(int, locale_t); int isgraph_l(int, locale_t); int islower_l(int, locale_t); int isprint_l(int, locale_t); int ispunct_l(int, locale_t); int isspace_l(int, locale_t); int isupper_l(int, locale_t); int isxdigit_l(int, locale_t); int tolower_l(int, locale_t); int toupper_l(int, locale_t); #endif # 81 "/usr/include/ctype.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int isascii(int); int toascii(int); int _tolower(int); int _toupper(int); #endif # 88 "/usr/include/ctype.h" 3 4 #if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \ (_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE) int isblank(int); #endif # 93 "/usr/include/ctype.h" 3 4 __END_DECLS #if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \ !defined(__cplusplus) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 97 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/sys/ctype_inline.h" 1 3 4 /* $NetBSD: ctype_inline.h,v 1.4 2015/02/24 13:17:27 joerg Exp $ */ /* * Copyright (c) 1989 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. * * @(#)ctype.h 5.3 (Berkeley) 4/3/91 * NetBSD: ctype.h,v 1.30 2010/05/22 06:38:15 tnozaki Exp */ #ifndef _CTYPE_INLINE_H_ #define _CTYPE_INLINE_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/ctype_inline.h" 3 4 # 44 "/usr/include/sys/ctype_inline.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/sys/ctype_inline.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 45 "/usr/include/sys/ctype_inline.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/sys/ctype_inline.h" 3 4 # 1 "/usr/include/sys/ctype_bits.h" 1 3 4 /* $NetBSD: ctype_bits.h,v 1.6 2016/01/22 23:30:27 dholland Exp $ */ /* * Copyright (c) 1989 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. * * @(#)ctype.h 5.3 (Berkeley) 4/3/91 * NetBSD: ctype.h,v 1.30 2010/05/22 06:38:15 tnozaki Exp */ #ifndef _SYS_CTYPE_BITS_H_ #define _SYS_CTYPE_BITS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/ctype_bits.h" 3 4 # 44 "/usr/include/sys/ctype_bits.h" 3 4 #define _CTYPE_A 0x0001 /* Alpha */ #define _CTYPE_C 0x0002 /* Control */ #define _CTYPE_D 0x0004 /* Digit */ #define _CTYPE_G 0x0008 /* Graph */ #define _CTYPE_L 0x0010 /* Lower */ #define _CTYPE_P 0x0020 /* Punct */ #define _CTYPE_S 0x0040 /* Space */ #define _CTYPE_U 0x0080 /* Upper */ #define _CTYPE_X 0x0100 /* X digit */ #define _CTYPE_BL 0x0200 /* Blank */ #define _CTYPE_R 0x0400 /* Print */ #define _CTYPE_I 0x0800 /* Ideogram */ #define _CTYPE_T 0x1000 /* Special */ #define _CTYPE_Q 0x2000 /* Phonogram */ __BEGIN_DECLS extern const unsigned short *_ctype_tab_; extern const short *_tolower_tab_; extern const short *_toupper_tab_; extern const unsigned short _C_ctype_tab_[]; extern const short _C_toupper_tab_[]; extern const short _C_tolower_tab_[]; __END_DECLS #endif /* !_SYS_CTYPE_BITS_H_ */ # 71 "/usr/include/sys/ctype_bits.h" 3 4 # 47 "/usr/include/sys/ctype_inline.h" 2 3 4 #define isalnum(c) ((int)((_ctype_tab_ + 1)[(c)] & (_CTYPE_A|_CTYPE_D))) #define isalpha(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_A)) #define iscntrl(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_C)) #define isdigit(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_D)) #define isgraph(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_G)) #define islower(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_L)) #define isprint(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_R)) #define ispunct(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_P)) #define isspace(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_S)) #define isupper(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_U)) #define isxdigit(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_X)) #define tolower(c) ((int)((_tolower_tab_ + 1)[(c)])) #define toupper(c) ((int)((_toupper_tab_ + 1)[(c)])) #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define isascii(c) ((unsigned)(c) <= 0177) #define toascii(c) ((c) & 0177) #define _tolower(c) ((c) - 'A' + 'a') #define _toupper(c) ((c) - 'a' + 'A') #endif # 68 "/usr/include/sys/ctype_inline.h" 3 4 #if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \ (_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE) #define isblank(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_BL)) #endif # 73 "/usr/include/sys/ctype_inline.h" 3 4 #endif /* !_CTYPE_INLINE_H_ */ # 75 "/usr/include/sys/ctype_inline.h" 3 4 # 98 "/usr/include/ctype.h" 2 3 4 #else # 99 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 99 "/usr/include/ctype.h" 3 4 # 100 "/usr/include/ctype.h" 3 4 #endif # 101 "/usr/include/ctype.h" 3 4 #endif /* !_CTYPE_H_ */ # 103 "/usr/include/ctype.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" /* * Declare macros and functions that may be missing in . */ #if !HAVE_DECL_ISBLANK int isblank(int); #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" #endif /* !_NBCOMPAT_CTYPE_H_ */ # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/ctype.h" # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" 1 /* $NetBSD: dirent.h,v 1.3 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_DIRENT_H_ #define _NBCOMPAT_DIRENT_H_ #if HAVE_DIRENT_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # 1 "/usr/include/dirent.h" 1 3 4 /* $NetBSD: dirent.h,v 1.36 2016/12/16 04:45:04 mrg Exp $ */ /*- * 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. * * @(#)dirent.h 8.2 (Berkeley) 7/28/94 */ #ifndef _DIRENT_H_ #define _DIRENT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/dirent.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/dirent.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/dirent.h" 3 4 # 39 "/usr/include/dirent.h" 3 4 /* * The kernel defines the format of directory entries returned by * the getdents(2) system call. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/dirent.h" 3 4 # 1 "/usr/include/sys/dirent.h" 1 3 4 /* $NetBSD: dirent.h,v 1.30 2016/01/22 23:31:30 dholland Exp $ */ /*- * 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. * * @(#)dirent.h 8.3 (Berkeley) 8/10/94 */ #ifndef _SYS_DIRENT_H_ #define _SYS_DIRENT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/dirent.h" 3 4 # 38 "/usr/include/sys/dirent.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/dirent.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 39 "/usr/include/sys/dirent.h" 2 3 4 /* * The dirent structure defines the format of directory entries returned by * the getdents(2) system call. * * A directory entry has a struct dirent at the front of it, containing its * inode number, the length of the entry, and the length of the name * contained in the entry. These are followed by the name padded to * _DIRENT_ALIGN() byte boundary with null bytes. All names are guaranteed * NUL terminated. The maximum length of a name in a directory is MAXNAMLEN. */ struct dirent { ino_t d_fileno; /* file number of entry */ uint16_t d_reclen; /* length of this record */ uint16_t d_namlen; /* length of string in d_name */ uint8_t d_type; /* file type, see below */ #if defined(_NETBSD_SOURCE) #define MAXNAMLEN 511 /* must be kept in sync with NAME_MAX */ char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ #else # 59 "/usr/include/sys/dirent.h" 3 4 char d_name[511 + 1]; /* name must be no longer than this */ #endif # 61 "/usr/include/sys/dirent.h" 3 4 }; #if defined(_NETBSD_SOURCE) /* * File types */ #define DT_UNKNOWN 0 #define DT_FIFO 1 #define DT_CHR 2 #define DT_DIR 4 #define DT_BLK 6 #define DT_REG 8 #define DT_LNK 10 #define DT_SOCK 12 #define DT_WHT 14 /* * Caution: the following macros are used by the ufs/ffs code on ffs's * struct direct as well as the exposed struct dirent. The two * structures are not the same, so it's important (until ufs is fixed, * XXX) that the macro definitions remain type-polymorphic. */ /* * The _DIRENT_ALIGN macro returns the alignment of struct dirent. * struct direct and struct dirent12 used 4 byte alignment but * struct dirent uses 8. */ #define _DIRENT_ALIGN(dp) (sizeof((dp)->d_fileno) - 1) /* * The _DIRENT_NAMEOFF macro returns the offset of the d_name field in * struct dirent */ #if __GNUC_PREREQ__(4, 0) #define _DIRENT_NAMEOFF(dp) __builtin_offsetof(__typeof__(*(dp)), d_name) #else # 97 "/usr/include/sys/dirent.h" 3 4 #define _DIRENT_NAMEOFF(dp) \ ((char *)(void *)&(dp)->d_name - (char *)(void *)dp) #endif # 100 "/usr/include/sys/dirent.h" 3 4 /* * The _DIRENT_RECLEN macro gives the minimum record length which will hold * a name of size "namlen". This requires the amount of space in struct dirent * without the d_name field, plus enough space for the name with a terminating * null byte (namlen+1), rounded up to a the appropriate byte boundary. */ #define _DIRENT_RECLEN(dp, namlen) \ ((_DIRENT_NAMEOFF(dp) + (namlen) + 1 + _DIRENT_ALIGN(dp)) & \ ~_DIRENT_ALIGN(dp)) /* * The _DIRENT_SIZE macro returns the minimum record length required for * name name stored in the current record. */ #define _DIRENT_SIZE(dp) _DIRENT_RECLEN(dp, (dp)->d_namlen) /* * The _DIRENT_NEXT macro advances to the next dirent record. */ #define _DIRENT_NEXT(dp) ((void *)((char *)(void *)(dp) + (dp)->d_reclen)) /* * The _DIRENT_MINSIZE returns the size of an empty (invalid) record. */ #define _DIRENT_MINSIZE(dp) _DIRENT_RECLEN(dp, 0) /* * Convert between stat structure types and directory types. */ #define IFTODT(mode) (((mode) & 0170000) >> 12) #define DTTOIF(dirtype) ((dirtype) << 12) #endif # 129 "/usr/include/sys/dirent.h" 3 4 #endif /* !_SYS_DIRENT_H_ */ # 131 "/usr/include/sys/dirent.h" 3 4 # 45 "/usr/include/dirent.h" 2 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define d_ino d_fileno /* backward compatibility */ #endif # 49 "/usr/include/dirent.h" 3 4 typedef struct _dirdesc DIR; #if defined(_NETBSD_SOURCE) /* definitions for library routines operating on directories. */ #define DIRBLKSIZ 1024 /* structure describing an open directory. */ struct _dirdesc { /* * dd_fd should be kept intact to preserve ABI compat. see dirfd(). */ int dd_fd; /* file descriptor associated with directory */ /* * the rest is hidden from user. */ long dd_loc; /* offset in current buffer */ long dd_size; /* amount of data returned by getdents */ char *dd_buf; /* data buffer */ int dd_len; /* size of data buffer */ off_t dd_seek; /* magic cookie returned by getdents */ void *dd_internal; /* state for seekdir/telldir */ int dd_flags; /* flags for readdir */ void *dd_lock; /* lock for concurrent access */ }; #define dirfd(dirp) ((dirp)->dd_fd) /* flags for __opendir2() */ #define DTF_HIDEW 0x0001 /* hide whiteout entries */ #define DTF_NODUP 0x0002 /* don't return duplicate names */ #define DTF_REWIND 0x0004 /* rewind after reading union stack */ #define __DTF_READALL 0x0008 /* everything has been read */ #define __DTF_RETRY_ON_BADCOOKIE 0x0001 /* retry on EINVAL (only valid with __DTF_READALL) */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 86 "/usr/include/dirent.h" 3 4 # 87 "/usr/include/dirent.h" 3 4 #endif # 89 "/usr/include/dirent.h" 3 4 #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 92 "/usr/include/dirent.h" 3 4 # 93 "/usr/include/dirent.h" 3 4 __BEGIN_DECLS int closedir(DIR *); void rewinddir(DIR *); #ifndef __LIBC12_SOURCE__ DIR *opendir(const char *) __RENAME(__opendir30); struct dirent *readdir(DIR *) __RENAME(__readdir30); int readdir_r(DIR * __restrict, struct dirent * __restrict, struct dirent ** __restrict) __RENAME(__readdir_r30); #endif # 103 "/usr/include/dirent.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) void seekdir(DIR *, long); long telldir(DIR *); #endif /* defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) */ # 107 "/usr/include/dirent.h" 3 4 #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ DIR *fdopendir(int); DIR *__opendir2(const char *, int) __RENAME(__opendir230); int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)) __RENAME(__scandir30); int getdents(int, char *, size_t) __RENAME(__getdents30); int alphasort(const struct dirent **, const struct dirent **) __RENAME(__alphasort30); #endif # 119 "/usr/include/dirent.h" 3 4 #endif /* defined(_NETBSD_SOURCE) */ # 120 "/usr/include/dirent.h" 3 4 __END_DECLS #endif /* !_KERNEL */ # 123 "/usr/include/dirent.h" 3 4 #endif /* !_DIRENT_H_ */ # 125 "/usr/include/dirent.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" 2 #else # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # define dirent direct # if HAVE_SYS_NDIR_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # endif # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # if HAVE_SYS_DIR_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # endif # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # if HAVE_NDIR_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # 47 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # endif # 48 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" #endif # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" /* * Declare functions and macros that may be missing in . */ #if !defined(HAVE_DIRFD) && defined(HAVE_DIR_DD_FD) #define dirfd(dirp) ((dirp)->dd_fd) #endif # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" #endif /* !_NBCOMPAT_DIRENT_H_ */ # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/dirent.h" # 52 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 52 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" 1 /* $NetBSD: err.h,v 1.4 2004/08/23 03:32:13 jlam Exp $ */ /* * 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. 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. * * @(#)fts.h 8.3 (Berkeley) 8/14/94 */ #ifndef _NBCOMPAT_ERR_H_ #define _NBCOMPAT_ERR_H_ #if HAVE_ERR_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" # 1 "/usr/include/err.h" 1 3 4 /* $NetBSD: err.h,v 1.17 2014/01/16 17:22:06 christos Exp $ */ /*- * Copyright (c) 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. * * @(#)err.h 8.1 (Berkeley) 6/2/93 */ #ifndef _ERR_H_ #define _ERR_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/err.h" 3 4 # 38 "/usr/include/err.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/err.h" 3 4 # 39 "/usr/include/err.h" 3 4 __BEGIN_DECLS __dead void err(int, const char *, ...) __printflike(2, 3) __dead; __dead void verr(int, const char *, va_list) __printflike(2, 0) __dead; __dead void errx(int, const char *, ...) __printflike(2, 3) __dead; __dead void verrx(int, const char *, va_list) __printflike(2, 0) __dead; __dead void errc(int, int, const char *, ...) __printflike(3, 4) __dead; __dead void verrc(int, int, const char *, va_list) __printflike(3, 0) __dead; void warn(const char *, ...) __printflike(1, 2); void vwarn(const char *, va_list) __printflike(1, 0); void warnx(const char *, ...) __printflike(1, 2); void vwarnx(const char *, va_list) __printflike(1, 0); void warnc(int, const char *, ...) __printflike(2, 3); void vwarnc(int, const char *, va_list) __printflike(2, 0); __END_DECLS #endif /* !_ERR_H_ */ # 68 "/usr/include/err.h" 3 4 # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" 2 #endif # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" #if !HAVE_ERR void err __P((int, const char *, ...)); void errx __P((int, const char *, ...)); void verr __P((int, const char *, va_list)); void verrx __P((int, const char *, va_list)); #endif # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" #if !HAVE_WARN void warn __P((const char *, ...)); void warnx __P((const char *, ...)); void vwarn __P((const char *, va_list)); void vwarnx __P((const char *, va_list)); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" #endif /* !_NBCOMPAT_ERR_H_ */ # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/err.h" # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" 1 /* $NetBSD: fnmatch.h,v 1.2 2004/08/10 18:47:55 jlam Exp $ */ /*- * 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. * * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 */ #ifndef _NBCOMPAT_FNMATCH_H_ #define _NBCOMPAT_FNMATCH_H_ #if HAVE_FNMATCH_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" # 1 "/usr/include/fnmatch.h" 1 3 4 /* $NetBSD: fnmatch.h,v 1.13 2011/01/31 04:49:46 christos Exp $ */ /*- * 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. * * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 */ #ifndef _FNMATCH_H_ #define _FNMATCH_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/fnmatch.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/fnmatch.h" 2 3 4 #define FNM_NOMATCH 1 /* Match failed. */ #define FNM_NOSYS 2 /* Function not implemented. */ #define FNM_NORES 3 /* Out of resources */ #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ #define FNM_PERIOD 0x04 /* Period must be matched by period. */ #if defined(_NETBSD_SOURCE) #define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */ #define FNM_LEADING_DIR 0x10 /* Ignore / after Imatch. */ #endif # 50 "/usr/include/fnmatch.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 51 "/usr/include/fnmatch.h" 3 4 # 52 "/usr/include/fnmatch.h" 3 4 __BEGIN_DECLS int fnmatch(const char *, const char *, int); __END_DECLS #endif /* !_FNMATCH_H_ */ # 58 "/usr/include/fnmatch.h" 3 4 # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" 2 #endif # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" #if !HAVE_FNMATCH #define FNM_NOMATCH 1 /* Match failed. */ #define FNM_NOSYS 2 /* Function not implemented. */ #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ #define FNM_PERIOD 0x04 /* Period must be matched by period. */ #define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */ #define FNM_LEADING_DIR 0x10 /* Ignore / after Imatch. */ int fnmatch(const char *, const char *, int); #endif # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" #endif /* !_NBCOMPAT_FNMATCH_H_ */ # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/fnmatch.h" # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" 1 /* $NetBSD: grp.h,v 1.3 2008/09/08 20:20:23 joerg Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_GRP_H_ #define _NBCOMPAT_GRP_H_ #if HAVE_GRP_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" # 1 "/usr/include/grp.h" 1 3 4 /* $NetBSD: grp.h,v 1.24 2007/10/19 15:58:52 christos Exp $ */ /*- * 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. * * @(#)grp.h 8.2 (Berkeley) 1/21/94 */ #ifndef _GRP_H_ #define _GRP_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/grp.h" 3 4 # 43 "/usr/include/grp.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/grp.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 44 "/usr/include/grp.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/grp.h" 3 4 # 45 "/usr/include/grp.h" 3 4 #if defined(_NETBSD_SOURCE) #define _PATH_GROUP "/etc/group" #endif # 49 "/usr/include/grp.h" 3 4 struct group { __aconst char *gr_name; /* group name */ __aconst char *gr_passwd; /* group password */ gid_t gr_gid; /* group id */ __aconst char *__aconst *gr_mem; /* group members */ }; __BEGIN_DECLS struct group *getgrgid(gid_t); struct group *getgrnam(const char *); #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); #endif # 67 "/usr/include/grp.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) struct group *getgrent(void); void setgrent(void); void endgrent(void); #endif # 72 "/usr/include/grp.h" 3 4 #if defined(_NETBSD_SOURCE) void setgrfile(const char *); int setgroupent(int); int getgrent_r(struct group *, char *, size_t, struct group **); const char *group_from_gid(gid_t, int); int gid_from_group(const char *, gid_t *); int pwcache_groupdb(int (*)(int), void (*)(void), struct group * (*)(const char *), struct group * (*)(gid_t)); #endif # 82 "/usr/include/grp.h" 3 4 __END_DECLS #endif /* !_GRP_H_ */ # 85 "/usr/include/grp.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" /* * Declare functions that may be missing in . */ #if !HAVE_SETGROUPENT int setgroupent(int); #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" #if !HAVE_GROUP_FROM_GID const char *group_from_gid(gid_t, int); #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" #if !HAVE_GID_FROM_GROUP int gid_from_group(const char *, gid_t *); #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" #if !HAVE_DECL_ENDGRENT void endgrent(void); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" #endif /* !_NBCOMPAT_GRP_H_ */ # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/grp.h" # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" 1 /* $NetBSD: paths.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_PATHS_H_ #define _NBCOMPAT_PATHS_H_ #if HAVE_PATHS_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" # 1 "/usr/include/paths.h" 1 3 4 /* $NetBSD: paths.h,v 1.43 2017/01/16 19:15:28 christos Exp $ */ /* * 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. * * @(#)paths.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PATHS_H_ #define _PATHS_H_ /* * Default user search path. * Set by login(1), rshd(8), rexecd(8) * Used by execvp(3) absent PATH from the environ(7) */ #ifdef RESCUEDIR #define _PATH_DEFPATH RESCUEDIR ":/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin" #else # 45 "/usr/include/paths.h" 3 4 #define _PATH_DEFPATH "/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin" #endif # 47 "/usr/include/paths.h" 3 4 /* * All standard utilities path. * Set by init(8) for system programs & scripts (e.g. /etc/rc) * Used by ttyaction(3), whereis(1) */ #define _PATH_STDPATH \ "/usr/bin:/bin:/usr/sbin:/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin" #define _PATH_AUDIO "/dev/audio" #define _PATH_AUDIO0 "/dev/audio0" #define _PATH_AUDIOCTL "/dev/audioctl" #define _PATH_AUDIOCTL0 "/dev/audioctl0" #define _PATH_BPF "/dev/bpf" #define _PATH_CLOCKCTL "/dev/clockctl" #define _PATH_CONSOLE "/dev/console" #define _PATH_CONSTTY "/dev/constty" #define _PATH_CPUCTL "/dev/cpuctl" #define _PATH_CSMAPPER "/usr/share/i18n/csmapper" #define _PATH_DEFTAPE "/dev/nrst0" #define _PATH_DEVCDB "/var/run/dev.cdb" #define _PATH_DEVDB "/var/run/dev.db" #define _PATH_DEVNULL "/dev/null" #define _PATH_DEVZERO "/dev/zero" #define _PATH_DRUM "/dev/drum" #define _PATH_ESDB "/usr/share/i18n/esdb" #define _PATH_FTPUSERS "/etc/ftpusers" #define _PATH_GETTYTAB "/etc/gettytab" #define _PATH_I18NMODULE "/usr/lib/i18n" #define _PATH_ICONV "/usr/share/i18n/iconv" #define _PATH_KMEM "/dev/kmem" #define _PATH_KSYMS "/dev/ksyms" #define _PATH_KVMDB "/var/db/kvm.db" #define _PATH_LOCALE "/usr/share/locale" #define _PATH_MAILDIR "/var/mail" #define _PATH_MAN "/usr/share/man" #define _PATH_MEM "/dev/mem" #define _PATH_MIXER "/dev/mixer" #define _PATH_MIXER0 "/dev/mixer0" #define _PATH_NOLOGIN "/etc/nologin" #define _PATH_POWER "/dev/power" #define _PATH_PRINTCAP "/etc/printcap" #define _PATH_PUD "/dev/pud" #define _PATH_PUFFS "/dev/puffs" #define _PATH_RANDOM "/dev/random" #define _PATH_SENDMAIL "/usr/sbin/sendmail" #define _PATH_SHELLS "/etc/shells" #define _PATH_SKEYKEYS "/etc/skeykeys" #define _PATH_SOUND "/dev/sound" #define _PATH_SOUND0 "/dev/sound0" #define _PATH_SYSMON "/dev/sysmon" #define _PATH_TTY "/dev/tty" #define _PATH_UNIX "/netbsd" #define _PATH_URANDOM "/dev/urandom" #define _PATH_VIDEO "/dev/video" #define _PATH_VIDEO0 "/dev/video0" #define _PATH_WATCHDOG "/dev/watchdog" /* * Provide trailing slash, since mostly used for building pathnames. * See the __CONCAT() macro from for cpp examples. */ #define _PATH_DEV "/dev/" #define _PATH_DEV_PTS "/dev/pts/" #define _PATH_EMUL_AOUT "/emul/aout/" #define _PATH_TMP "/tmp/" #define _PATH_VARDB "/var/db/" #define _PATH_VARRUN "/var/run/" #define _PATH_VARTMP "/var/tmp/" /* * Paths that may change if RESCUEDIR is defined. * Used by tools in /rescue. */ #ifdef RESCUEDIR #define _PATH_BSHELL RESCUEDIR "/sh" #define _PATH_CSHELL RESCUEDIR "/csh" #define _PATH_VI RESCUEDIR "/vi" #else # 126 "/usr/include/paths.h" 3 4 #define _PATH_BSHELL "/bin/sh" #define _PATH_CSHELL "/bin/csh" #define _PATH_VI "/usr/bin/vi" #endif # 130 "/usr/include/paths.h" 3 4 #endif /* !_PATHS_H_ */ # 132 "/usr/include/paths.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" /* * Declare functions and macros that may be missing in . */ #ifndef _PATH_BSHELL #define _PATH_BSHELL "/bin/sh" #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" #ifndef _PATH_TMP #define _PATH_TMP "/tmp/" #endif # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" #ifndef _PATH_DEFTAPE # ifdef DEFTAPE # define _PATH_DEFTAPE DEFTAPE # else # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" # define _PATH_DEFTAPE "/dev/tape" # endif /* DEFTAPE */ # 56 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" #endif /* _PATH_DEFTAPE */ # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" #endif /* !_NBCOMPAT_PATHS_H_ */ # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/paths.h" # 56 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 56 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" 1 /* $NetBSD: pwd.h,v 1.4 2013/02/10 12:38:52 obache Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_PWD_H_ #define _NBCOMPAT_PWD_H_ #if HAVE_PWD_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" # 1 "/usr/include/pwd.h" 1 3 4 /* $NetBSD: pwd.h,v 1.44 2012/11/26 19:53:41 pooka Exp $ */ /*- * 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. * * @(#)pwd.h 8.2 (Berkeley) 1/21/94 */ /*- * Portions Copyright(C) 1995, Jason Downs. 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(S) ``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(S) 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. */ #ifndef _PWD_H_ #define _PWD_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 67 "/usr/include/pwd.h" 3 4 # 68 "/usr/include/pwd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 68 "/usr/include/pwd.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 69 "/usr/include/pwd.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 69 "/usr/include/pwd.h" 3 4 # 70 "/usr/include/pwd.h" 3 4 #if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) #define _PATH_PASSWD "/etc/passwd" #define _PATH_MASTERPASSWD "/etc/master.passwd" #define _PATH_MASTERPASSWD_LOCK "/etc/ptmp" #define _PATH_PASSWD_CONF "/etc/passwd.conf" #define _PATH_PASSWDCONF _PATH_PASSWD_CONF /* XXX: compat */ #define _PATH_USERMGMT_CONF "/etc/usermgmt.conf" #define _PATH_MP_DB "/etc/pwd.db" #define _PATH_SMP_DB "/etc/spwd.db" #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" #define _PW_KEYBYNAME '1' /* stored by name */ #define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ #define _PW_KEYBYUID '3' /* stored by uid */ #define _PASSWORD_EFMT1 '_' /* extended DES encryption format */ #define _PASSWORD_NONDES '$' /* non-DES encryption formats */ #define _PASSWORD_LEN 128 /* max length, not counting NUL */ #define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */ #define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */ #define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */ #define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */ #define _PASSWORD_OLDFMT 0x10 /* flag to expect an old style entry */ #define _PASSWORD_NOWARN 0x20 /* no warnings for bad entries */ #define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */ #define _PASSWORD_CHGNOW -1 /* special day to force password * change at next login */ #endif # 106 "/usr/include/pwd.h" 3 4 struct passwd { __aconst char *pw_name; /* user name */ __aconst char *pw_passwd; /* encrypted password */ uid_t pw_uid; /* user uid */ gid_t pw_gid; /* user gid */ time_t pw_change; /* password change time */ __aconst char *pw_class; /* user login class */ __aconst char *pw_gecos; /* general information */ __aconst char *pw_dir; /* home directory */ __aconst char *pw_shell; /* default shell */ time_t pw_expire; /* account expiration */ }; __BEGIN_DECLS #ifndef __LIBC12_SOURCE__ struct passwd *getpwuid(uid_t) __RENAME(__getpwuid50); struct passwd *getpwnam(const char *) __RENAME(__getpwnam50); #endif # 125 "/usr/include/pwd.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **) __RENAME(__getpwnam_r50); int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **) __RENAME(__getpwuid_r50); #endif # 133 "/usr/include/pwd.h" 3 4 #endif # 134 "/usr/include/pwd.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ struct passwd *getpwent(void) __RENAME(__getpwent50); #endif # 138 "/usr/include/pwd.h" 3 4 void setpwent(void); void endpwent(void); #endif # 141 "/usr/include/pwd.h" 3 4 #if defined(_NETBSD_SOURCE) int pw_gensalt(char *, size_t, const char *, const char *); #ifndef __LIBC12_SOURCE__ int pw_scan(char *, struct passwd *, int *) __RENAME(__pw_scan50); int getpwent_r(struct passwd *, char *, size_t, struct passwd **) __RENAME(__getpwent_r50); #endif # 148 "/usr/include/pwd.h" 3 4 int setpassent(int); const char *user_from_uid(uid_t, int); int uid_from_user(const char *, uid_t *); #ifndef __LIBC12_SOURCE__ int pwcache_userdb(int (*)(int), void (*)(void), struct passwd * (*)(const char *), struct passwd * (*)(uid_t)) __RENAME(__pwcache_userdb50); #endif # 156 "/usr/include/pwd.h" 3 4 #endif # 157 "/usr/include/pwd.h" 3 4 __END_DECLS #endif /* !_PWD_H_ */ # 160 "/usr/include/pwd.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" /* * Declare functions that may be missing in . */ #if !HAVE_SETPASSENT || !HAVE_DECL_SETPASSENT int setpassent(int); #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" #if !HAVE_USER_FROM_UID const char *user_from_uid(uid_t, int); #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" #if !HAVE_UID_FROM_USER int uid_from_user(const char *, uid_t *); #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" #if !HAVE_DECL_ENDPWENT void endpwent(void); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" #endif /* !_NBCOMPAT_PWD_H_ */ # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/pwd.h" # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" 1 /* $NetBSD: queue.h,v 1.9 2015/12/13 21:56:27 joerg Exp $ */ /* * Copyright (c) 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. 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. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _NBCOMPAT_QUEUE_H #define _NBCOMPAT_QUEUE_H #if HAVE_SYS_QUEUE_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" # 1 "/usr/include/sys/queue.h" 1 3 4 /* $NetBSD: queue.h,v 1.70 2015/11/02 15:21:23 christos Exp $ */ /* * Copyright (c) 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. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * A singly-linked list is headed by a single forward pointer. The * elements are singly linked for minimum space and pointer manipulation * overhead at the expense of O(n) removal for arbitrary elements. New * elements can be added to the list after an existing element or at the * head of the list. Elements being removed from the head of the list * should use the explicit macro for this purpose for optimum * efficiency. A singly-linked list may only be traversed in the forward * direction. Singly-linked lists are ideal for applications with large * datasets and few or no removals or for implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * Include the definition of NULL only on NetBSD because sys/null.h * is not available elsewhere. This conditional makes the header * portable and it can simply be dropped verbatim into any system. * The caveat is that on other systems some other header * must provide NULL before the macros can be used. */ #ifdef __NetBSD__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 91 "/usr/include/sys/queue.h" 3 4 # 92 "/usr/include/sys/queue.h" 3 4 #endif # 93 "/usr/include/sys/queue.h" 3 4 #if defined(QUEUEDEBUG) # if defined(_KERNEL) # define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__) # else # 98 "/usr/include/sys/queue.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 98 "/usr/include/sys/queue.h" 3 4 # 99 "/usr/include/sys/queue.h" 3 4 # define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__) # endif # 101 "/usr/include/sys/queue.h" 3 4 #endif # 102 "/usr/include/sys/queue.h" 3 4 /* * Singly-linked List definitions. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List access methods. */ #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_END(head) NULL #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_FOREACH(var, head, field) \ for((var) = (head)->slh_first; \ (var) != SLIST_END(head); \ (var) = (var)->field.sle_next) #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = SLIST_FIRST((head)); \ (var) != SLIST_END(head) && \ ((tvar) = SLIST_NEXT((var), field), 1); \ (var) = (tvar)) /* * Singly-linked List functions. */ #define SLIST_INIT(head) do { \ (head)->slh_first = SLIST_END(head); \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ (elm)->field.sle_next = (slistelm)->field.sle_next; \ (slistelm)->field.sle_next = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ (elm)->field.sle_next = (head)->slh_first; \ (head)->slh_first = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE_AFTER(slistelm, field) do { \ (slistelm)->field.sle_next = \ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE_HEAD(head, field) do { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE(head, elm, type, field) do { \ if ((head)->slh_first == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = (head)->slh_first; \ while(curelm->field.sle_next != (elm)) \ curelm = curelm->field.sle_next; \ curelm->field.sle_next = \ curelm->field.sle_next->field.sle_next; \ } \ } while (/*CONSTCOND*/0) /* * List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List access methods. */ #define LIST_FIRST(head) ((head)->lh_first) #define LIST_END(head) NULL #define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_FOREACH(var, head, field) \ for ((var) = ((head)->lh_first); \ (var) != LIST_END(head); \ (var) = ((var)->field.le_next)) #define LIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = LIST_FIRST((head)); \ (var) != LIST_END(head) && \ ((tvar) = LIST_NEXT((var), field), 1); \ (var) = (tvar)) #define LIST_MOVE(head1, head2) do { \ LIST_INIT((head2)); \ if (!LIST_EMPTY((head1))) { \ (head2)->lh_first = (head1)->lh_first; \ LIST_INIT((head1)); \ } \ } while (/*CONSTCOND*/0) /* * List functions. */ #if defined(QUEUEDEBUG) #define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \ if ((head)->lh_first && \ (head)->lh_first->field.le_prev != &(head)->lh_first) \ QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head), \ __FILE__, __LINE__); #define QUEUEDEBUG_LIST_OP(elm, field) \ if ((elm)->field.le_next && \ (elm)->field.le_next->field.le_prev != \ &(elm)->field.le_next) \ QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm), \ __FILE__, __LINE__); \ if (*(elm)->field.le_prev != (elm)) \ QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm), \ __FILE__, __LINE__); #define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \ (elm)->field.le_next = (void *)1L; \ (elm)->field.le_prev = (void *)1L; #else # 244 "/usr/include/sys/queue.h" 3 4 #define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) #define QUEUEDEBUG_LIST_OP(elm, field) #define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) #endif # 248 "/usr/include/sys/queue.h" 3 4 #define LIST_INIT(head) do { \ (head)->lh_first = LIST_END(head); \ } while (/*CONSTCOND*/0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ QUEUEDEBUG_LIST_OP((listelm), field) \ if (((elm)->field.le_next = (listelm)->field.le_next) != \ LIST_END(head)) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ QUEUEDEBUG_LIST_OP((listelm), field) \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_HEAD(head, elm, field) do { \ QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \ if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } while (/*CONSTCOND*/0) #define LIST_REMOVE(elm, field) do { \ QUEUEDEBUG_LIST_OP((elm), field) \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ } while (/*CONSTCOND*/0) #define LIST_REPLACE(elm, elm2, field) do { \ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ (elm2)->field.le_next->field.le_prev = \ &(elm2)->field.le_next; \ (elm2)->field.le_prev = (elm)->field.le_prev; \ *(elm2)->field.le_prev = (elm2); \ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ } while (/*CONSTCOND*/0) /* * Simple queue definitions. */ #define SIMPLEQ_HEAD(name, type) \ struct name { \ struct type *sqh_first; /* first element */ \ struct type **sqh_last; /* addr of last next element */ \ } #define SIMPLEQ_HEAD_INITIALIZER(head) \ { NULL, &(head).sqh_first } #define SIMPLEQ_ENTRY(type) \ struct { \ struct type *sqe_next; /* next element */ \ } /* * Simple queue access methods. */ #define SIMPLEQ_FIRST(head) ((head)->sqh_first) #define SIMPLEQ_END(head) NULL #define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) #define SIMPLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->sqh_first); \ (var) != SIMPLEQ_END(head); \ (var) = ((var)->field.sqe_next)) #define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ for ((var) = ((head)->sqh_first); \ (var) != SIMPLEQ_END(head) && \ ((next = ((var)->field.sqe_next)), 1); \ (var) = (next)) /* * Simple queue functions. */ #define SIMPLEQ_INIT(head) do { \ (head)->sqh_first = NULL; \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ (head)->sqh_last = &(elm)->field.sqe_next; \ (head)->sqh_first = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.sqe_next = NULL; \ *(head)->sqh_last = (elm); \ (head)->sqh_last = &(elm)->field.sqe_next; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ (head)->sqh_last = &(elm)->field.sqe_next; \ (listelm)->field.sqe_next = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \ == NULL) \ (head)->sqh_last = &(elm)->field.sqe_next; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ if ((head)->sqh_first == (elm)) { \ SIMPLEQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->sqh_first; \ while (curelm->field.sqe_next != (elm)) \ curelm = curelm->field.sqe_next; \ if ((curelm->field.sqe_next = \ curelm->field.sqe_next->field.sqe_next) == NULL) \ (head)->sqh_last = &(curelm)->field.sqe_next; \ } \ } while (/*CONSTCOND*/0) #define SIMPLEQ_CONCAT(head1, head2) do { \ if (!SIMPLEQ_EMPTY((head2))) { \ *(head1)->sqh_last = (head2)->sqh_first; \ (head1)->sqh_last = (head2)->sqh_last; \ SIMPLEQ_INIT((head2)); \ } \ } while (/*CONSTCOND*/0) #define SIMPLEQ_LAST(head, type, field) \ (SIMPLEQ_EMPTY((head)) ? \ NULL : \ ((struct type *)(void *) \ ((char *)((head)->sqh_last) - offsetof(struct type, field)))) /* * Tail queue definitions. */ #define _TAILQ_HEAD(name, type, qual) \ struct name { \ qual type *tqh_first; /* first element */ \ qual type *qual *tqh_last; /* addr of last next element */ \ } #define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) #define TAILQ_HEAD_INITIALIZER(head) \ { TAILQ_END(head), &(head).tqh_first } #define _TAILQ_ENTRY(type, qual) \ struct { \ qual type *tqe_next; /* next element */ \ qual type *qual *tqe_prev; /* address of previous next element */\ } #define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) /* * Tail queue access methods. */ #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_END(head) (NULL) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) #define TAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->tqh_first); \ (var) != TAILQ_END(head); \ (var) = ((var)->field.tqe_next)) #define TAILQ_FOREACH_SAFE(var, head, field, next) \ for ((var) = ((head)->tqh_first); \ (var) != TAILQ_END(head) && \ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = TAILQ_LAST((head), headname); \ (var) != TAILQ_END(head); \ (var) = TAILQ_PREV((var), headname, field)) #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ for ((var) = TAILQ_LAST((head), headname); \ (var) != TAILQ_END(head) && \ ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev)) /* * Tail queue functions. */ #if defined(QUEUEDEBUG) #define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \ if ((head)->tqh_first && \ (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \ QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head), \ __FILE__, __LINE__); #define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \ if (*(head)->tqh_last != NULL) \ QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head), \ __FILE__, __LINE__); #define QUEUEDEBUG_TAILQ_OP(elm, field) \ if ((elm)->field.tqe_next && \ (elm)->field.tqe_next->field.tqe_prev != \ &(elm)->field.tqe_next) \ QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm), \ __FILE__, __LINE__); \ if (*(elm)->field.tqe_prev != (elm)) \ QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm), \ __FILE__, __LINE__); #define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \ if ((elm)->field.tqe_next == NULL && \ (head)->tqh_last != &(elm)->field.tqe_next) \ QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\ (head), (elm), __FILE__, __LINE__); #define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \ (elm)->field.tqe_next = (void *)1L; \ (elm)->field.tqe_prev = (void *)1L; #else # 481 "/usr/include/sys/queue.h" 3 4 #define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) #define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) #define QUEUEDEBUG_TAILQ_OP(elm, field) #define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) #define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) #endif # 487 "/usr/include/sys/queue.h" 3 4 #define TAILQ_INIT(head) do { \ (head)->tqh_first = TAILQ_END(head); \ (head)->tqh_last = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \ if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \ (elm)->field.tqe_next = TAILQ_END(head); \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ QUEUEDEBUG_TAILQ_OP((listelm), field) \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ TAILQ_END(head)) \ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ QUEUEDEBUG_TAILQ_OP((listelm), field) \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_REMOVE(head, elm, field) do { \ QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \ QUEUEDEBUG_TAILQ_OP((elm), field) \ if (((elm)->field.tqe_next) != TAILQ_END(head)) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ } while (/*CONSTCOND*/0) #define TAILQ_REPLACE(head, elm, elm2, field) do { \ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \ TAILQ_END(head)) \ (elm2)->field.tqe_next->field.tqe_prev = \ &(elm2)->field.tqe_next; \ else \ (head)->tqh_last = &(elm2)->field.tqe_next; \ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ *(elm2)->field.tqe_prev = (elm2); \ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ } while (/*CONSTCOND*/0) #define TAILQ_CONCAT(head1, head2, field) do { \ if (!TAILQ_EMPTY(head2)) { \ *(head1)->tqh_last = (head2)->tqh_first; \ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ (head1)->tqh_last = (head2)->tqh_last; \ TAILQ_INIT((head2)); \ } \ } while (/*CONSTCOND*/0) /* * Singly-linked Tail queue declarations. */ #define STAILQ_HEAD(name, type) \ struct name { \ struct type *stqh_first; /* first element */ \ struct type **stqh_last; /* addr of last next element */ \ } #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } #define STAILQ_ENTRY(type) \ struct { \ struct type *stqe_next; /* next element */ \ } /* * Singly-linked Tail queue access methods. */ #define STAILQ_FIRST(head) ((head)->stqh_first) #define STAILQ_END(head) NULL #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) #define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) /* * Singly-linked Tail queue functions. */ #define STAILQ_INIT(head) do { \ (head)->stqh_first = NULL; \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ (head)->stqh_last = &(elm)->field.stqe_next; \ (head)->stqh_first = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.stqe_next = NULL; \ *(head)->stqh_last = (elm); \ (head)->stqh_last = &(elm)->field.stqe_next; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ (head)->stqh_last = &(elm)->field.stqe_next; \ (listelm)->field.stqe_next = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE_HEAD(head, field) do { \ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE(head, elm, type, field) do { \ if ((head)->stqh_first == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->stqh_first; \ while (curelm->field.stqe_next != (elm)) \ curelm = curelm->field.stqe_next; \ if ((curelm->field.stqe_next = \ curelm->field.stqe_next->field.stqe_next) == NULL) \ (head)->stqh_last = &(curelm)->field.stqe_next; \ } \ } while (/*CONSTCOND*/0) #define STAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->stqh_first); \ (var); \ (var) = ((var)->field.stqe_next)) #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = STAILQ_FIRST((head)); \ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define STAILQ_CONCAT(head1, head2) do { \ if (!STAILQ_EMPTY((head2))) { \ *(head1)->stqh_last = (head2)->stqh_first; \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_INIT((head2)); \ } \ } while (/*CONSTCOND*/0) #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ ((struct type *)(void *) \ ((char *)((head)->stqh_last) - offsetof(struct type, field)))) #ifndef _KERNEL /* * Circular queue definitions. Do not use. We still keep the macros * for compatibility but because of pointer aliasing issues their use * is discouraged! */ /* * __launder_type(): We use this ugly hack to work around the the compiler * noticing that two types may not alias each other and elide tests in code. * We hit this in the CIRCLEQ macros when comparing 'struct name *' and * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC * 4.8) declare these comparisons as always false, causing the code to * not run as designed. * * This hack is only to be used for comparisons and thus can be fully const. * Do not use for assignment. * * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix * this by changing the head/tail sentinal values, but see the note above * this one. */ static __inline const void * __launder_type(const void *); static __inline const void * __launder_type(const void *__x) { __asm __volatile("" : "+r" (__x)); return __x; } #if defined(QUEUEDEBUG) #define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \ if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \ (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \ QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \ __FILE__, __LINE__); \ if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \ (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \ QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \ __FILE__, __LINE__); #define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \ if ((head)->cqh_last != (elm)) \ QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \ (elm), __FILE__, __LINE__); \ } else { \ if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \ QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \ (elm), __FILE__, __LINE__); \ } \ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \ if ((head)->cqh_first != (elm)) \ QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \ (elm), __FILE__, __LINE__); \ } else { \ if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \ QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \ (elm), __FILE__, __LINE__); \ } #define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \ (elm)->field.cqe_next = (void *)1L; \ (elm)->field.cqe_prev = (void *)1L; #else # 722 "/usr/include/sys/queue.h" 3 4 #define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) #define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) #define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) #endif # 726 "/usr/include/sys/queue.h" 3 4 #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #define CIRCLEQ_HEAD_INITIALIZER(head) \ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) } #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } /* * Circular queue functions. */ #define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = CIRCLEQ_END(head); \ (head)->cqh_last = CIRCLEQ_END(head); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = CIRCLEQ_END(head); \ if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ (elm)->field.cqe_next = CIRCLEQ_END(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_REMOVE(head, elm, field) do { \ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \ } while (/*CONSTCOND*/0) #define CIRCLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->cqh_first); \ (var) != CIRCLEQ_ENDC(head); \ (var) = ((var)->field.cqe_next)) #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ for ((var) = ((head)->cqh_last); \ (var) != CIRCLEQ_ENDC(head); \ (var) = ((var)->field.cqe_prev)) /* * Circular queue access methods. */ #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #define CIRCLEQ_LAST(head) ((head)->cqh_last) /* For comparisons */ #define CIRCLEQ_ENDC(head) (__launder_type(head)) /* For assignments */ #define CIRCLEQ_END(head) ((void *)(head)) #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) #define CIRCLEQ_EMPTY(head) \ (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head)) #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ (((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ ? ((head)->cqh_first) \ : (elm->field.cqe_next)) #define CIRCLEQ_LOOP_PREV(head, elm, field) \ (((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) #endif /* !_KERNEL */ # 845 "/usr/include/sys/queue.h" 3 4 #endif /* !_SYS_QUEUE_H_ */ # 847 "/usr/include/sys/queue.h" 3 4 # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" 2 #endif # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" /* * Provide any macros missing from . */ #ifndef LIST_HEAD #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #endif # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_HEAD_INITIALIZER #define LIST_HEAD_INITIALIZER(head) \ { NULL } #endif # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_ENTRY #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } #endif # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_INIT #define LIST_INIT(head) do { \ (head)->lh_first = NULL; \ } while (/*CONSTCOND*/0) #endif # 74 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_INSERT_AFTER #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } while (/*CONSTCOND*/0) #endif # 84 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_INSERT_BEFORE #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ QUEUEDEBUG_LIST_OP((listelm), field) \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } while (/*CONSTCOND*/0) #endif # 94 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_INSERT_HEAD #define LIST_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } while (/*CONSTCOND*/0) #endif # 103 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_REMOVE #define LIST_REMOVE(elm, field) do { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ } while (/*CONSTCOND*/0) #endif # 112 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_FOREACH #define LIST_FOREACH(var, head, field) \ for ((var) = ((head)->lh_first); \ (var); \ (var) = ((var)->field.le_next)) #endif # 119 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_EMPTY #define LIST_EMPTY(head) ((head)->lh_first == NULL) #endif # 123 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_FIRST #define LIST_FIRST(head) ((head)->lh_first) #endif # 126 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef LIST_NEXT #define LIST_NEXT(elm, field) ((elm)->field.le_next) #endif # 129 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_HEAD #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #endif # 136 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_HEAD_INITIALIZER #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #endif # 141 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_ENTRY #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } #endif # 148 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_INIT #define SLIST_INIT(head) do { \ (head)->slh_first = NULL; \ } while (/*CONSTCOND*/0) #endif # 154 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_INSERT_AFTER #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ (elm)->field.sle_next = (slistelm)->field.sle_next; \ (slistelm)->field.sle_next = (elm); \ } while (/*CONSTCOND*/0) #endif # 161 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_INSERT_HEAD #define SLIST_INSERT_HEAD(head, elm, field) do { \ (elm)->field.sle_next = (head)->slh_first; \ (head)->slh_first = (elm); \ } while (/*CONSTCOND*/0) #endif # 168 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_REMOVE_HEAD #define SLIST_REMOVE_HEAD(head, field) do { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (/*CONSTCOND*/0) #endif # 174 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_REMOVE #define SLIST_REMOVE(head, elm, type, field) do { \ if ((head)->slh_first == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = (head)->slh_first; \ while(curelm->field.sle_next != (elm)) \ curelm = curelm->field.sle_next; \ curelm->field.sle_next = \ curelm->field.sle_next->field.sle_next; \ } \ } while (/*CONSTCOND*/0) #endif # 189 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_REMOVE_AFTER #define SLIST_REMOVE_AFTER(slistelm, field) do { \ (slistelm)->field.sle_next = \ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ } while (/*CONSTCOND*/0) #endif # 196 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_FOREACH #define SLIST_FOREACH(var, head, field) \ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) #endif # 201 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_EMPTY #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #endif # 205 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_FIRST #define SLIST_FIRST(head) ((head)->slh_first) #endif # 209 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef SLIST_NEXT #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #endif # 213 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_HEAD #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ } #endif # 221 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_HEAD_INITIALIZER #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #endif # 226 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_ENTRY #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } #endif # 234 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_INIT #define TAILQ_INIT(head) do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #endif # 241 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_INSERT_HEAD #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #endif # 253 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_INSERT_TAIL #define TAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #endif # 262 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_INSERT_AFTER #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #endif # 274 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_INSERT_BEFORE #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #endif # 283 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_REMOVE #define TAILQ_REMOVE(head, elm, field) do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #endif # 294 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_FOREACH #define TAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->tqh_first); \ (var); \ (var) = ((var)->field.tqe_next)) #endif # 301 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, next) \ for ((var) = ((head)->tqh_first); \ (var) != NULL && ((next) = TAILQ_NEXT(var, field), 1); \ (var) = (next)) #endif # 308 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #undef TAILQ_FOREACH_REVERSE #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ (var); \ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) #ifndef TAILQ_EMPTY #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #endif # 318 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_FIRST #define TAILQ_FIRST(head) ((head)->tqh_first) #endif # 321 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_NEXT #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #endif # 324 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef TAILQ_LAST #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #endif # 329 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_HEAD #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #endif # 337 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_HEAD_INITIALIZER #define CIRCLEQ_HEAD_INITIALIZER(head) \ { (void *)&head, (void *)&head } #endif # 342 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_ENTRY #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } #endif # 350 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" /* * Circular queue functions. */ #ifndef CIRCLEQ_INIT #define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = (void *)(head); \ (head)->cqh_last = (void *)(head); \ } while (/*CONSTCOND*/0) #endif # 360 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_INSERT_AFTER #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } while (/*CONSTCOND*/0) #endif # 372 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_INSERT_BEFORE #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } while (/*CONSTCOND*/0) #endif # 384 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_INSERT_HEAD #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = (void *)(head); \ if ((head)->cqh_last == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } while (/*CONSTCOND*/0) #endif # 396 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_INSERT_TAIL #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.cqe_next = (void *)(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } while (/*CONSTCOND*/0) #endif # 408 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_REMOVE #define CIRCLEQ_REMOVE(head, elm, field) do { \ if ((elm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } while (/*CONSTCOND*/0) #endif # 423 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_FOREACH #define CIRCLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->cqh_first); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_next)) #endif # 430 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_FOREACH_REVERSE #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ for ((var) = ((head)->cqh_last); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_prev)) #endif # 437 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_EMPTY #define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) #endif # 441 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_FIRST #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #endif # 444 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_LAST #define CIRCLEQ_LAST(head) ((head)->cqh_last) #endif # 447 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_NEXT #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) #endif # 450 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_PREV #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) #endif # 453 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_LOOP_NEXT #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ (((elm)->field.cqe_next == (void *)(head)) \ ? ((head)->cqh_first) \ : (elm->field.cqe_next)) #endif # 460 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #ifndef CIRCLEQ_LOOP_PREV #define CIRCLEQ_LOOP_PREV(head, elm, field) \ (((elm)->field.cqe_prev == (void *)(head)) \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) #endif # 466 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" #endif /* !_NBCOMPAT_QUEUE_H */ # 468 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/queue.h" # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" 1 /* $NetBSD: stat.h,v 1.3 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_STAT_H_ #define _NBCOMPAT_STAT_H_ #if HAVE_SYS_STAT_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" # 1 "/usr/include/sys/stat.h" 1 3 4 /* $NetBSD: stat.h,v 1.68 2013/10/17 18:01:11 njoly Exp $ */ /*- * 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) 8/17/94 */ #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/stat.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 43 "/usr/include/sys/stat.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include /* XXX */ #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/stat.h" 3 4 # 44 "/usr/include/sys/stat.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) /* * POSIX:2008 / XPG7 requires struct timespec to be declared in * this header, but does not provide the usual exemption * "inclusion of this header may make visible symbols defined in ". * * This is a Standard omission, acknowledged by the committee and * scheduled to be corrected in Technical Corrigendum 2, according to * http://austingroupbugs.net/view.php?id=531 */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 56 "/usr/include/sys/stat.h" 3 4 # 1 "/usr/include/sys/time.h" 1 3 4 /* $NetBSD: time.h,v 1.79 2017/01/17 15:28:34 maya Exp $ */ /* * 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 */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/sys/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/time.h" 3 4 # 39 "/usr/include/sys/time.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 */ }; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/sys/timespec.h" 1 3 4 /* $NetBSD: timespec.h,v 1.1 2015/07/31 12:51:32 kamil Exp $ */ /* * 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 * * Extracted by Kamil Rytarowski from: * NetBSD: src/sys/sys/time.h,v 1.69 2015/05/19 23:35:11 riastradh Exp */ #ifndef _SYS_TIMESPEC_H_ #define _SYS_TIMESPEC_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/timespec.h" 3 4 # 41 "/usr/include/sys/timespec.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 46 "/usr/include/sys/timespec.h" 3 4 struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; #endif /* !_SYS_TIMESPEC_H_ */ # 53 "/usr/include/sys/timespec.h" 3 4 # 50 "/usr/include/sys/time.h" 2 3 4 #if defined(_NETBSD_SOURCE) #define TIMEVAL_TO_TIMESPEC(tv, ts) do { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } while (/*CONSTCOND*/0) #define TIMESPEC_TO_TIMEVAL(tv, ts) do { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (suseconds_t)(ts)->tv_nsec / 1000; \ } while (/*CONSTCOND*/0) /* * Note: timezone is obsolete. All timezone handling is now in * userland. Its just here for back compatibility. */ struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; /* Operations on timevals. */ #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0L #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 (/* CONSTCOND */ 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 (/* CONSTCOND */ 0) /* * hide bintime for _STANDALONE because this header is used for hpcboot.exe, * which is built with compilers which don't recognize LL suffix. * http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html */ #if !defined(_STANDALONE) 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; } #define bintimecmp(bta, btb, cmp) \ (((bta)->sec == (btb)->sec) ? \ ((bta)->frac cmp (btb)->frac) : \ ((bta)->sec cmp (btb)->sec)) /*- * 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 */ /* * The magic numbers for converting ms/us/ns to fractions */ /* 1ms = (2^64) / 1000 */ #define BINTIME_SCALE_MS ((uint64_t)18446744073709551ULL) /* 1us = (2^64) / 1000000 */ #define BINTIME_SCALE_US ((uint64_t)18446744073709ULL) /* 1ns = (2^64) / 1000000000 */ #define BINTIME_SCALE_NS ((uint64_t)18446744073ULL) static __inline void bintime2timespec(const struct bintime *bt, struct timespec *ts) { ts->tv_sec = bt->sec; ts->tv_nsec = (long)((1000000000ULL * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timespec2bintime(const struct timespec *ts, struct bintime *bt) { bt->sec = ts->tv_sec; bt->frac = (uint64_t)ts->tv_nsec * BINTIME_SCALE_NS; } static __inline void bintime2timeval(const struct bintime *bt, struct timeval *tv) { tv->tv_sec = bt->sec; tv->tv_usec = (suseconds_t)((1000000ULL * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timeval2bintime(const struct timeval *tv, struct bintime *bt) { bt->sec = tv->tv_sec; bt->frac = (uint64_t)tv->tv_usec * BINTIME_SCALE_US; } static __inline struct bintime ms2bintime(uint64_t ms) { struct bintime bt; bt.sec = (time_t)(ms / 1000U); bt.frac = (uint64_t)(ms % 1000U) * BINTIME_SCALE_MS; return bt; } static __inline struct bintime us2bintime(uint64_t us) { struct bintime bt; bt.sec = (time_t)(us / 1000000U); bt.frac = (uint64_t)(us % 1000000U) * BINTIME_SCALE_US; return bt; } static __inline struct bintime ns2bintime(uint64_t ns) { struct bintime bt; bt.sec = (time_t)(ns / 1000000000U); bt.frac = (uint64_t)(ns % 1000000000U) * BINTIME_SCALE_NS; return bt; } #endif /* !defined(_STANDALONE) */ # 241 "/usr/include/sys/time.h" 3 4 /* Operations on timespecs. */ #define timespecclear(tsp) (tsp)->tv_sec = (time_t)((tsp)->tv_nsec = 0L) #define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) #define timespeccmp(tsp, usp, cmp) \ (((tsp)->tv_sec == (usp)->tv_sec) ? \ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ ((tsp)->tv_sec cmp (usp)->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 (/* CONSTCOND */ 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 (/* CONSTCOND */ 0) #define timespec2ns(x) (((uint64_t)(x)->tv_sec) * 1000000000L + (x)->tv_nsec) #endif /* _NETBSD_SOURCE */ # 269 "/usr/include/sys/time.h" 3 4 /* * Names of the interval timers, and structure * defining a timer setting. * NB: Must match the CLOCK_ constants below. */ #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 #define ITIMER_MONOTONIC 3 struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; /* * 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; }; #define CLOCK_REALTIME 0 #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #define CLOCK_MONOTONIC 3 #define CLOCK_THREAD_CPUTIME_ID 0x20000000 #define CLOCK_PROCESS_CPUTIME_ID 0x40000000 #if defined(_NETBSD_SOURCE) #define TIMER_RELTIME 0x0 /* relative timer */ #endif # 304 "/usr/include/sys/time.h" 3 4 #define TIMER_ABSTIME 0x1 /* absolute timer */ #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 307 "/usr/include/sys/time.h" 3 4 # 308 "/usr/include/sys/time.h" 3 4 #else /* !_KERNEL */ # 309 "/usr/include/sys/time.h" 3 4 #ifndef _STANDALONE #if (_POSIX_C_SOURCE - 0) >= 200112L || \ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 313 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 /* $NetBSD: select.h,v 1.37 2014/04/25 15:52:45 pooka Exp $ */ /*- * 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. * * @(#)select.h 8.2 (Berkeley) 1/4/94 */ #ifndef _SYS_SELECT_H_ #define _SYS_SELECT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/select.h" 3 4 # 38 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 39 "/usr/include/sys/select.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/select.h" 3 4 # 40 "/usr/include/sys/select.h" 3 4 #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include /* for struct selinfo */ #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/sys/select.h" 3 4 # 43 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include /* for sigset_t */ #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sys/select.h" 3 4 # 44 "/usr/include/sys/select.h" 3 4 struct lwp; struct proc; struct timespec; struct cpu_info; struct socket; int selcommon(register_t *, int, fd_set *, fd_set *, fd_set *, struct timespec *, sigset_t *); void selrecord(struct lwp *selector, struct selinfo *); void selnotify(struct selinfo *, int, long); void selsysinit(struct cpu_info *); void selinit(struct selinfo *); void seldestroy(struct selinfo *); #else /* _KERNEL */ # 60 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 61 "/usr/include/sys/select.h" 3 4 # 62 "/usr/include/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 62 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 /* $NetBSD: time.h,v 1.47 2016/10/04 09:41:41 kamil Exp $ */ /* * 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 */ #ifndef _TIME_H_ #define _TIME_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/time.h" 3 4 # 43 "/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/time.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 44 "/usr/include/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/time.h" 3 4 # 45 "/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/time.h" 3 4 # 47 "/usr/include/time.h" 3 4 #ifdef _BSD_CLOCK_T_ typedef _BSD_CLOCK_T_ clock_t; #undef _BSD_CLOCK_T_ #endif # 52 "/usr/include/time.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 57 "/usr/include/time.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 62 "/usr/include/time.h" 3 4 #ifdef _BSD_CLOCKID_T_ typedef _BSD_CLOCKID_T_ clockid_t; #undef _BSD_CLOCKID_T_ #endif # 67 "/usr/include/time.h" 3 4 #ifdef _BSD_TIMER_T_ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif # 72 "/usr/include/time.h" 3 4 #define CLOCKS_PER_SEC 100 struct tm { int tm_sec; /* seconds after the minute [0-61] */ 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 */ __aconst char *tm_zone; /* timezone abbreviation */ }; __BEGIN_DECLS char *asctime(const struct tm *); clock_t clock(void); #ifndef __LIBC12_SOURCE__ char *ctime(const time_t *) __RENAME(__ctime50); double difftime(time_t, time_t) __RENAME(__difftime50); struct tm *gmtime(const time_t *) __RENAME(__gmtime50); struct tm *localtime(const time_t *) __RENAME(__locatime50); time_t time(time_t *) __RENAME(__time50); time_t mktime(struct tm *) __RENAME(__mktime50); #endif # 100 "/usr/include/time.h" 3 4 size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __attribute__((__format__(__strftime__, 3, 0))); #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ /* * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not * need to include unistd.h */ long __sysconf(int); #define CLK_TCK (__sysconf(39)) #endif # 115 "/usr/include/time.h" 3 4 #endif # 116 "/usr/include/time.h" 3 4 extern __aconst char *tzname[2]; #ifndef __LIBC12_SOURCE__ void tzset(void) __RENAME(__tzset50); #endif # 121 "/usr/include/time.h" 3 4 /* * X/Open Portability Guide >= Issue 4 */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) extern int daylight; #ifndef __LIBC12_SOURCE__ extern long int timezone __RENAME(__timezone13); #endif # 130 "/usr/include/time.h" 3 4 char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict); #endif # 133 "/usr/include/time.h" 3 4 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ defined(_NETBSD_SOURCE) struct tm *getdate(const char *); extern int getdate_err; #endif # 139 "/usr/include/time.h" 3 4 /* ISO/IEC 9899:201x 7.27.1/3 Components of time */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 141 "/usr/include/time.h" 3 4 # 142 "/usr/include/time.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 145 "/usr/include/time.h" 3 4 # 1 "/usr/include/sys/time.h" 1 3 4 /* $NetBSD: time.h,v 1.79 2017/01/17 15:28:34 maya Exp $ */ /* * 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 */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/time.h" 3 4 # 38 "/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/time.h" 3 4 # 39 "/usr/include/sys/time.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 */ }; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/sys/time.h" 3 4 # 50 "/usr/include/sys/time.h" 3 4 #if defined(_NETBSD_SOURCE) #define TIMEVAL_TO_TIMESPEC(tv, ts) do { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } while (/*CONSTCOND*/0) #define TIMESPEC_TO_TIMEVAL(tv, ts) do { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (suseconds_t)(ts)->tv_nsec / 1000; \ } while (/*CONSTCOND*/0) /* * Note: timezone is obsolete. All timezone handling is now in * userland. Its just here for back compatibility. */ struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; /* Operations on timevals. */ #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0L #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 (/* CONSTCOND */ 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 (/* CONSTCOND */ 0) /* * hide bintime for _STANDALONE because this header is used for hpcboot.exe, * which is built with compilers which don't recognize LL suffix. * http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html */ #if !defined(_STANDALONE) 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; } #define bintimecmp(bta, btb, cmp) \ (((bta)->sec == (btb)->sec) ? \ ((bta)->frac cmp (btb)->frac) : \ ((bta)->sec cmp (btb)->sec)) /*- * 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 */ /* * The magic numbers for converting ms/us/ns to fractions */ /* 1ms = (2^64) / 1000 */ #define BINTIME_SCALE_MS ((uint64_t)18446744073709551ULL) /* 1us = (2^64) / 1000000 */ #define BINTIME_SCALE_US ((uint64_t)18446744073709ULL) /* 1ns = (2^64) / 1000000000 */ #define BINTIME_SCALE_NS ((uint64_t)18446744073ULL) static __inline void bintime2timespec(const struct bintime *bt, struct timespec *ts) { ts->tv_sec = bt->sec; ts->tv_nsec = (long)((1000000000ULL * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timespec2bintime(const struct timespec *ts, struct bintime *bt) { bt->sec = ts->tv_sec; bt->frac = (uint64_t)ts->tv_nsec * BINTIME_SCALE_NS; } static __inline void bintime2timeval(const struct bintime *bt, struct timeval *tv) { tv->tv_sec = bt->sec; tv->tv_usec = (suseconds_t)((1000000ULL * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timeval2bintime(const struct timeval *tv, struct bintime *bt) { bt->sec = tv->tv_sec; bt->frac = (uint64_t)tv->tv_usec * BINTIME_SCALE_US; } static __inline struct bintime ms2bintime(uint64_t ms) { struct bintime bt; bt.sec = (time_t)(ms / 1000U); bt.frac = (uint64_t)(ms % 1000U) * BINTIME_SCALE_MS; return bt; } static __inline struct bintime us2bintime(uint64_t us) { struct bintime bt; bt.sec = (time_t)(us / 1000000U); bt.frac = (uint64_t)(us % 1000000U) * BINTIME_SCALE_US; return bt; } static __inline struct bintime ns2bintime(uint64_t ns) { struct bintime bt; bt.sec = (time_t)(ns / 1000000000U); bt.frac = (uint64_t)(ns % 1000000000U) * BINTIME_SCALE_NS; return bt; } #endif /* !defined(_STANDALONE) */ # 241 "/usr/include/sys/time.h" 3 4 /* Operations on timespecs. */ #define timespecclear(tsp) (tsp)->tv_sec = (time_t)((tsp)->tv_nsec = 0L) #define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) #define timespeccmp(tsp, usp, cmp) \ (((tsp)->tv_sec == (usp)->tv_sec) ? \ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ ((tsp)->tv_sec cmp (usp)->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 (/* CONSTCOND */ 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 (/* CONSTCOND */ 0) #define timespec2ns(x) (((uint64_t)(x)->tv_sec) * 1000000000L + (x)->tv_nsec) #endif /* _NETBSD_SOURCE */ # 269 "/usr/include/sys/time.h" 3 4 /* * Names of the interval timers, and structure * defining a timer setting. * NB: Must match the CLOCK_ constants below. */ #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 #define ITIMER_MONOTONIC 3 struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; /* * 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; }; #define CLOCK_REALTIME 0 #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #define CLOCK_MONOTONIC 3 #define CLOCK_THREAD_CPUTIME_ID 0x20000000 #define CLOCK_PROCESS_CPUTIME_ID 0x40000000 #if defined(_NETBSD_SOURCE) #define TIMER_RELTIME 0x0 /* relative timer */ #endif # 304 "/usr/include/sys/time.h" 3 4 #define TIMER_ABSTIME 0x1 /* absolute timer */ #ifdef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 307 "/usr/include/sys/time.h" 3 4 # 308 "/usr/include/sys/time.h" 3 4 #else /* !_KERNEL */ # 309 "/usr/include/sys/time.h" 3 4 #ifndef _STANDALONE #if (_POSIX_C_SOURCE - 0) >= 200112L || \ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 313 "/usr/include/sys/time.h" 3 4 # 314 "/usr/include/sys/time.h" 3 4 #endif # 315 "/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 316 "/usr/include/sys/time.h" 3 4 # 317 "/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 317 "/usr/include/sys/time.h" 3 4 # 318 "/usr/include/sys/time.h" 3 4 __BEGIN_DECLS #ifndef __LIBC12_SOURCE__ #if (_POSIX_C_SOURCE - 0) >= 200112L || \ defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int getitimer(int, struct itimerval *) __RENAME(__getitimer50); int gettimeofday(struct timeval * __restrict, void *__restrict) __RENAME(__gettimeofday50); int setitimer(int, const struct itimerval * __restrict, struct itimerval * __restrict) __RENAME(__setitimer50); int utimes(const char *, const struct timeval [2]) __RENAME(__utimes50); #endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 330 "/usr/include/sys/time.h" 3 4 #if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) int adjtime(const struct timeval *, struct timeval *) __RENAME(__adjtime50); int futimes(int, const struct timeval [2]) __RENAME(__futimes50); int lutimes(const char *, const struct timeval [2]) __RENAME(__lutimes50); int settimeofday(const struct timeval * __restrict, const void *__restrict) __RENAME(__settimeofday50); #endif /* _NETBSD_SOURCE */ # 338 "/usr/include/sys/time.h" 3 4 #endif /* __LIBC12_SOURCE__ */ # 339 "/usr/include/sys/time.h" 3 4 __END_DECLS #endif /* !_STANDALONE */ # 342 "/usr/include/sys/time.h" 3 4 #endif /* !_KERNEL */ # 343 "/usr/include/sys/time.h" 3 4 #endif /* !_SYS_TIME_H_ */ # 344 "/usr/include/sys/time.h" 3 4 # 146 "/usr/include/time.h" 2 3 4 struct sigevent; struct itimerspec; int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); #ifndef __LIBC12_SOURCE__ int clock_getres(clockid_t, struct timespec *) __RENAME(__clock_getres50); int clock_gettime(clockid_t, struct timespec *) __RENAME(__clock_gettime50); int clock_settime(clockid_t, const struct timespec *) __RENAME(__clock_settime50); int nanosleep(const struct timespec *, struct timespec *) __RENAME(__nanosleep50); int timer_gettime(timer_t, struct itimerspec *) __RENAME(__timer_gettime50); int timer_settime(timer_t, int, const struct itimerspec * __restrict, struct itimerspec * __restrict) __RENAME(__timer_settime50); #endif # 162 "/usr/include/time.h" 3 4 #ifdef _NETBSD_SOURCE #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 163 "/usr/include/time.h" 3 4 # 1 "/usr/include/sys/idtype.h" 1 3 4 /* $NetBSD: idtype.h,v 1.5 2016/04/09 17:02:51 riastradh Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * 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. */ #ifndef _SYS_IDTYPE_H_ #define _SYS_IDTYPE_H_ /* * Using the solaris constants, some of them are not applicable to us * Do not re-order the list, or add elements in the middle as this will * break the ABI of the system calls using this. We set a high private * maximum so that new values can be added in the future without * changing the width of the type. */ typedef enum { P_MYID = -1, /* Me/my process group */ P_ALL, /* All processes. */ P_PID, /* A process identifier. */ P_LWPID, /* An LWP identifier. */ P_PPID, /* A parent process identifier. */ P_PGID, /* A process group identifier. */ P_SID, /* A session identifier. */ P_CID, /* A scheduling class identifier. */ P_UID, /* A user identifier. */ P_GID, /* A group identifier. */ P_TASKID, /* A task identifier. */ P_PROJID, /* A project identifier. */ P_POOLID, /* A pool identifier. */ P_ZONEID, /* A zone identifier. */ P_CTID, /* A (process) contract identifier. */ P_CPUID, /* CPU identifier. */ P_PSETID, /* Processor set identifier. */ _P_MAXIDTYPE = 0x7fffffff } idtype_t; #endif /* _SYS_IDTYPE_H_ */ # 63 "/usr/include/sys/idtype.h" 3 4 # 164 "/usr/include/time.h" 2 3 4 int clock_getcpuclockid2(idtype_t, id_t, clockid_t *); #endif # 166 "/usr/include/time.h" 3 4 int clock_getcpuclockid(pid_t, clockid_t *); int timer_create(clockid_t, struct sigevent * __restrict, timer_t * __restrict); int timer_delete(timer_t); int timer_getoverrun(timer_t); #endif /* _POSIX_C_SOURCE >= 199309 || _XOPEN_SOURCE >= 500 || ... */ # 173 "/usr/include/time.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) char *asctime_r(const struct tm * __restrict, char * __restrict); #ifndef __LIBC12_SOURCE__ char *ctime_r(const time_t *, char *) __RENAME(__ctime_r50); struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict) __RENAME(__gmtime_r50); struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict) __RENAME(__localtime_r50); #endif # 184 "/usr/include/time.h" 3 4 #endif # 185 "/usr/include/time.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 191 "/usr/include/time.h" 3 4 size_t strftime_l(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict, locale_t) __attribute__((__format__(__strftime__, 3, 0))); #endif # 195 "/usr/include/time.h" 3 4 #if defined(_NETBSD_SOURCE) typedef struct __state *timezone_t; #ifndef __LIBC12_SOURCE__ time_t time2posix(time_t) __RENAME(__time2posix50); time_t posix2time(time_t) __RENAME(__posix2time50); time_t timegm(struct tm *) __RENAME(__timegm50); time_t timeoff(struct tm *, long) __RENAME(__timeoff50); time_t timelocal(struct tm *) __RENAME(__timelocal50); struct tm *offtime(const time_t *, long) __RENAME(__offtime50); void tzsetwall(void) __RENAME(__tzsetwall50); struct tm *offtime_r(const time_t *, long, struct tm *) __RENAME(__offtime_r50); struct tm *localtime_rz(timezone_t __restrict, const time_t * __restrict, struct tm * __restrict) __RENAME(__localtime_rz50); char *ctime_rz(timezone_t __restrict, const time_t *, char *) __RENAME(__ctime_rz50); time_t mktime_z(timezone_t __restrict, struct tm * __restrict) __RENAME(__mktime_z50); time_t timelocal_z(timezone_t __restrict, struct tm *) __RENAME(__timelocal_z50); time_t time2posix_z(timezone_t __restrict, time_t) __RENAME(__time2posix_z50); time_t posix2time_z(timezone_t __restrict, time_t) __RENAME(__posix2time_z50); timezone_t tzalloc(const char *) __RENAME(__tzalloc50); void tzfree(timezone_t __restrict) __RENAME(__tzfree50); const char *tzgetname(timezone_t __restrict, int) __RENAME(__tzgetname50); long tzgetgmtoff(timezone_t __restrict, int) __RENAME(__tzgetgmtoff50); #endif # 225 "/usr/include/time.h" 3 4 size_t strftime_lz(timezone_t __restrict, char * __restrict, size_t, const char * __restrict, const struct tm * __restrict, locale_t) __attribute__((__format__(__strftime__, 4, 0))); size_t strftime_z(timezone_t __restrict, char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __attribute__((__format__(__strftime__, 4, 0))); char *strptime_l(const char * __restrict, const char * __restrict, struct tm * __restrict, locale_t); #endif /* _NETBSD_SOURCE */ # 236 "/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); __END_DECLS #endif /* !_TIME_H_ */ # 244 "/usr/include/time.h" 3 4 # 63 "/usr/include/sys/select.h" 2 3 4 __BEGIN_DECLS #ifndef __LIBC12_SOURCE__ int pselect(int, fd_set * __restrict, fd_set * __restrict, fd_set * __restrict, const struct timespec * __restrict, const sigset_t * __restrict) __RENAME(__pselect50); int select(int, fd_set * __restrict, fd_set * __restrict, fd_set * __restrict, struct timeval * __restrict) __RENAME(__select50); #endif /* __LIBC12_SOURCE__ */ # 72 "/usr/include/sys/select.h" 3 4 __END_DECLS #endif /* _KERNEL */ # 74 "/usr/include/sys/select.h" 3 4 #endif /* !_SYS_SELECT_H_ */ # 76 "/usr/include/sys/select.h" 3 4 # 314 "/usr/include/sys/time.h" 2 3 4 #endif # 315 "/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 316 "/usr/include/sys/time.h" 3 4 # 317 "/usr/include/sys/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 317 "/usr/include/sys/time.h" 3 4 # 318 "/usr/include/sys/time.h" 3 4 __BEGIN_DECLS #ifndef __LIBC12_SOURCE__ #if (_POSIX_C_SOURCE - 0) >= 200112L || \ defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int getitimer(int, struct itimerval *) __RENAME(__getitimer50); int gettimeofday(struct timeval * __restrict, void *__restrict) __RENAME(__gettimeofday50); int setitimer(int, const struct itimerval * __restrict, struct itimerval * __restrict) __RENAME(__setitimer50); int utimes(const char *, const struct timeval [2]) __RENAME(__utimes50); #endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 330 "/usr/include/sys/time.h" 3 4 #if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) int adjtime(const struct timeval *, struct timeval *) __RENAME(__adjtime50); int futimes(int, const struct timeval [2]) __RENAME(__futimes50); int lutimes(const char *, const struct timeval [2]) __RENAME(__lutimes50); int settimeofday(const struct timeval * __restrict, const void *__restrict) __RENAME(__settimeofday50); #endif /* _NETBSD_SOURCE */ # 338 "/usr/include/sys/time.h" 3 4 #endif /* __LIBC12_SOURCE__ */ # 339 "/usr/include/sys/time.h" 3 4 __END_DECLS #endif /* !_STANDALONE */ # 342 "/usr/include/sys/time.h" 3 4 #endif /* !_KERNEL */ # 343 "/usr/include/sys/time.h" 3 4 #endif /* !_SYS_TIME_H_ */ # 344 "/usr/include/sys/time.h" 3 4 # 57 "/usr/include/sys/stat.h" 2 3 4 #endif # 58 "/usr/include/sys/stat.h" 3 4 struct stat { dev_t st_dev; /* inode's device */ mode_t st_mode; /* inode protection mode */ ino_t st_ino; /* inode's number */ nlink_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 */ dev_t st_rdev; /* device type */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) 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 */ struct timespec st_birthtim; /* time of creation */ #else # 74 "/usr/include/sys/stat.h" 3 4 time_t st_atime; /* time of last access */ long st_atimensec; /* nsec of last access */ time_t st_mtime; /* time of last data modification */ long st_mtimensec; /* nsec of last data modification */ time_t st_ctime; /* time of last file status change */ long st_ctimensec; /* nsec of last file status change */ time_t st_birthtime; /* time of creation */ long st_birthtimensec; /* nsec of time of creation */ #endif # 83 "/usr/include/sys/stat.h" 3 4 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 */ uint32_t st_flags; /* user defined flags for file */ uint32_t st_gen; /* file generation number */ uint32_t st_spare[2]; }; #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) /* Standard-mandated compatibility */ #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec #define st_birthtime st_birthtim.tv_sec #endif # 99 "/usr/include/sys/stat.h" 3 4 #if defined(_NETBSD_SOURCE) #define st_atimespec st_atim #define st_atimensec st_atim.tv_nsec #define st_mtimespec st_mtim #define st_mtimensec st_mtim.tv_nsec #define st_ctimespec st_ctim #define st_ctimensec st_ctim.tv_nsec #define st_birthtimespec st_birthtim #define st_birthtimensec st_birthtimespec.tv_nsec #endif # 110 "/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 defined(_NETBSD_SOURCE) #define S_ISTXT 0001000 /* sticky bit */ #endif # 116 "/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 defined(_NETBSD_SOURCE) #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR #define S_IEXEC S_IXUSR #endif # 127 "/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 */ #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_ISVTX 0001000 /* save swapped text even after use */ #define _S_IFSOCK 0140000 /* socket */ #define _S_IFWHT 0160000 /* whiteout */ #define _S_ARCH1 0200000 /* Archive state 1, ls -l shows 'a' */ #define _S_ARCH2 0400000 /* Archive state 2, ls -l shows 'A' */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define S_IFMT _S_IFMT #define S_IFIFO _S_IFIFO #define S_IFCHR _S_IFCHR #define S_IFDIR _S_IFDIR #define S_IFBLK _S_IFBLK #define S_IFREG _S_IFREG #define S_IFLNK _S_IFLNK #define S_ISVTX _S_ISVTX #endif # 161 "/usr/include/sys/stat.h" 3 4 #if ((_XOPEN_SOURCE - 0) >= 600) || defined(_NETBSD_SOURCE) #define S_IFSOCK _S_IFSOCK #endif # 164 "/usr/include/sys/stat.h" 3 4 #if defined(_NETBSD_SOURCE) #define S_IFWHT _S_IFWHT #define S_ARCH1 _S_ARCH1 #define S_ARCH2 _S_ARCH2 #endif # 170 "/usr/include/sys/stat.h" 3 4 #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) /* directory */ #define S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR) /* char special */ #define S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK) /* block special */ #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) /* regular file */ #define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO) /* fifo */ #if ((_POSIX_C_SOURCE - 0) >= 200112L) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK) /* symbolic link */ #endif # 180 "/usr/include/sys/stat.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 200112L) || ((_XOPEN_SOURCE - 0) >= 600) || \ defined(_NETBSD_SOURCE) #define S_ISSOCK(m) (((m) & _S_IFMT) == _S_IFSOCK) /* socket */ #endif # 184 "/usr/include/sys/stat.h" 3 4 #if defined(_NETBSD_SOURCE) #define S_ISWHT(m) (((m) & _S_IFMT) == _S_IFWHT) /* whiteout */ #endif # 187 "/usr/include/sys/stat.h" 3 4 #if defined(_NETBSD_SOURCE) #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 */ /* UF_NOUNLINK 0x00000010 [NOT IMPLEMENTED] */ /* * 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 */ /* SF_NOUNLINK 0x00100000 [NOT IMPLEMENTED] */ #define SF_SNAPSHOT 0x00200000 /* snapshot inode */ #define SF_LOG 0x00400000 /* WAPBL log file inode */ #define SF_SNAPINVAL 0x00800000 /* snapshot is invalid */ #ifdef _KERNEL /* * Shorthand abbreviations of above. */ #define OPAQUE (UF_OPAQUE) #define APPEND (UF_APPEND | SF_APPEND) #define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE) #endif /* _KERNEL */ # 228 "/usr/include/sys/stat.h" 3 4 #endif /* _NETBSD_SOURCE */ # 229 "/usr/include/sys/stat.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) /* * Special values for utimensat and futimens */ #define UTIME_NOW ((1 << 30) - 1) #define UTIME_OMIT ((1 << 30) - 2) #endif # 238 "/usr/include/sys/stat.h" 3 4 #if !defined(_KERNEL) && !defined(_STANDALONE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 240 "/usr/include/sys/stat.h" 3 4 # 241 "/usr/include/sys/stat.h" 3 4 __BEGIN_DECLS int chmod(const char *, mode_t); int mkdir(const char *, mode_t); int mkfifo(const char *, mode_t); #ifndef __LIBC12_SOURCE__ int stat(const char *, struct stat *) __RENAME(__stat50); int fstat(int, struct stat *) __RENAME(__fstat50); #endif # 250 "/usr/include/sys/stat.h" 3 4 mode_t umask(mode_t); #if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ int lstat(const char *, struct stat *) __RENAME(__lstat50); #endif # 256 "/usr/include/sys/stat.h" 3 4 #endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 257 "/usr/include/sys/stat.h" 3 4 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int fchmod(int, mode_t); #ifndef __LIBC12_SOURCE__ int mknod(const char *, mode_t, dev_t) __RENAME(__mknod50); #endif # 262 "/usr/include/sys/stat.h" 3 4 #endif /* defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) */ # 263 "/usr/include/sys/stat.h" 3 4 #if defined(_NETBSD_SOURCE) int chflags(const char *, unsigned long); int fchflags(int, unsigned long); int lchflags(const char *, unsigned long); int lchmod(const char *, mode_t); #endif /* defined(_NETBSD_SOURCE) */ # 270 "/usr/include/sys/stat.h" 3 4 #ifndef __LIBC12_SOURCE__ /* * X/Open Extended API set 2 (a.k.a. C063) */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) || defined(_INCOMPLETE_XOPEN_C063) int fchmodat(int, const char *, mode_t, int); int fstatat(int, const char *, struct stat *, int); int mkdirat(int, const char *, mode_t); int mkfifoat(int, const char *, mode_t); int mknodat(int, const char *, mode_t, dev_t); int utimensat(int, const char *, const struct timespec *, int); #endif # 284 "/usr/include/sys/stat.h" 3 4 #ifdef _NETBSD_SOURCE int utimens(const char *, const struct timespec *); int lutimens(const char *, const struct timespec *); #endif # 289 "/usr/include/sys/stat.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) int futimens(int, const struct timespec *); #endif # 294 "/usr/include/sys/stat.h" 3 4 #endif # 295 "/usr/include/sys/stat.h" 3 4 __END_DECLS #endif /* !_KERNEL && !_STANDALONE */ # 299 "/usr/include/sys/stat.h" 3 4 #endif /* !_SYS_STAT_H_ */ # 300 "/usr/include/sys/stat.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" /* * Declare functions and macros that may be missing in . */ #if !HAVE_LCHMOD int lchmod(const char *, mode_t); #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" #if !defined(S_ISLNK) # define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" #if !defined(S_ISTXT) # define S_ISTXT S_ISVTX #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" #if !defined(ALLPERMS) # define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" #if !defined(DEFFILEMODE) # define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) #endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" #endif /* !_NBCOMPAT_STAT_H_ */ # 64 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stat.h" # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" 1 /* $NetBSD: statvfs.h,v 1.6 2015/12/11 23:28:10 ryoon Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * 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. */ #ifndef _NBCOMPAT_STATVFS_H_ #define _NBCOMPAT_STATVFS_H_ #if HAVE_SYS_STATVFS_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 1 "/usr/include/sys/statvfs.h" 1 3 4 /* $NetBSD: statvfs.h,v 1.18 2013/04/05 17:34:27 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * 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. */ #ifndef _SYS_STATVFS_H_ #define _SYS_STATVFS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/statvfs.h" 3 4 # 36 "/usr/include/sys/statvfs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/statvfs.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 37 "/usr/include/sys/statvfs.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/statvfs.h" 3 4 # 38 "/usr/include/sys/statvfs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/statvfs.h" 3 4 # 39 "/usr/include/sys/statvfs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/statvfs.h" 3 4 # 40 "/usr/include/sys/statvfs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/statvfs.h" 3 4 # 1 "/usr/include/sys/fstypes.h" 1 3 4 /* $NetBSD: fstypes.h,v 1.35 2017/03/01 10:44:47 hannken Exp $ */ /* * Copyright (c) 1989, 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. * * @(#)mount.h 8.21 (Berkeley) 5/20/95 */ #ifndef _SYS_FSTYPES_H_ #define _SYS_FSTYPES_H_ typedef struct { int32_t __fsid_val[2]; } fsid_t; /* file system id type */ #if defined(_KERNEL) /* * File identifier. * These are unique per filesystem on a single machine. */ struct fid { unsigned short fid_len; /* length of data in bytes */ unsigned short fid_reserved; /* compat: historic align */ char fid_data[0]; /* data (variable length) */ }; /* * Generic file handle */ struct fhandle { fsid_t fh_fsid; /* File system id of mount point */ struct fid fh_fid; /* File sys specific id */ }; typedef struct fhandle fhandle_t; /* * FHANDLE_SIZE_MAX: arbitrary value to prevent unreasonable allocation. * * FHANDLE_SIZE_MIN: chosen for compatibility. smaller handles are zero-padded. */ #define FHANDLE_SIZE_COMPAT 28 #define FHANDLE_SIZE_MAX 1024 #define FHANDLE_SIZE_MIN FHANDLE_SIZE_COMPAT #define FHANDLE_FSID(fh) (&(fh)->fh_fsid) #define FHANDLE_FILEID(fh) (&(fh)->fh_fid) #define FHANDLE_SIZE_FROM_FILEID_SIZE(fidsize) \ MAX(FHANDLE_SIZE_MIN, (offsetof(fhandle_t, fh_fid) + (fidsize))) #define FHANDLE_SIZE(fh) \ FHANDLE_SIZE_FROM_FILEID_SIZE(FHANDLE_FILEID(fh)->fid_len) #endif /* defined(_KERNEL) */ # 76 "/usr/include/sys/fstypes.h" 3 4 /* * Mount flags. XXX BEWARE: these are not in numerical order! * * Unmount uses MNT_FORCE flag. * * Note that all mount flags are listed here. if you need to add one, take * one of the __MNT_UNUSED flags. */ #define __MNT_UNUSED1 0x00200000 #define MNT_RDONLY 0x00000001 /* read only filesystem */ #define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */ #define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */ #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ #define MNT_NODEV 0x00000010 /* don't interpret special files */ #define MNT_UNION 0x00000020 /* union with underlying filesystem */ #define MNT_ASYNC 0x00000040 /* file system written asynchronously */ #define MNT_NOCOREDUMP 0x00008000 /* don't write core dumps to this FS */ #define MNT_RELATIME 0x00020000 /* only update access time if mod/ch */ #define MNT_IGNORE 0x00100000 /* don't show entry in df */ #define MNT_DISCARD 0x00800000 /* use DISCARD/TRIM if supported */ #define MNT_EXTATTR 0x01000000 /* enable extended attributes */ #define MNT_LOG 0x02000000 /* Use logging */ #define MNT_NOATIME 0x04000000 /* Never update access times in fs */ #define MNT_SYMPERM 0x20000000 /* recognize symlink permission */ #define MNT_NODEVMTIME 0x40000000 /* Never update mod times for devs */ #define MNT_SOFTDEP 0x80000000 /* Use soft dependencies */ #define __MNT_BASIC_FLAGS \ { MNT_ASYNC, 0, "asynchronous" }, \ { MNT_DISCARD, 0, "discard" }, \ { MNT_EXTATTR, 0, "extattr" }, \ { MNT_IGNORE, 0, "hidden" }, \ { MNT_LOG, 0, "log" }, \ { MNT_NOATIME, 0, "noatime" }, \ { MNT_NOCOREDUMP, 0, "nocoredump" }, \ { MNT_NODEV, 0, "nodev" }, \ { MNT_NODEVMTIME, 0, "nodevmtime" }, \ { MNT_NOEXEC, 0, "noexec" }, \ { MNT_NOSUID, 0, "nosuid" }, \ { MNT_RDONLY, 0, "read-only" }, \ { MNT_RELATIME, 0, "relatime" }, \ { MNT_SOFTDEP, 0, "soft dependencies" }, \ { MNT_SYMPERM, 0, "symperm" }, \ { MNT_SYNCHRONOUS, 0, "synchronous" }, \ { MNT_UNION, 0, "union" }, \ #define MNT_BASIC_FLAGS (MNT_ASYNC | MNT_DISCARD | MNT_EXTATTR | MNT_LOG | \ MNT_NOATIME | MNT_NOCOREDUMP | MNT_NODEV | MNT_NODEVMTIME | MNT_NOEXEC | \ MNT_NOSUID | MNT_RDONLY | MNT_RELATIME | MNT_SOFTDEP | MNT_SYMPERM | \ MNT_SYNCHRONOUS | MNT_UNION) /* * exported mount flags. */ #define MNT_EXRDONLY 0x00000080 /* exported read only */ #define MNT_EXPORTED 0x00000100 /* file system is exported */ #define MNT_DEFEXPORTED 0x00000200 /* exported to the world */ #define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */ #define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */ #define MNT_EXNORESPORT 0x08000000 /* don't enforce reserved ports (NFS) */ #define MNT_EXPUBLIC 0x10000000 /* public export (WebNFS) */ #define __MNT_EXPORTED_FLAGS \ { MNT_EXRDONLY, 1, "exported read-only" }, \ { MNT_EXPORTED, 0, "NFS exported" }, \ { MNT_DEFEXPORTED, 1, "exported to the world" }, \ { MNT_EXPORTANON, 1, "anon uid mapping" }, \ { MNT_EXKERB, 1, "kerberos uid mapping" }, \ { MNT_EXNORESPORT, 0, "non-reserved ports" }, \ { MNT_EXPUBLIC, 0, "WebNFS exports" }, /* * Flags set by internal operations. */ #define MNT_LOCAL 0x00001000 /* filesystem is stored locally */ #define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */ #define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */ #define __MNT_INTERNAL_FLAGS \ { MNT_LOCAL, 0, "local" }, \ { MNT_QUOTA, 0, "with quotas" }, \ { MNT_ROOTFS, 1, "root file system" }, /* * Mask of flags that are visible to statvfs() */ #define MNT_VISFLAGMASK ( \ MNT_RDONLY | \ MNT_SYNCHRONOUS | \ MNT_NOEXEC | \ MNT_NOSUID | \ MNT_NODEV | \ MNT_UNION | \ MNT_ASYNC | \ MNT_NOCOREDUMP | \ MNT_IGNORE | \ MNT_DISCARD | \ MNT_NOATIME | \ MNT_SYMPERM | \ MNT_NODEVMTIME | \ MNT_SOFTDEP | \ MNT_EXRDONLY | \ MNT_EXPORTED | \ MNT_DEFEXPORTED | \ MNT_EXPORTANON | \ MNT_EXKERB | \ MNT_EXNORESPORT | \ MNT_EXPUBLIC | \ MNT_LOCAL | \ MNT_QUOTA | \ MNT_ROOTFS | \ MNT_LOG | \ MNT_EXTATTR) /* * External filesystem control flags. */ #define MNT_UPDATE 0x00010000 /* not a real mount, just an update */ #define MNT_RELOAD 0x00040000 /* reload filesystem data */ #define MNT_FORCE 0x00080000 /* force unmount or readonly change */ #define MNT_GETARGS 0x00400000 /* retrieve file system specific args */ #define MNT_OP_FLAGS (MNT_UPDATE|MNT_RELOAD|MNT_FORCE|MNT_GETARGS) #define __MNT_EXTERNAL_FLAGS \ { MNT_UPDATE, 1, "being updated" }, \ { MNT_RELOAD, 1, "reload filesystem data" }, \ { MNT_FORCE, 1, "force unmount or readonly change" }, \ { MNT_GETARGS, 1, "retrieve mount arguments" }, /* * Internal filesystem control flags. * These are set in struct mount mnt_iflag. * * IMNT_UNMOUNT locks the mount entry so that name lookup cannot proceed * past the mount point. This keeps the subtree stable during mounts * and unmounts. */ #define IMNT_GONE 0x00000001 /* filesystem is gone.. */ #define IMNT_UNMOUNT 0x00000002 /* unmount in progress */ #define IMNT_WANTRDWR 0x00000004 /* upgrade to read/write requested */ #define IMNT_WANTRDONLY 0x00000008 /* upgrade to readonly requested */ #define IMNT_DTYPE 0x00000040 /* returns d_type fields */ #define IMNT_HAS_TRANS 0x00000080 /* supports transactions */ #define IMNT_MPSAFE 0x00000100 /* file system code MP safe */ #define IMNT_CAN_RWTORO 0x00000200 /* can downgrade fs to from rw to r/o */ #define IMNT_ONWORKLIST 0x00000400 /* on syncer worklist */ #define __MNT_FLAGS \ __MNT_BASIC_FLAGS \ __MNT_EXPORTED_FLAGS \ __MNT_INTERNAL_FLAGS \ __MNT_EXTERNAL_FLAGS #define __MNT_FLAG_BITS \ "\20" \ "\40MNT_SOFTDEP" \ "\37MNT_NODEVMTIME" \ "\36MNT_SYMPERM" \ "\35MNT_EXPUBLIC" \ "\34MNT_EXNORESPORT" \ "\33MNT_NOATIME" \ "\32MNT_LOG" \ "\31MNT_EXTATTR" \ "\30MNT_DISCARD" \ "\27MNT_GETARGS" \ "\26MNT_UNUSED" \ "\25MNT_IGNORE" \ "\24MNT_FORCE" \ "\23MNT_RELOAD" \ "\22MNT_RELATIME" \ "\21MNT_UPDATE" \ "\20MNT_NOCOREDUMP" \ "\17MNT_ROOTFS" \ "\16MNT_QUOTA" \ "\15MNT_LOCAL" \ "\14MNT_EXKERB" \ "\13MNT_EXPORTANON" \ "\12MNT_DEFEXPORTED" \ "\11MNT_EXPORTED" \ "\10MNT_EXRDONLY" \ "\07MNT_ASYNC" \ "\06MNT_UNION" \ "\05MNT_NODEV" \ "\04MNT_NOSUID" \ "\03MNT_NOEXEC" \ "\02MNT_SYNCHRONOUS" \ "\01MNT_RDONLY" #define __IMNT_FLAG_BITS \ "\20" \ "\13IMNT_ONWORKLIST" \ "\12IMNT_CAN_RWTORO" \ "\11IMNT_MPSAFE" \ "\10IMNT_HAS_TRANS" \ "\07IMNT_DTYPE" \ "\04IMNT_WANTRDONLY" \ "\03IMNT_WANTRDWR" \ "\02IMNT_UNMOUNT" \ "\01IMNT_GONE" /* * Flags for various system call interfaces. * * waitfor flags to vfs_sync() and getvfsstat() */ #define MNT_WAIT 1 /* synchronously wait for I/O to complete */ #define MNT_NOWAIT 2 /* start all I/O, but do not wait for it */ #define MNT_LAZY 3 /* push data not written by filesystem syncer */ #endif /* _SYS_FSTYPES_H_ */ # 288 "/usr/include/sys/fstypes.h" 3 4 # 41 "/usr/include/sys/statvfs.h" 2 3 4 #define _VFS_NAMELEN 32 #define _VFS_MNAMELEN 1024 #ifndef fsblkcnt_t typedef __fsblkcnt_t fsblkcnt_t; /* fs block count (statvfs) */ #define fsblkcnt_t __fsblkcnt_t #endif # 49 "/usr/include/sys/statvfs.h" 3 4 #ifndef fsfilcnt_t typedef __fsfilcnt_t fsfilcnt_t; /* fs file count */ #define fsfilcnt_t __fsfilcnt_t #endif # 54 "/usr/include/sys/statvfs.h" 3 4 #ifndef uid_t typedef __uid_t uid_t; /* user id */ #define uid_t __uid_t #endif # 59 "/usr/include/sys/statvfs.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #define _SIZE_T #undef _BSD_SIZE_T_ #endif # 65 "/usr/include/sys/statvfs.h" 3 4 struct statvfs { unsigned long f_flag; /* copy of mount exported flags */ unsigned long f_bsize; /* file system block size */ unsigned long f_frsize; /* fundamental file system block size */ unsigned long f_iosize; /* optimal file system block size */ /* The following are in units of f_frsize */ fsblkcnt_t f_blocks; /* number of blocks in file system, */ fsblkcnt_t f_bfree; /* free blocks avail in file system */ fsblkcnt_t f_bavail; /* free blocks avail to non-root */ fsblkcnt_t f_bresvd; /* blocks reserved for root */ fsfilcnt_t f_files; /* total file nodes in file system */ fsfilcnt_t f_ffree; /* free file nodes in file system */ fsfilcnt_t f_favail; /* free file nodes avail to non-root */ fsfilcnt_t f_fresvd; /* file nodes reserved for root */ uint64_t f_syncreads; /* count of sync reads since mount */ uint64_t f_syncwrites; /* count of sync writes since mount */ uint64_t f_asyncreads; /* count of async reads since mount */ uint64_t f_asyncwrites; /* count of async writes since mount */ fsid_t f_fsidx; /* NetBSD compatible fsid */ unsigned long f_fsid; /* Posix compatible fsid */ unsigned long f_namemax; /* maximum filename length */ uid_t f_owner; /* user that mounted the file system */ uint32_t f_spare[4]; /* spare space */ char f_fstypename[_VFS_NAMELEN]; /* fs type name */ char f_mntonname[_VFS_MNAMELEN]; /* directory on which mounted */ char f_mntfromname[_VFS_MNAMELEN]; /* mounted file system */ }; #if defined(_NETBSD_SOURCE) && !defined(_POSIX_SOURCE) && \ !defined(_XOPEN_SOURCE) #define VFS_NAMELEN _VFS_NAMELEN #define VFS_MNAMELEN _VFS_MNAMELEN #endif # 107 "/usr/include/sys/statvfs.h" 3 4 #define ST_RDONLY MNT_RDONLY #define ST_SYNCHRONOUS MNT_SYNCHRONOUS #define ST_NOEXEC MNT_NOEXEC #define ST_NOSUID MNT_NOSUID #define ST_NODEV MNT_NODEV #define ST_UNION MNT_UNION #define ST_ASYNC MNT_ASYNC #define ST_NOCOREDUMP MNT_NOCOREDUMP #define ST_RELATIME MNT_RELATIME #define ST_IGNORE MNT_IGNORE #define ST_NOATIME MNT_NOATIME #define ST_SYMPERM MNT_SYMPERM #define ST_NODEVMTIME MNT_NODEVMTIME #define ST_SOFTDEP MNT_SOFTDEP #define ST_LOG MNT_LOG #define ST_EXTATTR MNT_EXTATTR #define ST_EXRDONLY MNT_EXRDONLY #define ST_EXPORTED MNT_EXPORTED #define ST_DEFEXPORTED MNT_DEFEXPORTED #define ST_EXPORTANON MNT_EXPORTANON #define ST_EXKERB MNT_EXKERB #define ST_EXNORESPORT MNT_EXNORESPORT #define ST_EXPUBLIC MNT_EXPUBLIC #define ST_LOCAL MNT_LOCAL #define ST_QUOTA MNT_QUOTA #define ST_ROOTFS MNT_ROOTFS #define ST_WAIT MNT_WAIT #define ST_NOWAIT MNT_NOWAIT #if defined(_KERNEL) || defined(_STANDALONE) struct mount; struct lwp; int set_statvfs_info(const char *, int, const char *, int, const char *, struct mount *, struct lwp *); void copy_statvfs_info(struct statvfs *, const struct mount *); int dostatvfs(struct mount *, struct statvfs *, struct lwp *, int, int); #else # 150 "/usr/include/sys/statvfs.h" 3 4 __BEGIN_DECLS int statvfs(const char *__restrict, struct statvfs *__restrict); int fstatvfs(int, struct statvfs *); int getvfsstat(struct statvfs *, size_t, int); #ifndef __LIBC12_SOURCE__ int getmntinfo(struct statvfs **, int) __RENAME(__getmntinfo13); #endif /* __LIBC12_SOURCE__ */ # 157 "/usr/include/sys/statvfs.h" 3 4 #if defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ int fhstatvfs(const void *, size_t, struct statvfs *) __RENAME(__fhstatvfs40); #endif # 162 "/usr/include/sys/statvfs.h" 3 4 int statvfs1(const char *__restrict, struct statvfs *__restrict, int); int fstatvfs1(int, struct statvfs *, int); #ifndef __LIBC12_SOURCE__ int fhstatvfs1(const void *, size_t, struct statvfs *, int) __RENAME(__fhstatvfs140); #endif # 169 "/usr/include/sys/statvfs.h" 3 4 #endif /* _NETBSD_SOURCE */ # 170 "/usr/include/sys/statvfs.h" 3 4 __END_DECLS #endif /* _KERNEL || _STANDALONE */ # 172 "/usr/include/sys/statvfs.h" 3 4 #if defined(_KERNEL) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 174 "/usr/include/sys/statvfs.h" 3 4 # 175 "/usr/include/sys/statvfs.h" 3 4 #define STATVFSBUF_GET() kmem_alloc(sizeof(struct statvfs), KM_SLEEP) #define STATVFSBUF_PUT(sb) kmem_free(sb, sizeof(struct statvfs)) #endif /* defined(_KERNEL) */ # 178 "/usr/include/sys/statvfs.h" 3 4 #endif /* !_SYS_STATVFS_H_ */ # 180 "/usr/include/sys/statvfs.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if !HAVE_STATVFS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if HAVE_SYS_MOUNT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #endif # 47 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if HAVE_SYS_STATFS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #endif # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if HAVE_SYS_VFS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #endif # 55 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if HAVE_STDINT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 57 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #endif # 59 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #define VFS_NAMELEN 32 #define VFS_MNAMELEN 1024 #if !defined(fsblkcnt_t) typedef uint64_t fsblkcnt_t; /* fs block count (statvfs) */ #endif # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if !defined(fsfilcnt_t) typedef uint64_t fsfilcnt_t; /* fs file count */ #endif # 69 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #if !HAVE_FSID_T typedef struct { int32_t val[2]; } fsid_t; #endif # 73 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" struct statvfs { unsigned long f_flag; /* copy of mount exported flags */ unsigned long f_bsize; /* system block size */ unsigned long f_frsize; /* system fragment size */ unsigned long f_iosize; /* optimal file system block size */ fsblkcnt_t f_blocks; /* number of blocks in file system */ fsblkcnt_t f_bfree; /* free blocks avail in file system */ fsblkcnt_t f_bavail; /* free blocks avail to non-root */ fsblkcnt_t f_bresvd; /* blocks reserved for root */ fsfilcnt_t f_files; /* total file nodes in file system */ fsfilcnt_t f_ffree; /* free file nodes in file system */ fsfilcnt_t f_favail; /* free file nodes avail to non-root */ fsfilcnt_t f_fresvd; /* file nodes reserved for root */ uint64_t f_syncreads; /* count of sync reads since mount */ uint64_t f_syncwrites; /* count of sync writes since mount */ uint64_t f_asyncreads; /* count of async reads since mount */ uint64_t f_asyncwrites; /* count of async writes since mount */ fsid_t f_fsidx; /* NetBSD compatible fsid */ unsigned long f_fsid; /* Posix compatible fsid */ unsigned long f_namemax; /* maximum filename length */ uint32_t f_owner; /* user that mounted the file system */ uint32_t f_spare[4]; /* spare space */ char f_fstypename[VFS_NAMELEN]; /* fs type name */ char f_mntonname[VFS_MNAMELEN]; /* directory on which mounted */ char f_mntfromname[VFS_MNAMELEN]; /* mounted file system */ }; #ifndef MNT_RDONLY #define MNT_RDONLY 0x00000001 /* read only filesystem */ #endif # 111 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #ifndef ST_RDONLY #define ST_RDONLY MNT_RDONLY #endif # 114 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #ifndef MNT_NOSUID #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ #endif # 118 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #ifndef ST_NOSUID #define ST_NOSUID MNT_NOSUID #endif # 121 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" int statvfs(const char *path, struct statvfs *vfs); int fstatvfs(int fd, struct statvfs *vfs); #endif /* !HAVE_STATVFS */ # 126 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" #endif /* !_NBCOMPAT_STATVFS_H_ */ # 128 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/statvfs.h" # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" 1 /* $NetBSD: stdlib.h,v 1.5 2015/04/14 09:23:48 jperkin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_STDLIB_H_ #define _NBCOMPAT_STDLIB_H_ #if HAVE_STDLIB_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" # 1 "/usr/include/stdlib.h" 1 3 4 /* $NetBSD: stdlib.h,v 1.117 2016/07/01 22:42:01 christos Exp $ */ /*- * 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 */ #ifndef _STDLIB_H_ #define _STDLIB_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/stdlib.h" 3 4 # 38 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 39 "/usr/include/stdlib.h" 2 3 4 #if defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include /* for quad_t, etc. */ #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/stdlib.h" 3 4 # 42 "/usr/include/stdlib.h" 3 4 #endif # 43 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/stdlib.h" 3 4 # 45 "/usr/include/stdlib.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 50 "/usr/include/stdlib.h" 3 4 #if defined(_BSD_WCHAR_T_) && !defined(__cplusplus) typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif # 55 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; /* quotient */ int rem; /* remainder */ } div_t; typedef struct { long quot; /* quotient */ long rem; /* remainder */ } ldiv_t; #if !defined(_ANSI_SOURCE) && \ (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE)) typedef struct { /* LONGLONG */ long long int quot; /* quotient */ /* LONGLONG */ long long int rem; /* remainder */ } lldiv_t; #endif # 76 "/usr/include/stdlib.h" 3 4 #if defined(_NETBSD_SOURCE) typedef struct { quad_t quot; /* quotient */ quad_t rem; /* remainder */ } qdiv_t; #endif # 83 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 85 "/usr/include/stdlib.h" 3 4 # 86 "/usr/include/stdlib.h" 3 4 #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 #define RAND_MAX 0x7fffffff extern size_t __mb_cur_max; #define MB_CUR_MAX __mb_cur_max __BEGIN_DECLS __dead void _Exit(int); __dead void abort(void); __pure int abs(int); int atexit(void (*)(void)); double atof(const char *); int atoi(const char *); long atol(const char *); #ifndef __BSEARCH_DECLARED #define __BSEARCH_DECLARED /* also in search.h */ void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); #endif /* __BSEARCH_DECLARED */ # 109 "/usr/include/stdlib.h" 3 4 void *calloc(size_t, size_t); div_t div(int, int); __dead void exit(int); void free(void *); __aconst char *getenv(const char *); __pure long labs(long); ldiv_t ldiv(long, long); void *malloc(size_t); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); int rand(void); void *realloc(void *, size_t); void srand(unsigned); double strtod(const char * __restrict, char ** __restrict); long strtol(const char * __restrict, char ** __restrict, int); unsigned long strtoul(const char * __restrict, char ** __restrict, int); #ifdef _OPENBSD_SOURCE long long strtonum(const char *, long long, long long, const char **); void *reallocarray(void *, size_t, size_t); #endif # 130 "/usr/include/stdlib.h" 3 4 int system(const char *); /* These are currently just stubs. */ int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict, const char * __restrict, size_t); int wctomb(char *, wchar_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) /* * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) int rand_r(unsigned int *); #endif # 150 "/usr/include/stdlib.h" 3 4 /* * X/Open Portability Guide >= Issue 4 */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) double drand48(void); double erand48(unsigned short[3]); long jrand48(unsigned short[3]); void lcong48(unsigned short[7]); long lrand48(void); long mrand48(void); long nrand48(unsigned short[3]); unsigned short * seed48(unsigned short[3]); void srand48(long); #ifndef __LIBC12_SOURCE__ int putenv(char *) __RENAME(__putenv50); #endif # 170 "/usr/include/stdlib.h" 3 4 #endif # 171 "/usr/include/stdlib.h" 3 4 /* * X/Open Portability Guide >= Issue 4 Version 2 */ #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) long a64l(const char *); char *l64a(long); long random(void); char *setstate(char *); #ifndef __LIBC12_SOURCE__ char *initstate(unsigned int, char *, size_t) __RENAME(__initstate60); void srandom(unsigned int) __RENAME(__srandom60); #endif # 187 "/usr/include/stdlib.h" 3 4 #ifdef _NETBSD_SOURCE #define RANDOM_MAX 0x7fffffff /* (((long)1 << 31) - 1) */ int mkostemp(char *, int); int mkostemps(char *, int, int); #endif # 192 "/usr/include/stdlib.h" 3 4 char *mkdtemp(char *); int mkstemp(char *); char *mktemp(char *) #ifdef __MKTEMP_OK__ __RENAME(_mktemp) #endif # 199 "/usr/include/stdlib.h" 3 4 ; int setkey(const char *); char *realpath(const char * __restrict, char * __restrict); int ttyslot(void); void *valloc(size_t); /* obsoleted by malloc() */ int grantpt(int); int unlockpt(int); char *ptsname(int); #endif # 213 "/usr/include/stdlib.h" 3 4 /* * ISO C99 */ #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \ defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L /* LONGLONG */ long long int atoll(const char *); /* LONGLONG */ long long int llabs(long long int); /* LONGLONG */ lldiv_t lldiv(long long int, long long int); /* LONGLONG */ long long int strtoll(const char * __restrict, char ** __restrict, int); /* LONGLONG */ unsigned long long int strtoull(const char * __restrict, char ** __restrict, int); float strtof(const char * __restrict, char ** __restrict); long double strtold(const char * __restrict, char ** __restrict); #endif # 234 "/usr/include/stdlib.h" 3 4 #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L || \ defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L void *aligned_alloc(size_t, size_t); int at_quick_exit(void (*)(void)); __dead void quick_exit(int); #endif # 241 "/usr/include/stdlib.h" 3 4 /* * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX) */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \ defined(_NETBSD_SOURCE) int setenv(const char *, const char *, int); #ifndef __LIBC12_SOURCE__ int unsetenv(const char *) __RENAME(__unsetenv13); #endif # 251 "/usr/include/stdlib.h" 3 4 int posix_openpt(int); int posix_memalign(void **, size_t, size_t); #endif # 255 "/usr/include/stdlib.h" 3 4 /* * Implementation-defined extensions */ #if defined(_NETBSD_SOURCE) #if defined(alloca) && (alloca == __builtin_alloca) && \ defined(__GNUC__) && (__GNUC__ < 2) void *alloca(int); /* built-in for gcc */ #elif defined(__PCC__) && !defined(__GNUC__) # 264 "/usr/include/stdlib.h" 3 4 #define alloca(size) __builtin_alloca(size) #else # 266 "/usr/include/stdlib.h" 3 4 void *alloca(size_t); #endif /* __GNUC__ */ # 268 "/usr/include/stdlib.h" 3 4 uint32_t arc4random(void); void arc4random_stir(void); void arc4random_buf(void *, size_t); uint32_t arc4random_uniform(uint32_t); void arc4random_addrandom(u_char *, int); char *getbsize(int *, long *); char *cgetcap(char *, const char *, int); int cgetclose(void); int cgetent(char **, const char * const *, const char *); int cgetfirst(char **, const char * const *); int cgetmatch(const char *, const char *); int cgetnext(char **, const char * const *); int cgetnum(char *, const char *, long *); int cgetset(const char *); int cgetstr(char *, const char *, char **); int cgetustr(char *, const char *, char **); void csetexpandtc(int); int daemon(int, int); int devname_r(dev_t, mode_t, char *, size_t); #ifndef __LIBC12_SOURCE__ __aconst char *devname(dev_t, mode_t) __RENAME(__devname50); #endif # 292 "/usr/include/stdlib.h" 3 4 #define HN_DECIMAL 0x01 #define HN_NOSPACE 0x02 #define HN_B 0x04 #define HN_DIVISOR_1000 0x08 #define HN_GETSCALE 0x10 #define HN_AUTOSCALE 0x20 int humanize_number(char *, size_t, int64_t, const char *, int, int); int dehumanize_number(const char *, int64_t *); ssize_t hmac(const char *, const void *, size_t, const void *, size_t, void *, size_t); devmajor_t getdevmajor(const char *, mode_t); int getloadavg(double [], int); int getenv_r(const char *, char *, size_t); void cfree(void *); int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); int ptsname_r(int, char *, size_t); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); int sradixsort(const unsigned char **, int, const unsigned char *, unsigned); void mi_vector_hash(const void * __restrict, size_t, uint32_t, uint32_t[3]); void setproctitle(const char *, ...) __printflike(1, 2); const char *getprogname(void) __constfunc; void setprogname(const char *); quad_t qabs(quad_t); quad_t strtoq(const char * __restrict, char ** __restrict, int); u_quad_t strtouq(const char * __restrict, char ** __restrict, int); /* LONGLONG */ long long strsuftoll(const char *, const char *, long long, long long); /* LONGLONG */ long long strsuftollx(const char *, const char *, long long, long long, char *, size_t); int l64a_r(long, char *, int); size_t shquote(const char *, char *, size_t); size_t shquotev(int, char * const *, char *, size_t); int reallocarr(void *, size_t, size_t); #endif /* _NETBSD_SOURCE */ # 347 "/usr/include/stdlib.h" 3 4 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ # 348 "/usr/include/stdlib.h" 3 4 #if defined(_NETBSD_SOURCE) qdiv_t qdiv(quad_t, quad_t); #endif # 352 "/usr/include/stdlib.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 358 "/usr/include/stdlib.h" 3 4 double strtod_l(const char * __restrict, char ** __restrict, locale_t); float strtof_l(const char * __restrict, char ** __restrict, locale_t); long double strtold_l(const char * __restrict, char ** __restrict, locale_t); long strtol_l(const char * __restrict, char ** __restrict, int, locale_t); unsigned long strtoul_l(const char * __restrict, char ** __restrict, int, locale_t); /* LONGLONG */ long long int strtoll_l(const char * __restrict, char ** __restrict, int, locale_t); /* LONGLONG */ unsigned long long int strtoull_l(const char * __restrict, char ** __restrict, int, locale_t); # if defined(_NETBSD_SOURCE) quad_t strtoq_l(const char * __restrict, char ** __restrict, int, locale_t); u_quad_t strtouq_l(const char * __restrict, char ** __restrict, int, locale_t); size_t _mb_cur_max_l(locale_t); #define MB_CUR_MAX_L(loc) _mb_cur_max_l(loc) int mblen_l(const char *, size_t, locale_t); size_t mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); int wctomb_l(char *, wchar_t, locale_t); int mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); size_t wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, locale_t); # endif /* _NETBSD_SOURCE */ # 388 "/usr/include/stdlib.h" 3 4 #endif /* _POSIX_C_SOURCE >= 200809 || _NETBSD_SOURCE */ # 389 "/usr/include/stdlib.h" 3 4 __END_DECLS #endif /* !_STDLIB_H_ */ # 393 "/usr/include/stdlib.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if HAVE_ALLOCA_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #endif # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" /* * Declare functions and macros that may be missing in and * . */ #if !HAVE_SETENV int setenv(const char *, const char *, int); #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if !HAVE_MKSTEMP int mkstemp(char *); #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if !HAVE_MKDTEMP char *mkdtemp(char *); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if !HAVE_SETPROGNAME const char *getprogname(void); void setprogname(const char *); #endif # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if HAVE_WORKING_LONG_LONG # if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) long long strtoll(const char *, char **, int); # endif # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #else # 69 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" # define NO_LONG_LONG 1 #endif /* ! HAVE_WORKING_LONG_LONG */ # 71 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #if !HAVE_SHQUOTE size_t shquote(const char *, char *, size_t); #endif # 75 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" #endif /* !_NBCOMPAT_STDLIB_H_ */ # 77 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdlib.h" # 61 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 61 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" 1 /* $NetBSD: stdio.h,v 1.7 2015/06/08 00:44:46 joerg Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_STDIO_H_ #define _NBCOMPAT_STDIO_H_ #if HAVE_STDARG_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if HAVE_STDIO_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" # 1 "/usr/include/stdio.h" 1 3 4 /* $NetBSD: stdio.h,v 1.97 2016/03/17 00:42:49 christos Exp $ */ /*- * 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 */ #ifndef _STDIO_H_ #define _STDIO_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/stdio.h" 3 4 # 41 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 42 "/usr/include/stdio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/stdio.h" 3 4 # 43 "/usr/include/stdio.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 48 "/usr/include/stdio.h" 3 4 #ifdef _BSD_SSIZE_T_ typedef _BSD_SSIZE_T_ ssize_t; #undef _BSD_SSIZE_T_ #endif # 52 "/usr/include/stdio.h" 3 4 #if defined(_POSIX_C_SOURCE) #ifndef __VA_LIST_DECLARED typedef __va_list va_list; #define __VA_LIST_DECLARED #endif # 58 "/usr/include/stdio.h" 3 4 #endif # 59 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 60 "/usr/include/stdio.h" 3 4 # 61 "/usr/include/stdio.h" 3 4 /* * This is fairly grotesque, but pure ANSI code must not inspect the * innards of an fpos_t anyway. The library internally uses off_t, * which we assume is exactly as big as eight chars. */ typedef struct __sfpos { __off_t _pos; __mbstate_t _mbstate_in, _mbstate_out; } fpos_t; #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. * * NB: see WARNING above before changing the layout of this structure! */ typedef struct __sFILE { unsigned char *_p; /* current position in (some) buffer */ int _r; /* read space left for getc() */ int _w; /* write space left for putc() */ unsigned 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 (*_close)(void *); ssize_t (*_read) (void *, void *, size_t); __off_t (*_seek) (void *, __off_t, int); ssize_t (*_write)(void *, const void *, size_t); /* file extension */ struct __sbuf _ext; /* separate buffer for long sequences of ungetc() */ 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 */ int (*_flush)(void *); /* Formerly used by fgetln/fgetwln; kept for binary compatibility */ char _lb_unused[sizeof(struct __sbuf) - sizeof(int (*)(void *))]; /* Unix stdio files get aligned to block boundaries on fseek() */ int _blksize; /* stat.st_blksize (may be != _bf._size) */ __off_t _offset; /* current lseek offset */ } FILE; __BEGIN_DECLS extern FILE __sF[3]; __END_DECLS #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 /* _buf 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 */ /* * 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 */ #define FOPEN_MAX 20 /* must be <= OPEN_MAX */ #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 defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #define P_tmpdir "/var/tmp/" #endif # 198 "/usr/include/stdio.h" 3 4 #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ /* Always ensure that this is consistent with */ #ifndef TMP_MAX #define TMP_MAX 308915776 /* Legacy */ #endif # 203 "/usr/include/stdio.h" 3 4 /* Always ensure that these are consistent with and ! */ #ifndef SEEK_SET #define SEEK_SET 0 /* set file offset to offset */ #endif # 208 "/usr/include/stdio.h" 3 4 #ifndef SEEK_CUR #define SEEK_CUR 1 /* set file offset to current plus offset */ #endif # 211 "/usr/include/stdio.h" 3 4 #ifndef SEEK_END #define SEEK_END 2 /* set file offset to EOF plus offset */ #endif # 214 "/usr/include/stdio.h" 3 4 #define stdin (&__sF[0]) #define stdout (&__sF[1]) #define stderr (&__sF[2]) /* * Functions defined in ANSI C standard. */ __BEGIN_DECLS void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); char *fgets(char * __restrict, int, FILE * __restrict); FILE *fopen(const char * __restrict , const char * __restrict); int fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3); 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, ...) __scanflike(2, 3); int fseek(FILE *, long, int); long ftell(FILE *); size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict); int getc(FILE *); int getchar(void); void perror(const char *); int printf(const char * __restrict, ...) __printflike(1, 2); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); void rewind(FILE *); int scanf(const char * __restrict, ...) __scanflike(1, 2); void setbuf(FILE * __restrict, char * __restrict); int setvbuf(FILE * __restrict, char * __restrict, int, size_t); int sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3); FILE *tmpfile(void); int ungetc(int, FILE *); int vfprintf(FILE * __restrict, const char * __restrict, __va_list) __printflike(2, 0); int vprintf(const char * __restrict, __va_list) __printflike(1, 0); #ifndef __AUDIT__ char *gets(char *); int sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3); char *tmpnam(char *); int vsprintf(char * __restrict, const char * __restrict, __va_list) __printflike(2, 0); #endif # 275 "/usr/include/stdio.h" 3 4 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) int rename (const char *, const char *) __RENAME(__posix_rename); #else # 279 "/usr/include/stdio.h" 3 4 int rename (const char *, const char *); #endif # 281 "/usr/include/stdio.h" 3 4 __END_DECLS #ifndef __LIBC12_SOURCE__ int fgetpos(FILE * __restrict, fpos_t * __restrict) __RENAME(__fgetpos50); int fsetpos(FILE *, const fpos_t *) __RENAME(__fsetpos50); #endif # 287 "/usr/include/stdio.h" 3 4 /* * IEEE Std 1003.1-90 */ #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) #define L_ctermid 1024 /* size for ctermid(); PATH_MAX */ #define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */ __BEGIN_DECLS char *ctermid(char *); #ifndef __CUSERID_DECLARED #define __CUSERID_DECLARED /* also declared in unistd.h */ char *cuserid(char *); #endif /* __CUSERID_DECLARED */ # 302 "/usr/include/stdio.h" 3 4 FILE *fdopen(int, const char *); int fileno(FILE *); __END_DECLS #endif /* not ANSI */ # 306 "/usr/include/stdio.h" 3 4 /* * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) __BEGIN_DECLS void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); __END_DECLS #endif /* _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */ # 322 "/usr/include/stdio.h" 3 4 /* * Functions defined in POSIX 1003.2 and XPG2 or later. */ #if (_POSIX_C_SOURCE - 0) >= 2 || (_XOPEN_SOURCE - 0) >= 2 || \ defined(_NETBSD_SOURCE) __BEGIN_DECLS int pclose(FILE *); FILE *popen(const char *, const char *); __END_DECLS #endif # 333 "/usr/include/stdio.h" 3 4 #ifdef _NETBSD_SOURCE __BEGIN_DECLS FILE *popenve(const char *, char *const *, char *const *, const char *); __END_DECLS #endif # 338 "/usr/include/stdio.h" 3 4 /* * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later. */ #if ((__STDC_VERSION__ - 0) >= 199901L) || \ ((_POSIX_C_SOURCE - 0) >= 200112L) || \ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ ((_XOPEN_SOURCE - 0) >= 500) || \ defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) __BEGIN_DECLS 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); __END_DECLS #endif # 355 "/usr/include/stdio.h" 3 4 /* * Functions defined in XPG4.2. */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) __BEGIN_DECLS int getw(FILE *); int putw(int, FILE *); #ifndef __AUDIT__ char *tempnam(const char *, const char *); #endif # 367 "/usr/include/stdio.h" 3 4 __END_DECLS #endif # 369 "/usr/include/stdio.h" 3 4 /* * X/Open CAE Specification Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #ifndef off_t typedef __off_t off_t; #define off_t __off_t #endif /* off_t */ # 379 "/usr/include/stdio.h" 3 4 __BEGIN_DECLS int fseeko(FILE *, off_t, int); off_t ftello(FILE *); __END_DECLS #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || _XOPEN_SOURCE >= 500 || ... */ # 385 "/usr/include/stdio.h" 3 4 /* * Functions defined in ISO C99. Still put under _NETBSD_SOURCE due to * backward compatible. */ #if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) __BEGIN_DECLS int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); int vfscanf(FILE * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); __END_DECLS #endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */ # 401 "/usr/include/stdio.h" 3 4 /* * Routines that are purely local. */ #if defined(_NETBSD_SOURCE) #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 #define FPARSELN_UNESCCOMM 0x04 #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f __BEGIN_DECLS int asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); char *fgetln(FILE * __restrict, size_t * __restrict); char *fparseln(FILE *, size_t *, size_t *, const char[3], int); int fpurge(FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char ** __restrict, const char * __restrict, __va_list) __printflike(2, 0); const char *fmtcheck(const char *, const char *) __format_arg(2); __END_DECLS /* * Stdio function-access interface. */ __BEGIN_DECLS FILE *funopen(const void *, int (*)(void *, char *, int), int (*)(void *, const char *, int), off_t (*)(void *, off_t, int), int (*)(void *)); FILE *funopen2(const void *, ssize_t (*)(void *, void *, size_t), ssize_t (*)(void *, const void *, size_t), off_t (*)(void *, off_t, int), int (*)(void *), int (*)(void *)); __END_DECLS #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) #define fropen2(cookie, fn) funopen2(cookie, fn, 0, 0, 0, 0) #define fwopen2(cookie, fn) funopen2(cookie, 0, fn, 0, 0, 0) #endif /* _NETBSD_SOURCE */ # 449 "/usr/include/stdio.h" 3 4 /* * Functions internal to the implementation. */ __BEGIN_DECLS int __srget(FILE *); int __swbuf(int, FILE *); __END_DECLS /* * 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 defined(__GNUC__) && defined(__STDC__) static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return *_p->_p++ = (unsigned char)_c; else return __swbuf(_c, _p); } #else # 471 "/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 # 483 "/usr/include/stdio.h" 3 4 #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0) #define __sclearerr(p) ((void)((p)->_flags &= (unsigned short)~(__SERR|__SEOF))) #define __sfileno(p) \ ((p)->_file == -1 ? -1 : (int)(unsigned short)(p)->_file) #if !defined(__lint__) && !defined(__cplusplus) #if !defined(_REENTRANT) && !defined(_PTHREADS) #define feof(p) __sfeof(p) #define ferror(p) __sferror(p) #define clearerr(p) __sclearerr(p) #define getc(fp) __sgetc(fp) #define putc(x, fp) __sputc(x, fp) #endif /* !_REENTRANT && !_PTHREADS */ # 499 "/usr/include/stdio.h" 3 4 #define getchar() getc(stdin) #define putchar(x) putc(x, stdout) #endif /* !__lint__ && !__cplusplus */ # 504 "/usr/include/stdio.h" 3 4 #if (defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE)) && !defined(__cplusplus) #if !defined(_REENTRANT) && !defined(_PTHREADS) #define fileno(p) __sfileno(p) #endif /* !_REENTRANT && !_PTHREADS */ # 510 "/usr/include/stdio.h" 3 4 #endif /* !_ANSI_SOURCE && !__cplusplus*/ # 511 "/usr/include/stdio.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) __BEGIN_DECLS int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); int dprintf(int, const char * __restrict, ...) __printflike(2, 3); __END_DECLS #endif /* (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) */ # 520 "/usr/include/stdio.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) && !defined(__cplusplus) #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 /* _POSIX_C_SOURCE >= 199506 || _XOPEN_SOURCE >= 500 || _REENTRANT... */ # 529 "/usr/include/stdio.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \ defined(_NETBSD_SOURCE) __BEGIN_DECLS FILE *fmemopen(void * __restrict, size_t, const char * __restrict); FILE *open_memstream(char **, size_t *); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); __END_DECLS #endif # 540 "/usr/include/stdio.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 546 "/usr/include/stdio.h" 3 4 __BEGIN_DECLS int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...) __printflike(3, 4); int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) __printflike(3, 0); int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3); int vprintf_l(locale_t, const char * __restrict, __va_list) __printflike(2, 0); int asprintf_l(char ** __restrict, locale_t, const char * __restrict, ...) __printflike(3, 4); int vasprintf_l(char ** __restrict, locale_t, const char * __restrict, __va_list) __printflike(3, 0); int vdprintf_l(int, locale_t, const char * __restrict, __va_list) __printflike(3, 0); int dprintf_l(int, locale_t, const char * __restrict, ...) __printflike(3, 4); int snprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, ...) __printflike(4, 5); int vsnprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, __va_list) __printflike(4, 0); #ifndef __AUDIT__ int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...) __printflike(3, 4); int vsprintf_l(char * __restrict, locale_t, const char * __restrict, __va_list) __printflike(3, 0); #endif # 574 "/usr/include/stdio.h" 3 4 int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...) __scanflike(3, 4); int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3); int sscanf_l(const char * __restrict, locale_t, const char * __restrict, ...) __scanflike(3, 4); int vscanf_l(locale_t, const char * __restrict, __va_list) __scanflike(2, 0); int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) __scanflike(3, 0); int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, __va_list) __scanflike(3, 0); #ifdef _NETBSD_SOURCE int snprintf_ss(char *restrict, size_t, const char * __restrict, ...) __printflike(3, 4); int vsnprintf_ss(char *restrict, size_t, const char * __restrict, __va_list) __printflike(3, 0); #endif # 593 "/usr/include/stdio.h" 3 4 __END_DECLS #endif # 595 "/usr/include/stdio.h" 3 4 #if _FORTIFY_SOURCE > 0 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 597 "/usr/include/stdio.h" 3 4 # 598 "/usr/include/stdio.h" 3 4 #endif # 599 "/usr/include/stdio.h" 3 4 #endif /* _STDIO_H_ */ # 601 "/usr/include/stdio.h" 3 4 # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" 2 #endif # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" /* * Declare functions and macros that may be missing in . */ #if !HAVE_FCLOSE_D int fclose(FILE *); #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_PCLOSE_D int pclose(FILE *); #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_FGETLN char *fgetln(FILE *, size_t *); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_GETDELIM ssize_t getdelim(char **, size_t *, int, FILE *); #endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_GETLINE ssize_t getline(char **, size_t *, FILE *); #endif # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_DECL_SNPRINTF int snprintf(char *, size_t, const char *, ...); int vsnprintf(char *, size_t, const char *, va_list); #endif # 71 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #if !HAVE_DECL_ASPRINTF int asprintf(char **, const char *, ...); int vasprintf(char **, const char *, va_list); #endif # 76 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" #endif /* !_NBCOMPAT_STDIO_H_ */ # 78 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/stdio.h" # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" 1 /* $NetBSD: string.h,v 1.3 2015/06/08 00:44:46 joerg Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_STRING_H_ #define _NBCOMPAT_STRING_H_ #if HAVE_STRING_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" # 1 "/usr/include/string.h" 1 3 4 /* $NetBSD: string.h,v 1.51 2016/10/12 20:01:22 christos Exp $ */ /*- * 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 */ #ifndef _STRING_H_ #define _STRING_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/string.h" 3 4 # 37 "/usr/include/string.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 42 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/string.h" 3 4 # 44 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/string.h" 3 4 # 46 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/string.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 47 "/usr/include/string.h" 2 3 4 __BEGIN_DECLS void *memchr(const void *, int, size_t); int memcmp(const void *, const void *, size_t); void *memcpy(void * __restrict, const void * __restrict, size_t); void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int); int strcmp(const char *, const char *); int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *); __aconst char *strerror(int); size_t strlen(const char *); char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); char *strpbrk(const char *, const char *); char *strrchr(const char *, int); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); char *strtok(char * __restrict, const char * __restrict); #if (_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500) || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) char *strtok_r(char *, const char *, char **); int strerror_r(int, char *, size_t); #endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */ # 75 "/usr/include/string.h" 3 4 size_t strxfrm(char * __restrict, const char * __restrict, size_t); #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) void *memccpy(void *, const void *, int, size_t); char *strdup(const char *); #endif # 81 "/usr/include/string.h" 3 4 #if (_POSIX_C_SOURCE - 0 >= 200809L) || (_XOPEN_SOURCE - 0 >= 700) || \ defined(_NETBSD_SOURCE) char *stpcpy(char * __restrict, const char * __restrict); char *stpncpy(char * __restrict, const char * __restrict, size_t); char *strndup(const char *, size_t); size_t strnlen(const char *, size_t); #ifndef __STRSIGNAL_DECLARED #define __STRSIGNAL_DECLARED /* also in unistd.h */ __aconst char *strsignal(int); #endif /* __STRSIGNAL_DECLARED */ # 93 "/usr/include/string.h" 3 4 #endif # 94 "/usr/include/string.h" 3 4 __END_DECLS #if defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include /* for backwards-compatibilty */ #endif /* expanded by -frewrite-includes */ # 97 "/usr/include/string.h" 3 4 # 1 "/usr/include/strings.h" 1 3 4 /* $NetBSD: strings.h,v 1.18 2011/08/22 01:24:15 dholland Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ #ifndef _STRINGS_H_ #define _STRINGS_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/strings.h" 3 4 # 36 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/strings.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 37 "/usr/include/strings.h" 2 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 42 "/usr/include/strings.h" 3 4 #if defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/strings.h" 3 4 # 45 "/usr/include/strings.h" 3 4 #endif # 46 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/strings.h" 3 4 # 48 "/usr/include/strings.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/strings.h" 3 4 # 50 "/usr/include/strings.h" 3 4 __BEGIN_DECLS int bcmp(const void *, const void *, size_t); void bcopy(const void *, void *, size_t); void bzero(void *, size_t); int ffs(int); char *index(const char *, int); unsigned int popcount(unsigned int) __constfunc; unsigned int popcountl(unsigned long) __constfunc; unsigned int popcountll(unsigned long long) __constfunc; unsigned int popcount32(__uint32_t) __constfunc; unsigned int popcount64(__uint64_t) __constfunc; char *rindex(const char *, int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); __END_DECLS #if defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 68 "/usr/include/strings.h" 3 4 # 1 "/usr/include/string.h" 1 3 4 /* $NetBSD: string.h,v 1.51 2016/10/12 20:01:22 christos Exp $ */ /*- * 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 */ #ifndef _STRING_H_ #define _STRING_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/string.h" 3 4 # 37 "/usr/include/string.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 42 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/string.h" 3 4 # 44 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/usr/include/string.h" 3 4 # 46 "/usr/include/string.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/string.h" 3 4 # 47 "/usr/include/string.h" 3 4 __BEGIN_DECLS void *memchr(const void *, int, size_t); int memcmp(const void *, const void *, size_t); void *memcpy(void * __restrict, const void * __restrict, size_t); void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int); int strcmp(const char *, const char *); int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *); __aconst char *strerror(int); size_t strlen(const char *); char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); char *strpbrk(const char *, const char *); char *strrchr(const char *, int); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); char *strtok(char * __restrict, const char * __restrict); #if (_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500) || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) char *strtok_r(char *, const char *, char **); int strerror_r(int, char *, size_t); #endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */ # 75 "/usr/include/string.h" 3 4 size_t strxfrm(char * __restrict, const char * __restrict, size_t); #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) void *memccpy(void *, const void *, int, size_t); char *strdup(const char *); #endif # 81 "/usr/include/string.h" 3 4 #if (_POSIX_C_SOURCE - 0 >= 200809L) || (_XOPEN_SOURCE - 0 >= 700) || \ defined(_NETBSD_SOURCE) char *stpcpy(char * __restrict, const char * __restrict); char *stpncpy(char * __restrict, const char * __restrict, size_t); char *strndup(const char *, size_t); size_t strnlen(const char *, size_t); #ifndef __STRSIGNAL_DECLARED #define __STRSIGNAL_DECLARED /* also in unistd.h */ __aconst char *strsignal(int); #endif /* __STRSIGNAL_DECLARED */ # 93 "/usr/include/string.h" 3 4 #endif # 94 "/usr/include/string.h" 3 4 __END_DECLS #if defined(_NETBSD_SOURCE) #if 0 /* expanded by -frewrite-includes */ #include /* for backwards-compatibilty */ #endif /* expanded by -frewrite-includes */ # 97 "/usr/include/string.h" 3 4 # 98 "/usr/include/string.h" 3 4 __BEGIN_DECLS void *memmem(const void *, size_t, const void *, size_t); char *strcasestr(const char *, const char *); char *strchrnul(const char *, int); size_t strlcat(char *, const char *, size_t); size_t strlcpy(char *, const char *, size_t); char *strsep(char **, const char *); char *stresep(char **, const char *, int); char *strnstr(const char *, const char *, size_t); void *memrchr(const void *, int, size_t); void *explicit_memset(void *, int, size_t); int consttime_memequal(const void *, const void *, size_t); __END_DECLS #endif # 112 "/usr/include/string.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 118 "/usr/include/string.h" 3 4 __BEGIN_DECLS int strcoll_l(const char *, const char *, locale_t); size_t strxfrm_l(char * __restrict, const char * __restrict, size_t, locale_t); __aconst char *strerror_l(int, locale_t); __END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ # 124 "/usr/include/string.h" 3 4 #if _FORTIFY_SOURCE > 0 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 126 "/usr/include/string.h" 3 4 # 127 "/usr/include/string.h" 3 4 #endif # 128 "/usr/include/string.h" 3 4 #endif /* !defined(_STRING_H_) */ # 129 "/usr/include/string.h" 3 4 # 69 "/usr/include/strings.h" 2 3 4 #endif # 70 "/usr/include/strings.h" 3 4 #if _FORTIFY_SOURCE > 0 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 72 "/usr/include/strings.h" 3 4 # 73 "/usr/include/strings.h" 3 4 #endif # 74 "/usr/include/strings.h" 3 4 #endif /* !defined(_STRINGS_H_) */ # 75 "/usr/include/strings.h" 3 4 # 98 "/usr/include/string.h" 2 3 4 __BEGIN_DECLS void *memmem(const void *, size_t, const void *, size_t); char *strcasestr(const char *, const char *); char *strchrnul(const char *, int); size_t strlcat(char *, const char *, size_t); size_t strlcpy(char *, const char *, size_t); char *strsep(char **, const char *); char *stresep(char **, const char *, int); char *strnstr(const char *, const char *, size_t); void *memrchr(const void *, int, size_t); void *explicit_memset(void *, int, size_t); int consttime_memequal(const void *, const void *, size_t); __END_DECLS #endif # 112 "/usr/include/string.h" 3 4 #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) # ifndef __LOCALE_T_DECLARED typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif # 118 "/usr/include/string.h" 3 4 __BEGIN_DECLS int strcoll_l(const char *, const char *, locale_t); size_t strxfrm_l(char * __restrict, const char * __restrict, size_t, locale_t); __aconst char *strerror_l(int, locale_t); __END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ # 124 "/usr/include/string.h" 3 4 #if _FORTIFY_SOURCE > 0 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 126 "/usr/include/string.h" 3 4 # 127 "/usr/include/string.h" 3 4 #endif # 128 "/usr/include/string.h" 3 4 #endif /* !defined(_STRING_H_) */ # 129 "/usr/include/string.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" /* * Declare functions and macros that may be missing in . */ #if !HAVE_DECL_STRDUP char *strdup(const char *); #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" #if !HAVE_STRERROR char *strerror(int); #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" #if !HAVE_STRLCAT size_t strlcat(char *, const char *, size_t); #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" #if !HAVE_STRLCPY size_t strlcpy(char *, const char *, size_t); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" #if !HAVE_STRSEP char *strsep(char **stringp, const char *delim); #endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" #endif /* !_NBCOMPAT_STRING_H_ */ # 64 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/string.h" # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 63 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" 1 /* $NetBSD: termcap.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_TERMCAP_H_ #define _NBCOMPAT_TERMCAP_H_ #if HAVE_TERMCAP_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" # 1 "/usr/include/termcap.h" 1 3 4 /* $NetBSD: termcap.h,v 1.2 2011/04/11 21:13:09 roy Exp $ */ /* * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. * * 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. */ #ifndef _TERMCAP_H_ #define _TERMCAP_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/termcap.h" 3 4 # 34 "/usr/include/termcap.h" 3 4 __BEGIN_DECLS /* Output functions. * These are still valid for terminfo. */ int putp(const char *); int tputs(const char *, int, int (*)(int)); extern short ospeed; extern char PC; extern char *BC; extern char *UP; int tgetent(char *, const char *); char * tgetstr(const char *, char **); int tgetflag(const char *); int tgetnum(const char *); char * tgoto(const char *, int, int); __END_DECLS #endif # 55 "/usr/include/termcap.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" /* * Declare macros and functions that may be missing in . */ #if !HAVE_TERMCAP_H int tgetent __P((char *, const char *)); char *tgetstr __P((const char *, char **)); int tgetflag __P((const char *)); int tgetnum __P((const char *)); char *tgoto __P((const char *, int, int)); void tputs __P((const char *, int, int (*)(int))); #endif # 51 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" #endif /* !_NBCOMPAT_TERMCAP_H_ */ # 53 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/termcap.h" # 64 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 64 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" 1 /* $NetBSD: time.h,v 1.3 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_TIME_H_ #define _NBCOMPAT_TIME_H_ #if TIME_WITH_SYS_TIME #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #else # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # if HAVE_SYS_TIME_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # else # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # endif # 44 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #endif # 45 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" /* * Declare functions and macros that may be missing in or * . */ #if !defined(timersub) # 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 # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #if !HAVE_UTIMES int utimes(const char *, const struct timeval *); #endif # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #if !HAVE_TIMEGM time_t timegm(struct tm *); #endif # 70 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" #endif /* !_NBCOMPAT_TIME_H_ */ # 72 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/time.h" # 65 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 65 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" 1 /* $NetBSD: tzfile.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_TZFILE_H_ #define _NBCOMPAT_TZFILE_H_ #if HAVE_TZFILE_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" # 1 "/usr/include/tzfile.h" 1 3 4 /* $NetBSD: tzfile.h,v 1.8 2015/07/11 16:40:53 christos Exp $ */ #ifndef _TZFILE_H_ #define _TZFILE_H_ /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. */ /* ** This header is for use ONLY with the time conversion code. ** There is no guarantee that it will remain unchanged, ** or that it will remain at all. ** Do NOT copy it to any system include directory. ** Thank you! */ /* ** Information about time zone files. */ #ifndef TZDIR /* Time zone object file directory */ #define TZDIR "/usr/share/zoneinfo" #endif /* !defined TZDIR */ # 26 "/usr/include/tzfile.h" 3 4 #ifndef TZDEFAULT #define TZDEFAULT "/etc/localtime" #endif /* !defined TZDEFAULT */ # 30 "/usr/include/tzfile.h" 3 4 #ifndef TZDEFRULES #define TZDEFRULES "posixrules" #endif /* !defined TZDEFRULES */ # 34 "/usr/include/tzfile.h" 3 4 /* ** Each file begins with. . . */ #define TZ_MAGIC "TZif" struct tzhead { char tzh_magic[4]; /* TZ_MAGIC */ char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */ char tzh_reserved[15]; /* reserved; must be zero */ char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ char tzh_leapcnt[4]; /* coded number of leap seconds */ char tzh_timecnt[4]; /* coded number of transition times */ char tzh_typecnt[4]; /* coded number of local time types */ char tzh_charcnt[4]; /* coded number of abbr. chars */ }; /* ** . . .followed by. . . ** ** tzh_timecnt (char [4])s coded transition times a la time(2) ** tzh_timecnt (unsigned char)s types of local time starting at above ** tzh_typecnt repetitions of ** one (char [4]) coded UT offset in seconds ** one (unsigned char) used to set tm_isdst ** one (unsigned char) that's an abbreviation list index ** tzh_charcnt (char)s '\0'-terminated zone abbreviations ** tzh_leapcnt repetitions of ** one (char [4]) coded leap second transition times ** one (char [4]) total correction after above ** tzh_ttisstdcnt (char)s indexed by type; if 1, transition ** time is standard time, if 0, ** transition time is wall clock time ** if absent, transition times are ** assumed to be wall clock time ** tzh_ttisgmtcnt (char)s indexed by type; if 1, transition ** time is UT, if 0, ** transition time is local time ** if absent, transition times are ** assumed to be local time */ /* ** If tzh_version is '2' or greater, the above is followed by a second instance ** of tzhead and a second instance of the data in which each coded transition ** time uses 8 rather than 4 chars, ** then a POSIX-TZ-environment-variable-style string for use in handling ** instants after the last transition time stored in the file ** (with nothing between the newlines if there is no POSIX representation for ** such instants). ** ** If tz_version is '3' or greater, the above is extended as follows. ** First, the POSIX TZ string's hour offset may range from -167 ** through 167 as compared to the POSIX-required 0 through 24. ** Second, its DST start time may be January 1 at 00:00 and its stop ** time December 31 at 24:00 plus the difference between DST and ** standard time, indicating DST all year. */ /* ** In the current implementation, "tzset()" refuses to deal with files that ** exceed any of the limits below. */ #ifndef TZ_MAX_TIMES #define TZ_MAX_TIMES 2000 #endif /* !defined TZ_MAX_TIMES */ # 103 "/usr/include/tzfile.h" 3 4 #ifndef TZ_MAX_TYPES /* This must be at least 17 for Europe/Samara and Europe/Vilnius. */ #define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ #endif /* !defined TZ_MAX_TYPES */ # 108 "/usr/include/tzfile.h" 3 4 #ifndef TZ_MAX_CHARS #define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ /* (limited by what unsigned chars can hold) */ #endif /* !defined TZ_MAX_CHARS */ # 113 "/usr/include/tzfile.h" 3 4 #ifndef TZ_MAX_LEAPS #define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ #endif /* !defined TZ_MAX_LEAPS */ # 117 "/usr/include/tzfile.h" 3 4 #define SECSPERMIN 60 #define MINSPERHOUR 60 #define HOURSPERDAY 24 #define DAYSPERWEEK 7 #define DAYSPERNYEAR 365 #define DAYSPERLYEAR 366 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) #define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) #define MONSPERYEAR 12 #define TM_SUNDAY 0 #define TM_MONDAY 1 #define TM_TUESDAY 2 #define TM_WEDNESDAY 3 #define TM_THURSDAY 4 #define TM_FRIDAY 5 #define TM_SATURDAY 6 #define TM_JANUARY 0 #define TM_FEBRUARY 1 #define TM_MARCH 2 #define TM_APRIL 3 #define TM_MAY 4 #define TM_JUNE 5 #define TM_JULY 6 #define TM_AUGUST 7 #define TM_SEPTEMBER 8 #define TM_OCTOBER 9 #define TM_NOVEMBER 10 #define TM_DECEMBER 11 #define TM_YEAR_BASE 1900 #define EPOCH_YEAR 1970 #define EPOCH_WDAY TM_THURSDAY #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) /* ** Since everything in isleap is modulo 400 (or a factor of 400), we know that ** isleap(y) == isleap(y % 400) ** and so ** isleap(a + b) == isleap((a + b) % 400) ** or ** isleap(a + b) == isleap(a % 400 + b % 400) ** This is true even if % means modulo rather than Fortran remainder ** (which is allowed by C89 but not C99). ** We use this to avoid addition overflow problems. */ #define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) #endif /* !defined _TZFILE_H_ */ # 171 "/usr/include/tzfile.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" /* * Declare functions and macros that may be missing in . */ #ifndef DAYSPERNYEAR # define DAYSPERNYEAR 365 #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef EPOCH_YEAR # define EPOCH_YEAR 1970 #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef HOURSPERDAY # define HOURSPERDAY 24 #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef MINSPERHOUR # define MINSPERHOUR 60 #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef SECSPERHOUR # define SECSPERHOUR 3600 #endif # 62 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef SECSPERMIN # define SECSPERMIN 60 #endif # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef SECSPERDAY # define SECSPERDAY 86400 #endif # 70 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #ifndef TM_YEAR_BASE # define TM_YEAR_BASE 1900 #endif # 74 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" #endif /* !_NBCOMPAT_TZFILE_H_ */ # 76 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/tzfile.h" # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" 1 /* $NetBSD: unistd.h,v 1.4 2008/04/29 05:46:08 martin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_UNISTD_H_ #define _NBCOMPAT_UNISTD_H_ #if HAVE_UNISTD_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" # 1 "/usr/include/unistd.h" 1 3 4 /* $NetBSD: unistd.h,v 1.147 2016/06/30 15:29:20 dholland Exp $ */ /*- * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Klaus Klein. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 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. */ /* * 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 */ #ifndef _UNISTD_H_ #define _UNISTD_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 66 "/usr/include/unistd.h" 3 4 # 67 "/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 67 "/usr/include/unistd.h" 3 4 # 68 "/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 68 "/usr/include/unistd.h" 3 4 # 69 "/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 69 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 70 "/usr/include/unistd.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 70 "/usr/include/unistd.h" 3 4 # 71 "/usr/include/unistd.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 71 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/sys/unistd.h" 1 3 4 /* $NetBSD: unistd.h,v 1.61 2016/08/04 06:43:43 christos Exp $ */ /* * 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 */ #ifndef _SYS_UNISTD_H_ #define _SYS_UNISTD_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/unistd.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/sys/unistd.h" 2 3 4 /* compile-time symbolic constants */ #define _POSIX_JOB_CONTROL 1 /* implementation supports job control */ /* * According to POSIX 1003.1: * "The saved set-user-ID capability allows a program to regain the * effective user ID established at the last exec call." * However, the setuid/setgid function as specified by POSIX 1003.1 does * not allow changing the effective ID from the super-user without also * changed the saved ID, so it is impossible to get super-user privileges * back later. Instead we provide this feature independent of the current * effective ID through the seteuid/setegid function. In addition, we do * not use the saved ID as specified by POSIX 1003.1 in setuid/setgid, * because this would make it impossible for a set-user-ID executable * owned by a user other than the super-user to permanently revoke its * extra privileges. */ #ifdef _NOT_AVAILABLE #define _POSIX_SAVED_IDS 1 /* saved set-user-ID and set-group-ID */ #endif # 61 "/usr/include/sys/unistd.h" 3 4 #define _POSIX_VERSION 200112L #define _POSIX2_VERSION 200112L /* * We support the posix_spawn() family of functions (unconditionally). */ #define _POSIX_SPAWN 200809L /* execution-time symbolic constants */ /* * 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. */ /* Advisory information */ #undef _POSIX_ADVISORY_INFO /* asynchronous I/O is available */ #define _POSIX_ASYNCHRONOUS_IO 200112L /* barriers */ #define _POSIX_BARRIERS 200112L /* chown requires correct privileges */ #define _POSIX_CHOWN_RESTRICTED 1 /* clock selection */ #define _POSIX_CLOCK_SELECTION -1 /* cputime clock */ #define _POSIX_CPUTIME 200112L /* CPU type */ #undef _POSIX_CPUTYPE /* file synchronization is available */ #define _POSIX_FSYNC 1 /* support IPv6 */ #define _POSIX_IPV6 0 /* job control is available */ #define _POSIX_JOB_CONTROL 1 /* memory mapped files */ #define _POSIX_MAPPED_FILES 1 /* memory locking whole address space */ #define _POSIX_MEMLOCK 1 /* memory locking address ranges */ #define _POSIX_MEMLOCK_RANGE 1 /* memory access protections */ #define _POSIX_MEMORY_PROTECTION 1 /* message passing is available */ #define _POSIX_MESSAGE_PASSING 200112L /* monotonic clock */ #define _POSIX_MONOTONIC_CLOCK 200112L /* too-long path comp generate errors */ #define _POSIX_NO_TRUNC 1 /* prioritized I/O */ #define _POSIX_PRIORITIZED_IO -1 /* priority scheduling */ #define _POSIX_PRIORITY_SCHEDULING 200112L /* raw sockets */ #define _POSIX_RAW_SOCKETS 200112L /* read/write locks */ #define _POSIX_READER_WRITER_LOCKS 200112L /* realtime signals */ #undef _POSIX_REALTIME_SIGNALS /* regular expressions */ #define _POSIX_REGEXP 1 /* semaphores */ #define _POSIX_SEMAPHORES 0 /* shared memory objects */ #define _POSIX_SHARED_MEMORY_OBJECTS 0 /* shell */ #define _POSIX_SHELL 1 /* spin locks */ #define _POSIX_SPIN_LOCKS 200112L /* sporadic server */ #undef _POSIX_SPORADIC_SERVER /* synchronized I/O is available */ #define _POSIX_SYNCHRONIZED_IO 1 /* threads */ #define _POSIX_THREADS 200112L /* pthread_attr for stack size */ #define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* pthread_attr for stack address */ #define _POSIX_THREAD_ATTR_STACKADDR 200112L /* thread cputime clock */ #define _POSIX_THREAD_CPUTIME 200112L /* _r functions */ #define _POSIX_THREAD_PRIO_PROTECT 200112L /* PTHREAD_PRIO_PROTECT */ #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L /* timeouts */ #undef _POSIX_TIMEOUTS /* timers */ #define _POSIX_TIMERS 200112L /* typed memory objects */ #undef _POSIX_TYPED_MEMORY_OBJECTS /* may disable terminal spec chars */ #define _POSIX_VDISABLE __CAST(unsigned char, '\377') /* C binding */ #define _POSIX2_C_BIND 200112L /* XPG4.2 shared memory */ #define _XOPEN_SHM 0 /* 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) */ #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 */ #if defined(_NETBSD_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 /* * fsync_range values. * * Note the following flag values were chosen to not overlap * values for SEEK_XXX flags. While not currently implemented, * it is possible to extend this call to respect SEEK_CUR and * SEEK_END offset addressing modes. */ #define FDATASYNC 0x0010 /* sync data and minimal metadata */ #define FFILESYNC 0x0020 /* sync data and metadata */ #define FDISKSYNC 0x0040 /* flush disk caches after sync */ #endif # 200 "/usr/include/sys/unistd.h" 3 4 /* configurable pathname variables; use as argument to pathconf(3) */ #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 #define _PC_SYNC_IO 10 #define _PC_FILESIZEBITS 11 #define _PC_SYMLINK_MAX 12 #define _PC_2_SYMLINKS 13 #define _PC_ACL_EXTENDED 14 /* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */ #define _PC_MIN_HOLE_SIZE 15 /* configurable system variables; use as argument to sysconf(3) */ /* * XXX The value of _SC_CLK_TCK is embedded in . * XXX The value of _SC_PAGESIZE is embedded in . */ #define _SC_ARG_MAX 1 #define _SC_CHILD_MAX 2 #define _O_SC_CLK_TCK 3 /* Old version, always 100 */ #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 #define _SC_BC_DIM_MAX 10 #define _SC_BC_SCALE_MAX 11 #define _SC_BC_STRING_MAX 12 #define _SC_COLL_WEIGHTS_MAX 13 #define _SC_EXPR_NEST_MAX 14 #define _SC_LINE_MAX 15 #define _SC_RE_DUP_MAX 16 #define _SC_2_VERSION 17 #define _SC_2_C_BIND 18 #define _SC_2_C_DEV 19 #define _SC_2_CHAR_TERM 20 #define _SC_2_FORT_DEV 21 #define _SC_2_FORT_RUN 22 #define _SC_2_LOCALEDEF 23 #define _SC_2_SW_DEV 24 #define _SC_2_UPE 25 #define _SC_STREAM_MAX 26 #define _SC_TZNAME_MAX 27 #define _SC_PAGESIZE 28 #define _SC_PAGE_SIZE _SC_PAGESIZE /* 1170 compatibility */ #define _SC_FSYNC 29 #define _SC_XOPEN_SHM 30 #define _SC_SYNCHRONIZED_IO 31 #define _SC_IOV_MAX 32 #define _SC_MAPPED_FILES 33 #define _SC_MEMLOCK 34 #define _SC_MEMLOCK_RANGE 35 #define _SC_MEMORY_PROTECTION 36 #define _SC_LOGIN_NAME_MAX 37 #define _SC_MONOTONIC_CLOCK 38 #define _SC_CLK_TCK 39 /* New, variable version */ #define _SC_ATEXIT_MAX 40 #define _SC_THREADS 41 #define _SC_SEMAPHORES 42 #define _SC_BARRIERS 43 #define _SC_TIMERS 44 #define _SC_SPIN_LOCKS 45 #define _SC_READER_WRITER_LOCKS 46 #define _SC_GETGR_R_SIZE_MAX 47 #define _SC_GETPW_R_SIZE_MAX 48 #define _SC_CLOCK_SELECTION 49 #define _SC_ASYNCHRONOUS_IO 50 #define _SC_AIO_LISTIO_MAX 51 #define _SC_AIO_MAX 52 #define _SC_MESSAGE_PASSING 53 #define _SC_MQ_OPEN_MAX 54 #define _SC_MQ_PRIO_MAX 55 #define _SC_PRIORITY_SCHEDULING 56 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 57 #define _SC_THREAD_KEYS_MAX 58 #define _SC_THREAD_STACK_MIN 59 #define _SC_THREAD_THREADS_MAX 60 #define _SC_THREAD_ATTR_STACKADDR 61 #define _SC_THREAD_ATTR_STACKSIZE 62 #define _SC_THREAD_PRIORITY_SCHEDULING 63 #define _SC_THREAD_PRIO_INHERIT 64 #define _SC_THREAD_PRIO_PROTECT 65 #define _SC_THREAD_PROCESS_SHARED 66 #define _SC_THREAD_SAFE_FUNCTIONS 67 #define _SC_TTY_NAME_MAX 68 #define _SC_HOST_NAME_MAX 69 #define _SC_PASS_MAX 70 #define _SC_REGEXP 71 #define _SC_SHELL 72 #define _SC_SYMLOOP_MAX 73 /* Actually, they are not supported or implemented yet */ #define _SC_V6_ILP32_OFF32 74 #define _SC_V6_ILP32_OFFBIG 75 #define _SC_V6_LP64_OFF64 76 #define _SC_V6_LPBIG_OFFBIG 77 #define _SC_2_PBS 80 #define _SC_2_PBS_ACCOUNTING 81 #define _SC_2_PBS_CHECKPOINT 82 #define _SC_2_PBS_LOCATE 83 #define _SC_2_PBS_MESSAGE 84 #define _SC_2_PBS_TRACK 85 /* These are implemented */ #define _SC_SPAWN 86 #define _SC_SHARED_MEMORY_OBJECTS 87 #define _SC_TIMER_MAX 88 #define _SC_SEM_NSEMS_MAX 89 #define _SC_CPUTIME 90 #define _SC_THREAD_CPUTIME 91 #define _SC_DELAYTIMER_MAX 92 #define _SC_SIGQUEUE_MAX 93 #define _SC_REALTIME_SIGNALS 94 /* Extensions found in Solaris and Linux. */ #define _SC_PHYS_PAGES 121 #ifdef _NETBSD_SOURCE /* Commonly provided sysconf() extensions */ #define _SC_NPROCESSORS_CONF 1001 #define _SC_NPROCESSORS_ONLN 1002 /* Native variables */ #define _SC_SCHED_RT_TS 2001 #define _SC_SCHED_PRI_MIN 2002 #define _SC_SCHED_PRI_MAX 2003 #endif /* _NETBSD_SOURCE */ # 336 "/usr/include/sys/unistd.h" 3 4 /* configurable system strings */ #define _CS_PATH 1 #endif /* !_SYS_UNISTD_H_ */ # 341 "/usr/include/sys/unistd.h" 3 4 # 72 "/usr/include/unistd.h" 2 3 4 #if _FORTIFY_SOURCE > 0 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 74 "/usr/include/unistd.h" 3 4 # 75 "/usr/include/unistd.h" 3 4 #endif # 76 "/usr/include/unistd.h" 3 4 /* * IEEE Std 1003.1-90 */ #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 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 84 "/usr/include/unistd.h" 3 4 # 85 "/usr/include/unistd.h" 3 4 __BEGIN_DECLS __dead void _exit(int); int access(const char *, int); unsigned int alarm(unsigned int); int chdir(const char *); #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) int chown(const char *, uid_t, gid_t) __RENAME(__posix_chown); #else # 94 "/usr/include/unistd.h" 3 4 int chown(const char *, uid_t, gid_t); #endif /* defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) */ # 96 "/usr/include/unistd.h" 3 4 int close(int); size_t confstr(int, char *, size_t); #ifndef __CUSERID_DECLARED #define __CUSERID_DECLARED /* also declared in stdio.h */ char *cuserid(char *); /* obsolete */ #endif /* __CUSERID_DECLARED */ # 103 "/usr/include/unistd.h" 3 4 int dup(int); int dup2(int, int); int execl(const char *, const char *, ...); int execle(const char *, const char *, ...); int execlp(const char *, const char *, ...); 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); #if __SSP_FORTIFY_LEVEL == 0 char *getcwd(char *, size_t); #endif # 116 "/usr/include/unistd.h" 3 4 gid_t getegid(void); uid_t geteuid(void); gid_t getgid(void); int getgroups(int, gid_t []); __aconst char *getlogin(void); int getlogin_r(char *, size_t); 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 *); long pathconf(const char *, int); int pause(void); int pipe(int *); #if __SSP_FORTIFY_LEVEL == 0 ssize_t read(int, void *, size_t); #endif # 134 "/usr/include/unistd.h" 3 4 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); __aconst char *ttyname(int); int unlink(const char *); ssize_t write(int, const void *, size_t); /* * IEEE Std 1003.2-92, adopted in X/Open Portability Guide Issue 4 and later */ #if (_POSIX_C_SOURCE - 0) >= 2 || defined(_XOPEN_SOURCE) || \ defined(_NETBSD_SOURCE) int getopt(int, char * const [], const char *); extern char *optarg; /* getopt(3) external variables */ extern int opterr; extern int optind; extern int optopt; #endif # 160 "/usr/include/unistd.h" 3 4 /* * The Open Group Base Specifications, Issue 5; IEEE Std 1003.1-2001 (POSIX) */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) #if __SSP_FORTIFY_LEVEL == 0 ssize_t readlink(const char * __restrict, char * __restrict, size_t); #endif # 169 "/usr/include/unistd.h" 3 4 #endif # 170 "/usr/include/unistd.h" 3 4 /* * The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX) */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \ defined(_NETBSD_SOURCE) int setegid(gid_t); int seteuid(uid_t); #endif # 179 "/usr/include/unistd.h" 3 4 /* * The following three syscalls are also defined in * We protect them against double declarations. */ #ifndef __OFF_T_SYSCALLS_DECLARED #define __OFF_T_SYSCALLS_DECLARED off_t lseek(int, off_t, int); int truncate(const char *, off_t); /* * IEEE Std 1003.1b-93, * also found in X/Open Portability Guide >= Issue 4 Verion 2 */ #if (_POSIX_C_SOURCE - 0) >= 199309L || \ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) int ftruncate(int, off_t); #endif # 197 "/usr/include/unistd.h" 3 4 #endif /* __OFF_T_SYSCALLS_DECLARED */ # 198 "/usr/include/unistd.h" 3 4 /* * IEEE Std 1003.1b-93, adopted in X/Open CAE Specification Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) int fdatasync(int); int fsync(int); #endif # 208 "/usr/include/unistd.h" 3 4 /* * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_REENTRANT) || defined(_NETBSD_SOURCE) int ttyname_r(int, char *, size_t); int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); #endif # 218 "/usr/include/unistd.h" 3 4 /* * X/Open Portability Guide, all issues */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) int chroot(const char *); int nice(int); #endif # 226 "/usr/include/unistd.h" 3 4 /* * X/Open Portability Guide >= Issue 4 */ #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) __aconst char *crypt(const char *, const char *); int encrypt(char *, int); char *getpass(const char *); pid_t getsid(pid_t); #endif # 237 "/usr/include/unistd.h" 3 4 /* * X/Open Portability Guide >= Issue 4 Version 2 */ #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #ifndef intptr_t typedef __intptr_t intptr_t; #define intptr_t __intptr_t #endif # 248 "/usr/include/unistd.h" 3 4 #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 int brk(void *); int fchdir(int); #if defined(_XOPEN_SOURCE) int fchown(int, uid_t, gid_t) __RENAME(__posix_fchown); #else # 259 "/usr/include/unistd.h" 3 4 int fchown(int, uid_t, gid_t); #endif # 261 "/usr/include/unistd.h" 3 4 int getdtablesize(void); long gethostid(void); int gethostname(char *, size_t); __pure int getpagesize(void); /* legacy */ pid_t getpgid(pid_t); #if defined(_XOPEN_SOURCE) int lchown(const char *, uid_t, gid_t) __RENAME(__posix_lchown); #else # 270 "/usr/include/unistd.h" 3 4 int lchown(const char *, uid_t, gid_t); #endif # 272 "/usr/include/unistd.h" 3 4 int lockf(int, int, off_t); void *sbrk(intptr_t); /* XXX prototype wrong! */ int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */ int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); void swab(const void * __restrict, void * __restrict, ssize_t); int symlink(const char *, const char *); void sync(void); useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t); #ifndef __LIBC12_SOURCE__ pid_t vfork(void) __RENAME(__vfork14) __returns_twice; #endif # 286 "/usr/include/unistd.h" 3 4 #ifndef __AUDIT__ char *getwd(char *); /* obsoleted by getcwd() */ #endif # 290 "/usr/include/unistd.h" 3 4 #endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */ # 291 "/usr/include/unistd.h" 3 4 /* * X/Open CAE Specification Issue 5 Version 2 */ #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 500 || \ defined(_NETBSD_SOURCE) ssize_t pread(int, void *, size_t, off_t); ssize_t pwrite(int, const void *, size_t, off_t); #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ # 301 "/usr/include/unistd.h" 3 4 /* * X/Open Extended API set 2 (a.k.a. C063) */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) int linkat(int, const char *, int, const char *, int); int renameat(int, const char *, int, const char *); int faccessat(int, const char *, int, int); int fchownat(int, const char *, uid_t, gid_t, int); ssize_t readlinkat(int, const char *, char *, size_t); int symlinkat(const char *, int, const char *); int unlinkat(int, const char *, int); #endif # 315 "/usr/include/unistd.h" 3 4 #if defined(_INCOMPLETE_XOPEN_C063) int fexecve(int, char * const *, char * const *); #endif # 318 "/usr/include/unistd.h" 3 4 /* * Implementation-defined extensions */ #if defined(_NETBSD_SOURCE) int acct(const char *); int closefrom(int); int des_cipher(const char *, char *, long, int); int des_setkey(const char *); int dup3(int, int, int); void endusershell(void); int exect(const char *, char * const *, char * const *); int execvpe(const char *, char * const *, char * const *); int execlpe(const char *, const char *, ...); int fchroot(int); int fdiscard(int, off_t, off_t); int fsync_range(int, int, off_t, off_t); int getdomainname(char *, size_t); int getgrouplist(const char *, gid_t, gid_t *, int *); int getgroupmembership(const char *, gid_t, gid_t *, int, int *); mode_t getmode(const void *, mode_t); char *getpassfd(const char *, char *, size_t, int *, int, int); #define GETPASS_NEED_TTY 0x001 /* Fail if we cannot set tty */ #define GETPASS_FAIL_EOF 0x002 /* Fail on EOF */ #define GETPASS_BUF_LIMIT 0x004 /* beep on buffer limit */ #define GETPASS_NO_SIGNAL 0x008 /* don't make ttychars send signals */ #define GETPASS_NO_BEEP 0x010 /* don't beep */ #define GETPASS_ECHO 0x020 /* echo characters as they are typed */ #define GETPASS_ECHO_STAR 0x040 /* echo '*' for each character */ #define GETPASS_7BIT 0x080 /* mask the high bit each char */ #define GETPASS_FORCE_LOWER 0x100 /* lowercase each char */ #define GETPASS_FORCE_UPPER 0x200 /* uppercase each char */ #define GETPASS_ECHO_NL 0x400 /* echo a newline if successful */ char *getpass_r(const char *, char *, size_t); int getpeereid(int, uid_t *, gid_t *); int getsubopt(char **, char * const *, char **); __aconst char *getusershell(void); int initgroups(const char *, gid_t); int iruserok(uint32_t, int, const char *, const char *); int issetugid(void); int mkstemps(char *, int); int nfssvc(int, void *); int pipe2(int *, int); int profil(char *, size_t, unsigned long, unsigned int); #ifndef __PSIGNAL_DECLARED #define __PSIGNAL_DECLARED /* also in signal.h */ void psignal(int, const char *); #endif /* __PSIGNAL_DECLARED */ # 369 "/usr/include/unistd.h" 3 4 int rcmd(char **, int, const char *, const char *, const char *, int *); int reboot(int, char *); int revoke(const char *); int rresvport(int *); int ruserok(const char *, int, const char *, const char *); int setdomainname(const char *, size_t); int setgroups(int, const gid_t *); int sethostid(long); int sethostname(const char *, size_t); int setlogin(const char *); void *setmode(const char *); int setrgid(gid_t); int setruid(uid_t); void setusershell(void); void strmode(mode_t, char *); #ifndef __STRSIGNAL_DECLARED #define __STRSIGNAL_DECLARED /* backwards-compatibility; also in string.h */ __aconst char *strsignal(int); #endif /* __STRSIGNAL_DECLARED */ # 389 "/usr/include/unistd.h" 3 4 int swapctl(int, void *, int); int swapon(const char *); /* obsoleted by swapctl() */ int syscall(int, ...); quad_t __syscall(quad_t, ...); int undelete(const char *); #if 1 /*INET6*/ int rcmd_af(char **, int, const char *, const char *, const char *, int *, int); int rresvport_af(int *, int); int rresvport_af_addr(int *, int, void *); int iruserok_sa(const void *, int, int, const char *, const char *); #endif # 402 "/usr/include/unistd.h" 3 4 #ifndef __SYS_SIGLIST_DECLARED #define __SYS_SIGLIST_DECLARED /* also in signal.h */ extern const char *const *sys_siglist __RENAME(__sys_siglist14); #endif /* __SYS_SIGLIST_DECLARED */ # 408 "/usr/include/unistd.h" 3 4 extern int optreset; /* getopt(3) external variable */ extern char *suboptarg; /* getsubopt(3) external variable */ #endif # 411 "/usr/include/unistd.h" 3 4 __END_DECLS #endif /* !_UNISTD_H_ */ # 414 "/usr/include/unistd.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" /* * Declare functions and macros that may be missing in . */ #if !HAVE_DECL_OPTARG extern char *optarg; #endif # 46 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_DECL_OPTIND extern int optind; #endif # 50 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_DECL_OPTRESET extern int optreset; #endif # 54 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_GETPASS_D char *getpass(const char *); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" /* * If getpassphrase() exists, then use it in place of getpass(). */ #if HAVE_GETPASSPHRASE # ifndef getpass # define getpass getpassphrase # endif # 66 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #endif # 67 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_LCHOWN int lchown(const char *, uid_t, gid_t); #endif # 71 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_GETMODE mode_t getmode(const void *, mode_t); #endif # 75 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_SETMODE void *setmode(const char *); #endif # 79 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #if !HAVE_STRMODE void strmode(mode_t, char *); #endif # 83 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" #endif /* !_NBCOMPAT_UNISTD_H_ */ # 85 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/unistd.h" # 67 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 67 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" 1 /* $NetBSD: util.h,v 1.3 2014/07/25 13:26:24 jperkin Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Johnny C. Lam. * * 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. */ #ifndef _NBCOMPAT_UTIL_H_ #define _NBCOMPAT_UTIL_H_ #if HAVE_UTIL_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" # 1 "/usr/include/util.h" 1 3 4 /* $NetBSD: util.h,v 1.69 2016/04/10 19:05:50 roy Exp $ */ /*- * Copyright (c) 1995 * 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. */ #ifndef _UTIL_H_ #define _UTIL_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/util.h" 3 4 # 36 "/usr/include/util.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/util.h" 3 4 # 37 "/usr/include/util.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/util.h" 3 4 # 38 "/usr/include/util.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/util.h" 3 4 # 39 "/usr/include/util.h" 3 4 #ifdef _BSD_TIME_T_ typedef _BSD_TIME_T_ time_t; #undef _BSD_TIME_T_ #endif # 44 "/usr/include/util.h" 3 4 #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif # 48 "/usr/include/util.h" 3 4 #if defined(_POSIX_C_SOURCE) #ifndef __VA_LIST_DECLARED typedef __va_list va_list; #define __VA_LIST_DECLARED #endif # 54 "/usr/include/util.h" 3 4 #endif # 55 "/usr/include/util.h" 3 4 #define PIDLOCK_NONBLOCK 1 #define PIDLOCK_USEHOSTNAME 2 #define PW_POLICY_BYSTRING 0 #define PW_POLICY_BYPASSWD 1 #define PW_POLICY_BYGROUP 2 __BEGIN_DECLS struct disklabel; struct iovec; struct passwd; struct termios; struct utmp; struct utmpx; struct winsize; struct sockaddr; char *flags_to_string(unsigned long, const char *); pid_t forkpty(int *, char *, struct termios *, struct winsize *); const char *getbootfile(void); int getbyteorder(void); off_t getlabeloffset(void); int getlabelsector(void); int getlabelusesmbr(void); int getmaxpartitions(void); int getrawpartition(void); const char *getdiskrawname(char *, size_t, const char *); const char *getdiskcookedname(char *, size_t, const char *); const char *getfstypename(int); const char *getfsspecname(char *, size_t, const char *); struct kinfo_vmentry *kinfo_getvmmap(pid_t, size_t *); #ifndef __LIBC12_SOURCE__ void login(const struct utmp *) __RENAME(__login50); void loginx(const struct utmpx *) __RENAME(__loginx50); #endif # 91 "/usr/include/util.h" 3 4 int login_tty(int); int logout(const char *); int logoutx(const char *, int, int); void logwtmp(const char *, const char *, const char *); void logwtmpx(const char *, const char *, const char *, int, int); int opendisk(const char *, int, char *, size_t, int); int opendisk1(const char *, int, char *, size_t, int, int (*)(const char *, int, ...)); int openpty(int *, int *, char *, struct termios *, struct winsize *); #ifndef __LIBC12_SOURCE__ time_t parsedate(const char *, const time_t *, const int *) __RENAME(__parsedate50); #endif # 105 "/usr/include/util.h" 3 4 int pidfile(const char *); pid_t pidfile_lock(const char *); pid_t pidfile_read(const char *); int pidfile_clean(void); int pidlock(const char *, int, pid_t *, const char *); int pw_abort(void); #ifndef __LIBC12_SOURCE__ void pw_copy(int, int, struct passwd *, struct passwd *) __RENAME(__pw_copy50); int pw_copyx(int, int, struct passwd *, struct passwd *, char *, size_t) __RENAME(__pw_copyx50); #endif # 117 "/usr/include/util.h" 3 4 void pw_edit(int, const char *); __dead void pw_error(const char *, int, int); void pw_getconf(char *, size_t, const char *, const char *); #ifndef __LIBC12_SOURCE__ void pw_getpwconf(char *, size_t, const struct passwd *, const char *) __RENAME(__pw_getpwconf50); #endif # 124 "/usr/include/util.h" 3 4 const char *pw_getprefix(void); void pw_init(void); int pw_lock(int); int pw_mkdb(const char *, int); void pw_prompt(void); int pw_setprefix(const char *); int raise_default_signal(int); int secure_path(const char *); int snprintb_m(char *, size_t, const char *, uint64_t, size_t); int snprintb(char *, size_t, const char *, uint64_t); int sockaddr_snprintf(char *, size_t, const char *, const struct sockaddr *); char *strpct(char *, size_t, uintmax_t, uintmax_t, size_t); char *strspct(char *, size_t, intmax_t, intmax_t, size_t); int string_to_flags(char **, unsigned long *, unsigned long *); int ttyaction(const char *, const char *, const char *); int ttylock(const char *, int, pid_t *); char *ttymsg(struct iovec *, int, const char *, int); int ttyunlock(const char *); uint16_t disklabel_dkcksum(struct disklabel *); int disklabel_scan(struct disklabel *, char *, size_t); /* Error checked functions */ void (*esetfunc(void (*)(int, const char *, ...))) (int, const char *, ...); size_t estrlcpy(char *, const char *, size_t); size_t estrlcat(char *, const char *, size_t); char *estrdup(const char *); char *estrndup(const char *, size_t); intmax_t estrtoi(const char *, int, intmax_t, intmax_t); uintmax_t estrtou(const char *, int, uintmax_t, uintmax_t); void *ecalloc(size_t, size_t); void *emalloc(size_t); void *erealloc(void *, size_t); void ereallocarr(void *, size_t, size_t); struct __sFILE *efopen(const char *, const char *); int easprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); int evasprintf(char ** __restrict, const char * __restrict, __va_list) __printflike(2, 0); __END_DECLS #endif /* !_UTIL_H_ */ # 168 "/usr/include/util.h" 3 4 # 37 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" 2 #endif # 38 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" #if HAVE_BSD_LIBUTIL_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" # 40 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" #elif HAVE_LIBUTIL_H # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" # 42 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" #endif # 43 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" /* * Declare functions and macros that may be missing in or * . */ #if !HAVE_FPARSELN #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 #define FPARSELN_UNESCCOMM 0x04 #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f char *fparseln(FILE *, size_t *, size_t *, const char[3], int); #endif # 58 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" #endif /* !_NBCOMPAT_UTIL_H_ */ # 60 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/util.h" # 68 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #if HAVE_NBCOMPAT_POLL # if HAVE_POLL_H # undef HAVE_POLL_H # endif # 73 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # if HAVE_SYS_POLL_H # undef HAVE_SYS_POLL_H # endif # 76 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 76 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 77 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 78 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_FTS # if HAVE_FTS_H # undef HAVE_FTS_H # endif # 83 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 83 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 84 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 85 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_GLOB # if HAVE_GLOB_H # undef HAVE_GLOB_H # endif # 90 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 90 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 1 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/glob.h" 1 /* $Id: glob.h,v 1.3 2004/08/16 17:24:57 jlam Exp $ */ /* from NetBSD: glob.h,v 1.13 2001/03/16 21:02:42 christos Exp */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Guido van Rossum. * * 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. * * @(#)glob.h 8.1 (Berkeley) 6/2/93 */ #ifndef _NBCOMPAT_GLOB_H_ #define _NBCOMPAT_GLOB_H_ typedef struct { int gl_pathc; /* Count of total paths so far. */ int gl_matchc; /* Count of paths matching pattern. */ int gl_offs; /* Reserved at beginning of gl_pathv. */ int gl_flags; /* Copy of flags parameter to glob. */ char **gl_pathv; /* List of paths matching pattern. */ /* Copy of errfunc parameter to glob. */ int (*gl_errfunc)(const char *, int); /* * Alternate filesystem access methods for glob; replacement * versions of closedir(3), readdir(3), opendir(3), stat(2) * and lstat(2). */ void (*gl_closedir)(void *); struct dirent *(*gl_readdir)(void *); void *(*gl_opendir)(const char *); int (*gl_lstat)(const char *, struct stat *); int (*gl_stat)(const char *, struct stat *); } glob_t; #define GLOB_APPEND 0x0001 /* Append to output from previous call. */ #define GLOB_DOOFFS 0x0002 /* Use gl_offs. */ #define GLOB_ERR 0x0004 /* Return on error. */ #define GLOB_MARK 0x0008 /* Append / to matching directories. */ #define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */ #define GLOB_NOSORT 0x0020 /* Don't sort. */ #define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */ #define GLOB_NOSPACE (-1) /* Malloc call failed. */ #define GLOB_ABORTED (-2) /* Unignored error. */ #define GLOB_NOMATCH (-3) /* No match, and GLOB_NOCHECK was not set. */ #define GLOB_NOSYS (-4) /* Implementation does not support function. */ #define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ #define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ #define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ #define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */ #define GLOB_LIMIT 0x0400 /* Limit memory used by matches to ARG_MAX */ #define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */ #define GLOB_QUOTE 0 /* source compatibility */ #define GLOB_ABEND GLOB_ABORTED /* source compatibility */ int glob(const char *, int, int (*)(const char *, int), glob_t *); void globfree(glob_t *); #endif /* !_NBCOMPAT_GLOB_H_ */ # 89 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat/glob.h" # 91 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" 2 #endif # 92 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_REGEX # if HAVE_REGEX_H # undef HAVE_REGEX_H # endif # 97 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 97 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 98 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 99 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_MD5INIT # if HAVE_MD5_H # undef HAVE_MD5_H # endif # 104 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 105 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_MD5 # if HAVE_MD5_H # undef HAVE_MD5_H # endif # 110 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 111 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_RMD160 # if HAVE_RMD160_H # undef HAVE_RMD160_H # endif # 116 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 117 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_SHA1 # if HAVE_SHA1_H # undef HAVE_SHA1_H # endif # 122 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 123 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if HAVE_NBCOMPAT_VIS # if HAVE_VIS_H # undef HAVE_VIS_H # endif # 128 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 128 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 129 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 130 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #if !HAVE_GETOPT_H || !HAVE_STRUCT_OPTION # undef HAVE_GETOPT_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 133 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 134 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" #endif # 135 "/tmp/pkgsrc-tmp/pkgtools/cwrappers/work/libnbcompat/nbcompat.h" # 33 "common.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "config.h" #endif /* expanded by -frewrite-includes */ # 33 "common.c" # 1 "./config.h" 1 /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `posix_spawnp' function. */ #define HAVE_POSIX_SPAWNP 1 /* Define to 1 if you have the header file. */ #define HAVE_SPAWN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "joerg@NetBSD.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "cwrappers" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "cwrappers 20161125" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "cwrappers" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "20161125" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 # 34 "common.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "common.c" # 1 "/usr/include/sys/wait.h" 1 3 4 /* $NetBSD: wait.h,v 1.35 2016/11/10 18:35:17 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 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. * * @(#)wait.h 8.2 (Berkeley) 7/10/94 */ #ifndef _SYS_WAIT_H_ #define _SYS_WAIT_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/wait.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 38 "/usr/include/sys/wait.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/wait.h" 3 4 # 39 "/usr/include/sys/wait.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/wait.h" 3 4 # 40 "/usr/include/sys/wait.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/sys/wait.h" 3 4 # 41 "/usr/include/sys/wait.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/sys/wait.h" 3 4 # 42 "/usr/include/sys/wait.h" 3 4 /* * This file holds definitions relevent to the wait4 system call * and the alternate interfaces that use it (wait, wait3, waitpid). */ /* * Macros to test the exit status returned by wait * and extract the relevant values. */ #if !( defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) ) || defined(_KERNEL) #define _W_INT(i) (i) #else # 55 "/usr/include/sys/wait.h" 3 4 #define _W_INT(w) (*(int *)(void *)&(w)) /* convert union wait to int */ #endif # 57 "/usr/include/sys/wait.h" 3 4 #define _WSTATUS(x) (_W_INT(x) & 0177) #define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ #define _WCONTINUED 0xffffU #define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED && !WIFCONTINUED(x)) #define WIFCONTINUED(x) (_W_INT(x) == _WCONTINUED) #define WSTOPSIG(x) ((int)(((unsigned int)_W_INT(x)) >> 8) & 0xff) #define WIFSIGNALED(x) (!WIFSTOPPED(x) && !WIFCONTINUED(x) && !WIFEXITED(x)) #define WTERMSIG(x) (_WSTATUS(x)) #define WIFEXITED(x) (_WSTATUS(x) == 0) #define WEXITSTATUS(x) ((int)(((unsigned int)_W_INT(x)) >> 8) & 0xff) #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) || defined(_KERNEL) #define WCOREFLAG 0200 #define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) #define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) #define W_CONTCODE() (_WCONTINUED) #endif # 76 "/usr/include/sys/wait.h" 3 4 /* * POSIX option bits for the "options" argument of wait{3,4,6} wait{,p}id: * * WNOHANG * Causes the wait to not hang if there are no stopped or terminated * processes, rather returning an error indication in this case (pid==0). * * WSTOPPED/WUNTRACED * Indicates that the caller should receive status about untraced * children which stop due to signals. If children are stopped * and a wait without this option is done, it is as though they * were still running, nothing about them is returned. * * WCONTINUED * Returns information for children that were continued from job * control. * * WEXITED * Is the default for wait/wait3/wait4/waitpid (to report children * that have exited), but needs to be explicitly specified for * waitid/wait6. * * WNOWAIT * Returns information about the children without reaping them * (changing their status to have been already waited for). */ #define WNOHANG 0x00000001 /* don't hang in wait */ #define WSTOPPED 0x00000002 /* include stopped/untraceed children */ #define WUNTRACED WSTOPPED /* the original name for WSTOPPED */ #define WCONTINUED 0x00000010 /* include continued processes */ #define WEXITED 0x00000020 /* Wait for exited processes. */ #define WNOWAIT 0x00010000 /* Don't mark child 'P_WAITED' */ #if defined(_NETBSD_SOURCE) #define WALTSIG 0x00000004 /* wait for processes that exit with an alternate signal (i.e. not SIGCHLD) */ #define WALLSIG 0x00000008 /* wait for processes that exit with any signal, i.e. SIGCHLD and alternates */ #define WTRAPPED 0x00000040 /* Wait for a process to hit a trap or a breakpoint. */ #define WNOZOMBIE 0x00020000 /* Ignore zombies */ /* * These are the Linux names of some of the above flags, for compatibility * with Linux's clone(2) API. */ #define __WCLONE WALTSIG #define __WALL WALLSIG #endif /* _NETBSD_SOURCE */ # 128 "/usr/include/sys/wait.h" 3 4 #ifdef _KERNEL #define WSELECTOPTS (WEXITED|WUNTRACED|WCONTINUED|WTRAPPED) #define WALLOPTS (WNOHANG|WALTSIG|WALLSIG|WNOWAIT|WNOZOMBIE|WSELECTOPTS) #endif /* _KERNEL */ # 133 "/usr/include/sys/wait.h" 3 4 #if defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) /* POSIX extensions and 4.2/4.3 compatibility: */ /* * Tokens for special values of the "pid" parameter to wait4. */ #define WAIT_ANY (-1) /* any process */ #define WAIT_MYPGRP 0 /* any process in my process group */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 143 "/usr/include/sys/wait.h" 3 4 # 144 "/usr/include/sys/wait.h" 3 4 /* * Deprecated: * Structure of the information in the status word returned by wait4. * If w_stopval==WSTOPPED, then the second structure describes * the information returned, else the first. */ union wait { int w_status; /* used in syscall */ /* * Terminated process status. */ struct { #if BYTE_ORDER == LITTLE_ENDIAN unsigned int w_Termsig:7, /* termination signal */ w_Coredump:1, /* core dump indicator */ w_Retcode:8, /* exit code if w_termsig==0 */ w_Filler:16; /* upper bits filler */ #endif # 163 "/usr/include/sys/wait.h" 3 4 #if BYTE_ORDER == BIG_ENDIAN unsigned int w_Filler:16, /* upper bits filler */ w_Retcode:8, /* exit code if w_termsig==0 */ w_Coredump:1, /* core dump indicator */ w_Termsig:7; /* termination signal */ #endif # 169 "/usr/include/sys/wait.h" 3 4 } w_T; /* * Stopped process status. Returned * only for traced children unless requested * with the WUNTRACED option bit. */ struct { #if BYTE_ORDER == LITTLE_ENDIAN unsigned int w_Stopval:8, /* == W_STOPPED if stopped */ w_Stopsig:8, /* signal that stopped us */ w_Filler:16; /* upper bits filler */ #endif # 181 "/usr/include/sys/wait.h" 3 4 #if BYTE_ORDER == BIG_ENDIAN unsigned int w_Filler:16, /* upper bits filler */ w_Stopsig:8, /* signal that stopped us */ w_Stopval:8; /* == W_STOPPED if stopped */ #endif # 186 "/usr/include/sys/wait.h" 3 4 } w_S; }; #define w_termsig w_T.w_Termsig #define w_coredump w_T.w_Coredump #define w_retcode w_T.w_Retcode #define w_stopval w_S.w_Stopval #define w_stopsig w_S.w_Stopsig #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ # 195 "/usr/include/sys/wait.h" 3 4 #ifndef _KERNEL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 197 "/usr/include/sys/wait.h" 3 4 # 198 "/usr/include/sys/wait.h" 3 4 __BEGIN_DECLS struct rusage; /* forward declaration */ struct wrusage; pid_t wait(int *); pid_t waitpid(pid_t, int *, int); int waitid(idtype_t, id_t, siginfo_t *, int); #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) #ifndef __LIBC12_SOURCE__ pid_t wait3(int *, int, struct rusage *) __RENAME(__wait350); pid_t wait4(pid_t, int *, int, struct rusage *) __RENAME(__wait450); pid_t wait6(idtype_t, id_t, int *, int, struct wrusage *, siginfo_t *); #endif # 212 "/usr/include/sys/wait.h" 3 4 #endif # 213 "/usr/include/sys/wait.h" 3 4 __END_DECLS #endif # 215 "/usr/include/sys/wait.h" 3 4 #endif /* !_SYS_WAIT_H_ */ # 217 "/usr/include/sys/wait.h" 3 4 # 35 "common.c" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "common.c" # 36 "common.c" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "common.c" # 37 "common.c" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "common.c" # 38 "common.c" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "common.c" # 39 "common.c" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "common.c" # 40 "common.c" #if defined(HAVE_POSIX_SPAWNP) && defined(HAVE_SPAWN_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "common.c" # 1 "/usr/include/spawn.h" 1 3 4 /* $NetBSD: spawn.h,v 1.4 2012/02/22 17:51:01 martin Exp $ */ /*- * Copyright (c) 2008 Ed Schouten * 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: src/include/spawn.h,v 1.3.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $ */ #ifndef _SPAWN_H #define _SPAWN_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/spawn.h" 3 4 # 1 "/usr/include/sys/spawn.h" 1 3 4 /* $NetBSD: spawn.h,v 1.5 2014/09/05 05:46:54 matt Exp $ */ /*- * Copyright (c) 2008 Ed Schouten * 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: src/include/spawn.h,v 1.3.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $ */ #ifndef _SYS_SPAWN_H_ #define _SYS_SPAWN_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/sys/spawn.h" 3 4 # 35 "/usr/include/sys/spawn.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/sys/spawn.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 36 "/usr/include/sys/spawn.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/sys/spawn.h" 3 4 # 37 "/usr/include/sys/spawn.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/sys/spawn.h" 3 4 # 38 "/usr/include/sys/spawn.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/sys/spawn.h" 3 4 # 39 "/usr/include/sys/spawn.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/sys/spawn.h" 3 4 # 1 "/usr/include/sys/sched.h" 1 3 4 /* $NetBSD: sched.h,v 1.76 2016/07/03 14:24:59 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Ross Harvey, Jason R. Thorpe, Nathan J. Williams, Andrew Doran and * Daniel Sieger. * * 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. */ /*- * Copyright (c) 1982, 1986, 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. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 */ #ifndef _SYS_SCHED_H_ #define _SYS_SCHED_H_ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 72 "/usr/include/sys/sched.h" 3 4 # 1 "/usr/include/sys/featuretest.h" 1 3 4 /* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */ /* * Written by Klaus Klein , February 2, 1998. * Public domain. * * NOTE: Do not protect this header against multiple inclusion. Doing * so can have subtle side-effects due to header file inclusion order * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead, * protect each CPP macro that we want to supply. */ /* * Feature-test macros are defined by several standards, and allow an * application to specify what symbols they want the system headers to * expose, and hence what standard they want them to conform to. * There are two classes of feature-test macros. The first class * specify complete standards, and if one of these is defined, header * files will try to conform to the relevant standard. They are: * * ANSI macros: * _ANSI_SOURCE ANSI C89 * * POSIX macros: * _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?) * _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990 * _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992 * _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993 * _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996 * _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001 * _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008 * * X/Open macros: * _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2 * _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions * _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5 * _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2 * _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option * _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option * * NetBSD macros: * _NETBSD_SOURCE == 1 Make all NetBSD features available. * * If more than one of these "major" feature-test macros is defined, * then the set of facilities provided (and namespace used) is the * union of that specified by the relevant standards, and in case of * conflict, the earlier standard in the above list has precedence (so * if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version * of rename() that's used is the POSIX one). If none of the "major" * feature-test macros is defined, _NETBSD_SOURCE is assumed. * * There are also "minor" feature-test macros, which enable extra * functionality in addition to some base standard. They should be * defined along with one of the "major" macros. The "minor" macros * are: * * _REENTRANT * _ISOC99_SOURCE * _ISOC11_SOURCE * _LARGEFILE_SOURCE Large File Support * */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1L #endif # 67 "/usr/include/sys/featuretest.h" 3 4 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ !defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE) #define _NETBSD_SOURCE 1 #endif # 72 "/usr/include/sys/featuretest.h" 3 4 #if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \ !defined(_REENTRANT) #define _REENTRANT #endif # 77 "/usr/include/sys/featuretest.h" 3 4 # 73 "/usr/include/sys/sched.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 73 "/usr/include/sys/sched.h" 3 4 # 74 "/usr/include/sys/sched.h" 3 4 #if defined(_KERNEL_OPT) #if 0 /* expanded by -frewrite-includes */ #include "opt_multiprocessor.h" #endif /* expanded by -frewrite-includes */ # 76 "/usr/include/sys/sched.h" 3 4 # 77 "/usr/include/sys/sched.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "opt_lockdebug.h" #endif /* expanded by -frewrite-includes */ # 77 "/usr/include/sys/sched.h" 3 4 # 78 "/usr/include/sys/sched.h" 3 4 #endif # 79 "/usr/include/sys/sched.h" 3 4 struct sched_param { int sched_priority; }; /* * Scheduling policies required by IEEE Std 1003.1-2001 */ #define SCHED_NONE -1 #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #if defined(_NETBSD_SOURCE) __BEGIN_DECLS /* * Interface of CPU-sets. */ typedef struct _cpuset cpuset_t; #ifndef _KERNEL #define cpuset_create() _cpuset_create() #define cpuset_destroy(c) _cpuset_destroy(c) #define cpuset_size(c) _cpuset_size(c) #define cpuset_zero(c) _cpuset_zero(c) #define cpuset_isset(i, c) _cpuset_isset(i, c) #define cpuset_set(i, c) _cpuset_set(i, c) #define cpuset_clr(i, c) _cpuset_clr(i, c) cpuset_t *_cpuset_create(void); void _cpuset_destroy(cpuset_t *); void _cpuset_zero(cpuset_t *); int _cpuset_set(cpuid_t, cpuset_t *); int _cpuset_clr(cpuid_t, cpuset_t *); int _cpuset_isset(cpuid_t, const cpuset_t *); size_t _cpuset_size(const cpuset_t *); #endif # 119 "/usr/include/sys/sched.h" 3 4 /* * Internal affinity and scheduling calls. */ int _sched_getaffinity(pid_t, lwpid_t, size_t, cpuset_t *); int _sched_setaffinity(pid_t, lwpid_t, size_t, const cpuset_t *); int _sched_getparam(pid_t, lwpid_t, int *, struct sched_param *); int _sched_setparam(pid_t, lwpid_t, int, const struct sched_param *); int _sched_protect(int); __END_DECLS /* * CPU states. * XXX Not really scheduler state, but no other good place to put * it right now, and it really is per-CPU. */ #define CP_USER 0 #define CP_NICE 1 #define CP_SYS 2 #define CP_INTR 3 #define CP_IDLE 4 #define CPUSTATES 5 #if defined(_KERNEL) || defined(_KMEMUSER) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 144 "/usr/include/sys/sched.h" 3 4 # 145 "/usr/include/sys/sched.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 145 "/usr/include/sys/sched.h" 3 4 # 146 "/usr/include/sys/sched.h" 3 4 /* * Per-CPU scheduler state. Field markings and the corresponding locks: * * s: splsched, may only be safely accessed by the CPU itself * m: spc_mutex * (: unlocked, stable * c: cpu_lock */ struct schedstate_percpu { /* First set of data is likely to be accessed by other CPUs. */ kmutex_t *spc_mutex; /* (: lock on below, runnable LWPs */ kmutex_t *spc_lwplock; /* (: general purpose lock for LWPs */ struct lwp *spc_migrating; /* (: migrating LWP */ pri_t spc_curpriority;/* m: usrpri of curlwp */ pri_t spc_maxpriority;/* m: highest priority queued */ psetid_t spc_psid; /* c: processor-set ID */ time_t spc_lastmod; /* c: time of last cpu state change */ /* For the most part, this set of data is CPU-private. */ void *spc_sched_info;/* (: scheduler-specific structure */ volatile int spc_flags; /* s: flags; see below */ u_int spc_schedticks; /* s: ticks for schedclock() */ uint64_t spc_cp_time[CPUSTATES];/* s: CPU state statistics */ int spc_ticks; /* s: ticks until sched_tick() */ int spc_pscnt; /* s: prof/stat counter */ int spc_psdiv; /* s: prof/stat divisor */ }; /* spc_flags */ #define SPCF_SEENRR 0x0001 /* process has seen roundrobin() */ #define SPCF_SHOULDYIELD 0x0002 /* process should yield the CPU */ #define SPCF_OFFLINE 0x0004 /* CPU marked offline */ #define SPCF_RUNNING 0x0008 /* CPU is running */ #define SPCF_NOINTR 0x0010 /* shielded from interrupts */ #define SPCF_SWITCHCLEAR (SPCF_SEENRR|SPCF_SHOULDYIELD) #endif /* defined(_KERNEL) || defined(_KMEMUSER) */ # 185 "/usr/include/sys/sched.h" 3 4 /* * Flags passed to the Linux-compatible __clone(2) system call. */ #define CLONE_CSIGNAL 0x000000ff /* signal to be sent at exit */ #define CLONE_VM 0x00000100 /* share address space */ #define CLONE_FS 0x00000200 /* share "file system" info */ #define CLONE_FILES 0x00000400 /* share file descriptors */ #define CLONE_SIGHAND 0x00000800 /* share signal actions */ #define CLONE_PID 0x00001000 /* share process ID */ #define CLONE_PTRACE 0x00002000 /* ptrace(2) continues on child */ #define CLONE_VFORK 0x00004000 /* parent blocks until child exits */ #endif /* _NETBSD_SOURCE */ # 201 "/usr/include/sys/sched.h" 3 4 #ifdef _KERNEL extern int schedhz; /* ideally: 16 */ struct proc; struct cpu_info; /* * Common Scheduler Interface. */ /* Scheduler initialization */ void runq_init(void); void synch_init(void); void sched_init(void); void sched_rqinit(void); void sched_cpuattach(struct cpu_info *); /* Time-driven events */ void sched_tick(struct cpu_info *); void schedclock(struct lwp *); void sched_schedclock(struct lwp *); void sched_pstats(void); void sched_lwp_stats(struct lwp *); void sched_pstats_hook(struct lwp *, int); /* Runqueue-related functions */ bool sched_curcpu_runnable_p(void); void sched_dequeue(struct lwp *); void sched_enqueue(struct lwp *, bool); struct lwp * sched_nextlwp(void); void sched_oncpu(struct lwp *); void sched_newts(struct lwp *); /* Priority adjustment */ void sched_nice(struct proc *, int); /* Handlers of fork and exit */ void sched_proc_fork(struct proc *, struct proc *); void sched_proc_exit(struct proc *, struct proc *); void sched_lwp_fork(struct lwp *, struct lwp *); void sched_lwp_collect(struct lwp *); void sched_slept(struct lwp *); void sched_wakeup(struct lwp *); void setrunnable(struct lwp *); void sched_setrunnable(struct lwp *); struct cpu_info *sched_takecpu(struct lwp *); void sched_print_runqueue(void (*pr)(const char *, ...) __printflike(1, 2)); /* Dispatching */ bool kpreempt(uintptr_t); void preempt(void); void yield(void); int mi_switch(struct lwp *); void updatertime(lwp_t *, const struct bintime *); void sched_idle(void); void suspendsched(void); int do_sched_setparam(pid_t, lwpid_t, int, const struct sched_param *); int do_sched_getparam(pid_t, lwpid_t, int *, struct sched_param *); #endif /* _KERNEL */ # 268 "/usr/include/sys/sched.h" 3 4 #endif /* _SYS_SCHED_H_ */ # 269 "/usr/include/sys/sched.h" 3 4 # 40 "/usr/include/sys/spawn.h" 2 3 4 struct posix_spawnattr { short sa_flags; pid_t sa_pgroup; struct sched_param sa_schedparam; int sa_schedpolicy; sigset_t sa_sigdefault; sigset_t sa_sigmask; }; enum fae_action { FAE_OPEN, FAE_DUP2, FAE_CLOSE }; typedef struct posix_spawn_file_actions_entry { enum fae_action fae_action; int fae_fildes; union { struct { char *path; #define fae_path fae_data.open.path int oflag; #define fae_oflag fae_data.open.oflag mode_t mode; #define fae_mode fae_data.open.mode } open; struct { int newfildes; #define fae_newfildes fae_data.dup2.newfildes } dup2; } fae_data; } posix_spawn_file_actions_entry_t; struct posix_spawn_file_actions { unsigned int size; /* size of fae array */ unsigned int len; /* how many slots are used */ posix_spawn_file_actions_entry_t *fae; }; typedef struct posix_spawnattr posix_spawnattr_t; typedef struct posix_spawn_file_actions posix_spawn_file_actions_t; #define POSIX_SPAWN_RESETIDS 0x01 #define POSIX_SPAWN_SETPGROUP 0x02 #define POSIX_SPAWN_SETSCHEDPARAM 0x04 #define POSIX_SPAWN_SETSCHEDULER 0x08 #define POSIX_SPAWN_SETSIGDEF 0x10 #define POSIX_SPAWN_SETSIGMASK 0x20 #ifdef _NETBSD_SOURCE /* * With this flag set, the kernel part of posix_spawn will not try to * maximize parallelism, but instead the parent will wait for the child * process to complete all file/scheduler actions and report back errors * from that via the return value of the posix_spawn syscall. This is * usefull for testing, as it can verify the generated error codes and * match to the supposedly triggered failures. * In general, the kernel will return from the posix_spawn syscall as * early as possible, as soon as creating the new process is known to * work. Errors might either be reported back via the return value in * the parent, or (less explicit) by an error exit of the child * process. Our test cases deal with both behaviours in the general * case, but request the POSIX_SPAWN_RETURNERROR for some tests. */ #define POSIX_SPAWN_RETURNERROR 0x40 #endif # 104 "/usr/include/sys/spawn.h" 3 4 #endif /* !_SYS_SPAWN_H_ */ # 106 "/usr/include/sys/spawn.h" 3 4 # 35 "/usr/include/spawn.h" 2 3 4 __BEGIN_DECLS /* * Spawn routines * */ int posix_spawn(pid_t * __restrict, const char * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, char * const *__restrict, char * const *__restrict); int posix_spawnp(pid_t * __restrict, const char * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, char * const *__restrict, char * const *__restrict); /* * File descriptor actions */ int posix_spawn_file_actions_init(posix_spawn_file_actions_t *); int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *); int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict, int, const char * __restrict, int, mode_t); int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); /* * Spawn attributes */ int posix_spawnattr_init(posix_spawnattr_t *); int posix_spawnattr_destroy(posix_spawnattr_t *); int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict, short * __restrict); int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict, pid_t * __restrict); int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict, struct sched_param * __restrict); int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict, int * __restrict); int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, sigset_t * __restrict); int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict, sigset_t * __restrict sigmask); int posix_spawnattr_setflags(posix_spawnattr_t *, short); int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t); int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict, const struct sched_param * __restrict); int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict, const sigset_t * __restrict); int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict, const sigset_t * __restrict); __END_DECLS #endif /* _SPAWN_H */ # 90 "/usr/include/spawn.h" 3 4 # 42 "common.c" 2 #endif # 43 "common.c" #if 0 /* expanded by -frewrite-includes */ #include "common.h" #endif /* expanded by -frewrite-includes */ # 44 "common.c" # 1 "./common.h" 1 /* $NetBSD: common.h,v 1.6 2017/06/11 19:34:43 joerg Exp $ */ /*- * Copyright (c) 2009, 2017 Joerg Sonnenberger . * 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 COPYRIGHT HOLDERS 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 * COPYRIGHT HOLDERS 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. */ #ifndef COMMON_H #define COMMON_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "./common.h" # 36 "./common.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "./common.h" # 37 "./common.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "./common.h" # 38 "./common.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 38 "./common.h" # 39 "./common.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "./common.h" # 40 "./common.h" extern const char library_name_chars[]; extern char *exec_path; extern char *exec_name; extern char *wrksrc; extern int debug; enum operation_mode { mode_unknown, mode_preprocess, mode_assemble, mode_compile, mode_link_executable, mode_link_shared }; extern enum operation_mode current_operation_mode; TAILQ_HEAD(arglist, argument); struct argument { TAILQ_ENTRY(argument) link; TAILQ_ENTRY(argument) tmp_link; char *val; }; extern struct argument *prepend_after; char *concat(const char *, const char *); char *concat2(const char *, const char *, size_t); void arglist_from_argc(struct arglist *, int, char **); void arglist_apply_config(struct arglist *); int command_exec(struct arglist *, int, char **); size_t wrapper_hash(const char *); size_t wrapper_hash2(const char *, size_t); void argument_unlink(struct arglist *, struct argument **); struct argument *argument_new(char *); struct argument *argument_copy(const char *); void argument_update(struct argument *, char *); void parse_config(const char *); FILE *worklog_open(void); void worklog_cmd(FILE *, const char *, const char *, struct arglist *); #if defined(__GNUC__) && __GNUC__ >= 2 char *xasprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2))); #else # 89 "./common.h" char *xasprintf(const char *, ...); #endif # 91 "./common.h" void *xmalloc(size_t); void *xrealloc(void *, size_t); char *xstrdup(const char *); char *xstrndup(const char *, size_t); void operation_mode_cc(struct arglist *); void normalise_cc(struct arglist *); void cleanup_cc(struct arglist *args); void transform_cc(struct arglist *args); void register_reorder(const char *); void reorder_cc(struct arglist *); void init_generic_transform(void); void register_generic_transform(const char *); void generic_transform_cc(struct arglist *); void operation_mode_ld(struct arglist *); void normalise_ld(struct arglist *); void generic_transform_ld(struct arglist *); void register_unwrap(const char *); void fixup_libtool(struct arglist *); #ifdef NEED_MI_VECTOR_HASH void mi_vector_hash(const void *, size_t, uint32_t, uint32_t[3]); #endif # 119 "./common.h" #endif # 121 "./common.h" # 45 "common.c" 2 static char *worklog_path; static char *real_path; char *exec_path; char *exec_name; char *wrksrc; int debug; enum operation_mode current_operation_mode = mode_unknown; static struct arglist prepend_args = TAILQ_HEAD_INITIALIZER(prepend_args); static struct arglist append_args = TAILQ_HEAD_INITIALIZER(append_args); static struct arglist prepend_executable_args = TAILQ_HEAD_INITIALIZER(prepend_executable_args); static struct arglist append_executable_args = TAILQ_HEAD_INITIALIZER(append_executable_args); static struct arglist prepend_shared_args = TAILQ_HEAD_INITIALIZER(prepend_shared_args); static struct arglist append_shared_args = TAILQ_HEAD_INITIALIZER(append_shared_args); struct argument *prepend_after; const char library_name_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "01234567890-_"; char * concat(const char *s1, const char *s2) { size_t len1, len2; char *output; len1 = strlen(s1); len2 = strlen(s2); output = xmalloc(len1 + len2 + 1); memcpy(output, s1, len1); memcpy(output + len1, s2, len2); output[len1 + len2] = '\0'; return output; } char * concat2(const char *s1, const char *s2, size_t len2) { size_t len1; char *output; len1 = strlen(s1); output = xmalloc(len1 + len2 + 1); memcpy(output, s1, len1); memcpy(output + len1, s2, len2); output[len1 + len2] = '\0'; return output; } struct argument * argument_new(char *str) { struct argument *arg; arg = xmalloc(sizeof(*arg)); arg->val = str; return arg; } struct argument * argument_copy(const char *str) { struct argument *arg; arg = xmalloc(sizeof(*arg)); arg->val = xstrdup(str); return arg; } void argument_update(struct argument *arg, char *str) { free(arg->val); arg->val = str; } void arglist_from_argc(struct arglist *args, int argc, char **argv) { struct argument *arg; TAILQ_INIT(args); for (--argc, ++argv; argc; --argc, ++argv) { if (**argv == '\0') continue; arg = argument_copy(*argv); TAILQ_INSERT_TAIL(args, arg, link); } } static void arglist_prepend_list(struct arglist *args, struct arglist *prepends) { struct argument *arg, *arg2; if (prepend_after) { TAILQ_FOREACH(arg, prepends, link) { arg2 = argument_copy(arg->val); TAILQ_INSERT_AFTER(args, prepend_after, arg2, link); } } else { TAILQ_FOREACH_REVERSE(arg, prepends, arglist, link) { arg2 = argument_copy(arg->val); TAILQ_INSERT_HEAD(args, arg2, link); } } } static void arglist_append_list(struct arglist *args, struct arglist *appends) { struct argument *arg, *arg2; TAILQ_FOREACH(arg, appends, link) { arg2 = argument_copy(arg->val); TAILQ_INSERT_TAIL(args, arg2, link); } } void arglist_apply_config(struct arglist *args) { arglist_prepend_list(args, &prepend_args); arglist_append_list(args, &append_args); switch (current_operation_mode) { default: break; case mode_link_executable: arglist_prepend_list(args, &prepend_executable_args); arglist_append_list(args, &append_executable_args); break; case mode_link_shared: arglist_prepend_list(args, &prepend_shared_args); arglist_append_list(args, &prepend_shared_args); break; } } void argument_unlink(struct arglist *args, struct argument **argp) { struct argument *arg; arg = *argp; *argp = TAILQ_NEXT(arg, link); TAILQ_REMOVE(args, arg, link); free(arg->val); free(arg); } void parse_config(const char *wrapper) { const char *config_dir; char *config_file, *line; size_t len; ssize_t llen; FILE *fp; config_dir = getenv("CWRAPPERS_CONFIG_DIR"); if (config_dir == NULL) errx(255, "CWRAPPERS_CONFIG_DIR is missing from environment"); config_file = xasprintf("%s/%s", config_dir, wrapper); fp = fopen(config_file, "r"); if (fp == NULL) errx(255, "Failed to open wrapper config file `%s'", config_file); for (len = 0, line = NULL; (llen = getline(&line, &len, fp)) > 0; free(line), line = NULL, len = 0) { if (line[llen - 1] == '\n') { line[llen - 1] = '\0'; --llen; } if (strncmp(line, "worklog=", 8) == 0) { free(worklog_path); worklog_path = xstrdup(line + 8); continue; } if (strncmp(line, "path=", 5) == 0) { free(real_path); real_path = xstrdup(line + 5); continue; } if (strncmp(line, "exec_path=", 10) == 0) { free(exec_path); exec_path = xstrdup(line + 10); continue; } if (strncmp(line, "exec=", 5) == 0) { free(exec_name); exec_name = xstrdup(line + 5); continue; } if (strncmp(line, "reorder=", 8) == 0) { register_reorder(line + 8); continue; } if (strncmp(line, "transform=", 10) == 0) { register_generic_transform(line + 10); continue; } if (strncmp(line, "prepend=", 8) == 0) { struct argument *arg; arg = argument_copy(line + 8); TAILQ_INSERT_TAIL(&prepend_args, arg, link); } if (strncmp(line, "append=", 7) == 0) { struct argument *arg; arg = argument_copy(line + 7); TAILQ_INSERT_TAIL(&append_args, arg, link); } if (strncmp(line, "prepend_executable=", 19) == 0) { struct argument *arg; arg = argument_copy(line + 19); TAILQ_INSERT_TAIL(&prepend_executable_args, arg, link); } if (strncmp(line, "append_executable=", 18) == 0) { struct argument *arg; arg = argument_copy(line + 18); TAILQ_INSERT_TAIL(&append_executable_args, arg, link); } if (strncmp(line, "prepend_shared=", 15) == 0) { struct argument *arg; arg = argument_copy(line + 15); TAILQ_INSERT_TAIL(&prepend_shared_args, arg, link); } if (strncmp(line, "append_shared=", 14) == 0) { struct argument *arg; arg = argument_copy(line + 14); TAILQ_INSERT_TAIL(&append_shared_args, arg, link); } if (strncmp(line, "wrksrc=", 7) == 0) { free(wrksrc); wrksrc = xstrdup(line + 7); continue; } if (strncmp(line, "unwrap=", 7) == 0) { register_unwrap(line + 7); continue; } if (strncmp(line, "debug=", 6) == 0) { debug = atoi(line + 6); continue; } } fclose(fp); if (worklog_path == NULL) errx(255, "worklog path has not been set"); if (exec_name == NULL) errx(255, "executable name has not been set"); if (exec_path == NULL) errx(255, "executable path has not been set"); } FILE * worklog_open(void) { FILE *fp; fp = fopen(worklog_path, "a"); if (fp == NULL) err(255, "Could not open %s", worklog_path); return fp; } void worklog_cmd(FILE *worklog, const char *prefix, const char *cmd, struct arglist *args) { static const char safe_chars[] = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "01234567890-_/:.,+="; struct argument *arg; size_t len, buflen; char *buf; fprintf(worklog, "%s %s", prefix, cmd); buf = NULL; buflen = 0; TAILQ_FOREACH(arg, args, link) { len = strlen(arg->val); if (len == 0) { fputs(" ''", worklog); continue; } if (strspn(arg->val, safe_chars) == len) { fputc(' ', worklog); fputs(arg->val, worklog); continue; } len = shquote(arg->val, buf, buflen); if (len >= buflen) { buflen = len + 1; free(buf); buf = xmalloc(buflen); shquote(arg->val, buf, buflen); } fputc(' ', worklog); fputs(buf, worklog); } fputc('\n', worklog); if (buf) free(buf); } #if __GNUC__ + 0 >= 3 __attribute__((__noreturn__)) #endif # 376 "common.c" static void command_child_exec(char **argv) { static const char failed_exec_msg[] = "exec failed\n"; int status; execvp(exec_name, argv); status = write(STDERR_FILENO, failed_exec_msg, sizeof(failed_exec_msg) - 1); _exit(255 | status); } int command_exec(struct arglist *args, int do_fork, char **environment) { struct argument *arg; char **argv, **argv2; int argc, status; pid_t child; argc = 2; TAILQ_FOREACH(arg, args, link) ++argc; argv2 = xmalloc(sizeof(void *) * argc); argv2[0] = exec_name; argv = argv2 + 1; TAILQ_FOREACH(arg, args, link) *argv++ = arg->val; *argv = NULL; if (real_path) setenv("PATH", real_path, 1); if (!do_fork) command_child_exec(argv2); #if defined(HAVE_POSIX_SPAWNP) && defined(HAVE_SPAWN_H) status = posix_spawnp(&child, exec_name, NULL, NULL, argv2, environment); if (status) { errno = status; err(255, "posix_spawn failed"); } #else # 421 "common.c" child = vfork(); if (child == -1) err(255, "fork failed"); if (child == 0) command_child_exec(argv2); #endif # 428 "common.c" waitpid(child, &status, 0); return WEXITSTATUS(status); } size_t wrapper_hash(const char *str) { return wrapper_hash2(str, strlen(str)); } size_t wrapper_hash2(const char *str, size_t len) { uint32_t hashes[3]; mi_vector_hash(str, len, 0xdeadbeef, hashes); return hashes[0]; }